webpackJsonp([3,19,23],{ /***/ "+1Vq": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; __webpack_require__("rpBe"); var _checkbox = _interopRequireDefault(__webpack_require__("hK1P")); __webpack_require__("baa2"); var _icon = _interopRequireDefault(__webpack_require__("FC3+")); __webpack_require__("UQ5M"); var _message2 = _interopRequireDefault(__webpack_require__("/qCn")); var _extends2 = _interopRequireDefault(__webpack_require__("uMMT")); var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); __webpack_require__("gZEk"); var _form = _interopRequireDefault(__webpack_require__("8rR3")); __webpack_require__("LHBr"); var _input = _interopRequireDefault(__webpack_require__("A+AJ")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); var _formItemLayout = __webpack_require__("spoJ"); var _index = _interopRequireDefault(__webpack_require__("tVfF")); var _dec, _class; /** * */ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } var TextArea = _input.default.TextArea; var ModalView = exports.default = (_dec = _form.default.create(), _dec(_class = /*#__PURE__*/function (_Component) { function ModalView(props) { var _this; (0, _classCallCheck2.default)(this, ModalView); _this = _callSuper(this, ModalView, [props]); _this.state = { selectedPoints: props.selectedPoints, dispatchType: props.dispatchType, schedulingName: '', schedulingContent: '', openRecord: false //是否开启录制按钮 }; return _this; } (0, _inherits2.default)(ModalView, _Component); return (0, _createClass2.default)(ModalView, [{ key: "componentDidMount", value: function componentDidMount() {} }, { key: "componentWillReceiveProps", value: function componentWillReceiveProps(nextPorps) { this.setState({ selectedPoints: nextPorps.selectedPoints, dispatchType: nextPorps.dispatchType, selectRecordId: '' //选中的人员id }); } }, { key: "render", value: function render() { var _this2 = this; var getFieldDecorator = this.props.form.getFieldDecorator; return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("div", { className: "photo" }, this.state.selectedPoints.map(function (item, index) { return /*#__PURE__*/_react.default.createElement("div", { className: "gutter-row", key: index }, /*#__PURE__*/_react.default.createElement("div", { className: "gutter-box" }, item.photoUrl ? /*#__PURE__*/_react.default.createElement("img", { className: "avator", src: item.photoUrl }) : /*#__PURE__*/_react.default.createElement("span", { className: "avator span-header" }, item.name ? item.name.substring(item.name.length - 2, item.name.length) : ""), /*#__PURE__*/_react.default.createElement("div", { className: "name" }, item.name))); })), this.state.dispatchType !== "video" && /*#__PURE__*/_react.default.createElement("div", { style: { color: '#ecad20' } }, "\u6CE8\u610F\uFF1A\u8BF7\u786E\u4FDD\u6240\u6709\u4EBA\u5458\u90FD\u5DF2\u7ECF\u5B8C\u6210\u57FA\u7840\u4FE1\u606F\u521D\u59CB\u5316\uFF0C\u5426\u5219\u8BE5\u4EBA\u5458\u65E0\u6CD5\u6210\u529F\u52A0\u5165\u7FA4\u7EC4"), /*#__PURE__*/_react.default.createElement("div", { className: "dispatch-content" }, /*#__PURE__*/_react.default.createElement("h2", null, this.state.dispatchType === "text" ? "文字调度" : this.state.dispatchType === "voice" ? "语音调度" : this.state.dispatchType === "video" ? "视频调度" : ""), /*#__PURE__*/_react.default.createElement(_form.default.Item, (0, _extends2.default)({}, _formItemLayout.formItemLayout, { label: "\u8C03\u5EA6\u4E8B\u7531", style: { marginTop: 24 } }), getFieldDecorator("schedulingName", { rules: [{ required: true, message: "请输入调度任务名称" }] })(/*#__PURE__*/_react.default.createElement(_input.default, { onChange: function onChange(e) { _this2.props.schedulingName(e.target.value); _this2.setState({ schedulingName: e.target.value }); } }))), this.state.dispatchType === "text" ? /*#__PURE__*/_react.default.createElement(_form.default.Item, (0, _extends2.default)({}, _formItemLayout.formItemLayout, { label: "\u8C03\u5EA6\u4EFB\u52A1\u5185\u5BB9", style: { marginTop: 24 } }), getFieldDecorator("schedulingContent", { rules: [{ required: true, message: "请输入调度任务内容" }] })(/*#__PURE__*/_react.default.createElement(TextArea, { rows: 4, onChange: function onChange(e) { _this2.setState({ schedulingContent: e.target.value }); _this2.props.schedulingContent(e.target.value); } }))) : //如果是语音调度,需要有语音弹框 this.state.dispatchType === "voice" ? /*#__PURE__*/_react.default.createElement("div", { className: "video" }, this.state.showRecord ? /*#__PURE__*/_react.default.createElement(_index.default, { where: "index", sendSound: function sendSound(url, time) { //点击了发送 if (_this2.state.schedulingName.trim().length === 0) { _message2.default.warning("请输入调度任务名称"); } else { //创建音频的群组 // this.voiceGroup(url, time); _this2.props.voiceGroup(url, time); } }, startRecord: this.state.showRecord }) : /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("span", { className: "video-button", onClick: function onClick() { _this2.props.showRecord(true); _this2.setState({ showRecord: true }); } }, /*#__PURE__*/_react.default.createElement(_icon.default, { type: "audio", style: { color: "#ffffff", fontSize: "45px" } })), /*#__PURE__*/_react.default.createElement("div", { className: "warning" }, "\u8BF7\u70B9\u51FB\u6309\u94AE\u5F00\u59CB\u5F55\u97F3"))) : /*#__PURE__*/_react.default.createElement("div", null, this.state.openRecord && /*#__PURE__*/_react.default.createElement(_checkbox.default.Group, { style: { width: '100%' }, onChange: function onChange(e) { _this2.props.onCheckPerRecord(e); if (e.length > 16) { _message2.default.error("录制人数限制16个以内,请重新选择"); } } }, /*#__PURE__*/_react.default.createElement("div", { className: "photo mini" }, this.state.selectedPoints.map(function (item, index) { return /*#__PURE__*/_react.default.createElement("div", { className: "gutter-row", key: index }, /*#__PURE__*/_react.default.createElement("div", { className: "gutter-box" }, /*#__PURE__*/_react.default.createElement(_checkbox.default, { value: item.mobilePhone }, item.photoUrl ? /*#__PURE__*/_react.default.createElement("img", { className: "avator", src: item.photoUrl }) : /*#__PURE__*/_react.default.createElement("span", { className: "avator span-header" }, item.name ? item.name.substring(item.name.length - 2, item.name.length) : ""), /*#__PURE__*/_react.default.createElement("div", { className: "name" }, item.name)))); })))))); } }]); }(_react.Component)) || _class); /***/ }), /***/ "+JPs": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; __webpack_require__("baa2"); var _icon = _interopRequireDefault(__webpack_require__("FC3+")); __webpack_require__("UQ5M"); var _message2 = _interopRequireDefault(__webpack_require__("/qCn")); var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); __webpack_require__("n1y9"); var _api = __webpack_require__("H/Zg"); var _PersonItem = _interopRequireDefault(__webpack_require__("baF6")); var _dva = __webpack_require__("S6G3"); var _dec, _class; /** * 保安人员的搜索列表 */ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } var PersonSearchList = exports.default = (_dec = (0, _dva.connect)(function (state) { return { selectedAttenData: state.command.attendanceList.selectedAttenData, selectedId: state.command.personList.selectedId }; }), _dec(_class = /*#__PURE__*/function (_Component) { function PersonSearchList(props) { var _this; (0, _classCallCheck2.default)(this, PersonSearchList); _this = _callSuper(this, PersonSearchList, [props]); _this.clearAttendInfo = function () { _this.props.dispatch({ type: "command/setSelectedAttenData", payload: null }); _this.props.dispatch({ type: "command/fetchPersonList", payload: { list: [] } }); _this.props.dispatch({ type: "command/clearInfoWindow", payload: true }); }; _this.state = { pageSize: 20, comTaskId: props.selectedAttenData.comTaskId, total: 0, //搜索总条数 // selectedAttenData: props.selectedAttenData || null, //传过来选中的驻勤点的信息 attenPersonList: [], //保安员列表 height: null //人员列表的最大高度 }; return _this; } (0, _inherits2.default)(PersonSearchList, _Component); return (0, _createClass2.default)(PersonSearchList, [{ key: "componentDidMount", value: function componentDidMount() { this.getPersonList(this.props.selectedAttenData.taskName); var height = document.documentElement.clientHeight - 120 - 130 - 160 - 63; this.setState({ height: height }); } }, { key: "componentWillReceiveProps", value: function componentWillReceiveProps(nextProps) { if (this.props.selectedAttenData.comTaskId !== nextProps.selectedAttenData.comTaskId) { this.getPersonList(nextProps.selectedAttenData.taskName); } } //获取驻勤点对应的保安员列表 }, { key: "getPersonList", value: function getPersonList(taskName) { var _this2 = this; var pageNumber = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1; var pageSize = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.state.pageSize; (0, _api.getPersonList)({ _currpage: pageNumber, lines: pageSize }, { search_attendanceSiteName: taskName //驻勤点名称 }).then(function (res) { if (res.data.data.length > 0) { var result = res.data.data.map(function (item) { item.perId = item.id; delete item.id; item.name = item.securityName; delete item.securityName; var lnglatData = item.item_lonlatjson ? JSON.parse(item.item_lonlatjson) : ''; item.lnglat = lnglatData ? [lnglatData.longitude, lnglatData.latitude] : ''; delete item.item_lonlatjson; item.idCardNo = item.documentID; delete item.documentID; item.mobilePhone = item.phone; delete item.phone; return item; }); _this2.setState({ attenPersonList: result, total: res.data.total }); _this2.props.dispatch({ type: "command/fetchPersonList", payload: { list: result } }); } else { _message2.default.warning("该驻勤点没有人员"); } }); } }, { key: "render", value: function render() { var _this3 = this; return /*#__PURE__*/_react.default.createElement("div", { className: "attendance-person search-list_command amap_lib_placeSearch" }, /*#__PURE__*/_react.default.createElement("div", { className: "security-personnel" }, /*#__PURE__*/_react.default.createElement("span", null, this.props.selectedAttenData && this.props.selectedAttenData.taskName), /*#__PURE__*/_react.default.createElement(_icon.default, { onClick: this.clearAttendInfo, className: "close", type: "left" })), /*#__PURE__*/_react.default.createElement("div", { className: "list" }, /*#__PURE__*/_react.default.createElement("div", { className: "item attendance-detail" }, /*#__PURE__*/_react.default.createElement("div", null, "\u8D1F\u8D23\u4EBA:", this.props.selectedAttenData.name), /*#__PURE__*/_react.default.createElement("div", null, "\u8EAB\u4EFD\u8BC1\u53F7:", this.props.selectedAttenData.idCardNo), /*#__PURE__*/_react.default.createElement("div", null, "\u624B\u673A\u53F7\u7801:", this.props.selectedAttenData.mobilePhone), /*#__PURE__*/_react.default.createElement("div", null, "\u5730\u5740:", this.props.selectedAttenData.taskAddress), /*#__PURE__*/_react.default.createElement("div", null, "\u4FDD\u5B89\u5458\u6570\u91CF:", this.props.selectedAttenData.perNum, "\u540D"), /*#__PURE__*/_react.default.createElement("div", null, "\u670D\u52A1\u4F01\u4E1A\u7C7B\u578B:", this.props.selectedAttenData.serviceObjectTypeName || "-")), /*#__PURE__*/_react.default.createElement("div", { className: "search-list_command" }, /*#__PURE__*/_react.default.createElement("div", { className: "list", style: { maxHeight: this.state.height } }, /*#__PURE__*/_react.default.createElement(_PersonItem.default, { data: this.state.attenPersonList })))), /*#__PURE__*/_react.default.createElement("div", { className: "see-more", style: { display: this.state.total > this.state.attenPersonList.length ? "block" : "none" } }, /*#__PURE__*/_react.default.createElement("span", { onClick: function onClick() { _this3.getPersonList(_this3.state.comTaskId, 1, _this3.state.total); } }, "\u67E5\u770B\u66F4\u591A"))); } }]); }(_react.Component)) || _class); /***/ }), /***/ "+SmI": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // EXTERNAL MODULE: ./node_modules/react/index.js var react = __webpack_require__("GiK3"); var react_default = /*#__PURE__*/__webpack_require__.n(react); // EXTERNAL MODULE: ./node_modules/antd/node_modules/classnames/index.js var classnames = __webpack_require__("kTQ8"); var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); // EXTERNAL MODULE: ./node_modules/prop-types/index.js var prop_types = __webpack_require__("KSGD"); var prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types); // EXTERNAL MODULE: ./node_modules/antd/es/config-provider/index.js + 1 modules var config_provider = __webpack_require__("PmSq"); // EXTERNAL MODULE: ./node_modules/antd/es/grid/RowContext.js var RowContext = __webpack_require__("dCEd"); // EXTERNAL MODULE: ./node_modules/antd/es/_util/type.js var _util_type = __webpack_require__("D+5j"); // CONCATENATED MODULE: ./node_modules/antd/es/_util/responsiveObserve.js 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; } function _extends() { _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; }; return _extends.apply(this, arguments); } // matchMedia polyfill for // https://github.com/WickyNilliams/enquire.js/issues/82 var enquire; // TODO: Will be removed in antd 4.0 because we will no longer support ie9 if (typeof window !== 'undefined') { var matchMediaPolyfill = function matchMediaPolyfill(mediaQuery) { return { media: mediaQuery, matches: false, addListener: function addListener() {}, removeListener: function removeListener() {} }; }; // ref: https://github.com/ant-design/ant-design/issues/18774 if (!window.matchMedia) window.matchMedia = matchMediaPolyfill; // eslint-disable-next-line global-require enquire = __webpack_require__("kQue"); } var responsiveArray = ['xxl', 'xl', 'lg', 'md', 'sm', 'xs']; var responsiveMap = { xs: '(max-width: 575px)', sm: '(min-width: 576px)', md: '(min-width: 768px)', lg: '(min-width: 992px)', xl: '(min-width: 1200px)', xxl: '(min-width: 1600px)' }; var subscribers = []; var subUid = -1; var responsiveObserve_screens = {}; var responsiveObserve = { dispatch: function dispatch(pointMap) { responsiveObserve_screens = pointMap; if (subscribers.length < 1) { return false; } subscribers.forEach(function (item) { item.func(responsiveObserve_screens); }); return true; }, subscribe: function subscribe(func) { if (subscribers.length === 0) { this.register(); } var token = (++subUid).toString(); subscribers.push({ token: token, func: func }); func(responsiveObserve_screens); return token; }, unsubscribe: function unsubscribe(token) { subscribers = subscribers.filter(function (item) { return item.token !== token; }); if (subscribers.length === 0) { this.unregister(); } }, unregister: function unregister() { Object.keys(responsiveMap).map(function (screen) { return enquire.unregister(responsiveMap[screen]); }); }, register: function register() { var _this = this; Object.keys(responsiveMap).map(function (screen) { return enquire.register(responsiveMap[screen], { match: function match() { var pointMap = _extends(_extends({}, responsiveObserve_screens), _defineProperty({}, screen, true)); _this.dispatch(pointMap); }, unmatch: function unmatch() { var pointMap = _extends(_extends({}, responsiveObserve_screens), _defineProperty({}, screen, false)); _this.dispatch(pointMap); }, // Keep a empty destory to avoid triggering unmatch when unregister destroy: function destroy() {} }); }); } }; /* harmony default export */ var _util_responsiveObserve = (responsiveObserve); // CONCATENATED MODULE: ./node_modules/antd/es/grid/row.js /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return row_Row; }); function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function row__extends() { row__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; }; return row__extends.apply(this, arguments); } function row__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; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } var __rest = this && this.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var RowAligns = Object(_util_type["a" /* tuple */])('top', 'middle', 'bottom', 'stretch'); var RowJustify = Object(_util_type["a" /* tuple */])('start', 'end', 'center', 'space-around', 'space-between'); var row_Row = /*#__PURE__*/function (_React$Component) { _inherits(Row, _React$Component); var _super = _createSuper(Row); function Row() { var _this; _classCallCheck(this, Row); _this = _super.apply(this, arguments); _this.state = { screens: {} }; _this.renderRow = function (_ref) { var _classNames; var getPrefixCls = _ref.getPrefixCls; var _a = _this.props, customizePrefixCls = _a.prefixCls, type = _a.type, justify = _a.justify, align = _a.align, className = _a.className, style = _a.style, children = _a.children, others = __rest(_a, ["prefixCls", "type", "justify", "align", "className", "style", "children"]); var prefixCls = getPrefixCls('row', customizePrefixCls); var gutter = _this.getGutter(); var classes = classnames_default()((_classNames = {}, row__defineProperty(_classNames, prefixCls, !type), row__defineProperty(_classNames, "".concat(prefixCls, "-").concat(type), type), row__defineProperty(_classNames, "".concat(prefixCls, "-").concat(type, "-").concat(justify), type && justify), row__defineProperty(_classNames, "".concat(prefixCls, "-").concat(type, "-").concat(align), type && align), _classNames), className); var rowStyle = row__extends(row__extends(row__extends({}, gutter[0] > 0 ? { marginLeft: gutter[0] / -2, marginRight: gutter[0] / -2 } : {}), gutter[1] > 0 ? { marginTop: gutter[1] / -2, marginBottom: gutter[1] / -2 } : {}), style); var otherProps = row__extends({}, others); delete otherProps.gutter; return /*#__PURE__*/react["createElement"](RowContext["a" /* default */].Provider, { value: { gutter: gutter } }, /*#__PURE__*/react["createElement"]("div", row__extends({}, otherProps, { className: classes, style: rowStyle }), children)); }; return _this; } _createClass(Row, [{ key: "componentDidMount", value: function componentDidMount() { var _this2 = this; this.token = _util_responsiveObserve.subscribe(function (screens) { var gutter = _this2.props.gutter; if (_typeof(gutter) === 'object' || Array.isArray(gutter) && (_typeof(gutter[0]) === 'object' || _typeof(gutter[1]) === 'object')) { _this2.setState({ screens: screens }); } }); } }, { key: "componentWillUnmount", value: function componentWillUnmount() { _util_responsiveObserve.unsubscribe(this.token); } }, { key: "getGutter", value: function getGutter() { var results = [0, 0]; var gutter = this.props.gutter; var screens = this.state.screens; var normalizedGutter = Array.isArray(gutter) ? gutter : [gutter, 0]; normalizedGutter.forEach(function (g, index) { if (_typeof(g) === 'object') { for (var i = 0; i < responsiveArray.length; i++) { var breakpoint = responsiveArray[i]; if (screens[breakpoint] && g[breakpoint] !== undefined) { results[index] = g[breakpoint]; break; } } } else { results[index] = g || 0; } }); return results; } }, { key: "render", value: function render() { return /*#__PURE__*/react["createElement"](config_provider["ConfigConsumer"], null, this.renderRow); } }]); return Row; }(react["Component"]); row_Row.defaultProps = { gutter: 0 }; row_Row.propTypes = { type: prop_types["oneOf"](['flex']), align: prop_types["oneOf"](RowAligns), justify: prop_types["oneOf"](RowJustify), className: prop_types["string"], children: prop_types["node"], gutter: prop_types["oneOfType"]([prop_types["object"], prop_types["number"], prop_types["array"]]), prefixCls: prop_types["string"] }; /***/ }), /***/ "/1q1": /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _util = __webpack_require__("eCjd"); var _rule = __webpack_require__("hGxU"); var _rule2 = _interopRequireDefault(_rule); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } /** * Validates a boolean. * * @param rule The validation rule. * @param value The value of the field on the source object. * @param callback The callback function. * @param source The source object being validated. * @param options The validation options. * @param options.messages The validation messages. */ function boolean(rule, value, callback, source, options) { var errors = []; var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate) { if ((0, _util.isEmptyValue)(value) && !rule.required) { return callback(); } _rule2['default'].required(rule, value, source, errors, options); if (value !== undefined) { _rule2['default'].type(rule, value, source, errors, options); } } callback(errors); } exports['default'] = boolean; /***/ }), /***/ "/4RJ": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); // EXTERNAL MODULE: ./node_modules/antd/es/style/index.less var style = __webpack_require__("vtiu"); var style_default = /*#__PURE__*/__webpack_require__.n(style); // EXTERNAL MODULE: ./node_modules/antd/es/date-picker/style/index.less var date_picker_style = __webpack_require__("1OYt"); var date_picker_style_default = /*#__PURE__*/__webpack_require__.n(date_picker_style); // EXTERNAL MODULE: ./node_modules/antd/es/input/style/index.js var input_style = __webpack_require__("LHBr"); // EXTERNAL MODULE: ./node_modules/antd/es/time-picker/style/index.js var time_picker_style = __webpack_require__("s3t2"); // EXTERNAL MODULE: ./node_modules/antd/es/tag/style/index.less var tag_style = __webpack_require__("fFIg"); var tag_style_default = /*#__PURE__*/__webpack_require__.n(tag_style); // CONCATENATED MODULE: ./node_modules/antd/es/tag/style/index.js // CONCATENATED MODULE: ./node_modules/antd/es/date-picker/style/index.js // style dependencies // deps-lint-skip: input /***/ }), /***/ "/72g": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); var _dva = __webpack_require__("S6G3"); var _EventItem = _interopRequireDefault(__webpack_require__("Fqq0")); var _dec, _class; /** * 通过搜索获得地图列表(保安人员) */ // import "../person.less"; function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } var OneEvent = exports.default = (_dec = (0, _dva.connect)(function (state) { return { selectedId: state.command.eventList.selectedId, tabIndex2: state.command.tabIndex.event.tabIndex2 }; }), _dec(_class = /*#__PURE__*/function (_Component) { function OneEvent(props) { var _this; (0, _classCallCheck2.default)(this, OneEvent); _this = _callSuper(this, OneEvent, [props]); _this.state = { eventList: [{ name: '活动事件1', lnglat: [106.22445, 38.486085], describe: '活动事件测试信息', id: '1' }, { name: '活动事件2', lnglat: [106.225293, 38.485052], describe: '活动事件测试信息', id: '2' }, { name: '活动事件3', lnglat: [106.222696, 38.485312], describe: '活动事件测试信息', id: '3' }], tabKey: "1", currentKey: null, //主要用于处理tab页面改变,不让重新请求数据 // searchData: { // pageNumber: 1, // pageSize: 7, // keyWord: null, // }, // personList: [], //人员列表数据 height: null //最大高度 // loadingText: "暂无数据", }; return _this; } (0, _inherits2.default)(OneEvent, _Component); return (0, _createClass2.default)(OneEvent, [{ key: "componentDidMount", value: function componentDidMount() { var height = document.documentElement.clientHeight - 120 - 130 - 40; this.setState({ height: height }); this.props.dispatch({ type: "command/fetchEventList", payload: { list: this.state.eventList } }); } }, { key: "componentWillReceiveProps", value: function componentWillReceiveProps(nextProps) { // if ( // nextProps.tabIndex2 == this.state.tabKey && //定位当前tab页是自己 // nextProps.tabIndex2 !== this.state.currentKey //用于不让数据一直刷新 // ) { // this.setState({ // currentKey: nextProps.tabIndex2, // }); // console.log("这里") // // this.getPersonList(this.state.searchData.pageNumber); // } // if (nextProps.tabIndex2 != this.state.tabKey) { // this.setState({ // currentKey: null, // }); // } } // getPersonList(pageNumber) { // this.props.dispatch({ // type: "command/setEventSelectIndex", // payload: null, // }); // this.setState( // { // searchData: { // ...this.state.searchData, // pageNumber, // pageSize: 7, // }, // loadingText: "正在加载中...", // }, // () => { // getComPerLocationByKeyword({ // ...this.state.searchData, // }).then((res) => { // if (res.retType === "0") { // this.setState({ // personList: res.data.data, // total: res.data.total, // loadingText: res.data.data.length > 0 ? "加载完成" : "暂无数据", // }); // this.props.dispatch({ // type: "command/fetchPersonList", // payload: { // list: res.data.data, // }, // }); // } // }); // } // ); // } }, { key: "render", value: function render() { return /*#__PURE__*/_react.default.createElement("div", { className: "data-list" }, /*#__PURE__*/_react.default.createElement("div", { className: "security search-list_command amap_lib_placeSearch" }, /*#__PURE__*/_react.default.createElement("div", { className: "list", style: { maxHeight: this.state.height, overflow: "auto" } }, /*#__PURE__*/_react.default.createElement(_EventItem.default, { data: this.state.eventList })))); } }]); }(_react.Component)) || _class); /***/ }), /***/ "/RIB": /***/ (function(module, exports) { module.exports = "data:image/png;base64,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" /***/ }), /***/ "/XOZ": /***/ (function(module, exports) { module.exports = "data:image/png;base64,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" /***/ }), /***/ "/fxC": /***/ (function(module, exports) { // removed by extract-text-webpack-plugin /***/ }), /***/ "/gxq": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony export (immutable) */ __webpack_exports__["guid"] = guid; /* harmony export (immutable) */ __webpack_exports__["logError"] = logError; /* harmony export (immutable) */ __webpack_exports__["clone"] = clone; /* harmony export (immutable) */ __webpack_exports__["merge"] = merge; /* harmony export (immutable) */ __webpack_exports__["mergeAll"] = mergeAll; /* harmony export (immutable) */ __webpack_exports__["extend"] = extend; /* harmony export (immutable) */ __webpack_exports__["defaults"] = defaults; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createCanvas", function() { return createCanvas; }); /* harmony export (immutable) */ __webpack_exports__["indexOf"] = indexOf; /* harmony export (immutable) */ __webpack_exports__["inherits"] = inherits; /* harmony export (immutable) */ __webpack_exports__["mixin"] = mixin; /* harmony export (immutable) */ __webpack_exports__["isArrayLike"] = isArrayLike; /* harmony export (immutable) */ __webpack_exports__["each"] = each; /* harmony export (immutable) */ __webpack_exports__["map"] = map; /* harmony export (immutable) */ __webpack_exports__["reduce"] = reduce; /* harmony export (immutable) */ __webpack_exports__["filter"] = filter; /* harmony export (immutable) */ __webpack_exports__["find"] = find; /* harmony export (immutable) */ __webpack_exports__["keys"] = keys; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bind", function() { return bind; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "curry", function() { return curry; }); /* harmony export (immutable) */ __webpack_exports__["isArray"] = isArray; /* harmony export (immutable) */ __webpack_exports__["isFunction"] = isFunction; /* harmony export (immutable) */ __webpack_exports__["isString"] = isString; /* harmony export (immutable) */ __webpack_exports__["isStringSafe"] = isStringSafe; /* harmony export (immutable) */ __webpack_exports__["isNumber"] = isNumber; /* harmony export (immutable) */ __webpack_exports__["isObject"] = isObject; /* harmony export (immutable) */ __webpack_exports__["isBuiltInObject"] = isBuiltInObject; /* harmony export (immutable) */ __webpack_exports__["isTypedArray"] = isTypedArray; /* harmony export (immutable) */ __webpack_exports__["isDom"] = isDom; /* harmony export (immutable) */ __webpack_exports__["isGradientObject"] = isGradientObject; /* harmony export (immutable) */ __webpack_exports__["isImagePatternObject"] = isImagePatternObject; /* harmony export (immutable) */ __webpack_exports__["isRegExp"] = isRegExp; /* harmony export (immutable) */ __webpack_exports__["eqNaN"] = eqNaN; /* harmony export (immutable) */ __webpack_exports__["retrieve"] = retrieve; /* harmony export (immutable) */ __webpack_exports__["retrieve2"] = retrieve2; /* harmony export (immutable) */ __webpack_exports__["retrieve3"] = retrieve3; /* harmony export (immutable) */ __webpack_exports__["slice"] = slice; /* harmony export (immutable) */ __webpack_exports__["normalizeCssArray"] = normalizeCssArray; /* harmony export (immutable) */ __webpack_exports__["assert"] = assert; /* harmony export (immutable) */ __webpack_exports__["trim"] = trim; /* harmony export (immutable) */ __webpack_exports__["setAsPrimitive"] = setAsPrimitive; /* harmony export (immutable) */ __webpack_exports__["isPrimitive"] = isPrimitive; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HashMap", function() { return HashMap; }); /* harmony export (immutable) */ __webpack_exports__["createHashMap"] = createHashMap; /* harmony export (immutable) */ __webpack_exports__["concatArray"] = concatArray; /* harmony export (immutable) */ __webpack_exports__["createObject"] = createObject; /* harmony export (immutable) */ __webpack_exports__["disableUserSelect"] = disableUserSelect; /* harmony export (immutable) */ __webpack_exports__["hasOwn"] = hasOwn; /* harmony export (immutable) */ __webpack_exports__["noop"] = noop; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RADIAN_TO_DEGREE", function() { return RADIAN_TO_DEGREE; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__platform_js__ = __webpack_require__("OwOc"); var BUILTIN_OBJECT = reduce([ 'Function', 'RegExp', 'Date', 'Error', 'CanvasGradient', 'CanvasPattern', 'Image', 'Canvas' ], function (obj, val) { obj['[object ' + val + ']'] = true; return obj; }, {}); var TYPED_ARRAY = reduce([ 'Int8', 'Uint8', 'Uint8Clamped', 'Int16', 'Uint16', 'Int32', 'Uint32', 'Float32', 'Float64' ], function (obj, val) { obj['[object ' + val + 'Array]'] = true; return obj; }, {}); var objToString = Object.prototype.toString; var arrayProto = Array.prototype; var nativeForEach = arrayProto.forEach; var nativeFilter = arrayProto.filter; var nativeSlice = arrayProto.slice; var nativeMap = arrayProto.map; var ctorFunction = function () { }.constructor; var protoFunction = ctorFunction ? ctorFunction.prototype : null; var protoKey = '__proto__'; var idStart = 0x0907; function guid() { return idStart++; } function logError() { var args = []; for (var _i = 0; _i < arguments.length; _i++) { args[_i] = arguments[_i]; } if (typeof console !== 'undefined') { console.error.apply(console, args); } } function clone(source) { if (source == null || typeof source !== 'object') { return source; } var result = source; var typeStr = objToString.call(source); if (typeStr === '[object Array]') { if (!isPrimitive(source)) { result = []; for (var i = 0, len = source.length; i < len; i++) { result[i] = clone(source[i]); } } } else if (TYPED_ARRAY[typeStr]) { if (!isPrimitive(source)) { var Ctor = source.constructor; if (Ctor.from) { result = Ctor.from(source); } else { result = new Ctor(source.length); for (var i = 0, len = source.length; i < len; i++) { result[i] = source[i]; } } } } else if (!BUILTIN_OBJECT[typeStr] && !isPrimitive(source) && !isDom(source)) { result = {}; for (var key in source) { if (source.hasOwnProperty(key) && key !== protoKey) { result[key] = clone(source[key]); } } } return result; } function merge(target, source, overwrite) { if (!isObject(source) || !isObject(target)) { return overwrite ? clone(source) : target; } for (var key in source) { if (source.hasOwnProperty(key) && key !== protoKey) { var targetProp = target[key]; var sourceProp = source[key]; if (isObject(sourceProp) && isObject(targetProp) && !isArray(sourceProp) && !isArray(targetProp) && !isDom(sourceProp) && !isDom(targetProp) && !isBuiltInObject(sourceProp) && !isBuiltInObject(targetProp) && !isPrimitive(sourceProp) && !isPrimitive(targetProp)) { merge(targetProp, sourceProp, overwrite); } else if (overwrite || !(key in target)) { target[key] = clone(source[key]); } } } return target; } function mergeAll(targetAndSources, overwrite) { var result = targetAndSources[0]; for (var i = 1, len = targetAndSources.length; i < len; i++) { result = merge(result, targetAndSources[i], overwrite); } return result; } function extend(target, source) { if (Object.assign) { Object.assign(target, source); } else { for (var key in source) { if (source.hasOwnProperty(key) && key !== protoKey) { target[key] = source[key]; } } } return target; } function defaults(target, source, overlay) { var keysArr = keys(source); for (var i = 0, len = keysArr.length; i < len; i++) { var key = keysArr[i]; if ((overlay ? source[key] != null : target[key] == null)) { target[key] = source[key]; } } return target; } var createCanvas = __WEBPACK_IMPORTED_MODULE_0__platform_js__["d" /* platformApi */].createCanvas; function indexOf(array, value) { if (array) { if (array.indexOf) { return array.indexOf(value); } for (var i = 0, len = array.length; i < len; i++) { if (array[i] === value) { return i; } } } return -1; } function inherits(clazz, baseClazz) { var clazzPrototype = clazz.prototype; function F() { } F.prototype = baseClazz.prototype; clazz.prototype = new F(); for (var prop in clazzPrototype) { if (clazzPrototype.hasOwnProperty(prop)) { clazz.prototype[prop] = clazzPrototype[prop]; } } clazz.prototype.constructor = clazz; clazz.superClass = baseClazz; } function mixin(target, source, override) { target = 'prototype' in target ? target.prototype : target; source = 'prototype' in source ? source.prototype : source; if (Object.getOwnPropertyNames) { var keyList = Object.getOwnPropertyNames(source); for (var i = 0; i < keyList.length; i++) { var key = keyList[i]; if (key !== 'constructor') { if ((override ? source[key] != null : target[key] == null)) { target[key] = source[key]; } } } } else { defaults(target, source, override); } } function isArrayLike(data) { if (!data) { return false; } if (typeof data === 'string') { return false; } return typeof data.length === 'number'; } function each(arr, cb, context) { if (!(arr && cb)) { return; } if (arr.forEach && arr.forEach === nativeForEach) { arr.forEach(cb, context); } else if (arr.length === +arr.length) { for (var i = 0, len = arr.length; i < len; i++) { cb.call(context, arr[i], i, arr); } } else { for (var key in arr) { if (arr.hasOwnProperty(key)) { cb.call(context, arr[key], key, arr); } } } } function map(arr, cb, context) { if (!arr) { return []; } if (!cb) { return slice(arr); } if (arr.map && arr.map === nativeMap) { return arr.map(cb, context); } else { var result = []; for (var i = 0, len = arr.length; i < len; i++) { result.push(cb.call(context, arr[i], i, arr)); } return result; } } function reduce(arr, cb, memo, context) { if (!(arr && cb)) { return; } for (var i = 0, len = arr.length; i < len; i++) { memo = cb.call(context, memo, arr[i], i, arr); } return memo; } function filter(arr, cb, context) { if (!arr) { return []; } if (!cb) { return slice(arr); } if (arr.filter && arr.filter === nativeFilter) { return arr.filter(cb, context); } else { var result = []; for (var i = 0, len = arr.length; i < len; i++) { if (cb.call(context, arr[i], i, arr)) { result.push(arr[i]); } } return result; } } function find(arr, cb, context) { if (!(arr && cb)) { return; } for (var i = 0, len = arr.length; i < len; i++) { if (cb.call(context, arr[i], i, arr)) { return arr[i]; } } } function keys(obj) { if (!obj) { return []; } if (Object.keys) { return Object.keys(obj); } var keyList = []; for (var key in obj) { if (obj.hasOwnProperty(key)) { keyList.push(key); } } return keyList; } function bindPolyfill(func, context) { var args = []; for (var _i = 2; _i < arguments.length; _i++) { args[_i - 2] = arguments[_i]; } return function () { return func.apply(context, args.concat(nativeSlice.call(arguments))); }; } var bind = (protoFunction && isFunction(protoFunction.bind)) ? protoFunction.call.bind(protoFunction.bind) : bindPolyfill; function curry(func) { var args = []; for (var _i = 1; _i < arguments.length; _i++) { args[_i - 1] = arguments[_i]; } return function () { return func.apply(this, args.concat(nativeSlice.call(arguments))); }; } function isArray(value) { if (Array.isArray) { return Array.isArray(value); } return objToString.call(value) === '[object Array]'; } function isFunction(value) { return typeof value === 'function'; } function isString(value) { return typeof value === 'string'; } function isStringSafe(value) { return objToString.call(value) === '[object String]'; } function isNumber(value) { return typeof value === 'number'; } function isObject(value) { var type = typeof value; return type === 'function' || (!!value && type === 'object'); } function isBuiltInObject(value) { return !!BUILTIN_OBJECT[objToString.call(value)]; } function isTypedArray(value) { return !!TYPED_ARRAY[objToString.call(value)]; } function isDom(value) { return typeof value === 'object' && typeof value.nodeType === 'number' && typeof value.ownerDocument === 'object'; } function isGradientObject(value) { return value.colorStops != null; } function isImagePatternObject(value) { return value.image != null; } function isRegExp(value) { return objToString.call(value) === '[object RegExp]'; } function eqNaN(value) { return value !== value; } function retrieve() { var args = []; for (var _i = 0; _i < arguments.length; _i++) { args[_i] = arguments[_i]; } for (var i = 0, len = args.length; i < len; i++) { if (args[i] != null) { return args[i]; } } } function retrieve2(value0, value1) { return value0 != null ? value0 : value1; } function retrieve3(value0, value1, value2) { return value0 != null ? value0 : value1 != null ? value1 : value2; } function slice(arr) { var args = []; for (var _i = 1; _i < arguments.length; _i++) { args[_i - 1] = arguments[_i]; } return nativeSlice.apply(arr, args); } function normalizeCssArray(val) { if (typeof (val) === 'number') { return [val, val, val, val]; } var len = val.length; if (len === 2) { return [val[0], val[1], val[0], val[1]]; } else if (len === 3) { return [val[0], val[1], val[2], val[1]]; } return val; } function assert(condition, message) { if (!condition) { throw new Error(message); } } function trim(str) { if (str == null) { return null; } else if (typeof str.trim === 'function') { return str.trim(); } else { return str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ''); } } var primitiveKey = '__ec_primitive__'; function setAsPrimitive(obj) { obj[primitiveKey] = true; } function isPrimitive(obj) { return obj[primitiveKey]; } var MapPolyfill = (function () { function MapPolyfill() { this.data = {}; } MapPolyfill.prototype["delete"] = function (key) { var existed = this.has(key); if (existed) { delete this.data[key]; } return existed; }; MapPolyfill.prototype.has = function (key) { return this.data.hasOwnProperty(key); }; MapPolyfill.prototype.get = function (key) { return this.data[key]; }; MapPolyfill.prototype.set = function (key, value) { this.data[key] = value; return this; }; MapPolyfill.prototype.keys = function () { return keys(this.data); }; MapPolyfill.prototype.forEach = function (callback) { var data = this.data; for (var key in data) { if (data.hasOwnProperty(key)) { callback(data[key], key); } } }; return MapPolyfill; }()); var isNativeMapSupported = typeof Map === 'function'; function maybeNativeMap() { return (isNativeMapSupported ? new Map() : new MapPolyfill()); } var HashMap = (function () { function HashMap(obj) { var isArr = isArray(obj); this.data = maybeNativeMap(); var thisMap = this; (obj instanceof HashMap) ? obj.each(visit) : (obj && each(obj, visit)); function visit(value, key) { isArr ? thisMap.set(value, key) : thisMap.set(key, value); } } HashMap.prototype.hasKey = function (key) { return this.data.has(key); }; HashMap.prototype.get = function (key) { return this.data.get(key); }; HashMap.prototype.set = function (key, value) { this.data.set(key, value); return value; }; HashMap.prototype.each = function (cb, context) { this.data.forEach(function (value, key) { cb.call(context, value, key); }); }; HashMap.prototype.keys = function () { var keys = this.data.keys(); return isNativeMapSupported ? Array.from(keys) : keys; }; HashMap.prototype.removeKey = function (key) { this.data["delete"](key); }; return HashMap; }()); function createHashMap(obj) { return new HashMap(obj); } function concatArray(a, b) { var newArray = new a.constructor(a.length + b.length); for (var i = 0; i < a.length; i++) { newArray[i] = a[i]; } var offset = a.length; for (var i = 0; i < b.length; i++) { newArray[i + offset] = b[i]; } return newArray; } function createObject(proto, properties) { var obj; if (Object.create) { obj = Object.create(proto); } else { var StyleCtor = function () { }; StyleCtor.prototype = proto; obj = new StyleCtor(); } if (properties) { extend(obj, properties); } return obj; } function disableUserSelect(dom) { var domStyle = dom.style; domStyle.webkitUserSelect = 'none'; domStyle.userSelect = 'none'; domStyle.webkitTapHighlightColor = 'rgba(0,0,0,0)'; domStyle['-webkit-touch-callout'] = 'none'; } function hasOwn(own, prop) { return own.hasOwnProperty(prop); } function noop() { } var RADIAN_TO_DEGREE = 180 / Math.PI; /***/ }), /***/ "/m1I": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__style_index_less__ = __webpack_require__("vtiu"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__style_index_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__style_index_less__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__index_less__ = __webpack_require__("br8L"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__index_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__index_less__); /***/ }), /***/ "/mHU": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__("GiK3"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__("KSGD"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_lifecycles_compat__ = __webpack_require__("R8mX"); function _extends() { _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; }; return _extends.apply(this, arguments); } function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } 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 classNames = __webpack_require__("HW6M"); var Switch = /*#__PURE__*/function (_Component) { _inherits(Switch, _Component); var _super = _createSuper(Switch); function Switch(props) { var _this; _classCallCheck(this, Switch); _this = _super.call(this, props); _defineProperty(_assertThisInitialized(_this), "handleClick", function (e) { var checked = _this.state.checked; var onClick = _this.props.onClick; var newChecked = !checked; _this.setChecked(newChecked, e); if (onClick) { onClick(newChecked, e); } }); _defineProperty(_assertThisInitialized(_this), "handleKeyDown", function (e) { if (e.keyCode === 37) { // Left _this.setChecked(false, e); } else if (e.keyCode === 39) { // Right _this.setChecked(true, e); } }); _defineProperty(_assertThisInitialized(_this), "handleMouseUp", function (e) { var onMouseUp = _this.props.onMouseUp; if (_this.node) { _this.node.blur(); } if (onMouseUp) { onMouseUp(e); } }); _defineProperty(_assertThisInitialized(_this), "saveNode", function (node) { _this.node = node; }); var _checked = false; if ('checked' in props) { _checked = !!props.checked; } else { _checked = !!props.defaultChecked; } _this.state = { checked: _checked }; return _this; } _createClass(Switch, [{ key: "componentDidMount", value: function componentDidMount() { var _this$props = this.props, autoFocus = _this$props.autoFocus, disabled = _this$props.disabled; if (autoFocus && !disabled) { this.focus(); } } }, { key: "setChecked", value: function setChecked(checked, e) { var _this$props2 = this.props, disabled = _this$props2.disabled, onChange = _this$props2.onChange; if (disabled) { return; } if (!('checked' in this.props)) { this.setState({ checked: checked }); } if (onChange) { onChange(checked, e); } } }, { key: "focus", value: function focus() { this.node.focus(); } }, { key: "blur", value: function blur() { this.node.blur(); } }, { key: "render", value: function render() { var _classNames; var _this$props3 = this.props, className = _this$props3.className, prefixCls = _this$props3.prefixCls, disabled = _this$props3.disabled, loadingIcon = _this$props3.loadingIcon, checkedChildren = _this$props3.checkedChildren, unCheckedChildren = _this$props3.unCheckedChildren, restProps = _objectWithoutProperties(_this$props3, ["className", "prefixCls", "disabled", "loadingIcon", "checkedChildren", "unCheckedChildren"]); var checked = this.state.checked; var switchClassName = classNames((_classNames = {}, _defineProperty(_classNames, className, !!className), _defineProperty(_classNames, prefixCls, true), _defineProperty(_classNames, "".concat(prefixCls, "-checked"), checked), _defineProperty(_classNames, "".concat(prefixCls, "-disabled"), disabled), _classNames)); return /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("button", _extends({}, restProps, { type: "button", role: "switch", "aria-checked": checked, disabled: disabled, className: switchClassName, ref: this.saveNode, onKeyDown: this.handleKeyDown, onClick: this.handleClick, onMouseUp: this.handleMouseUp }), loadingIcon, /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("span", { className: "".concat(prefixCls, "-inner") }, checked ? checkedChildren : unCheckedChildren)); } }], [{ key: "getDerivedStateFromProps", value: function getDerivedStateFromProps(nextProps) { var newState = {}; var checked = nextProps.checked; if ('checked' in nextProps) { newState.checked = !!checked; } return newState; } }]); return Switch; }(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]); Switch.propTypes = { className: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string, prefixCls: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string, disabled: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool, checkedChildren: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.any, unCheckedChildren: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.any, onChange: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, onMouseUp: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, onClick: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, tabIndex: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number, checked: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool, defaultChecked: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool, autoFocus: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool, loadingIcon: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.node }; Switch.defaultProps = { prefixCls: 'rc-switch', checkedChildren: null, unCheckedChildren: null, className: '', defaultChecked: false }; Object(__WEBPACK_IMPORTED_MODULE_2_react_lifecycles_compat__["polyfill"])(Switch); /* harmony default export */ __webpack_exports__["default"] = (Switch); /***/ }), /***/ "/nwH": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.getCompanyList = getCompanyList; exports.showCompanyPointInfo = showCompanyPointInfo; var _events = _interopRequireDefault(__webpack_require__("TLe5")); var _api = __webpack_require__("H/Zg"); var _utils = __webpack_require__("oAV5"); // 引入 EventEmitter // 公司定位信息展示 function showCompanyPointInfo(_ref) { var doMainId = _ref.doMainId, _ref$success = _ref.success, success = _ref$success === void 0 ? null : _ref$success; // 清除地图所有标记 _events.default.emit('clearMapTag'); // 初始化右侧数据模块 _events.default.emit('initRightDataModule'); _events.default.emit('clearMapModal', 'ComponeyInfo'); _events.default.emit('clearMapModal', 'AttendInfo'); _events.default.emit('isOpenTopSwitch', { type: "searchViews", value: false }); (0, _api.getDomainInfo)({ domainId: doMainId }).then(function (res) { // TAG: v5baseRequest 对于 res.data 的情况,会返回 res 不作任何处理,以下做为指定接口的处理 if (res.code == 0 && res.data.length > 0) { var datas = res.data[0]; // TAG: 因需求变更,不再获取公司定位信息 // var placeSearch = new AMap.PlaceSearch({ city: '全国' }); // placeSearch.search(datas.field13, (status, result) => { // 搜索成功时,result即是对应的匹配数据 // if (status === "complete" && result.poiList.count > 0) { // let location = result.poiList.pois[0].location; var info = { // latitude: location.lat, // longitude: location.lng, companyName: datas.name, componeyLogo: datas.logo_url, name: datas.legalperson, mobilePhone: datas.legalpersonphone, selectComponeyId: datas.id }; info.clickType = 'personnel'; success && success(info); // } else { // } // }) } }); } // 获取公司列表信息 function getCompanyList(_ref2) { var _ref2$keyWord = _ref2.keyWord, keyWord = _ref2$keyWord === void 0 ? '' : _ref2$keyWord, _ref2$success = _ref2.success, success = _ref2$success === void 0 ? null : _ref2$success, _ref2$pageNo = _ref2.pageNo, pageNo = _ref2$pageNo === void 0 ? 1 : _ref2$pageNo, _ref2$pageSize = _ref2.pageSize, pageSize = _ref2$pageSize === void 0 ? 5 : _ref2$pageSize, _ref2$hasMark = _ref2.hasMark, hasMark = _ref2$hasMark === void 0 ? true : _ref2$hasMark; // 清除地图所有标记 _events.default.emit('clearMapTag'); // 初始化右侧数据模块 _events.default.emit('initRightDataModule'); _events.default.emit('clearMapModal', 'ComponeyInfo'); _events.default.emit('clearMapModal', 'AttendInfo'); // eventCenter.emit('isOpenTopSwitch', { // type: "searchViews", // value: false // }) var params = {}; if (!(0, _utils.isEmpty)(keyWord)) { params.domainname = keyWord; } (0, _api.getDomainList)(params).then(function (res) { console.log('getCompanyList', res); if (res.data.length > 0) { var datas = []; res.data.forEach(function (item, index) { var data = {}; var location = item.location && JSON.parse(item.location); if (location) { data.longitude = location.longitude || ''; data.latitude = location.latitude || ''; } else { location = item.field17 ? item.field17.split(',') : ['', '']; data.longitude = location[0] || ''; data.latitude = location[1] || ''; } data.name = item.legalperson ? item.legalperson : ''; data.mobilePhone = item.legalpersonphone ? item.legalpersonphone : ''; data.companyName = item.name; data.componeyLogo = item.logo_url; data.selectComponeyId = item.id; datas.push(data); }); if (hasMark) { _events.default.emit('addPictueMarks', { data: { data: datas }, type: 'securityCompany' }); } success && success(datas); } else { success && success([]); } }).catch(function (error) { console.error(error); }); } /***/ }), /***/ "/qCn": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__("GiK3"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_rc_notification__ = __webpack_require__("Hx0i"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__icon__ = __webpack_require__("FC3+"); function _extends() { _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; }; return _extends.apply(this, arguments); } var defaultDuration = 3; var defaultTop; var messageInstance; var key = 1; var prefixCls = 'ant-message'; var transitionName = 'move-up'; var getContainer; var maxCount; function getMessageInstance(callback) { if (messageInstance) { callback(messageInstance); return; } __WEBPACK_IMPORTED_MODULE_1_rc_notification__["a" /* default */].newInstance({ prefixCls: prefixCls, transitionName: transitionName, style: { top: defaultTop }, getContainer: getContainer, maxCount: maxCount }, function (instance) { if (messageInstance) { callback(messageInstance); return; } messageInstance = instance; callback(instance); }); } function notice(args) { var duration = args.duration !== undefined ? args.duration : defaultDuration; var iconType = { info: 'info-circle', success: 'check-circle', error: 'close-circle', warning: 'exclamation-circle', loading: 'loading' }[args.type]; var target = args.key || key++; var closePromise = new Promise(function (resolve) { var callback = function callback() { if (typeof args.onClose === 'function') { args.onClose(); } return resolve(true); }; getMessageInstance(function (instance) { var iconNode = /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createElement"](__WEBPACK_IMPORTED_MODULE_2__icon__["default"], { type: iconType, theme: iconType === 'loading' ? 'outlined' : 'filled' }); var switchIconNode = iconType ? iconNode : ''; instance.notice({ key: target, duration: duration, style: {}, content: /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createElement"]("div", { className: "".concat(prefixCls, "-custom-content").concat(args.type ? " ".concat(prefixCls, "-").concat(args.type) : '') }, args.icon ? args.icon : switchIconNode, /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createElement"]("span", null, args.content)), onClose: callback }); }); }); var result = function result() { if (messageInstance) { messageInstance.removeNotice(target); } }; result.then = function (filled, rejected) { return closePromise.then(filled, rejected); }; result.promise = closePromise; return result; } function isArgsProps(content) { return Object.prototype.toString.call(content) === '[object Object]' && !!content.content; } var api = { open: notice, config: function config(options) { if (options.top !== undefined) { defaultTop = options.top; messageInstance = null; // delete messageInstance for new defaultTop } if (options.duration !== undefined) { defaultDuration = options.duration; } if (options.prefixCls !== undefined) { prefixCls = options.prefixCls; } if (options.getContainer !== undefined) { getContainer = options.getContainer; } if (options.transitionName !== undefined) { transitionName = options.transitionName; messageInstance = null; // delete messageInstance for new transitionName } if (options.maxCount !== undefined) { maxCount = options.maxCount; messageInstance = null; } }, destroy: function destroy() { if (messageInstance) { messageInstance.destroy(); messageInstance = null; } } }; ['success', 'info', 'warning', 'error', 'loading'].forEach(function (type) { api[type] = function (content, duration, onClose) { if (isArgsProps(content)) { return api.open(_extends(_extends({}, content), { type: type })); } if (typeof duration === 'function') { onClose = duration; duration = undefined; } return api.open({ content: content, duration: duration, type: type, onClose: onClose }); }; }); api.warn = api.warning; /* harmony default export */ __webpack_exports__["default"] = (api); /***/ }), /***/ "03XS": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /** * 北京展览馆的特殊搜索字样展示 */ var BeijingVideo = exports.default = /*#__PURE__*/function (_Component) { function BeijingVideo(props) { var _this; (0, _classCallCheck2.default)(this, BeijingVideo); _this = _callSuper(this, BeijingVideo, [props]); _this.state = { // beijingVideo: props.beijingVideo }; return _this; } (0, _inherits2.default)(BeijingVideo, _Component); return (0, _createClass2.default)(BeijingVideo, [{ key: "componentDidMount", value: function componentDidMount() {} }, { key: "render", value: function render() { var _this2 = this; return /*#__PURE__*/_react.default.createElement("div", { style: { position: "absolute", top: "0", left: "0", width: "100%", height: "100%", zIndex: '2' } }, /*#__PURE__*/_react.default.createElement("div", { id: "video-beijing", style: { width: "100%", height: "100%" } }, /*#__PURE__*/_react.default.createElement("div", { style: { position: "absolute", color: "#ffffff", right: "10px", fontSize: "20px", cursor: "pointer" }, onClick: function onClick() { _this2.props.changeBeijingVideo(false); // this.setState({ beijingVideo: false }); } }, "x"), /*#__PURE__*/_react.default.createElement("iframe", { id: "beijing-video", style: { width: "100%", height: "100%" }, src: "https://bcxin-saas-prod.obs.cn-north-1.myhuaweicloud.com/saasweb/front/3dfengping.mp4" }))); } }]); }(_react.Component); /***/ }), /***/ "04BU": /***/ (function(module, exports) { // removed by extract-text-webpack-plugin /***/ }), /***/ "06MX": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } var Mouse = exports.default = /*#__PURE__*/function (_Component) { function Mouse(props) { var _this; (0, _classCallCheck2.default)(this, Mouse); _this = _callSuper(this, Mouse, [props]); _this.handleMouseDown = function (e) { // console.log(e) if (_this.state.isDown == false) { return; } _this.setState({ clientX: e.clientX, //获取x坐标和y坐标 clientY: e.clientY, // isDown: true, //开关打开 cursor: 'move' //设置样式 }); }; _this.handleMouseMove = function (e) { if (_this.state.isDown == false) { return; } //获取x坐标和y坐标 var nx = e.clientX; var ny = e.clientY; // //计算移动后的左偏移量和顶部的偏移量 var nl = nx - (_this.state.clientX - _this.state.offsetLeft); var nt = ny - (_this.state.clientY - _this.state.offsetTop); _this.setState({ x: nl, y: nt }); }; _this.handleMouseUp = function (e) { // console.log(e) _this.setState({ isDown: false, //开关关闭 cursor: 'default' }); }; _this.state = { clientX: 0, clientY: 0, x: 0, y: 0, isDown: props.isDown || false, cursor: 'default', offsetLeft: props.offsetLeft || 0, offsetTop: props.offsetTop || 0 }; return _this; } (0, _inherits2.default)(Mouse, _Component); return (0, _createClass2.default)(Mouse, [{ key: "componentDidMount", value: function componentDidMount() { window.addEventListener('mousedown', this.handleMouseDown); window.addEventListener('mousemove', this.handleMouseMove); window.addEventListener('mouseup', this.handleMouseUp); } }, { key: "componentWillReceiveProps", value: function componentWillReceiveProps(nextProps) { // console.log(nextProps) this.setState({ isDown: nextProps.isDown, offsetLeft: nextProps.offsetLeft, offsetTop: nextProps.offsetTop }); } }, { key: "componentWillUnmount", value: function componentWillUnmount() { // window.removeEventListener('mousemove', this.handleMouseMove) } }, { key: "render", value: function render() { var _this$state = this.state, x = _this$state.x, y = _this$state.y, cursor = _this$state.cursor; // console.log('Mouse', this.props.children); return /*#__PURE__*/_react.default.createElement("div", null, this.props && this.props.children && this.props.children({ x: x, y: y, cursor: cursor })); } }]); }(_react.Component); /***/ }), /***/ "0CdG": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); __webpack_require__("YH+2"); var _layout = _interopRequireDefault(__webpack_require__("oKZP")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); var _dva = __webpack_require__("S6G3"); var _header = _interopRequireDefault(__webpack_require__("t33o")); var _utils = __webpack_require__("oAV5"); var _dec, _class; /** * 录制记录列表 */ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } var Header = _layout.default.Header; var HeaderMenu = exports.default = (_dec = (0, _dva.connect)(function (state) { return { mapStyle: state.command.mapStyle, layoutAuthority: state.command.layoutAuthority }; }), _dec(_class = /*#__PURE__*/function (_Component) { function HeaderMenu(props) { var _this; (0, _classCallCheck2.default)(this, HeaderMenu); _this = _callSuper(this, HeaderMenu, [props]); _this.state = { currentGroup: props.currentIndex }; return _this; } (0, _inherits2.default)(HeaderMenu, _Component); return (0, _createClass2.default)(HeaderMenu, [{ key: "componentDidMount", value: function componentDidMount() {} }, { key: "render", value: function render() { var _this2 = this; var _this$props = this.props, CommandRouter = _this$props.CommandRouter, headerLogo = _this$props.headerLogo, mapStyle = _this$props.mapStyle, layoutAuthority = _this$props.layoutAuthority; var _CommandRouter = CommandRouter.filter(function (item) { return item.menuName != ""; }); return /*#__PURE__*/_react.default.createElement(Header, { className: _header.default.header + ' ' + _header.default[mapStyle] }, /*#__PURE__*/_react.default.createElement("div", { className: _header.default.logo }, // (headerLogo && headerLogo.length > 0) && layoutAuthority.commonLogo && layoutAuthority.darkLogo ? /*#__PURE__*/_react.default.createElement("img", { src: mapStyle == 'dark' ? layoutAuthority.darkLogo : layoutAuthority.commonLogo, style: { maxWidth: '186px' } }) : headerLogo && headerLogo.length > 0 && /*#__PURE__*/_react.default.createElement("img", { src: mapStyle == 'dark' ? headerLogo[1] && headerLogo[1].path : headerLogo[0] && headerLogo[0].path, style: { maxWidth: '186px' } })), /*#__PURE__*/_react.default.createElement("div", { className: _header.default.commandMenu }, _CommandRouter.map(function (item, index) { return /*#__PURE__*/_react.default.createElement("a", { key: index, onClick: function onClick() { _this2.props.currentRouter(item); _this2.setState({ currentGroup: index }); if (index == 1) { window.location.reload(); return; } if (item.path == 'dataScreen') { // this.props.dispatch({ // type: 'command/setMapStyle', // payload: 'dark' // }) } else { _this2.props.dispatch({ type: 'command/setMapStyle', payload: 'normal' }); } }, className: _this2.state.currentGroup === index ? _header.default.selected : "" }, item.menuName); }))); } }]); }(_react.Component)) || _class); /***/ }), /***/ "0JTr": /***/ (function(module, exports) { // removed by extract-text-webpack-plugin module.exports = {"list_item":"list_item___17EPD","item":"item___2qSUl","item_company_name":"item_company_name___3MMOk"}; /***/ }), /***/ "0P2q": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABU0lEQVQ4T53TzUpVURjG8d9rYDroBgIHNdCipIhm0SAiyC6hYYPOJKEc9IGIV9AHghODoJtoYtCsrKFFk3AQdQNJCIa64j2sLZvDOYeja7bXep7/fj9DzymlzOIebmEKgV9Yx5uI2Gxb8rF7SinjeIkOTvSC6/c+1vAwIv7lXRdQze9wc4Cx9/oDbiekAaxgfkRzI1uNiAdRSjmPr0PCHsTNdC4l4AUeHfHvjfxVAr7hQgtQmtr0gfa+fU/ANk5V8TKyHhuYxhVM4FNN8zqe4FnV/03ADibrxVIFfMYMLuMkviD7fw1PsVj12wnIAl4ckEKGfNhuHGCspe2m8BwLxyziStPGLGSbPAovo7naDNIWzo7iamnWIqKTEZzG7yGt68fNUZ6LiN0E3MVbfMQf3BkylXtYxePDZaqLNBkRac7FOof7uIEzyJH9ifd4HRE/2iH9B+XAbwOw1pssAAAAAElFTkSuQmCC" /***/ }), /***/ "0QVo": /***/ (function(module, exports) { module.exports = "data:image/png;base64,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" /***/ }), /***/ "0gU3": /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__.p + "static/avatar.ebd3a5c7.png"; /***/ }), /***/ "0kwy": /***/ (function(module, exports) { module.exports = "data:image/png;base64,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" /***/ }), /***/ "0vbU": /***/ (function(module, exports) { module.exports = "data:image/png;base64,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" /***/ }), /***/ "0wj8": /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(global) { /**! * @fileOverview Kickass library to create and place poppers near their reference elements. * @version 1.12.6 * @license * Copyright (c) 2016 Federico Zivolo and 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. */ (function (global, factory) { true ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : global.Popper = factory(); })(void 0, function () { 'use strict'; var isBrowser = typeof window !== 'undefined' && typeof window.document !== 'undefined'; var longerTimeoutBrowsers = ['Edge', 'Trident', 'Firefox']; var timeoutDuration = 0; for (var i = 0; i < longerTimeoutBrowsers.length; i += 1) { if (isBrowser && navigator.userAgent.indexOf(longerTimeoutBrowsers[i]) >= 0) { timeoutDuration = 1; break; } } function microtaskDebounce(fn) { var called = false; return function () { if (called) { return; } called = true; Promise.resolve().then(function () { called = false; fn(); }); }; } function taskDebounce(fn) { var scheduled = false; return function () { if (!scheduled) { scheduled = true; setTimeout(function () { scheduled = false; fn(); }, timeoutDuration); } }; } var supportsMicroTasks = isBrowser && window.Promise; /** * Create a debounced version of a method, that's asynchronously deferred * but called in the minimum time possible. * * @method * @memberof Popper.Utils * @argument {Function} fn * @returns {Function} */ var debounce = supportsMicroTasks ? microtaskDebounce : taskDebounce; /** * Check if the given variable is a function * @method * @memberof Popper.Utils * @argument {Any} functionToCheck - variable to check * @returns {Boolean} answer to: is a function? */ function isFunction(functionToCheck) { var getType = {}; return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]'; } /** * Get CSS computed property of the given element * @method * @memberof Popper.Utils * @argument {Eement} element * @argument {String} property */ function getStyleComputedProperty(element, property) { if (element.nodeType !== 1) { return []; } // NOTE: 1 DOM access here var css = window.getComputedStyle(element, null); return property ? css[property] : css; } /** * Returns the parentNode or the host of the element * @method * @memberof Popper.Utils * @argument {Element} element * @returns {Element} parent */ function getParentNode(element) { if (element.nodeName === 'HTML') { return element; } return element.parentNode || element.host; } /** * Returns the scrolling parent of the given element * @method * @memberof Popper.Utils * @argument {Element} element * @returns {Element} scroll parent */ function getScrollParent(element) { // Return body, `getScroll` will take care to get the correct `scrollTop` from it if (!element) { return window.document.body; } switch (element.nodeName) { case 'HTML': case 'BODY': return element.ownerDocument.body; case '#document': return element.body; } // Firefox want us to check `-x` and `-y` variations as well var _getStyleComputedProp = getStyleComputedProperty(element), overflow = _getStyleComputedProp.overflow, overflowX = _getStyleComputedProp.overflowX, overflowY = _getStyleComputedProp.overflowY; if (/(auto|scroll)/.test(overflow + overflowY + overflowX)) { return element; } return getScrollParent(getParentNode(element)); } /** * Returns the offset parent of the given element * @method * @memberof Popper.Utils * @argument {Element} element * @returns {Element} offset parent */ function getOffsetParent(element) { // NOTE: 1 DOM access here var offsetParent = element && element.offsetParent; var nodeName = offsetParent && offsetParent.nodeName; if (!nodeName || nodeName === 'BODY' || nodeName === 'HTML') { if (element) { return element.ownerDocument.documentElement; } return window.document.documentElement; } // .offsetParent will return the closest TD or TABLE in case // no offsetParent is present, I hate this job... if (['TD', 'TABLE'].indexOf(offsetParent.nodeName) !== -1 && getStyleComputedProperty(offsetParent, 'position') === 'static') { return getOffsetParent(offsetParent); } return offsetParent; } function isOffsetContainer(element) { var nodeName = element.nodeName; if (nodeName === 'BODY') { return false; } return nodeName === 'HTML' || getOffsetParent(element.firstElementChild) === element; } /** * Finds the root node (document, shadowDOM root) of the given element * @method * @memberof Popper.Utils * @argument {Element} node * @returns {Element} root node */ function getRoot(node) { if (node.parentNode !== null) { return getRoot(node.parentNode); } return node; } /** * Finds the offset parent common to the two provided nodes * @method * @memberof Popper.Utils * @argument {Element} element1 * @argument {Element} element2 * @returns {Element} common offset parent */ function findCommonOffsetParent(element1, element2) { // This check is needed to avoid errors in case one of the elements isn't defined for any reason if (!element1 || !element1.nodeType || !element2 || !element2.nodeType) { return window.document.documentElement; } // Here we make sure to give as "start" the element that comes first in the DOM var order = element1.compareDocumentPosition(element2) & Node.DOCUMENT_POSITION_FOLLOWING; var start = order ? element1 : element2; var end = order ? element2 : element1; // Get common ancestor container var range = document.createRange(); range.setStart(start, 0); range.setEnd(end, 0); var commonAncestorContainer = range.commonAncestorContainer; // Both nodes are inside #document if (element1 !== commonAncestorContainer && element2 !== commonAncestorContainer || start.contains(end)) { if (isOffsetContainer(commonAncestorContainer)) { return commonAncestorContainer; } return getOffsetParent(commonAncestorContainer); } // one of the nodes is inside shadowDOM, find which one var element1root = getRoot(element1); if (element1root.host) { return findCommonOffsetParent(element1root.host, element2); } else { return findCommonOffsetParent(element1, getRoot(element2).host); } } /** * Gets the scroll value of the given element in the given side (top and left) * @method * @memberof Popper.Utils * @argument {Element} element * @argument {String} side `top` or `left` * @returns {number} amount of scrolled pixels */ function getScroll(element) { var side = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'top'; var upperSide = side === 'top' ? 'scrollTop' : 'scrollLeft'; var nodeName = element.nodeName; if (nodeName === 'BODY' || nodeName === 'HTML') { var html = element.ownerDocument.documentElement; var scrollingElement = element.ownerDocument.scrollingElement || html; return scrollingElement[upperSide]; } return element[upperSide]; } /* * Sum or subtract the element scroll values (left and top) from a given rect object * @method * @memberof Popper.Utils * @param {Object} rect - Rect object you want to change * @param {HTMLElement} element - The element from the function reads the scroll values * @param {Boolean} subtract - set to true if you want to subtract the scroll values * @return {Object} rect - The modifier rect object */ function includeScroll(rect, element) { var subtract = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; var scrollTop = getScroll(element, 'top'); var scrollLeft = getScroll(element, 'left'); var modifier = subtract ? -1 : 1; rect.top += scrollTop * modifier; rect.bottom += scrollTop * modifier; rect.left += scrollLeft * modifier; rect.right += scrollLeft * modifier; return rect; } /* * Helper to detect borders of a given element * @method * @memberof Popper.Utils * @param {CSSStyleDeclaration} styles * Result of `getStyleComputedProperty` on the given element * @param {String} axis - `x` or `y` * @return {number} borders - The borders size of the given axis */ function getBordersSize(styles, axis) { var sideA = axis === 'x' ? 'Left' : 'Top'; var sideB = sideA === 'Left' ? 'Right' : 'Bottom'; return +styles['border' + sideA + 'Width'].split('px')[0] + +styles['border' + sideB + 'Width'].split('px')[0]; } /** * Tells if you are running Internet Explorer 10 * @method * @memberof Popper.Utils * @returns {Boolean} isIE10 */ var isIE10 = undefined; var isIE10$1 = function isIE10$1() { if (isIE10 === undefined) { isIE10 = navigator.appVersion.indexOf('MSIE 10') !== -1; } return isIE10; }; function getSize(axis, body, html, computedStyle) { return Math.max(body['offset' + axis], body['scroll' + axis], html['client' + axis], html['offset' + axis], html['scroll' + axis], isIE10$1() ? html['offset' + axis] + computedStyle['margin' + (axis === 'Height' ? 'Top' : 'Left')] + computedStyle['margin' + (axis === 'Height' ? 'Bottom' : 'Right')] : 0); } function getWindowSizes() { var body = window.document.body; var html = window.document.documentElement; var computedStyle = isIE10$1() && window.getComputedStyle(html); return { height: getSize('Height', body, html, computedStyle), width: getSize('Width', body, html, computedStyle) }; } var classCallCheck = function classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; 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; }; }(); var defineProperty = 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 _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; }; /** * Given element offsets, generate an output similar to getBoundingClientRect * @method * @memberof Popper.Utils * @argument {Object} offsets * @returns {Object} ClientRect like output */ function getClientRect(offsets) { return _extends({}, offsets, { right: offsets.left + offsets.width, bottom: offsets.top + offsets.height }); } /** * Get bounding client rect of given element * @method * @memberof Popper.Utils * @param {HTMLElement} element * @return {Object} client rect */ function getBoundingClientRect(element) { var rect = {}; // IE10 10 FIX: Please, don't ask, the element isn't // considered in DOM in some circumstances... // This isn't reproducible in IE10 compatibility mode of IE11 if (isIE10$1()) { try { rect = element.getBoundingClientRect(); var scrollTop = getScroll(element, 'top'); var scrollLeft = getScroll(element, 'left'); rect.top += scrollTop; rect.left += scrollLeft; rect.bottom += scrollTop; rect.right += scrollLeft; } catch (err) {} } else { rect = element.getBoundingClientRect(); } var result = { left: rect.left, top: rect.top, width: rect.right - rect.left, height: rect.bottom - rect.top }; // subtract scrollbar size from sizes var sizes = element.nodeName === 'HTML' ? getWindowSizes() : {}; var width = sizes.width || element.clientWidth || result.right - result.left; var height = sizes.height || element.clientHeight || result.bottom - result.top; var horizScrollbar = element.offsetWidth - width; var vertScrollbar = element.offsetHeight - height; // if an hypothetical scrollbar is detected, we must be sure it's not a `border` // we make this check conditional for performance reasons if (horizScrollbar || vertScrollbar) { var styles = getStyleComputedProperty(element); horizScrollbar -= getBordersSize(styles, 'x'); vertScrollbar -= getBordersSize(styles, 'y'); result.width -= horizScrollbar; result.height -= vertScrollbar; } return getClientRect(result); } function getOffsetRectRelativeToArbitraryNode(children, parent) { var isIE10 = isIE10$1(); var isHTML = parent.nodeName === 'HTML'; var childrenRect = getBoundingClientRect(children); var parentRect = getBoundingClientRect(parent); var scrollParent = getScrollParent(children); var styles = getStyleComputedProperty(parent); var borderTopWidth = +styles.borderTopWidth.split('px')[0]; var borderLeftWidth = +styles.borderLeftWidth.split('px')[0]; var offsets = getClientRect({ top: childrenRect.top - parentRect.top - borderTopWidth, left: childrenRect.left - parentRect.left - borderLeftWidth, width: childrenRect.width, height: childrenRect.height }); offsets.marginTop = 0; offsets.marginLeft = 0; // Subtract margins of documentElement in case it's being used as parent // we do this only on HTML because it's the only element that behaves // differently when margins are applied to it. The margins are included in // the box of the documentElement, in the other cases not. if (!isIE10 && isHTML) { var marginTop = +styles.marginTop.split('px')[0]; var marginLeft = +styles.marginLeft.split('px')[0]; offsets.top -= borderTopWidth - marginTop; offsets.bottom -= borderTopWidth - marginTop; offsets.left -= borderLeftWidth - marginLeft; offsets.right -= borderLeftWidth - marginLeft; // Attach marginTop and marginLeft because in some circumstances we may need them offsets.marginTop = marginTop; offsets.marginLeft = marginLeft; } if (isIE10 ? parent.contains(scrollParent) : parent === scrollParent && scrollParent.nodeName !== 'BODY') { offsets = includeScroll(offsets, parent); } return offsets; } function getViewportOffsetRectRelativeToArtbitraryNode(element) { var html = element.ownerDocument.documentElement; var relativeOffset = getOffsetRectRelativeToArbitraryNode(element, html); var width = Math.max(html.clientWidth, window.innerWidth || 0); var height = Math.max(html.clientHeight, window.innerHeight || 0); var scrollTop = getScroll(html); var scrollLeft = getScroll(html, 'left'); var offset = { top: scrollTop - relativeOffset.top + relativeOffset.marginTop, left: scrollLeft - relativeOffset.left + relativeOffset.marginLeft, width: width, height: height }; return getClientRect(offset); } /** * Check if the given element is fixed or is inside a fixed parent * @method * @memberof Popper.Utils * @argument {Element} element * @argument {Element} customContainer * @returns {Boolean} answer to "isFixed?" */ function isFixed(element) { var nodeName = element.nodeName; if (nodeName === 'BODY' || nodeName === 'HTML') { return false; } if (getStyleComputedProperty(element, 'position') === 'fixed') { return true; } return isFixed(getParentNode(element)); } /** * Computed the boundaries limits and return them * @method * @memberof Popper.Utils * @param {HTMLElement} popper * @param {HTMLElement} reference * @param {number} padding * @param {HTMLElement} boundariesElement - Element used to define the boundaries * @returns {Object} Coordinates of the boundaries */ function getBoundaries(popper, reference, padding, boundariesElement) { // NOTE: 1 DOM access here var boundaries = { top: 0, left: 0 }; var offsetParent = findCommonOffsetParent(popper, reference); // Handle viewport case if (boundariesElement === 'viewport') { boundaries = getViewportOffsetRectRelativeToArtbitraryNode(offsetParent); } else { // Handle other cases based on DOM element used as boundaries var boundariesNode = void 0; if (boundariesElement === 'scrollParent') { boundariesNode = getScrollParent(getParentNode(popper)); if (boundariesNode.nodeName === 'BODY') { boundariesNode = popper.ownerDocument.documentElement; } } else if (boundariesElement === 'window') { boundariesNode = popper.ownerDocument.documentElement; } else { boundariesNode = boundariesElement; } var offsets = getOffsetRectRelativeToArbitraryNode(boundariesNode, offsetParent); // In case of HTML, we need a different computation if (boundariesNode.nodeName === 'HTML' && !isFixed(offsetParent)) { var _getWindowSizes = getWindowSizes(), height = _getWindowSizes.height, width = _getWindowSizes.width; boundaries.top += offsets.top - offsets.marginTop; boundaries.bottom = height + offsets.top; boundaries.left += offsets.left - offsets.marginLeft; boundaries.right = width + offsets.left; } else { // for all the other DOM elements, this one is good boundaries = offsets; } } // Add paddings boundaries.left += padding; boundaries.top += padding; boundaries.right -= padding; boundaries.bottom -= padding; return boundaries; } function getArea(_ref) { var width = _ref.width, height = _ref.height; return width * height; } /** * Utility used to transform the `auto` placement to the placement with more * available space. * @method * @memberof Popper.Utils * @argument {Object} data - The data object generated by update method * @argument {Object} options - Modifiers configuration and options * @returns {Object} The data object, properly modified */ function computeAutoPlacement(placement, refRect, popper, reference, boundariesElement) { var padding = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 0; if (placement.indexOf('auto') === -1) { return placement; } var boundaries = getBoundaries(popper, reference, padding, boundariesElement); var rects = { top: { width: boundaries.width, height: refRect.top - boundaries.top }, right: { width: boundaries.right - refRect.right, height: boundaries.height }, bottom: { width: boundaries.width, height: boundaries.bottom - refRect.bottom }, left: { width: refRect.left - boundaries.left, height: boundaries.height } }; var sortedAreas = Object.keys(rects).map(function (key) { return _extends({ key: key }, rects[key], { area: getArea(rects[key]) }); }).sort(function (a, b) { return b.area - a.area; }); var filteredAreas = sortedAreas.filter(function (_ref2) { var width = _ref2.width, height = _ref2.height; return width >= popper.clientWidth && height >= popper.clientHeight; }); var computedPlacement = filteredAreas.length > 0 ? filteredAreas[0].key : sortedAreas[0].key; var variation = placement.split('-')[1]; return computedPlacement + (variation ? '-' + variation : ''); } /** * Get offsets to the reference element * @method * @memberof Popper.Utils * @param {Object} state * @param {Element} popper - the popper element * @param {Element} reference - the reference element (the popper will be relative to this) * @returns {Object} An object containing the offsets which will be applied to the popper */ function getReferenceOffsets(state, popper, reference) { var commonOffsetParent = findCommonOffsetParent(popper, reference); return getOffsetRectRelativeToArbitraryNode(reference, commonOffsetParent); } /** * Get the outer sizes of the given element (offset size + margins) * @method * @memberof Popper.Utils * @argument {Element} element * @returns {Object} object containing width and height properties */ function getOuterSizes(element) { var styles = window.getComputedStyle(element); var x = parseFloat(styles.marginTop) + parseFloat(styles.marginBottom); var y = parseFloat(styles.marginLeft) + parseFloat(styles.marginRight); var result = { width: element.offsetWidth + y, height: element.offsetHeight + x }; return result; } /** * Get the opposite placement of the given one * @method * @memberof Popper.Utils * @argument {String} placement * @returns {String} flipped placement */ function getOppositePlacement(placement) { var hash = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' }; return placement.replace(/left|right|bottom|top/g, function (matched) { return hash[matched]; }); } /** * Get offsets to the popper * @method * @memberof Popper.Utils * @param {Object} position - CSS position the Popper will get applied * @param {HTMLElement} popper - the popper element * @param {Object} referenceOffsets - the reference offsets (the popper will be relative to this) * @param {String} placement - one of the valid placement options * @returns {Object} popperOffsets - An object containing the offsets which will be applied to the popper */ function getPopperOffsets(popper, referenceOffsets, placement) { placement = placement.split('-')[0]; // Get popper node sizes var popperRect = getOuterSizes(popper); // Add position, width and height to our offsets object var popperOffsets = { width: popperRect.width, height: popperRect.height }; // depending by the popper placement we have to compute its offsets slightly differently var isHoriz = ['right', 'left'].indexOf(placement) !== -1; var mainSide = isHoriz ? 'top' : 'left'; var secondarySide = isHoriz ? 'left' : 'top'; var measurement = isHoriz ? 'height' : 'width'; var secondaryMeasurement = !isHoriz ? 'height' : 'width'; popperOffsets[mainSide] = referenceOffsets[mainSide] + referenceOffsets[measurement] / 2 - popperRect[measurement] / 2; if (placement === secondarySide) { popperOffsets[secondarySide] = referenceOffsets[secondarySide] - popperRect[secondaryMeasurement]; } else { popperOffsets[secondarySide] = referenceOffsets[getOppositePlacement(secondarySide)]; } return popperOffsets; } /** * Mimics the `find` method of Array * @method * @memberof Popper.Utils * @argument {Array} arr * @argument prop * @argument value * @returns index or -1 */ function find(arr, check) { // use native find if supported if (Array.prototype.find) { return arr.find(check); } // use `filter` to obtain the same behavior of `find` return arr.filter(check)[0]; } /** * Return the index of the matching object * @method * @memberof Popper.Utils * @argument {Array} arr * @argument prop * @argument value * @returns index or -1 */ function findIndex(arr, prop, value) { // use native findIndex if supported if (Array.prototype.findIndex) { return arr.findIndex(function (cur) { return cur[prop] === value; }); } // use `find` + `indexOf` if `findIndex` isn't supported var match = find(arr, function (obj) { return obj[prop] === value; }); return arr.indexOf(match); } /** * Loop trough the list of modifiers and run them in order, * each of them will then edit the data object. * @method * @memberof Popper.Utils * @param {dataObject} data * @param {Array} modifiers * @param {String} ends - Optional modifier name used as stopper * @returns {dataObject} */ function runModifiers(modifiers, data, ends) { var modifiersToRun = ends === undefined ? modifiers : modifiers.slice(0, findIndex(modifiers, 'name', ends)); modifiersToRun.forEach(function (modifier) { if (modifier['function']) { // eslint-disable-line dot-notation console.warn('`modifier.function` is deprecated, use `modifier.fn`!'); } var fn = modifier['function'] || modifier.fn; // eslint-disable-line dot-notation if (modifier.enabled && isFunction(fn)) { // Add properties to offsets to make them a complete clientRect object // we do this before each modifier to make sure the previous one doesn't // mess with these values data.offsets.popper = getClientRect(data.offsets.popper); data.offsets.reference = getClientRect(data.offsets.reference); data = fn(data, modifier); } }); return data; } /** * Updates the position of the popper, computing the new offsets and applying * the new style.
* Prefer `scheduleUpdate` over `update` because of performance reasons. * @method * @memberof Popper */ function update() { // if popper is destroyed, don't perform any further update if (this.state.isDestroyed) { return; } var data = { instance: this, styles: {}, arrowStyles: {}, attributes: {}, flipped: false, offsets: {} }; // compute reference element offsets data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference); // compute auto placement, store placement inside the data object, // modifiers will be able to edit `placement` if needed // and refer to originalPlacement to know the original value data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding); // store the computed placement inside `originalPlacement` data.originalPlacement = data.placement; // compute the popper offsets data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement); data.offsets.popper.position = 'absolute'; // run the modifiers data = runModifiers(this.modifiers, data); // the first `update` will call `onCreate` callback // the other ones will call `onUpdate` callback if (!this.state.isCreated) { this.state.isCreated = true; this.options.onCreate(data); } else { this.options.onUpdate(data); } } /** * Helper used to know if the given modifier is enabled. * @method * @memberof Popper.Utils * @returns {Boolean} */ function isModifierEnabled(modifiers, modifierName) { return modifiers.some(function (_ref) { var name = _ref.name, enabled = _ref.enabled; return enabled && name === modifierName; }); } /** * Get the prefixed supported property name * @method * @memberof Popper.Utils * @argument {String} property (camelCase) * @returns {String} prefixed property (camelCase or PascalCase, depending on the vendor prefix) */ function getSupportedPropertyName(property) { var prefixes = [false, 'ms', 'Webkit', 'Moz', 'O']; var upperProp = property.charAt(0).toUpperCase() + property.slice(1); for (var i = 0; i < prefixes.length - 1; i++) { var prefix = prefixes[i]; var toCheck = prefix ? '' + prefix + upperProp : property; if (typeof window.document.body.style[toCheck] !== 'undefined') { return toCheck; } } return null; } /** * Destroy the popper * @method * @memberof Popper */ function destroy() { this.state.isDestroyed = true; // touch DOM only if `applyStyle` modifier is enabled if (isModifierEnabled(this.modifiers, 'applyStyle')) { this.popper.removeAttribute('x-placement'); this.popper.style.left = ''; this.popper.style.position = ''; this.popper.style.top = ''; this.popper.style[getSupportedPropertyName('transform')] = ''; } this.disableEventListeners(); // remove the popper if user explicity asked for the deletion on destroy // do not use `remove` because IE11 doesn't support it if (this.options.removeOnDestroy) { this.popper.parentNode.removeChild(this.popper); } return this; } /** * Get the window associated with the element * @argument {Element} element * @returns {Window} */ function getWindow(element) { var ownerDocument = element.ownerDocument; return ownerDocument ? ownerDocument.defaultView : window; } function attachToScrollParents(scrollParent, event, callback, scrollParents) { var isBody = scrollParent.nodeName === 'BODY'; var target = isBody ? scrollParent.ownerDocument.defaultView : scrollParent; target.addEventListener(event, callback, { passive: true }); if (!isBody) { attachToScrollParents(getScrollParent(target.parentNode), event, callback, scrollParents); } scrollParents.push(target); } /** * Setup needed event listeners used to update the popper position * @method * @memberof Popper.Utils * @private */ function setupEventListeners(reference, options, state, updateBound) { // Resize event listener on window state.updateBound = updateBound; getWindow(reference).addEventListener('resize', state.updateBound, { passive: true }); // Scroll event listener on scroll parents var scrollElement = getScrollParent(reference); attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents); state.scrollElement = scrollElement; state.eventsEnabled = true; return state; } /** * It will add resize/scroll events and start recalculating * position of the popper element when they are triggered. * @method * @memberof Popper */ function enableEventListeners() { if (!this.state.eventsEnabled) { this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate); } } /** * Remove event listeners used to update the popper position * @method * @memberof Popper.Utils * @private */ function removeEventListeners(reference, state) { // Remove resize event listener on window getWindow(reference).removeEventListener('resize', state.updateBound); // Remove scroll event listener on scroll parents state.scrollParents.forEach(function (target) { target.removeEventListener('scroll', state.updateBound); }); // Reset state state.updateBound = null; state.scrollParents = []; state.scrollElement = null; state.eventsEnabled = false; return state; } /** * It will remove resize/scroll events and won't recalculate popper position * when they are triggered. It also won't trigger onUpdate callback anymore, * unless you call `update` method manually. * @method * @memberof Popper */ function disableEventListeners() { if (this.state.eventsEnabled) { window.cancelAnimationFrame(this.scheduleUpdate); this.state = removeEventListeners(this.reference, this.state); } } /** * Tells if a given input is a number * @method * @memberof Popper.Utils * @param {*} input to check * @return {Boolean} */ function isNumeric(n) { return n !== '' && !isNaN(parseFloat(n)) && isFinite(n); } /** * Set the style to the given popper * @method * @memberof Popper.Utils * @argument {Element} element - Element to apply the style to * @argument {Object} styles * Object with a list of properties and values which will be applied to the element */ function setStyles(element, styles) { Object.keys(styles).forEach(function (prop) { var unit = ''; // add unit if the value is numeric and is one of the following if (['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !== -1 && isNumeric(styles[prop])) { unit = 'px'; } element.style[prop] = styles[prop] + unit; }); } /** * Set the attributes to the given popper * @method * @memberof Popper.Utils * @argument {Element} element - Element to apply the attributes to * @argument {Object} styles * Object with a list of properties and values which will be applied to the element */ function setAttributes(element, attributes) { Object.keys(attributes).forEach(function (prop) { var value = attributes[prop]; if (value !== false) { element.setAttribute(prop, attributes[prop]); } else { element.removeAttribute(prop); } }); } /** * @function * @memberof Modifiers * @argument {Object} data - The data object generated by `update` method * @argument {Object} data.styles - List of style properties - values to apply to popper element * @argument {Object} data.attributes - List of attribute properties - values to apply to popper element * @argument {Object} options - Modifiers configuration and options * @returns {Object} The same data object */ function applyStyle(data) { // any property present in `data.styles` will be applied to the popper, // in this way we can make the 3rd party modifiers add custom styles to it // Be aware, modifiers could override the properties defined in the previous // lines of this modifier! setStyles(data.instance.popper, data.styles); // any property present in `data.attributes` will be applied to the popper, // they will be set as HTML attributes of the element setAttributes(data.instance.popper, data.attributes); // if arrowElement is defined and arrowStyles has some properties if (data.arrowElement && Object.keys(data.arrowStyles).length) { setStyles(data.arrowElement, data.arrowStyles); } return data; } /** * Set the x-placement attribute before everything else because it could be used * to add margins to the popper margins needs to be calculated to get the * correct popper offsets. * @method * @memberof Popper.modifiers * @param {HTMLElement} reference - The reference element used to position the popper * @param {HTMLElement} popper - The HTML element used as popper. * @param {Object} options - Popper.js options */ function applyStyleOnLoad(reference, popper, options, modifierOptions, state) { // compute reference element offsets var referenceOffsets = getReferenceOffsets(state, popper, reference); // compute auto placement, store placement inside the data object, // modifiers will be able to edit `placement` if needed // and refer to originalPlacement to know the original value var placement = computeAutoPlacement(options.placement, referenceOffsets, popper, reference, options.modifiers.flip.boundariesElement, options.modifiers.flip.padding); popper.setAttribute('x-placement', placement); // Apply `position` to popper before anything else because // without the position applied we can't guarantee correct computations setStyles(popper, { position: 'absolute' }); return options; } /** * @function * @memberof Modifiers * @argument {Object} data - The data object generated by `update` method * @argument {Object} options - Modifiers configuration and options * @returns {Object} The data object, properly modified */ function computeStyle(data, options) { var x = options.x, y = options.y; var popper = data.offsets.popper; // Remove this legacy support in Popper.js v2 var legacyGpuAccelerationOption = find(data.instance.modifiers, function (modifier) { return modifier.name === 'applyStyle'; }).gpuAcceleration; if (legacyGpuAccelerationOption !== undefined) { console.warn('WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!'); } var gpuAcceleration = legacyGpuAccelerationOption !== undefined ? legacyGpuAccelerationOption : options.gpuAcceleration; var offsetParent = getOffsetParent(data.instance.popper); var offsetParentRect = getBoundingClientRect(offsetParent); // Styles var styles = { position: popper.position }; // floor sides to avoid blurry text var offsets = { left: Math.floor(popper.left), top: Math.floor(popper.top), bottom: Math.floor(popper.bottom), right: Math.floor(popper.right) }; var sideA = x === 'bottom' ? 'top' : 'bottom'; var sideB = y === 'right' ? 'left' : 'right'; // if gpuAcceleration is set to `true` and transform is supported, // we use `translate3d` to apply the position to the popper we // automatically use the supported prefixed version if needed var prefixedProperty = getSupportedPropertyName('transform'); // now, let's make a step back and look at this code closely (wtf?) // If the content of the popper grows once it's been positioned, it // may happen that the popper gets misplaced because of the new content // overflowing its reference element // To avoid this problem, we provide two options (x and y), which allow // the consumer to define the offset origin. // If we position a popper on top of a reference element, we can set // `x` to `top` to make the popper grow towards its top instead of // its bottom. var left = void 0, top = void 0; if (sideA === 'bottom') { top = -offsetParentRect.height + offsets.bottom; } else { top = offsets.top; } if (sideB === 'right') { left = -offsetParentRect.width + offsets.right; } else { left = offsets.left; } if (gpuAcceleration && prefixedProperty) { styles[prefixedProperty] = 'translate3d(' + left + 'px, ' + top + 'px, 0)'; styles[sideA] = 0; styles[sideB] = 0; styles.willChange = 'transform'; } else { // othwerise, we use the standard `top`, `left`, `bottom` and `right` properties var invertTop = sideA === 'bottom' ? -1 : 1; var invertLeft = sideB === 'right' ? -1 : 1; styles[sideA] = top * invertTop; styles[sideB] = left * invertLeft; styles.willChange = sideA + ', ' + sideB; } // Attributes var attributes = { 'x-placement': data.placement }; // Update `data` attributes, styles and arrowStyles data.attributes = _extends({}, attributes, data.attributes); data.styles = _extends({}, styles, data.styles); data.arrowStyles = _extends({}, data.offsets.arrow, data.arrowStyles); return data; } /** * Helper used to know if the given modifier depends from another one.
* It checks if the needed modifier is listed and enabled. * @method * @memberof Popper.Utils * @param {Array} modifiers - list of modifiers * @param {String} requestingName - name of requesting modifier * @param {String} requestedName - name of requested modifier * @returns {Boolean} */ function isModifierRequired(modifiers, requestingName, requestedName) { var requesting = find(modifiers, function (_ref) { var name = _ref.name; return name === requestingName; }); var isRequired = !!requesting && modifiers.some(function (modifier) { return modifier.name === requestedName && modifier.enabled && modifier.order < requesting.order; }); if (!isRequired) { var _requesting = '`' + requestingName + '`'; var requested = '`' + requestedName + '`'; console.warn(requested + ' modifier is required by ' + _requesting + ' modifier in order to work, be sure to include it before ' + _requesting + '!'); } return isRequired; } /** * @function * @memberof Modifiers * @argument {Object} data - The data object generated by update method * @argument {Object} options - Modifiers configuration and options * @returns {Object} The data object, properly modified */ function arrow(data, options) { // arrow depends on keepTogether in order to work if (!isModifierRequired(data.instance.modifiers, 'arrow', 'keepTogether')) { return data; } var arrowElement = options.element; // if arrowElement is a string, suppose it's a CSS selector if (typeof arrowElement === 'string') { arrowElement = data.instance.popper.querySelector(arrowElement); // if arrowElement is not found, don't run the modifier if (!arrowElement) { return data; } } else { // if the arrowElement isn't a query selector we must check that the // provided DOM node is child of its popper node if (!data.instance.popper.contains(arrowElement)) { console.warn('WARNING: `arrow.element` must be child of its popper element!'); return data; } } var placement = data.placement.split('-')[0]; var _data$offsets = data.offsets, popper = _data$offsets.popper, reference = _data$offsets.reference; var isVertical = ['left', 'right'].indexOf(placement) !== -1; var len = isVertical ? 'height' : 'width'; var sideCapitalized = isVertical ? 'Top' : 'Left'; var side = sideCapitalized.toLowerCase(); var altSide = isVertical ? 'left' : 'top'; var opSide = isVertical ? 'bottom' : 'right'; var arrowElementSize = getOuterSizes(arrowElement)[len]; // // extends keepTogether behavior making sure the popper and its // reference have enough pixels in conjuction // // top/left side if (reference[opSide] - arrowElementSize < popper[side]) { data.offsets.popper[side] -= popper[side] - (reference[opSide] - arrowElementSize); } // bottom/right side if (reference[side] + arrowElementSize > popper[opSide]) { data.offsets.popper[side] += reference[side] + arrowElementSize - popper[opSide]; } // compute center of the popper var center = reference[side] + reference[len] / 2 - arrowElementSize / 2; // Compute the sideValue using the updated popper offsets // take popper margin in account because we don't have this info available var popperMarginSide = getStyleComputedProperty(data.instance.popper, 'margin' + sideCapitalized).replace('px', ''); var sideValue = center - getClientRect(data.offsets.popper)[side] - popperMarginSide; // prevent arrowElement from being placed not contiguously to its popper sideValue = Math.max(Math.min(popper[len] - arrowElementSize, sideValue), 0); data.arrowElement = arrowElement; data.offsets.arrow = {}; data.offsets.arrow[side] = Math.round(sideValue); data.offsets.arrow[altSide] = ''; // make sure to unset any eventual altSide value from the DOM node return data; } /** * Get the opposite placement variation of the given one * @method * @memberof Popper.Utils * @argument {String} placement variation * @returns {String} flipped placement variation */ function getOppositeVariation(variation) { if (variation === 'end') { return 'start'; } else if (variation === 'start') { return 'end'; } return variation; } /** * List of accepted placements to use as values of the `placement` option.
* Valid placements are: * - `auto` * - `top` * - `right` * - `bottom` * - `left` * * Each placement can have a variation from this list: * - `-start` * - `-end` * * Variations are interpreted easily if you think of them as the left to right * written languages. Horizontally (`top` and `bottom`), `start` is left and `end` * is right.
* Vertically (`left` and `right`), `start` is top and `end` is bottom. * * Some valid examples are: * - `top-end` (on top of reference, right aligned) * - `right-start` (on right of reference, top aligned) * - `bottom` (on bottom, centered) * - `auto-right` (on the side with more space available, alignment depends by placement) * * @static * @type {Array} * @enum {String} * @readonly * @method placements * @memberof Popper */ var placements = ['auto-start', 'auto', 'auto-end', 'top-start', 'top', 'top-end', 'right-start', 'right', 'right-end', 'bottom-end', 'bottom', 'bottom-start', 'left-end', 'left', 'left-start']; // Get rid of `auto` `auto-start` and `auto-end` var validPlacements = placements.slice(3); /** * Given an initial placement, returns all the subsequent placements * clockwise (or counter-clockwise). * * @method * @memberof Popper.Utils * @argument {String} placement - A valid placement (it accepts variations) * @argument {Boolean} counter - Set to true to walk the placements counterclockwise * @returns {Array} placements including their variations */ function clockwise(placement) { var counter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; var index = validPlacements.indexOf(placement); var arr = validPlacements.slice(index + 1).concat(validPlacements.slice(0, index)); return counter ? arr.reverse() : arr; } var BEHAVIORS = { FLIP: 'flip', CLOCKWISE: 'clockwise', COUNTERCLOCKWISE: 'counterclockwise' }; /** * @function * @memberof Modifiers * @argument {Object} data - The data object generated by update method * @argument {Object} options - Modifiers configuration and options * @returns {Object} The data object, properly modified */ function flip(data, options) { // if `inner` modifier is enabled, we can't use the `flip` modifier if (isModifierEnabled(data.instance.modifiers, 'inner')) { return data; } if (data.flipped && data.placement === data.originalPlacement) { // seems like flip is trying to loop, probably there's not enough space on any of the flippable sides return data; } var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, options.boundariesElement); var placement = data.placement.split('-')[0]; var placementOpposite = getOppositePlacement(placement); var variation = data.placement.split('-')[1] || ''; var flipOrder = []; switch (options.behavior) { case BEHAVIORS.FLIP: flipOrder = [placement, placementOpposite]; break; case BEHAVIORS.CLOCKWISE: flipOrder = clockwise(placement); break; case BEHAVIORS.COUNTERCLOCKWISE: flipOrder = clockwise(placement, true); break; default: flipOrder = options.behavior; } flipOrder.forEach(function (step, index) { if (placement !== step || flipOrder.length === index + 1) { return data; } placement = data.placement.split('-')[0]; placementOpposite = getOppositePlacement(placement); var popperOffsets = data.offsets.popper; var refOffsets = data.offsets.reference; // using floor because the reference offsets may contain decimals we are not going to consider here var floor = Math.floor; var overlapsRef = placement === 'left' && floor(popperOffsets.right) > floor(refOffsets.left) || placement === 'right' && floor(popperOffsets.left) < floor(refOffsets.right) || placement === 'top' && floor(popperOffsets.bottom) > floor(refOffsets.top) || placement === 'bottom' && floor(popperOffsets.top) < floor(refOffsets.bottom); var overflowsLeft = floor(popperOffsets.left) < floor(boundaries.left); var overflowsRight = floor(popperOffsets.right) > floor(boundaries.right); var overflowsTop = floor(popperOffsets.top) < floor(boundaries.top); var overflowsBottom = floor(popperOffsets.bottom) > floor(boundaries.bottom); var overflowsBoundaries = placement === 'left' && overflowsLeft || placement === 'right' && overflowsRight || placement === 'top' && overflowsTop || placement === 'bottom' && overflowsBottom; // flip the variation if required var isVertical = ['top', 'bottom'].indexOf(placement) !== -1; var flippedVariation = !!options.flipVariations && (isVertical && variation === 'start' && overflowsLeft || isVertical && variation === 'end' && overflowsRight || !isVertical && variation === 'start' && overflowsTop || !isVertical && variation === 'end' && overflowsBottom); if (overlapsRef || overflowsBoundaries || flippedVariation) { // this boolean to detect any flip loop data.flipped = true; if (overlapsRef || overflowsBoundaries) { placement = flipOrder[index + 1]; } if (flippedVariation) { variation = getOppositeVariation(variation); } data.placement = placement + (variation ? '-' + variation : ''); // this object contains `position`, we want to preserve it along with // any additional property we may add in the future data.offsets.popper = _extends({}, data.offsets.popper, getPopperOffsets(data.instance.popper, data.offsets.reference, data.placement)); data = runModifiers(data.instance.modifiers, data, 'flip'); } }); return data; } /** * @function * @memberof Modifiers * @argument {Object} data - The data object generated by update method * @argument {Object} options - Modifiers configuration and options * @returns {Object} The data object, properly modified */ function keepTogether(data) { var _data$offsets = data.offsets, popper = _data$offsets.popper, reference = _data$offsets.reference; var placement = data.placement.split('-')[0]; var floor = Math.floor; var isVertical = ['top', 'bottom'].indexOf(placement) !== -1; var side = isVertical ? 'right' : 'bottom'; var opSide = isVertical ? 'left' : 'top'; var measurement = isVertical ? 'width' : 'height'; if (popper[side] < floor(reference[opSide])) { data.offsets.popper[opSide] = floor(reference[opSide]) - popper[measurement]; } if (popper[opSide] > floor(reference[side])) { data.offsets.popper[opSide] = floor(reference[side]); } return data; } /** * Converts a string containing value + unit into a px value number * @function * @memberof {modifiers~offset} * @private * @argument {String} str - Value + unit string * @argument {String} measurement - `height` or `width` * @argument {Object} popperOffsets * @argument {Object} referenceOffsets * @returns {Number|String} * Value in pixels, or original string if no values were extracted */ function toValue(str, measurement, popperOffsets, referenceOffsets) { // separate value from unit var split = str.match(/((?:\-|\+)?\d*\.?\d*)(.*)/); var value = +split[1]; var unit = split[2]; // If it's not a number it's an operator, I guess if (!value) { return str; } if (unit.indexOf('%') === 0) { var element = void 0; switch (unit) { case '%p': element = popperOffsets; break; case '%': case '%r': default: element = referenceOffsets; } var rect = getClientRect(element); return rect[measurement] / 100 * value; } else if (unit === 'vh' || unit === 'vw') { // if is a vh or vw, we calculate the size based on the viewport var size = void 0; if (unit === 'vh') { size = Math.max(document.documentElement.clientHeight, window.innerHeight || 0); } else { size = Math.max(document.documentElement.clientWidth, window.innerWidth || 0); } return size / 100 * value; } else { // if is an explicit pixel unit, we get rid of the unit and keep the value // if is an implicit unit, it's px, and we return just the value return value; } } /** * Parse an `offset` string to extrapolate `x` and `y` numeric offsets. * @function * @memberof {modifiers~offset} * @private * @argument {String} offset * @argument {Object} popperOffsets * @argument {Object} referenceOffsets * @argument {String} basePlacement * @returns {Array} a two cells array with x and y offsets in numbers */ function parseOffset(offset, popperOffsets, referenceOffsets, basePlacement) { var offsets = [0, 0]; // Use height if placement is left or right and index is 0 otherwise use width // in this way the first offset will use an axis and the second one // will use the other one var useHeight = ['right', 'left'].indexOf(basePlacement) !== -1; // Split the offset string to obtain a list of values and operands // The regex addresses values with the plus or minus sign in front (+10, -20, etc) var fragments = offset.split(/(\+|\-)/).map(function (frag) { return frag.trim(); }); // Detect if the offset string contains a pair of values or a single one // they could be separated by comma or space var divider = fragments.indexOf(find(fragments, function (frag) { return frag.search(/,|\s/) !== -1; })); if (fragments[divider] && fragments[divider].indexOf(',') === -1) { console.warn('Offsets separated by white space(s) are deprecated, use a comma (,) instead.'); } // If divider is found, we divide the list of values and operands to divide // them by ofset X and Y. var splitRegex = /\s*,\s*|\s+/; var ops = divider !== -1 ? [fragments.slice(0, divider).concat([fragments[divider].split(splitRegex)[0]]), [fragments[divider].split(splitRegex)[1]].concat(fragments.slice(divider + 1))] : [fragments]; // Convert the values with units to absolute pixels to allow our computations ops = ops.map(function (op, index) { // Most of the units rely on the orientation of the popper var measurement = (index === 1 ? !useHeight : useHeight) ? 'height' : 'width'; var mergeWithPrevious = false; return op // This aggregates any `+` or `-` sign that aren't considered operators // e.g.: 10 + +5 => [10, +, +5] .reduce(function (a, b) { if (a[a.length - 1] === '' && ['+', '-'].indexOf(b) !== -1) { a[a.length - 1] = b; mergeWithPrevious = true; return a; } else if (mergeWithPrevious) { a[a.length - 1] += b; mergeWithPrevious = false; return a; } else { return a.concat(b); } }, []) // Here we convert the string values into number values (in px) .map(function (str) { return toValue(str, measurement, popperOffsets, referenceOffsets); }); }); // Loop trough the offsets arrays and execute the operations ops.forEach(function (op, index) { op.forEach(function (frag, index2) { if (isNumeric(frag)) { offsets[index] += frag * (op[index2 - 1] === '-' ? -1 : 1); } }); }); return offsets; } /** * @function * @memberof Modifiers * @argument {Object} data - The data object generated by update method * @argument {Object} options - Modifiers configuration and options * @argument {Number|String} options.offset=0 * The offset value as described in the modifier description * @returns {Object} The data object, properly modified */ function offset(data, _ref) { var offset = _ref.offset; var placement = data.placement, _data$offsets = data.offsets, popper = _data$offsets.popper, reference = _data$offsets.reference; var basePlacement = placement.split('-')[0]; var offsets = void 0; if (isNumeric(+offset)) { offsets = [+offset, 0]; } else { offsets = parseOffset(offset, popper, reference, basePlacement); } if (basePlacement === 'left') { popper.top += offsets[0]; popper.left -= offsets[1]; } else if (basePlacement === 'right') { popper.top += offsets[0]; popper.left += offsets[1]; } else if (basePlacement === 'top') { popper.left += offsets[0]; popper.top -= offsets[1]; } else if (basePlacement === 'bottom') { popper.left += offsets[0]; popper.top += offsets[1]; } data.popper = popper; return data; } /** * @function * @memberof Modifiers * @argument {Object} data - The data object generated by `update` method * @argument {Object} options - Modifiers configuration and options * @returns {Object} The data object, properly modified */ function preventOverflow(data, options) { var boundariesElement = options.boundariesElement || getOffsetParent(data.instance.popper); // If offsetParent is the reference element, we really want to // go one step up and use the next offsetParent as reference to // avoid to make this modifier completely useless and look like broken if (data.instance.reference === boundariesElement) { boundariesElement = getOffsetParent(boundariesElement); } var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, boundariesElement); options.boundaries = boundaries; var order = options.priority; var popper = data.offsets.popper; var check = { primary: function primary(placement) { var value = popper[placement]; if (popper[placement] < boundaries[placement] && !options.escapeWithReference) { value = Math.max(popper[placement], boundaries[placement]); } return defineProperty({}, placement, value); }, secondary: function secondary(placement) { var mainSide = placement === 'right' ? 'left' : 'top'; var value = popper[mainSide]; if (popper[placement] > boundaries[placement] && !options.escapeWithReference) { value = Math.min(popper[mainSide], boundaries[placement] - (placement === 'right' ? popper.width : popper.height)); } return defineProperty({}, mainSide, value); } }; order.forEach(function (placement) { var side = ['left', 'top'].indexOf(placement) !== -1 ? 'primary' : 'secondary'; popper = _extends({}, popper, check[side](placement)); }); data.offsets.popper = popper; return data; } /** * @function * @memberof Modifiers * @argument {Object} data - The data object generated by `update` method * @argument {Object} options - Modifiers configuration and options * @returns {Object} The data object, properly modified */ function shift(data) { var placement = data.placement; var basePlacement = placement.split('-')[0]; var shiftvariation = placement.split('-')[1]; // if shift shiftvariation is specified, run the modifier if (shiftvariation) { var _data$offsets = data.offsets, reference = _data$offsets.reference, popper = _data$offsets.popper; var isVertical = ['bottom', 'top'].indexOf(basePlacement) !== -1; var side = isVertical ? 'left' : 'top'; var measurement = isVertical ? 'width' : 'height'; var shiftOffsets = { start: defineProperty({}, side, reference[side]), end: defineProperty({}, side, reference[side] + reference[measurement] - popper[measurement]) }; data.offsets.popper = _extends({}, popper, shiftOffsets[shiftvariation]); } return data; } /** * @function * @memberof Modifiers * @argument {Object} data - The data object generated by update method * @argument {Object} options - Modifiers configuration and options * @returns {Object} The data object, properly modified */ function hide(data) { if (!isModifierRequired(data.instance.modifiers, 'hide', 'preventOverflow')) { return data; } var refRect = data.offsets.reference; var bound = find(data.instance.modifiers, function (modifier) { return modifier.name === 'preventOverflow'; }).boundaries; if (refRect.bottom < bound.top || refRect.left > bound.right || refRect.top > bound.bottom || refRect.right < bound.left) { // Avoid unnecessary DOM access if visibility hasn't changed if (data.hide === true) { return data; } data.hide = true; data.attributes['x-out-of-boundaries'] = ''; } else { // Avoid unnecessary DOM access if visibility hasn't changed if (data.hide === false) { return data; } data.hide = false; data.attributes['x-out-of-boundaries'] = false; } return data; } /** * @function * @memberof Modifiers * @argument {Object} data - The data object generated by `update` method * @argument {Object} options - Modifiers configuration and options * @returns {Object} The data object, properly modified */ function inner(data) { var placement = data.placement; var basePlacement = placement.split('-')[0]; var _data$offsets = data.offsets, popper = _data$offsets.popper, reference = _data$offsets.reference; var isHoriz = ['left', 'right'].indexOf(basePlacement) !== -1; var subtractLength = ['top', 'left'].indexOf(basePlacement) === -1; popper[isHoriz ? 'left' : 'top'] = reference[basePlacement] - (subtractLength ? popper[isHoriz ? 'width' : 'height'] : 0); data.placement = getOppositePlacement(placement); data.offsets.popper = getClientRect(popper); return data; } /** * Modifier function, each modifier can have a function of this type assigned * to its `fn` property.
* These functions will be called on each update, this means that you must * make sure they are performant enough to avoid performance bottlenecks. * * @function ModifierFn * @argument {dataObject} data - The data object generated by `update` method * @argument {Object} options - Modifiers configuration and options * @returns {dataObject} The data object, properly modified */ /** * Modifiers are plugins used to alter the behavior of your poppers.
* Popper.js uses a set of 9 modifiers to provide all the basic functionalities * needed by the library. * * Usually you don't want to override the `order`, `fn` and `onLoad` props. * All the other properties are configurations that could be tweaked. * @namespace modifiers */ var modifiers = { /** * Modifier used to shift the popper on the start or end of its reference * element.
* It will read the variation of the `placement` property.
* It can be one either `-end` or `-start`. * @memberof modifiers * @inner */ shift: { /** @prop {number} order=100 - Index used to define the order of execution */ order: 100, /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ enabled: true, /** @prop {ModifierFn} */ fn: shift }, /** * The `offset` modifier can shift your popper on both its axis. * * It accepts the following units: * - `px` or unitless, interpreted as pixels * - `%` or `%r`, percentage relative to the length of the reference element * - `%p`, percentage relative to the length of the popper element * - `vw`, CSS viewport width unit * - `vh`, CSS viewport height unit * * For length is intended the main axis relative to the placement of the popper.
* This means that if the placement is `top` or `bottom`, the length will be the * `width`. In case of `left` or `right`, it will be the height. * * You can provide a single value (as `Number` or `String`), or a pair of values * as `String` divided by a comma or one (or more) white spaces.
* The latter is a deprecated method because it leads to confusion and will be * removed in v2.
* Additionally, it accepts additions and subtractions between different units. * Note that multiplications and divisions aren't supported. * * Valid examples are: * ``` * 10 * '10%' * '10, 10' * '10%, 10' * '10 + 10%' * '10 - 5vh + 3%' * '-10px + 5vh, 5px - 6%' * ``` * > **NB**: If you desire to apply offsets to your poppers in a way that may make them overlap * > with their reference element, unfortunately, you will have to disable the `flip` modifier. * > More on this [reading this issue](https://github.com/FezVrasta/popper.js/issues/373) * * @memberof modifiers * @inner */ offset: { /** @prop {number} order=200 - Index used to define the order of execution */ order: 200, /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ enabled: true, /** @prop {ModifierFn} */ fn: offset, /** @prop {Number|String} offset=0 * The offset value as described in the modifier description */ offset: 0 }, /** * Modifier used to prevent the popper from being positioned outside the boundary. * * An scenario exists where the reference itself is not within the boundaries.
* We can say it has "escaped the boundaries" — or just "escaped".
* In this case we need to decide whether the popper should either: * * - detach from the reference and remain "trapped" in the boundaries, or * - if it should ignore the boundary and "escape with its reference" * * When `escapeWithReference` is set to`true` and reference is completely * outside its boundaries, the popper will overflow (or completely leave) * the boundaries in order to remain attached to the edge of the reference. * * @memberof modifiers * @inner */ preventOverflow: { /** @prop {number} order=300 - Index used to define the order of execution */ order: 300, /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ enabled: true, /** @prop {ModifierFn} */ fn: preventOverflow, /** * @prop {Array} [priority=['left','right','top','bottom']] * Popper will try to prevent overflow following these priorities by default, * then, it could overflow on the left and on top of the `boundariesElement` */ priority: ['left', 'right', 'top', 'bottom'], /** * @prop {number} padding=5 * Amount of pixel used to define a minimum distance between the boundaries * and the popper this makes sure the popper has always a little padding * between the edges of its container */ padding: 5, /** * @prop {String|HTMLElement} boundariesElement='scrollParent' * Boundaries used by the modifier, can be `scrollParent`, `window`, * `viewport` or any DOM element. */ boundariesElement: 'scrollParent' }, /** * Modifier used to make sure the reference and its popper stay near eachothers * without leaving any gap between the two. Expecially useful when the arrow is * enabled and you want to assure it to point to its reference element. * It cares only about the first axis, you can still have poppers with margin * between the popper and its reference element. * @memberof modifiers * @inner */ keepTogether: { /** @prop {number} order=400 - Index used to define the order of execution */ order: 400, /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ enabled: true, /** @prop {ModifierFn} */ fn: keepTogether }, /** * This modifier is used to move the `arrowElement` of the popper to make * sure it is positioned between the reference element and its popper element. * It will read the outer size of the `arrowElement` node to detect how many * pixels of conjuction are needed. * * It has no effect if no `arrowElement` is provided. * @memberof modifiers * @inner */ arrow: { /** @prop {number} order=500 - Index used to define the order of execution */ order: 500, /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ enabled: true, /** @prop {ModifierFn} */ fn: arrow, /** @prop {String|HTMLElement} element='[x-arrow]' - Selector or node used as arrow */ element: '[x-arrow]' }, /** * Modifier used to flip the popper's placement when it starts to overlap its * reference element. * * Requires the `preventOverflow` modifier before it in order to work. * * **NOTE:** this modifier will interrupt the current update cycle and will * restart it if it detects the need to flip the placement. * @memberof modifiers * @inner */ flip: { /** @prop {number} order=600 - Index used to define the order of execution */ order: 600, /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ enabled: true, /** @prop {ModifierFn} */ fn: flip, /** * @prop {String|Array} behavior='flip' * The behavior used to change the popper's placement. It can be one of * `flip`, `clockwise`, `counterclockwise` or an array with a list of valid * placements (with optional variations). */ behavior: 'flip', /** * @prop {number} padding=5 * The popper will flip if it hits the edges of the `boundariesElement` */ padding: 5, /** * @prop {String|HTMLElement} boundariesElement='viewport' * The element which will define the boundaries of the popper position, * the popper will never be placed outside of the defined boundaries * (except if keepTogether is enabled) */ boundariesElement: 'viewport' }, /** * Modifier used to make the popper flow toward the inner of the reference element. * By default, when this modifier is disabled, the popper will be placed outside * the reference element. * @memberof modifiers * @inner */ inner: { /** @prop {number} order=700 - Index used to define the order of execution */ order: 700, /** @prop {Boolean} enabled=false - Whether the modifier is enabled or not */ enabled: false, /** @prop {ModifierFn} */ fn: inner }, /** * Modifier used to hide the popper when its reference element is outside of the * popper boundaries. It will set a `x-out-of-boundaries` attribute which can * be used to hide with a CSS selector the popper when its reference is * out of boundaries. * * Requires the `preventOverflow` modifier before it in order to work. * @memberof modifiers * @inner */ hide: { /** @prop {number} order=800 - Index used to define the order of execution */ order: 800, /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ enabled: true, /** @prop {ModifierFn} */ fn: hide }, /** * Computes the style that will be applied to the popper element to gets * properly positioned. * * Note that this modifier will not touch the DOM, it just prepares the styles * so that `applyStyle` modifier can apply it. This separation is useful * in case you need to replace `applyStyle` with a custom implementation. * * This modifier has `850` as `order` value to maintain backward compatibility * with previous versions of Popper.js. Expect the modifiers ordering method * to change in future major versions of the library. * * @memberof modifiers * @inner */ computeStyle: { /** @prop {number} order=850 - Index used to define the order of execution */ order: 850, /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ enabled: true, /** @prop {ModifierFn} */ fn: computeStyle, /** * @prop {Boolean} gpuAcceleration=true * If true, it uses the CSS 3d transformation to position the popper. * Otherwise, it will use the `top` and `left` properties. */ gpuAcceleration: true, /** * @prop {string} [x='bottom'] * Where to anchor the X axis (`bottom` or `top`). AKA X offset origin. * Change this if your popper should grow in a direction different from `bottom` */ x: 'bottom', /** * @prop {string} [x='left'] * Where to anchor the Y axis (`left` or `right`). AKA Y offset origin. * Change this if your popper should grow in a direction different from `right` */ y: 'right' }, /** * Applies the computed styles to the popper element. * * All the DOM manipulations are limited to this modifier. This is useful in case * you want to integrate Popper.js inside a framework or view library and you * want to delegate all the DOM manipulations to it. * * Note that if you disable this modifier, you must make sure the popper element * has its position set to `absolute` before Popper.js can do its work! * * Just disable this modifier and define you own to achieve the desired effect. * * @memberof modifiers * @inner */ applyStyle: { /** @prop {number} order=900 - Index used to define the order of execution */ order: 900, /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ enabled: true, /** @prop {ModifierFn} */ fn: applyStyle, /** @prop {Function} */ onLoad: applyStyleOnLoad, /** * @deprecated since version 1.10.0, the property moved to `computeStyle` modifier * @prop {Boolean} gpuAcceleration=true * If true, it uses the CSS 3d transformation to position the popper. * Otherwise, it will use the `top` and `left` properties. */ gpuAcceleration: undefined } }; /** * The `dataObject` is an object containing all the informations used by Popper.js * this object get passed to modifiers and to the `onCreate` and `onUpdate` callbacks. * @name dataObject * @property {Object} data.instance The Popper.js instance * @property {String} data.placement Placement applied to popper * @property {String} data.originalPlacement Placement originally defined on init * @property {Boolean} data.flipped True if popper has been flipped by flip modifier * @property {Boolean} data.hide True if the reference element is out of boundaries, useful to know when to hide the popper. * @property {HTMLElement} data.arrowElement Node used as arrow by arrow modifier * @property {Object} data.styles Any CSS property defined here will be applied to the popper, it expects the JavaScript nomenclature (eg. `marginBottom`) * @property {Object} data.arrowStyles Any CSS property defined here will be applied to the popper arrow, it expects the JavaScript nomenclature (eg. `marginBottom`) * @property {Object} data.boundaries Offsets of the popper boundaries * @property {Object} data.offsets The measurements of popper, reference and arrow elements. * @property {Object} data.offsets.popper `top`, `left`, `width`, `height` values * @property {Object} data.offsets.reference `top`, `left`, `width`, `height` values * @property {Object} data.offsets.arrow] `top` and `left` offsets, only one of them will be different from 0 */ /** * Default options provided to Popper.js constructor.
* These can be overriden using the `options` argument of Popper.js.
* To override an option, simply pass as 3rd argument an object with the same * structure of this object, example: * ``` * new Popper(ref, pop, { * modifiers: { * preventOverflow: { enabled: false } * } * }) * ``` * @type {Object} * @static * @memberof Popper */ var Defaults = { /** * Popper's placement * @prop {Popper.placements} placement='bottom' */ placement: 'bottom', /** * Whether events (resize, scroll) are initially enabled * @prop {Boolean} eventsEnabled=true */ eventsEnabled: true, /** * Set to true if you want to automatically remove the popper when * you call the `destroy` method. * @prop {Boolean} removeOnDestroy=false */ removeOnDestroy: false, /** * Callback called when the popper is created.
* By default, is set to no-op.
* Access Popper.js instance with `data.instance`. * @prop {onCreate} */ onCreate: function onCreate() {}, /** * Callback called when the popper is updated, this callback is not called * on the initialization/creation of the popper, but only on subsequent * updates.
* By default, is set to no-op.
* Access Popper.js instance with `data.instance`. * @prop {onUpdate} */ onUpdate: function onUpdate() {}, /** * List of modifiers used to modify the offsets before they are applied to the popper. * They provide most of the functionalities of Popper.js * @prop {modifiers} */ modifiers: modifiers }; /** * @callback onCreate * @param {dataObject} data */ /** * @callback onUpdate * @param {dataObject} data */ // Utils // Methods var Popper = function () { /** * Create a new Popper.js instance * @class Popper * @param {HTMLElement|referenceObject} reference - The reference element used to position the popper * @param {HTMLElement} popper - The HTML element used as popper. * @param {Object} options - Your custom options to override the ones defined in [Defaults](#defaults) * @return {Object} instance - The generated Popper.js instance */ function Popper(reference, popper) { var _this = this; var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; classCallCheck(this, Popper); this.scheduleUpdate = function () { return requestAnimationFrame(_this.update); }; // make update() debounced, so that it only runs at most once-per-tick this.update = debounce(this.update.bind(this)); // with {} we create a new object with the options inside it this.options = _extends({}, Popper.Defaults, options); // init state this.state = { isDestroyed: false, isCreated: false, scrollParents: [] }; // get reference and popper elements (allow jQuery wrappers) this.reference = reference && reference.jquery ? reference[0] : reference; this.popper = popper && popper.jquery ? popper[0] : popper; // Deep merge modifiers options this.options.modifiers = {}; Object.keys(_extends({}, Popper.Defaults.modifiers, options.modifiers)).forEach(function (name) { _this.options.modifiers[name] = _extends({}, Popper.Defaults.modifiers[name] || {}, options.modifiers ? options.modifiers[name] : {}); }); // Refactoring modifiers' list (Object => Array) this.modifiers = Object.keys(this.options.modifiers).map(function (name) { return _extends({ name: name }, _this.options.modifiers[name]); }) // sort the modifiers by order .sort(function (a, b) { return a.order - b.order; }); // modifiers have the ability to execute arbitrary code when Popper.js get inited // such code is executed in the same order of its modifier // they could add new properties to their options configuration // BE AWARE: don't add options to `options.modifiers.name` but to `modifierOptions`! this.modifiers.forEach(function (modifierOptions) { if (modifierOptions.enabled && isFunction(modifierOptions.onLoad)) { modifierOptions.onLoad(_this.reference, _this.popper, _this.options, modifierOptions, _this.state); } }); // fire the first update to position the popper in the right place this.update(); var eventsEnabled = this.options.eventsEnabled; if (eventsEnabled) { // setup event listeners, they will take care of update the position in specific situations this.enableEventListeners(); } this.state.eventsEnabled = eventsEnabled; } // We can't use class properties because they don't get listed in the // class prototype and break stuff like Sinon stubs createClass(Popper, [{ key: 'update', value: function update$$1() { return update.call(this); } }, { key: 'destroy', value: function destroy$$1() { return destroy.call(this); } }, { key: 'enableEventListeners', value: function enableEventListeners$$1() { return enableEventListeners.call(this); } }, { key: 'disableEventListeners', value: function disableEventListeners$$1() { return disableEventListeners.call(this); } /** * Schedule an update, it will run on the next UI update available * @method scheduleUpdate * @memberof Popper */ /** * Collection of utilities useful when writing custom modifiers. * Starting from version 1.7, this method is available only if you * include `popper-utils.js` before `popper.js`. * * **DEPRECATION**: This way to access PopperUtils is deprecated * and will be removed in v2! Use the PopperUtils module directly instead. * Due to the high instability of the methods contained in Utils, we can't * guarantee them to follow semver. Use them at your own risk! * @static * @private * @type {Object} * @deprecated since version 1.8 * @member Utils * @memberof Popper */ }]); return Popper; }(); /** * The `referenceObject` is an object that provides an interface compatible with Popper.js * and lets you use it as replacement of a real DOM node.
* You can use this method to position a popper relatively to a set of coordinates * in case you don't have a DOM node to use as reference. * * ``` * new Popper(referenceObject, popperNode); * ``` * * NB: This feature isn't supported in Internet Explorer 10 * @name referenceObject * @property {Function} data.getBoundingClientRect * A function that returns a set of coordinates compatible with the native `getBoundingClientRect` method. * @property {number} data.clientWidth * An ES6 getter that will return the width of the virtual reference element. * @property {number} data.clientHeight * An ES6 getter that will return the height of the virtual reference element. */ Popper.Utils = (typeof window !== 'undefined' ? window : global).PopperUtils; Popper.placements = placements; Popper.Defaults = Defaults; return Popper; }); /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__("DuR2"))) /***/ }), /***/ "0ymm": /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.storeShape = undefined; var _propTypes = __webpack_require__("KSGD"); var _propTypes2 = _interopRequireDefault(_propTypes); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var storeShape = exports.storeShape = _propTypes2.default.shape({ subscribe: _propTypes2.default.func.isRequired, setState: _propTypes2.default.func.isRequired, getState: _propTypes2.default.func.isRequired }); /***/ }), /***/ "1+y7": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAeCAYAAAFIwk4JAAAAAXNSR0IArs4c6QAAA5ZJREFUSA2lVk1IVFEUPvelBpWEEEYRLQqkhVAg5KKsXGVQQgSRUGBQuBAi8y+KFkLRPCeiEKI2LdoUUVEUSUKFEfS3EIl+LCISRHERQVZCOafvvJn77nkzb8a/C2/ud77zd8+95903RHb43GMhUYLZCp4FmkxzPq8MldAOpQXri9kEjCW0kNYIE9FCPm4yOlFopWBmz3n6/IyYaoKwGS9DPg+A3BCQeX+6+RBCj2t9zFKh9mg7dZg+twce7QhXmKJHEsEpmb7qkIKLQoLpI3JacZMAV4quM9wAayuzNgg8swht68IKe4GX0ySNaYMQe3QU5V20snPM3kUTlDqMnT1sjYM53HbL6mVlF6J1HlUg82eXMcFPEWObjYNdPYVs3/BcCzkBORmF7OadlKL7AnOGoXfUaSot7zJaRmafJ5BpcUh10gIyJhXK04IkV+ezyc14icvoJ11Fxq3ogS942rAZ/dkBoo4+P4dD0DcRQ0NTqM/1GZSuI31+GOskERg1JnhKB3OOjD53I4Ulng2W6jiPkrzfiumlJrgJxGVL2rMKZJ97kbEuo5uArlSwzbg+o5DptsICdcstsbq0o0ePLYHl1YdYAFOHkicsdruq+9HQOBwaEeQA5gZrDHkPdveOyM7R5+sw2hcaZQMDbaexpYU1EkgXOdtJ5HJapOkwQkBWU7FWKtxAB82kklVGYWvNP7hGr0RDD3AEN7ST4GhGYVrNICpvFogxjBJ2peFMfxPcVcjUZF9thYxDnaFGdxwhq8AVLqYfaACmdrBLlSYOvsKr0ELt5kWc0nLxCRMswV/iWWcNZzUbLLLTJON8chP6XI+K7sUZz5L7RGVUSU3mr/aLnn43ry2QbBSONcEbLjeyPGtoITrlvA6ocAWO466SAxitMMFnwJ7INkLQIWxR/u3t5jrc/r05fkJ4tAJX65jVRSsk3MJxgym8LeLUSJZfX4RWUiOasIRuKZ2GVfgEvaFzvEyTAU7ybsz9OXya6KNjZkTrolsqGp9rcY5PtNEc8SDOuIr2msg3IzehRE9yObbpLRKXzzFZD5rqSJxvfEJrmWDpwBYrTjsb+oUT20ht5n0+28IJxSv9H+s10Op8QQLeUBKdrD9LsebTJ7Ru8seH8V7Jtzw6BqiUtlCzyd+pyn7mCa2Tz6eR9CTeze+gNqOqD1Y1k9nQTS6hEVo1E+N52vyhFjMqn5kurLZunsGmd2f6jVun9T+WFAYXIRdFDAAAAABJRU5ErkJggg==" /***/ }), /***/ "11Jr": /***/ (function(module, exports) { // removed by extract-text-webpack-plugin /***/ }), /***/ "16NO": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAARCAYAAADZsVyDAAAAAXNSR0IArs4c6QAAAM9JREFUOBFjdGp985+BBoCJBmaOGokaAoxObW/XMvz/H4QqjMRjZFy3r0o4GCRCSkQzsXJy5DAwMH5AMgqJyfgBIo8kRCSTEaTOqf1tCsO//7Mx9DAxpu6rFJ6DIU6EANjg////M7q0v937/z+DI0wPIyPDgT2Vwk6MjIxkpXNwOgZpZmFkTWNgZPgONhhIA/mp5BoKMgPsYpgrndvelf3//6+TkZGpfG+VUBdMHEaTFHkwTSDa1lKwD+jKuSAaWXyUTVEIMJISIaTYRLNiEwCK6zZcIotxagAAAABJRU5ErkJggg==" /***/ }), /***/ "1Bek": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAAAgCAYAAAB3j6rJAAADtklEQVRYR82XWahWVRTHf/9GsbDIEFILRYoGxAejwadMg8CH0BIxirBySKIJJIVC0Eqh8kWQ1IQQBSGHIIuCoqAEI7E5J5CiHJAyUys1dcn/ss/1fMdzvu/cc1/ugu/lO2uv/dtrr2mLPiLqIxzUAomIy4HxwAPASGAE4P/+A/YBXwOfAe9JOtnkcBeARMQYYK+kgxHRD3gamAdcU2ODP4HlwKuS/q2h363SAhIRzwKvAx9ImhgRjwHv9MRg0v0VeFLSJ3XXdoNExEzgrdzCh4F1wKfA2LoGc3qngemSah2kCyQi7gU+Bi7JGfoDuA24EvgB6N8AxksekbS201qlONgDDC1RXi9pckQ8DyzpZKzi+3Hgdkm72q03yAvAm22UJgMbgS3AXQ1hvgFGS4qq9QZZA0wFLqpQOpSuaBBgg5c1hJkg6cNKkBQjwxzlwDRgcInyOklTI+IlYGFDkM8lVQZ9MX0drBOAGcD9BS9NdFqn4jWqBzC7gXf9k/RdJ4/cnFJ3BbDB1TEirgeeSD8H8sF0RfbeV4UMK9p3YGabf5+8PkDS0U4gLwKLk5Kr42pgpaQdEXFx8o69dFjStIhYBMwtGN0BrE8nd7q7LNwCPAg8BJyUdGcnEGeFXV+ULwB7yWl8IiIcP64vDuxvgTO5k/+UNve1eWMDGCST/4Grq0p/VtB+LiwqAh3Oecm6Pm3/zGhE3JE29uZuiNsBZ+MxwB51zzrr/yT9VeaVDOS3ioJWtubL5KVfgEkJwPFkcTf2NV8HPGUPFAz8CMyX5BtokQzkd2BIDzKhTNUQjwMvA7d2sOUOPVuSvdQlGYizwO7tjTznJpcyK29nE+CszMeLvy+W5PGiBcRZ8mgvKFwf3gdc8IoyMAWvvZAXe2OUJF9Xt0eazh2Z4TkpNq4tAbkKcL96u+Tbckmz8iCmdpw4upuIa4zTvEzagXgSdJadn1kjYlUKtiYgPlV+qMrbaAdySpJn3xYQl/GdwBUNSGYDyxp45Kgkg7ZO8RHhQXlpAxBny8qKdZ6D76mo3Fsl3X0BiP9oeEX2hvvI6BKYrcANFePFHElvVIG4JNuwA7Cu/A140nOcFcU1xFlTnGMOADdK+qcUJLOSnhav9WBo3pAeW88USI6kATw/mJ8Cxklyu+iSti+9iBgOLACmAJfWcM8rgJ8RLmz5jfNL99teHqIjSM47bv8eE/zs9BPDfclgntD3AtuAzcBHkk5HxE3uJcB9gBviiZSRbnYrykaBWm/fGp7otUqfATkH0sAoMAH+9p4AAAAASUVORK5CYII=" /***/ }), /***/ "1DFu": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAiCAYAAAC0nUK+AAAAAXNSR0IArs4c6QAABTpJREFUSA2dVmtMHFUUPnceu+VZmC1IacUSfEEq0UIMbSINoK0arTHR0ib9YX/YtIlp4iM8lphgU2TXV+ovrU2sPzRtSqRJiaIINC01tLGgEoNGaVFridu1QHbLsju7M9dzZnfY2WUo6EnYe+95fPfe755zBga3kW2emdqYrj8NwOsYh2IA5uKMT+P8LxDYOZEJZ75uzhtiDDU2wmx00NAxUwegezjwh+3sVh1j8B1wsXmgLf+sVU/zFPB2zoXznTc7gEMLGQtyBGjY6ICaux1QnC9CbgaDwDyHqRkNLk6oMPCTCv6gTq4IxN5+xK20tDMWVxg6w4QX55w92jl9CsfnZBFg79ZMeLZ6FTiklP0T3vFBjXE4fTkMx8+FIKoRGuuubVWeNzdAmLhccB58A4EP5GUy8O7OhboKJ4jC0sAURfaN62XYVCrD8G8qhKO8/NpQRLo66B0kuxG9zXNzS0yHC7LA2Xt7cqFinUy2Bbk4EUVq4rqz4yqcGJ43qCktkPCGGbBpgwzj16PwyqcBiOqMI0VbB9zKkEAIms6RZ86IinRgsvsDCzSCD+dXfDGYV7kB2HQiCKO/R404iiccZOAwxYmPeWerdV1/kx7P/Uz2Iiqu3tBgQ4EIPd+HDVtdhQOcsgCjk1GKN+T6tA5PPuiEe4sk6BuLQEjld5Vub+oVdE3DPAYjK+wer+tSGI4OhODMSASaTwbwtDHYVbMKXqzPiiPj76Q/ZswpnrKLhMXYUwJmfwMtKN3spBGBiFedcwhFuO0GlKammDiEK2FtlVB5WR1MRxqJEsptLUG7uYF3V65xA/K5I9d4OpomcRiUCMB4ISmpQOwkgjduOxWEmbnko5obmBTRO5hi4jDgmEuczeETO+l0ruzUDXS80qHuoJEVZnCWU4AMxBKw7n/8MwpZTkw8DCtxxakhHEMQV8KJD/8UKmlXdvJ65PDuF3NGmdOcZJ0iwltYYEWrk36HTt/CLMLbYaaREA4JJvuUhLSMYi8pp17xwJ3J4vn21yh8NRY2HOnnHkwzD/JMFWyVnfjgspjUEQ4JltIoci700oKaEPUKU/yB+Alo/RBWIFVuOjDZ7l8rQVlhnBKKJxxDGO+RHFm8J3KLzWB3y6cm1FiTYdioeF6ozcSCYUYDo2a2nFC80SUZ+EVZ6TXuU9/5TxvocJgA7HrLcqBkX+gt8e748qDbdcR4GUlyHcE3/5na5utdqdmxUmCKo3g87agzW/mA4hZe4nFv4D5VU/GrAjn/t59jSt4Qnay671XXtRRwWtR7pp9gOu/BrmYw/N++RBDCpKnvc6+5RFgkCyePLwHwa7QPu+RRc72ykcVAZDsGWxQj88yYZDUkNP2tykdYcu+YDisZ8YO0Lx2Y4haBk7J2s9KK/y4M03xZYexYv9t13M7PFry9jsWcDmE3sjZrF2Tq8ABjJWuVg+Y6fbQFJ6cvX8v/gwnspfQAc42ZERFBbvxkL0v2CNOYGJcEJ/tAq/IZnu6btJj4krGOPnfuL7a2hPK24OTjkMQDOKScjgpOKVO8CYwlh2XBe5vyrmDz9lgRRFHY37WTJTqU1ZI6X5TnVnNVVVVmNBpVYHV54Zrt7/cBk1xcDZz3f75jvyAIQVmWp0dGRkLWGOt8yV5XWVlZGA6HyzRNy9ZCPuZcv0WVMgs3B8dPtoSnLgdJjxsXFBcXaz6fD79mi2VJWrBKi6zu0/1N3ers5MfBH45NWPXpflbbkuB47b+tjro6G/P37PnQqqN5up/VviLO8XQ52MwcOIoIpmF6qivh/F8hNSxuv2hhHgAAAABJRU5ErkJggg==" /***/ }), /***/ "1FcO": /***/ (function(module, exports) { module.exports = "data:image/png;base64,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" /***/ }), /***/ "1OYt": /***/ (function(module, exports) { // removed by extract-text-webpack-plugin /***/ }), /***/ "1Pj1": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAiCAYAAAC0nUK+AAAAAXNSR0IArs4c6QAABRhJREFUSA2lVmlsVFUU/u59b6adAradtmNtFBdiaAGrSYkGTFvKEiJQUQFZIkZDQlCMGH8gxMTURBJcfmCiccElUTAqaNQaSSUUpiQuAaoRKPwQo4KEMnSh0Glnefd6zm3f8KYzg0M8yZtzz/ad8+4997wRuAr11TQ0KI1mBd0EIaoEdJmG6BUaZwQQlgLflHSFDwpBmixEPpkUmdrYJJTeqrW+O9OarhEQh7Qlnqs4Ht6fbgHSwHVLi+z5vH2LVnoTO8rKEAqa58HfOAPWTVUQJcXQ/RfhnD6LePhHxFr3Qp07bzClkK8GlzdtEi0tamwSUJXiQnX9rkh1vY7cMVsPvrdTq1iM1LmJ7ezH/hx3oabhCy4wAzwypf5F4zCzWcd/OZYbMYuF/S9Q3GiCl9LAe6Y1zKSqFVdwrcBuLo7jeMbpndJYzwnMK+ik3kLHLYo2rIHvrqlpiRGPI743jEsbXkDvjEWGs8x6L3EcxzOOo7WpXkSmzZqOpHOID6+07RMIvx9wHCR+OIzYd/sIuANqMOrFMWs5rgj+ufUoWDgXvpnTAcuCpoR981eZQxYW7rGhnGb25q5g4MFX3kTsqzaovv4MQK+CEw5/3WYeWVqCggfmY9zG9QZnaPtOaCUXSSjM4SBuN6bA4ytQuGSBWefzE3jsYVNIYPUy4+7iCK3nSLpdE1nLfcwkK8rgq7vTrPP5KZjXaNzE+CLDXRwSJkqtEWItXxCXrMmTULisGbL0is61uVwEClG4dBFkedBVGe7i0MFW2DQWBilBAd88ESo3DvKGEJKdR02wKL4Ozt//IL7vIFRPH+zbbkbhisXwz5+FRMdPGHi2JQ2ccZgY1ybWDeggX2k5Cs7G5Kk/zcNr68Yq0xX27bfCnjoZw7u/Rf/C1VCXB9mcRowzQuKsTY3ZSUINzwpfXW3KUfjIlEga2TlzFkMf7UrZvAs6Mx4dKRXjjFKn1BJ7WOAhxH3qUmnbp9RaT8I3rdpVpXHu88AjS1C8442UnuMZh0lI2WrLCeNa9cDlPppupUMf70bRmlXGyPvObcmPoleN7Wk3j47FEFj5IAoeWgBBCXR0CBZtJ9+RKMWPTslI0PKbokHT7Hl3Gv7f2cI4PTX1z3CFZraU+Qq30d6dQCKBgfWbkfj1uKk+3x/25ziOpzbpDN4y/i2OTX0sIrVNk0U8eYiOZgJ8PjOEAquXjsyaHFl4j3kro6+/PwIMnJe2mF52rON0GjgLNCrvU0q3amiL5Wv5ElGZUSHs2eVd+3/mWKZU5SMiEKluXAuod1w5H05bmqQ5cn+wKzxyiKNBGZ+kipPhdyXEa/mAuj4EvnYsMNsywFkZrJSbKSB1G1iXkwS2l3WFP8xmzwouDhxIWrBXUoKrD3Xgt/LrraezAbMuKzgbSk+0/6UFnuJ1dhIx4bOWUyHD2e1XAeeAiq6OnVT9yH0egyCF3lJ+9MDJMeo0MWflrpdt2U9QU6VVRwlPBGXly65PLv6f4CXH2k+R01YvAF2CdeL4ritTzmv0rDP63GNDXV1dUSKRCNYkENqmi7+n4V82IFTHYuviOinlJZ/P13vkyJHMvwajIOYmegHddW1tbWh4eHiS4zjju+GIe7U/HhLWjM9EdNNhFbvEekpcUVVV5XR3d2d+NQgo57YopSrdRMw3qoEv/9DOB9t19Hevfqyf15YTnF77nNex31LJR0Xv214dr8f6ee157TlVN4E+ZX7iFoE51C3xfPb8X1Q24ZR45IYrAAAAAElFTkSuQmCC" /***/ }), /***/ "1Sdw": /***/ (function(module, exports) { module.exports = "data:image/png;base64,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" /***/ }), /***/ "1cTg": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = _default; var _react = _interopRequireDefault(__webpack_require__("GiK3")); var _nModal = _interopRequireDefault(__webpack_require__("RkMR")); var _modal = _interopRequireDefault(__webpack_require__("ezvz")); var _openVideo = _interopRequireDefault(__webpack_require__("ke6Y")); /** * * @param {*} data * @param {*} name * @param {*} type :判断是态势,还是驻勤点(如果是驻勤点,样式就一套。如果是态势,就要根据name来展示不一样的样式) * @returns */ //定义一张图图层的信息窗体 function _default(data, name, optionType) { var _this = this; console.log(data); //定义最底部按钮 var button = document.createElement("div"); button.className = 'button'; var position = data.position, userName = data.userName, phone = data.phone, equipmentName = data.equipmentName, equipmentId = data.equipmentId, company = data.company, type = data.type, status = data.status, definition = data.definition, belong = data.belong, heightPosition = data.heightPosition, PRINCIPALNAME = data.PRINCIPALNAME, PRINCIPALPHONENO = data.PRINCIPALPHONENO, ATTENDANCESITENAME = data.ATTENDANCESITENAME, ATTENDANCESITEADDRESS = data.ATTENDANCESITEADDRESS, ATTENDANCESITEFULLADDRESS = data.ATTENDANCESITEFULLADDRESS, PERFORMRANGE = data.PERFORMRANGE, OFFICEPOLICEADDRESS = data.OFFICEPOLICEADDRESS, CONTRACTSTATE = data.CONTRACTSTATE, SERVEOBJECTNAME = data.SERVEOBJECTNAME, ATTENDANCESITECONTENT = data.ATTENDANCESITECONTENT; var content = []; switch (optionType) { case 'perception': switch (name) { case '无人机': content = _renderContent(equipmentName, [{ name: '位置:', data: position }, { name: '责任单位:', data: company }, { name: '责任人:', data: userName }, { name: '责任人电话:', data: phone }]); button.innerHTML = '播放视频'; button.onclick = function () { openVideo(); }; break; case '对讲机': content = _renderContent(equipmentName, [{ name: '设备id:', data: equipmentId }, { name: '位置:', data: position }, { name: '拥有者:', data: belong }]); button.innerHTML = '历史轨迹'; button.onclick = function () { (0, _modal.default)('该功能正在开发中...', '', null, 'warning'); }; break; case '视频监控': content = _renderContent(equipmentName, [{ name: '设备id:', data: equipmentId }, { name: '地址:', data: position }, { name: '清晰度:', data: definition }, { name: '状态:', data: status }, { name: '高度位置:', data: heightPosition }]); button.innerHTML = '播放视频'; button.onclick = function () { openVideo(); }; break; case '执法记录仪': content = _renderContent(equipmentName, [{ name: '设备id:', data: equipmentId }, { name: '地址:', data: position }, { name: '清晰度:', data: definition }, { name: '状态:', data: status }, { name: '高度位置:', data: heightPosition }]); button.innerHTML = '历史轨迹'; button.onclick = function () { (0, _modal.default)('该功能正在开发中...', '', null, 'warning'); }; break; case '车牌识别': content = _renderContent(equipmentName, [{ name: '设备id:', data: equipmentId }, { name: '地址:', data: position }, { name: '清晰度:', data: definition }, { name: '状态:', data: status }, { name: '垂直位置:', data: heightPosition }, { name: '类型:', data: type }]); button.innerHTML = '播放视频'; button.onclick = function () { openVideo(); }; break; case '人脸识别': content = _renderContent(equipmentName, [{ name: '设备id:', data: equipmentId }, { name: '地址:', data: position }, { name: '清晰度:', data: definition }, { name: '状态:', data: status }, { name: '垂直位置:', data: heightPosition }, { name: '类型:', data: type }]); button.innerHTML = '播放视频'; button.onclick = function () { openVideo(); }; break; default: content = _renderContent(equipmentName, [{ name: '位置:', data: position }]); break; } break; case 'attendance': content = _renderContent(ATTENDANCESITENAME, [{ name: '负责人姓名:', data: PRINCIPALNAME }, { name: '负责人电话:', data: PRINCIPALPHONENO }, { name: '驻勤点省市区:', data: ATTENDANCESITEADDRESS }, { name: '驻勤点详细地址:', data: ATTENDANCESITEFULLADDRESS }, { name: '执勤范围(米):', data: PERFORMRANGE }, { name: '所属监管机构:', data: OFFICEPOLICEADDRESS }, { name: '服务对象名称:', data: SERVEOBJECTNAME }, { name: '合同状态:', data: CONTRACTSTATE }]); button.innerHTML = '驻勤内容'; button.onclick = function () { (0, _nModal.default)({ title: ATTENDANCESITENAME, footer: null, width: 400, content: /*#__PURE__*/_react.default.createElement("div", null, ATTENDANCESITECONTENT) }); }; break; } content.join("
"); var divInfo = document.createElement("div"); divInfo.className = this.props.mapStyle; var info = document.createElement("div"); info.className = "content-window-card-picture "; divInfo.appendChild(info); // 定义内容 var middle = document.createElement("div"); middle.innerHTML = content; info.appendChild(middle); //定义关闭按钮 var detail = document.createElement("div"); detail.className = "close-div"; var a = document.createElement("a"); a.innerHTML = "x"; a.onclick = function () { // this.state.map.clearInfoWindow(); _this.clear('clearInfoWindow'); }; detail.appendChild(a); info.appendChild(detail); //加入最底部按钮 info.appendChild(button); return divInfo; } function _renderContent(equipmentName, list) { var renderContent = []; list.map(function (item) { renderContent.push("
" + item.name + "" + item.data + "
"); }); var content = []; content.push("
" + equipmentName + "
" + renderContent.toString().replace(/,/g, "") + "
"); return content; } //打开视频 function openVideo() { var url = "https://wvp.test.baibaodun.cn/#/play/wasm/wss%3A%2F%2Fwvp.test.baibaodun.cn%2Frtp%2Fgb_play_44010200492000000002_34090000001320000001.flv"; // return $nModal({ // title: null, // footer: null, // width: 700, // content: ( // // ) // }); return (0, _openVideo.default)({}); } /***/ }), /***/ "1u8q": /***/ (function(module, exports) { module.exports = "data:image/png;base64,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" /***/ }), /***/ "26Rz": /***/ (function(module, exports) { module.exports = "data:image/png;base64,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" /***/ }), /***/ "2CEz": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _defineProperty2 = _interopRequireDefault(__webpack_require__("mAPx")); __webpack_require__("baa2"); var _icon = _interopRequireDefault(__webpack_require__("FC3+")); var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); var _dva = __webpack_require__("S6G3"); var _api = __webpack_require__("H/Zg"); var _PersonItem = _interopRequireDefault(__webpack_require__("zW9u")); var _index = _interopRequireDefault(__webpack_require__("XhzF")); var _dec, _class; /** * 驻勤点信息 */ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } var AttendanceList = exports.default = (_dec = (0, _dva.connect)(function (state) { return { tab2Data: state.command.policeData.tab2, mapStyle: state.command.mapStyle }; }), _dec(_class = /*#__PURE__*/function (_PureComponent) { function AttendanceList(props) { var _this; (0, _classCallCheck2.default)(this, AttendanceList); _this = _callSuper(this, AttendanceList, [props]); _this.state = { enterpriseList: [], //企业信息列表以及驻勤点信息 allHeight: null, currentTab: 2 }; return _this; } (0, _inherits2.default)(AttendanceList, _PureComponent); return (0, _createClass2.default)(AttendanceList, [{ key: "componentDidMount", value: function componentDidMount() { var allHeight = document.documentElement.clientHeight - 140 - 16; this.setState({ allHeight: allHeight }); this._getEnterpriseList(); } }, { key: "componentWillReceiveProps", value: function componentWillReceiveProps(nextProps) { var _this2 = this; var enterpriseList = JSON.parse(JSON.stringify(this.state.enterpriseList)); if (this.state.currentTab != nextProps.clickTab) { enterpriseList.map(function (data, index) { if (data.open) { data.open = false; //企业自己关闭 if (data.attendanceList && data.attendanceList.length > 0) { data.attendanceList.map(function (item, itemIndex) { if (item.open) { _this2.close(item, [index, itemIndex]); } }); } } }); this.setState({ enterpriseList: enterpriseList }); } } //获取企业列表 }, { key: "_getEnterpriseList", value: function _getEnterpriseList() { var _this3 = this; var _currpage = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1; (0, _api.getEnterpriseList)({ _currpage: _currpage, lines: 10 }, { appId: "__ZLuP7RGirprZZ6SCdiX", viewId: "__xzByH4ZZxj2gVJZv0G4", opentarget: "detail", containTitle: "企业信息接口" }).then(function (res) { _this3.setState({ enterpriseList: _this3.state.enterpriseList.concat(res.data.data) }); //如果没有加载完,需要再一次加载 var _res$data = res.data, pageNumber = _res$data.pageNumber, pageSize = _res$data.pageSize, total = _res$data.total; if (total > pageNumber * pageSize) { _this3._getEnterpriseList(_currpage + 1); } }); } //根据对应企业id的驻勤点列表 }, { key: "_passEnterpriseIDGetAttendanceList", value: function _passEnterpriseIDGetAttendanceList() { var _this4 = this; var _currpage = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1; var enterpriseId = arguments.length > 1 ? arguments[1] : undefined; var index = arguments.length > 2 ? arguments[2] : undefined; (0, _api.passEnterpriseIDGetAttendanceList)({ _currpage: 1, lines: 10 }, { did: enterpriseId, appId: "__ZLuP7RGirprZZ6SCdiX", viewId: "__Mxf0ppgb6L8Hg6Va7Y5", opentarget: "detail", containTitle: "企业id查询驻勤点" }).then(function (res) { //第一级的部门存储在企业列表信息下 var enterpriseList = _this4.state.enterpriseList; var value = JSON.parse(JSON.stringify(enterpriseList)); if (value[index].attendanceList) { value[index].attendanceList = value[index].attendanceList.concat(res.data.data); } else { value[index].attendanceList = res.data.data || []; } _this4.setState({ enterpriseList: value }); //如果没有加载完,需要再一次加载 var _res$data2 = res.data, pageNumber = _res$data2.pageNumber, pageSize = _res$data2.pageSize, total = _res$data2.total; if (total > pageNumber * pageSize) { _this4._passEnterpriseIDGetAttendanceList(_currpage + 1, enterpriseId); } }); } //根据驻勤点id查询保安员列表 }, { key: "_passAttendanceIdGetPersonList", value: function _passAttendanceIdGetPersonList() { var _this5 = this; var _currpage = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1; var departID = arguments.length > 1 ? arguments[1] : undefined; var index = arguments.length > 2 ? arguments[2] : undefined; var attenIndex = arguments.length > 3 ? arguments[3] : undefined; (0, _api.getSecurityManByAttendanceId)({ attendanceId: departID }).then(function (res) { var data = res.data; var result = data.map(function (item) { item.perId = item.item_userid; delete item.item_userid; item.name = item.item_securityname ? item.item_securityname : item.principalName; delete item.item_securityname; delete item.principalName; var lnglatData = item.item_lonlatjson ? JSON.parse(item.item_lonlatjson) : ''; item.lnglat = lnglatData ? [lnglatData.longitude, lnglatData.latitude] : ''; if (lnglatData) { item.longitude = lnglatData.longitude || ''; item.latitude = lnglatData.latitude || ''; } // item.lnglat = [118.051982,24.607542] delete item.item_lonlatjson; item.idCardNo = item.item_documentid ? item.item_documentid : item.principalIdCardNo; delete item.item_documentid; delete item.principalIdCardNo; item.mobilePhone = item.item_phone ? item.item_phone : item.principalPhoneNo; delete item.item_phone; delete item.principalPhoneNo; return item; }); var enterpriseList = _this5.state.enterpriseList; var value = JSON.parse(JSON.stringify(enterpriseList)); if (value[index].attendanceList[attenIndex].personList) { value[index].attendanceList[attenIndex].personList = value[index].attendanceList[attenIndex].personList.concat(result); } else { value[index].attendanceList[attenIndex].personList = result || []; } //打点 _this5.props.addPoliceMarks(result, [index, attenIndex], 'tab2'); //1指tab _this5.setState({ enterpriseList: value }); //如果没有加载完,需要再一次加载 var _res$data3 = res.data, pageNumber = _res$data3.pageNumber, pageSize = _res$data3.pageSize, total = _res$data3.total; if (total > pageNumber * pageSize) { _this5._passAttendanceIdGetPersonList(_currpage + 1, departID); } }); } //传入的 }, { key: "switchOpenStatus", value: function switchOpenStatus(place) { var _this6 = this; if (!place) { retrun; } var enterpriseList = this.state.enterpriseList; var value = JSON.parse(JSON.stringify(enterpriseList)); if (place.length == 1) { value[place[0]].open = !value[place].open; switch (value[place[0]].open) { case false: if (value[place[0]].attendanceList && value[place[0]].attendanceList.length > 0) { value[place[0]].attendanceList.map(function (item, index) { if (item.open) { _this6.close(item, [place[0], index]); } }); } break; default: break; } } else { value[place[0]].attendanceList[place[1]].open = !value[place[0]].attendanceList[place[1]].open; switch (value[place[0]].attendanceList[place[1]].open) { case true: if (value[place[0]].attendanceList[place[1]].personList) { this.props.addPoliceMarks(value[place[0]].attendanceList[place[1]].personList, place, 'tab2'); } break; case false: var reduceData = this.props.tab2Data[place]; this.props.reducePoliceMarks(reduceData, place, 'tab2'); break; } } this.setState({ enterpriseList: value }); } }, { key: "close", value: function close(item, place) { item.open = false; var reduceData = this.props.tab2Data[place]; this.props.reducePoliceMarks(reduceData, place, 'tab2'); } //渲染部门跟保安员信息 }, { key: "_renderDepartAndPerson", value: function _renderDepartAndPerson(personList, place) { return /*#__PURE__*/_react.default.createElement("div", { style: { marginLeft: '15px' } }, /*#__PURE__*/_react.default.createElement(_PersonItem.default, { place: place, tab: "tab2", _thisGIS: this.props._thisGIS, data: personList })); } }, { key: "render", value: function render() { var _this7 = this; var enterpriseList = this.state.enterpriseList; var mapStyle = this.props.mapStyle; return /*#__PURE__*/_react.default.createElement("div", { className: _index.default[mapStyle] }, /*#__PURE__*/_react.default.createElement("div", { className: _index.default.personList, style: { maxHeight: this.state.allHeight, overflow: 'auto' } }, enterpriseList.length > 0 ? enterpriseList.map(function (list, index) { return /*#__PURE__*/_react.default.createElement("div", { key: list.id + index }, /*#__PURE__*/_react.default.createElement("div", { key: list.id + index }, /*#__PURE__*/_react.default.createElement("div", { onClick: function onClick() { if (!list.attendanceList) { //获取部门列表节点 _this7._passEnterpriseIDGetAttendanceList(1, list.id, index); } _this7.switchOpenStatus([index]); } }, /*#__PURE__*/_react.default.createElement("span", { className: _index.default.ellipsis, style: { width: '230px' } }, list.name), /*#__PURE__*/_react.default.createElement(_icon.default, { className: _index.default.icon, type: list.open ? 'up' : 'down', style: { color: mapStyle == 'dark' ? '#fff' : '' } })), list.open && /*#__PURE__*/_react.default.createElement("div", null, list.attendanceList && list.attendanceList.map(function (attendanceItem, attenIndex) { return /*#__PURE__*/_react.default.createElement("div", { key: attendanceItem.id + index }, /*#__PURE__*/_react.default.createElement("div", { className: _index.default.depart, key: attendanceItem.id, onClick: function onClick(e) { //获取驻勤点下的保安员 if (!attendanceItem.personList) { _this7._passAttendanceIdGetPersonList(1, attendanceItem.id, index, attenIndex); } _this7.switchOpenStatus([index, attenIndex]); } }, /*#__PURE__*/_react.default.createElement("span", (0, _defineProperty2.default)({ className: _index.default.ellipsis, style: { width: 240 - 15 } }, "style", { color: attendanceItem.open ? '#0E70FF' : '' }), attendanceItem.attendanceSitename), /*#__PURE__*/_react.default.createElement(_icon.default, { className: _index.default.icon, type: attendanceItem.open ? 'up' : 'down', style: { color: attendanceItem.open ? '#0E70FF' : mapStyle == 'dark' ? '#fff' : '' } })), /*#__PURE__*/_react.default.createElement("div", null, attendanceItem.open && _this7._renderDepartAndPerson(attendanceItem.personList, [index, attenIndex]))); })))); }) : /*#__PURE__*/_react.default.createElement("span", { className: _index.default.detail }, "\u6682\u65E0\u6570\u636E..."))); } }]); }(_react.PureComponent)) || _class); /***/ }), /***/ "2Hbh": /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _rule = __webpack_require__("hGxU"); var _rule2 = _interopRequireDefault(_rule); var _util = __webpack_require__("eCjd"); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var ENUM = 'enum'; /** * Validates an enumerable list. * * @param rule The validation rule. * @param value The value of the field on the source object. * @param callback The callback function. * @param source The source object being validated. * @param options The validation options. * @param options.messages The validation messages. */ function enumerable(rule, value, callback, source, options) { var errors = []; var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate) { if ((0, _util.isEmptyValue)(value) && !rule.required) { return callback(); } _rule2['default'].required(rule, value, source, errors, options); if (value) { _rule2['default'][ENUM](rule, value, source, errors, options); } } callback(errors); } exports['default'] = enumerable; /***/ }), /***/ "2OTC": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAWZJREFUOE/tk71LQmEUxp9zvVZDQ0VpCQ0lREU0RUNDWzU21R8Q0YdCWyD4wZFrX+CUqBi11NZf0FpD7YEQRArSYNZgUKF57z2hKZg21RR0tnN439/hfZ/nIfyyqHyft+JjhZK87bIr1cjzcnzSCjPD7M56dmKd1hKNaoH1SwBSPku8fTCk66WkgEQB9vKPeigS2SgyRxyGosYEMi9Aaivgcvq0+DlEpiF0AYWWQ/61WwoE43MmyVnd5uPx4e6l65unNID+2lw1cxbdYr+HSN/nTPKq2epsBhCuTcU6qxilbP1zmgEAARP/gL/3B4rtHkDVB1UZmY8culJMAuio6P6tD+QqFHBP+bXYqQgWav6o+KDc+LTIAImaEMgMiE5U42HJUOxpgfSBaL/w/OIPhzdfVxIJqy2ne0TIS0BBNVsGK4Ba+bToiGr03DEvvjMfdkmb0R70rGYaA8Yc7a2EkN3ZL4CfJPsDPl4AhEomIhkAAAAASUVORK5CYII=" /***/ }), /***/ "2WCT": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAiCAYAAAC0nUK+AAAAAXNSR0IArs4c6QAABOBJREFUSA2dVg1oHEUUfm/3ftozOZO9JOgZAtpCSS0RTFpMIbFJtFrQgtRWigUtQmlBin+0yZXCifk7FKlQ0FqwVSpUSyoaMZgmkSaFVG1SEa1F4x/RYExziTmTXPbudnxvL3uZ27v81A+SmXnve9/Mzrx5cwhLYGvrRHXcMB4FEDUowA+APoEiTP0/QMGLKiqffH44rw+RLFmAWWxQ1zRRA2C0ChCbsvllGyJ8DUI93H0k/wvZzv008aAQSm/LeBMIqGdnYa4CdRtccN9aF/jzVfCuRpiaFTAykYDLQzp0f6fDWMRgKgnhq1UBrT6ImDSYNtNFHy4EPtAS/pDax50qwN77PfBYxSpwOdLmn2cnGz0u4KMrUTh1cQZiCVbD89UN2k5rApJJ4pL74MskfCDPgxDa7YWa9W5QlQXh/qEY1J+NwN3FDiigL2Kwf0OxE+690wn9P+kQjYnS4b45xy89oR72m6ytreOb6USO8opf2ZkL6+9wsi+Fnu91CLX/C7U0IU9w9bd4yscd5nMcxxsoAnXN4Sq2m+IJQ9A+C+StsAt/enUOjl+Yhme2eEg0Bjs2roLg+Qhc+lHn+BQ4juNZh3agkR3Kg6HJCiFgCx8e77Edvdd1U/BE9zQcf9oLH1yehW33uOG9vlk71YxnHZqhujZ0Y5NiJBKUx2BmhXx4w+MGdNN2lPodcLp3Fmb1ZCpz2/ZVFCopg9jPPAscz9nFwDg+olBIHQ843WQ8d+YfaP44Qp+6Ggz6NEZd87jZ8pjt7GeeDEuHdRW6WyXs5DyWMTm9sCLL/lSVB/hPhp2X0kEoUQBFEZP5gmSDtVq7bzG7pYMgCh0gcJoOwM03z5eTOUFwR66pG2yLwLt9M8m+ZLNPyjomSNdBnVH60/hK+3KSlyPpTf6vWrdwFo27vKaxcm36PZD5rMMQCCO8LYM84FqxHFh0KWFZBwUOOgCVDhDGk1yE+LDkdGSyvLdyP9tCuNawjgkU7YrrFtFOBWeCqxsXIQsb71rYDsuWrZV5HG9WSYQx1al1mCdY23LjCBjQyLXh9T3ejBKQTdRuu/ZnDF44M2VVx+d7Ar5j5gk6HL5jVI9/4LJ59FwEmHgzYD7HcTytdtCdo73J8ancezg0tU5P6PSqQO7/ref0Kv2turGi80XfcJo4D2pbw9vQEO1U1czrenMvEcyoCLWdgYIvWYuRWnlyCECv0T7DME5Y45W1GAcVt/fUax0yP+PWdDVob1P2vCaTluvTg7TPLswxGeJsrK7UGujnQj/3lwXiya6A71Q2XlbxYA3G3S5lN+3aZLYgy0YL+Lbkdu2gNba3WcWZ9NlL+b+jgs/aA6wxZcacCs4nTu/FhZtnOefbRcXZ392gvU+ru2CLSQ4RmzoD3utZffPGJcWZ43KoB6hJWx1fOG2NFprXWLRZVrzjUN7P9LuwVVZQVWX/uV24bBnNyHNZpLy83BOLxTS4tbSo4KE3OgEdPqFP9Y61bd+vKErE6XSGBwYGki+IHDjfT384JUJZWVlRNBpdk0gkchIzo+gu3qw7PEWVkWtn66MjVyJsp4kL/X5/YnR0lF6zTCy6LXRLb5Pp4a5D5/XJX9+JfHNySLbbebJvUXH67L9koqFPxsfa97wl27hv58n+Fe05rS6XipmLWpXEEpSe+kr2/D+gmv3tdluVrAAAAABJRU5ErkJggg==" /***/ }), /***/ "2mw7": /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = login; var _config = __webpack_require__("bzuE"); var _api = __webpack_require__("H/Zg"); // preset before starting RTC // class Presetting { // // init() { // // // populate userId/roomId // // $('#userId').val('user_' + parseInt(Math.random() * 100000000)); // // $('#roomId').val(parseInt(Math.random() * 100000)); // // // const roomId = this.query('roomId'); // // const roomId = '83999'; // // const userId = this.query('userId'); // // if (roomId) { // // $('#roomId').val(roomId); // // } // // if (userId) { // // $('#userId').val(userId); // // } // // $('#main-video-btns').hide(); // // $('.mask').hide(); // // setBtnClickFuc(); // // } // // query(name) { // // const match = window.location.search.match(new RegExp('(\\?|&)' + name + '=([^&]*)(&|$)')); // // return !match ? '' : decodeURIComponent(match[2]); // // } // login(share, callback) { // let userId = $('#userId').val(); // if (share) { // userId = 'share_' + userId; // } // const config = genTestUserSig(userId); // const sdkAppId = config.sdkAppId; // const userSig = config.userSig; // const roomId = $('#roomId').val(); // callback({ // // sdkAppId, // // userId, // // userSig, // // roomId // sdkAppId: 1400246643, // userId: "user_43707228", // userSig: // "eJwtzMEKgzAQBNB-ydUia4y6Cr0Ueih4UqG9lWoSWaJVkrQUSv*9oh7nzTBf1pR1*FaWFYyHwA5rJqmenjSt-HLK3kWcQcY57gMnzWOeSbIiEgBcpKmIt8bTqBZNEFFEOeCm6jOTXTwFgQD7B-XLe95IDzc7TH2gz21QXU5j1155OdLQmUrWueZZMiBOxh3Z7w8UZDLR", // roomId: "83999", // }); // } // } function login(share, roomId, mobilePhone, cid, name, callback) { console.log(roomId); console.log(cid + name); // let userId = 'user_43707228'; // if (share) { // userId = "share_" + userId; // } // callback({ // // sdkAppId, // // userId, // // userSig, // // roomId // sdkAppId: 1400246643, // userId, // userSig: // "eJwtzV0LgjAYBeD-slvD3tycU-Ai6ULQkqiuZeDM4UdjM-ui-56pl*c5B84HndOTPQiNAuTYgFZTloXoelnKiU3FtcjvRujcdx2CMXOXmSlqrpQsULAhAA6hlOC56WUrRnUZ831MMMwqnkrq0SkQBosZef1-WF2yi2Ku1tkhebf6xbw0avcGLnHdlVVzs*jRawb*yLYh*v4Asdg1aw__" roomId: "83999", // }); if (share) { (0, _api.getTencentYspSig)({ cid: mobilePhone, name: name, isShare: "1" }).then(function (res) { callback({ sdkAppId: _config.imKey.SDKAppID, userId: "share_" + mobilePhone, userSig: res.data, roomId: roomId }); }); } else { (0, _api.getTencentYspSig)({ cid: mobilePhone, name: name }).then(function (res) { callback({ sdkAppId: _config.imKey.SDKAppID, userId: mobilePhone, userSig: res.data, roomId: roomId }); }); // callback({ // sdkAppId: imKey.sdkAppId, // userId: "user_95243385", // userSig: // "eJwtzEsLgkAUBeD-MuuI68wdGYV2vcAsSkNqE8KMdgnFV1MR-fdEXZ7vHM6Xxbtobk3DfMbnwGZDJm3KjjIa*Nma5uZJjkIoOQ1a-UirijTzHQTg6LooxqajwvQqlfI8gQJGNe*Kmt5dQAWTtZT37-szrWUY4yXRdgW5PZxksbkGd-sKeJR*nFLVWZ2E23h5XLDfHxB2Msg_", // roomId, // }); } } /***/ }), /***/ "2pqD": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; __webpack_require__("rpBe"); var _checkbox = _interopRequireDefault(__webpack_require__("hK1P")); var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); __webpack_require__("sRCI"); var _modal = _interopRequireDefault(__webpack_require__("vnWH")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); var _dva = __webpack_require__("S6G3"); __webpack_require__("bPsJ"); var _RecordVideo = _interopRequireDefault(__webpack_require__("F1Lc")); var _recordRTC = __webpack_require__("NH7q"); var _recording = _interopRequireDefault(__webpack_require__("RMDC")); var _dec, _class; /** * 视频通话页面 */ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } var confirm = _modal.default.confirm, warning = _modal.default.warning, success = _modal.default.success, error = _modal.default.error; var _TOOLS = [{ type: 'mute', icon: __webpack_require__("NCSo"), checkIcon: __webpack_require__("CE2x"), name: '静音' }, { type: 'video', icon: __webpack_require__("Z1a+"), checkIcon: __webpack_require__("5uwJ"), name: '视频' }, { type: 'add', icon: __webpack_require__("zVWh"), checkIcon: __webpack_require__("WO9G"), name: '添加' }, { type: 'record', icon: __webpack_require__("7Mgp"), checkIcon: _recording.default, name: '录制' }, { type: 'close', icon: __webpack_require__("MRHW"), checkIcon: __webpack_require__("SECW"), name: '结束' }]; var _GENRE_TOOLS = [{ type: 'mute', icon: __webpack_require__("NCSo"), checkIcon: __webpack_require__("CE2x"), name: '静音' }, { type: 'record', icon: __webpack_require__("7Mgp"), checkIcon: _recording.default, name: '录制' }, { type: 'close', icon: __webpack_require__("MRHW"), checkIcon: __webpack_require__("SECW"), name: '结束' }]; var BoxTool = exports.default = (_dec = (0, _dva.connect)(function (state) { return { ownCid: state.im.v5Data.ownCid, videoType: state.command.videoType, //0: 九宫格 1: 右侧列表 2: 顶部列表 3: 十六宫格 4: 二十五宫格 recordStatus: state.command.recordStatus, // 0:未录制 1:录制中 videoGenre: state.command.videoGenre // 功能类型 0: 视频调度(一对多) 1: 视频上拉(一对一) }; }), _dec(_class = /*#__PURE__*/function (_Component) { function BoxTool(props) { var _this; (0, _classCallCheck2.default)(this, BoxTool); _this = _callSuper(this, BoxTool, [props]); _this.onClickTool = function (type) { var _this$props = _this.props, canMic = _this$props.canMic, common = _this$props.common, switchVideoTool = _this$props.switchVideoTool, canCamera = _this$props.canCamera, addMember = _this$props.addMember, dissolutionRoomModal = _this$props.dissolutionRoomModal; switch (type) { case "mute": { if (canMic) { switchVideoTool(type); if (common.isMicOn) { common.isMicOn = false; common.muteAudio(); } else { common.isMicOn = true; common.unmuteAudio(); } } break; } case "video": { if (canCamera) { switchVideoTool(type); if (common.isCamOn) { common.isCamOn = false; common.muteVideo(); } else { common.isCamOn = true; common.unmuteVideo(); } } break; } case "share": { common.screenShareClick(); break; } case "add": { addMember(); break; } case "record": { _this.onRecordVideo('start'); break; } case "close": { dissolutionRoomModal(); } } }; _this.onRecordVideo = function (status) { // 0:未录制 1:录制中 var that = _this; if (status == 'start') { warning({ title: '录制功能为浏览器录制,录制过程中,请勿关闭当前录制的浏览器页面及注意当前网络!', okText: '我知道了', onOk: function onOk() { _modal.default.destroyAll(); (0, _recordRTC.startRecord)(function (success) { that.props.dispatch({ type: 'command/fetchRecordStatus', payload: 1 }); }, function (err) { error({ title: '浏览器无法获取录制权限,启动失败', okText: '好的' }); }); } }); } else if (status == 'end') { confirm({ title: '是否确认结束视频调度录屏?', okText: '确定', cancelText: '取消', onOk: function onOk() { _modal.default.destroyAll(); (0, _recordRTC.stopRecord)(); that.props.dispatch({ type: 'command/fetchRecordStatus', payload: 0 }); var hasE = (0, _recordRTC.hasError)(); if (hasE) { error({ title: '录制文件生成失败', okText: '好的' }); } else { success({ content: '录制结束,录制文件已下载完成!', okText: '我知道了', onOk: function onOk() { _modal.default.destroyAll(); (0, _recordRTC.downloadRecord)(); } }); } }, onCancel: function onCancel() { console.log('Cancel'); } }); } _this.props.onRecordVideo && _this.props.onRecordVideo(); }; _this.state = { isShowChange: false // 切换布局弹框是否显示 }; return _this; } (0, _inherits2.default)(BoxTool, _Component); return (0, _createClass2.default)(BoxTool, [{ key: "componentDidMount", value: function componentDidMount() {} }, { key: "onChangeVideoType", value: function onChangeVideoType(type) { console.log('onChangeVideoType', type); this.props.dispatch({ type: 'command/fetchVideoType', payload: type }); } }, { key: "onShowChange", value: function onShowChange() { this.setState({ isShowChange: this.state.isShowChange ? false : true }); } }, { key: "render", value: function render() { var _this2 = this; var _this$state = this.state, currentTime = _this$state.currentTime, isShowChange = _this$state.isShowChange; var _this$props2 = this.props, toolStatus = _this$props2.toolStatus, recordStatus = _this$props2.recordStatus, addMember = _this$props2.addMember, boxToolStyle = _this$props2.boxToolStyle, dissolutionRoomModal = _this$props2.dissolutionRoomModal, videoType = _this$props2.videoType, videoGenre = _this$props2.videoGenre; var hasVideoScheduling = videoGenre == 0 ? true : false; var tools = hasVideoScheduling ? _TOOLS : _GENRE_TOOLS; return /*#__PURE__*/_react.default.createElement("div", { className: boxToolStyle }, tools.map(function (tool, index) { if (recordStatus != 0 && tool.type == 'record') { return /*#__PURE__*/_react.default.createElement("div", { className: "tool-item", onClick: _this2.onRecordVideo.bind(_this2, 'end') }, /*#__PURE__*/_react.default.createElement("img", { src: _recording.default, alt: "" }), /*#__PURE__*/_react.default.createElement("div", { className: "name" }, "\u7ED3\u675F\u5F55\u5236")); } return /*#__PURE__*/_react.default.createElement("div", { className: "tool-item", onClick: _this2.onClickTool.bind(_this2, tool.type) }, /*#__PURE__*/_react.default.createElement("img", { src: toolStatus[tool.type] ? tool.checkIcon : tool.icon, alt: "" }), /*#__PURE__*/_react.default.createElement("div", { className: "name" }, tool.name)); }), hasVideoScheduling ? /*#__PURE__*/_react.default.createElement("div", { className: "tool-item change-abs", onClick: this.onShowChange.bind(this) }, /*#__PURE__*/_react.default.createElement("img", { src: toolStatus.close ? __webpack_require__("dToI") : __webpack_require__("dToI"), alt: "" }), /*#__PURE__*/_react.default.createElement("div", { className: "name" }, "\u5207\u6362\u5E03\u5C40"), isShowChange ? /*#__PURE__*/_react.default.createElement("div", { className: "change-content" }, /*#__PURE__*/_react.default.createElement("div", { className: "change-item", onChange: this.onChangeVideoType.bind(this, '0') }, /*#__PURE__*/_react.default.createElement("img", { className: "change-img", src: __webpack_require__("AS0P") }), /*#__PURE__*/_react.default.createElement(_checkbox.default, { checked: videoType == "0" ? true : false, key: "0" }, "\u4E5D\u5BAB\u683C")), /*#__PURE__*/_react.default.createElement("div", { className: "change-item", onChange: this.onChangeVideoType.bind(this, '3') }, /*#__PURE__*/_react.default.createElement("img", { className: "change-img", src: __webpack_require__("AS0P") }), /*#__PURE__*/_react.default.createElement(_checkbox.default, { checked: videoType == "3" ? true : false, key: "3" }, "\u5341\u516D\u5BAB\u683C")), /*#__PURE__*/_react.default.createElement("div", { className: "change-item", onChange: this.onChangeVideoType.bind(this, '4') }, /*#__PURE__*/_react.default.createElement("img", { className: "change-img", src: __webpack_require__("AS0P") }), /*#__PURE__*/_react.default.createElement(_checkbox.default, { checked: videoType == "4" ? true : false, key: "4" }, "\u4E8C\u5341\u4E94\u5BAB\u683C")), /*#__PURE__*/_react.default.createElement("div", { className: "change-item", onChange: this.onChangeVideoType.bind(this, '1') }, /*#__PURE__*/_react.default.createElement("img", { className: "change-img", src: __webpack_require__("6Jhx") }), /*#__PURE__*/_react.default.createElement(_checkbox.default, { checked: videoType == "1" ? true : false, key: "1" }, "\u53F3\u4FA7\u5217\u8868")), /*#__PURE__*/_react.default.createElement("div", { className: "change-item", onChange: this.onChangeVideoType.bind(this, '2') }, /*#__PURE__*/_react.default.createElement("img", { className: "change-img", src: __webpack_require__("K7vd") }), /*#__PURE__*/_react.default.createElement(_checkbox.default, { checked: videoType == "2" ? true : false, key: "2" }, "\u9876\u90E8\u5217\u8868"))) : null) : null, /*#__PURE__*/_react.default.createElement(_RecordVideo.default, null)); } }]); }(_react.Component)) || _class); /***/ }), /***/ "3KeC": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAVBJREFUOE+lk78vg1EUhp/3KxttOlk7iET8SCUiFrGYDRYLRouBGiQmIhKLdiER4S8gdLBKbCImdJAYFWvz1WBQ98hXbVS1Wukd733fJ+859xwBdC5bj2dsARNAOLj74+SBcydWX1N6UNHsuEJEGxh/Phs55zGqSMJOgKl/mb/FpwHAr45tcC/obQKaDwBWKTRxmQ8zFs6TljEJZGSsS7wHOhNxMzbKnmrAm3MMhdroMscF4AFZxD4lgIw+M+bqAVb8HDuRKBmgu4kSqExw4z8xzLE+wgkb8YwFJ6ZlPALbgkIAdGJQsFgrgQOuMdL+M8lIjBgFboEXHMlyDxwMSCzVKwHEoZ9iPpIo9mC8URnVTcyGCvQX2pmVsVsyZ804KCeQik2cqZ1A7JnjTOII6CiJ7pyxJr6+UR5xjM1KwK9BahS74r04SK2NcsvL1Oo6fwK895SBLNxs+QAAAABJRU5ErkJggg==" /***/ }), /***/ "3MA9": /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _rule = __webpack_require__("hGxU"); var _rule2 = _interopRequireDefault(_rule); var _util = __webpack_require__("eCjd"); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } /** * Validates an object. * * @param rule The validation rule. * @param value The value of the field on the source object. * @param callback The callback function. * @param source The source object being validated. * @param options The validation options. * @param options.messages The validation messages. */ function object(rule, value, callback, source, options) { var errors = []; var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate) { if ((0, _util.isEmptyValue)(value) && !rule.required) { return callback(); } _rule2['default'].required(rule, value, source, errors, options); if (value !== undefined) { _rule2['default'].type(rule, value, source, errors, options); } } callback(errors); } exports['default'] = object; /***/ }), /***/ "3Mtx": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = _default; var _reactDom = _interopRequireDefault(__webpack_require__("O27J")); var _events = _interopRequireDefault(__webpack_require__("TLe5")); var _recordHistory = __webpack_require__("eXDv"); /** * 定义公司信息信息窗体 * @param type:用于一张图 */ // 引入 EventEmitter function _default(data) { var _this = this; var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''; var marker = arguments.length > 2 ? arguments[2] : undefined; var _this$props = this.props, mapStyle = _this$props.mapStyle, backStepInfo = _this$props.backStepInfo, securityResourceData = _this$props.securityResourceData; var name = data.name, companyName = data.companyName, componeyLogo = data.componeyLogo, mobilePhone = data.mobilePhone; var content = []; var imgHeader = []; if (componeyLogo) { imgHeader.push(""); } else { imgHeader.push("" + companyName.substring(companyName.length - 2, companyName.length) + ""); } content.push("
公司名称:" + "" + companyName + "" + "
法人/负责人:" + "" + (name ? name : '') + "" + "
联系电话:" + "" + (mobilePhone ? mobilePhone : '') + "" + "
"); content.join("
"); var infoDiv = document.createElement("div"); infoDiv.className = mapStyle; var info = document.createElement("div"); info.className = "content-window-card-componey"; infoDiv.appendChild(info); //可以通过下面的方式修改自定义窗体的宽高 // info.style.width = "400px"; // 定义内容 var middle = document.createElement("div"); middle.className = "info-middle"; middle.innerHTML = content; info.appendChild(middle); //定义关闭按钮 // var detail = document.createElement("div"); // detail.className = "close-div"; // var a = document.createElement("a"); // a.innerHTML = "x"; // a.onclick = () => { // // this.state.map.clearInfoWindow(); // //因为police的图层的打点跟列表的选中,没有做更多处理,直接传选中点的信息在这更改,避免需要在生命周期中监听修改的麻烦 // if (type == 'police') { // this.clear('setPoliceSelectIndex') // marker.setContent( // '
' + // marker.w.indexText + // "
" // ); // } else { // this.clear('setPersonSelectIndex') // } // }; // detail.appendChild(a); // info.appendChild(detail); //定义2个信息弹框按钮 var top = document.createElement("div"); top.className = "info-button"; var button21 = document.createElement("span"); button21.className = "button"; button21.innerHTML = "驻勤点信息"; button21.onclick = function () { (0, _recordHistory.recordAdd)({ from: 'CreateComponeyInfoWindow', to: 'ComponeyInfo', fromData: data, toID: 'attendancePoints' }); _this.props.dispatch({ type: 'command/clearInfoWindow', payload: false }); _events.default.emit('initRightDataModule'); var datas = JSON.parse(JSON.stringify(data)); datas.clickType = 'attendancePoints'; _this.props.dispatch({ type: 'command/setSelectComponeyInfo', payload: datas }); _this.props.dispatch({ type: "command/setMapLayerSwitchState", payload: { type: 'searchViews', value: false } }); }; var button22 = document.createElement("span"); button22.className = "button"; button22.innerHTML = "人员信息"; button22.onclick = function () { (0, _recordHistory.recordAdd)({ from: 'CreateComponeyInfoWindow', to: 'AttendInfo', fromData: data, toID: 'personnel' }); _this.props.dispatch({ type: 'command/clearInfoWindow', payload: false }); _events.default.emit('initRightDataModule'); var datas = JSON.parse(JSON.stringify(data)); console.log('人员信息', datas); datas.clickType = 'personnel'; _this.props.dispatch({ type: 'command/setSelectComponeyInfo', payload: datas }); _this.props.dispatch({ type: "command/setMapLayerSwitchState", payload: { type: 'searchViews', value: false } }); }; // 定义返回按钮 if (_recordHistory.recordHistory.length > 0) { var backBtn = document.createElement("span"); backBtn.className = "back-btn"; backBtn.innerHTML = "返回"; backBtn.onclick = function () { _events.default.emit('addPictueMarks', { data: { data: [] }, type: 'securityResource' }); _this.props.dispatch({ type: 'command/setSelectComponyList', payload: [] }); _this.props.dispatch({ type: 'command/setSelectComponeyInfo', payload: {} }); _this.props.dispatch({ type: 'command/setSelectAttendInfo', payload: {} }); (0, _recordHistory.recordBack)({ from: 'ComponeyInfo', callback: function callback(result) { switch (result.from) { case "CreateTrajectoryInfoWindow": (0, _recordHistory.recordBack)({ from: result.from, callback: function callback(result) { var data = JSON.parse(JSON.stringify(result)); (0, _recordHistory.recordRemove)({ from: result.from, toID: result.toID }); (0, _recordHistory.recordTo)(data, that); } }); break; case "CreateAttendPointInfoWindow": var _data = JSON.parse(JSON.stringify(result)); (0, _recordHistory.recordRemove)({ from: result.from, toID: result.toID }); (0, _recordHistory.recordTo)(_data, that); break; case "CreateComponeyInfoWindow": (0, _recordHistory.recordBack)({ from: result.from, callback: function callback(result) { var data = JSON.parse(JSON.stringify(result)); (0, _recordHistory.recordRemove)({ from: result.from, toID: result.toID }); (0, _recordHistory.recordTo)(data, that); } }); break; } } }); }; info.appendChild(backBtn); } top.appendChild(button21); top.appendChild(button22); info.appendChild(top); // 定义底部内容 var bottom = document.createElement("div"); bottom.className = "info-bottom"; bottom.style.position = "relative"; bottom.style.top = "19px"; bottom.style.margin = "0 auto"; // var sharp = document.createElement("img"); // sharp.src = "https://webapi.amap.com/images/sharp.png"; var sharp = document.createElement("div"); sharp.className = "sharp"; bottom.appendChild(sharp); info.appendChild(bottom); return infoDiv; } /***/ }), /***/ "3PpN": /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _rule = __webpack_require__("hGxU"); var _rule2 = _interopRequireDefault(_rule); var _util = __webpack_require__("eCjd"); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } /** * Performs validation for string types. * * @param rule The validation rule. * @param value The value of the field on the source object. * @param callback The callback function. * @param source The source object being validated. * @param options The validation options. * @param options.messages The validation messages. */ function string(rule, value, callback, source, options) { var errors = []; var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate) { if ((0, _util.isEmptyValue)(value, 'string') && !rule.required) { return callback(); } _rule2['default'].required(rule, value, source, errors, options, 'string'); if (!(0, _util.isEmptyValue)(value, 'string')) { _rule2['default'].type(rule, value, source, errors, options); _rule2['default'].range(rule, value, source, errors, options); _rule2['default'].pattern(rule, value, source, errors, options); if (rule.whitespace === true) { _rule2['default'].whitespace(rule, value, source, errors, options); } } } callback(errors); } exports['default'] = string; /***/ }), /***/ "3SWf": /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__.p + "static/beijing.6f399ee5.jpg"; /***/ }), /***/ "3X+C": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = _default; __webpack_require__("sRCI"); var _modal = _interopRequireDefault(__webpack_require__("vnWH")); //定义事件列表的信息窗体 var confirm = _modal.default.confirm; function _default(data) { var _this = this; var name = data.name, time = data.time, describe = data.describe; var content = []; content.push("
" + name + "
" + describe + "
"); content.join("
"); var info = document.createElement("div"); info.className = "content-window-card"; //可以通过下面的方式修改自定义窗体的宽高 info.style.width = "200px"; // 定义内容 var middle = document.createElement("div"); middle.className = "info-middle"; middle.innerHTML = content; info.appendChild(middle); //定义详情 var detail = document.createElement("div"); detail.className = "detail-div"; info.appendChild(detail); //定义关闭按钮 var detail = document.createElement("div"); detail.className = "close-div"; var a = document.createElement("a"); a.innerHTML = "x"; // a.style.marginLeft = '95px'; a.onclick = function () { // this.state.map.clearInfoWindow(); _this.clear('setEventSelectIndex'); }; detail.appendChild(a); info.appendChild(detail); var top = document.createElement("div"); top.className = "info-button"; info.appendChild(top); // 定义底部内容 var bottom = document.createElement("div"); bottom.className = "info-bottom"; bottom.style.position = "relative"; bottom.style.top = "-1px"; bottom.style.margin = "0 auto"; var sharp = document.createElement("img"); sharp.src = "https://webapi.amap.com/images/sharp.png"; bottom.appendChild(sharp); info.appendChild(bottom); return info; } /***/ }), /***/ "3Ykx": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAAAXNSR0IArs4c6QAAGUVJREFUeAHtXX2MbVdVX3ufr3vn63VemcLDfrxAKTAVQSogBMMrUE3ERKM+o0Yg0igKUWMQE6JxmECjyF8QSaghGqLwh6+IiRD5iHXUpirwCJS+EZ4FKi0Z2oH3+mbuzL3nY+/t77f3PTPnztyZNx933iuV89I5556Pfdb6nbXXXmvttXaVXKXNOaeGvXp+fn7o+freubk5Vx8390qpoeeb9xzF8a7EjvKFTcA2QZrzrzg3e6ZPx+mBVy4vLvjzM7OntoBzxt936+Lp/vl5/7sJ7pUC9EgBrEEbDthpCQCdkltOnO3TcZtcXFrsH88OgCmy6H9Pn5gFaGf98fml23C8IAHgM7IToEcJ5sgBrEEjhwG4OQkSNgjYxaU23j0rneMPqe6F2NMxMxX2fLa3Eg3Q1poyG1K4vFL54/bxyk1cuBnHizJ9ouuGAzovRymZMYkdxVYD15S2c7OzHoTlxdMqSNl1ioCdX7pWEazeypIy+aRKx0WKMa3yjlJlVwfgjg9S1bkQfidt62TGuXTdOpMDaFlyrakpgDfm2scfAqDXuemLZ/H7tDvnhXgWH5LP+j8COn1Do5LKQGyg7UB/a+D4cFPilhdn0Da7p6iLS6KW5WEdQItUPq5Vy0a6bGtVriuVuVVd5QBuakqqnlKm6KjJiYkBelY7HYnSCRe3gMDKisSZdbmatMmYc0nXup42NluzANM4SuiMnLTTJwRAChBjN192oYuPViIPBWANXhM4EXZVgcSJeiR/SLN7Tkqma9DW3YqeyI6rrtM6X1nT7VSpAsdZAuBKpWwsfk/0bNLz9Omy5cUmSpzTlTju8xJSqKztFs5lU+O2jeNOfsGNqSlbg7kquWU3vyG72RLImVmCWevKTSAPI40HBnA7eJCyPnC1xBG4VYl1WyLdlRWd4TidOKZzt65VEUWlUzqWXNu4rWIX9rYSZaNcJUYN0FZGAM9kDg8AxK6rVGb9XjKbKGddakymxmzRuWRzqWxbpmxXjJ3EMYFsSiSBvHWRYB4exH3rwO3AzQK4BXXLxUkw3IZ+G/NdNTVtXa0l0TXHtF7trkVtaWkVR9Far4h0bKNYZ1qqInKSaFMaLWmiXWmU1aKSMlEmKtBe2u/GhcRl6srIOFeKsxBBUxirJLECkFQE9Exp16rCtMYy065iU0jXXtMeN/mlyKbj2kj0KGhj11630xe7bkFWIZGzrtaP4Mu/a7/SOPCV+9TuuNsO3hmAN4Puemqju6bj7Yj6baXbiaI0iaIkjihtOtZRHulIukWssFf4p6sqquL2WGSLFxtRt8IUPimibgIr1ypx47C1x0gMbOR1J2oNxH5PxP0vTPCHI3HnjE6/GFfddRvHxvl/1kg7rTJjja2soVSasjKmKM1Ue8KwaxdrXbPZrRcA4nbduB8Q9wzgdvBCl52RRd05Pqsmqkf18koWxa3VKOqlkU7jyLo4JnDOFrGTKEYnjEut2BlnIH4/o5x6NUD6YYCS7PjVdr2goDXdg065e63En4AGXU4wOGNfKTGV0mlFILWqKlsAyFZhqt6kmZnKTSe+3k5cWHTLMmsP06X3BOBu4C3LmKauU+0kClJ3LYSjC7CiWFpRnJQlVT81V2yUexnweCN6y8sB2r7Vx65YiqqgNf8D93w4cuq/oEnx21ZlkpTSA5jKQLu2K1N8z0uj65Ym6MZ1exgQLwvgzuCJpmnCLhtB1+msA4lLY0odAbPovIbka5NUKnk5uudbnLgX7Q7CaK4qUV9yWj4Q2/I/SxuV/IwanZmAUhoxglU2nzBmvDTs0hxgljHoH0QS9wTgppkiCkaqvrh0m7frPHhZEtkL67EbT2Jo99iAWkpd5Uyqo/aJqjJvhz77qdFAs79WoDc/HcfRe63pLkHxFpTGCF9VaUjkWlnp42OVyTdBnD5x1l2cvs02R+jL6cNdAaT0NcGjmTIjDckjeFUMPd5DN40gelVqIHmRi9JK21Ni1Z+iqw5axPvDYAR3q45o947Y6gUDEz3isKLigl06brdKHeMTN0AcJom7gah3orDuuiLBlw3gLW522wZ4aRwnOjIZxokMRkarUu5OZdX7rj545M5NkBbSRNpII2klzfzwFIAIvLA3eW8JgyJ5Df77nIdnE4vtaA2VwPoBSh/9WZoqM3IdwBsLOm8LeNAzqYb0QQgnbGXeCV33uu2vuvpnoBs/qePonRC+joUUQj8XRVWV2yWRA8vj0Ik0cRZdHYwYJok7Alh33QVZ0MHOEx1fWIoqyWIr63GVpAm/IsETXWWu554Bm/h9AP8FVx+qnSkACF+R0v6eaqnviI3zDRDLotQyVsEzqqrjJ8wNmcD9W3Cn5BSM9eCxDANwmylRS1/ouvBp4WHQp52oWjpvtyJtO5GJM3heUVzaCpIHc9XKxFGB94svbcEBFLn5GbG86KZEJltKvv64kbf89aWdUdrlCj+w4oe27s7IVa6E7Q397TAIwkXswLkcc7Bp3SOI89xyYtKem4aFvzjn3RRisxXEoTowdF16GYyktGEkt7yRTDuPpgpHWw4YGoOF0hG+lZojYbvQfeBLP/+SlvzGq8fl9tlMpse1wK+RG2FqHmbztIJm0k4eyAt5Im/kkQ4BeSbvtT4MPXL7WwckkAiHW4LyDBGVWcTsHtP0MJydAYC5N1VUJInAVIHd/+tQ1FdU560XXiC2c7OPM9TTpbEPwWP5K4nAFvDzkZ70Wqv0srtkxl10fNbekkGIpJ46AKdbpHCbBA5Kn3gXjb4t3bPgYWjvXdBUgRd/Coj/zj7o3vetDz1m5PEVI6tdK596oCcf/0JX/unLvX23M+wB0k4eyMumx9SNySt5pnvqI0v9UXmYFG5IYFP6fHQF8bzzS/A0EFUpINbttAUJxGeCnedckTodPRPmwV34kts+wjBiD3ruG49X8if3rB708V2fI+3wx++qtPsF5cyjiOrAk3YWfrxFV7apbttCHna3nDjpzi/CApbtunCA+Vr6GEnmwEEfl24aoyp00ejb0j2LdQvd173tSth5raSvVXaF4jAXYeiDF/JE3sgjefWRJPBODIgFMaFtuFUKNyQwkLCp+87D+RGMf4znwWbH6KsjL+baJsZFL0M48icPQ/blnuXI+5Y7xuVnb2vJeKbk/Z9ek9Jc7qkDXgcviDR+DCbN/ap0BraiQfwtytraPHEJlFyIrZ+aaOjC+k0bwxmGZ31udhmjzq1Kw/lB4C7COBF13TqaSxBuilJEUVIEPDEboe5CA8+oGxn1fmZSy5/98qS88rmZb/o5MGF+/DmpnP1mKZ3e4QeQYfSi1RtFyz8qpxGojaxUYnuIfLcwTrbR1arOpFuGn7c2e0YW77lHFhYWPCH4zmFkCY2e9nO0dGk4h8EwfIpwvI/pSelDUpDKl0DkXziMiFGce/HJRO6+85g8/4cGQ4Q3Pz2WD77pmLzs2YPnR/FO3wZ4ci5+KcNuDrySZ/JODIgFMQkzi2Hyvx4zPICBiDk/0U3bh7NnHIU4h8EwPCPJPkSlK8Qr3RtGRvSWhn71FW15z69MyrGxBlmNeyZaWv7o5ybkmdPDrzduPdAhBpXXw5bBIKlj8kzeiQGxICbBLmS2RFB1fMkGJcF5PoWJ7hTztZHi7BkngHpFCMMzkmwlmoHuY1B0pBt13LtOT8qdp8ZED84lbXvPOKZS/uKNx+RHT25R39vuPMAJ8EYeySunHsg7MSAWxITY1INJ3brXgdR/yzMz6vq4px9bntAynurxdDLq2R4mGatUVJw6hUkvpyG/7hX1w6PYP/2Ylve/4ZjMbumybJv2H/UeQW1KJUfm19yagUcni9+uRkFG3QYESn0PPD+gETTUUWmtqgywsCs59GDXwKT5uuu1L7paD8KVrb2P08hL2ey+nLflZFDsMPvNKSANSRS5vX7TqPZvfx275MZYttHs2W8W8sYPPiHzf9+RN/3lE/KpLcZzhHn4337tuLzqefXM3cajhz24nbySZ887MCAWU23lVRsx4tw3N2LX78JB/zFXhaLKjAFOenPetsDUI2fPtM3G0H23Zvwcllh5wQ3Du+JH7+9K0RcuJHPIh/+9O/Rdr3r+iAEEj+SVPJN3YuCxACYhX2e2nxQV9OCGDmTfZt4KRxymWzBjgJPekUCWBXEDTD0C85EPgQwODNswfA2cBj0Dv+sf1J+j3VxCXskzeScGxIKYEBtiRKzqzQPIAYRDdJ0lxVwVplswYwBTWRpTkBod/fn1Q1di/+bXjAntQW4E6a13+CniK/FqIa/kmbwTA596Akz4cmJErMKgC6Nuk6LbcPiwz5JSy1plY5jDMrnPGDAKo3WpboIEbt5+xEfPui6Wj7z1Gvn2BSvXYaA5epeuwZBVN5kEwS5039jmWieRqpiNMoVuscb7iNU3/AMNAEVo6zDFLEeWlOkWyqVtxXQLOMIYkmCpXzn8PHEcKG582vYBxl88yj94bVQIvFcIUQIMitJnjk11CpUBo+ardXCOOQKHzFDm5zHFjFlSPtEHuSo2onHmrm0+OIpjUlJu5k0eqMmnoZtvUZcHamfwIXcteWaejseAxhwwqXMXA1anfTrfgATWjTA/z8XQ2imypJDoU8UIZRvVhqVe37Ln/QRC8L95+5j8yI0JosmDj7Vhz6F3DJ7c56+TM7F8/PenvU3YfJSBhwe+Vcrd967LSnd/dGPyqe2g9ZERoKokV1JEALIDQoNv3nxPA0CaMEtKkBk6WUwIsqiEKWYGQ5HDPDQG4ANp8T/46XH5iedtf3GTiMMe08WbaG1vhfYlr819bHX7xV3OIGgyRp4xX+bT7Ercy4TPKkWWyIVItRrWXBjmhjRWJzfyEmRnyB17O/XSZ4/YTtvbazfuesmzDmZ5NXluYrHRcP9gRwC33ggtuL713F5+I/N0L7cd2T0Hef9+eN0RwDqtlpyVCI5B/w13BY6M9avXMHklz/XWxKI+V+8bAC6KLyVANjwTurmFtFrYlfAK8befJ18/+hTeg1fyDBcMWbHQiNg8JkAglFuEmhWebwDIn2FjNrxP6EZOMhtQFvAp+VZ9/am+J6/kuc7LJhbEZBjfOuR9nEGhCiuAMGCgDoOlBJwj9WmRaEhjwgAW0RUH8OuPVXLf1wpZeuKoJkOGQYJz4JU8a/Luk9qRDQpMfI0KLgeszvgCnoHh1VcAoYglW16RaCxzFnMCPqE7FgtX5KsHsQN3IHHX0wbhl7v+oSP/+tVi4z6meDB8dSU2eK5fNam1jPWxEgCunDOoTVmZyZwsV266QUajC5/1tLECyBexoA6DpQSmAIYlMkm0/hI+DU2iI98+/oXeAHh84T2f68m951CadOQb5uXAK3km78SANSnEhNiE1weseOwBZAUP68yYvc6TrABiEQvRhwRbJHBbVeZd6Ib/5vWj3r6IKPSw7f7/2ZTIYddHcY48klfyTN6JAbEgJmyfGBGrurCxIYELwsI9lkuxfIoVQEhlY+6SjaRg7gi8VvdvoyDycm2s5UP1tVxc8zxc7vFDXSeP5JU8k3diQCyICbEJxY0LG+/oAzjfLxkNpgxrz1g+xQqgNEb2GuswoAYwNfJpdON9afTqkMGCDUoPeLC/98PjB4/klTyTd2LgsQAmtQkTymvnPUUI2NSV3hyJu75QjwUprD1joUql8CSLWKxFlUL5XYj45/bDy1ce2TRI9/pcrxwugXDP97098K29v5+8kUfySp4978CAWBATDrLEiPV23Iidl8A6hbXWgxRVFu6x9gw5lGgK0ixxhaEE4QX10f1w8eef6GBmrdhT2Iqj7z8/mAszsoZtX1uqZGExR3HXcICbzzBMxve+95PBKWhe2+mYvJFHz6uvdkp9/Z3HApjU+o/P15h5R5WzS/PzopjOy1xolJ1GedmKcyRhw5xJezrJ4sK0rbL4D2Vvxt2NNlBh9JTaHpRIvVk709VOd6s06rZsmZv1vMiQzZ8lvQpltoa506eQ9js3R+eiL4EBhqAHm92YVY8OFVKsPUN4EZULcalQ7ofckQ89paADM4gBfoi8eR7BK3km78Sg2X2b+o8Y+C5MJAMgZ4TdmJU77MYsGS3QYVhvhtAnC1ERGLQV8gM/jzfeG555CvwFL7A5Pk/eAo+Jr7Ej78SAWBATYtPUf+R8I9ZUd+Nzs6xGEn1+CQWRMh5fcyyJ16s8jWwC29y0oGBbLkYCp8TXizF/CyevYZd//4GJgWMNKb6/hlm4R5GE0MMcZA/z6j2jy2IszoonLpUYhdYqJFmai9Piq5jq7ktu+2ZMzTiHZkqheIXJYuX8EmBDySilkKVSrD3TDl25zL+D6b93QfSP3jiryRvxnrR7HsALeSJv5JG8kmfyTgzC4MH5DI6+wXypSRmQQJ6sBxPWhlAKWcGDgrwEKb5JDinUqPSBmQ3XOkbVj26JUa9Hnd5v1Q1+f+31ByVyf4OeiikjThu1e9ZUeQbp6xa9EryXLEak9NU1I5Q+8lirvQ0JrE8QYVboUArZ748hwYbFyqy3ZX0Zqx5ZuBdLxKkW5m59BK195vsLOI/AZ0g7eSAv5ClUdBpfW0yeyXvQfVxvYRnABenbxKqhAwkA9SD3lMJaFz6Si0aZQ2zNGupDZlAfkqdlhim7ovJ1cYiUtZDwMamNej+eH3nuDOkZ9QYAFm3kfhehkVUIRQ8JCD2UiORJXhUIHhTIVat0NF5F2dMrViw1dR9paQK4IYGDF4h00IWs6uaXYKU3i5VZb8uSUVY9IoGpQEU/LNuqg9nZd5AwtvNk3kgjaSXNpJ08eF7AE3kjj+SVPJN39sSm7muCRz43dGDN9HYpPIss9WOh1AvGtbHrcRlnSZWHCk1W+jhUQSLFMENy8SRCN3+Itu6o23uS7T+L8NJ7EiMd0JyD5p5FCaw1UR5nSNGv8jLSYxWN5k7cszdklyB9oX54q+6r+RqQQJ7cRHgea1Fx4ZpVv+4K1xhgmTwrvVmsTH2Y6Lhg1aOLsZIJCILluYr87HcjfH33k2l09qMtaCJtlDzSSppDxWaoHSZP5I08ktew1szqxvIog9jU8A2RQF7alMK9l7uyYpMVPxj9MyRow2aUV2I2/o/R1lW1EyEQa/ig70aK2X0wT7zKQai0D94RlbsOghiKj7n+FVfo2LlmOBQfIvKQEkDjNIsRT8CNeSvau51tXoXtX1Bi8AF00yWOtgSQOo/dlr1n51phruRxxgdNd+q6NS/bunB9YbArn/bLJvnVLWDa0DZimTzL5VmsTEKoR9A9co5oqop6tK3E9L6NbvNOtPU2CPuDddtHv1cP+nfi3Z4G2nmkCbSRRtI6HDwuPlEvg8ICQw6mTbW2nfJtg8jWW9idQwYXS//3t+gEy6e4+IQzBst6aCwzpOFMul9CHOPHoCi2pBptffN+fyPQq9wXoO/+Tos9Cw++VFhdivYdwgF+f8UXnSALTX1YF2GzhnYGbiCLT/zKHZdZ9sQCPIeCd8R/kKhiUJ4bzSB+8VqMWK+EkfBcvOVgCSyc5FLyNRB5HyzYzyKf9LuoqMLyCIwYMXpkvXt2VZc92R3EoBP3uvCOL2IBkIp1GE7FSIGNUEswpm31QkjnLegON0Dgr4ckTaOKEul0giorP9J1sTpRF89cBPCP4vwjkLLzVsdfjqxZR+UopS8EfD1wMYB9kiy8Qwa47SyJ+1/6SaQCiCglQPIrrKHIwqQkmIiPK6TlIaE92KcoRvUqBi4/MAOQGrM8mKNg1gBB01C9frILcxgMwzOSfKWXftpxECHBza0eVEIoO9iIHKkYoaW7Q8OTYR+6QIzg0hmvVF4wLOSwuANDRIzyqrLqIXcWUV/VxaIzkKx0HZ7AuovVGpJC/SJj9TEycuA/SjiP6zBHNo79M3wWbbAttsm2+Q6+i+/ku0kDaSFNpI00BiNZ+itzcLSlt3GwpfAuO4g0QeTxdkmsV3CbDLVkWBqFudaXDJaSgW7M+svfsXCPtWcsn4IF4YtYWIfBUgJmw3P1Bb9sGJe/Y/x7y/J3GmORz1WB9HH5Mk56c96WU4+cPeMEEOdvWmmIJDMYOumXv4NoYoknumZhZUssf+fXW+Xyd4dbuY14DKR28MTltloSAaS/dX6e7u+c4+oWy1jqE3W1jmXyrPSeFOtYb9uWNhZDxAKMRWzG/QKMKJsoKmDHNHLUonABRmTDM6GbdRVMq03gdaOr98lBkUBSOqyXgzQL5KtAcCWB58g9q29h4MHqNO04HViA8Ymi9PG87lqO3nGSNb/Bt50Wd4o+7iKljtI31/DALofA4PV9S2Dz8WHS+IMlQJsI7eG4BpG3btqLoVuL/GAR2j1AGG6pgQwg8lxz/Wh27bNeR7JklNU+1JOsPWP5FO/mMshTuyyDLI1lkFcmwjLIfI4TPvXKvQy9T1wo/OS3nxzbsugs79+Yz92YSOPZg2/71oE7vWqrbuR9QT8KF2sQrr2yvLSg5EJYuZxVj8x2r7L+QtyoAGIRS9Y3qZkN33xXSKvon0GKGZMUCFhr7WYsi7yISvuwEHdXFpDAd8rNTNer9S5u6Dk+XdPJ41FsA0SOosFmG8OkktdDndngyubhuR8sBd/Eb+C4BpMnm92cvwOgPAp1uDzi9v/+f0YQYBj+twlo845NcJtnN49rHbZ5JhyNumtubX+n3/8H/OPEf+P6TgAAAAAASUVORK5CYII=" /***/ }), /***/ "3opF": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAlElEQVQ4T+3TsQ2BcRDG4ecWMIBSYQGNWswgNjCDCpUZbCASG4haYwGFUs8CJ/8vtD58nbjy7t7fXS73BmRmF0sM0Sq5F3HDDtOIOMVDfEBgg0sNoI1RmYt+AWwxQC8izjXiqpyZHRyxL4Ar1hExeUf87MnMFcYFUFaZR8TiQ8Cs0v0Bv3KDxo/U+JWLE783U1M73wG2Poln/AALOQAAAABJRU5ErkJggg==" /***/ }), /***/ "3s2R": /***/ (function(module, exports) { // removed by extract-text-webpack-plugin /***/ }), /***/ "3yYd": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAiCAYAAAC0nUK+AAAAAXNSR0IArs4c6QAABIJJREFUSA2lVl9om1UUP+d+SdS50pp/ixkOUXDtOsugdbBJ0nVDULD6IgwfnA/CmCjTJ+3wpYKFiT5MX/yzqaDsQaci64MwoWvqg7iu3dA23YMKMi3N0nZtx2KSL9+9nvOlN73fl2RmeCA59/z5/e7J+e49XxBuIde70mmpYFCCGgDEJIKKKMBlVPAXAmQEwtmObOZHRPI0EMqpl3x3/wBKdVwptbs+6vUg4KSy8PXYbOa8NwLgIVfDw2Lpq7ERJdUQJ4pEHO4YfAxC/XvAui8J2NEOamUVnKvzUM78BKXRH0AuXHM5BYp3wgcHhnB4WPo3AaoSFztTZ/KdKZV/eL+6eeq0kqUSuZsLxzmP8xm32JX+hgusI8/vSL3pJuwdVOVLM80ZG0Q4f5Fw6xu85SFf2pneS1VLruB2ifVejGM88yzv6E/xBu5PUBU1Qo8bN73yAgR3dXs2Ln33PdDPhdXnj7p+1myz3xTGMZ55HKXc6kV+574+cuzjh3fXc8+Y+e7avnDZ1dbWez1a+00A45mHHmB6sTu1W4B0BjmBTwWGQmauu7YvXKr6HAfsSdqINEvNX42634xnHhYlxZNEDgfY4OPmFzm/AM7fC667ePYcrB46CqxZ2M9xv2geVOqAoNu1jRP4HPvFrK791LsQnZsA1lrMuPYZPNuEUkBNoqdAF8QvZl9FYosb1poNM66xmoeeY4wqVzc5wDfPL2ZlIhFzw1qzYcY1VvMwb4BqzhF1mK+0iEd1jttP3W92LvU9Xovphe67SCa0yx0NVQPnBR3MaTZ4VphiVhXo3g7tn79f+7Ctxcxjn8EzLZQA9zbwEFLlssZ4+hl46AEIPrKr9mFbi9l3xjMPCwoxKkTb3aOIcJ2n2z9ffK0xnn6KrRs/mxNM26yc8etTMh+2QtUrTNf5DT0N/+9sYZ6lrtSrbhH8FQneeYLO+xzYNqy9dAzsy7Psblk4n3GMpzfWdPj+zR8wuPayyPcMbMdyZZLOZxsEg+4Q4lnRaCToXbnH3IrCe59UiQGuiQD2RWYmrnrI2aBR+YSUalSBsti+nTcRlVlADOyPZs//zFiWWuVVEyDf2X8YQH6k7VY0tbRCt/GpcDZTfYjroLpXUuxK5mMBuDFAWmAn8sN+YobVkbMznBDHCOC9VRxoJAgnI9nMZ41CDclxfLxiQeBZ2mClEcjw/RLdYlVfUYZTLxuSc/CeubE/FcLLOrFeYwmD1kEqpFgfq3qaknM4lp04TdVX77OPQaAaif46fsXn9pi3JOfMgBV4kQ6VpzracC4sEm97mBoY/0neMTP2OyUdN7F0CY7g7JmNKWcGjXXdOTdi0Nvbu8m27XCXDfETqv0cDf/IGsqJp63VI0KIG8FgcHlqaqpgYsy1exNNh1739PTEi8Xig47jbM6Bg4+qUDmO1p4vsTB0UZZusJ82jiWTSSeXy7lvM43VumlbpJSeOfuaXPv2D+V8elIVftNg1v48M9aUnH6253/DiiUrh3D5QxPMa3+eGW+p51RdG/0nDJG2iMyh01Jupef/AkW4w065ij3MAAAAAElFTkSuQmCC" /***/ }), /***/ "487x": /***/ (function(module, exports) { module.exports = "data:image/png;base64,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" /***/ }), /***/ "4GKM": /***/ (function(module, exports) { module.exports = "data:image/png;base64,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" /***/ }), /***/ "4LST": /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _rule = __webpack_require__("hGxU"); var _rule2 = _interopRequireDefault(_rule); var _util = __webpack_require__("eCjd"); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } /** * Validates a number is a floating point number. * * @param rule The validation rule. * @param value The value of the field on the source object. * @param callback The callback function. * @param source The source object being validated. * @param options The validation options. * @param options.messages The validation messages. */ function floatFn(rule, value, callback, source, options) { var errors = []; var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate) { if ((0, _util.isEmptyValue)(value) && !rule.required) { return callback(); } _rule2['default'].required(rule, value, source, errors, options); if (value !== undefined) { _rule2['default'].type(rule, value, source, errors, options); _rule2['default'].range(rule, value, source, errors, options); } } callback(errors); } exports['default'] = floatFn; /***/ }), /***/ "4caS": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = _default; __webpack_require__("sRCI"); var _modal = _interopRequireDefault(__webpack_require__("vnWH")); /** * 定义个人的信息窗体 * @param type:用于基础图层与一张图的图层区分(两者除了展示的字段不一样,其余功能都一样)'police'是警保联动 */ var confirm = _modal.default.confirm; function _default(data) { var _this = this; var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''; var marker = arguments.length > 2 ? arguments[2] : undefined; var address = data.address, name = data.name, phone = data.phone, latitude = data.latitude, longitude = data.longitude; var that = this; var content = []; content.push("
" + name + "
联系地址:" + address + "
联系电话:" + phone + "
"); content.join("
"); var info = document.createElement("div"); info.className = "content-window-card-address"; //可以通过下面的方式修改自定义窗体的宽高 // info.style.width = "400px"; // 定义内容 var middle = document.createElement("div"); middle.className = "info-middle"; middle.innerHTML = content; info.appendChild(middle); //定义详情 var detail = document.createElement("div"); detail.className = "detail-div"; info.appendChild(detail); //定义关闭按钮 var detail = document.createElement("div"); detail.className = "close-div"; var a = document.createElement("a"); a.innerHTML = "x"; a.onclick = function () { // this.state.map.clearInfoWindow(); _this.clear('setPersonSelectIndex'); }; detail.appendChild(a); info.appendChild(detail); var top = document.createElement("div"); top.className = "info-button"; var button1 = document.createElement("span"); button1.className = "button"; button1.innerHTML = "周边搜索"; button1.onclick = function () { _this.clear('setPersonSelectIndex'); // this.character(data); that.setState({ searchAround: { show: true, type: 'aPicture', lnglat: { latitude: latitude, longitude: longitude } } }); }; top.appendChild(button1); info.appendChild(top); return info; } /***/ }), /***/ "4iE9": /***/ (function(module, exports) { // removed by extract-text-webpack-plugin /***/ }), /***/ "4r4O": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAdVJREFUOE99kj1o1GAYx///N6nfpYgeUgepmwjuzi4OOrSLInZQh0Ii56BL0ST3XpKWmxSrzYmLOngKOip0c3UWHMRBlyo6KGLB4iXvI9FemnjXvNvz9Xs+3j8x/OiHyTkAcwIcA0AAbwjcjwL3CQApl+TB4jWbS9snGvZTANMjwCDxzMr2z2p95vcgXgH4YXdZIO6o4sInvBW3nKtDAC+6c1jEek/AKgHWACHA3SVfKopTC56zmvuKCfywe0Ugt4tEovdjIr2079s4U+vXQwjObnZlMwqcuxWA106WQDRLgCOx777Lbb1472iamrelsW9GgXvtP8ByCNIfJCmRE2Hr8qvcvt7unlSUlU04dew77QogaCenDPGitOsHAp5RtGgkBnBoEDOC04st92UFoLXelloHPkJksvYXgFXbfJ3SWqcVQG74YfeCQB7UAZTibOg5j0fqYANSp4VeHLjnyw0qQvp7ca1VphrPBZypTEKs2NnOGa0vrtcCNiB2ykYHZK44gnxkZ1/mtNaFhLdcoUz3omSagl1R4Pa2usvQCvPzyV7uSCeVPbZHGYzlhUahb9L+mqzbnzsd93vtCjd0cpyWHFSG48J/AAr6RslPyfhpQbuvy4A/SOGmEXrv4WwAAAAASUVORK5CYII=" /***/ }), /***/ "4yG7": /***/ (function(module, exports, __webpack_require__) { var baseSet = __webpack_require__("HAGj"); /** * Sets the value at `path` of `object`. If a portion of `path` doesn't exist, * it's created. Arrays are created for missing index properties while objects * are created for all other missing properties. Use `_.setWith` to customize * `path` creation. * * **Note:** This method mutates `object`. * * @static * @memberOf _ * @since 3.7.0 * @category Object * @param {Object} object The object to modify. * @param {Array|string} path The path of the property to set. * @param {*} value The value to set. * @returns {Object} Returns `object`. * @example * * var object = { 'a': [{ 'b': { 'c': 3 } }] }; * * _.set(object, 'a[0].b.c', 4); * console.log(object.a[0].b.c); * // => 4 * * _.set(object, ['x', '0', 'y', 'z'], 5); * console.log(object.x[0].y.z); * // => 5 */ function set(object, path, value) { return object == null ? object : baseSet(object, path, value); } module.exports = set; /***/ }), /***/ "56D2": /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _rule = __webpack_require__("hGxU"); var _rule2 = _interopRequireDefault(_rule); var _util = __webpack_require__("eCjd"); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } /** * Validates the regular expression type. * * @param rule The validation rule. * @param value The value of the field on the source object. * @param callback The callback function. * @param source The source object being validated. * @param options The validation options. * @param options.messages The validation messages. */ function regexp(rule, value, callback, source, options) { var errors = []; var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate) { if ((0, _util.isEmptyValue)(value) && !rule.required) { return callback(); } _rule2['default'].required(rule, value, source, errors, options); if (!(0, _util.isEmptyValue)(value)) { _rule2['default'].type(rule, value, source, errors, options); } } callback(errors); } exports['default'] = regexp; /***/ }), /***/ "5OIZ": /***/ (function(module, exports) { module.exports = "data:image/png;base64,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" /***/ }), /***/ "5Z4L": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/classCallCheck.js var classCallCheck = __webpack_require__("Zrlr"); var classCallCheck_default = /*#__PURE__*/__webpack_require__.n(classCallCheck); // EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/createClass.js var createClass = __webpack_require__("wxAW"); var createClass_default = /*#__PURE__*/__webpack_require__.n(createClass); // EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/possibleConstructorReturn.js var possibleConstructorReturn = __webpack_require__("zwoO"); var possibleConstructorReturn_default = /*#__PURE__*/__webpack_require__.n(possibleConstructorReturn); // EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/inherits.js var inherits = __webpack_require__("Pf15"); var inherits_default = /*#__PURE__*/__webpack_require__.n(inherits); // EXTERNAL MODULE: ./node_modules/react/index.js var react = __webpack_require__("GiK3"); var react_default = /*#__PURE__*/__webpack_require__.n(react); // EXTERNAL MODULE: ./node_modules/prop-types/index.js var prop_types = __webpack_require__("KSGD"); var prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types); // EXTERNAL MODULE: ./node_modules/react-dom/index.js var react_dom = __webpack_require__("O27J"); var react_dom_default = /*#__PURE__*/__webpack_require__.n(react_dom); // CONCATENATED MODULE: ./node_modules/dom-align/dist-web/index.js function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } function _objectSpread2(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } 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 vendorPrefix; var jsCssMap = { Webkit: '-webkit-', Moz: '-moz-', // IE did it wrong again ... ms: '-ms-', O: '-o-' }; function getVendorPrefix() { if (vendorPrefix !== undefined) { return vendorPrefix; } vendorPrefix = ''; var style = document.createElement('p').style; var testProp = 'Transform'; for (var key in jsCssMap) { if (key + testProp in style) { vendorPrefix = key; } } return vendorPrefix; } function getTransitionName() { return getVendorPrefix() ? "".concat(getVendorPrefix(), "TransitionProperty") : 'transitionProperty'; } function getTransformName() { return getVendorPrefix() ? "".concat(getVendorPrefix(), "Transform") : 'transform'; } function setTransitionProperty(node, value) { var name = getTransitionName(); if (name) { node.style[name] = value; if (name !== 'transitionProperty') { node.style.transitionProperty = value; } } } function setTransform(node, value) { var name = getTransformName(); if (name) { node.style[name] = value; if (name !== 'transform') { node.style.transform = value; } } } function getTransitionProperty(node) { return node.style.transitionProperty || node.style[getTransitionName()]; } function getTransformXY(node) { var style = window.getComputedStyle(node, null); var transform = style.getPropertyValue('transform') || style.getPropertyValue(getTransformName()); if (transform && transform !== 'none') { var matrix = transform.replace(/[^0-9\-.,]/g, '').split(','); return { x: parseFloat(matrix[12] || matrix[4], 0), y: parseFloat(matrix[13] || matrix[5], 0) }; } return { x: 0, y: 0 }; } var matrix2d = /matrix\((.*)\)/; var matrix3d = /matrix3d\((.*)\)/; function setTransformXY(node, xy) { var style = window.getComputedStyle(node, null); var transform = style.getPropertyValue('transform') || style.getPropertyValue(getTransformName()); if (transform && transform !== 'none') { var arr; var match2d = transform.match(matrix2d); if (match2d) { match2d = match2d[1]; arr = match2d.split(',').map(function (item) { return parseFloat(item, 10); }); arr[4] = xy.x; arr[5] = xy.y; setTransform(node, "matrix(".concat(arr.join(','), ")")); } else { var match3d = transform.match(matrix3d)[1]; arr = match3d.split(',').map(function (item) { return parseFloat(item, 10); }); arr[12] = xy.x; arr[13] = xy.y; setTransform(node, "matrix3d(".concat(arr.join(','), ")")); } } else { setTransform(node, "translateX(".concat(xy.x, "px) translateY(").concat(xy.y, "px) translateZ(0)")); } } var RE_NUM = /[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source; var getComputedStyleX; // https://stackoverflow.com/a/3485654/3040605 function forceRelayout(elem) { var originalStyle = elem.style.display; elem.style.display = 'none'; elem.offsetHeight; // eslint-disable-line elem.style.display = originalStyle; } function css(el, name, v) { var value = v; if (_typeof(name) === 'object') { for (var i in name) { if (name.hasOwnProperty(i)) { css(el, i, name[i]); } } return undefined; } if (typeof value !== 'undefined') { if (typeof value === 'number') { value = "".concat(value, "px"); } el.style[name] = value; return undefined; } return getComputedStyleX(el, name); } function getClientPosition(elem) { var box; var x; var y; var doc = elem.ownerDocument; var body = doc.body; var docElem = doc && doc.documentElement; // 根据 GBS 最新数据,A-Grade Browsers 都已支持 getBoundingClientRect 方法,不用再考虑传统的实现方式 box = elem.getBoundingClientRect(); // 注:jQuery 还考虑减去 docElem.clientLeft/clientTop // 但测试发现,这样反而会导致当 html 和 body 有边距/边框样式时,获取的值不正确 // 此外,ie6 会忽略 html 的 margin 值,幸运地是没有谁会去设置 html 的 margin x = Math.floor(box.left); y = Math.floor(box.top); // In IE, most of the time, 2 extra pixels are added to the top and left // due to the implicit 2-pixel inset border. In IE6/7 quirks mode and // IE6 standards mode, this border can be overridden by setting the // document element's border to zero -- thus, we cannot rely on the // offset always being 2 pixels. // In quirks mode, the offset can be determined by querying the body's // clientLeft/clientTop, but in standards mode, it is found by querying // the document element's clientLeft/clientTop. Since we already called // getClientBoundingRect we have already forced a reflow, so it is not // too expensive just to query them all. // ie 下应该减去窗口的边框吧,毕竟默认 absolute 都是相对窗口定位的 // 窗口边框标准是设 documentElement ,quirks 时设置 body // 最好禁止在 body 和 html 上边框 ,但 ie < 9 html 默认有 2px ,减去 // 但是非 ie 不可能设置窗口边框,body html 也不是窗口 ,ie 可以通过 html,body 设置 // 标准 ie 下 docElem.clientTop 就是 border-top // ie7 html 即窗口边框改变不了。永远为 2 // 但标准 firefox/chrome/ie9 下 docElem.clientTop 是窗口边框,即使设了 border-top 也为 0 x -= docElem.clientLeft || body.clientLeft || 0; y -= docElem.clientTop || body.clientTop || 0; return { left: x, top: y }; } function getScroll(w, top) { var ret = w["page".concat(top ? 'Y' : 'X', "Offset")]; var method = "scroll".concat(top ? 'Top' : 'Left'); if (typeof ret !== 'number') { var d = w.document; // ie6,7,8 standard mode ret = d.documentElement[method]; if (typeof ret !== 'number') { // quirks mode ret = d.body[method]; } } return ret; } function getScrollLeft(w) { return getScroll(w); } function getScrollTop(w) { return getScroll(w, true); } function getOffset(el) { var pos = getClientPosition(el); var doc = el.ownerDocument; var w = doc.defaultView || doc.parentWindow; pos.left += getScrollLeft(w); pos.top += getScrollTop(w); return pos; } /** * A crude way of determining if an object is a window * @member util */ function isWindow(obj) { // must use == for ie8 /* eslint eqeqeq:0 */ return obj !== null && obj !== undefined && obj == obj.window; } function getDocument(node) { if (isWindow(node)) { return node.document; } if (node.nodeType === 9) { return node; } return node.ownerDocument; } function _getComputedStyle(elem, name, cs) { var computedStyle = cs; var val = ''; var d = getDocument(elem); computedStyle = computedStyle || d.defaultView.getComputedStyle(elem, null); // https://github.com/kissyteam/kissy/issues/61 if (computedStyle) { val = computedStyle.getPropertyValue(name) || computedStyle[name]; } return val; } var _RE_NUM_NO_PX = new RegExp("^(".concat(RE_NUM, ")(?!px)[a-z%]+$"), 'i'); var RE_POS = /^(top|right|bottom|left)$/; var CURRENT_STYLE = 'currentStyle'; var RUNTIME_STYLE = 'runtimeStyle'; var LEFT = 'left'; var PX = 'px'; function _getComputedStyleIE(elem, name) { // currentStyle maybe null // http://msdn.microsoft.com/en-us/library/ms535231.aspx var ret = elem[CURRENT_STYLE] && elem[CURRENT_STYLE][name]; // 当 width/height 设置为百分比时,通过 pixelLeft 方式转换的 width/height 值 // 一开始就处理了! CUSTOM_STYLE.height,CUSTOM_STYLE.width ,cssHook 解决@2011-08-19 // 在 ie 下不对,需要直接用 offset 方式 // borderWidth 等值也有问题,但考虑到 borderWidth 设为百分比的概率很小,这里就不考虑了 // From the awesome hack by Dean Edwards // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 // If we're not dealing with a regular pixel number // but a number that has a weird ending, we need to convert it to pixels // exclude left right for relativity if (_RE_NUM_NO_PX.test(ret) && !RE_POS.test(name)) { // Remember the original values var style = elem.style; var left = style[LEFT]; var rsLeft = elem[RUNTIME_STYLE][LEFT]; // prevent flashing of content elem[RUNTIME_STYLE][LEFT] = elem[CURRENT_STYLE][LEFT]; // Put in the new values to get a computed value out style[LEFT] = name === 'fontSize' ? '1em' : ret || 0; ret = style.pixelLeft + PX; // Revert the changed values style[LEFT] = left; elem[RUNTIME_STYLE][LEFT] = rsLeft; } return ret === '' ? 'auto' : ret; } if (typeof window !== 'undefined') { getComputedStyleX = window.getComputedStyle ? _getComputedStyle : _getComputedStyleIE; } function getOffsetDirection(dir, option) { if (dir === 'left') { return option.useCssRight ? 'right' : dir; } return option.useCssBottom ? 'bottom' : dir; } function oppositeOffsetDirection(dir) { if (dir === 'left') { return 'right'; } else if (dir === 'right') { return 'left'; } else if (dir === 'top') { return 'bottom'; } else if (dir === 'bottom') { return 'top'; } } // 设置 elem 相对 elem.ownerDocument 的坐标 function setLeftTop(elem, offset, option) { // set position first, in-case top/left are set even on static elem if (css(elem, 'position') === 'static') { elem.style.position = 'relative'; } var presetH = -999; var presetV = -999; var horizontalProperty = getOffsetDirection('left', option); var verticalProperty = getOffsetDirection('top', option); var oppositeHorizontalProperty = oppositeOffsetDirection(horizontalProperty); var oppositeVerticalProperty = oppositeOffsetDirection(verticalProperty); if (horizontalProperty !== 'left') { presetH = 999; } if (verticalProperty !== 'top') { presetV = 999; } var originalTransition = ''; var originalOffset = getOffset(elem); if ('left' in offset || 'top' in offset) { originalTransition = getTransitionProperty(elem) || ''; setTransitionProperty(elem, 'none'); } if ('left' in offset) { elem.style[oppositeHorizontalProperty] = ''; elem.style[horizontalProperty] = "".concat(presetH, "px"); } if ('top' in offset) { elem.style[oppositeVerticalProperty] = ''; elem.style[verticalProperty] = "".concat(presetV, "px"); } // force relayout forceRelayout(elem); var old = getOffset(elem); var originalStyle = {}; for (var key in offset) { if (offset.hasOwnProperty(key)) { var dir = getOffsetDirection(key, option); var preset = key === 'left' ? presetH : presetV; var off = originalOffset[key] - old[key]; if (dir === key) { originalStyle[dir] = preset + off; } else { originalStyle[dir] = preset - off; } } } css(elem, originalStyle); // force relayout forceRelayout(elem); if ('left' in offset || 'top' in offset) { setTransitionProperty(elem, originalTransition); } var ret = {}; for (var _key in offset) { if (offset.hasOwnProperty(_key)) { var _dir = getOffsetDirection(_key, option); var _off = offset[_key] - originalOffset[_key]; if (_key === _dir) { ret[_dir] = originalStyle[_dir] + _off; } else { ret[_dir] = originalStyle[_dir] - _off; } } } css(elem, ret); } function setTransform$1(elem, offset) { var originalOffset = getOffset(elem); var originalXY = getTransformXY(elem); var resultXY = { x: originalXY.x, y: originalXY.y }; if ('left' in offset) { resultXY.x = originalXY.x + offset.left - originalOffset.left; } if ('top' in offset) { resultXY.y = originalXY.y + offset.top - originalOffset.top; } setTransformXY(elem, resultXY); } function setOffset(elem, offset, option) { if (option.ignoreShake) { var oriOffset = getOffset(elem); var oLeft = oriOffset.left.toFixed(0); var oTop = oriOffset.top.toFixed(0); var tLeft = offset.left.toFixed(0); var tTop = offset.top.toFixed(0); if (oLeft === tLeft && oTop === tTop) { return; } } if (option.useCssRight || option.useCssBottom) { setLeftTop(elem, offset, option); } else if (option.useCssTransform && getTransformName() in document.body.style) { setTransform$1(elem, offset); } else { setLeftTop(elem, offset, option); } } function each(arr, fn) { for (var i = 0; i < arr.length; i++) { fn(arr[i]); } } function isBorderBoxFn(elem) { return getComputedStyleX(elem, 'boxSizing') === 'border-box'; } var BOX_MODELS = ['margin', 'border', 'padding']; var CONTENT_INDEX = -1; var PADDING_INDEX = 2; var BORDER_INDEX = 1; var MARGIN_INDEX = 0; function swap(elem, options, callback) { var old = {}; var style = elem.style; var name; // Remember the old values, and insert the new ones for (name in options) { if (options.hasOwnProperty(name)) { old[name] = style[name]; style[name] = options[name]; } } callback.call(elem); // Revert the old values for (name in options) { if (options.hasOwnProperty(name)) { style[name] = old[name]; } } } function getPBMWidth(elem, props, which) { var value = 0; var prop; var j; var i; for (j = 0; j < props.length; j++) { prop = props[j]; if (prop) { for (i = 0; i < which.length; i++) { var cssProp = void 0; if (prop === 'border') { cssProp = "".concat(prop).concat(which[i], "Width"); } else { cssProp = prop + which[i]; } value += parseFloat(getComputedStyleX(elem, cssProp)) || 0; } } } return value; } var domUtils = { getParent: function getParent(element) { var parent = element; do { if (parent.nodeType === 11 && parent.host) { parent = parent.host; } else { parent = parent.parentNode; } } while (parent && parent.nodeType !== 1 && parent.nodeType !== 9); return parent; } }; each(['Width', 'Height'], function (name) { domUtils["doc".concat(name)] = function (refWin) { var d = refWin.document; return Math.max( // firefox chrome documentElement.scrollHeight< body.scrollHeight // ie standard mode : documentElement.scrollHeight> body.scrollHeight d.documentElement["scroll".concat(name)], // quirks : documentElement.scrollHeight 最大等于可视窗口多一点? d.body["scroll".concat(name)], domUtils["viewport".concat(name)](d)); }; domUtils["viewport".concat(name)] = function (win) { // pc browser includes scrollbar in window.innerWidth var prop = "client".concat(name); var doc = win.document; var body = doc.body; var documentElement = doc.documentElement; var documentElementProp = documentElement[prop]; // 标准模式取 documentElement // backcompat 取 body return doc.compatMode === 'CSS1Compat' && documentElementProp || body && body[prop] || documentElementProp; }; }); /* 得到元素的大小信息 @param elem @param name @param {String} [extra] 'padding' : (css width) + padding 'border' : (css width) + padding + border 'margin' : (css width) + padding + border + margin */ function getWH(elem, name, ex) { var extra = ex; if (isWindow(elem)) { return name === 'width' ? domUtils.viewportWidth(elem) : domUtils.viewportHeight(elem); } else if (elem.nodeType === 9) { return name === 'width' ? domUtils.docWidth(elem) : domUtils.docHeight(elem); } var which = name === 'width' ? ['Left', 'Right'] : ['Top', 'Bottom']; var borderBoxValue = name === 'width' ? Math.floor(elem.getBoundingClientRect().width) : Math.floor(elem.getBoundingClientRect().height); var isBorderBox = isBorderBoxFn(elem); var cssBoxValue = 0; if (borderBoxValue === null || borderBoxValue === undefined || borderBoxValue <= 0) { borderBoxValue = undefined; // Fall back to computed then un computed css if necessary cssBoxValue = getComputedStyleX(elem, name); if (cssBoxValue === null || cssBoxValue === undefined || Number(cssBoxValue) < 0) { cssBoxValue = elem.style[name] || 0; } // Normalize '', auto, and prepare for extra cssBoxValue = Math.floor(parseFloat(cssBoxValue)) || 0; } if (extra === undefined) { extra = isBorderBox ? BORDER_INDEX : CONTENT_INDEX; } var borderBoxValueOrIsBorderBox = borderBoxValue !== undefined || isBorderBox; var val = borderBoxValue || cssBoxValue; if (extra === CONTENT_INDEX) { if (borderBoxValueOrIsBorderBox) { return val - getPBMWidth(elem, ['border', 'padding'], which); } return cssBoxValue; } else if (borderBoxValueOrIsBorderBox) { if (extra === BORDER_INDEX) { return val; } return val + (extra === PADDING_INDEX ? -getPBMWidth(elem, ['border'], which) : getPBMWidth(elem, ['margin'], which)); } return cssBoxValue + getPBMWidth(elem, BOX_MODELS.slice(extra), which); } var cssShow = { position: 'absolute', visibility: 'hidden', display: 'block' }; // fix #119 : https://github.com/kissyteam/kissy/issues/119 function getWHIgnoreDisplay() { for (var _len = arguments.length, args = new Array(_len), _key2 = 0; _key2 < _len; _key2++) { args[_key2] = arguments[_key2]; } var val; var elem = args[0]; // in case elem is window // elem.offsetWidth === undefined if (elem.offsetWidth !== 0) { val = getWH.apply(undefined, args); } else { swap(elem, cssShow, function () { val = getWH.apply(undefined, args); }); } return val; } each(['width', 'height'], function (name) { var first = name.charAt(0).toUpperCase() + name.slice(1); domUtils["outer".concat(first)] = function (el, includeMargin) { return el && getWHIgnoreDisplay(el, name, includeMargin ? MARGIN_INDEX : BORDER_INDEX); }; var which = name === 'width' ? ['Left', 'Right'] : ['Top', 'Bottom']; domUtils[name] = function (elem, v) { var val = v; if (val !== undefined) { if (elem) { var isBorderBox = isBorderBoxFn(elem); if (isBorderBox) { val += getPBMWidth(elem, ['padding', 'border'], which); } return css(elem, name, val); } return undefined; } return elem && getWHIgnoreDisplay(elem, name, CONTENT_INDEX); }; }); function mix(to, from) { for (var i in from) { if (from.hasOwnProperty(i)) { to[i] = from[i]; } } return to; } var utils = { getWindow: function getWindow(node) { if (node && node.document && node.setTimeout) { return node; } var doc = node.ownerDocument || node; return doc.defaultView || doc.parentWindow; }, getDocument: getDocument, offset: function offset(el, value, option) { if (typeof value !== 'undefined') { setOffset(el, value, option || {}); } else { return getOffset(el); } }, isWindow: isWindow, each: each, css: css, clone: function clone(obj) { var i; var ret = {}; for (i in obj) { if (obj.hasOwnProperty(i)) { ret[i] = obj[i]; } } var overflow = obj.overflow; if (overflow) { for (i in obj) { if (obj.hasOwnProperty(i)) { ret.overflow[i] = obj.overflow[i]; } } } return ret; }, mix: mix, getWindowScrollLeft: function getWindowScrollLeft(w) { return getScrollLeft(w); }, getWindowScrollTop: function getWindowScrollTop(w) { return getScrollTop(w); }, merge: function merge() { var ret = {}; for (var i = 0; i < arguments.length; i++) { utils.mix(ret, i < 0 || arguments.length <= i ? undefined : arguments[i]); } return ret; }, viewportWidth: 0, viewportHeight: 0 }; mix(utils, domUtils); /** * 得到会导致元素显示不全的祖先元素 */ var getParent = utils.getParent; function getOffsetParent(element) { if (utils.isWindow(element) || element.nodeType === 9) { return null; } // ie 这个也不是完全可行 /*
元素 6 高 100px 宽 50px
*/ // element.offsetParent does the right thing in ie7 and below. Return parent with layout! // In other browsers it only includes elements with position absolute, relative or // fixed, not elements with overflow set to auto or scroll. // if (UA.ie && ieMode < 8) { // return element.offsetParent; // } // 统一的 offsetParent 方法 var doc = utils.getDocument(element); var body = doc.body; var parent; var positionStyle = utils.css(element, 'position'); var skipStatic = positionStyle === 'fixed' || positionStyle === 'absolute'; if (!skipStatic) { return element.nodeName.toLowerCase() === 'html' ? null : getParent(element); } for (parent = getParent(element); parent && parent !== body && parent.nodeType !== 9; parent = getParent(parent)) { positionStyle = utils.css(parent, 'position'); if (positionStyle !== 'static') { return parent; } } return null; } var getParent$1 = utils.getParent; function isAncestorFixed(element) { if (utils.isWindow(element) || element.nodeType === 9) { return false; } var doc = utils.getDocument(element); var body = doc.body; var parent = null; for (parent = getParent$1(element); // 修复元素位于 document.documentElement 下导致崩溃问题 parent && parent !== body && parent !== doc; parent = getParent$1(parent)) { var positionStyle = utils.css(parent, 'position'); if (positionStyle === 'fixed') { return true; } } return false; } /** * 获得元素的显示部分的区域 */ function getVisibleRectForElement(element, alwaysByViewport) { var visibleRect = { left: 0, right: Infinity, top: 0, bottom: Infinity }; var el = getOffsetParent(element); var doc = utils.getDocument(element); var win = doc.defaultView || doc.parentWindow; var body = doc.body; var documentElement = doc.documentElement; // Determine the size of the visible rect by climbing the dom accounting for // all scrollable containers. while (el) { // clientWidth is zero for inline block elements in ie. if ((navigator.userAgent.indexOf('MSIE') === -1 || el.clientWidth !== 0) && // body may have overflow set on it, yet we still get the entire // viewport. In some browsers, el.offsetParent may be // document.documentElement, so check for that too. el !== body && el !== documentElement && utils.css(el, 'overflow') !== 'visible') { var pos = utils.offset(el); // add border pos.left += el.clientLeft; pos.top += el.clientTop; visibleRect.top = Math.max(visibleRect.top, pos.top); visibleRect.right = Math.min(visibleRect.right, // consider area without scrollBar pos.left + el.clientWidth); visibleRect.bottom = Math.min(visibleRect.bottom, pos.top + el.clientHeight); visibleRect.left = Math.max(visibleRect.left, pos.left); } else if (el === body || el === documentElement) { break; } el = getOffsetParent(el); } // Set element position to fixed // make sure absolute element itself don't affect it's visible area // https://github.com/ant-design/ant-design/issues/7601 var originalPosition = null; if (!utils.isWindow(element) && element.nodeType !== 9) { originalPosition = element.style.position; var position = utils.css(element, 'position'); if (position === 'absolute') { element.style.position = 'fixed'; } } var scrollX = utils.getWindowScrollLeft(win); var scrollY = utils.getWindowScrollTop(win); var viewportWidth = utils.viewportWidth(win); var viewportHeight = utils.viewportHeight(win); var documentWidth = documentElement.scrollWidth; var documentHeight = documentElement.scrollHeight; // scrollXXX on html is sync with body which means overflow: hidden on body gets wrong scrollXXX. // We should cut this ourself. var bodyStyle = window.getComputedStyle(body); if (bodyStyle.overflowX === 'hidden') { documentWidth = win.innerWidth; } if (bodyStyle.overflowY === 'hidden') { documentHeight = win.innerHeight; } // Reset element position after calculate the visible area if (element.style) { element.style.position = originalPosition; } if (alwaysByViewport || isAncestorFixed(element)) { // Clip by viewport's size. visibleRect.left = Math.max(visibleRect.left, scrollX); visibleRect.top = Math.max(visibleRect.top, scrollY); visibleRect.right = Math.min(visibleRect.right, scrollX + viewportWidth); visibleRect.bottom = Math.min(visibleRect.bottom, scrollY + viewportHeight); } else { // Clip by document's size. var maxVisibleWidth = Math.max(documentWidth, scrollX + viewportWidth); visibleRect.right = Math.min(visibleRect.right, maxVisibleWidth); var maxVisibleHeight = Math.max(documentHeight, scrollY + viewportHeight); visibleRect.bottom = Math.min(visibleRect.bottom, maxVisibleHeight); } return visibleRect.top >= 0 && visibleRect.left >= 0 && visibleRect.bottom > visibleRect.top && visibleRect.right > visibleRect.left ? visibleRect : null; } function adjustForViewport(elFuturePos, elRegion, visibleRect, overflow) { var pos = utils.clone(elFuturePos); var size = { width: elRegion.width, height: elRegion.height }; if (overflow.adjustX && pos.left < visibleRect.left) { pos.left = visibleRect.left; } // Left edge inside and right edge outside viewport, try to resize it. if (overflow.resizeWidth && pos.left >= visibleRect.left && pos.left + size.width > visibleRect.right) { size.width -= pos.left + size.width - visibleRect.right; } // Right edge outside viewport, try to move it. if (overflow.adjustX && pos.left + size.width > visibleRect.right) { // 保证左边界和可视区域左边界对齐 pos.left = Math.max(visibleRect.right - size.width, visibleRect.left); } // Top edge outside viewport, try to move it. if (overflow.adjustY && pos.top < visibleRect.top) { pos.top = visibleRect.top; } // Top edge inside and bottom edge outside viewport, try to resize it. if (overflow.resizeHeight && pos.top >= visibleRect.top && pos.top + size.height > visibleRect.bottom) { size.height -= pos.top + size.height - visibleRect.bottom; } // Bottom edge outside viewport, try to move it. if (overflow.adjustY && pos.top + size.height > visibleRect.bottom) { // 保证上边界和可视区域上边界对齐 pos.top = Math.max(visibleRect.bottom - size.height, visibleRect.top); } return utils.mix(pos, size); } function getRegion(node) { var offset; var w; var h; if (!utils.isWindow(node) && node.nodeType !== 9) { offset = utils.offset(node); w = utils.outerWidth(node); h = utils.outerHeight(node); } else { var win = utils.getWindow(node); offset = { left: utils.getWindowScrollLeft(win), top: utils.getWindowScrollTop(win) }; w = utils.viewportWidth(win); h = utils.viewportHeight(win); } offset.width = w; offset.height = h; return offset; } /** * 获取 node 上的 align 对齐点 相对于页面的坐标 */ function getAlignOffset(region, align) { var V = align.charAt(0); var H = align.charAt(1); var w = region.width; var h = region.height; var x = region.left; var y = region.top; if (V === 'c') { y += h / 2; } else if (V === 'b') { y += h; } if (H === 'c') { x += w / 2; } else if (H === 'r') { x += w; } return { left: x, top: y }; } function getElFuturePos(elRegion, refNodeRegion, points, offset, targetOffset) { var p1 = getAlignOffset(refNodeRegion, points[1]); var p2 = getAlignOffset(elRegion, points[0]); var diff = [p2.left - p1.left, p2.top - p1.top]; return { left: Math.round(elRegion.left - diff[0] + offset[0] - targetOffset[0]), top: Math.round(elRegion.top - diff[1] + offset[1] - targetOffset[1]) }; } /** * align dom node flexibly * @author yiminghe@gmail.com */ // http://yiminghe.iteye.com/blog/1124720 function isFailX(elFuturePos, elRegion, visibleRect) { return elFuturePos.left < visibleRect.left || elFuturePos.left + elRegion.width > visibleRect.right; } function isFailY(elFuturePos, elRegion, visibleRect) { return elFuturePos.top < visibleRect.top || elFuturePos.top + elRegion.height > visibleRect.bottom; } function isCompleteFailX(elFuturePos, elRegion, visibleRect) { return elFuturePos.left > visibleRect.right || elFuturePos.left + elRegion.width < visibleRect.left; } function isCompleteFailY(elFuturePos, elRegion, visibleRect) { return elFuturePos.top > visibleRect.bottom || elFuturePos.top + elRegion.height < visibleRect.top; } function flip(points, reg, map) { var ret = []; utils.each(points, function (p) { ret.push(p.replace(reg, function (m) { return map[m]; })); }); return ret; } function flipOffset(offset, index) { offset[index] = -offset[index]; return offset; } function convertOffset(str, offsetLen) { var n; if (/%$/.test(str)) { n = parseInt(str.substring(0, str.length - 1), 10) / 100 * offsetLen; } else { n = parseInt(str, 10); } return n || 0; } function normalizeOffset(offset, el) { offset[0] = convertOffset(offset[0], el.width); offset[1] = convertOffset(offset[1], el.height); } /** * @param el * @param tgtRegion 参照节点所占的区域: { left, top, width, height } * @param align */ function doAlign(el, tgtRegion, align, isTgtRegionVisible) { var points = align.points; var offset = align.offset || [0, 0]; var targetOffset = align.targetOffset || [0, 0]; var overflow = align.overflow; var source = align.source || el; offset = [].concat(offset); targetOffset = [].concat(targetOffset); overflow = overflow || {}; var newOverflowCfg = {}; var fail = 0; var alwaysByViewport = !!(overflow && overflow.alwaysByViewport); // 当前节点可以被放置的显示区域 var visibleRect = getVisibleRectForElement(source, alwaysByViewport); // 当前节点所占的区域, left/top/width/height var elRegion = getRegion(source); // 将 offset 转换成数值,支持百分比 normalizeOffset(offset, elRegion); normalizeOffset(targetOffset, tgtRegion); // 当前节点将要被放置的位置 var elFuturePos = getElFuturePos(elRegion, tgtRegion, points, offset, targetOffset); // 当前节点将要所处的区域 var newElRegion = utils.merge(elRegion, elFuturePos); // 如果可视区域不能完全放置当前节点时允许调整 if (visibleRect && (overflow.adjustX || overflow.adjustY) && isTgtRegionVisible) { if (overflow.adjustX) { // 如果横向不能放下 if (isFailX(elFuturePos, elRegion, visibleRect)) { // 对齐位置反下 var newPoints = flip(points, /[lr]/gi, { l: 'r', r: 'l' }); // 偏移量也反下 var newOffset = flipOffset(offset, 0); var newTargetOffset = flipOffset(targetOffset, 0); var newElFuturePos = getElFuturePos(elRegion, tgtRegion, newPoints, newOffset, newTargetOffset); if (!isCompleteFailX(newElFuturePos, elRegion, visibleRect)) { fail = 1; points = newPoints; offset = newOffset; targetOffset = newTargetOffset; } } } if (overflow.adjustY) { // 如果纵向不能放下 if (isFailY(elFuturePos, elRegion, visibleRect)) { // 对齐位置反下 var _newPoints = flip(points, /[tb]/gi, { t: 'b', b: 't' }); // 偏移量也反下 var _newOffset = flipOffset(offset, 1); var _newTargetOffset = flipOffset(targetOffset, 1); var _newElFuturePos = getElFuturePos(elRegion, tgtRegion, _newPoints, _newOffset, _newTargetOffset); if (!isCompleteFailY(_newElFuturePos, elRegion, visibleRect)) { fail = 1; points = _newPoints; offset = _newOffset; targetOffset = _newTargetOffset; } } } // 如果失败,重新计算当前节点将要被放置的位置 if (fail) { elFuturePos = getElFuturePos(elRegion, tgtRegion, points, offset, targetOffset); utils.mix(newElRegion, elFuturePos); } var isStillFailX = isFailX(elFuturePos, elRegion, visibleRect); var isStillFailY = isFailY(elFuturePos, elRegion, visibleRect); // 检查反下后的位置是否可以放下了,如果仍然放不下: // 1. 复原修改过的定位参数 if (isStillFailX || isStillFailY) { var _newPoints2 = points; // 重置对应部分的翻转逻辑 if (isStillFailX) { _newPoints2 = flip(points, /[lr]/gi, { l: 'r', r: 'l' }); } if (isStillFailY) { _newPoints2 = flip(points, /[tb]/gi, { t: 'b', b: 't' }); } points = _newPoints2; offset = align.offset || [0, 0]; targetOffset = align.targetOffset || [0, 0]; } // 2. 只有指定了可以调整当前方向才调整 newOverflowCfg.adjustX = overflow.adjustX && isStillFailX; newOverflowCfg.adjustY = overflow.adjustY && isStillFailY; // 确实要调整,甚至可能会调整高度宽度 if (newOverflowCfg.adjustX || newOverflowCfg.adjustY) { newElRegion = adjustForViewport(elFuturePos, elRegion, visibleRect, newOverflowCfg); } } // need judge to in case set fixed with in css on height auto element if (newElRegion.width !== elRegion.width) { utils.css(source, 'width', utils.width(source) + newElRegion.width - elRegion.width); } if (newElRegion.height !== elRegion.height) { utils.css(source, 'height', utils.height(source) + newElRegion.height - elRegion.height); } // https://github.com/kissyteam/kissy/issues/190 // 相对于屏幕位置没变,而 left/top 变了 // 例如
utils.offset(source, { left: newElRegion.left, top: newElRegion.top }, { useCssRight: align.useCssRight, useCssBottom: align.useCssBottom, useCssTransform: align.useCssTransform, ignoreShake: align.ignoreShake }); return { points: points, offset: offset, targetOffset: targetOffset, overflow: newOverflowCfg }; } /** * 2012-04-26 yiminghe@gmail.com * - 优化智能对齐算法 * - 慎用 resizeXX * * 2011-07-13 yiminghe@gmail.com note: * - 增加智能对齐,以及大小调整选项 **/ function isOutOfVisibleRect(target, alwaysByViewport) { var visibleRect = getVisibleRectForElement(target, alwaysByViewport); var targetRegion = getRegion(target); return !visibleRect || targetRegion.left + targetRegion.width <= visibleRect.left || targetRegion.top + targetRegion.height <= visibleRect.top || targetRegion.left >= visibleRect.right || targetRegion.top >= visibleRect.bottom; } function alignElement(el, refNode, align) { var target = align.target || refNode; var refNodeRegion = getRegion(target); var isTargetNotOutOfVisible = !isOutOfVisibleRect(target, align.overflow && align.overflow.alwaysByViewport); return doAlign(el, refNodeRegion, align, isTargetNotOutOfVisible); } alignElement.__getOffsetParent = getOffsetParent; alignElement.__getVisibleRectForElement = getVisibleRectForElement; /** * `tgtPoint`: { pageX, pageY } or { clientX, clientY }. * If client position provided, will internal convert to page position. */ function alignPoint(el, tgtPoint, align) { var pageX; var pageY; var doc = utils.getDocument(el); var win = doc.defaultView || doc.parentWindow; var scrollX = utils.getWindowScrollLeft(win); var scrollY = utils.getWindowScrollTop(win); var viewportWidth = utils.viewportWidth(win); var viewportHeight = utils.viewportHeight(win); if ('pageX' in tgtPoint) { pageX = tgtPoint.pageX; } else { pageX = scrollX + tgtPoint.clientX; } if ('pageY' in tgtPoint) { pageY = tgtPoint.pageY; } else { pageY = scrollY + tgtPoint.clientY; } var tgtRegion = { left: pageX, top: pageY, width: 0, height: 0 }; var pointInView = pageX >= 0 && pageX <= scrollX + viewportWidth && pageY >= 0 && pageY <= scrollY + viewportHeight; // Provide default target point var points = [align.points[0], 'cc']; return doAlign(el, tgtRegion, _objectSpread2(_objectSpread2({}, align), {}, { points: points }), pointInView); } /* harmony default export */ var dist_web = (alignElement); //# sourceMappingURL=index.js.map // EXTERNAL MODULE: ./node_modules/rc-util/es/Dom/addEventListener.js var addEventListener = __webpack_require__("iQU3"); // EXTERNAL MODULE: ./node_modules/rc-util/es/Dom/contains.js var contains = __webpack_require__("rPPc"); // CONCATENATED MODULE: ./node_modules/rc-align/es/util.js function buffer(fn, ms) { var timer = void 0; function clear() { if (timer) { clearTimeout(timer); timer = null; } } function bufferFn() { clear(); timer = setTimeout(fn, ms); } bufferFn.clear = clear; return bufferFn; } function isSamePoint(prev, next) { if (prev === next) return true; if (!prev || !next) return false; if ('pageX' in next && 'pageY' in next) { return prev.pageX === next.pageX && prev.pageY === next.pageY; } if ('clientX' in next && 'clientY' in next) { return prev.clientX === next.clientX && prev.clientY === next.clientY; } return false; } function util_isWindow(obj) { return obj && typeof obj === 'object' && obj.window === obj; } function isSimilarValue(val1, val2) { var int1 = Math.floor(val1); var int2 = Math.floor(val2); return Math.abs(int1 - int2) <= 1; } function restoreFocus(activeElement, container) { // Focus back if is in the container if (activeElement !== document.activeElement && Object(contains["a" /* default */])(container, activeElement)) { activeElement.focus(); } } // CONCATENATED MODULE: ./node_modules/rc-align/es/Align.js function getElement(func) { if (typeof func !== 'function' || !func) return null; return func(); } function getPoint(point) { if (typeof point !== 'object' || !point) return null; return point; } var Align_Align = function (_Component) { inherits_default()(Align, _Component); function Align() { var _ref; var _temp, _this, _ret; classCallCheck_default()(this, Align); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _ret = (_temp = (_this = possibleConstructorReturn_default()(this, (_ref = Align.__proto__ || Object.getPrototypeOf(Align)).call.apply(_ref, [this].concat(args))), _this), _this.forceAlign = function () { var _this$props = _this.props, disabled = _this$props.disabled, target = _this$props.target, align = _this$props.align, onAlign = _this$props.onAlign; if (!disabled && target) { var source = react_dom_default.a.findDOMNode(_this); var result = void 0; var element = getElement(target); var point = getPoint(target); // IE lose focus after element realign // We should record activeElement and restore later var activeElement = document.activeElement; if (element) { result = alignElement(source, element, align); } else if (point) { result = alignPoint(source, point, align); } restoreFocus(activeElement, source); if (onAlign) { onAlign(source, result); } } }, _temp), possibleConstructorReturn_default()(_this, _ret); } createClass_default()(Align, [{ key: 'componentDidMount', value: function componentDidMount() { var props = this.props; // if parent ref not attached .... use document.getElementById this.forceAlign(); if (!props.disabled && props.monitorWindowResize) { this.startMonitorWindowResize(); } } }, { key: 'componentDidUpdate', value: function componentDidUpdate(prevProps) { var reAlign = false; var props = this.props; if (!props.disabled) { var source = react_dom_default.a.findDOMNode(this); var sourceRect = source ? source.getBoundingClientRect() : null; if (prevProps.disabled) { reAlign = true; } else { var lastElement = getElement(prevProps.target); var currentElement = getElement(props.target); var lastPoint = getPoint(prevProps.target); var currentPoint = getPoint(props.target); if (util_isWindow(lastElement) && util_isWindow(currentElement)) { // Skip if is window reAlign = false; } else if (lastElement !== currentElement || // Element change lastElement && !currentElement && currentPoint || // Change from element to point lastPoint && currentPoint && currentElement || // Change from point to element currentPoint && !isSamePoint(lastPoint, currentPoint)) { reAlign = true; } // If source element size changed var preRect = this.sourceRect || {}; if (!reAlign && source && (!isSimilarValue(preRect.width, sourceRect.width) || !isSimilarValue(preRect.height, sourceRect.height))) { reAlign = true; } } this.sourceRect = sourceRect; } if (reAlign) { this.forceAlign(); } if (props.monitorWindowResize && !props.disabled) { this.startMonitorWindowResize(); } else { this.stopMonitorWindowResize(); } } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { this.stopMonitorWindowResize(); } }, { key: 'startMonitorWindowResize', value: function startMonitorWindowResize() { if (!this.resizeHandler) { this.bufferMonitor = buffer(this.forceAlign, this.props.monitorBufferTime); this.resizeHandler = Object(addEventListener["a" /* default */])(window, 'resize', this.bufferMonitor); } } }, { key: 'stopMonitorWindowResize', value: function stopMonitorWindowResize() { if (this.resizeHandler) { this.bufferMonitor.clear(); this.resizeHandler.remove(); this.resizeHandler = null; } } }, { key: 'render', value: function render() { var _this2 = this; var _props = this.props, childrenProps = _props.childrenProps, children = _props.children; var child = react_default.a.Children.only(children); if (childrenProps) { var newProps = {}; var propList = Object.keys(childrenProps); propList.forEach(function (prop) { newProps[prop] = _this2.props[childrenProps[prop]]; }); return react_default.a.cloneElement(child, newProps); } return child; } }]); return Align; }(react["Component"]); Align_Align.propTypes = { childrenProps: prop_types_default.a.object, align: prop_types_default.a.object.isRequired, target: prop_types_default.a.oneOfType([prop_types_default.a.func, prop_types_default.a.shape({ clientX: prop_types_default.a.number, clientY: prop_types_default.a.number, pageX: prop_types_default.a.number, pageY: prop_types_default.a.number })]), onAlign: prop_types_default.a.func, monitorBufferTime: prop_types_default.a.number, monitorWindowResize: prop_types_default.a.bool, disabled: prop_types_default.a.bool, children: prop_types_default.a.any }; Align_Align.defaultProps = { target: function target() { return window; }, monitorBufferTime: 50, monitorWindowResize: false, disabled: false }; /* harmony default export */ var es_Align = (Align_Align); // CONCATENATED MODULE: ./node_modules/rc-align/es/index.js // export this package's api /* harmony default export */ var es = __webpack_exports__["a"] = (es_Align); /***/ }), /***/ "5bNU": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAARCAYAAADUryzEAAAAAXNSR0IArs4c6QAAATtJREFUOE/tk78vQ3EUxT/3lUbFe7WKiUTCYDMzYTExdbEb6A8jkiYSCUtbkUiI/8AfYCSGDkw2CRuJidc+khLekSde00S3Ggzudu8993zzveceo8OwDucxikq6PruO8ey8sPl0YLWY1F3VqIVsANV6yfa8nDKCeRM79YpdRDjry2vKEadRIrjHyAQlO/cKWpHYNtEjeA3KpLw8t4ghxIdgO6jYmnlZzWKctHylmkwy+/aGDzhxvd5PwvO5Awbimt4Z+0FgcPUuZhLGQ+t+2hFYyMQ/wZ/YQV9Wk45xFkvWTkaJRlCh18txAww3sZGMFNXl+RwBi9+NSwemQ3iMLjUadoxCrWz76YIWFH5h0xE2DBlvmsnNas6MZYPDWtmO3Zy2gBHEelCx6/jVVF6D3WJL0Aj6WfoFN3bo508++LZQBvpBWgAAAABJRU5ErkJggg==" /***/ }), /***/ "5cEz": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAARCAYAAADUryzEAAABBElEQVQ4T63TsUpDMRTG8f+nUikounfoC7hZcHITFQRdOoiT+mJ1EdSxiGgdnQTdfAHBB7BQHNTySS69l9vYiyk1W3JOfichJ2LGoRn3UwC2F4B9oAU0gGVgEZgDPoE+8AY8AV1J36F4GTgHjhJPdCnpMAY+gHoi0Je0GgO3wE4i0JOU5ZavsAXcJwK7ku7GgDCxfQ3s/YHcSCpyxp7RdhN4AZYqkAGwJuk1j//qA9vHQKcCOJF0Vo5NbCTbAQhQeXQkncZwFVADroCD0YYu0Jb0NRGwHZpiIwrOA9ujtR4wjOKPki6yE9h+B1YSnzBPy5opBzaB9SmBZ0kP//cbp6xepP8AHttJEkyqu24AAAAASUVORK5CYII=" /***/ }), /***/ "5dWf": /***/ (function(module, exports) { module.exports = "data:image/png;base64,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" /***/ }), /***/ "5r+a": /***/ (function(module, exports, __webpack_require__) { "use strict"; 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 _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; var RE_NUM = /[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source; function getClientPosition(elem) { var box = undefined; var x = undefined; var y = undefined; var doc = elem.ownerDocument; var body = doc.body; var docElem = doc && doc.documentElement; // 根据 GBS 最新数据,A-Grade Browsers 都已支持 getBoundingClientRect 方法,不用再考虑传统的实现方式 box = elem.getBoundingClientRect(); // 注:jQuery 还考虑减去 docElem.clientLeft/clientTop // 但测试发现,这样反而会导致当 html 和 body 有边距/边框样式时,获取的值不正确 // 此外,ie6 会忽略 html 的 margin 值,幸运地是没有谁会去设置 html 的 margin x = box.left; y = box.top; // In IE, most of the time, 2 extra pixels are added to the top and left // due to the implicit 2-pixel inset border. In IE6/7 quirks mode and // IE6 standards mode, this border can be overridden by setting the // document element's border to zero -- thus, we cannot rely on the // offset always being 2 pixels. // In quirks mode, the offset can be determined by querying the body's // clientLeft/clientTop, but in standards mode, it is found by querying // the document element's clientLeft/clientTop. Since we already called // getClientBoundingRect we have already forced a reflow, so it is not // too expensive just to query them all. // ie 下应该减去窗口的边框吧,毕竟默认 absolute 都是相对窗口定位的 // 窗口边框标准是设 documentElement ,quirks 时设置 body // 最好禁止在 body 和 html 上边框 ,但 ie < 9 html 默认有 2px ,减去 // 但是非 ie 不可能设置窗口边框,body html 也不是窗口 ,ie 可以通过 html,body 设置 // 标准 ie 下 docElem.clientTop 就是 border-top // ie7 html 即窗口边框改变不了。永远为 2 // 但标准 firefox/chrome/ie9 下 docElem.clientTop 是窗口边框,即使设了 border-top 也为 0 x -= docElem.clientLeft || body.clientLeft || 0; y -= docElem.clientTop || body.clientTop || 0; return { left: x, top: y }; } function getScroll(w, top) { var ret = w['page' + (top ? 'Y' : 'X') + 'Offset']; var method = 'scroll' + (top ? 'Top' : 'Left'); if (typeof ret !== 'number') { var d = w.document; // ie6,7,8 standard mode ret = d.documentElement[method]; if (typeof ret !== 'number') { // quirks mode ret = d.body[method]; } } return ret; } function getScrollLeft(w) { return getScroll(w); } function getScrollTop(w) { return getScroll(w, true); } function getOffset(el) { var pos = getClientPosition(el); var doc = el.ownerDocument; var w = doc.defaultView || doc.parentWindow; pos.left += getScrollLeft(w); pos.top += getScrollTop(w); return pos; } function _getComputedStyle(elem, name, computedStyle_) { var val = ''; var d = elem.ownerDocument; var computedStyle = computedStyle_ || d.defaultView.getComputedStyle(elem, null); // https://github.com/kissyteam/kissy/issues/61 if (computedStyle) { val = computedStyle.getPropertyValue(name) || computedStyle[name]; } return val; } var _RE_NUM_NO_PX = new RegExp('^(' + RE_NUM + ')(?!px)[a-z%]+$', 'i'); var RE_POS = /^(top|right|bottom|left)$/; var CURRENT_STYLE = 'currentStyle'; var RUNTIME_STYLE = 'runtimeStyle'; var LEFT = 'left'; var PX = 'px'; function _getComputedStyleIE(elem, name) { // currentStyle maybe null // http://msdn.microsoft.com/en-us/library/ms535231.aspx var ret = elem[CURRENT_STYLE] && elem[CURRENT_STYLE][name]; // 当 width/height 设置为百分比时,通过 pixelLeft 方式转换的 width/height 值 // 一开始就处理了! CUSTOM_STYLE.height,CUSTOM_STYLE.width ,cssHook 解决@2011-08-19 // 在 ie 下不对,需要直接用 offset 方式 // borderWidth 等值也有问题,但考虑到 borderWidth 设为百分比的概率很小,这里就不考虑了 // From the awesome hack by Dean Edwards // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 // If we're not dealing with a regular pixel number // but a number that has a weird ending, we need to convert it to pixels // exclude left right for relativity if (_RE_NUM_NO_PX.test(ret) && !RE_POS.test(name)) { // Remember the original values var style = elem.style; var left = style[LEFT]; var rsLeft = elem[RUNTIME_STYLE][LEFT]; // prevent flashing of content elem[RUNTIME_STYLE][LEFT] = elem[CURRENT_STYLE][LEFT]; // Put in the new values to get a computed value out style[LEFT] = name === 'fontSize' ? '1em' : ret || 0; ret = style.pixelLeft + PX; // Revert the changed values style[LEFT] = left; elem[RUNTIME_STYLE][LEFT] = rsLeft; } return ret === '' ? 'auto' : ret; } var getComputedStyleX = undefined; if (typeof window !== 'undefined') { getComputedStyleX = window.getComputedStyle ? _getComputedStyle : _getComputedStyleIE; } function each(arr, fn) { for (var i = 0; i < arr.length; i++) { fn(arr[i]); } } function isBorderBoxFn(elem) { return getComputedStyleX(elem, 'boxSizing') === 'border-box'; } var BOX_MODELS = ['margin', 'border', 'padding']; var CONTENT_INDEX = -1; var PADDING_INDEX = 2; var BORDER_INDEX = 1; var MARGIN_INDEX = 0; function swap(elem, options, callback) { var old = {}; var style = elem.style; var name = undefined; // Remember the old values, and insert the new ones for (name in options) { if (options.hasOwnProperty(name)) { old[name] = style[name]; style[name] = options[name]; } } callback.call(elem); // Revert the old values for (name in options) { if (options.hasOwnProperty(name)) { style[name] = old[name]; } } } function getPBMWidth(elem, props, which) { var value = 0; var prop = undefined; var j = undefined; var i = undefined; for (j = 0; j < props.length; j++) { prop = props[j]; if (prop) { for (i = 0; i < which.length; i++) { var cssProp = undefined; if (prop === 'border') { cssProp = prop + which[i] + 'Width'; } else { cssProp = prop + which[i]; } value += parseFloat(getComputedStyleX(elem, cssProp)) || 0; } } } return value; } /** * A crude way of determining if an object is a window * @member util */ function isWindow(obj) { // must use == for ie8 /* eslint eqeqeq:0 */ return obj != null && obj == obj.window; } var domUtils = {}; each(['Width', 'Height'], function (name) { domUtils['doc' + name] = function (refWin) { var d = refWin.document; return Math.max( // firefox chrome documentElement.scrollHeight< body.scrollHeight // ie standard mode : documentElement.scrollHeight> body.scrollHeight d.documentElement['scroll' + name], // quirks : documentElement.scrollHeight 最大等于可视窗口多一点? d.body['scroll' + name], domUtils['viewport' + name](d)); }; domUtils['viewport' + name] = function (win) { // pc browser includes scrollbar in window.innerWidth var prop = 'client' + name; var doc = win.document; var body = doc.body; var documentElement = doc.documentElement; var documentElementProp = documentElement[prop]; // 标准模式取 documentElement // backcompat 取 body return doc.compatMode === 'CSS1Compat' && documentElementProp || body && body[prop] || documentElementProp; }; }); /* 得到元素的大小信息 @param elem @param name @param {String} [extra] 'padding' : (css width) + padding 'border' : (css width) + padding + border 'margin' : (css width) + padding + border + margin */ function getWH(elem, name, extra) { if (isWindow(elem)) { return name === 'width' ? domUtils.viewportWidth(elem) : domUtils.viewportHeight(elem); } else if (elem.nodeType === 9) { return name === 'width' ? domUtils.docWidth(elem) : domUtils.docHeight(elem); } var which = name === 'width' ? ['Left', 'Right'] : ['Top', 'Bottom']; var borderBoxValue = name === 'width' ? elem.offsetWidth : elem.offsetHeight; var computedStyle = getComputedStyleX(elem); var isBorderBox = isBorderBoxFn(elem, computedStyle); var cssBoxValue = 0; if (borderBoxValue == null || borderBoxValue <= 0) { borderBoxValue = undefined; // Fall back to computed then un computed css if necessary cssBoxValue = getComputedStyleX(elem, name); if (cssBoxValue == null || Number(cssBoxValue) < 0) { cssBoxValue = elem.style[name] || 0; } // Normalize '', auto, and prepare for extra cssBoxValue = parseFloat(cssBoxValue) || 0; } if (extra === undefined) { extra = isBorderBox ? BORDER_INDEX : CONTENT_INDEX; } var borderBoxValueOrIsBorderBox = borderBoxValue !== undefined || isBorderBox; var val = borderBoxValue || cssBoxValue; if (extra === CONTENT_INDEX) { if (borderBoxValueOrIsBorderBox) { return val - getPBMWidth(elem, ['border', 'padding'], which, computedStyle); } return cssBoxValue; } if (borderBoxValueOrIsBorderBox) { var padding = extra === PADDING_INDEX ? -getPBMWidth(elem, ['border'], which, computedStyle) : getPBMWidth(elem, ['margin'], which, computedStyle); return val + (extra === BORDER_INDEX ? 0 : padding); } return cssBoxValue + getPBMWidth(elem, BOX_MODELS.slice(extra), which, computedStyle); } var cssShow = { position: 'absolute', visibility: 'hidden', display: 'block' }; // fix #119 : https://github.com/kissyteam/kissy/issues/119 function getWHIgnoreDisplay(elem) { var val = undefined; var args = arguments; // in case elem is window // elem.offsetWidth === undefined if (elem.offsetWidth !== 0) { val = getWH.apply(undefined, args); } else { swap(elem, cssShow, function () { val = getWH.apply(undefined, args); }); } return val; } function css(el, name, v) { var value = v; if ((typeof name === 'undefined' ? 'undefined' : _typeof(name)) === 'object') { for (var i in name) { if (name.hasOwnProperty(i)) { css(el, i, name[i]); } } return undefined; } if (typeof value !== 'undefined') { if (typeof value === 'number') { value += 'px'; } el.style[name] = value; return undefined; } return getComputedStyleX(el, name); } each(['width', 'height'], function (name) { var first = name.charAt(0).toUpperCase() + name.slice(1); domUtils['outer' + first] = function (el, includeMargin) { return el && getWHIgnoreDisplay(el, name, includeMargin ? MARGIN_INDEX : BORDER_INDEX); }; var which = name === 'width' ? ['Left', 'Right'] : ['Top', 'Bottom']; domUtils[name] = function (elem, val) { if (val !== undefined) { if (elem) { var computedStyle = getComputedStyleX(elem); var isBorderBox = isBorderBoxFn(elem); if (isBorderBox) { val += getPBMWidth(elem, ['padding', 'border'], which, computedStyle); } return css(elem, name, val); } return undefined; } return elem && getWHIgnoreDisplay(elem, name, CONTENT_INDEX); }; }); // 设置 elem 相对 elem.ownerDocument 的坐标 function setOffset(elem, offset) { // set position first, in-case top/left are set even on static elem if (css(elem, 'position') === 'static') { elem.style.position = 'relative'; } var old = getOffset(elem); var ret = {}; var current = undefined; var key = undefined; for (key in offset) { if (offset.hasOwnProperty(key)) { current = parseFloat(css(elem, key)) || 0; ret[key] = current + offset[key] - old[key]; } } css(elem, ret); } module.exports = _extends({ getWindow: function getWindow(node) { var doc = node.ownerDocument || node; return doc.defaultView || doc.parentWindow; }, offset: function offset(el, value) { if (typeof value !== 'undefined') { setOffset(el, value); } else { return getOffset(el); } }, isWindow: isWindow, each: each, css: css, clone: function clone(obj) { var ret = {}; for (var i in obj) { if (obj.hasOwnProperty(i)) { ret[i] = obj[i]; } } var overflow = obj.overflow; if (overflow) { for (var i in obj) { if (obj.hasOwnProperty(i)) { ret.overflow[i] = obj.overflow[i]; } } } return ret; }, scrollLeft: function scrollLeft(w, v) { if (isWindow(w)) { if (v === undefined) { return getScrollLeft(w); } window.scrollTo(v, getScrollTop(w)); } else { if (v === undefined) { return w.scrollLeft; } w.scrollLeft = v; } }, scrollTop: function scrollTop(w, v) { if (isWindow(w)) { if (v === undefined) { return getScrollTop(w); } window.scrollTo(getScrollLeft(w), v); } else { if (v === undefined) { return w.scrollTop; } w.scrollTop = v; } }, viewportWidth: 0, viewportHeight: 0 }, domUtils); /***/ }), /***/ "5uwJ": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAAAXNSR0IArs4c6QAAA4lJREFUWEftl01oHGUYx3//2dUQojub1CoePJQaKfFkTQ5+0YJ46UFFBQ8q9ZNEatLsxtaj40lBs7uKXaFpIVVQ8OChCCJ4CIJVGtsiogc/DkrVQm2ys1htTHYemTG7zq4N3W22mwjOcXif//t7n/d5nvmPWGeP1hkP/x0gzzPnq4HmgG/8GvM8Be3Idl2G3Kzdj/E0sNWM3lY2kJgHjsuhWJrUe63ExtdGQBs9u2LB53WMnRcr1BA33ZVm9LSn31rVi4DccTto8HhdsAgwrClBIQyn7qTioJ/Xk03FxxbJnbCbLeDosqAhXutKsm9XD983Wxdhve07y+bFCqNBwGikLwIZQ35Bx1uBUkN2pssFPdaKQOPaVMamq1evC2Rpu2fJMH7G01JVR6lxOwLcEh0qwaA/qWOrAXIzNmjG7LLGp+WCbm3US3uWDnwKwIMYCeCdlBg5mdcfcjM2V+2opIs794LKqwHqe95SSz5+dEAx7+fVF9fbMGFbFiscBvobau4jP6+7wgzVCrdcUFsG5UqavVnbERhvm+HGYML9o327LuOGjgG5Gdtj8FK1GyXOInaasRvjjhDIEdsvOVBfmu45nymMh2uFK36QuKeU0xduxmbM2NYxIMGswVANBj7u7uaBUy/qdDQDOw3UULj7r9/CM8eGtVh9vzZAIpwzu8t5FRs7uONAEl8qwVjpFc2cb5x0HAjxDQ5j5Ul9uD6A/qaoOA57Sznl1vzK6gDEoas3MfzdmBbWrqjFJxi31cDEZ5cb9/1a0C9r0vbXpek66VM044nYYPwJuNfP6/OOF3X1+5jO2lhgTGJElgNxDiM0cCPA7dGkTrDtkn864h9sN2t3YrxrRp0DiF1nf9vtR+9z5lYWKK1kP9w9ttmWOIwx0NBxH5QL2qFUxsKii0yUxFB4r6vxQ6kJG6LC0eVrOVLO65+CXha+aq9dufgnLwMPmUgK3tq4idGw+8IMHagVnDhUzuvRVQFl7E2MR6IDOhzwc3pqJT0zk6S6H4nQU281MRvzKcUEFK91+XZggEozcCdOkTzzI/1BhV1mUZFGJt8Rg6WcTjSjUevAaBZkbcqCqOLb9kjs9/MablUwso7XPGs95yq8Gp8VrQrF10tM9biM/+zp91Z16jx0Omt3BwEjiJswNoSjoUnBAHEm/JVOiDfmc3q/ybh/LWuLqb/Yzc8X9z/QhbK57jL0F0MRw3k9o7x7AAAAAElFTkSuQmCC" /***/ }), /***/ "6Jhx": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJgAAABoCAYAAAANUDk4AAAAAXNSR0IArs4c6QAAAmxJREFUeF7t3LFNBFEQBFE2WYIi2cNFCJOR6lpvAxh1d5XxrX1er9fnhy+zwPM8Xz/DvDuf590LZMz4pyAE+6chnfl7AYIx43QBgp3O6zjBOHC6AMFO53WcYBw4XYBgp/M6TjAOnC5AsNN5HScYB04XINjpvI4TjAOnCxDsdF7HCcaB0wUIdjqv4wTjwOkCBDud13GCceB0AYKdzus4wThwugDBTud1nGAcOF2AYKfzOk4wDpwuQLDTeR0nGAdOFyDY6byOE4wDpwsQ7HRexwnGgdMFCHY6r+O/BXv3RfwfLEaQYDEga3EItkY01odgMSBrcTzy14jG+hAsBmQtDsHWiMb6ECwGZC0OwdaIxvoQLAZkLQ7B1ojG+hAsBmQtDsHWiMb6ECwGZC0OwdaIxvoQLAZkLQ7B1ojG+hAsBmQtDsHWiMb6ECwGZC0OwdaIxvoQLAZkLQ7B1ojG+hAsBmQtDsHWiMb6ECwGZC0OwdaIxvoQLAZkLQ7B1ojG+hAsBmQtDsHWiMb6ECwGZC0OwdaIxvoQLAZkLQ7B1ojG+hAsBmQtzm/B3r2ff7TGCBIsBmQtDsHWiMb6ECwGZC2OR/4a0VgfgsWArMUh2BrRWB+CxYCsxSHYGtFYH4LFgKzFIdga0VgfgsWArMUh2BrRWB+CxYCsxSHYGtFYH4LFgKzFIdga0VgfgsWArMUh2BrRWB+CxYCsxSHYGtFYH4LFgKzFIdga0VgfgsWArMUh2BrRWB+CxYCsxSHYGtFYH4LFgKzFIdga0VgfgsWArMUh2BrRWB+CxYCsxSHYGtFYH4LFgKzFIdga0VifNcG+AeKO5ad/GBYzAAAAAElFTkSuQmCC" /***/ }), /***/ "6Mj6": /***/ (function(module, exports) { module.exports = "data:image/png;base64,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" /***/ }), /***/ "6Qz+": /***/ (function(module, exports) { module.exports = "data:image/png;base64,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" /***/ }), /***/ "6VvU": /***/ (function(module, exports, __webpack_require__) { "use strict"; module.exports = isMobile module.exports.isMobile = isMobile module.exports.default = isMobile var mobileRE = /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i var tabletRE = /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino|android|ipad|playbook|silk/i function isMobile (opts) { if (!opts) opts = {} var ua = opts.ua if (!ua && typeof navigator !== 'undefined') ua = navigator.userAgent if (ua && ua.headers && typeof ua.headers['user-agent'] === 'string') { ua = ua.headers['user-agent'] } if (typeof ua !== 'string') return false var result = opts.tablet ? tabletRE.test(ua) : mobileRE.test(ua) if ( !result && opts.tablet && opts.featureDetect && navigator && navigator.maxTouchPoints > 1 && ua.indexOf('Macintosh') !== -1 && ua.indexOf('Safari') !== -1 ) { result = true } return result } /***/ }), /***/ "6gD4": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // EXTERNAL MODULE: ./node_modules/react/index.js var react = __webpack_require__("GiK3"); var react_default = /*#__PURE__*/__webpack_require__.n(react); // EXTERNAL MODULE: ./node_modules/mini-store/lib/index.js var lib = __webpack_require__("sqSY"); var lib_default = /*#__PURE__*/__webpack_require__.n(lib); // EXTERNAL MODULE: ./node_modules/rc-util/es/KeyCode.js var KeyCode = __webpack_require__("opmb"); // EXTERNAL MODULE: ./node_modules/rc-util/es/createChainedFunction.js var createChainedFunction = __webpack_require__("Erof"); // EXTERNAL MODULE: ./node_modules/shallowequal/index.js var shallowequal = __webpack_require__("Ngpj"); var shallowequal_default = /*#__PURE__*/__webpack_require__.n(shallowequal); // EXTERNAL MODULE: ./node_modules/classnames/index.js var classnames = __webpack_require__("HW6M"); var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); // CONCATENATED MODULE: ./node_modules/rc-menu/es/utils/isMobile.js function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } 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; } function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } // MIT License from https://github.com/kaimallea/isMobile var applePhone = /iPhone/i; var appleIpod = /iPod/i; var appleTablet = /iPad/i; var androidPhone = /\bAndroid(?:.+)Mobile\b/i; // Match 'Android' AND 'Mobile' var androidTablet = /Android/i; var amazonPhone = /\bAndroid(?:.+)SD4930UR\b/i; var amazonTablet = /\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i; var windowsPhone = /Windows Phone/i; var windowsTablet = /\bWindows(?:.+)ARM\b/i; // Match 'Windows' AND 'ARM' var otherBlackberry = /BlackBerry/i; var otherBlackberry10 = /BB10/i; var otherOpera = /Opera Mini/i; var otherChrome = /\b(CriOS|Chrome)(?:.+)Mobile/i; var otherFirefox = /Mobile(?:.+)Firefox\b/i; // Match 'Mobile' AND 'Firefox' function match(regex, userAgent) { return regex.test(userAgent); } function isMobile(userAgent) { var ua = userAgent || (typeof navigator !== 'undefined' ? navigator.userAgent : ''); // Facebook mobile app's integrated browser adds a bunch of strings that // match everything. Strip it out if it exists. var tmp = ua.split('[FBAN'); if (typeof tmp[1] !== 'undefined') { var _tmp = tmp; var _tmp2 = _slicedToArray(_tmp, 1); ua = _tmp2[0]; } // Twitter mobile app's integrated browser on iPad adds a "Twitter for // iPhone" string. Same probably happens on other tablet platforms. // This will confuse detection so strip it out if it exists. tmp = ua.split('Twitter'); if (typeof tmp[1] !== 'undefined') { var _tmp3 = tmp; var _tmp4 = _slicedToArray(_tmp3, 1); ua = _tmp4[0]; } var result = { apple: { phone: match(applePhone, ua) && !match(windowsPhone, ua), ipod: match(appleIpod, ua), tablet: !match(applePhone, ua) && match(appleTablet, ua) && !match(windowsPhone, ua), device: (match(applePhone, ua) || match(appleIpod, ua) || match(appleTablet, ua)) && !match(windowsPhone, ua) }, amazon: { phone: match(amazonPhone, ua), tablet: !match(amazonPhone, ua) && match(amazonTablet, ua), device: match(amazonPhone, ua) || match(amazonTablet, ua) }, android: { phone: !match(windowsPhone, ua) && match(amazonPhone, ua) || !match(windowsPhone, ua) && match(androidPhone, ua), tablet: !match(windowsPhone, ua) && !match(amazonPhone, ua) && !match(androidPhone, ua) && (match(amazonTablet, ua) || match(androidTablet, ua)), device: !match(windowsPhone, ua) && (match(amazonPhone, ua) || match(amazonTablet, ua) || match(androidPhone, ua) || match(androidTablet, ua)) || match(/\bokhttp\b/i, ua) }, windows: { phone: match(windowsPhone, ua), tablet: match(windowsTablet, ua), device: match(windowsPhone, ua) || match(windowsTablet, ua) }, other: { blackberry: match(otherBlackberry, ua), blackberry10: match(otherBlackberry10, ua), opera: match(otherOpera, ua), firefox: match(otherFirefox, ua), chrome: match(otherChrome, ua), device: match(otherBlackberry, ua) || match(otherBlackberry10, ua) || match(otherOpera, ua) || match(otherFirefox, ua) || match(otherChrome, ua) }, // Additional any: null, phone: null, tablet: null }; result.any = result.apple.device || result.android.device || result.windows.device || result.other.device; // excludes 'other' devices and ipods, targeting touchscreen phones result.phone = result.apple.phone || result.android.phone || result.windows.phone; result.tablet = result.apple.tablet || result.android.tablet || result.windows.tablet; return result; } var defaultResult = _objectSpread({}, isMobile(), { isMobile: isMobile }); /* harmony default export */ var utils_isMobile = (defaultResult); // CONCATENATED MODULE: ./node_modules/rc-menu/es/util.js function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function noop() {} function getKeyFromChildrenIndex(child, menuEventKey, index) { var prefix = menuEventKey || ''; return child.key || "".concat(prefix, "item_").concat(index); } function getMenuIdFromSubMenuEventKey(eventKey) { return "".concat(eventKey, "-menu-"); } function loopMenuItem(children, cb) { var index = -1; react["Children"].forEach(children, function (c) { index += 1; if (c && c.type && c.type.isMenuItemGroup) { react["Children"].forEach(c.props.children, function (c2) { index += 1; cb(c2, index); }); } else { cb(c, index); } }); } function loopMenuItemRecursively(children, keys, ret) { /* istanbul ignore if */ if (!children || ret.find) { return; } react["Children"].forEach(children, function (c) { if (c) { var construct = c.type; if (!construct || !(construct.isSubMenu || construct.isMenuItem || construct.isMenuItemGroup)) { return; } if (keys.indexOf(c.key) !== -1) { ret.find = true; } else if (c.props.children) { loopMenuItemRecursively(c.props.children, keys, ret); } } }); } var menuAllProps = ['defaultSelectedKeys', 'selectedKeys', 'defaultOpenKeys', 'openKeys', 'mode', 'getPopupContainer', 'onSelect', 'onDeselect', 'onDestroy', 'openTransitionName', 'openAnimation', 'subMenuOpenDelay', 'subMenuCloseDelay', 'forceSubMenuRender', 'triggerSubMenuAction', 'level', 'selectable', 'multiple', 'onOpenChange', 'visible', 'focusable', 'defaultActiveFirst', 'prefixCls', 'inlineIndent', 'parentMenu', 'title', 'rootPrefixCls', 'eventKey', 'active', 'onItemHover', 'onTitleMouseEnter', 'onTitleMouseLeave', 'onTitleClick', 'popupAlign', 'popupOffset', 'isOpen', 'renderMenuItem', 'manualRef', 'subMenuKey', 'disabled', 'index', 'isSelected', 'store', 'activeKey', 'builtinPlacements', 'overflowedIndicator', 'motion', // the following keys found need to be removed from test regression 'attribute', 'value', 'popupClassName', 'inlineCollapsed', 'menu', 'theme', 'itemIcon', 'expandIcon']; // ref: https://github.com/ant-design/ant-design/issues/14007 // ref: https://bugs.chromium.org/p/chromium/issues/detail?id=360889 // getBoundingClientRect return the full precision value, which is // not the same behavior as on chrome. Set the precision to 6 to // unify their behavior var getWidth = function getWidth(elem) { var width = elem && typeof elem.getBoundingClientRect === 'function' && elem.getBoundingClientRect().width; if (width) { width = +width.toFixed(6); } return width || 0; }; var setStyle = function setStyle(elem, styleProperty, value) { if (elem && _typeof(elem.style) === 'object') { elem.style[styleProperty] = value; } }; var util_isMobileDevice = function isMobileDevice() { return utils_isMobile.any; }; // EXTERNAL MODULE: ./node_modules/react-dom/index.js var react_dom = __webpack_require__("O27J"); var react_dom_default = /*#__PURE__*/__webpack_require__.n(react_dom); // EXTERNAL MODULE: ./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js var ResizeObserver_es = __webpack_require__("z+gd"); // EXTERNAL MODULE: ./node_modules/rc-trigger/es/index.js + 4 modules var es = __webpack_require__("isWq"); // EXTERNAL MODULE: ./node_modules/rc-animate/es/CSSMotion.js + 1 modules var CSSMotion = __webpack_require__("cz5N"); // CONCATENATED MODULE: ./node_modules/rc-menu/es/placements.js var autoAdjustOverflow = { adjustX: 1, adjustY: 1 }; var placements = { topLeft: { points: ['bl', 'tl'], overflow: autoAdjustOverflow, offset: [0, -7] }, bottomLeft: { points: ['tl', 'bl'], overflow: autoAdjustOverflow, offset: [0, 7] }, leftTop: { points: ['tr', 'tl'], overflow: autoAdjustOverflow, offset: [-4, 0] }, rightTop: { points: ['tl', 'tr'], overflow: autoAdjustOverflow, offset: [4, 0] } }; /* harmony default export */ var es_placements = (placements); // CONCATENATED MODULE: ./node_modules/rc-menu/es/SubMenu.js function SubMenu__typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { SubMenu__typeof = function _typeof(obj) { return typeof obj; }; } else { SubMenu__typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return SubMenu__typeof(obj); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (SubMenu__typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function SubMenu_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function SubMenu__objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { SubMenu_ownKeys(Object(source), true).forEach(function (key) { SubMenu__defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { SubMenu_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function SubMenu__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; } // import Animate from 'rc-animate'; var guid = 0; var popupPlacementMap = { horizontal: 'bottomLeft', vertical: 'rightTop', 'vertical-left': 'rightTop', 'vertical-right': 'leftTop' }; var SubMenu_updateDefaultActiveFirst = function updateDefaultActiveFirst(store, eventKey, defaultActiveFirst) { var menuId = getMenuIdFromSubMenuEventKey(eventKey); var state = store.getState(); store.setState({ defaultActiveFirst: SubMenu__objectSpread({}, state.defaultActiveFirst, SubMenu__defineProperty({}, menuId, defaultActiveFirst)) }); }; var SubMenu_SubMenu = /*#__PURE__*/ function (_React$Component) { _inherits(SubMenu, _React$Component); function SubMenu(props) { var _this; _classCallCheck(this, SubMenu); _this = _possibleConstructorReturn(this, _getPrototypeOf(SubMenu).call(this, props)); _this.onDestroy = function (key) { _this.props.onDestroy(key); }; /** * note: * This legacy code that `onKeyDown` is called by parent instead of dom self. * which need return code to check if this event is handled */ _this.onKeyDown = function (e) { var keyCode = e.keyCode; var menu = _this.menuInstance; var _this$props = _this.props, isOpen = _this$props.isOpen, store = _this$props.store; if (keyCode === KeyCode["a" /* default */].ENTER) { _this.onTitleClick(e); SubMenu_updateDefaultActiveFirst(store, _this.props.eventKey, true); return true; } if (keyCode === KeyCode["a" /* default */].RIGHT) { if (isOpen) { menu.onKeyDown(e); } else { _this.triggerOpenChange(true); // need to update current menu's defaultActiveFirst value SubMenu_updateDefaultActiveFirst(store, _this.props.eventKey, true); } return true; } if (keyCode === KeyCode["a" /* default */].LEFT) { var handled; if (isOpen) { handled = menu.onKeyDown(e); } else { return undefined; } if (!handled) { _this.triggerOpenChange(false); handled = true; } return handled; } if (isOpen && (keyCode === KeyCode["a" /* default */].UP || keyCode === KeyCode["a" /* default */].DOWN)) { return menu.onKeyDown(e); } return undefined; }; _this.onOpenChange = function (e) { _this.props.onOpenChange(e); }; _this.onPopupVisibleChange = function (visible) { _this.triggerOpenChange(visible, visible ? 'mouseenter' : 'mouseleave'); }; _this.onMouseEnter = function (e) { var _this$props2 = _this.props, key = _this$props2.eventKey, onMouseEnter = _this$props2.onMouseEnter, store = _this$props2.store; SubMenu_updateDefaultActiveFirst(store, _this.props.eventKey, false); onMouseEnter({ key: key, domEvent: e }); }; _this.onMouseLeave = function (e) { var _this$props3 = _this.props, parentMenu = _this$props3.parentMenu, eventKey = _this$props3.eventKey, onMouseLeave = _this$props3.onMouseLeave; parentMenu.subMenuInstance = _assertThisInitialized(_this); onMouseLeave({ key: eventKey, domEvent: e }); }; _this.onTitleMouseEnter = function (domEvent) { var _this$props4 = _this.props, key = _this$props4.eventKey, onItemHover = _this$props4.onItemHover, onTitleMouseEnter = _this$props4.onTitleMouseEnter; onItemHover({ key: key, hover: true }); onTitleMouseEnter({ key: key, domEvent: domEvent }); }; _this.onTitleMouseLeave = function (e) { var _this$props5 = _this.props, parentMenu = _this$props5.parentMenu, eventKey = _this$props5.eventKey, onItemHover = _this$props5.onItemHover, onTitleMouseLeave = _this$props5.onTitleMouseLeave; parentMenu.subMenuInstance = _assertThisInitialized(_this); onItemHover({ key: eventKey, hover: false }); onTitleMouseLeave({ key: eventKey, domEvent: e }); }; _this.onTitleClick = function (e) { var _assertThisInitialize = _assertThisInitialized(_this), props = _assertThisInitialize.props; props.onTitleClick({ key: props.eventKey, domEvent: e }); if (props.triggerSubMenuAction === 'hover') { return; } _this.triggerOpenChange(!props.isOpen, 'click'); SubMenu_updateDefaultActiveFirst(props.store, _this.props.eventKey, false); }; _this.onSubMenuClick = function (info) { // in the case of overflowed submenu // onClick is not copied over if (typeof _this.props.onClick === 'function') { _this.props.onClick(_this.addKeyPath(info)); } }; _this.onSelect = function (info) { _this.props.onSelect(info); }; _this.onDeselect = function (info) { _this.props.onDeselect(info); }; _this.getPrefixCls = function () { return "".concat(_this.props.rootPrefixCls, "-submenu"); }; _this.getActiveClassName = function () { return "".concat(_this.getPrefixCls(), "-active"); }; _this.getDisabledClassName = function () { return "".concat(_this.getPrefixCls(), "-disabled"); }; _this.getSelectedClassName = function () { return "".concat(_this.getPrefixCls(), "-selected"); }; _this.getOpenClassName = function () { return "".concat(_this.props.rootPrefixCls, "-submenu-open"); }; _this.saveMenuInstance = function (c) { // children menu instance _this.menuInstance = c; }; _this.addKeyPath = function (info) { return SubMenu__objectSpread({}, info, { keyPath: (info.keyPath || []).concat(_this.props.eventKey) }); }; _this.triggerOpenChange = function (open, type) { var key = _this.props.eventKey; var openChange = function openChange() { _this.onOpenChange({ key: key, item: _assertThisInitialized(_this), trigger: type, open: open }); }; if (type === 'mouseenter') { // make sure mouseenter happen after other menu item's mouseleave _this.mouseenterTimeout = setTimeout(function () { openChange(); }, 0); } else { openChange(); } }; _this.isChildrenSelected = function () { var ret = { find: false }; loopMenuItemRecursively(_this.props.children, _this.props.selectedKeys, ret); return ret.find; }; _this.isOpen = function () { return _this.props.openKeys.indexOf(_this.props.eventKey) !== -1; }; _this.adjustWidth = function () { /* istanbul ignore if */ if (!_this.subMenuTitle || !_this.menuInstance) { return; } var popupMenu = react_dom["findDOMNode"](_this.menuInstance); if (popupMenu.offsetWidth >= _this.subMenuTitle.offsetWidth) { return; } /* istanbul ignore next */ popupMenu.style.minWidth = "".concat(_this.subMenuTitle.offsetWidth, "px"); }; _this.saveSubMenuTitle = function (subMenuTitle) { _this.subMenuTitle = subMenuTitle; }; var store = props.store, eventKey = props.eventKey; var _store$getState = store.getState(), defaultActiveFirst = _store$getState.defaultActiveFirst; _this.isRootMenu = false; var value = false; if (defaultActiveFirst) { value = defaultActiveFirst[eventKey]; } SubMenu_updateDefaultActiveFirst(store, eventKey, value); return _this; } _createClass(SubMenu, [{ key: "componentDidMount", value: function componentDidMount() { this.componentDidUpdate(); } }, { key: "componentDidUpdate", value: function componentDidUpdate() { var _this2 = this; var _this$props6 = this.props, mode = _this$props6.mode, parentMenu = _this$props6.parentMenu, manualRef = _this$props6.manualRef; // invoke customized ref to expose component to mixin if (manualRef) { manualRef(this); } if (mode !== 'horizontal' || !parentMenu.isRootMenu || !this.props.isOpen) { return; } this.minWidthTimeout = setTimeout(function () { return _this2.adjustWidth(); }, 0); } }, { key: "componentWillUnmount", value: function componentWillUnmount() { var _this$props7 = this.props, onDestroy = _this$props7.onDestroy, eventKey = _this$props7.eventKey; if (onDestroy) { onDestroy(eventKey); } /* istanbul ignore if */ if (this.minWidthTimeout) { clearTimeout(this.minWidthTimeout); } /* istanbul ignore if */ if (this.mouseenterTimeout) { clearTimeout(this.mouseenterTimeout); } } }, { key: "renderChildren", value: function renderChildren(children) { var _this3 = this; var props = this.props; var baseProps = { mode: props.mode === 'horizontal' ? 'vertical' : props.mode, visible: this.props.isOpen, level: props.level + 1, inlineIndent: props.inlineIndent, focusable: false, onClick: this.onSubMenuClick, onSelect: this.onSelect, onDeselect: this.onDeselect, onDestroy: this.onDestroy, selectedKeys: props.selectedKeys, eventKey: "".concat(props.eventKey, "-menu-"), openKeys: props.openKeys, motion: props.motion, onOpenChange: this.onOpenChange, subMenuOpenDelay: props.subMenuOpenDelay, parentMenu: this, subMenuCloseDelay: props.subMenuCloseDelay, forceSubMenuRender: props.forceSubMenuRender, triggerSubMenuAction: props.triggerSubMenuAction, builtinPlacements: props.builtinPlacements, defaultActiveFirst: props.store.getState().defaultActiveFirst[getMenuIdFromSubMenuEventKey(props.eventKey)], multiple: props.multiple, prefixCls: props.rootPrefixCls, id: this.internalMenuId, manualRef: this.saveMenuInstance, itemIcon: props.itemIcon, expandIcon: props.expandIcon }; var haveRendered = this.haveRendered; this.haveRendered = true; this.haveOpened = this.haveOpened || baseProps.visible || baseProps.forceSubMenuRender; // never rendered not planning to, don't render if (!this.haveOpened) { return react["createElement"]("div", null); } // ================== Motion ================== // don't show transition on first rendering (no animation for opened menu) // show appear transition if it's not visible (not sure why) // show appear transition if it's not inline mode var mergedMotion = SubMenu__objectSpread({}, props.motion, { leavedClassName: "".concat(props.rootPrefixCls, "-hidden"), removeOnLeave: false, motionAppear: haveRendered || !baseProps.visible || baseProps.mode !== 'inline' }); return react["createElement"](CSSMotion["b" /* default */], Object.assign({ visible: baseProps.visible }, mergedMotion), function (_ref) { var className = _ref.className, style = _ref.style; var mergedClassName = classnames_default()("".concat(baseProps.prefixCls, "-sub"), className); return react["createElement"](es_SubPopupMenu, Object.assign({}, baseProps, { id: _this3.internalMenuId, className: mergedClassName, style: style }), children); }); } }, { key: "render", value: function render() { var _classNames; var props = SubMenu__objectSpread({}, this.props); var isOpen = props.isOpen; var prefixCls = this.getPrefixCls(); var isInlineMode = props.mode === 'inline'; var className = classnames_default()(prefixCls, "".concat(prefixCls, "-").concat(props.mode), (_classNames = {}, SubMenu__defineProperty(_classNames, props.className, !!props.className), SubMenu__defineProperty(_classNames, this.getOpenClassName(), isOpen), SubMenu__defineProperty(_classNames, this.getActiveClassName(), props.active || isOpen && !isInlineMode), SubMenu__defineProperty(_classNames, this.getDisabledClassName(), props.disabled), SubMenu__defineProperty(_classNames, this.getSelectedClassName(), this.isChildrenSelected()), _classNames)); if (!this.internalMenuId) { if (props.eventKey) { this.internalMenuId = "".concat(props.eventKey, "$Menu"); } else { guid += 1; this.internalMenuId = "$__$".concat(guid, "$Menu"); } } var mouseEvents = {}; var titleClickEvents = {}; var titleMouseEvents = {}; if (!props.disabled) { mouseEvents = { onMouseLeave: this.onMouseLeave, onMouseEnter: this.onMouseEnter }; // only works in title, not outer li titleClickEvents = { onClick: this.onTitleClick }; titleMouseEvents = { onMouseEnter: this.onTitleMouseEnter, onMouseLeave: this.onTitleMouseLeave }; } var style = {}; if (isInlineMode) { style.paddingLeft = props.inlineIndent * props.level; } var ariaOwns = {}; // only set aria-owns when menu is open // otherwise it would be an invalid aria-owns value // since corresponding node cannot be found if (this.props.isOpen) { ariaOwns = { 'aria-owns': this.internalMenuId }; } // expand custom icon should NOT be displayed in menu with horizontal mode. var icon = null; if (props.mode !== 'horizontal') { icon = this.props.expandIcon; // ReactNode if (typeof this.props.expandIcon === 'function') { icon = react["createElement"](this.props.expandIcon, SubMenu__objectSpread({}, this.props)); } } var title = react["createElement"]("div", Object.assign({ ref: this.saveSubMenuTitle, style: style, className: "".concat(prefixCls, "-title") }, titleMouseEvents, titleClickEvents, { "aria-expanded": isOpen }, ariaOwns, { "aria-haspopup": "true", title: typeof props.title === 'string' ? props.title : undefined }), props.title, icon || react["createElement"]("i", { className: "".concat(prefixCls, "-arrow") })); var children = this.renderChildren(props.children); var getPopupContainer = props.parentMenu.isRootMenu ? props.parentMenu.props.getPopupContainer : function (triggerNode) { return triggerNode.parentNode; }; var popupPlacement = popupPlacementMap[props.mode]; var popupAlign = props.popupOffset ? { offset: props.popupOffset } : {}; var popupClassName = props.mode === 'inline' ? '' : props.popupClassName; var disabled = props.disabled, triggerSubMenuAction = props.triggerSubMenuAction, subMenuOpenDelay = props.subMenuOpenDelay, forceSubMenuRender = props.forceSubMenuRender, subMenuCloseDelay = props.subMenuCloseDelay, builtinPlacements = props.builtinPlacements; menuAllProps.forEach(function (key) { return delete props[key]; }); // Set onClick to null, to ignore propagated onClick event delete props.onClick; return react["createElement"]("li", Object.assign({}, props, mouseEvents, { className: className, role: "menuitem" }), isInlineMode && title, isInlineMode && children, !isInlineMode && react["createElement"](es["a" /* default */], { prefixCls: prefixCls, popupClassName: "".concat(prefixCls, "-popup ").concat(popupClassName), getPopupContainer: getPopupContainer, builtinPlacements: Object.assign({}, es_placements, builtinPlacements), popupPlacement: popupPlacement, popupVisible: isOpen, popupAlign: popupAlign, popup: children, action: disabled ? [] : [triggerSubMenuAction], mouseEnterDelay: subMenuOpenDelay, mouseLeaveDelay: subMenuCloseDelay, onPopupVisibleChange: this.onPopupVisibleChange, forceRender: forceSubMenuRender }, title)); } }]); return SubMenu; }(react["Component"]); SubMenu_SubMenu.defaultProps = { onMouseEnter: noop, onMouseLeave: noop, onTitleMouseEnter: noop, onTitleMouseLeave: noop, onTitleClick: noop, manualRef: noop, mode: 'vertical', title: '' }; var connected = Object(lib["connect"])(function (_ref2, _ref3) { var openKeys = _ref2.openKeys, activeKey = _ref2.activeKey, selectedKeys = _ref2.selectedKeys; var eventKey = _ref3.eventKey, subMenuKey = _ref3.subMenuKey; return { isOpen: openKeys.indexOf(eventKey) > -1, active: activeKey[subMenuKey] === eventKey, selectedKeys: selectedKeys }; })(SubMenu_SubMenu); connected.isSubMenu = true; /* harmony default export */ var es_SubMenu = (connected); // CONCATENATED MODULE: ./node_modules/rc-menu/es/DOMWrap.js function DOMWrap__typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { DOMWrap__typeof = function _typeof(obj) { return typeof obj; }; } else { DOMWrap__typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return DOMWrap__typeof(obj); } function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); } function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); } function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } } function DOMWrap_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function DOMWrap__objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { DOMWrap_ownKeys(Object(source), true).forEach(function (key) { DOMWrap__defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { DOMWrap_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function DOMWrap__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; } function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } function DOMWrap__classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function DOMWrap__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); } } function DOMWrap__createClass(Constructor, protoProps, staticProps) { if (protoProps) DOMWrap__defineProperties(Constructor.prototype, protoProps); if (staticProps) DOMWrap__defineProperties(Constructor, staticProps); return Constructor; } function DOMWrap__possibleConstructorReturn(self, call) { if (call && (DOMWrap__typeof(call) === "object" || typeof call === "function")) { return call; } return DOMWrap__assertThisInitialized(self); } function DOMWrap__getPrototypeOf(o) { DOMWrap__getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return DOMWrap__getPrototypeOf(o); } function DOMWrap__assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function DOMWrap__inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) DOMWrap__setPrototypeOf(subClass, superClass); } function DOMWrap__setPrototypeOf(o, p) { DOMWrap__setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return DOMWrap__setPrototypeOf(o, p); } var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); var MENUITEM_OVERFLOWED_CLASSNAME = 'menuitem-overflowed'; var FLOAT_PRECISION_ADJUST = 0.5; // Fix ssr if (canUseDOM) { // eslint-disable-next-line global-require __webpack_require__("yNhk"); } var DOMWrap_DOMWrap = /*#__PURE__*/ function (_React$Component) { DOMWrap__inherits(DOMWrap, _React$Component); function DOMWrap() { var _this; DOMWrap__classCallCheck(this, DOMWrap); _this = DOMWrap__possibleConstructorReturn(this, DOMWrap__getPrototypeOf(DOMWrap).apply(this, arguments)); _this.resizeObserver = null; _this.mutationObserver = null; // original scroll size of the list _this.originalTotalWidth = 0; // copy of overflowed items _this.overflowedItems = []; // cache item of the original items (so we can track the size and order) _this.menuItemSizes = []; _this.state = { lastVisibleIndex: undefined }; // get all valid menuItem nodes _this.getMenuItemNodes = function () { var prefixCls = _this.props.prefixCls; var ul = react_dom["findDOMNode"](DOMWrap__assertThisInitialized(_this)); if (!ul) { return []; } // filter out all overflowed indicator placeholder return [].slice.call(ul.children).filter(function (node) { return node.className.split(' ').indexOf("".concat(prefixCls, "-overflowed-submenu")) < 0; }); }; _this.getOverflowedSubMenuItem = function (keyPrefix, overflowedItems, renderPlaceholder) { var _this$props = _this.props, overflowedIndicator = _this$props.overflowedIndicator, level = _this$props.level, mode = _this$props.mode, prefixCls = _this$props.prefixCls, theme = _this$props.theme; if (level !== 1 || mode !== 'horizontal') { return null; } // put all the overflowed item inside a submenu // with a title of overflow indicator ('...') var copy = _this.props.children[0]; var _copy$props = copy.props, throwAway = _copy$props.children, title = _copy$props.title, propStyle = _copy$props.style, rest = _objectWithoutProperties(_copy$props, ["children", "title", "style"]); var style = DOMWrap__objectSpread({}, propStyle); var key = "".concat(keyPrefix, "-overflowed-indicator"); var eventKey = "".concat(keyPrefix, "-overflowed-indicator"); if (overflowedItems.length === 0 && renderPlaceholder !== true) { style = DOMWrap__objectSpread({}, style, { display: 'none' }); } else if (renderPlaceholder) { style = DOMWrap__objectSpread({}, style, { visibility: 'hidden', // prevent from taking normal dom space position: 'absolute' }); key = "".concat(key, "-placeholder"); eventKey = "".concat(eventKey, "-placeholder"); } var popupClassName = theme ? "".concat(prefixCls, "-").concat(theme) : ''; var props = {}; menuAllProps.forEach(function (k) { if (rest[k] !== undefined) { props[k] = rest[k]; } }); return react["createElement"](es_SubMenu, Object.assign({ title: overflowedIndicator, className: "".concat(prefixCls, "-overflowed-submenu"), popupClassName: popupClassName }, props, { key: key, eventKey: eventKey, disabled: false, style: style }), overflowedItems); }; // memorize rendered menuSize _this.setChildrenWidthAndResize = function () { if (_this.props.mode !== 'horizontal') { return; } var ul = react_dom["findDOMNode"](DOMWrap__assertThisInitialized(_this)); if (!ul) { return; } var ulChildrenNodes = ul.children; if (!ulChildrenNodes || ulChildrenNodes.length === 0) { return; } var lastOverflowedIndicatorPlaceholder = ul.children[ulChildrenNodes.length - 1]; // need last overflowed indicator for calculating length; setStyle(lastOverflowedIndicatorPlaceholder, 'display', 'inline-block'); var menuItemNodes = _this.getMenuItemNodes(); // reset display attribute for all hidden elements caused by overflow to calculate updated width // and then reset to original state after width calculation var overflowedItems = menuItemNodes.filter(function (c) { return c.className.split(' ').indexOf(MENUITEM_OVERFLOWED_CLASSNAME) >= 0; }); overflowedItems.forEach(function (c) { setStyle(c, 'display', 'inline-block'); }); _this.menuItemSizes = menuItemNodes.map(function (c) { return getWidth(c); }); overflowedItems.forEach(function (c) { setStyle(c, 'display', 'none'); }); _this.overflowedIndicatorWidth = getWidth(ul.children[ul.children.length - 1]); _this.originalTotalWidth = _this.menuItemSizes.reduce(function (acc, cur) { return acc + cur; }, 0); _this.handleResize(); // prevent the overflowed indicator from taking space; setStyle(lastOverflowedIndicatorPlaceholder, 'display', 'none'); }; _this.handleResize = function () { if (_this.props.mode !== 'horizontal') { return; } var ul = react_dom["findDOMNode"](DOMWrap__assertThisInitialized(_this)); if (!ul) { return; } var width = getWidth(ul); _this.overflowedItems = []; var currentSumWidth = 0; // index for last visible child in horizontal mode var lastVisibleIndex; // float number comparison could be problematic // e.g. 0.1 + 0.2 > 0.3 =====> true // thus using FLOAT_PRECISION_ADJUST as buffer to help the situation if (_this.originalTotalWidth > width + FLOAT_PRECISION_ADJUST) { lastVisibleIndex = -1; _this.menuItemSizes.forEach(function (liWidth) { currentSumWidth += liWidth; if (currentSumWidth + _this.overflowedIndicatorWidth <= width) { lastVisibleIndex += 1; } }); } _this.setState({ lastVisibleIndex: lastVisibleIndex }); }; return _this; } DOMWrap__createClass(DOMWrap, [{ key: "componentDidMount", value: function componentDidMount() { var _this2 = this; this.setChildrenWidthAndResize(); if (this.props.level === 1 && this.props.mode === 'horizontal') { var menuUl = react_dom["findDOMNode"](this); if (!menuUl) { return; } this.resizeObserver = new ResizeObserver_es["default"](function (entries) { entries.forEach(_this2.setChildrenWidthAndResize); }); [].slice.call(menuUl.children).concat(menuUl).forEach(function (el) { _this2.resizeObserver.observe(el); }); if (typeof MutationObserver !== 'undefined') { this.mutationObserver = new MutationObserver(function () { _this2.resizeObserver.disconnect(); [].slice.call(menuUl.children).concat(menuUl).forEach(function (el) { _this2.resizeObserver.observe(el); }); _this2.setChildrenWidthAndResize(); }); this.mutationObserver.observe(menuUl, { attributes: false, childList: true, subTree: false }); } } } }, { key: "componentWillUnmount", value: function componentWillUnmount() { if (this.resizeObserver) { this.resizeObserver.disconnect(); } if (this.mutationObserver) { this.mutationObserver.disconnect(); } } }, { key: "renderChildren", value: function renderChildren(children) { var _this3 = this; // need to take care of overflowed items in horizontal mode var lastVisibleIndex = this.state.lastVisibleIndex; return (children || []).reduce(function (acc, childNode, index) { var item = childNode; if (_this3.props.mode === 'horizontal') { var overflowed = _this3.getOverflowedSubMenuItem(childNode.props.eventKey, []); if (lastVisibleIndex !== undefined && _this3.props.className.indexOf("".concat(_this3.props.prefixCls, "-root")) !== -1) { if (index > lastVisibleIndex) { item = react["cloneElement"](childNode, // 这里修改 eventKey 是为了防止隐藏状态下还会触发 openkeys 事件 { style: { display: 'none' }, eventKey: "".concat(childNode.props.eventKey, "-hidden"), /** * Legacy code. Here `className` never used: * https://github.com/react-component/menu/commit/4cd6b49fce9d116726f4ea00dda85325d6f26500#diff-e2fa48f75c2dd2318295cde428556a76R240 */ className: "".concat(MENUITEM_OVERFLOWED_CLASSNAME) }); } if (index === lastVisibleIndex + 1) { _this3.overflowedItems = children.slice(lastVisibleIndex + 1).map(function (c) { return react["cloneElement"](c, // children[index].key will become '.$key' in clone by default, // we have to overwrite with the correct key explicitly { key: c.props.eventKey, mode: 'vertical-left' }); }); overflowed = _this3.getOverflowedSubMenuItem(childNode.props.eventKey, _this3.overflowedItems); } } var ret = [].concat(_toConsumableArray(acc), [overflowed, item]); if (index === children.length - 1) { // need a placeholder for calculating overflowed indicator width ret.push(_this3.getOverflowedSubMenuItem(childNode.props.eventKey, [], true)); } return ret; } return [].concat(_toConsumableArray(acc), [item]); }, []); } }, { key: "render", value: function render() { var _this$props2 = this.props, visible = _this$props2.visible, prefixCls = _this$props2.prefixCls, overflowedIndicator = _this$props2.overflowedIndicator, mode = _this$props2.mode, level = _this$props2.level, tag = _this$props2.tag, children = _this$props2.children, theme = _this$props2.theme, rest = _objectWithoutProperties(_this$props2, ["visible", "prefixCls", "overflowedIndicator", "mode", "level", "tag", "children", "theme"]); var Tag = tag; return react["createElement"](Tag, Object.assign({}, rest), this.renderChildren(children)); } }]); return DOMWrap; }(react["Component"]); DOMWrap_DOMWrap.defaultProps = { tag: 'div', className: '' }; /* harmony default export */ var es_DOMWrap = (DOMWrap_DOMWrap); // CONCATENATED MODULE: ./node_modules/rc-menu/es/SubPopupMenu.js function SubPopupMenu__typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { SubPopupMenu__typeof = function _typeof(obj) { return typeof obj; }; } else { SubPopupMenu__typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return SubPopupMenu__typeof(obj); } function _extends() { _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; }; return _extends.apply(this, arguments); } function SubPopupMenu__classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function SubPopupMenu__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); } } function SubPopupMenu__createClass(Constructor, protoProps, staticProps) { if (protoProps) SubPopupMenu__defineProperties(Constructor.prototype, protoProps); if (staticProps) SubPopupMenu__defineProperties(Constructor, staticProps); return Constructor; } function SubPopupMenu__possibleConstructorReturn(self, call) { if (call && (SubPopupMenu__typeof(call) === "object" || typeof call === "function")) { return call; } return SubPopupMenu__assertThisInitialized(self); } function SubPopupMenu__getPrototypeOf(o) { SubPopupMenu__getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return SubPopupMenu__getPrototypeOf(o); } function SubPopupMenu__assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function SubPopupMenu__inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) SubPopupMenu__setPrototypeOf(subClass, superClass); } function SubPopupMenu__setPrototypeOf(o, p) { SubPopupMenu__setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return SubPopupMenu__setPrototypeOf(o, p); } function SubPopupMenu_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function SubPopupMenu__objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { SubPopupMenu_ownKeys(Object(source), true).forEach(function (key) { SubPopupMenu__defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { SubPopupMenu_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function SubPopupMenu__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; } function allDisabled(arr) { if (!arr.length) { return true; } return arr.every(function (c) { return !!c.props.disabled; }); } function updateActiveKey(store, menuId, activeKey) { var state = store.getState(); store.setState({ activeKey: SubPopupMenu__objectSpread({}, state.activeKey, SubPopupMenu__defineProperty({}, menuId, activeKey)) }); } function getEventKey(props) { // when eventKey not available ,it's menu and return menu id '0-menu-' return props.eventKey || '0-menu-'; } function getActiveKey(props, originalActiveKey) { var activeKey = originalActiveKey; var children = props.children, eventKey = props.eventKey; if (activeKey) { var found; loopMenuItem(children, function (c, i) { if (c && c.props && !c.props.disabled && activeKey === getKeyFromChildrenIndex(c, eventKey, i)) { found = true; } }); if (found) { return activeKey; } } activeKey = null; if (props.defaultActiveFirst) { loopMenuItem(children, function (c, i) { if (!activeKey && c && !c.props.disabled) { activeKey = getKeyFromChildrenIndex(c, eventKey, i); } }); return activeKey; } return activeKey; } function saveRef(c) { if (c) { var index = this.instanceArray.indexOf(c); if (index !== -1) { // update component if it's already inside instanceArray this.instanceArray[index] = c; } else { // add component if it's not in instanceArray yet; this.instanceArray.push(c); } } } var SubPopupMenu_SubPopupMenu = /*#__PURE__*/ function (_React$Component) { SubPopupMenu__inherits(SubPopupMenu, _React$Component); function SubPopupMenu(props) { var _this; SubPopupMenu__classCallCheck(this, SubPopupMenu); _this = SubPopupMenu__possibleConstructorReturn(this, SubPopupMenu__getPrototypeOf(SubPopupMenu).call(this, props)); /** * all keyboard events callbacks run from here at first * * note: * This legacy code that `onKeyDown` is called by parent instead of dom self. * which need return code to check if this event is handled */ _this.onKeyDown = function (e, callback) { var keyCode = e.keyCode; var handled; _this.getFlatInstanceArray().forEach(function (obj) { if (obj && obj.props.active && obj.onKeyDown) { handled = obj.onKeyDown(e); } }); if (handled) { return 1; } var activeItem = null; if (keyCode === KeyCode["a" /* default */].UP || keyCode === KeyCode["a" /* default */].DOWN) { activeItem = _this.step(keyCode === KeyCode["a" /* default */].UP ? -1 : 1); } if (activeItem) { e.preventDefault(); updateActiveKey(_this.props.store, getEventKey(_this.props), activeItem.props.eventKey); if (typeof callback === 'function') { callback(activeItem); } return 1; } return undefined; }; _this.onItemHover = function (e) { var key = e.key, hover = e.hover; updateActiveKey(_this.props.store, getEventKey(_this.props), hover ? key : null); }; _this.onDeselect = function (selectInfo) { _this.props.onDeselect(selectInfo); }; _this.onSelect = function (selectInfo) { _this.props.onSelect(selectInfo); }; _this.onClick = function (e) { _this.props.onClick(e); }; _this.onOpenChange = function (e) { _this.props.onOpenChange(e); }; _this.onDestroy = function (key) { /* istanbul ignore next */ _this.props.onDestroy(key); }; _this.getFlatInstanceArray = function () { return _this.instanceArray; }; _this.step = function (direction) { var children = _this.getFlatInstanceArray(); var activeKey = _this.props.store.getState().activeKey[getEventKey(_this.props)]; var len = children.length; if (!len) { return null; } if (direction < 0) { children = children.concat().reverse(); } // find current activeIndex var activeIndex = -1; children.every(function (c, ci) { if (c && c.props.eventKey === activeKey) { activeIndex = ci; return false; } return true; }); if (!_this.props.defaultActiveFirst && activeIndex !== -1 && allDisabled(children.slice(activeIndex, len - 1))) { return undefined; } var start = (activeIndex + 1) % len; var i = start; do { var child = children[i]; if (!child || child.props.disabled) { i = (i + 1) % len; } else { return child; } } while (i !== start); return null; }; _this.renderCommonMenuItem = function (child, i, extraProps) { var state = _this.props.store.getState(); var _assertThisInitialize = SubPopupMenu__assertThisInitialized(_this), props = _assertThisInitialize.props; var key = getKeyFromChildrenIndex(child, props.eventKey, i); var childProps = child.props; // https://github.com/ant-design/ant-design/issues/11517#issuecomment-477403055 if (!childProps || typeof child.type === 'string') { return child; } var isActive = key === state.activeKey; var newChildProps = SubPopupMenu__objectSpread({ mode: childProps.mode || props.mode, level: props.level, inlineIndent: props.inlineIndent, renderMenuItem: _this.renderMenuItem, rootPrefixCls: props.prefixCls, index: i, parentMenu: props.parentMenu, // customized ref function, need to be invoked manually in child's componentDidMount manualRef: childProps.disabled ? undefined : Object(createChainedFunction["a" /* default */])(child.ref, saveRef.bind(SubPopupMenu__assertThisInitialized(_this))), eventKey: key, active: !childProps.disabled && isActive, multiple: props.multiple, onClick: function onClick(e) { (childProps.onClick || noop)(e); _this.onClick(e); }, onItemHover: _this.onItemHover, motion: props.motion, subMenuOpenDelay: props.subMenuOpenDelay, subMenuCloseDelay: props.subMenuCloseDelay, forceSubMenuRender: props.forceSubMenuRender, onOpenChange: _this.onOpenChange, onDeselect: _this.onDeselect, onSelect: _this.onSelect, builtinPlacements: props.builtinPlacements, itemIcon: childProps.itemIcon || _this.props.itemIcon, expandIcon: childProps.expandIcon || _this.props.expandIcon }, extraProps); // ref: https://github.com/ant-design/ant-design/issues/13943 if (props.mode === 'inline' || util_isMobileDevice()) { newChildProps.triggerSubMenuAction = 'click'; } return react["cloneElement"](child, newChildProps); }; _this.renderMenuItem = function (c, i, subMenuKey) { /* istanbul ignore if */ if (!c) { return null; } var state = _this.props.store.getState(); var extraProps = { openKeys: state.openKeys, selectedKeys: state.selectedKeys, triggerSubMenuAction: _this.props.triggerSubMenuAction, subMenuKey: subMenuKey }; return _this.renderCommonMenuItem(c, i, extraProps); }; props.store.setState({ activeKey: SubPopupMenu__objectSpread({}, props.store.getState().activeKey, SubPopupMenu__defineProperty({}, props.eventKey, getActiveKey(props, props.activeKey))) }); _this.instanceArray = []; return _this; } SubPopupMenu__createClass(SubPopupMenu, [{ key: "componentDidMount", value: function componentDidMount() { // invoke customized ref to expose component to mixin if (this.props.manualRef) { this.props.manualRef(this); } } }, { key: "shouldComponentUpdate", value: function shouldComponentUpdate(nextProps) { return this.props.visible || nextProps.visible || this.props.className !== nextProps.className || !shallowequal_default()(this.props.style, nextProps.style); } }, { key: "componentDidUpdate", value: function componentDidUpdate(prevProps) { var props = this.props; var originalActiveKey = 'activeKey' in props ? props.activeKey : props.store.getState().activeKey[getEventKey(props)]; var activeKey = getActiveKey(props, originalActiveKey); if (activeKey !== originalActiveKey) { updateActiveKey(props.store, getEventKey(props), activeKey); } else if ('activeKey' in prevProps) { // If prev activeKey is not same as current activeKey, // we should set it. var prevActiveKey = getActiveKey(prevProps, prevProps.activeKey); if (activeKey !== prevActiveKey) { updateActiveKey(props.store, getEventKey(props), activeKey); } } } }, { key: "render", value: function render() { var _this2 = this; var props = _extends({}, this.props); this.instanceArray = []; var className = classnames_default()(props.prefixCls, props.className, "".concat(props.prefixCls, "-").concat(props.mode)); var domProps = { className: className, // role could be 'select' and by default set to menu role: props.role || 'menu' }; if (props.id) { domProps.id = props.id; } if (props.focusable) { domProps.tabIndex = 0; domProps.onKeyDown = this.onKeyDown; } var prefixCls = props.prefixCls, eventKey = props.eventKey, visible = props.visible, level = props.level, mode = props.mode, overflowedIndicator = props.overflowedIndicator, theme = props.theme; menuAllProps.forEach(function (key) { return delete props[key]; }); // Otherwise, the propagated click event will trigger another onClick delete props.onClick; return react["createElement"](es_DOMWrap, Object.assign({}, props, { prefixCls: prefixCls, mode: mode, tag: "ul", level: level, theme: theme, visible: visible, overflowedIndicator: overflowedIndicator }, domProps), react["Children"].map(props.children, function (c, i) { return _this2.renderMenuItem(c, i, eventKey || '0-menu-'); })); } }]); return SubPopupMenu; }(react["Component"]); SubPopupMenu_SubPopupMenu.defaultProps = { prefixCls: 'rc-menu', className: '', mode: 'vertical', level: 1, inlineIndent: 24, visible: true, focusable: true, style: {}, manualRef: noop }; var SubPopupMenu_connected = Object(lib["connect"])()(SubPopupMenu_SubPopupMenu); /* harmony default export */ var es_SubPopupMenu = (SubPopupMenu_connected); // EXTERNAL MODULE: ./node_modules/rc-util/es/warning.js var warning = __webpack_require__("FfaA"); // CONCATENATED MODULE: ./node_modules/rc-menu/es/utils/legacyUtil.js function legacyUtil__typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { legacyUtil__typeof = function _typeof(obj) { return typeof obj; }; } else { legacyUtil__typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return legacyUtil__typeof(obj); } function getMotion(_ref) { var prefixCls = _ref.prefixCls, motion = _ref.motion, openAnimation = _ref.openAnimation, openTransitionName = _ref.openTransitionName; if (motion) { return motion; } if (legacyUtil__typeof(openAnimation) === 'object' && openAnimation) { Object(warning["a" /* default */])(false, 'Object type of `openAnimation` is removed. Please use `motion` instead.'); } else if (typeof openAnimation === 'string') { return { motionName: "".concat(prefixCls, "-open-").concat(openAnimation) }; } if (openTransitionName) { return { motionName: openTransitionName }; } return null; } // CONCATENATED MODULE: ./node_modules/rc-menu/es/Menu.js function Menu__typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { Menu__typeof = function _typeof(obj) { return typeof obj; }; } else { Menu__typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return Menu__typeof(obj); } function Menu_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function Menu__objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { Menu_ownKeys(Object(source), true).forEach(function (key) { Menu__defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { Menu_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function Menu__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; } function Menu__classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function Menu__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); } } function Menu__createClass(Constructor, protoProps, staticProps) { if (protoProps) Menu__defineProperties(Constructor.prototype, protoProps); if (staticProps) Menu__defineProperties(Constructor, staticProps); return Constructor; } function Menu__possibleConstructorReturn(self, call) { if (call && (Menu__typeof(call) === "object" || typeof call === "function")) { return call; } return Menu__assertThisInitialized(self); } function Menu__getPrototypeOf(o) { Menu__getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return Menu__getPrototypeOf(o); } function Menu__assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function Menu__inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) Menu__setPrototypeOf(subClass, superClass); } function Menu__setPrototypeOf(o, p) { Menu__setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return Menu__setPrototypeOf(o, p); } var Menu_Menu = /*#__PURE__*/ function (_React$Component) { Menu__inherits(Menu, _React$Component); function Menu(props) { var _this; Menu__classCallCheck(this, Menu); _this = Menu__possibleConstructorReturn(this, Menu__getPrototypeOf(Menu).call(this, props)); _this.onSelect = function (selectInfo) { var _assertThisInitialize = Menu__assertThisInitialized(_this), props = _assertThisInitialize.props; if (props.selectable) { // root menu var _this$store$getState = _this.store.getState(), _selectedKeys = _this$store$getState.selectedKeys; var selectedKey = selectInfo.key; if (props.multiple) { _selectedKeys = _selectedKeys.concat([selectedKey]); } else { _selectedKeys = [selectedKey]; } if (!('selectedKeys' in props)) { _this.store.setState({ selectedKeys: _selectedKeys }); } props.onSelect(Menu__objectSpread({}, selectInfo, { selectedKeys: _selectedKeys })); } }; _this.onClick = function (e) { _this.props.onClick(e); }; // onKeyDown needs to be exposed as a instance method // e.g., in rc-select, we need to navigate menu item while // current active item is rc-select input box rather than the menu itself _this.onKeyDown = function (e, callback) { _this.innerMenu.getWrappedInstance().onKeyDown(e, callback); }; _this.onOpenChange = function (event) { var _assertThisInitialize2 = Menu__assertThisInitialized(_this), props = _assertThisInitialize2.props; var openKeys = _this.store.getState().openKeys.concat(); var changed = false; var processSingle = function processSingle(e) { var oneChanged = false; if (e.open) { oneChanged = openKeys.indexOf(e.key) === -1; if (oneChanged) { openKeys.push(e.key); } } else { var index = openKeys.indexOf(e.key); oneChanged = index !== -1; if (oneChanged) { openKeys.splice(index, 1); } } changed = changed || oneChanged; }; if (Array.isArray(event)) { // batch change call event.forEach(processSingle); } else { processSingle(event); } if (changed) { if (!('openKeys' in _this.props)) { _this.store.setState({ openKeys: openKeys }); } props.onOpenChange(openKeys); } }; _this.onDeselect = function (selectInfo) { var _assertThisInitialize3 = Menu__assertThisInitialized(_this), props = _assertThisInitialize3.props; if (props.selectable) { var _selectedKeys2 = _this.store.getState().selectedKeys.concat(); var selectedKey = selectInfo.key; var index = _selectedKeys2.indexOf(selectedKey); if (index !== -1) { _selectedKeys2.splice(index, 1); } if (!('selectedKeys' in props)) { _this.store.setState({ selectedKeys: _selectedKeys2 }); } props.onDeselect(Menu__objectSpread({}, selectInfo, { selectedKeys: _selectedKeys2 })); } }; _this.getOpenTransitionName = function () { var _assertThisInitialize4 = Menu__assertThisInitialized(_this), props = _assertThisInitialize4.props; var transitionName = props.openTransitionName; var animationName = props.openAnimation; if (!transitionName && typeof animationName === 'string') { transitionName = "".concat(props.prefixCls, "-open-").concat(animationName); } return transitionName; }; _this.setInnerMenu = function (node) { _this.innerMenu = node; }; _this.isRootMenu = true; var selectedKeys = props.defaultSelectedKeys; var openKeys = props.defaultOpenKeys; if ('selectedKeys' in props) { selectedKeys = props.selectedKeys || []; } if ('openKeys' in props) { openKeys = props.openKeys || []; } _this.store = Object(lib["create"])({ selectedKeys: selectedKeys, openKeys: openKeys, activeKey: { '0-menu-': getActiveKey(props, props.activeKey) } }); return _this; } Menu__createClass(Menu, [{ key: "componentDidMount", value: function componentDidMount() { this.updateMiniStore(); } }, { key: "componentDidUpdate", value: function componentDidUpdate() { this.updateMiniStore(); } }, { key: "updateMiniStore", value: function updateMiniStore() { if ('selectedKeys' in this.props) { this.store.setState({ selectedKeys: this.props.selectedKeys || [] }); } if ('openKeys' in this.props) { this.store.setState({ openKeys: this.props.openKeys || [] }); } } }, { key: "render", value: function render() { var props = Menu__objectSpread({}, this.props); props.className += " ".concat(props.prefixCls, "-root"); props = Menu__objectSpread({}, props, { onClick: this.onClick, onOpenChange: this.onOpenChange, onDeselect: this.onDeselect, onSelect: this.onSelect, parentMenu: this, motion: getMotion(this.props) }); delete props.openAnimation; delete props.openTransitionName; return react["createElement"](lib["Provider"], { store: this.store }, react["createElement"](es_SubPopupMenu, Object.assign({}, props, { ref: this.setInnerMenu }), this.props.children)); } }]); return Menu; }(react["Component"]); Menu_Menu.defaultProps = { selectable: true, onClick: noop, onSelect: noop, onOpenChange: noop, onDeselect: noop, defaultSelectedKeys: [], defaultOpenKeys: [], subMenuOpenDelay: 0.1, subMenuCloseDelay: 0.1, triggerSubMenuAction: 'hover', prefixCls: 'rc-menu', className: '', mode: 'vertical', style: {}, builtinPlacements: {}, overflowedIndicator: react["createElement"]("span", null, "\xB7\xB7\xB7") }; /* harmony default export */ var es_Menu = (Menu_Menu); // EXTERNAL MODULE: ./node_modules/dom-scroll-into-view/lib/index.js var dom_scroll_into_view_lib = __webpack_require__("Kw5M"); var dom_scroll_into_view_lib_default = /*#__PURE__*/__webpack_require__.n(dom_scroll_into_view_lib); // CONCATENATED MODULE: ./node_modules/rc-menu/es/MenuItem.js function MenuItem__typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { MenuItem__typeof = function _typeof(obj) { return typeof obj; }; } else { MenuItem__typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return MenuItem__typeof(obj); } function MenuItem_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function MenuItem__objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { MenuItem_ownKeys(Object(source), true).forEach(function (key) { MenuItem__defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { MenuItem_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function MenuItem__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; } function MenuItem__classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function MenuItem__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); } } function MenuItem__createClass(Constructor, protoProps, staticProps) { if (protoProps) MenuItem__defineProperties(Constructor.prototype, protoProps); if (staticProps) MenuItem__defineProperties(Constructor, staticProps); return Constructor; } function MenuItem__possibleConstructorReturn(self, call) { if (call && (MenuItem__typeof(call) === "object" || typeof call === "function")) { return call; } return MenuItem__assertThisInitialized(self); } function MenuItem__getPrototypeOf(o) { MenuItem__getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return MenuItem__getPrototypeOf(o); } function MenuItem__assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function MenuItem__inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) MenuItem__setPrototypeOf(subClass, superClass); } function MenuItem__setPrototypeOf(o, p) { MenuItem__setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return MenuItem__setPrototypeOf(o, p); } var MenuItem_MenuItem = /*#__PURE__*/ function (_React$Component) { MenuItem__inherits(MenuItem, _React$Component); function MenuItem() { var _this; MenuItem__classCallCheck(this, MenuItem); _this = MenuItem__possibleConstructorReturn(this, MenuItem__getPrototypeOf(MenuItem).apply(this, arguments)); _this.onKeyDown = function (e) { var keyCode = e.keyCode; if (keyCode === KeyCode["a" /* default */].ENTER) { _this.onClick(e); return true; } return undefined; }; _this.onMouseLeave = function (e) { var _this$props = _this.props, eventKey = _this$props.eventKey, onItemHover = _this$props.onItemHover, onMouseLeave = _this$props.onMouseLeave; onItemHover({ key: eventKey, hover: false }); onMouseLeave({ key: eventKey, domEvent: e }); }; _this.onMouseEnter = function (e) { var _this$props2 = _this.props, eventKey = _this$props2.eventKey, onItemHover = _this$props2.onItemHover, onMouseEnter = _this$props2.onMouseEnter; onItemHover({ key: eventKey, hover: true }); onMouseEnter({ key: eventKey, domEvent: e }); }; _this.onClick = function (e) { var _this$props3 = _this.props, eventKey = _this$props3.eventKey, multiple = _this$props3.multiple, onClick = _this$props3.onClick, onSelect = _this$props3.onSelect, onDeselect = _this$props3.onDeselect, isSelected = _this$props3.isSelected; var info = { key: eventKey, keyPath: [eventKey], item: MenuItem__assertThisInitialized(_this), domEvent: e }; onClick(info); if (multiple) { if (isSelected) { onDeselect(info); } else { onSelect(info); } } else if (!isSelected) { onSelect(info); } }; _this.saveNode = function (node) { _this.node = node; }; return _this; } MenuItem__createClass(MenuItem, [{ key: "componentDidMount", value: function componentDidMount() { // invoke customized ref to expose component to mixin this.callRef(); } }, { key: "componentDidUpdate", value: function componentDidUpdate(prevProps) { var _this$props4 = this.props, active = _this$props4.active, parentMenu = _this$props4.parentMenu, eventKey = _this$props4.eventKey; // 在 parentMenu 上层保存滚动状态,避免重复的 MenuItem key 导致滚动跳动 // https://github.com/ant-design/ant-design/issues/16181 if (!prevProps.active && active && (!parentMenu || !parentMenu["scrolled-".concat(eventKey)])) { if (this.node) { dom_scroll_into_view_lib_default()(this.node, react_dom["findDOMNode"](parentMenu), { onlyScrollIfNeeded: true }); parentMenu["scrolled-".concat(eventKey)] = true; } } else if (parentMenu && parentMenu["scrolled-".concat(eventKey)]) { delete parentMenu["scrolled-".concat(eventKey)]; } this.callRef(); } }, { key: "componentWillUnmount", value: function componentWillUnmount() { var props = this.props; if (props.onDestroy) { props.onDestroy(props.eventKey); } } }, { key: "getPrefixCls", value: function getPrefixCls() { return "".concat(this.props.rootPrefixCls, "-item"); } }, { key: "getActiveClassName", value: function getActiveClassName() { return "".concat(this.getPrefixCls(), "-active"); } }, { key: "getSelectedClassName", value: function getSelectedClassName() { return "".concat(this.getPrefixCls(), "-selected"); } }, { key: "getDisabledClassName", value: function getDisabledClassName() { return "".concat(this.getPrefixCls(), "-disabled"); } }, { key: "callRef", value: function callRef() { if (this.props.manualRef) { this.props.manualRef(this); } } }, { key: "render", value: function render() { var _classNames; var props = MenuItem__objectSpread({}, this.props); var className = classnames_default()(this.getPrefixCls(), props.className, (_classNames = {}, MenuItem__defineProperty(_classNames, this.getActiveClassName(), !props.disabled && props.active), MenuItem__defineProperty(_classNames, this.getSelectedClassName(), props.isSelected), MenuItem__defineProperty(_classNames, this.getDisabledClassName(), props.disabled), _classNames)); var attrs = MenuItem__objectSpread({}, props.attribute, { title: props.title, className: className, // set to menuitem by default role: props.role || 'menuitem', 'aria-disabled': props.disabled }); if (props.role === 'option') { // overwrite to option attrs = MenuItem__objectSpread({}, attrs, { role: 'option', 'aria-selected': props.isSelected }); } else if (props.role === null || props.role === 'none') { // sometimes we want to specify role inside
  • element //
  • Link
  • would be a good example // in this case the role on
  • should be "none" to // remove the implied listitem role. // https://www.w3.org/TR/wai-aria-practices-1.1/examples/menubar/menubar-1/menubar-1.html attrs.role = 'none'; } // In case that onClick/onMouseLeave/onMouseEnter is passed down from owner var mouseEvent = { onClick: props.disabled ? null : this.onClick, onMouseLeave: props.disabled ? null : this.onMouseLeave, onMouseEnter: props.disabled ? null : this.onMouseEnter }; var style = MenuItem__objectSpread({}, props.style); if (props.mode === 'inline') { style.paddingLeft = props.inlineIndent * props.level; } menuAllProps.forEach(function (key) { return delete props[key]; }); var icon = this.props.itemIcon; if (typeof this.props.itemIcon === 'function') { // TODO: This is a bug which should fixed after TS refactor icon = react["createElement"](this.props.itemIcon, this.props); } return react["createElement"]("li", Object.assign({}, props, attrs, mouseEvent, { style: style, ref: this.saveNode }), props.children, icon); } }]); return MenuItem; }(react["Component"]); MenuItem_MenuItem.isMenuItem = true; MenuItem_MenuItem.defaultProps = { onSelect: noop, onMouseEnter: noop, onMouseLeave: noop, manualRef: noop }; var MenuItem_connected = Object(lib["connect"])(function (_ref, _ref2) { var activeKey = _ref.activeKey, selectedKeys = _ref.selectedKeys; var eventKey = _ref2.eventKey, subMenuKey = _ref2.subMenuKey; return { active: activeKey[subMenuKey] === eventKey, isSelected: selectedKeys.indexOf(eventKey) !== -1 }; })(MenuItem_MenuItem); /* harmony default export */ var es_MenuItem = (MenuItem_connected); // CONCATENATED MODULE: ./node_modules/rc-menu/es/MenuItemGroup.js function MenuItemGroup__typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { MenuItemGroup__typeof = function _typeof(obj) { return typeof obj; }; } else { MenuItemGroup__typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return MenuItemGroup__typeof(obj); } function MenuItemGroup__extends() { MenuItemGroup__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; }; return MenuItemGroup__extends.apply(this, arguments); } function MenuItemGroup__classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function MenuItemGroup__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); } } function MenuItemGroup__createClass(Constructor, protoProps, staticProps) { if (protoProps) MenuItemGroup__defineProperties(Constructor.prototype, protoProps); if (staticProps) MenuItemGroup__defineProperties(Constructor, staticProps); return Constructor; } function MenuItemGroup__possibleConstructorReturn(self, call) { if (call && (MenuItemGroup__typeof(call) === "object" || typeof call === "function")) { return call; } return MenuItemGroup__assertThisInitialized(self); } function MenuItemGroup__assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function MenuItemGroup__getPrototypeOf(o) { MenuItemGroup__getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return MenuItemGroup__getPrototypeOf(o); } function MenuItemGroup__inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) MenuItemGroup__setPrototypeOf(subClass, superClass); } function MenuItemGroup__setPrototypeOf(o, p) { MenuItemGroup__setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return MenuItemGroup__setPrototypeOf(o, p); } var MenuItemGroup_MenuItemGroup = /*#__PURE__*/ function (_React$Component) { MenuItemGroup__inherits(MenuItemGroup, _React$Component); function MenuItemGroup() { var _this; MenuItemGroup__classCallCheck(this, MenuItemGroup); _this = MenuItemGroup__possibleConstructorReturn(this, MenuItemGroup__getPrototypeOf(MenuItemGroup).apply(this, arguments)); _this.renderInnerMenuItem = function (item) { var _this$props = _this.props, renderMenuItem = _this$props.renderMenuItem, index = _this$props.index; return renderMenuItem(item, index, _this.props.subMenuKey); }; return _this; } MenuItemGroup__createClass(MenuItemGroup, [{ key: "render", value: function render() { var props = MenuItemGroup__extends({}, this.props); var _props$className = props.className, className = _props$className === void 0 ? '' : _props$className, rootPrefixCls = props.rootPrefixCls; var titleClassName = "".concat(rootPrefixCls, "-item-group-title"); var listClassName = "".concat(rootPrefixCls, "-item-group-list"); var title = props.title, children = props.children; menuAllProps.forEach(function (key) { return delete props[key]; }); // Set onClick to null, to ignore propagated onClick event delete props.onClick; return react["createElement"]("li", Object.assign({}, props, { className: "".concat(className, " ").concat(rootPrefixCls, "-item-group") }), react["createElement"]("div", { className: titleClassName, title: typeof title === 'string' ? title : undefined }, title), react["createElement"]("ul", { className: listClassName }, react["Children"].map(children, this.renderInnerMenuItem))); } }]); return MenuItemGroup; }(react["Component"]); MenuItemGroup_MenuItemGroup.isMenuItemGroup = true; MenuItemGroup_MenuItemGroup.defaultProps = { disabled: true }; /* harmony default export */ var es_MenuItemGroup = (MenuItemGroup_MenuItemGroup); // CONCATENATED MODULE: ./node_modules/rc-menu/es/Divider.js var Divider_Divider = function Divider(_ref) { var className = _ref.className, rootPrefixCls = _ref.rootPrefixCls, style = _ref.style; return react["createElement"]("li", { className: "".concat(className, " ").concat(rootPrefixCls, "-item-divider"), style: style }); }; Divider_Divider.defaultProps = { // To fix keyboard UX. disabled: true, className: '', style: {} }; /* harmony default export */ var es_Divider = (Divider_Divider); // CONCATENATED MODULE: ./node_modules/rc-menu/es/index.js /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "d", function() { return es_SubMenu; }); /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "b", function() { return es_MenuItem; }); /* unused concated harmony import MenuItem */ /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, false, function() { return es_MenuItem; }); /* unused concated harmony import MenuItemGroup */ /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, false, function() { return es_MenuItemGroup; }); /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "c", function() { return es_MenuItemGroup; }); /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "a", function() { return es_Divider; }); /* harmony default export */ var rc_menu_es = __webpack_exports__["e"] = (es_Menu); /***/ }), /***/ "6qr9": /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _rule = __webpack_require__("hGxU"); var _rule2 = _interopRequireDefault(_rule); var _util = __webpack_require__("eCjd"); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } /** * Validates a regular expression pattern. * * Performs validation when a rule only contains * a pattern property but is not declared as a string type. * * @param rule The validation rule. * @param value The value of the field on the source object. * @param callback The callback function. * @param source The source object being validated. * @param options The validation options. * @param options.messages The validation messages. */ function pattern(rule, value, callback, source, options) { var errors = []; var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate) { if ((0, _util.isEmptyValue)(value, 'string') && !rule.required) { return callback(); } _rule2['default'].required(rule, value, source, errors, options); if (!(0, _util.isEmptyValue)(value, 'string')) { _rule2['default'].pattern(rule, value, source, errors, options); } } callback(errors); } exports['default'] = pattern; /***/ }), /***/ "6upA": /***/ (function(module, exports) { module.exports = "data:image/png;base64,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" /***/ }), /***/ "77oj": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; __webpack_require__("GKDd"); var _pagination = _interopRequireDefault(__webpack_require__("BJfm")); __webpack_require__("UQ5M"); var _message2 = _interopRequireDefault(__webpack_require__("/qCn")); __webpack_require__("crfj"); var _button = _interopRequireDefault(__webpack_require__("zwGx")); __webpack_require__("baa2"); var _icon = _interopRequireDefault(__webpack_require__("FC3+")); __webpack_require__("LHBr"); var _input = _interopRequireDefault(__webpack_require__("A+AJ")); var _objectSpread2 = _interopRequireDefault(__webpack_require__("+TWC")); var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); __webpack_require__("HGVe"); var _threeDimenVideo = _interopRequireDefault(__webpack_require__("nMSa")); function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /** * 通过搜索获得地图列表(保安人员) */ var PersonSearch = exports.default = /*#__PURE__*/function (_Component) { function PersonSearch(props) { var _this; (0, _classCallCheck2.default)(this, PersonSearch); _this = _callSuper(this, PersonSearch, [props]); _this.state = { layerSatatus: props.layerSatatus, searchData: { pageNumber: 1, pageSize: 7, keyWord: null }, personList: [], //人员列表数据 personClickIndex: props.personClickIndex || null, //选中的是哪个人员 height: null, //最大高度 beijing: false, //北京搜索框的展示状态 beijingVideo: false, //北京视频的展示状态 gaoqi: false, //高崎搜索框的展示状态 treeDimenStatus: false //三维模型的展示状态 }; return _this; } (0, _inherits2.default)(PersonSearch, _Component); return (0, _createClass2.default)(PersonSearch, [{ key: "componentDidMount", value: function componentDidMount() { var height = document.documentElement.clientHeight - 120 - 130 - 40; this.setState({ height: height }); } }, { key: "componentWillReceiveProps", value: function componentWillReceiveProps(nextProps) { this.setState({ layerSatatus: nextProps.layerSatatus, personClickIndex: nextProps.personClickIndex }); } }, { key: "getPersonList", value: function getPersonList(pageNumber) { if (this.state.searchData.keyWord === "北京展览馆") { this.setState({ beijing: true, personList: [], gaoqi: false }); this.props.markesBeiJing(); // this.props.personList([]); } else if (this.state.searchData.keyWord === "厦门机场" || this.state.searchData.keyWord === "厦门高崎机场") { this.setState({ gaoqi: true, personList: [], beijing: false }); this.props.markesGaoQi(); // this.props.personList([]); } } }, { key: "render", value: function render() { var _this2 = this; return /*#__PURE__*/_react.default.createElement("div", { style: { display: this.state.layerSatatus === "person" ? "block" : "none" } }, /*#__PURE__*/_react.default.createElement("div", { className: "security drawer_container_person" }, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_input.default, { placeholder: "\u8BF7\u8F93\u5165\u5730\u70B9:", style: { width: 210 }, onChange: function onChange(e) { _this2.setState({ searchData: (0, _objectSpread2.default)({}, _this2.state.searchData, { keyWord: e.target.value.trim() }) }); }, onPressEnter: function onPressEnter() { //按下回车的事件 _this2.getPersonList(1); } }), /*#__PURE__*/_react.default.createElement(_button.default, { type: "primary", onClick: function onClick() { _this2.getPersonList(1); } }, /*#__PURE__*/_react.default.createElement(_icon.default, { type: "search", style: { fontSize: "16px" } }))), /*#__PURE__*/_react.default.createElement("div", { className: "beijing", style: { display: this.state.beijing ? "block" : "none" } }, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("div", { className: "text" }, /*#__PURE__*/_react.default.createElement("div", { style: { color: "#0f71ff" } }, "\u5317\u4EAC\u5C55\u89C8\u9986"), /*#__PURE__*/_react.default.createElement("div", null, "\u5C55\u89C8\u9986"), /*#__PURE__*/_react.default.createElement("div", null, "\u5317\u4EAC\u5E02\u897F\u57CE\u533A\u897F\u76F4\u95E8\u5916\u5927\u8857135\u53F7")), /*#__PURE__*/_react.default.createElement("img", { src: __webpack_require__("LtD3") })), /*#__PURE__*/_react.default.createElement("div", { style: { marginTop: "20px" } }, /*#__PURE__*/_react.default.createElement("h3", null, "\u6D3B\u52A8\u5217\u8868"), /*#__PURE__*/_react.default.createElement("img", { style: { float: "left" }, src: __webpack_require__("3SWf") }), /*#__PURE__*/_react.default.createElement("div", { className: "text", style: { width: "70%", marginLeft: "10px" } }, /*#__PURE__*/_react.default.createElement("div", null, "\u4F1F\u5927\u5386\u7A0B \u8F89\u714C\u6210\u5C31\u2014\u2014\u5E86\u795D\u4E2D\u534E\u4EBA\u6C11\u5171\u548C\u56FD\u6210\u7ACB70\u5468\u5E74\u5927\u578B\u6210\u5C31\u5C55"), /*#__PURE__*/_react.default.createElement("div", null, "\u5C55\u4F1A\u65F6\u95F4\uFF1A2019\u5E749\u670823\u65E5-2019\u5E7412\u670831\u65E5")), /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_button.default, { style: { padding: "5px", marginRight: "5px" }, type: "primary", onClick: function onClick() { //弹出视频 // this.setState({ huodongVideo: true }); window.open("https://114.115.173.143:8080/distinction-bcx/graph.html#/ticket/index", "_blank"); } }, "\u6D3B\u52A8\u7968\u8BC1\u5206\u6790"), /*#__PURE__*/_react.default.createElement(_button.default, { style: { padding: "5px" }, type: "primary", onClick: function onClick() { //弹出视频 _this2.setState({ beijingVideo: true }); _this2.props.beijingVideo(true); } }, "3D\u98CE\u9669\u8BC4\u4F30\u62A5\u544A"), /*#__PURE__*/_react.default.createElement(_button.default, { style: { padding: "5px", margin: "5px 5px 0 0" }, type: "primary", onClick: function onClick() { //弹出视频 // this.setState({ huodongVideo: true }); window.open("http://114.116.164.42:8014/bim/view?fileId=1896948461340768", "_blank"); // this.setState({ treeDimenStatus: true }); } }, "\u4E09\u7EF4\u6A21\u578B")))), /*#__PURE__*/_react.default.createElement("div", { className: "beijing", style: { display: this.state.gaoqi ? "block" : "none" } }, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("div", { className: "text" }, /*#__PURE__*/_react.default.createElement("div", { style: { color: "#0f71ff" } }, "\u53A6\u95E8\u9AD8\u5D0E\u56FD\u9645\u673A\u573A"), /*#__PURE__*/_react.default.createElement("div", null, "\u53A6\u95E8\u5E02\u6E56\u91CC\u533A\u7FD4\u4E91\u4E00\u8DEF"), /*#__PURE__*/_react.default.createElement("div", null, "\u7535\u8BDD\uFF1A0592-5706078")), /*#__PURE__*/_react.default.createElement("img", { src: __webpack_require__("7jLL"), style: { marginLeft: "30px" } })), /*#__PURE__*/_react.default.createElement("div", { style: { textAlign: "center", marginTop: "10px" } }, /*#__PURE__*/_react.default.createElement(_button.default, { type: "primary", onClick: function onClick() { // this.setState({ caijiVideo: true }); window.open("https://114.115.173.143:8080/distinction-bcx/#/wifi/index", "_blank"); }, style: { marginRight: "4px" } }, "\u673A\u573A\u4EBA\u6D41\u8F68\u8FF9\u5206\u6790")))), /*#__PURE__*/_react.default.createElement("div", { className: "security search-list amap_lib_placeSearch", style: { display: this.state.personList.length > 0 ? "block" : "none" } }, /*#__PURE__*/_react.default.createElement("div", { className: "security-personnel" }, /*#__PURE__*/_react.default.createElement("span", null, "\u4FDD\u5B89\u4EBA\u5458")), /*#__PURE__*/_react.default.createElement("div", { className: "list", style: { maxHeight: this.state.height, overflow: "auto" } }, this.state.personList.map(function (item, index) { var xing = "********"; var idCardNo = ""; if (item.idCardNo) { var front6 = item.idCardNo.substring(0, 6); idCardNo = front6 + xing + item.idCardNo.substring(14, item.idCardNo.length); } return /*#__PURE__*/_react.default.createElement("div", { key: index, className: "item", onClick: function onClick() { if (item.lnglat) { _this2.props.onClickPerson(item, index); _this2.setState({ personClickIndex: index }); } else { _message2.default.warning("该人员暂未定位"); } } }, /*#__PURE__*/_react.default.createElement("div", { className: _this2.state.personClickIndex === index ? "selected poibox" : "poibox" }, item.lnglat && /*#__PURE__*/_react.default.createElement("div", { className: "amap_lib_placeSearch_poi poibox-icon" }, index), /*#__PURE__*/_react.default.createElement("div", { style: { marginLeft: 25 } }, /*#__PURE__*/_react.default.createElement("div", { className: "name" }, item.name), /*#__PURE__*/_react.default.createElement("div", { className: "text" }, "\u624B\u673A\u53F7\u7801:", item.mobilePhone), /*#__PURE__*/_react.default.createElement("div", { className: "text" }, "\u8BC1\u4EF6\u53F7\u7801:", idCardNo)))); })), /*#__PURE__*/_react.default.createElement(_pagination.default, { total: this.state.total, size: "small", onChange: function onChange(number) { _this2.getPersonList(number); }, defaultPageSize: this.state.searchData.pageSize, current: this.state.searchData.pageNumber, style: { display: this.state.total > this.state.searchData.pageSize ? "block" : "none" } })), this.state.treeDimenStatus && /*#__PURE__*/_react.default.createElement(_threeDimenVideo.default, { changeStatus: function changeStatus(value) { _this2.setState({ treeDimenStatus: value }); } })); } }]); }(_react.Component); /***/ }), /***/ "7HHs": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAiCAYAAAC0nUK+AAAAAXNSR0IArs4c6QAABHpJREFUSA2lVl1oHFUUPufOTtqGxKabH0OkJbSgSdqGYqLSShKTIhowFaRQFOyLWFIUFR80xZcVDFYUqfhQtf6hVKhVH8yDWCHNxodSYmKp+emDiqVSmm6yTROzSXZ35nq+iZPemewmKZ6Hvefv+86ZO+feWaYV5EZtc7OrqcMl3UrMVUy6VBMnWdPfTBRXTN+XjMZ/ZhZPDpGc5ZLY3tLKrj6qtb5/eTToYeIBbfGr5SPxs8EIUYBcx2Jq8uvebu3qLiSqygpa1/EwFbTsJmtzFXHJRtJTN8m5cpXS8XO00PMTudeue5yK1dvRA61dHIu54SIkXfJETdPpRE2TTuxs07Mfn9TuwoK48wviyEM+cBO1zd+iwWXkibqm172EPR06/etwfsYcEeRPCO6/Am8EyCd3NO+Rrl10cLvEfi3ggAdPsq6lCQW8R9BZ3S2vmwtffIbsXdsDhbHHs2++T1P7n6XJxke9FTb8pgAHPHgcrb3uObHjoUbKOgN4eZt+/Iq4oGAJkxm4QDMvx8idSC75fEWVRan43RjZ9+3yXaTTabrxyFPeS2aLHlDkOh2IYipMYnSWjxj5KIi4+QTAgweiXfWYkNNeGBg3U1LHv8jZsZmDAsgzxedhrfcqOV1bEMQcm5IZvGiaefVwnsGzRWlNFUDigJji/HXFNPPq4TyfR15suXSuZ4E09w62Vb0Zy6oSzvN5wCujyONgwJE2xW6oN828ejjvFg9fVTKYQ0DirjCl8PBBwritJIgjzxSDZ0hpRT8giEsIc+oL9g5znK+AP+f+HgMHPHggrFSP1bW17jKl0536n9kNXFRI9r07vSB+rLsqaf0T7USZLMlBI52ao8jdW2ldexvdIYWtbdVLuVDmPj9F6TNxqIlSe/3zUEhus9f82/D/3i3gmaxtegm83t0iVY7JvI9RJkPTzx2hzIURxNYsyAcOePliDUWri44DvPSxSNS33sPp7IDMZzHZtncJbXh6f+BKCFfDHs99+Q2l3vtkkZjouopwY+lwv3dIlsgBlKuy3XV1jyZtwb6dL5G0mWKOtJWNnj0PLCRADkeipuWQXEsfQl+ryJZm5TTui47Gvcnzcd6e+wbW8kvxjxTxO6ZvNV3ID4WJgVlGDme0Uh0RQPBUIZBLmE6UjsY/yxXKSc59fVmLIk9KgalcIMN3sexO6wXDDqg5yZGxaaz3smZaPAgBiG/wAtvWAWlk3veE17zkSCwf7T8p3S+e5xBSse4u+63vUsgdMFckR2bEihyWoQp0JwXHoqryrQBTDmNV8pLh3j8k6aiJlUPQySOnb91yZtDQl825EaOGhobCTCYTrc1QxTG98UyEqHSa3f7HrZudSqkZ27aTg4ODKRNj6t5JNB2+Xl9fXzE/P7/NcZyicXL4QV2QrmBr9ylOdf3iLszAL4XLq6qqnPHxce9r5mP9Ne+2uK5b6SdhfcWd/u5P7Xx6Qqd+N/3hPDOWl1we+5qZOGW52YOc/MD0QQ/nmfE17bl0Vyz/CQtktYTMkWlJr2XP/wW0yK2LP/o2kgAAAABJRU5ErkJggg==" /***/ }), /***/ "7Mgp": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAAAXNSR0IArs4c6QAAAudJREFUWEfNmE2ITlEYx39/LCwQm6lRLEmWFsQoM7EQC1+RMrPxsfOVicISZRDDzsfCUCKDBVmQmTImFpaSWVKUDZlZWODRk+fquN73vXfGW+6pu7n3PP/nd59zznPOecQ4m5nNAtYAq4C5wOx4XOl9PG+BR8ADSZ/G40JlO5vZemA3sByYUtLuG/AUuCDpbhmbQiAzWwb0AEvLCDboMwwclPSskU5dIDObDJwB9uYEfgAufg94mQyTd8uGbxGwLn5iUs6+Fzgg6XstsJpAZjYTuBXzJLP7Cpx3SEkfy0TLzFrcObAHmJrY+PzaLOlzXucvoIDxCCxIOvcD+yW9KwOS72Nmc4CzwMbk22uPYB7qD6AYpodJZAw4KunEREBqgB0GjgGZX4/U6nT48kDnkjnjMFsl3WwGTKZhZluAGwlUr6R92fffQLGahhLnR5oVmTqROp68b8tWXwrkyzFb2v2SNjUzMjWgbidzaliSp5dfYxlJ704Y+WqaN9EJXPYnYqKPJKtvgyfPDOgJ0B5iPZIOlRX+l35mdtKTZWgMSOpQ7E2eV3w78KTXWibPmJn/zA5gO7AwRF8BV4DLknxRNGyRpz4Anjx9m2lxoE6gLyyHJPleVSTUClwHOup09Ihvk+TOirR8r2uLTl0O5DAO5a1bkm8XdVtE5nEDmMzWoVYWRcrMPJOfDqNrDjQArIgX7ZIGC4B2AheL/jy+75J0qUDPfTuDt0EHeuOrKl7Ml+Qzv1GEngOLSwK9kLSkQM99O4O3EQcaBabFi+mSxgoE0v5FXGOSphfouW/X9DbmQF+AzGiGpOxjTZ3cDzQDyH07g7fRSg5Z5Sb1VaArQvY/ln03cCr891UtMXZWb+vwUJlZdTbXAPI7V3WOHwFVnQNaAPmJrTpH2ICqziE/gPy2Wp1rUED5rbUaF8Vsp6zUVTqBqk6xIT1TVKYckz/oVKZgVQPMS3proyDhVY1aJT2vkngh4f54S3o/AdIWsUP2RbRSAAAAAElFTkSuQmCC" /***/ }), /***/ "7aT7": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAiCAYAAAC0nUK+AAAAAXNSR0IArs4c6QAABRVJREFUSA2lVmtsFFUUPndmdwtla9ttuzY1EgkxfdqYlEiAtKU0SkgoJkZCxOgfElKjUX8YbYM/akJjUUyqJhasiEZBETC2aISStN0KvmqrYh8kKq8ismzf7W53Z3fu9ZzbzjKzDyjx/Ng5j+9858y9595ZBreQicKKCi6ghoOoAsbyGIgsAWycCbjKADwKg/aMIc93jKEngSAmXnzFlVWMiyYhxEPxUauHAesVKnslZ9DTZY0AWMhFQ4My9kVno+CijoBKrhtSah4GR+UaUO/NA5aRDmJyCvSRa6B5foDQidPAr9+QnApT3nRtq6pjDQ08tghgl2y0oPyor6Bc+B7YIPwfHBI8FEJ3cqE44QhPeaOFFcepwThyX1H5axKwtkZovw4kZ0wQIfwo5i0U2G0hHyupWItdc+rgTomNWpRH+cQzXlRZTgXkK4iIaMTtZqkv7AD7g8WWwmT4dzfD+LotED7bGxczHJRH+cSjCyG7Z76S9asgovfS5mWeOgzM4TDw8jnX8jH43zkgdSXNCRntH8mNtoAWDKFpMLFxu9xkpsJqBbheQzGailhi/cJlCCC5IXxmFvxvvAfCNwazr+4BMTVjhOST8omHRHBlM5JDNRk0brESeGs/iHDE4tZOdkHw2NcQPP4N+JvetcTIMHiYENUKnq7l5KQ5Nov+50XQus6aXVLHDQT9yj+gZGZAqL0D9ItXLBgTz3IFsW6K0gExy1zrIZp9syuqB786CXxiEl+dQ/DztqifFIMHM3Owc+EnJ508s2idZ8xmUl3r8FhiBg/x2rCWF6lddKQVd3YU6GzaBdzrk8ul5OUihIN+9V9cqu8hfOZnELi51OWSrZujOaQQz7ywazYczH40CumusJeVLgQAbCX5EPx9EIJH2mQCU1VQ718BjupyWNZ2EBiOpRQcv8DefZD6Uu28iTwL0s98RRVPAhefxs75ROVjwP0BSHlkPdjyVwLNsH5pBLRT3XIvUjZWgXpPLmg9P+JRZJD+WYvEGHOuqOpWNrZ6011ievYS7l0mVU/dsV0WjvSdAxVJmXOZ0cn8cy4ox1BOCp4DW3E+OF+vB1q6wIHD8i0Q6Mt2LF0hE/A222Xchv/3biGescLyF4lY3i1Z9iXNOO/DEA7D9LP1EP5tUBZd7A/hKY/y8YvV77rP2UK50Y+Fr7Qqn2mRXpzPNLDb5SW09KnH464Ec0Hah7lPjkHgbbx7iBjghmJjq7IGekbIiJKTgVflJs7FCQFCJftOvkTIFGDMtiF7qOsnyiWxkJPDV1C5E4DvJ32xgksawdO4xTXk+dacE/dJyjnveV8BttcMup2O5DtjiSknjpycrlylHhOip4F8SYVBa9aQ52CieEJy1t0dUcH2BBaYTJRk8p3Lvlt93mRb1ITkhMgc7rwsGDxnQVsMFmJ2dRs2ErS4TUZScsLkDPUcwu5Pm/BRVWGiMfuP7vNRRwLlluSEt6m2Z3CoLN1hwWGXkrsnAZ/FdVvyjIHOvxHUZM7CQ1DLBo9qZl8iPW7OzaCysrLUcDjsKgyDu1mkd+DlnzXNeM+j6lStoigzdrt9vK+vL2DOMevyJJodhl5aWuoOBoMrdV13ekFn64RDczN1zREWqPuFh2bIj4Vz8vLydK/XK79mRq7xTLosnHP8/NyUl/n0lxeE/mGrCPx104tnOQZnjiUlx9e+bgZOqjzyNBvfZ/aRHoszxxe15thdGv4TcOBTRTIdp0VbzJr/B4CQ+h9WTY+QAAAAAElFTkSuQmCC" /***/ }), /***/ "7c3y": /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _string = __webpack_require__("3PpN"); var _string2 = _interopRequireDefault(_string); var _method = __webpack_require__("gBtb"); var _method2 = _interopRequireDefault(_method); var _number = __webpack_require__("QsfC"); var _number2 = _interopRequireDefault(_number); var _boolean = __webpack_require__("/1q1"); var _boolean2 = _interopRequireDefault(_boolean); var _regexp = __webpack_require__("56D2"); var _regexp2 = _interopRequireDefault(_regexp); var _integer = __webpack_require__("rKrQ"); var _integer2 = _interopRequireDefault(_integer); var _float = __webpack_require__("4LST"); var _float2 = _interopRequireDefault(_float); var _array = __webpack_require__("MKdg"); var _array2 = _interopRequireDefault(_array); var _object = __webpack_require__("3MA9"); var _object2 = _interopRequireDefault(_object); var _enum = __webpack_require__("2Hbh"); var _enum2 = _interopRequireDefault(_enum); var _pattern = __webpack_require__("6qr9"); var _pattern2 = _interopRequireDefault(_pattern); var _date = __webpack_require__("Vs/p"); var _date2 = _interopRequireDefault(_date); var _required = __webpack_require__("F8xi"); var _required2 = _interopRequireDefault(_required); var _type = __webpack_require__("IUBM"); var _type2 = _interopRequireDefault(_type); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } exports['default'] = { string: _string2['default'], method: _method2['default'], number: _number2['default'], boolean: _boolean2['default'], regexp: _regexp2['default'], integer: _integer2['default'], float: _float2['default'], array: _array2['default'], object: _object2['default'], 'enum': _enum2['default'], pattern: _pattern2['default'], date: _date2['default'], url: _type2['default'], hex: _type2['default'], email: _type2['default'], required: _required2['default'] }; /***/ }), /***/ "7fAF": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _provinces = _interopRequireDefault(__webpack_require__("8dE7")); var _cities = _interopRequireDefault(__webpack_require__("95Zk")); var _areas = _interopRequireDefault(__webpack_require__("ve5H")); // areas.forEach((area) => { // const matchCity = cities.filter(city => city.code === area.cityCode)[0]; // if (matchCity) { // matchCity.children = matchCity.children || []; // matchCity.children.push({ // label: area.name, // value: area.code, // }); // } // }); _cities.default.forEach(function (city) { var matchProvince = _provinces.default.filter(function (province) { return province.code === city.provinceCode; })[0]; if (matchProvince) { matchProvince.children = matchProvince.children || []; matchProvince.children.push({ label: city.name, value: city.code, children: city.children }); } }); var options = _provinces.default.map(function (province) { return { label: province.name, value: province.code, children: province.children }; }); var _default = exports.default = options; /***/ }), /***/ "7fBz": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = toArray; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__("GiK3"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_is__ = __webpack_require__("ncfW"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_is___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react_is__); function toArray(children) { var ret = []; __WEBPACK_IMPORTED_MODULE_0_react___default.a.Children.forEach(children, function (child) { if (child === undefined || child === null) { return; } if (Array.isArray(child)) { ret = ret.concat(toArray(child)); } else if (Object(__WEBPACK_IMPORTED_MODULE_1_react_is__["isFragment"])(child) && child.props) { ret = ret.concat(toArray(child.props.children)); } else { ret.push(child); } }); return ret; } /***/ }), /***/ "7jLL": /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__.p + "static/jichang.c3296170.jpg"; /***/ }), /***/ "7yhg": /***/ (function(module, exports, __webpack_require__) { (function (global, factory) { true ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : (global.arrayTreeFilter = factory()); }(this, (function () { 'use strict'; function arrayTreeFilter(data, filterFn, options) { options = options || {}; options.childrenKeyName = options.childrenKeyName || "children"; var children = data || []; var result = []; var level = 0; do { var foundItem = children.filter(function (item) { return filterFn(item, level); })[0]; if (!foundItem) { break; } result.push(foundItem); children = foundItem[options.childrenKeyName] || []; level += 1; } while (children.length > 0); return result; } return arrayTreeFilter; }))); /***/ }), /***/ "8/ER": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); // EXTERNAL MODULE: ./node_modules/react/index.js var react = __webpack_require__("GiK3"); var react_default = /*#__PURE__*/__webpack_require__.n(react); // EXTERNAL MODULE: ./node_modules/prop-types/index.js var prop_types = __webpack_require__("KSGD"); var prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types); // CONCATENATED MODULE: ./node_modules/rc-select/es/OptGroup.js function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } var OptGroup = /*#__PURE__*/ function (_Component) { _inherits(OptGroup, _Component); function OptGroup() { _classCallCheck(this, OptGroup); return _possibleConstructorReturn(this, _getPrototypeOf(OptGroup).apply(this, arguments)); } return OptGroup; }(react["Component"]); OptGroup.isSelectOptGroup = true; // CONCATENATED MODULE: ./node_modules/rc-select/es/Option.js function Option__classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function Option__possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return Option__assertThisInitialized(self); } function Option__assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function Option__getPrototypeOf(o) { Option__getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return Option__getPrototypeOf(o); } function Option__inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) Option__setPrototypeOf(subClass, superClass); } function Option__setPrototypeOf(o, p) { Option__setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return Option__setPrototypeOf(o, p); } var Option = /*#__PURE__*/ function (_Component) { Option__inherits(Option, _Component); function Option() { Option__classCallCheck(this, Option); return Option__possibleConstructorReturn(this, Option__getPrototypeOf(Option).apply(this, arguments)); } return Option; }(react["Component"]); Option.propTypes = { value: prop_types["oneOfType"]([prop_types["string"], prop_types["number"]]) }; Option.isSelectOption = true; // CONCATENATED MODULE: ./node_modules/rc-select/es/PropTypes.js function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); } function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); } function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } } function propsValueType() { for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } var props = args[0], propName = args[1], componentName = args[2], rest = args.slice(3); var basicType = prop_types["oneOfType"]([prop_types["string"], prop_types["number"]]); var labelInValueShape = prop_types["shape"]({ key: basicType.isRequired, label: prop_types["node"] }); if (props.labelInValue) { var validate = prop_types["oneOfType"]([prop_types["arrayOf"](labelInValueShape), labelInValueShape]); var error = validate.apply(void 0, [props, propName, componentName].concat(_toConsumableArray(rest))); if (error) { return new Error("Invalid prop `".concat(propName, "` supplied to `").concat(componentName, "`, ") + "when you set `labelInValue` to `true`, `".concat(propName, "` should in ") + "shape of `{ key: string | number, label?: ReactNode }`."); } } else if ((props.mode === 'multiple' || props.mode === 'tags' || props.multiple || props.tags) && props[propName] === '') { return new Error("Invalid prop `".concat(propName, "` of type `string` supplied to `").concat(componentName, "`, ") + "expected `array` when `multiple` or `tags` is `true`."); } else { var _validate = prop_types["oneOfType"]([prop_types["arrayOf"](basicType), basicType]); return _validate.apply(void 0, [props, propName, componentName].concat(_toConsumableArray(rest))); } return null; } var SelectPropTypes = { id: prop_types["string"], defaultActiveFirstOption: prop_types["bool"], multiple: prop_types["bool"], filterOption: prop_types["any"], children: prop_types["any"], showSearch: prop_types["bool"], disabled: prop_types["bool"], allowClear: prop_types["bool"], showArrow: prop_types["bool"], tags: prop_types["bool"], prefixCls: prop_types["string"], className: prop_types["string"], transitionName: prop_types["string"], optionLabelProp: prop_types["string"], optionFilterProp: prop_types["string"], animation: prop_types["string"], choiceTransitionName: prop_types["string"], open: prop_types["bool"], defaultOpen: prop_types["bool"], onChange: prop_types["func"], onBlur: prop_types["func"], onFocus: prop_types["func"], onSelect: prop_types["func"], onSearch: prop_types["func"], onPopupScroll: prop_types["func"], onMouseEnter: prop_types["func"], onMouseLeave: prop_types["func"], onInputKeyDown: prop_types["func"], placeholder: prop_types["any"], onDeselect: prop_types["func"], labelInValue: prop_types["bool"], loading: prop_types["bool"], value: propsValueType, defaultValue: propsValueType, dropdownStyle: prop_types["object"], maxTagTextLength: prop_types["number"], maxTagCount: prop_types["number"], maxTagPlaceholder: prop_types["oneOfType"]([prop_types["node"], prop_types["func"]]), tokenSeparators: prop_types["arrayOf"](prop_types["string"]), getInputElement: prop_types["func"], showAction: prop_types["arrayOf"](prop_types["string"]), clearIcon: prop_types["node"], inputIcon: prop_types["node"], removeIcon: prop_types["node"], menuItemSelectedIcon: prop_types["oneOfType"]([prop_types["func"], prop_types["node"]]), dropdownRender: prop_types["func"] }; /* harmony default export */ var PropTypes = (SelectPropTypes); // EXTERNAL MODULE: ./node_modules/classnames/index.js var classnames = __webpack_require__("HW6M"); var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); // EXTERNAL MODULE: ./node_modules/component-classes/index.js var component_classes = __webpack_require__("onlG"); var component_classes_default = /*#__PURE__*/__webpack_require__.n(component_classes); // EXTERNAL MODULE: ./node_modules/rc-animate/es/Animate.js + 4 modules var Animate = __webpack_require__("8aSS"); // EXTERNAL MODULE: ./node_modules/rc-menu/es/index.js + 11 modules var es = __webpack_require__("6gD4"); // EXTERNAL MODULE: ./node_modules/rc-util/es/Children/toArray.js var toArray = __webpack_require__("7fBz"); // EXTERNAL MODULE: ./node_modules/rc-util/es/KeyCode.js var KeyCode = __webpack_require__("opmb"); // EXTERNAL MODULE: ./node_modules/react-dom/index.js var react_dom = __webpack_require__("O27J"); var react_dom_default = /*#__PURE__*/__webpack_require__.n(react_dom); // EXTERNAL MODULE: ./node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js var react_lifecycles_compat_es = __webpack_require__("R8mX"); // EXTERNAL MODULE: ./node_modules/warning/warning.js var warning = __webpack_require__("Trj0"); var warning_default = /*#__PURE__*/__webpack_require__.n(warning); // EXTERNAL MODULE: ./node_modules/raf/index.js var raf = __webpack_require__("ommR"); var raf_default = /*#__PURE__*/__webpack_require__.n(raf); // EXTERNAL MODULE: ./node_modules/rc-trigger/es/index.js + 4 modules var rc_trigger_es = __webpack_require__("isWq"); // EXTERNAL MODULE: ./node_modules/dom-scroll-into-view/lib/index.js var lib = __webpack_require__("Kw5M"); var lib_default = /*#__PURE__*/__webpack_require__.n(lib); // CONCATENATED MODULE: ./node_modules/rc-select/es/util.js function toTitle(title) { if (typeof title === 'string') { return title; } return ''; } function getValuePropValue(child) { if (!child) { return null; } var props = child.props; if ('value' in props) { return props.value; } if (child.key) { return child.key; } if (child.type && child.type.isSelectOptGroup && props.label) { return props.label; } throw new Error("Need at least a key or a value or a label (only for OptGroup) for ".concat(child)); } function getPropValue(child, prop) { if (prop === 'value') { return getValuePropValue(child); } return child.props[prop]; } function isMultiple(props) { return props.multiple; } function isCombobox(props) { return props.combobox; } function isMultipleOrTags(props) { return props.multiple || props.tags; } function isMultipleOrTagsOrCombobox(props) { return isMultipleOrTags(props) || isCombobox(props); } function isSingleMode(props) { return !isMultipleOrTagsOrCombobox(props); } function util_toArray(value) { var ret = value; if (value === undefined) { ret = []; } else if (!Array.isArray(value)) { ret = [value]; } return ret; } function getMapKey(value) { return "".concat(typeof value, "-").concat(value); } function preventDefaultEvent(e) { e.preventDefault(); } function findIndexInValueBySingleValue(value, singleValue) { var index = -1; if (value) { for (var i = 0; i < value.length; i++) { if (value[i] === singleValue) { index = i; break; } } } return index; } function getLabelFromPropsValue(value, key) { var label; value = util_toArray(value); if (value) { // tslint:disable-next-line:prefer-for-of for (var i = 0; i < value.length; i++) { if (value[i].key === key) { label = value[i].label; break; } } } return label; } function getSelectKeys(menuItems, value) { if (value === null || value === undefined) { return []; } var selectedKeys = []; react_default.a.Children.forEach(menuItems, function (item) { var type = item.type; if (type.isMenuItemGroup) { selectedKeys = selectedKeys.concat(getSelectKeys(item.props.children, value)); } else { var itemValue = getValuePropValue(item); var itemKey = item.key; if (findIndexInValueBySingleValue(value, itemValue) !== -1 && itemKey) { selectedKeys.push(itemKey); } } }); return selectedKeys; } var UNSELECTABLE_STYLE = { userSelect: 'none', WebkitUserSelect: 'none' }; var UNSELECTABLE_ATTRIBUTE = { unselectable: 'on' }; function findFirstMenuItem(children) { // tslint:disable-next-line:prefer-for-of for (var i = 0; i < children.length; i++) { var child = children[i]; if (child.type.isMenuItemGroup) { var found = findFirstMenuItem(child.props.children); if (found) { return found; } } else if (!child.props.disabled) { return child; } } return null; } function includesSeparators(str, separators) { // tslint:disable-next-line:prefer-for-of for (var i = 0; i < separators.length; ++i) { if (str.lastIndexOf(separators[i]) > 0) { return true; } } return false; } function splitBySeparators(str, separators) { var reg = new RegExp("[".concat(separators.join(), "]")); return str.split(reg).filter(function (token) { return token; }); } function defaultFilterFn(input, child) { if (child.props.disabled) { return false; } var value = util_toArray(getPropValue(child, this.props.optionFilterProp)).join(''); return value.toLowerCase().indexOf(input.toLowerCase()) > -1; } function validateOptionValue(value, props) { if (isSingleMode(props) || isMultiple(props)) { return; } if (typeof value !== 'string') { throw new Error("Invalid `value` of type `".concat(typeof value, "` supplied to Option, ") + "expected `string` when `tags/combobox` is `true`."); } } function saveRef(instance, name) { return function (node) { instance[name] = node; }; } function generateUUID() { if (false) { return 'test-uuid'; } var d = new Date().getTime(); var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) { // tslint:disable-next-line:no-bitwise var r = (d + Math.random() * 16) % 16 | 0; d = Math.floor(d / 16); // tslint:disable-next-line:no-bitwise return (c === 'x' ? r : r & 0x7 | 0x8).toString(16); }); return uuid; } // CONCATENATED MODULE: ./node_modules/rc-select/es/DropdownMenu.js function _extends() { _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; }; return _extends.apply(this, arguments); } function DropdownMenu__classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function DropdownMenu__possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return DropdownMenu__assertThisInitialized(self); } function DropdownMenu__getPrototypeOf(o) { DropdownMenu__getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return DropdownMenu__getPrototypeOf(o); } function DropdownMenu__assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function DropdownMenu__inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) DropdownMenu__setPrototypeOf(subClass, superClass); } function DropdownMenu__setPrototypeOf(o, p) { DropdownMenu__setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return DropdownMenu__setPrototypeOf(o, p); } var DropdownMenu_DropdownMenu = /*#__PURE__*/ function (_React$Component) { DropdownMenu__inherits(DropdownMenu, _React$Component); function DropdownMenu(props) { var _this; DropdownMenu__classCallCheck(this, DropdownMenu); _this = DropdownMenu__possibleConstructorReturn(this, DropdownMenu__getPrototypeOf(DropdownMenu).call(this, props)); _this.rafInstance = null; _this.lastVisible = false; _this.scrollActiveItemToView = function () { // scroll into view var itemComponent = Object(react_dom["findDOMNode"])(_this.firstActiveItem); var _this$props = _this.props, visible = _this$props.visible, firstActiveValue = _this$props.firstActiveValue; var value = _this.props.value; if (!itemComponent || !visible) { return; } var scrollIntoViewOpts = { onlyScrollIfNeeded: true }; if ((!value || value.length === 0) && firstActiveValue) { scrollIntoViewOpts.alignWithTop = true; } // Delay to scroll since current frame item position is not ready when pre view is by filter // https://github.com/ant-design/ant-design/issues/11268#issuecomment-406634462 _this.rafInstance = raf_default()(function () { lib_default()(itemComponent, Object(react_dom["findDOMNode"])(_this.menuRef), scrollIntoViewOpts); }); }; _this.renderMenu = function () { var _this$props2 = _this.props, menuItems = _this$props2.menuItems, menuItemSelectedIcon = _this$props2.menuItemSelectedIcon, defaultActiveFirstOption = _this$props2.defaultActiveFirstOption, prefixCls = _this$props2.prefixCls, multiple = _this$props2.multiple, onMenuSelect = _this$props2.onMenuSelect, inputValue = _this$props2.inputValue, backfillValue = _this$props2.backfillValue, onMenuDeselect = _this$props2.onMenuDeselect, visible = _this$props2.visible; var firstActiveValue = _this.props.firstActiveValue; if (menuItems && menuItems.length) { var menuProps = {}; if (multiple) { menuProps.onDeselect = onMenuDeselect; menuProps.onSelect = onMenuSelect; } else { menuProps.onClick = onMenuSelect; } var value = _this.props.value; var selectedKeys = getSelectKeys(menuItems, value); var activeKeyProps = {}; var defaultActiveFirst = defaultActiveFirstOption; var clonedMenuItems = menuItems; if (selectedKeys.length || firstActiveValue) { if (visible && !_this.lastVisible) { activeKeyProps.activeKey = selectedKeys[0] || firstActiveValue; } else if (!visible) { // Do not trigger auto active since we already have selectedKeys if (selectedKeys[0]) { defaultActiveFirst = false; } activeKeyProps.activeKey = undefined; } var foundFirst = false; // set firstActiveItem via cloning menus // for scroll into view var clone = function clone(item) { var key = item.key; if (!foundFirst && selectedKeys.indexOf(key) !== -1 || !foundFirst && !selectedKeys.length && firstActiveValue.indexOf(item.key) !== -1) { foundFirst = true; return react["cloneElement"](item, { ref: function ref(_ref) { _this.firstActiveItem = _ref; } }); } return item; }; clonedMenuItems = menuItems.map(function (item) { if (item.type.isMenuItemGroup) { var children = Object(toArray["a" /* default */])(item.props.children).map(clone); return react["cloneElement"](item, {}, children); } return clone(item); }); } else { // Clear firstActiveItem when dropdown menu items was empty // Avoid `Unable to find node on an unmounted component` // https://github.com/ant-design/ant-design/issues/10774 _this.firstActiveItem = null; } // clear activeKey when inputValue change var lastValue = value && value[value.length - 1]; if (inputValue !== _this.lastInputValue && (!lastValue || lastValue !== backfillValue)) { activeKeyProps.activeKey = ''; } return react["createElement"](es["e" /* default */], _extends({ ref: _this.saveMenuRef, style: _this.props.dropdownMenuStyle, defaultActiveFirst: defaultActiveFirst, role: "listbox", itemIcon: multiple ? menuItemSelectedIcon : null }, activeKeyProps, { multiple: multiple }, menuProps, { selectedKeys: selectedKeys, prefixCls: "".concat(prefixCls, "-menu") }), clonedMenuItems); } return null; }; _this.lastInputValue = props.inputValue; _this.saveMenuRef = saveRef(DropdownMenu__assertThisInitialized(_this), 'menuRef'); return _this; } _createClass(DropdownMenu, [{ key: "componentDidMount", value: function componentDidMount() { this.scrollActiveItemToView(); this.lastVisible = this.props.visible; } }, { key: "shouldComponentUpdate", value: function shouldComponentUpdate(nextProps) { if (!nextProps.visible) { this.lastVisible = false; } // freeze when hide return this.props.visible && !nextProps.visible || nextProps.visible || nextProps.inputValue !== this.props.inputValue; } }, { key: "componentDidUpdate", value: function componentDidUpdate(prevProps) { var props = this.props; if (!prevProps.visible && props.visible) { this.scrollActiveItemToView(); } this.lastVisible = props.visible; this.lastInputValue = props.inputValue; } }, { key: "componentWillUnmount", value: function componentWillUnmount() { if (this.rafInstance) { raf_default.a.cancel(this.rafInstance); } } }, { key: "render", value: function render() { var renderMenu = this.renderMenu(); return renderMenu ? react["createElement"]("div", { style: { overflow: 'auto', transform: 'translateZ(0)' }, id: this.props.ariaId, onFocus: this.props.onPopupFocus, onMouseDown: preventDefaultEvent, onScroll: this.props.onPopupScroll }, renderMenu) : null; } }]); return DropdownMenu; }(react["Component"]); DropdownMenu_DropdownMenu.displayName = 'DropdownMenu'; DropdownMenu_DropdownMenu.propTypes = { ariaId: prop_types["string"], defaultActiveFirstOption: prop_types["bool"], value: prop_types["any"], dropdownMenuStyle: prop_types["object"], multiple: prop_types["bool"], onPopupFocus: prop_types["func"], onPopupScroll: prop_types["func"], onMenuDeSelect: prop_types["func"], onMenuSelect: prop_types["func"], prefixCls: prop_types["string"], menuItems: prop_types["any"], inputValue: prop_types["string"], visible: prop_types["bool"], firstActiveValue: prop_types["string"], menuItemSelectedIcon: prop_types["oneOfType"]([prop_types["func"], prop_types["node"]]) }; // CONCATENATED MODULE: ./node_modules/rc-select/es/SelectTrigger.js 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; } function SelectTrigger__extends() { SelectTrigger__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; }; return SelectTrigger__extends.apply(this, arguments); } function SelectTrigger__classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function SelectTrigger__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); } } function SelectTrigger__createClass(Constructor, protoProps, staticProps) { if (protoProps) SelectTrigger__defineProperties(Constructor.prototype, protoProps); if (staticProps) SelectTrigger__defineProperties(Constructor, staticProps); return Constructor; } function SelectTrigger__possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return SelectTrigger__assertThisInitialized(self); } function SelectTrigger__getPrototypeOf(o) { SelectTrigger__getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return SelectTrigger__getPrototypeOf(o); } function SelectTrigger__assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function SelectTrigger__inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) SelectTrigger__setPrototypeOf(subClass, superClass); } function SelectTrigger__setPrototypeOf(o, p) { SelectTrigger__setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return SelectTrigger__setPrototypeOf(o, p); } var __rest = this && this.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; rc_trigger_es["a" /* default */].displayName = 'Trigger'; var BUILT_IN_PLACEMENTS = { bottomLeft: { points: ['tl', 'bl'], offset: [0, 4], overflow: { adjustX: 0, adjustY: 1 } }, topLeft: { points: ['bl', 'tl'], offset: [0, -4], overflow: { adjustX: 0, adjustY: 1 } } }; var SelectTrigger_SelectTrigger = /*#__PURE__*/ function (_React$Component) { SelectTrigger__inherits(SelectTrigger, _React$Component); function SelectTrigger(props) { var _this; SelectTrigger__classCallCheck(this, SelectTrigger); _this = SelectTrigger__possibleConstructorReturn(this, SelectTrigger__getPrototypeOf(SelectTrigger).call(this, props)); _this.dropdownMenuRef = null; _this.rafInstance = null; _this.setDropdownWidth = function () { _this.cancelRafInstance(); _this.rafInstance = raf_default()(function () { var dom = react_dom["findDOMNode"](SelectTrigger__assertThisInitialized(_this)); var width = dom.offsetWidth; if (width !== _this.state.dropdownWidth) { _this.setState({ dropdownWidth: width }); } }); }; _this.cancelRafInstance = function () { if (_this.rafInstance) { raf_default.a.cancel(_this.rafInstance); } }; _this.getInnerMenu = function () { return _this.dropdownMenuRef && _this.dropdownMenuRef.menuRef; }; _this.getPopupDOMNode = function () { return _this.triggerRef.getPopupDomNode(); }; _this.getDropdownElement = function (newProps) { var props = _this.props; var dropdownRender = props.dropdownRender, ariaId = props.ariaId; var menuNode = react["createElement"](DropdownMenu_DropdownMenu, SelectTrigger__extends({ ref: _this.saveDropdownMenuRef }, newProps, { ariaId: ariaId, prefixCls: _this.getDropdownPrefixCls(), onMenuSelect: props.onMenuSelect, onMenuDeselect: props.onMenuDeselect, onPopupScroll: props.onPopupScroll, value: props.value, backfillValue: props.backfillValue, firstActiveValue: props.firstActiveValue, defaultActiveFirstOption: props.defaultActiveFirstOption, dropdownMenuStyle: props.dropdownMenuStyle, menuItemSelectedIcon: props.menuItemSelectedIcon })); if (dropdownRender) { return dropdownRender(menuNode, props); } return null; }; _this.getDropdownTransitionName = function () { var props = _this.props; var transitionName = props.transitionName; if (!transitionName && props.animation) { transitionName = "".concat(_this.getDropdownPrefixCls(), "-").concat(props.animation); } return transitionName; }; _this.getDropdownPrefixCls = function () { return "".concat(_this.props.prefixCls, "-dropdown"); }; _this.saveDropdownMenuRef = saveRef(SelectTrigger__assertThisInitialized(_this), 'dropdownMenuRef'); _this.saveTriggerRef = saveRef(SelectTrigger__assertThisInitialized(_this), 'triggerRef'); _this.state = { dropdownWidth: 0 }; return _this; } SelectTrigger__createClass(SelectTrigger, [{ key: "componentDidMount", value: function componentDidMount() { this.setDropdownWidth(); } }, { key: "componentDidUpdate", value: function componentDidUpdate() { this.setDropdownWidth(); } }, { key: "componentWillUnmount", value: function componentWillUnmount() { this.cancelRafInstance(); } }, { key: "render", value: function render() { var _popupClassName; var _a = this.props, onPopupFocus = _a.onPopupFocus, empty = _a.empty, props = __rest(_a, ["onPopupFocus", "empty"]); var multiple = props.multiple, visible = props.visible, inputValue = props.inputValue, dropdownAlign = props.dropdownAlign, disabled = props.disabled, showSearch = props.showSearch, dropdownClassName = props.dropdownClassName, dropdownStyle = props.dropdownStyle, dropdownMatchSelectWidth = props.dropdownMatchSelectWidth; var dropdownPrefixCls = this.getDropdownPrefixCls(); var popupClassName = (_popupClassName = {}, _defineProperty(_popupClassName, dropdownClassName, !!dropdownClassName), _defineProperty(_popupClassName, "".concat(dropdownPrefixCls, "--").concat(multiple ? 'multiple' : 'single'), 1), _defineProperty(_popupClassName, "".concat(dropdownPrefixCls, "--empty"), empty), _popupClassName); var popupElement = this.getDropdownElement({ menuItems: props.options, onPopupFocus: onPopupFocus, multiple: multiple, inputValue: inputValue, visible: visible }); var hideAction; if (disabled) { hideAction = []; } else if (isSingleMode(props) && !showSearch) { hideAction = ['click']; } else { hideAction = ['blur']; } var popupStyle = SelectTrigger__extends({}, dropdownStyle); var widthProp = dropdownMatchSelectWidth ? 'width' : 'minWidth'; if (this.state.dropdownWidth) { popupStyle[widthProp] = "".concat(this.state.dropdownWidth, "px"); } return react["createElement"](rc_trigger_es["a" /* default */], SelectTrigger__extends({}, props, { showAction: disabled ? [] : this.props.showAction, hideAction: hideAction, ref: this.saveTriggerRef, popupPlacement: "bottomLeft", builtinPlacements: BUILT_IN_PLACEMENTS, prefixCls: dropdownPrefixCls, popupTransitionName: this.getDropdownTransitionName(), onPopupVisibleChange: props.onDropdownVisibleChange, popup: popupElement, popupAlign: dropdownAlign, popupVisible: visible, getPopupContainer: props.getPopupContainer, popupClassName: classnames_default()(popupClassName), popupStyle: popupStyle }), props.children); } }]); return SelectTrigger; }(react["Component"]); SelectTrigger_SelectTrigger.defaultProps = { dropdownRender: function dropdownRender(menu) { return menu; } }; SelectTrigger_SelectTrigger.propTypes = { onPopupFocus: prop_types["func"], onPopupScroll: prop_types["func"], dropdownMatchSelectWidth: prop_types["bool"], dropdownAlign: prop_types["object"], visible: prop_types["bool"], disabled: prop_types["bool"], showSearch: prop_types["bool"], dropdownClassName: prop_types["string"], multiple: prop_types["bool"], inputValue: prop_types["string"], filterOption: prop_types["any"], options: prop_types["any"], prefixCls: prop_types["string"], popupClassName: prop_types["string"], children: prop_types["any"], showAction: prop_types["arrayOf"](prop_types["string"]), menuItemSelectedIcon: prop_types["oneOfType"]([prop_types["func"], prop_types["node"]]), dropdownRender: prop_types["func"], ariaId: prop_types["string"] }; SelectTrigger_SelectTrigger.displayName = 'SelectTrigger'; // CONCATENATED MODULE: ./node_modules/rc-select/es/Select.js function Select__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; } function Select__extends() { Select__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; }; return Select__extends.apply(this, arguments); } function Select__classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function Select__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); } } function Select__createClass(Constructor, protoProps, staticProps) { if (protoProps) Select__defineProperties(Constructor.prototype, protoProps); if (staticProps) Select__defineProperties(Constructor, staticProps); return Constructor; } function Select__possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return Select__assertThisInitialized(self); } function Select__getPrototypeOf(o) { Select__getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return Select__getPrototypeOf(o); } function Select__assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function Select__inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) Select__setPrototypeOf(subClass, superClass); } function Select__setPrototypeOf(o, p) { Select__setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return Select__setPrototypeOf(o, p); } // Where el is the DOM element you'd like to test for visibility function isHidden(node) { return !node || node.offsetParent === null; } var SELECT_EMPTY_VALUE_KEY = 'RC_SELECT_EMPTY_VALUE_KEY'; var noop = function noop() { return null; }; function chaining() { for (var _len = arguments.length, fns = new Array(_len), _key = 0; _key < _len; _key++) { fns[_key] = arguments[_key]; } return function () { for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { args[_key2] = arguments[_key2]; } // tslint:disable-next-line:prefer-for-of for (var i = 0; i < fns.length; i++) { if (fns[i] && typeof fns[i] === 'function') { fns[i].apply(chaining, args); } } }; } var Select_Select = /*#__PURE__*/ function (_React$Component) { Select__inherits(Select, _React$Component); function Select(props) { var _this; Select__classCallCheck(this, Select); _this = Select__possibleConstructorReturn(this, Select__getPrototypeOf(Select).call(this, props)); _this.inputRef = null; _this.inputMirrorRef = null; _this.topCtrlRef = null; _this.selectTriggerRef = null; _this.rootRef = null; _this.selectionRef = null; _this.dropdownContainer = null; _this.blurTimer = null; _this.focusTimer = null; _this.comboboxTimer = null; // tslint:disable-next-line:variable-name _this._focused = false; // tslint:disable-next-line:variable-name _this._mouseDown = false; // tslint:disable-next-line:variable-name _this._options = []; // tslint:disable-next-line:variable-name _this._empty = false; _this.onInputChange = function (event) { var tokenSeparators = _this.props.tokenSeparators; var val = event.target.value; if (isMultipleOrTags(_this.props) && tokenSeparators.length && includesSeparators(val, tokenSeparators)) { var nextValue = _this.getValueByInput(val); if (nextValue !== undefined) { _this.fireChange(nextValue); } _this.setOpenState(false, { needFocus: true }); _this.setInputValue('', false); return; } _this.setInputValue(val); _this.setState({ open: true }); if (isCombobox(_this.props)) { _this.fireChange([val]); } }; _this.onDropdownVisibleChange = function (open) { if (open && !_this._focused) { _this.clearBlurTime(); _this.timeoutFocus(); _this._focused = true; _this.updateFocusClassName(); } _this.setOpenState(open); }; // combobox ignore _this.onKeyDown = function (event) { var open = _this.state.open; var disabled = _this.props.disabled; if (disabled) { return; } var keyCode = event.keyCode; if (open && !_this.getInputDOMNode()) { _this.onInputKeyDown(event); } else if (keyCode === KeyCode["a" /* default */].ENTER || keyCode === KeyCode["a" /* default */].DOWN) { if (!open) { _this.setOpenState(true); } event.preventDefault(); } else if (keyCode === KeyCode["a" /* default */].SPACE) { // Not block space if popup is shown if (!open) { _this.setOpenState(true); event.preventDefault(); } } }; _this.onInputKeyDown = function (event) { var _this$props = _this.props, disabled = _this$props.disabled, combobox = _this$props.combobox, defaultActiveFirstOption = _this$props.defaultActiveFirstOption; if (disabled) { return; } var state = _this.state; var isRealOpen = _this.getRealOpenState(state); // magic code var keyCode = event.keyCode; if (isMultipleOrTags(_this.props) && !event.target.value && keyCode === KeyCode["a" /* default */].BACKSPACE) { event.preventDefault(); var value = state.value; if (value.length) { _this.removeSelected(value[value.length - 1]); } return; } if (keyCode === KeyCode["a" /* default */].DOWN) { if (!state.open) { _this.openIfHasChildren(); event.preventDefault(); event.stopPropagation(); return; } } else if (keyCode === KeyCode["a" /* default */].ENTER && state.open) { // Aviod trigger form submit when select item // https://github.com/ant-design/ant-design/issues/10861 // https://github.com/ant-design/ant-design/issues/14544 if (isRealOpen || !combobox) { event.preventDefault(); } // Hard close popup to avoid lock of non option in combobox mode if (isRealOpen && combobox && defaultActiveFirstOption === false) { _this.comboboxTimer = setTimeout(function () { _this.setOpenState(false); }); } } else if (keyCode === KeyCode["a" /* default */].ESC) { if (state.open) { _this.setOpenState(false); event.preventDefault(); event.stopPropagation(); } return; } if (isRealOpen && _this.selectTriggerRef) { var menu = _this.selectTriggerRef.getInnerMenu(); if (menu && menu.onKeyDown(event, _this.handleBackfill)) { event.preventDefault(); event.stopPropagation(); } } }; _this.onMenuSelect = function (_ref) { var item = _ref.item; if (!item) { return; } var value = _this.state.value; var props = _this.props; var selectedValue = getValuePropValue(item); var lastValue = value[value.length - 1]; var skipTrigger = false; if (isMultipleOrTags(props)) { if (findIndexInValueBySingleValue(value, selectedValue) !== -1) { skipTrigger = true; } else { value = value.concat([selectedValue]); } } else { if (!isCombobox(props) && lastValue !== undefined && lastValue === selectedValue && selectedValue !== _this.state.backfillValue) { _this.setOpenState(false, { needFocus: true, fireSearch: false }); skipTrigger = true; } else { value = [selectedValue]; _this.setOpenState(false, { needFocus: true, fireSearch: false }); } } if (!skipTrigger) { _this.fireChange(value); } _this.fireSelect(selectedValue); if (!skipTrigger) { var inputValue = isCombobox(props) ? getPropValue(item, props.optionLabelProp) : ''; if (props.autoClearSearchValue) { _this.setInputValue(inputValue, false); } } }; _this.onMenuDeselect = function (_ref2) { var item = _ref2.item, domEvent = _ref2.domEvent; if (domEvent.type === 'keydown' && domEvent.keyCode === KeyCode["a" /* default */].ENTER) { var menuItemDomNode = react_dom["findDOMNode"](item); // https://github.com/ant-design/ant-design/issues/20465#issuecomment-569033796 if (!isHidden(menuItemDomNode)) { _this.removeSelected(getValuePropValue(item)); } return; } if (domEvent.type === 'click') { _this.removeSelected(getValuePropValue(item)); } var props = _this.props; if (props.autoClearSearchValue) { _this.setInputValue(''); } }; _this.onArrowClick = function (e) { e.stopPropagation(); e.preventDefault(); if (!_this.props.disabled) { _this.setOpenState(!_this.state.open, { needFocus: !_this.state.open }); } }; _this.onPlaceholderClick = function () { if (_this.getInputDOMNode && _this.getInputDOMNode()) { _this.getInputDOMNode().focus(); } }; _this.onOuterFocus = function (e) { if (_this.props.disabled) { e.preventDefault(); return; } _this.clearBlurTime(); // In IE11, onOuterFocus will be trigger twice when focus input // First one: e.target is div // Second one: e.target is input // other browser only trigger second one // https://github.com/ant-design/ant-design/issues/15942 // Here we ignore the first one when e.target is div var inputNode = _this.getInputDOMNode(); if (inputNode && e.target === _this.rootRef) { return; } if (!isMultipleOrTagsOrCombobox(_this.props) && e.target === inputNode) { return; } if (_this._focused) { return; } _this._focused = true; _this.updateFocusClassName(); // only effect multiple or tag mode if (!isMultipleOrTags(_this.props) || !_this._mouseDown) { _this.timeoutFocus(); } }; _this.onPopupFocus = function () { // fix ie scrollbar, focus element again _this.maybeFocus(true, true); }; _this.onOuterBlur = function (e) { if (_this.props.disabled) { e.preventDefault(); return; } _this.blurTimer = window.setTimeout(function () { _this._focused = false; _this.updateFocusClassName(); var props = _this.props; var value = _this.state.value; var inputValue = _this.state.inputValue; if (isSingleMode(props) && props.showSearch && inputValue && props.defaultActiveFirstOption) { var options = _this._options || []; if (options.length) { var firstOption = findFirstMenuItem(options); if (firstOption) { value = [getValuePropValue(firstOption)]; _this.fireChange(value); } } } else if (isMultipleOrTags(props) && inputValue) { if (_this._mouseDown) { // need update dropmenu when not blur _this.setInputValue(''); } else { // why not use setState? // https://github.com/ant-design/ant-design/issues/14262 _this.state.inputValue = ''; if (_this.getInputDOMNode && _this.getInputDOMNode()) { _this.getInputDOMNode().value = ''; } } var tmpValue = _this.getValueByInput(inputValue); if (tmpValue !== undefined) { value = tmpValue; _this.fireChange(value); } } // if click the rest space of Select in multiple mode if (isMultipleOrTags(props) && _this._mouseDown) { _this.maybeFocus(true, true); _this._mouseDown = false; return; } _this.setOpenState(false); if (props.onBlur) { props.onBlur(_this.getVLForOnChange(value)); } }, 10); }; _this.onClearSelection = function (event) { var props = _this.props; var state = _this.state; if (props.disabled) { return; } var inputValue = state.inputValue; var value = state.value; event.stopPropagation(); if (inputValue || value.length) { if (value.length) { _this.fireChange([]); } _this.setOpenState(false, { needFocus: true }); if (inputValue) { _this.setInputValue(''); } } }; _this.onChoiceAnimationLeave = function () { _this.forcePopupAlign(); }; _this.getOptionInfoBySingleValue = function (value, optionsInfo) { var info; optionsInfo = optionsInfo || _this.state.optionsInfo; if (optionsInfo[getMapKey(value)]) { info = optionsInfo[getMapKey(value)]; } if (info) { return info; } var defaultLabel = value; if (_this.props.labelInValue) { var valueLabel = getLabelFromPropsValue(_this.props.value, value); var defaultValueLabel = getLabelFromPropsValue(_this.props.defaultValue, value); if (valueLabel !== undefined) { defaultLabel = valueLabel; } else if (defaultValueLabel !== undefined) { defaultLabel = defaultValueLabel; } } var defaultInfo = { option: react["createElement"](Option, { value: value, key: value }, value), value: value, label: defaultLabel }; return defaultInfo; }; _this.getOptionBySingleValue = function (value) { var _this$getOptionInfoBy = _this.getOptionInfoBySingleValue(value), option = _this$getOptionInfoBy.option; return option; }; _this.getOptionsBySingleValue = function (values) { return values.map(function (value) { return _this.getOptionBySingleValue(value); }); }; _this.getValueByLabel = function (label) { if (label === undefined) { return null; } var value = null; Object.keys(_this.state.optionsInfo).forEach(function (key) { var info = _this.state.optionsInfo[key]; var disabled = info.disabled; if (disabled) { return; } var oldLable = util_toArray(info.label); if (oldLable && oldLable.join('') === label) { value = info.value; } }); return value; }; _this.getVLBySingleValue = function (value) { if (_this.props.labelInValue) { return { key: value, label: _this.getLabelBySingleValue(value) }; } return value; }; _this.getVLForOnChange = function (vlsS) { var vls = vlsS; if (vls !== undefined) { if (!_this.props.labelInValue) { vls = vls.map(function (v) { return v; }); } else { vls = vls.map(function (vl) { return { key: vl, label: _this.getLabelBySingleValue(vl) }; }); } return isMultipleOrTags(_this.props) ? vls : vls[0]; } return vls; }; _this.getLabelBySingleValue = function (value, optionsInfo) { var _this$getOptionInfoBy2 = _this.getOptionInfoBySingleValue(value, optionsInfo), label = _this$getOptionInfoBy2.label; return label; }; _this.getDropdownContainer = function () { if (!_this.dropdownContainer) { _this.dropdownContainer = document.createElement('div'); document.body.appendChild(_this.dropdownContainer); } return _this.dropdownContainer; }; _this.getPlaceholderElement = function () { var props = _this.props; var state = _this.state; var hidden = false; if (state.inputValue) { hidden = true; } var value = state.value; if (value.length) { hidden = true; } if (isCombobox(props) && value.length === 1 && state.value && !state.value[0]) { hidden = false; } var placeholder = props.placeholder; if (placeholder) { return react["createElement"]("div", Select__extends({ onMouseDown: preventDefaultEvent, style: Select__extends({ display: hidden ? 'none' : 'block' }, UNSELECTABLE_STYLE) }, UNSELECTABLE_ATTRIBUTE, { onClick: _this.onPlaceholderClick, className: "".concat(props.prefixCls, "-selection__placeholder") }), placeholder); } return null; }; _this.getInputElement = function () { var props = _this.props; var defaultInput = react["createElement"]("input", { id: props.id, autoComplete: "off" }); // tslint:disable-next-line:typedef-whitespace var inputElement = props.getInputElement ? props.getInputElement() : defaultInput; var inputCls = classnames_default()(inputElement.props.className, Select__defineProperty({}, "".concat(props.prefixCls, "-search__field"), true)); // https://github.com/ant-design/ant-design/issues/4992#issuecomment-281542159 // Add space to the end of the inputValue as the width measurement tolerance return react["createElement"]("div", { className: "".concat(props.prefixCls, "-search__field__wrap") }, react["cloneElement"](inputElement, { ref: _this.saveInputRef, onChange: _this.onInputChange, onKeyDown: chaining(_this.onInputKeyDown, inputElement.props.onKeyDown, _this.props.onInputKeyDown), value: _this.state.inputValue, disabled: props.disabled, className: inputCls }), react["createElement"]("span", { ref: _this.saveInputMirrorRef, className: "".concat(props.prefixCls, "-search__field__mirror") }, _this.state.inputValue, "\xA0")); }; _this.getInputDOMNode = function () { return _this.topCtrlRef ? _this.topCtrlRef.querySelector('input,textarea,div[contentEditable]') : _this.inputRef; }; _this.getInputMirrorDOMNode = function () { return _this.inputMirrorRef; }; _this.getPopupDOMNode = function () { if (_this.selectTriggerRef) { return _this.selectTriggerRef.getPopupDOMNode(); } }; _this.getPopupMenuComponent = function () { if (_this.selectTriggerRef) { return _this.selectTriggerRef.getInnerMenu(); } }; _this.setOpenState = function (open) { var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; var needFocus = config.needFocus, fireSearch = config.fireSearch; var props = _this.props; var state = _this.state; if (state.open === open) { _this.maybeFocus(open, !!needFocus); return; } if (_this.props.onDropdownVisibleChange) { _this.props.onDropdownVisibleChange(open); } var nextState = { open: open, backfillValue: '' }; // clear search input value when open is false in singleMode. // https://github.com/ant-design/ant-design/issues/16572 if (!open && isSingleMode(props) && props.showSearch) { _this.setInputValue('', fireSearch); } if (!open) { _this.maybeFocus(open, !!needFocus); } _this.setState(Select__extends({ open: open }, nextState), function () { if (open) { _this.maybeFocus(open, !!needFocus); } }); }; _this.setInputValue = function (inputValue) { var fireSearch = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; var onSearch = _this.props.onSearch; if (inputValue !== _this.state.inputValue) { _this.setState(function (prevState) { // Additional check if `inputValue` changed in latest state. if (fireSearch && inputValue !== prevState.inputValue && onSearch) { onSearch(inputValue); } return { inputValue: inputValue }; }, _this.forcePopupAlign); } }; _this.getValueByInput = function (str) { var _this$props2 = _this.props, multiple = _this$props2.multiple, tokenSeparators = _this$props2.tokenSeparators; var nextValue = _this.state.value; var hasNewValue = false; splitBySeparators(str, tokenSeparators).forEach(function (label) { var selectedValue = [label]; if (multiple) { var value = _this.getValueByLabel(label); if (value && findIndexInValueBySingleValue(nextValue, value) === -1) { nextValue = nextValue.concat(value); hasNewValue = true; _this.fireSelect(value); } } else if (findIndexInValueBySingleValue(nextValue, label) === -1) { nextValue = nextValue.concat(selectedValue); hasNewValue = true; _this.fireSelect(label); } }); return hasNewValue ? nextValue : undefined; }; _this.getRealOpenState = function (state) { // tslint:disable-next-line:variable-name var _open = _this.props.open; if (typeof _open === 'boolean') { return _open; } var open = (state || _this.state).open; var options = _this._options || []; if (isMultipleOrTagsOrCombobox(_this.props) || !_this.props.showSearch) { if (open && !options.length) { open = false; } } return open; }; _this.markMouseDown = function () { _this._mouseDown = true; }; _this.markMouseLeave = function () { _this._mouseDown = false; }; _this.handleBackfill = function (item) { if (!_this.props.backfill || !(isSingleMode(_this.props) || isCombobox(_this.props))) { return; } var key = getValuePropValue(item); if (isCombobox(_this.props)) { _this.setInputValue(key, false); } _this.setState({ value: [key], backfillValue: key }); }; _this.filterOption = function (input, child) { var defaultFilter = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultFilterFn; var value = _this.state.value; var lastValue = value[value.length - 1]; if (!input || lastValue && lastValue === _this.state.backfillValue) { return true; } var filterFn = _this.props.filterOption; if ('filterOption' in _this.props) { if (filterFn === true) { filterFn = defaultFilter.bind(Select__assertThisInitialized(_this)); } } else { filterFn = defaultFilter.bind(Select__assertThisInitialized(_this)); } if (!filterFn) { return true; } else if (typeof filterFn === 'function') { return filterFn.call(Select__assertThisInitialized(_this), input, child); } else if (child.props.disabled) { return false; } return true; }; _this.timeoutFocus = function () { var onFocus = _this.props.onFocus; if (_this.focusTimer) { _this.clearFocusTime(); } _this.focusTimer = window.setTimeout(function () { if (onFocus) { onFocus(); } }, 10); }; _this.clearFocusTime = function () { if (_this.focusTimer) { clearTimeout(_this.focusTimer); _this.focusTimer = null; } }; _this.clearBlurTime = function () { if (_this.blurTimer) { clearTimeout(_this.blurTimer); _this.blurTimer = null; } }; _this.clearComboboxTime = function () { if (_this.comboboxTimer) { clearTimeout(_this.comboboxTimer); _this.comboboxTimer = null; } }; _this.updateFocusClassName = function () { var rootRef = _this.rootRef; var props = _this.props; // avoid setState and its side effect if (_this._focused) { component_classes_default()(rootRef).add("".concat(props.prefixCls, "-focused")); } else { component_classes_default()(rootRef).remove("".concat(props.prefixCls, "-focused")); } }; _this.maybeFocus = function (open, needFocus) { if (needFocus || open) { var input = _this.getInputDOMNode(); var _document = document, activeElement = _document.activeElement; if (input && (open || isMultipleOrTagsOrCombobox(_this.props))) { if (activeElement !== input) { input.focus(); _this._focused = true; } } else if (activeElement !== _this.selectionRef && _this.selectionRef) { _this.selectionRef.focus(); _this._focused = true; } } }; _this.removeSelected = function (selectedKey, e) { var props = _this.props; if (props.disabled || _this.isChildDisabled(selectedKey)) { return; } // Do not trigger Trigger popup if (e && e.stopPropagation) { e.stopPropagation(); } var oldValue = _this.state.value; var value = oldValue.filter(function (singleValue) { return singleValue !== selectedKey; }); var canMultiple = isMultipleOrTags(props); if (canMultiple) { var event = selectedKey; if (props.labelInValue) { event = { key: selectedKey, label: _this.getLabelBySingleValue(selectedKey) }; } if (props.onDeselect) { props.onDeselect(event, _this.getOptionBySingleValue(selectedKey)); } } _this.fireChange(value); }; _this.openIfHasChildren = function () { var props = _this.props; if (react["Children"].count(props.children) || isSingleMode(props)) { _this.setOpenState(true); } }; _this.fireSelect = function (value) { if (_this.props.onSelect) { _this.props.onSelect(_this.getVLBySingleValue(value), _this.getOptionBySingleValue(value)); } }; _this.fireChange = function (value) { var props = _this.props; if (!('value' in props)) { _this.setState({ value: value }, _this.forcePopupAlign); } var vls = _this.getVLForOnChange(value); var options = _this.getOptionsBySingleValue(value); if (props.onChange) { props.onChange(vls, isMultipleOrTags(_this.props) ? options : options[0]); } }; _this.isChildDisabled = function (key) { return Object(toArray["a" /* default */])(_this.props.children).some(function (child) { var childValue = getValuePropValue(child); return childValue === key && child.props && child.props.disabled; }); }; _this.forcePopupAlign = function () { if (!_this.state.open) { return; } if (_this.selectTriggerRef && _this.selectTriggerRef.triggerRef) { _this.selectTriggerRef.triggerRef.forcePopupAlign(); } }; _this.renderFilterOptions = function () { var inputValue = _this.state.inputValue; var _this$props3 = _this.props, children = _this$props3.children, tags = _this$props3.tags, notFoundContent = _this$props3.notFoundContent; var menuItems = []; var childrenKeys = []; var empty = false; var options = _this.renderFilterOptionsFromChildren(children, childrenKeys, menuItems); if (tags) { // tags value must be string var value = _this.state.value; value = value.filter(function (singleValue) { return childrenKeys.indexOf(singleValue) === -1 && (!inputValue || String(singleValue).indexOf(String(inputValue)) > -1); }); // sort by length value.sort(function (val1, val2) { return val1.length - val2.length; }); value.forEach(function (singleValue) { var key = singleValue; var menuItem = react["createElement"](es["b" /* Item */], { style: UNSELECTABLE_STYLE, role: "option", attribute: UNSELECTABLE_ATTRIBUTE, value: key, key: key }, key); options.push(menuItem); menuItems.push(menuItem); }); // ref: https://github.com/ant-design/ant-design/issues/14090 if (inputValue && menuItems.every(function (option) { return getValuePropValue(option) !== inputValue; })) { options.unshift(react["createElement"](es["b" /* Item */], { style: UNSELECTABLE_STYLE, role: "option", attribute: UNSELECTABLE_ATTRIBUTE, value: inputValue, key: inputValue }, inputValue)); } } if (!options.length && notFoundContent) { empty = true; options = [react["createElement"](es["b" /* Item */], { style: UNSELECTABLE_STYLE, attribute: UNSELECTABLE_ATTRIBUTE, disabled: true, role: "option", value: "NOT_FOUND", key: "NOT_FOUND" }, notFoundContent)]; } return { empty: empty, options: options }; }; _this.renderFilterOptionsFromChildren = function (children, childrenKeys, menuItems) { var sel = []; var props = _this.props; var inputValue = _this.state.inputValue; var tags = props.tags; react["Children"].forEach(children, function (child) { if (!child) { return; } var type = child.type; if (type.isSelectOptGroup) { var label = child.props.label; var key = child.key; if (!key && typeof label === 'string') { key = label; } else if (!label && key) { label = key; } // Match option group label if (inputValue && _this.filterOption(inputValue, child)) { var innerItems = Object(toArray["a" /* default */])(child.props.children).map(function (subChild) { var childValueSub = getValuePropValue(subChild) || subChild.key; return react["createElement"](es["b" /* Item */], Select__extends({ key: childValueSub, value: childValueSub }, subChild.props)); }); sel.push(react["createElement"](es["c" /* ItemGroup */], { key: key, title: label }, innerItems)); // Not match } else { var _innerItems = _this.renderFilterOptionsFromChildren(child.props.children, childrenKeys, menuItems); if (_innerItems.length) { sel.push(react["createElement"](es["c" /* ItemGroup */], { key: key, title: label }, _innerItems)); } } return; } warning_default()(type.isSelectOption, 'the children of `Select` should be `Select.Option` or `Select.OptGroup`, ' + "instead of `".concat(type.name || type.displayName || child.type, "`.")); var childValue = getValuePropValue(child); validateOptionValue(childValue, _this.props); if (_this.filterOption(inputValue, child)) { var menuItem = react["createElement"](es["b" /* Item */], Select__extends({ style: UNSELECTABLE_STYLE, attribute: UNSELECTABLE_ATTRIBUTE, value: childValue, key: childValue, role: "option" }, child.props)); sel.push(menuItem); menuItems.push(menuItem); } if (tags) { childrenKeys.push(childValue); } }); return sel; }; _this.renderTopControlNode = function () { var _this$state = _this.state, open = _this$state.open, inputValue = _this$state.inputValue; var value = _this.state.value; var props = _this.props; var choiceTransitionName = props.choiceTransitionName, prefixCls = props.prefixCls, maxTagTextLength = props.maxTagTextLength, maxTagCount = props.maxTagCount, showSearch = props.showSearch, removeIcon = props.removeIcon; var maxTagPlaceholder = props.maxTagPlaceholder; var className = "".concat(prefixCls, "-selection__rendered"); // search input is inside topControlNode in single, multiple & combobox. 2016/04/13 var innerNode = null; if (isSingleMode(props)) { var selectedValue = null; if (value.length) { var showSelectedValue = false; var opacity = 1; if (!showSearch) { showSelectedValue = true; } else if (open) { showSelectedValue = !inputValue; if (showSelectedValue) { opacity = 0.4; } } else { showSelectedValue = true; } var singleValue = value[0]; var _this$getOptionInfoBy3 = _this.getOptionInfoBySingleValue(singleValue), label = _this$getOptionInfoBy3.label, title = _this$getOptionInfoBy3.title; selectedValue = react["createElement"]("div", { key: "value", className: "".concat(prefixCls, "-selection-selected-value"), title: toTitle(title || label), style: { display: showSelectedValue ? 'block' : 'none', opacity: opacity } }, label); } if (!showSearch) { innerNode = [selectedValue]; } else { innerNode = [selectedValue, react["createElement"]("div", { className: "".concat(prefixCls, "-search ").concat(prefixCls, "-search--inline"), key: "input", style: { display: open ? 'block' : 'none' } }, _this.getInputElement())]; } } else { var selectedValueNodes = []; var limitedCountValue = value; var maxTagPlaceholderEl; if (maxTagCount !== undefined && value.length > maxTagCount) { limitedCountValue = limitedCountValue.slice(0, maxTagCount); var omittedValues = _this.getVLForOnChange(value.slice(maxTagCount, value.length)); var content = "+ ".concat(value.length - maxTagCount, " ..."); if (maxTagPlaceholder) { content = typeof maxTagPlaceholder === 'function' ? maxTagPlaceholder(omittedValues) : maxTagPlaceholder; } maxTagPlaceholderEl = react["createElement"]("li", Select__extends({ style: UNSELECTABLE_STYLE }, UNSELECTABLE_ATTRIBUTE, { role: "presentation", onMouseDown: preventDefaultEvent, className: "".concat(prefixCls, "-selection__choice ").concat(prefixCls, "-selection__choice__disabled"), key: "maxTagPlaceholder", title: toTitle(content) }), react["createElement"]("div", { className: "".concat(prefixCls, "-selection__choice__content") }, content)); } if (isMultipleOrTags(props)) { selectedValueNodes = limitedCountValue.map(function (singleValue) { var info = _this.getOptionInfoBySingleValue(singleValue); var content = info.label; var title = info.title || content; if (maxTagTextLength && typeof content === 'string' && content.length > maxTagTextLength) { content = "".concat(content.slice(0, maxTagTextLength), "..."); } var disabled = _this.isChildDisabled(singleValue); var choiceClassName = disabled ? "".concat(prefixCls, "-selection__choice ").concat(prefixCls, "-selection__choice__disabled") : "".concat(prefixCls, "-selection__choice"); return react["createElement"]("li", Select__extends({ style: UNSELECTABLE_STYLE }, UNSELECTABLE_ATTRIBUTE, { onMouseDown: preventDefaultEvent, className: choiceClassName, role: "presentation", key: singleValue || SELECT_EMPTY_VALUE_KEY, title: toTitle(title) }), react["createElement"]("div", { className: "".concat(prefixCls, "-selection__choice__content") }, content), disabled ? null : react["createElement"]("span", { onClick: function onClick(event) { _this.removeSelected(singleValue, event); }, className: "".concat(prefixCls, "-selection__choice__remove") }, removeIcon || react["createElement"]("i", { className: "".concat(prefixCls, "-selection__choice__remove-icon") }, "\xD7"))); }); } if (maxTagPlaceholderEl) { selectedValueNodes.push(maxTagPlaceholderEl); } selectedValueNodes.push(react["createElement"]("li", { className: "".concat(prefixCls, "-search ").concat(prefixCls, "-search--inline"), key: "__input" }, _this.getInputElement())); if (isMultipleOrTags(props) && choiceTransitionName) { innerNode = react["createElement"](Animate["a" /* default */], { onLeave: _this.onChoiceAnimationLeave, component: "ul", transitionName: choiceTransitionName }, selectedValueNodes); } else { innerNode = react["createElement"]("ul", null, selectedValueNodes); } } return react["createElement"]("div", { className: className, ref: _this.saveTopCtrlRef }, _this.getPlaceholderElement(), innerNode); }; var optionsInfo = Select.getOptionsInfoFromProps(props); if (props.tags && typeof props.filterOption !== 'function') { var isDisabledExist = Object.keys(optionsInfo).some(function (key) { return optionsInfo[key].disabled; }); warning_default()(!isDisabledExist, 'Please avoid setting option to disabled in tags mode since user can always type text as tag.'); } _this.state = { value: Select.getValueFromProps(props, true), inputValue: props.combobox ? Select.getInputValueForCombobox(props, optionsInfo, true) : '', open: props.defaultOpen, optionsInfo: optionsInfo, backfillValue: '', // a flag for aviod redundant getOptionsInfoFromProps call skipBuildOptionsInfo: true, ariaId: '' }; _this.saveInputRef = saveRef(Select__assertThisInitialized(_this), 'inputRef'); _this.saveInputMirrorRef = saveRef(Select__assertThisInitialized(_this), 'inputMirrorRef'); _this.saveTopCtrlRef = saveRef(Select__assertThisInitialized(_this), 'topCtrlRef'); _this.saveSelectTriggerRef = saveRef(Select__assertThisInitialized(_this), 'selectTriggerRef'); _this.saveRootRef = saveRef(Select__assertThisInitialized(_this), 'rootRef'); _this.saveSelectionRef = saveRef(Select__assertThisInitialized(_this), 'selectionRef'); return _this; } Select__createClass(Select, [{ key: "componentDidMount", value: function componentDidMount() { // when defaultOpen is true, we should auto focus search input // https://github.com/ant-design/ant-design/issues/14254 if (this.props.autoFocus || this.state.open) { this.focus(); } this.setState({ ariaId: generateUUID() }); } }, { key: "componentDidUpdate", value: function componentDidUpdate() { if (isMultipleOrTags(this.props)) { var inputNode = this.getInputDOMNode(); var mirrorNode = this.getInputMirrorDOMNode(); if (inputNode && inputNode.value && mirrorNode) { inputNode.style.width = ''; inputNode.style.width = "".concat(mirrorNode.clientWidth, "px"); } else if (inputNode) { inputNode.style.width = ''; } } this.forcePopupAlign(); } }, { key: "componentWillUnmount", value: function componentWillUnmount() { this.clearFocusTime(); this.clearBlurTime(); this.clearComboboxTime(); if (this.dropdownContainer) { react_dom["unmountComponentAtNode"](this.dropdownContainer); document.body.removeChild(this.dropdownContainer); this.dropdownContainer = null; } } }, { key: "focus", value: function focus() { if (isSingleMode(this.props) && this.selectionRef) { this.selectionRef.focus(); } else if (this.getInputDOMNode()) { this.getInputDOMNode().focus(); } } }, { key: "blur", value: function blur() { if (isSingleMode(this.props) && this.selectionRef) { this.selectionRef.blur(); } else if (this.getInputDOMNode()) { this.getInputDOMNode().blur(); } } }, { key: "renderArrow", value: function renderArrow(multiple) { // showArrow : Set to true if not multiple by default but keep set value. var _this$props4 = this.props, _this$props4$showArro = _this$props4.showArrow, showArrow = _this$props4$showArro === void 0 ? !multiple : _this$props4$showArro, loading = _this$props4.loading, inputIcon = _this$props4.inputIcon, prefixCls = _this$props4.prefixCls; if (!showArrow && !loading) { return null; } // if loading have loading icon var defaultIcon = loading ? react["createElement"]("i", { className: "".concat(prefixCls, "-arrow-loading") }) : react["createElement"]("i", { className: "".concat(prefixCls, "-arrow-icon") }); return react["createElement"]("span", Select__extends({ key: "arrow", className: "".concat(prefixCls, "-arrow"), style: UNSELECTABLE_STYLE }, UNSELECTABLE_ATTRIBUTE, { onClick: this.onArrowClick }), inputIcon || defaultIcon); } }, { key: "renderClear", value: function renderClear() { var _this$props5 = this.props, prefixCls = _this$props5.prefixCls, allowClear = _this$props5.allowClear, clearIcon = _this$props5.clearIcon; var inputValue = this.state.inputValue; var value = this.state.value; var clear = react["createElement"]("span", Select__extends({ key: "clear", className: "".concat(prefixCls, "-selection__clear"), onMouseDown: preventDefaultEvent, style: UNSELECTABLE_STYLE }, UNSELECTABLE_ATTRIBUTE, { onClick: this.onClearSelection }), clearIcon || react["createElement"]("i", { className: "".concat(prefixCls, "-selection__clear-icon") }, "\xD7")); if (!allowClear) { return null; } if (isCombobox(this.props)) { if (inputValue) { return clear; } return null; } if (inputValue || value.length) { return clear; } return null; } }, { key: "render", value: function render() { var _rootCls; var props = this.props; var multiple = isMultipleOrTags(props); // Default set showArrow to true if not set (not set directly in defaultProps to handle multiple case) var _props$showArrow = props.showArrow, showArrow = _props$showArrow === void 0 ? true : _props$showArrow; var state = this.state; var className = props.className, disabled = props.disabled, prefixCls = props.prefixCls, loading = props.loading; var ctrlNode = this.renderTopControlNode(); var _this$state2 = this.state, open = _this$state2.open, ariaId = _this$state2.ariaId; if (open) { var filterOptions = this.renderFilterOptions(); this._empty = filterOptions.empty; this._options = filterOptions.options; } var realOpen = this.getRealOpenState(); var empty = this._empty; var options = this._options || []; var dataOrAriaAttributeProps = {}; Object.keys(props).forEach(function (key) { if (Object.prototype.hasOwnProperty.call(props, key) && (key.substr(0, 5) === 'data-' || key.substr(0, 5) === 'aria-' || key === 'role')) { dataOrAriaAttributeProps[key] = props[key]; } }); // for (const key in props) { // if ( // Object.prototype.hasOwnProperty.call(props, key) && // (key.substr(0, 5) === 'data-' || key.substr(0, 5) === 'aria-' || key === 'role') // ) { // dataOrAriaAttributeProps[key] = props[key]; // } // } var extraSelectionProps = Select__extends({}, dataOrAriaAttributeProps); if (!isMultipleOrTagsOrCombobox(props)) { extraSelectionProps = Select__extends(Select__extends({}, extraSelectionProps), { onKeyDown: this.onKeyDown, tabIndex: props.disabled ? -1 : props.tabIndex }); } var rootCls = (_rootCls = {}, Select__defineProperty(_rootCls, className, !!className), Select__defineProperty(_rootCls, prefixCls, 1), Select__defineProperty(_rootCls, "".concat(prefixCls, "-open"), open), Select__defineProperty(_rootCls, "".concat(prefixCls, "-focused"), open || !!this._focused), Select__defineProperty(_rootCls, "".concat(prefixCls, "-combobox"), isCombobox(props)), Select__defineProperty(_rootCls, "".concat(prefixCls, "-disabled"), disabled), Select__defineProperty(_rootCls, "".concat(prefixCls, "-enabled"), !disabled), Select__defineProperty(_rootCls, "".concat(prefixCls, "-allow-clear"), !!props.allowClear), Select__defineProperty(_rootCls, "".concat(prefixCls, "-no-arrow"), !showArrow), Select__defineProperty(_rootCls, "".concat(prefixCls, "-loading"), !!loading), _rootCls); return react["createElement"](SelectTrigger_SelectTrigger, { onPopupFocus: this.onPopupFocus, onMouseEnter: this.props.onMouseEnter, onMouseLeave: this.props.onMouseLeave, dropdownAlign: props.dropdownAlign, dropdownClassName: props.dropdownClassName, dropdownMatchSelectWidth: props.dropdownMatchSelectWidth, defaultActiveFirstOption: props.defaultActiveFirstOption, dropdownMenuStyle: props.dropdownMenuStyle, transitionName: props.transitionName, animation: props.animation, prefixCls: props.prefixCls, dropdownStyle: props.dropdownStyle, combobox: props.combobox, showSearch: props.showSearch, options: options, empty: empty, multiple: multiple, disabled: disabled, visible: realOpen, inputValue: state.inputValue, value: state.value, backfillValue: state.backfillValue, firstActiveValue: props.firstActiveValue, onDropdownVisibleChange: this.onDropdownVisibleChange, getPopupContainer: props.getPopupContainer, onMenuSelect: this.onMenuSelect, onMenuDeselect: this.onMenuDeselect, onPopupScroll: props.onPopupScroll, showAction: props.showAction, ref: this.saveSelectTriggerRef, menuItemSelectedIcon: props.menuItemSelectedIcon, dropdownRender: props.dropdownRender, ariaId: ariaId }, react["createElement"]("div", { id: props.id, style: props.style, ref: this.saveRootRef, onBlur: this.onOuterBlur, onFocus: this.onOuterFocus, className: classnames_default()(rootCls), onMouseDown: this.markMouseDown, onMouseUp: this.markMouseLeave, onMouseOut: this.markMouseLeave }, react["createElement"]("div", Select__extends({ ref: this.saveSelectionRef, key: "selection", className: "".concat(prefixCls, "-selection\n ").concat(prefixCls, "-selection--").concat(multiple ? 'multiple' : 'single'), role: "combobox", "aria-autocomplete": "list", "aria-haspopup": "true", "aria-controls": ariaId, "aria-expanded": realOpen }, extraSelectionProps), ctrlNode, this.renderClear(), this.renderArrow(!!multiple)))); } }]); return Select; }(react["Component"]); Select_Select.propTypes = PropTypes; Select_Select.defaultProps = { prefixCls: 'rc-select', defaultOpen: false, labelInValue: false, defaultActiveFirstOption: true, showSearch: true, allowClear: false, placeholder: '', onChange: noop, onFocus: noop, onBlur: noop, onSelect: noop, onSearch: noop, onDeselect: noop, onInputKeyDown: noop, dropdownMatchSelectWidth: true, dropdownStyle: {}, dropdownMenuStyle: {}, optionFilterProp: 'value', optionLabelProp: 'value', notFoundContent: 'Not Found', backfill: false, showAction: ['click'], tokenSeparators: [], autoClearSearchValue: true, tabIndex: 0, dropdownRender: function dropdownRender(menu) { return menu; } }; Select_Select.getDerivedStateFromProps = function (nextProps, prevState) { var optionsInfo = prevState.skipBuildOptionsInfo ? prevState.optionsInfo : Select_Select.getOptionsInfoFromProps(nextProps, prevState); var newState = { optionsInfo: optionsInfo, skipBuildOptionsInfo: false }; if ('open' in nextProps) { newState.open = nextProps.open; } if (nextProps.disabled && prevState.open) { newState.open = false; } if ('value' in nextProps) { var value = Select_Select.getValueFromProps(nextProps); newState.value = value; if (nextProps.combobox) { newState.inputValue = Select_Select.getInputValueForCombobox(nextProps, optionsInfo); } } return newState; }; Select_Select.getOptionsFromChildren = function (children) { var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; react["Children"].forEach(children, function (child) { if (!child) { return; } var type = child.type; if (type.isSelectOptGroup) { Select_Select.getOptionsFromChildren(child.props.children, options); } else { options.push(child); } }); return options; }; Select_Select.getInputValueForCombobox = function (props, optionsInfo, useDefaultValue) { var value = []; if ('value' in props && !useDefaultValue) { value = util_toArray(props.value); } if ('defaultValue' in props && useDefaultValue) { value = util_toArray(props.defaultValue); } if (value.length) { value = value[0]; } else { return ''; } var label = value; if (props.labelInValue) { label = value.label; } else if (optionsInfo[getMapKey(value)]) { label = optionsInfo[getMapKey(value)].label; } if (label === undefined) { label = ''; } return label; }; Select_Select.getLabelFromOption = function (props, option) { return getPropValue(option, props.optionLabelProp); }; Select_Select.getOptionsInfoFromProps = function (props, preState) { var options = Select_Select.getOptionsFromChildren(props.children); var optionsInfo = {}; options.forEach(function (option) { var singleValue = getValuePropValue(option); optionsInfo[getMapKey(singleValue)] = { option: option, value: singleValue, label: Select_Select.getLabelFromOption(props, option), title: option.props.title, disabled: option.props.disabled }; }); if (preState) { // keep option info in pre state value. var oldOptionsInfo = preState.optionsInfo; var value = preState.value; if (value) { value.forEach(function (v) { var key = getMapKey(v); if (!optionsInfo[key] && oldOptionsInfo[key] !== undefined) { optionsInfo[key] = oldOptionsInfo[key]; } }); } } return optionsInfo; }; Select_Select.getValueFromProps = function (props, useDefaultValue) { var value = []; if ('value' in props && !useDefaultValue) { value = util_toArray(props.value); } if ('defaultValue' in props && useDefaultValue) { value = util_toArray(props.defaultValue); } if (props.labelInValue) { value = value.map(function (v) { return v.key; }); } return value; }; Select_Select.displayName = 'Select'; Object(react_lifecycles_compat_es["polyfill"])(Select_Select); /* harmony default export */ var es_Select = (Select_Select); // CONCATENATED MODULE: ./node_modules/rc-select/es/index.js es_Select.Option = Option; es_Select.OptGroup = OptGroup; /* harmony default export */ var rc_select_es = (es_Select); // EXTERNAL MODULE: ./node_modules/antd/node_modules/classnames/index.js var node_modules_classnames = __webpack_require__("kTQ8"); var node_modules_classnames_default = /*#__PURE__*/__webpack_require__.n(node_modules_classnames); // EXTERNAL MODULE: ./node_modules/omit.js/es/index.js var omit_js_es = __webpack_require__("JkBm"); // EXTERNAL MODULE: ./node_modules/antd/es/config-provider/index.js + 1 modules var config_provider = __webpack_require__("PmSq"); // EXTERNAL MODULE: ./node_modules/antd/es/_util/warning.js var _util_warning = __webpack_require__("qGip"); // EXTERNAL MODULE: ./node_modules/antd/es/icon/index.js + 5 modules var icon = __webpack_require__("FC3+"); // EXTERNAL MODULE: ./node_modules/antd/es/_util/type.js var _util_type = __webpack_require__("D+5j"); // CONCATENATED MODULE: ./node_modules/antd/es/select/index.js /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return select_Select; }); function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function select__extends() { select__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; }; return select__extends.apply(this, arguments); } function select__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; } function select__classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function select__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); } } function select__createClass(Constructor, protoProps, staticProps) { if (protoProps) select__defineProperties(Constructor.prototype, protoProps); if (staticProps) select__defineProperties(Constructor, staticProps); return Constructor; } function select__inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) select__setPrototypeOf(subClass, superClass); } function select__setPrototypeOf(o, p) { select__setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return select__setPrototypeOf(o, p); } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = select__getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = select__getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return select__possibleConstructorReturn(this, result); }; } function select__possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return select__assertThisInitialized(self); } function select__assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } function select__getPrototypeOf(o) { select__getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return select__getPrototypeOf(o); } var select___rest = this && this.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var SelectSizes = Object(_util_type["a" /* tuple */])('default', 'large', 'small'); var ModeOptions = Object(_util_type["a" /* tuple */])('default', 'multiple', 'tags', 'combobox', 'SECRET_COMBOBOX_MODE_DO_NOT_USE'); var select_SelectPropTypes = { prefixCls: prop_types["string"], className: prop_types["string"], size: prop_types["oneOf"](SelectSizes), notFoundContent: prop_types["any"], showSearch: prop_types["bool"], optionLabelProp: prop_types["string"], transitionName: prop_types["string"], choiceTransitionName: prop_types["string"], id: prop_types["string"] }; var select_Select = /*#__PURE__*/function (_React$Component) { select__inherits(Select, _React$Component); var _super = _createSuper(Select); function Select(props) { var _this; select__classCallCheck(this, Select); _this = _super.call(this, props); _this.saveSelect = function (node) { _this.rcSelect = node; }; _this.renderSelect = function (_ref) { var _classNames; var getContextPopupContainer = _ref.getPopupContainer, getPrefixCls = _ref.getPrefixCls, renderEmpty = _ref.renderEmpty; var _a = _this.props, customizePrefixCls = _a.prefixCls, _a$className = _a.className, className = _a$className === void 0 ? '' : _a$className, size = _a.size, mode = _a.mode, getPopupContainer = _a.getPopupContainer, removeIcon = _a.removeIcon, clearIcon = _a.clearIcon, menuItemSelectedIcon = _a.menuItemSelectedIcon, showArrow = _a.showArrow, restProps = select___rest(_a, ["prefixCls", "className", "size", "mode", "getPopupContainer", "removeIcon", "clearIcon", "menuItemSelectedIcon", "showArrow"]); var rest = Object(omit_js_es["a" /* default */])(restProps, ['inputIcon']); var prefixCls = getPrefixCls('select', customizePrefixCls); var cls = node_modules_classnames_default()((_classNames = {}, select__defineProperty(_classNames, "".concat(prefixCls, "-lg"), size === 'large'), select__defineProperty(_classNames, "".concat(prefixCls, "-sm"), size === 'small'), select__defineProperty(_classNames, "".concat(prefixCls, "-show-arrow"), showArrow), _classNames), className); var optionLabelProp = _this.props.optionLabelProp; if (_this.isCombobox()) { // children 带 dom 结构时,无法填入输入框 optionLabelProp = optionLabelProp || 'value'; } var modeConfig = { multiple: mode === 'multiple', tags: mode === 'tags', combobox: _this.isCombobox() }; var finalRemoveIcon = removeIcon && ( /*#__PURE__*/react["isValidElement"](removeIcon) ? /*#__PURE__*/react["cloneElement"](removeIcon, { className: node_modules_classnames_default()(removeIcon.props.className, "".concat(prefixCls, "-remove-icon")) }) : removeIcon) || /*#__PURE__*/react["createElement"](icon["default"], { type: "close", className: "".concat(prefixCls, "-remove-icon") }); var finalClearIcon = clearIcon && ( /*#__PURE__*/react["isValidElement"](clearIcon) ? /*#__PURE__*/react["cloneElement"](clearIcon, { className: node_modules_classnames_default()(clearIcon.props.className, "".concat(prefixCls, "-clear-icon")) }) : clearIcon) || /*#__PURE__*/react["createElement"](icon["default"], { type: "close-circle", theme: "filled", className: "".concat(prefixCls, "-clear-icon") }); var finalMenuItemSelectedIcon = menuItemSelectedIcon && ( /*#__PURE__*/react["isValidElement"](menuItemSelectedIcon) ? /*#__PURE__*/react["cloneElement"](menuItemSelectedIcon, { className: node_modules_classnames_default()(menuItemSelectedIcon.props.className, "".concat(prefixCls, "-selected-icon")) }) : menuItemSelectedIcon) || /*#__PURE__*/react["createElement"](icon["default"], { type: "check", className: "".concat(prefixCls, "-selected-icon") }); return /*#__PURE__*/react["createElement"](rc_select_es, select__extends({ inputIcon: _this.renderSuffixIcon(prefixCls), removeIcon: finalRemoveIcon, clearIcon: finalClearIcon, menuItemSelectedIcon: finalMenuItemSelectedIcon, showArrow: showArrow }, rest, modeConfig, { prefixCls: prefixCls, className: cls, optionLabelProp: optionLabelProp || 'children', notFoundContent: _this.getNotFoundContent(renderEmpty), getPopupContainer: getPopupContainer || getContextPopupContainer, ref: _this.saveSelect })); }; Object(_util_warning["a" /* default */])(props.mode !== 'combobox', 'Select', 'The combobox mode is deprecated, ' + 'it will be removed in next major version, ' + 'please use AutoComplete instead'); return _this; } select__createClass(Select, [{ key: "getNotFoundContent", value: function getNotFoundContent(renderEmpty) { var notFoundContent = this.props.notFoundContent; if (notFoundContent !== undefined) { return notFoundContent; } if (this.isCombobox()) { return null; } return renderEmpty('Select'); } }, { key: "focus", value: function focus() { this.rcSelect.focus(); } }, { key: "blur", value: function blur() { this.rcSelect.blur(); } }, { key: "isCombobox", value: function isCombobox() { var mode = this.props.mode; return mode === 'combobox' || mode === Select.SECRET_COMBOBOX_MODE_DO_NOT_USE; } }, { key: "renderSuffixIcon", value: function renderSuffixIcon(prefixCls) { var _this$props = this.props, loading = _this$props.loading, suffixIcon = _this$props.suffixIcon; if (suffixIcon) { return /*#__PURE__*/react["isValidElement"](suffixIcon) ? /*#__PURE__*/react["cloneElement"](suffixIcon, { className: node_modules_classnames_default()(suffixIcon.props.className, "".concat(prefixCls, "-arrow-icon")) }) : suffixIcon; } if (loading) { return /*#__PURE__*/react["createElement"](icon["default"], { type: "loading" }); } return /*#__PURE__*/react["createElement"](icon["default"], { type: "down", className: "".concat(prefixCls, "-arrow-icon") }); } }, { key: "render", value: function render() { return /*#__PURE__*/react["createElement"](config_provider["ConfigConsumer"], null, this.renderSelect); } }]); return Select; }(react["Component"]); select_Select.Option = Option; select_Select.OptGroup = OptGroup; select_Select.SECRET_COMBOBOX_MODE_DO_NOT_USE = 'SECRET_COMBOBOX_MODE_DO_NOT_USE'; select_Select.defaultProps = { showSearch: false, transitionName: 'slide-up', choiceTransitionName: 'zoom' }; select_Select.propTypes = select_SelectPropTypes; /***/ }), /***/ "8FQI": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* unused harmony export InternalTreeNode */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__("GiK3"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__("KSGD"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_classnames__ = __webpack_require__("HW6M"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_rc_animate_es_CSSMotion__ = __webpack_require__("cz5N"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_rc_util_es_Children_toArray__ = __webpack_require__("7fBz"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react_lifecycles_compat__ = __webpack_require__("R8mX"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__contextTypes__ = __webpack_require__("uJF6"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__util__ = __webpack_require__("z//q"); function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } 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; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } // @ts-ignore var ICON_OPEN = 'open'; var ICON_CLOSE = 'close'; var defaultTitle = '---'; var TreeNode = /*#__PURE__*/function (_React$Component) { _inherits(TreeNode, _React$Component); var _super = _createSuper(TreeNode); function TreeNode() { var _this; _classCallCheck(this, TreeNode); _this = _super.apply(this, arguments); _this.state = { dragNodeHighlight: false }; _this.onSelectorClick = function (e) { // Click trigger before select/check operation var onNodeClick = _this.props.context.onNodeClick; onNodeClick(e, _assertThisInitialized(_this)); if (_this.isSelectable()) { _this.onSelect(e); } else { _this.onCheck(e); } }; _this.onSelectorDoubleClick = function (e) { var onNodeDoubleClick = _this.props.context.onNodeDoubleClick; onNodeDoubleClick(e, _assertThisInitialized(_this)); }; _this.onSelect = function (e) { if (_this.isDisabled()) return; var onNodeSelect = _this.props.context.onNodeSelect; e.preventDefault(); onNodeSelect(e, _assertThisInitialized(_this)); }; _this.onCheck = function (e) { if (_this.isDisabled()) return; var _this$props = _this.props, disableCheckbox = _this$props.disableCheckbox, checked = _this$props.checked; var onNodeCheck = _this.props.context.onNodeCheck; if (!_this.isCheckable() || disableCheckbox) return; e.preventDefault(); var targetChecked = !checked; onNodeCheck(e, _assertThisInitialized(_this), targetChecked); }; _this.onMouseEnter = function (e) { var onNodeMouseEnter = _this.props.context.onNodeMouseEnter; onNodeMouseEnter(e, _assertThisInitialized(_this)); }; _this.onMouseLeave = function (e) { var onNodeMouseLeave = _this.props.context.onNodeMouseLeave; onNodeMouseLeave(e, _assertThisInitialized(_this)); }; _this.onContextMenu = function (e) { var onNodeContextMenu = _this.props.context.onNodeContextMenu; onNodeContextMenu(e, _assertThisInitialized(_this)); }; _this.onDragStart = function (e) { var onNodeDragStart = _this.props.context.onNodeDragStart; e.stopPropagation(); _this.setState({ dragNodeHighlight: true }); onNodeDragStart(e, _assertThisInitialized(_this)); try { // ie throw error // firefox-need-it e.dataTransfer.setData('text/plain', ''); } catch (error) {// empty } }; _this.onDragEnter = function (e) { var onNodeDragEnter = _this.props.context.onNodeDragEnter; e.preventDefault(); e.stopPropagation(); onNodeDragEnter(e, _assertThisInitialized(_this)); }; _this.onDragOver = function (e) { var onNodeDragOver = _this.props.context.onNodeDragOver; e.preventDefault(); e.stopPropagation(); onNodeDragOver(e, _assertThisInitialized(_this)); }; _this.onDragLeave = function (e) { var onNodeDragLeave = _this.props.context.onNodeDragLeave; e.stopPropagation(); onNodeDragLeave(e, _assertThisInitialized(_this)); }; _this.onDragEnd = function (e) { var onNodeDragEnd = _this.props.context.onNodeDragEnd; e.stopPropagation(); _this.setState({ dragNodeHighlight: false }); onNodeDragEnd(e, _assertThisInitialized(_this)); }; _this.onDrop = function (e) { var onNodeDrop = _this.props.context.onNodeDrop; e.preventDefault(); e.stopPropagation(); _this.setState({ dragNodeHighlight: false }); onNodeDrop(e, _assertThisInitialized(_this)); }; // Disabled item still can be switch _this.onExpand = function (e) { var onNodeExpand = _this.props.context.onNodeExpand; onNodeExpand(e, _assertThisInitialized(_this)); }; // Drag usage _this.setSelectHandle = function (node) { _this.selectHandle = node; }; _this.getNodeChildren = function () { var children = _this.props.children; var originList = Object(__WEBPACK_IMPORTED_MODULE_4_rc_util_es_Children_toArray__["a" /* default */])(children).filter(function (node) { return node; }); var targetList = Object(__WEBPACK_IMPORTED_MODULE_7__util__["k" /* getNodeChildren */])(originList); if (originList.length !== targetList.length) { Object(__WEBPACK_IMPORTED_MODULE_7__util__["p" /* warnOnlyTreeNode */])(); } return targetList; }; _this.getNodeState = function () { var expanded = _this.props.expanded; if (_this.isLeaf()) { return null; } return expanded ? ICON_OPEN : ICON_CLOSE; }; _this.isLeaf = function () { var _this$props2 = _this.props, isLeaf = _this$props2.isLeaf, loaded = _this$props2.loaded; var loadData = _this.props.context.loadData; var hasChildren = _this.getNodeChildren().length !== 0; if (isLeaf === false) { return false; } return isLeaf || !loadData && !hasChildren || loadData && loaded && !hasChildren; }; _this.isDisabled = function () { var disabled = _this.props.disabled; var treeDisabled = _this.props.context.disabled; // Follow the logic of Selectable if (disabled === false) { return false; } return !!(treeDisabled || disabled); }; _this.isCheckable = function () { var checkable = _this.props.checkable; var treeCheckable = _this.props.context.checkable; // Return false if tree or treeNode is not checkable if (!treeCheckable || checkable === false) return false; return treeCheckable; }; // Load data to avoid default expanded tree without data _this.syncLoadData = function (props) { var expanded = props.expanded, loading = props.loading, loaded = props.loaded; var _this$props$context = _this.props.context, loadData = _this$props$context.loadData, onNodeLoad = _this$props$context.onNodeLoad; if (loading) return; // read from state to avoid loadData at same time if (loadData && expanded && !_this.isLeaf()) { // We needn't reload data when has children in sync logic // It's only needed in node expanded var hasChildren = _this.getNodeChildren().length !== 0; if (!hasChildren && !loaded) { onNodeLoad(_assertThisInitialized(_this)); } } }; // Switcher _this.renderSwitcher = function () { var _this$props3 = _this.props, expanded = _this$props3.expanded, switcherIconFromProps = _this$props3.switcherIcon; var _this$props$context2 = _this.props.context, prefixCls = _this$props$context2.prefixCls, switcherIconFromCtx = _this$props$context2.switcherIcon; var switcherIcon = switcherIconFromProps || switcherIconFromCtx; if (_this.isLeaf()) { return __WEBPACK_IMPORTED_MODULE_0_react__["createElement"]("span", { className: __WEBPACK_IMPORTED_MODULE_2_classnames___default()("".concat(prefixCls, "-switcher"), "".concat(prefixCls, "-switcher-noop")) }, typeof switcherIcon === 'function' ? switcherIcon(_objectSpread({}, _this.props, { isLeaf: true })) : switcherIcon); } var switcherCls = __WEBPACK_IMPORTED_MODULE_2_classnames___default()("".concat(prefixCls, "-switcher"), "".concat(prefixCls, "-switcher_").concat(expanded ? ICON_OPEN : ICON_CLOSE)); return __WEBPACK_IMPORTED_MODULE_0_react__["createElement"]("span", { onClick: _this.onExpand, className: switcherCls }, typeof switcherIcon === 'function' ? switcherIcon(_objectSpread({}, _this.props, { isLeaf: false })) : switcherIcon); }; // Checkbox _this.renderCheckbox = function () { var _this$props4 = _this.props, checked = _this$props4.checked, halfChecked = _this$props4.halfChecked, disableCheckbox = _this$props4.disableCheckbox; var prefixCls = _this.props.context.prefixCls; var disabled = _this.isDisabled(); var checkable = _this.isCheckable(); if (!checkable) return null; // [Legacy] Custom element should be separate with `checkable` in future var $custom = typeof checkable !== 'boolean' ? checkable : null; return __WEBPACK_IMPORTED_MODULE_0_react__["createElement"]("span", { className: __WEBPACK_IMPORTED_MODULE_2_classnames___default()("".concat(prefixCls, "-checkbox"), checked && "".concat(prefixCls, "-checkbox-checked"), !checked && halfChecked && "".concat(prefixCls, "-checkbox-indeterminate"), (disabled || disableCheckbox) && "".concat(prefixCls, "-checkbox-disabled")), onClick: _this.onCheck }, $custom); }; _this.renderIcon = function () { var loading = _this.props.loading; var prefixCls = _this.props.context.prefixCls; return __WEBPACK_IMPORTED_MODULE_0_react__["createElement"]("span", { className: __WEBPACK_IMPORTED_MODULE_2_classnames___default()("".concat(prefixCls, "-iconEle"), "".concat(prefixCls, "-icon__").concat(_this.getNodeState() || 'docu'), loading && "".concat(prefixCls, "-icon_loading")) }); }; // Icon + Title _this.renderSelector = function () { var dragNodeHighlight = _this.state.dragNodeHighlight; var _this$props5 = _this.props, title = _this$props5.title, selected = _this$props5.selected, icon = _this$props5.icon, loading = _this$props5.loading; var _this$props$context3 = _this.props.context, prefixCls = _this$props$context3.prefixCls, showIcon = _this$props$context3.showIcon, treeIcon = _this$props$context3.icon, draggable = _this$props$context3.draggable, loadData = _this$props$context3.loadData; var disabled = _this.isDisabled(); var wrapClass = "".concat(prefixCls, "-node-content-wrapper"); // Icon - Still show loading icon when loading without showIcon var $icon; if (showIcon) { var currentIcon = icon || treeIcon; $icon = currentIcon ? __WEBPACK_IMPORTED_MODULE_0_react__["createElement"]("span", { className: __WEBPACK_IMPORTED_MODULE_2_classnames___default()("".concat(prefixCls, "-iconEle"), "".concat(prefixCls, "-icon__customize")) }, typeof currentIcon === 'function' ? currentIcon(_this.props) : currentIcon) : _this.renderIcon(); } else if (loadData && loading) { $icon = _this.renderIcon(); } // Title var $title = __WEBPACK_IMPORTED_MODULE_0_react__["createElement"]("span", { className: "".concat(prefixCls, "-title") }, title); return __WEBPACK_IMPORTED_MODULE_0_react__["createElement"]("span", { ref: _this.setSelectHandle, title: typeof title === 'string' ? title : '', className: __WEBPACK_IMPORTED_MODULE_2_classnames___default()("".concat(wrapClass), "".concat(wrapClass, "-").concat(_this.getNodeState() || 'normal'), !disabled && (selected || dragNodeHighlight) && "".concat(prefixCls, "-node-selected"), !disabled && draggable && 'draggable'), draggable: !disabled && draggable || undefined, "aria-grabbed": !disabled && draggable || undefined, onMouseEnter: _this.onMouseEnter, onMouseLeave: _this.onMouseLeave, onContextMenu: _this.onContextMenu, onClick: _this.onSelectorClick, onDoubleClick: _this.onSelectorDoubleClick, onDragStart: draggable ? _this.onDragStart : undefined }, $icon, $title); }; // Children list wrapped with `Animation` _this.renderChildren = function () { var _this$props6 = _this.props, expanded = _this$props6.expanded, pos = _this$props6.pos; var _this$props$context4 = _this.props.context, prefixCls = _this$props$context4.prefixCls, motion = _this$props$context4.motion, renderTreeNode = _this$props$context4.renderTreeNode; // Children TreeNode var nodeList = _this.getNodeChildren(); if (nodeList.length === 0) { return null; } return __WEBPACK_IMPORTED_MODULE_0_react__["createElement"](__WEBPACK_IMPORTED_MODULE_3_rc_animate_es_CSSMotion__["b" /* default */], Object.assign({ visible: expanded }, motion), function (_ref) { var style = _ref.style, className = _ref.className; return __WEBPACK_IMPORTED_MODULE_0_react__["createElement"]("ul", { className: __WEBPACK_IMPORTED_MODULE_2_classnames___default()(className, "".concat(prefixCls, "-child-tree"), expanded && "".concat(prefixCls, "-child-tree-open")), style: style, "data-expanded": expanded, role: "group" }, Object(__WEBPACK_IMPORTED_MODULE_7__util__["m" /* mapChildren */])(nodeList, function (node, index) { return renderTreeNode(node, index, pos); })); }); }; return _this; } // Isomorphic needn't load data in server side _createClass(TreeNode, [{ key: "componentDidMount", value: function componentDidMount() { var _this$props7 = this.props, eventKey = _this$props7.eventKey, registerTreeNode = _this$props7.context.registerTreeNode; this.syncLoadData(this.props); registerTreeNode(eventKey, this); } }, { key: "componentDidUpdate", value: function componentDidUpdate() { this.syncLoadData(this.props); } }, { key: "componentWillUnmount", value: function componentWillUnmount() { var _this$props8 = this.props, eventKey = _this$props8.eventKey, registerTreeNode = _this$props8.context.registerTreeNode; registerTreeNode(eventKey, null); } }, { key: "isSelectable", value: function isSelectable() { var selectable = this.props.selectable; var treeSelectable = this.props.context.selectable; // Ignore when selectable is undefined or null if (typeof selectable === 'boolean') { return selectable; } return treeSelectable; } }, { key: "render", value: function render() { var _classNames; var loading = this.props.loading; var _this$props9 = this.props, className = _this$props9.className, style = _this$props9.style, dragOver = _this$props9.dragOver, dragOverGapTop = _this$props9.dragOverGapTop, dragOverGapBottom = _this$props9.dragOverGapBottom, isLeaf = _this$props9.isLeaf, expanded = _this$props9.expanded, selected = _this$props9.selected, checked = _this$props9.checked, halfChecked = _this$props9.halfChecked, otherProps = _objectWithoutProperties(_this$props9, ["className", "style", "dragOver", "dragOverGapTop", "dragOverGapBottom", "isLeaf", "expanded", "selected", "checked", "halfChecked"]); var _this$props$context5 = this.props.context, prefixCls = _this$props$context5.prefixCls, filterTreeNode = _this$props$context5.filterTreeNode, draggable = _this$props$context5.draggable; var disabled = this.isDisabled(); var dataOrAriaAttributeProps = Object(__WEBPACK_IMPORTED_MODULE_7__util__["i" /* getDataAndAria */])(otherProps); return __WEBPACK_IMPORTED_MODULE_0_react__["createElement"]("li", Object.assign({ className: __WEBPACK_IMPORTED_MODULE_2_classnames___default()(className, (_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-treenode-disabled"), disabled), _defineProperty(_classNames, "".concat(prefixCls, "-treenode-switcher-").concat(expanded ? 'open' : 'close'), !isLeaf), _defineProperty(_classNames, "".concat(prefixCls, "-treenode-checkbox-checked"), checked), _defineProperty(_classNames, "".concat(prefixCls, "-treenode-checkbox-indeterminate"), halfChecked), _defineProperty(_classNames, "".concat(prefixCls, "-treenode-selected"), selected), _defineProperty(_classNames, "".concat(prefixCls, "-treenode-loading"), loading), _defineProperty(_classNames, 'drag-over', !disabled && dragOver), _defineProperty(_classNames, 'drag-over-gap-top', !disabled && dragOverGapTop), _defineProperty(_classNames, 'drag-over-gap-bottom', !disabled && dragOverGapBottom), _defineProperty(_classNames, 'filter-node', filterTreeNode && filterTreeNode(this)), _classNames)), style: style, role: "treeitem", onDragEnter: draggable ? this.onDragEnter : undefined, onDragOver: draggable ? this.onDragOver : undefined, onDragLeave: draggable ? this.onDragLeave : undefined, onDrop: draggable ? this.onDrop : undefined, onDragEnd: draggable ? this.onDragEnd : undefined }, dataOrAriaAttributeProps), this.renderSwitcher(), this.renderCheckbox(), this.renderSelector(), this.renderChildren()); } }]); return TreeNode; }(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]); TreeNode.propTypes = { eventKey: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string, prefixCls: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string, className: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string, style: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object, onSelect: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, // By parent expanded: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool, selected: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool, checked: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool, loaded: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool, loading: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool, halfChecked: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool, children: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.node, title: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.node, pos: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string, dragOver: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool, dragOverGapTop: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool, dragOverGapBottom: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool, // By user isLeaf: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool, checkable: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool, selectable: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool, disabled: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool, disableCheckbox: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool, icon: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.node, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func]), switcherIcon: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.node, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func]) }; Object(__WEBPACK_IMPORTED_MODULE_5_react_lifecycles_compat__["polyfill"])(TreeNode); var ContextTreeNode = function ContextTreeNode(props) { return __WEBPACK_IMPORTED_MODULE_0_react__["createElement"](__WEBPACK_IMPORTED_MODULE_6__contextTypes__["a" /* TreeContext */].Consumer, null, function (context) { return __WEBPACK_IMPORTED_MODULE_0_react__["createElement"](TreeNode, Object.assign({}, props, { context: context })); }); }; ContextTreeNode.defaultProps = { title: defaultTitle }; ContextTreeNode.isTreeNode = 1; /* harmony default export */ __webpack_exports__["a"] = (ContextTreeNode); /***/ }), /***/ "8H71": /***/ (function(module, exports) { // removed by extract-text-webpack-plugin /***/ }), /***/ "8VXG": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = CheckRTC; __webpack_require__("UQ5M"); var _message2 = _interopRequireDefault(__webpack_require__("/qCn")); /** * 检查设备是否支持 */ // import Common from './common'; // const presetting = new Presetting(); // presetting.init(); function CheckRTC() { // 检查浏览器是否支持TRTC视频功能(check if browser is compatible with TRTC) TRTC.checkSystemRequirements().then(function (result) { console.log("检测浏览器"); if (!result) { alert('您的浏览器不兼容视频应用!建议下载最新版Chrome浏览器'); window.location.href = 'https://www.google.cn/chrome/'; } }); // setup logging stuffs TRTC.Logger.setLogLevel(TRTC.Logger.LogLevel.DEBUG); TRTC.Logger.enableUploadLog(); TRTC.getDevices().then(function (devices) { devices.forEach(function (item) { console.log('device: ' + item.kind + ' ' + item.label + ' ' + item.deviceId); }); }).catch(function (error) { _message2.default.error("获取设备失败"); console.error('getDevices error observed ' + error); }); // populate camera options // TRTC.getCameras().then(devices => { // devices.forEach(device => { // console.log(device) // if (!Common.cameraId) { // Common.cameraId = device.deviceId; // } // // let div = $('
    '); // // div.attr('id', device.deviceId); // // div.html(device.label); // // div.appendTo('#camera-option'); // }); // }); // populate microphone options // TRTC.getMicrophones().then(devices => { // devices.forEach(device => { // if (!Common.micId) { // Common.micId = device.deviceId; // } // // let div = $('
    '); // // div.attr('id', device.deviceId); // // div.html(device.label); // // div.appendTo('#mic-option'); // }); // }); } /***/ }), /***/ "8ZKn": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAbCAYAAABm409WAAAAAXNSR0IArs4c6QAAAsBJREFUSA21VjFvUzEQPgdKWWBgIyoSUiemLvyArhAJ2oGhUhaWjnliSNQNsVXNUIWxDF2QupWAKKz9AV06MUVCKgobA5UQARrzfXe2H8l7KUrVWPLzvfPdd2f7fGcn57WWX5Bf8li81NAXIVoN4n1x0kM/kGvyVrbcl0kwrnSi5avyU15g7in6lVKZnHkGcleuy3MY6udso4oGMv8IU6/h8Q2Mv+FlF2MXZo7kphjAd6zkTO6DvwK5FYxzkDvFWJeOe4cxtVEDmW9gZhtKFSi8wfKb0na9JF1GNP0itrENnVXoDCHyDEZeRtHcAD338NThK7IBoXYUSmPmD5TuuFriRSLzTZCb4Xc1rqSiDO45t0UAPwlcBfVDB4rNHNrQ1RPLMINcw7+ShveS+f2i5pQcYhCLmGgOlhYQMZ9BD2Ve7v13z6l1XuOZDOQTRCqIrLtXNc4Zik72J4LTiYFsQWk5YB/CmVZp/DMoMt/FVj0hdgVEPDCGY7EZ+DHk1tBvh74Gg8e6+qIGOYYFbBrgDeUajnQc/9BzL7ewwo9Y8h3tpMmzVY1r5FjAZhTZ9Y+XqCi+rKx5WdctYVogbc3mwk8acqyqhWmauSTih4a7gtFAfv3L8Q+VPZAd3XM7k50ganPhJw1/cFbW+kwJlgostySZRDBanHzDnj9AOJ9oJ00e58paxAI2Ddj1Z+Iqa7bnS5DbQ/8a+h7Al0rD1DAMC9gzv2iV4MUuDM9pVixbxTQ8ZlZisUZg9RZFLBbM50y5lhWngcxlqWtp+1QLEGbMgFWiOowwn29eyEhM14ZRh/canXk9oB8zLTg0wDbTkmkmRIvFzIp+NMKRt5bPliHqrISkmM/3cILbF3u25CBGZb6P6OD1rwGUx/heL1zHxXfSuEb6Hz3kxAbBAu/l4b+sibSTDyjysa6MiF1WNi1/CMDUXwnmB40/Mi5yAAAAAElFTkSuQmCC" /***/ }), /***/ "8dE7": /***/ (function(module, exports) { module.exports = [{"code":"11","name":"北京市"},{"code":"12","name":"天津市"},{"code":"13","name":"河北省"},{"code":"14","name":"山西省"},{"code":"15","name":"内蒙古自治区"},{"code":"21","name":"辽宁省"},{"code":"22","name":"吉林省"},{"code":"23","name":"黑龙江省"},{"code":"31","name":"上海市"},{"code":"32","name":"江苏省"},{"code":"33","name":"浙江省"},{"code":"34","name":"安徽省"},{"code":"35","name":"福建省"},{"code":"36","name":"江西省"},{"code":"37","name":"山东省"},{"code":"41","name":"河南省"},{"code":"42","name":"湖北省"},{"code":"43","name":"湖南省"},{"code":"44","name":"广东省"},{"code":"45","name":"广西壮族自治区"},{"code":"46","name":"海南省"},{"code":"50","name":"重庆市"},{"code":"51","name":"四川省"},{"code":"52","name":"贵州省"},{"code":"53","name":"云南省"},{"code":"54","name":"西藏自治区"},{"code":"61","name":"陕西省"},{"code":"62","name":"甘肃省"},{"code":"63","name":"青海省"},{"code":"64","name":"宁夏回族自治区"},{"code":"65","name":"新疆维吾尔自治区"}] /***/ }), /***/ "8dqN": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAiCAYAAAC0nUK+AAAAAXNSR0IArs4c6QAABLxJREFUSA2tlltMnEUUx8+Zb3fpriWFXUCy0cbEh0KppAmoAQNIiTGaoi/GpjW1jZgG1FqjpkJ8oUmpNWqC8UFrvTw0NdF6i2iI2FAWH0yDoKlcGmONTUktXWDZpax7nfGcKd/y7a2FpOdhZ+bM+f9mmDlnPhBuYIHKxkapoFWCagZEL4LyKMB5VDCNAD6B8F3RpO9nRPLkMIrJNn9VUzNKdVQpdV/2bLoHAUeUga+VTvjOpM8ApMFVd7eY+2KwR0nVyYGivAwKWh8CR1MdGHd6AYs2gFoIQvLSZYj5foFo308gr1zVTIHiLfeO5k7s7paZiwDtEmcrGk75KxqU/55taumjk0pGo+TObzzPcRzPutnKxq94g1lw/+aGQzqgvlXFfhvPIsrZeRXq6FQysJA1x/GzpFte4HAafG5LYz3tWvIOcoGj359Wc3XbtZjbyDf9ORdgPXPmNzc18AL6T1AJ1UPXja4DbWDfWpVaWM0FYHH/6xB69RDIQFD7uV3sOgKhvS+BvDidimUd65mTVErvHv1bHqyFRHKEL6/4x88AHQ4tiP5wGpYO94JcCKUAmR0sKABX+25wtu0CsNtAxWIQeHiXvmQ04H4BMtnKIs4KE6zHj7aAq2MP4LqCTKYeoxDg3PskOJ99SoPZyXrmsCkpthMcWnjA6WaanP4XgnsOwLU33gMViZrutFZJCeFjJyC4swPkPyvHY3JQqRZB1bWRVZzHpslgCFz7nwFHfa3pytkad3jBdfA5kEtLqXkLZ6NQCsp4hgvENFvVJrDfuxWExw0lU8PanatFl1PHcbxpJocutpR2rvSyXHm3wkwOcykVcYahXNK3wlY4eFlQYo4xlN8K0zi/qZQh0jegW/bzOLNN/Hnhup9S0DQLZ0woAf08wY8Q5ylbsO1l3a72J9j2ig5lPXPYKFX7bKLwtj4Vuhag1634vxNfgosKoujbT3XAWn9Yv/xK+t2Go194zvZTCeI7DAq/+zHEf59YK1PHs471bPQROYLnBvhCATz2db2U71MQj0Po+a41L8Bg1rGevlhj7rvWv8/c1MfCX928CWOJEcrPQrDb9SPk3P1E2pPAAqvxGfNR6B0zGOCqsGGtZ3z4Eg9ScB7QU/mIlKpPgTJ4vJYvEZHCiLZtJZNnzrKWLQ3ODn9F0z4AeYz7qzU60gRV42PuSZ/OPFOnz9wccFt63vehAHzb6rtZn+D7MsGsyYKz010uukiwUlXszGcIxz2Tvpy5mxOOQ0MJA2w7aYGFfMxl/7mS240X88XkhHNw8dTgRYXwQj4hXVcU7cYO2kgkX0xeOAtKJ4dP0u6v13MGQaDqKflj6HyGO214QzhH2gxbB+0ybXe04JRblL+ZRsoxuCm8aHzwAgUdtWqpCNpx4tTKU2idtPSz8twyBzU1Na54PO6ujENZr9owYKOXIoRy+HEj2C6EWLTb7fOjo6Nhq8ba15VodZj96urqskgkcncymVw/A0l8QDliZWjUfY7hzl9ldJH9tHCp1+tNzszMrHxETQC1eY9FSlluiYODMvT13yr5yXEV/svqz4yzzuWF0599xRq4YMjE0zj/gdXH/cw46/yqzpx2V0j/HDqoNQiWpGyJrebM/weT4H+V3CTlcwAAAABJRU5ErkJggg==" /***/ }), /***/ "8j3R": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAX5JREFUOE+lkz1LHFEUhp8zM9oIihb+BEHLpNBKCAREsNK/IAsOCumSXcfhZmdwtdJCV91fYKOV3QqWbq2QIj8goJAsapUwMyfMfvix7uwKVpdzzz3Pfd9z7hWA/GZlwo6iEvA5jYHz2HHypULuZyvOXKRVXANGO07VY8eZ6QcRr1g+ARYzrjgNfXepl4oUcAcMZxy6D3135D2AKEn4uGncqyxIHwuioAJ6qSpHYlFD2UNkWpSaFVvLPZso2PMqOiOqOUWnAAWkrUaQaiN4GqMsNJN61jnG9fBwVpKkCgw+2hF5eKSlm15wcJGu4cbKp07PXnCwgOoxMPRKQXujG8AL9idFZUdhTuCHwq8XPUiLjTGDkT1eVOVLGouwm1gDO1YS5VF1oSH1u53clI0x0XN1DQteUN5C+fo8ofBXwBakEjmxXyqs/u42yiagWP7T5SlHQvwh8Neuez6kHoB66LtjfT9TlgWE7XDD/fYmQLuJKLlGgVBx4lvfGPOvH+A/hh6io5gHGqQAAAAASUVORK5CYII=" /***/ }), /***/ "8mUZ": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); var _dva = __webpack_require__("S6G3"); __webpack_require__("RKq/"); var _ConversationList = _interopRequireDefault(__webpack_require__("IW3u")); var _dec, _class; /** * IM可视化视图 */ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } // import FriendList from './FriendList'; var SideBar = exports.default = (_dec = (0, _dva.connect)(function (state) { return { totalUnreadCount: state.im.totalUnreadCount }; }), _dec(_class = /*#__PURE__*/function (_Component) { function SideBar(props) { var _this; (0, _classCallCheck2.default)(this, SideBar); _this = _callSuper(this, SideBar, [props]); _this.state = { showConversationList: true, // showFriendList: false, conversationID: props.conversationID }; return _this; } (0, _inherits2.default)(SideBar, _Component); return (0, _createClass2.default)(SideBar, [{ key: "componentDidMount", value: function componentDidMount() {} }, { key: "componentWillReceiveProps", value: function componentWillReceiveProps(nextProps) { this.setState({ conversationID: nextProps.conversationID }); } }, { key: "render", value: function render() { return /*#__PURE__*/_react.default.createElement("div", { className: "side-bar-wrapper" }, /*#__PURE__*/_react.default.createElement("div", { className: "bar-content" }, /*#__PURE__*/_react.default.createElement(_ConversationList.default, { visible: this.state.showConversationList, conversationID: this.state.conversationID }))); } }]); }(_react.Component)) || _class); /***/ }), /***/ "8rJT": /***/ (function(module, exports, __webpack_require__) { "use strict"; var util = __webpack_require__("5r+a"); function scrollIntoView(elem, container, config) { config = config || {}; // document 归一化到 window if (container.nodeType === 9) { container = util.getWindow(container); } var allowHorizontalScroll = config.allowHorizontalScroll; var onlyScrollIfNeeded = config.onlyScrollIfNeeded; var alignWithTop = config.alignWithTop; var alignWithLeft = config.alignWithLeft; var offsetTop = config.offsetTop || 0; var offsetLeft = config.offsetLeft || 0; var offsetBottom = config.offsetBottom || 0; var offsetRight = config.offsetRight || 0; allowHorizontalScroll = allowHorizontalScroll === undefined ? true : allowHorizontalScroll; var isWin = util.isWindow(container); var elemOffset = util.offset(elem); var eh = util.outerHeight(elem); var ew = util.outerWidth(elem); var containerOffset = undefined; var ch = undefined; var cw = undefined; var containerScroll = undefined; var diffTop = undefined; var diffBottom = undefined; var win = undefined; var winScroll = undefined; var ww = undefined; var wh = undefined; if (isWin) { win = container; wh = util.height(win); ww = util.width(win); winScroll = { left: util.scrollLeft(win), top: util.scrollTop(win) }; // elem 相对 container 可视视窗的距离 diffTop = { left: elemOffset.left - winScroll.left - offsetLeft, top: elemOffset.top - winScroll.top - offsetTop }; diffBottom = { left: elemOffset.left + ew - (winScroll.left + ww) + offsetRight, top: elemOffset.top + eh - (winScroll.top + wh) + offsetBottom }; containerScroll = winScroll; } else { containerOffset = util.offset(container); ch = container.clientHeight; cw = container.clientWidth; containerScroll = { left: container.scrollLeft, top: container.scrollTop }; // elem 相对 container 可视视窗的距离 // 注意边框, offset 是边框到根节点 diffTop = { left: elemOffset.left - (containerOffset.left + (parseFloat(util.css(container, 'borderLeftWidth')) || 0)) - offsetLeft, top: elemOffset.top - (containerOffset.top + (parseFloat(util.css(container, 'borderTopWidth')) || 0)) - offsetTop }; diffBottom = { left: elemOffset.left + ew - (containerOffset.left + cw + (parseFloat(util.css(container, 'borderRightWidth')) || 0)) + offsetRight, top: elemOffset.top + eh - (containerOffset.top + ch + (parseFloat(util.css(container, 'borderBottomWidth')) || 0)) + offsetBottom }; } if (diffTop.top < 0 || diffBottom.top > 0) { // 强制向上 if (alignWithTop === true) { util.scrollTop(container, containerScroll.top + diffTop.top); } else if (alignWithTop === false) { util.scrollTop(container, containerScroll.top + diffBottom.top); } else { // 自动调整 if (diffTop.top < 0) { util.scrollTop(container, containerScroll.top + diffTop.top); } else { util.scrollTop(container, containerScroll.top + diffBottom.top); } } } else { if (!onlyScrollIfNeeded) { alignWithTop = alignWithTop === undefined ? true : !!alignWithTop; if (alignWithTop) { util.scrollTop(container, containerScroll.top + diffTop.top); } else { util.scrollTop(container, containerScroll.top + diffBottom.top); } } } if (allowHorizontalScroll) { if (diffTop.left < 0 || diffBottom.left > 0) { // 强制向上 if (alignWithLeft === true) { util.scrollLeft(container, containerScroll.left + diffTop.left); } else if (alignWithLeft === false) { util.scrollLeft(container, containerScroll.left + diffBottom.left); } else { // 自动调整 if (diffTop.left < 0) { util.scrollLeft(container, containerScroll.left + diffTop.left); } else { util.scrollLeft(container, containerScroll.left + diffBottom.left); } } } else { if (!onlyScrollIfNeeded) { alignWithLeft = alignWithLeft === undefined ? true : !!alignWithLeft; if (alignWithLeft) { util.scrollLeft(container, containerScroll.left + diffTop.left); } else { util.scrollLeft(container, containerScroll.left + diffBottom.left); } } } } } module.exports = scrollIntoView; /***/ }), /***/ "8rR3": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); // EXTERNAL MODULE: ./node_modules/react/index.js var react = __webpack_require__("GiK3"); var react_default = /*#__PURE__*/__webpack_require__.n(react); // EXTERNAL MODULE: ./node_modules/prop-types/index.js var prop_types = __webpack_require__("KSGD"); var prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types); // EXTERNAL MODULE: ./node_modules/antd/node_modules/classnames/index.js var classnames = __webpack_require__("kTQ8"); var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); // EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/extends.js var helpers_extends = __webpack_require__("Dd8w"); var extends_default = /*#__PURE__*/__webpack_require__.n(helpers_extends); // EXTERNAL MODULE: ./node_modules/react-dom/index.js var react_dom = __webpack_require__("O27J"); var react_dom_default = /*#__PURE__*/__webpack_require__.n(react_dom); // EXTERNAL MODULE: ./node_modules/dom-scroll-into-view/lib/index.js var lib = __webpack_require__("Kw5M"); var lib_default = /*#__PURE__*/__webpack_require__.n(lib); // EXTERNAL MODULE: ./node_modules/lodash/has.js var has = __webpack_require__("umy1"); var has_default = /*#__PURE__*/__webpack_require__.n(has); // EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/objectWithoutProperties.js var objectWithoutProperties = __webpack_require__("+6Bu"); var objectWithoutProperties_default = /*#__PURE__*/__webpack_require__.n(objectWithoutProperties); // EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/defineProperty.js var defineProperty = __webpack_require__("bOdI"); var defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty); // EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/toConsumableArray.js var toConsumableArray = __webpack_require__("Gu7T"); var toConsumableArray_default = /*#__PURE__*/__webpack_require__.n(toConsumableArray); // EXTERNAL MODULE: ./node_modules/create-react-class/index.js var create_react_class = __webpack_require__("DT0+"); var create_react_class_default = /*#__PURE__*/__webpack_require__.n(create_react_class); // EXTERNAL MODULE: ./node_modules/rc-util/es/unsafeLifecyclesPolyfill.js var unsafeLifecyclesPolyfill = __webpack_require__("m6xR"); // EXTERNAL MODULE: ./node_modules/async-validator/es/index.js var es = __webpack_require__("jwfv"); var es_default = /*#__PURE__*/__webpack_require__.n(es); // EXTERNAL MODULE: ./node_modules/warning/warning.js var warning_warning = __webpack_require__("Trj0"); var warning_default = /*#__PURE__*/__webpack_require__.n(warning_warning); // EXTERNAL MODULE: ./node_modules/lodash/get.js var get = __webpack_require__("Q7hp"); var get_default = /*#__PURE__*/__webpack_require__.n(get); // EXTERNAL MODULE: ./node_modules/lodash/set.js var set = __webpack_require__("4yG7"); var set_default = /*#__PURE__*/__webpack_require__.n(set); // EXTERNAL MODULE: ./node_modules/lodash/eq.js var eq = __webpack_require__("22B7"); var eq_default = /*#__PURE__*/__webpack_require__.n(eq); // EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/classCallCheck.js var classCallCheck = __webpack_require__("Zrlr"); var classCallCheck_default = /*#__PURE__*/__webpack_require__.n(classCallCheck); // EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/createClass.js var createClass = __webpack_require__("wxAW"); var createClass_default = /*#__PURE__*/__webpack_require__.n(createClass); // CONCATENATED MODULE: ./node_modules/rc-form/es/createFormField.js var createFormField_Field = function Field(fields) { classCallCheck_default()(this, Field); extends_default()(this, fields); }; function isFormField(obj) { return obj instanceof createFormField_Field; } function createFormField(field) { if (isFormField(field)) { return field; } return new createFormField_Field(field); } // EXTERNAL MODULE: ./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js var hoist_non_react_statics_cjs = __webpack_require__("wfLM"); var hoist_non_react_statics_cjs_default = /*#__PURE__*/__webpack_require__.n(hoist_non_react_statics_cjs); // EXTERNAL MODULE: ./node_modules/react-is/index.js var react_is = __webpack_require__("ncfW"); var react_is_default = /*#__PURE__*/__webpack_require__.n(react_is); // CONCATENATED MODULE: ./node_modules/rc-form/es/utils.js function getDisplayName(WrappedComponent) { return WrappedComponent.displayName || WrappedComponent.name || 'WrappedComponent'; } function argumentContainer(Container, WrappedComponent) { /* eslint no-param-reassign:0 */ Container.displayName = 'Form(' + getDisplayName(WrappedComponent) + ')'; Container.WrappedComponent = WrappedComponent; return hoist_non_react_statics_cjs_default()(Container, WrappedComponent); } function identity(obj) { return obj; } function flattenArray(arr) { return Array.prototype.concat.apply([], arr); } function treeTraverse() { var path = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ''; var tree = arguments[1]; var isLeafNode = arguments[2]; var errorMessage = arguments[3]; var callback = arguments[4]; if (isLeafNode(path, tree)) { callback(path, tree); } else if (tree === undefined || tree === null) { // Do nothing } else if (Array.isArray(tree)) { tree.forEach(function (subTree, index) { return treeTraverse(path + '[' + index + ']', subTree, isLeafNode, errorMessage, callback); }); } else { // It's object and not a leaf node if (typeof tree !== 'object') { warning_default()(false, errorMessage); return; } Object.keys(tree).forEach(function (subTreeKey) { var subTree = tree[subTreeKey]; treeTraverse('' + path + (path ? '.' : '') + subTreeKey, subTree, isLeafNode, errorMessage, callback); }); } } function flattenFields(maybeNestedFields, isLeafNode, errorMessage) { var fields = {}; treeTraverse(undefined, maybeNestedFields, isLeafNode, errorMessage, function (path, node) { fields[path] = node; }); return fields; } function normalizeValidateRules(validate, rules, validateTrigger) { var validateRules = validate.map(function (item) { var newItem = extends_default()({}, item, { trigger: item.trigger || [] }); if (typeof newItem.trigger === 'string') { newItem.trigger = [newItem.trigger]; } return newItem; }); if (rules) { validateRules.push({ trigger: validateTrigger ? [].concat(validateTrigger) : [], rules: rules }); } return validateRules; } function getValidateTriggers(validateRules) { return validateRules.filter(function (item) { return !!item.rules && item.rules.length; }).map(function (item) { return item.trigger; }).reduce(function (pre, curr) { return pre.concat(curr); }, []); } function getValueFromEvent(e) { // To support custom element if (!e || !e.target) { return e; } var target = e.target; return target.type === 'checkbox' ? target.checked : target.value; } function getErrorStrs(errors) { if (errors) { return errors.map(function (e) { if (e && e.message) { return e.message; } return e; }); } return errors; } function getParams(ns, opt, cb) { var names = ns; var options = opt; var callback = cb; if (cb === undefined) { if (typeof names === 'function') { callback = names; options = {}; names = undefined; } else if (Array.isArray(names)) { if (typeof options === 'function') { callback = options; options = {}; } else { options = options || {}; } } else { callback = options; options = names || {}; names = undefined; } } return { names: names, options: options, callback: callback }; } function isEmptyObject(obj) { return Object.keys(obj).length === 0; } function hasRules(validate) { if (validate) { return validate.some(function (item) { return item.rules && item.rules.length; }); } return false; } function startsWith(str, prefix) { return str.lastIndexOf(prefix, 0) === 0; } function supportRef(nodeOrComponent) { var type = Object(react_is["isMemo"])(nodeOrComponent) ? nodeOrComponent.type.type : nodeOrComponent.type; // Function component node if (typeof type === 'function' && !(type.prototype && type.prototype.render)) { return false; } // Class component if (typeof nodeOrComponent === 'function' && !(nodeOrComponent.prototype && nodeOrComponent.prototype.render)) { return false; } return true; } // CONCATENATED MODULE: ./node_modules/rc-form/es/createFieldsStore.js function partOf(a, b) { return b.indexOf(a) === 0 && ['.', '['].indexOf(b[a.length]) !== -1; } function internalFlattenFields(fields) { return flattenFields(fields, function (_, node) { return isFormField(node); }, 'You must wrap field data with `createFormField`.'); } var createFieldsStore_FieldsStore = function () { function FieldsStore(fields) { classCallCheck_default()(this, FieldsStore); createFieldsStore__initialiseProps.call(this); this.fields = internalFlattenFields(fields); this.fieldsMeta = {}; } createClass_default()(FieldsStore, [{ key: 'updateFields', value: function updateFields(fields) { this.fields = internalFlattenFields(fields); } }, { key: 'flattenRegisteredFields', value: function flattenRegisteredFields(fields) { var validFieldsName = this.getAllFieldsName(); return flattenFields(fields, function (path) { return validFieldsName.indexOf(path) >= 0; }, 'You cannot set a form field before rendering a field associated with the value.'); } }, { key: 'setFields', value: function setFields(fields) { var _this = this; var fieldsMeta = this.fieldsMeta; var nowFields = extends_default()({}, this.fields, fields); var nowValues = {}; Object.keys(fieldsMeta).forEach(function (f) { nowValues[f] = _this.getValueFromFields(f, nowFields); }); Object.keys(nowValues).forEach(function (f) { var value = nowValues[f]; var fieldMeta = _this.getFieldMeta(f); if (fieldMeta && fieldMeta.normalize) { var nowValue = fieldMeta.normalize(value, _this.getValueFromFields(f, _this.fields), nowValues); if (nowValue !== value) { nowFields[f] = extends_default()({}, nowFields[f], { value: nowValue }); } } }); this.fields = nowFields; } }, { key: 'resetFields', value: function resetFields(ns) { var fields = this.fields; var names = ns ? this.getValidFieldsFullName(ns) : this.getAllFieldsName(); return names.reduce(function (acc, name) { var field = fields[name]; if (field && 'value' in field) { acc[name] = {}; } return acc; }, {}); } }, { key: 'setFieldMeta', value: function setFieldMeta(name, meta) { this.fieldsMeta[name] = meta; } }, { key: 'setFieldsAsDirty', value: function setFieldsAsDirty() { var _this2 = this; Object.keys(this.fields).forEach(function (name) { var field = _this2.fields[name]; var fieldMeta = _this2.fieldsMeta[name]; if (field && fieldMeta && hasRules(fieldMeta.validate)) { _this2.fields[name] = extends_default()({}, field, { dirty: true }); } }); } }, { key: 'getFieldMeta', value: function getFieldMeta(name) { this.fieldsMeta[name] = this.fieldsMeta[name] || {}; return this.fieldsMeta[name]; } }, { key: 'getValueFromFields', value: function getValueFromFields(name, fields) { var field = fields[name]; if (field && 'value' in field) { return field.value; } var fieldMeta = this.getFieldMeta(name); return fieldMeta && fieldMeta.initialValue; } }, { key: 'getValidFieldsName', value: function getValidFieldsName() { var _this3 = this; var fieldsMeta = this.fieldsMeta; return fieldsMeta ? Object.keys(fieldsMeta).filter(function (name) { return !_this3.getFieldMeta(name).hidden; }) : []; } }, { key: 'getAllFieldsName', value: function getAllFieldsName() { var fieldsMeta = this.fieldsMeta; return fieldsMeta ? Object.keys(fieldsMeta) : []; } }, { key: 'getValidFieldsFullName', value: function getValidFieldsFullName(maybePartialName) { var maybePartialNames = Array.isArray(maybePartialName) ? maybePartialName : [maybePartialName]; return this.getValidFieldsName().filter(function (fullName) { return maybePartialNames.some(function (partialName) { return fullName === partialName || startsWith(fullName, partialName) && ['.', '['].indexOf(fullName[partialName.length]) >= 0; }); }); } }, { key: 'getFieldValuePropValue', value: function getFieldValuePropValue(fieldMeta) { var name = fieldMeta.name, getValueProps = fieldMeta.getValueProps, valuePropName = fieldMeta.valuePropName; var field = this.getField(name); var fieldValue = 'value' in field ? field.value : fieldMeta.initialValue; if (getValueProps) { return getValueProps(fieldValue); } return defineProperty_default()({}, valuePropName, fieldValue); } }, { key: 'getField', value: function getField(name) { return extends_default()({}, this.fields[name], { name: name }); } }, { key: 'getNotCollectedFields', value: function getNotCollectedFields() { var _this4 = this; var fieldsName = this.getValidFieldsName(); return fieldsName.filter(function (name) { return !_this4.fields[name]; }).map(function (name) { return { name: name, dirty: false, value: _this4.getFieldMeta(name).initialValue }; }).reduce(function (acc, field) { return set_default()(acc, field.name, createFormField(field)); }, {}); } }, { key: 'getNestedAllFields', value: function getNestedAllFields() { var _this5 = this; return Object.keys(this.fields).reduce(function (acc, name) { return set_default()(acc, name, createFormField(_this5.fields[name])); }, this.getNotCollectedFields()); } }, { key: 'getFieldMember', value: function getFieldMember(name, member) { return this.getField(name)[member]; } }, { key: 'getNestedFields', value: function getNestedFields(names, getter) { var fields = names || this.getValidFieldsName(); return fields.reduce(function (acc, f) { return set_default()(acc, f, getter(f)); }, {}); } }, { key: 'getNestedField', value: function getNestedField(name, getter) { var fullNames = this.getValidFieldsFullName(name); if (fullNames.length === 0 || // Not registered fullNames.length === 1 && fullNames[0] === name // Name already is full name. ) { return getter(name); } var isArrayValue = fullNames[0][name.length] === '['; var suffixNameStartIndex = isArrayValue ? name.length : name.length + 1; return fullNames.reduce(function (acc, fullName) { return set_default()(acc, fullName.slice(suffixNameStartIndex), getter(fullName)); }, isArrayValue ? [] : {}); } }, { key: 'isValidNestedFieldName', // @private // BG: `a` and `a.b` cannot be use in the same form value: function isValidNestedFieldName(name) { var names = this.getAllFieldsName(); return names.every(function (n) { return !partOf(n, name) && !partOf(name, n); }); } }, { key: 'clearField', value: function clearField(name) { delete this.fields[name]; delete this.fieldsMeta[name]; } }]); return FieldsStore; }(); var createFieldsStore__initialiseProps = function _initialiseProps() { var _this6 = this; this.setFieldsInitialValue = function (initialValues) { var flattenedInitialValues = _this6.flattenRegisteredFields(initialValues); var fieldsMeta = _this6.fieldsMeta; Object.keys(flattenedInitialValues).forEach(function (name) { if (fieldsMeta[name]) { _this6.setFieldMeta(name, extends_default()({}, _this6.getFieldMeta(name), { initialValue: flattenedInitialValues[name] })); } }); }; this.getAllValues = function () { var fieldsMeta = _this6.fieldsMeta, fields = _this6.fields; return Object.keys(fieldsMeta).reduce(function (acc, name) { return set_default()(acc, name, _this6.getValueFromFields(name, fields)); }, {}); }; this.getFieldsValue = function (names) { return _this6.getNestedFields(names, _this6.getFieldValue); }; this.getFieldValue = function (name) { var fields = _this6.fields; return _this6.getNestedField(name, function (fullName) { return _this6.getValueFromFields(fullName, fields); }); }; this.getFieldsError = function (names) { return _this6.getNestedFields(names, _this6.getFieldError); }; this.getFieldError = function (name) { return _this6.getNestedField(name, function (fullName) { return getErrorStrs(_this6.getFieldMember(fullName, 'errors')); }); }; this.isFieldValidating = function (name) { return _this6.getFieldMember(name, 'validating'); }; this.isFieldsValidating = function (ns) { var names = ns || _this6.getValidFieldsName(); return names.some(function (n) { return _this6.isFieldValidating(n); }); }; this.isFieldTouched = function (name) { return _this6.getFieldMember(name, 'touched'); }; this.isFieldsTouched = function (ns) { var names = ns || _this6.getValidFieldsName(); return names.some(function (n) { return _this6.isFieldTouched(n); }); }; }; function createFieldsStore(fields) { return new createFieldsStore_FieldsStore(fields); } // EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/possibleConstructorReturn.js var possibleConstructorReturn = __webpack_require__("zwoO"); var possibleConstructorReturn_default = /*#__PURE__*/__webpack_require__.n(possibleConstructorReturn); // EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/inherits.js var inherits = __webpack_require__("Pf15"); var inherits_default = /*#__PURE__*/__webpack_require__.n(inherits); // CONCATENATED MODULE: ./node_modules/rc-form/es/FieldElemWrapper.js var FieldElemWrapper_FieldElemWrapper = function (_React$Component) { inherits_default()(FieldElemWrapper, _React$Component); function FieldElemWrapper() { classCallCheck_default()(this, FieldElemWrapper); return possibleConstructorReturn_default()(this, (FieldElemWrapper.__proto__ || Object.getPrototypeOf(FieldElemWrapper)).apply(this, arguments)); } createClass_default()(FieldElemWrapper, [{ key: 'componentDidMount', value: function componentDidMount() { var _props = this.props, name = _props.name, form = _props.form; form.domFields[name] = true; form.recoverClearedField(name); } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { var _props2 = this.props, name = _props2.name, form = _props2.form; var fieldMeta = form.fieldsStore.getFieldMeta(name); if (!fieldMeta.preserve) { // after destroy, delete data form.clearedFieldMetaCache[name] = { field: form.fieldsStore.getField(name), meta: fieldMeta }; form.clearField(name); } delete form.domFields[name]; } }, { key: 'render', value: function render() { return this.props.children; } }]); return FieldElemWrapper; }(react_default.a.Component); /* harmony default export */ var es_FieldElemWrapper = (FieldElemWrapper_FieldElemWrapper); FieldElemWrapper_FieldElemWrapper.propTypes = { name: prop_types_default.a.string, form: prop_types_default.a.shape({ domFields: prop_types_default.a.objectOf(prop_types_default.a.bool), recoverClearedField: prop_types_default.a.func, fieldsStore: prop_types_default.a.shape({ getFieldMeta: prop_types_default.a.func, getField: prop_types_default.a.func }), clearedFieldMetaCache: prop_types_default.a.objectOf(prop_types_default.a.shape({ field: prop_types_default.a.object, meta: prop_types_default.a.object })), clearField: prop_types_default.a.func }), children: prop_types_default.a.node }; // CONCATENATED MODULE: ./node_modules/rc-form/es/createBaseForm.js /* eslint-disable react/prefer-es6-class */ /* eslint-disable prefer-promise-reject-errors */ var DEFAULT_TRIGGER = 'onChange'; function createBaseForm() { var option = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; var mixins = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; var validateMessages = option.validateMessages, onFieldsChange = option.onFieldsChange, onValuesChange = option.onValuesChange, _option$mapProps = option.mapProps, mapProps = _option$mapProps === undefined ? identity : _option$mapProps, mapPropsToFields = option.mapPropsToFields, fieldNameProp = option.fieldNameProp, fieldMetaProp = option.fieldMetaProp, fieldDataProp = option.fieldDataProp, _option$formPropName = option.formPropName, formPropName = _option$formPropName === undefined ? 'form' : _option$formPropName, formName = option.name, withRef = option.withRef; return function decorate(WrappedComponent) { var Form = create_react_class_default()({ displayName: 'Form', mixins: mixins, getInitialState: function getInitialState() { var _this = this; var fields = mapPropsToFields && mapPropsToFields(this.props); this.fieldsStore = createFieldsStore(fields || {}); this.instances = {}; this.cachedBind = {}; this.clearedFieldMetaCache = {}; this.renderFields = {}; this.domFields = {}; // HACK: https://github.com/ant-design/ant-design/issues/6406 ['getFieldsValue', 'getFieldValue', 'setFieldsInitialValue', 'getFieldsError', 'getFieldError', 'isFieldValidating', 'isFieldsValidating', 'isFieldsTouched', 'isFieldTouched'].forEach(function (key) { _this[key] = function () { var _fieldsStore; if (false) { warning(false, 'you should not use `ref` on enhanced form, please use `wrappedComponentRef`. ' + 'See: https://github.com/react-component/form#note-use-wrappedcomponentref-instead-of-withref-after-rc-form140'); } return (_fieldsStore = _this.fieldsStore)[key].apply(_fieldsStore, arguments); }; }); return { submitting: false }; }, componentDidMount: function componentDidMount() { this.cleanUpUselessFields(); }, componentWillReceiveProps: function componentWillReceiveProps(nextProps) { if (mapPropsToFields) { this.fieldsStore.updateFields(mapPropsToFields(nextProps)); } }, componentDidUpdate: function componentDidUpdate() { this.cleanUpUselessFields(); }, onCollectCommon: function onCollectCommon(name, action, args) { var fieldMeta = this.fieldsStore.getFieldMeta(name); if (fieldMeta[action]) { fieldMeta[action].apply(fieldMeta, toConsumableArray_default()(args)); } else if (fieldMeta.originalProps && fieldMeta.originalProps[action]) { var _fieldMeta$originalPr; (_fieldMeta$originalPr = fieldMeta.originalProps)[action].apply(_fieldMeta$originalPr, toConsumableArray_default()(args)); } var value = fieldMeta.getValueFromEvent ? fieldMeta.getValueFromEvent.apply(fieldMeta, toConsumableArray_default()(args)) : getValueFromEvent.apply(undefined, toConsumableArray_default()(args)); if (onValuesChange && value !== this.fieldsStore.getFieldValue(name)) { var valuesAll = this.fieldsStore.getAllValues(); var valuesAllSet = {}; valuesAll[name] = value; Object.keys(valuesAll).forEach(function (key) { return set_default()(valuesAllSet, key, valuesAll[key]); }); onValuesChange(extends_default()(defineProperty_default()({}, formPropName, this.getForm()), this.props), set_default()({}, name, value), valuesAllSet); } var field = this.fieldsStore.getField(name); return { name: name, field: extends_default()({}, field, { value: value, touched: true }), fieldMeta: fieldMeta }; }, onCollect: function onCollect(name_, action) { for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { args[_key - 2] = arguments[_key]; } var _onCollectCommon = this.onCollectCommon(name_, action, args), name = _onCollectCommon.name, field = _onCollectCommon.field, fieldMeta = _onCollectCommon.fieldMeta; var validate = fieldMeta.validate; this.fieldsStore.setFieldsAsDirty(); var newField = extends_default()({}, field, { dirty: hasRules(validate) }); this.setFields(defineProperty_default()({}, name, newField)); }, onCollectValidate: function onCollectValidate(name_, action) { for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) { args[_key2 - 2] = arguments[_key2]; } var _onCollectCommon2 = this.onCollectCommon(name_, action, args), field = _onCollectCommon2.field, fieldMeta = _onCollectCommon2.fieldMeta; var newField = extends_default()({}, field, { dirty: true }); this.fieldsStore.setFieldsAsDirty(); this.validateFieldsInternal([newField], { action: action, options: { firstFields: !!fieldMeta.validateFirst } }); }, getCacheBind: function getCacheBind(name, action, fn) { if (!this.cachedBind[name]) { this.cachedBind[name] = {}; } var cache = this.cachedBind[name]; if (!cache[action] || cache[action].oriFn !== fn) { cache[action] = { fn: fn.bind(this, name, action), oriFn: fn }; } return cache[action].fn; }, getFieldDecorator: function getFieldDecorator(name, fieldOption) { var _this2 = this; var props = this.getFieldProps(name, fieldOption); return function (fieldElem) { // We should put field in record if it is rendered _this2.renderFields[name] = true; var fieldMeta = _this2.fieldsStore.getFieldMeta(name); var originalProps = fieldElem.props; if (false) { var valuePropName = fieldMeta.valuePropName; warning(!(valuePropName in originalProps), '`getFieldDecorator` will override `' + valuePropName + '`, ' + ('so please don\'t set `' + valuePropName + '` directly ') + 'and use `setFieldsValue` to set it.'); var defaultValuePropName = 'default' + valuePropName[0].toUpperCase() + valuePropName.slice(1); warning(!(defaultValuePropName in originalProps), '`' + defaultValuePropName + '` is invalid ' + ('for `getFieldDecorator` will set `' + valuePropName + '`,') + ' please use `option.initialValue` instead.'); } fieldMeta.originalProps = originalProps; fieldMeta.ref = fieldElem.ref; var decoratedFieldElem = react_default.a.cloneElement(fieldElem, extends_default()({}, props, _this2.fieldsStore.getFieldValuePropValue(fieldMeta))); return supportRef(fieldElem) ? decoratedFieldElem : react_default.a.createElement( es_FieldElemWrapper, { name: name, form: _this2 }, decoratedFieldElem ); }; }, getFieldProps: function getFieldProps(name) { var _this3 = this; var usersFieldOption = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; if (!name) { throw new Error('Must call `getFieldProps` with valid name string!'); } if (false) { warning(this.fieldsStore.isValidNestedFieldName(name), 'One field name cannot be part of another, e.g. `a` and `a.b`. Check field: ' + name); warning(!('exclusive' in usersFieldOption), '`option.exclusive` of `getFieldProps`|`getFieldDecorator` had been remove.'); } delete this.clearedFieldMetaCache[name]; var fieldOption = extends_default()({ name: name, trigger: DEFAULT_TRIGGER, valuePropName: 'value', validate: [] }, usersFieldOption); var rules = fieldOption.rules, trigger = fieldOption.trigger, _fieldOption$validate = fieldOption.validateTrigger, validateTrigger = _fieldOption$validate === undefined ? trigger : _fieldOption$validate, validate = fieldOption.validate; var fieldMeta = this.fieldsStore.getFieldMeta(name); if ('initialValue' in fieldOption) { fieldMeta.initialValue = fieldOption.initialValue; } var inputProps = extends_default()({}, this.fieldsStore.getFieldValuePropValue(fieldOption), { ref: this.getCacheBind(name, name + '__ref', this.saveRef) }); if (fieldNameProp) { inputProps[fieldNameProp] = formName ? formName + '_' + name : name; } var validateRules = normalizeValidateRules(validate, rules, validateTrigger); var validateTriggers = getValidateTriggers(validateRules); validateTriggers.forEach(function (action) { if (inputProps[action]) return; inputProps[action] = _this3.getCacheBind(name, action, _this3.onCollectValidate); }); // make sure that the value will be collect if (trigger && validateTriggers.indexOf(trigger) === -1) { inputProps[trigger] = this.getCacheBind(name, trigger, this.onCollect); } var meta = extends_default()({}, fieldMeta, fieldOption, { validate: validateRules }); this.fieldsStore.setFieldMeta(name, meta); if (fieldMetaProp) { inputProps[fieldMetaProp] = meta; } if (fieldDataProp) { inputProps[fieldDataProp] = this.fieldsStore.getField(name); } // This field is rendered, record it this.renderFields[name] = true; return inputProps; }, getFieldInstance: function getFieldInstance(name) { return this.instances[name]; }, getRules: function getRules(fieldMeta, action) { var actionRules = fieldMeta.validate.filter(function (item) { return !action || item.trigger.indexOf(action) >= 0; }).map(function (item) { return item.rules; }); return flattenArray(actionRules); }, setFields: function setFields(maybeNestedFields, callback) { var _this4 = this; var fields = this.fieldsStore.flattenRegisteredFields(maybeNestedFields); this.fieldsStore.setFields(fields); if (onFieldsChange) { var changedFields = Object.keys(fields).reduce(function (acc, name) { return set_default()(acc, name, _this4.fieldsStore.getField(name)); }, {}); onFieldsChange(extends_default()(defineProperty_default()({}, formPropName, this.getForm()), this.props), changedFields, this.fieldsStore.getNestedAllFields()); } this.forceUpdate(callback); }, setFieldsValue: function setFieldsValue(changedValues, callback) { var fieldsMeta = this.fieldsStore.fieldsMeta; var values = this.fieldsStore.flattenRegisteredFields(changedValues); var newFields = Object.keys(values).reduce(function (acc, name) { var isRegistered = fieldsMeta[name]; if (false) { warning(isRegistered, 'Cannot use `setFieldsValue` until ' + 'you use `getFieldDecorator` or `getFieldProps` to register it.'); } if (isRegistered) { var value = values[name]; acc[name] = { value: value }; } return acc; }, {}); this.setFields(newFields, callback); if (onValuesChange) { var allValues = this.fieldsStore.getAllValues(); onValuesChange(extends_default()(defineProperty_default()({}, formPropName, this.getForm()), this.props), changedValues, allValues); } }, saveRef: function saveRef(name, _, component) { if (!component) { var _fieldMeta = this.fieldsStore.getFieldMeta(name); if (!_fieldMeta.preserve) { // after destroy, delete data this.clearedFieldMetaCache[name] = { field: this.fieldsStore.getField(name), meta: _fieldMeta }; this.clearField(name); } delete this.domFields[name]; return; } this.domFields[name] = true; this.recoverClearedField(name); var fieldMeta = this.fieldsStore.getFieldMeta(name); if (fieldMeta) { var ref = fieldMeta.ref; if (ref) { if (typeof ref === 'string') { throw new Error('can not set ref string for ' + name); } else if (typeof ref === 'function') { ref(component); } else if (Object.prototype.hasOwnProperty.call(ref, 'current')) { ref.current = component; } } } this.instances[name] = component; }, cleanUpUselessFields: function cleanUpUselessFields() { var _this5 = this; var fieldList = this.fieldsStore.getAllFieldsName(); var removedList = fieldList.filter(function (field) { var fieldMeta = _this5.fieldsStore.getFieldMeta(field); return !_this5.renderFields[field] && !_this5.domFields[field] && !fieldMeta.preserve; }); if (removedList.length) { removedList.forEach(this.clearField); } this.renderFields = {}; }, clearField: function clearField(name) { this.fieldsStore.clearField(name); delete this.instances[name]; delete this.cachedBind[name]; }, resetFields: function resetFields(ns) { var _this6 = this; var newFields = this.fieldsStore.resetFields(ns); if (Object.keys(newFields).length > 0) { this.setFields(newFields); } if (ns) { var names = Array.isArray(ns) ? ns : [ns]; names.forEach(function (name) { return delete _this6.clearedFieldMetaCache[name]; }); } else { this.clearedFieldMetaCache = {}; } }, recoverClearedField: function recoverClearedField(name) { if (this.clearedFieldMetaCache[name]) { this.fieldsStore.setFields(defineProperty_default()({}, name, this.clearedFieldMetaCache[name].field)); this.fieldsStore.setFieldMeta(name, this.clearedFieldMetaCache[name].meta); delete this.clearedFieldMetaCache[name]; } }, validateFieldsInternal: function validateFieldsInternal(fields, _ref, callback) { var _this7 = this; var fieldNames = _ref.fieldNames, action = _ref.action, _ref$options = _ref.options, options = _ref$options === undefined ? {} : _ref$options; var allRules = {}; var allValues = {}; var allFields = {}; var alreadyErrors = {}; fields.forEach(function (field) { var name = field.name; if (options.force !== true && field.dirty === false) { if (field.errors) { set_default()(alreadyErrors, name, { errors: field.errors }); } return; } var fieldMeta = _this7.fieldsStore.getFieldMeta(name); var newField = extends_default()({}, field); newField.errors = undefined; newField.validating = true; newField.dirty = true; allRules[name] = _this7.getRules(fieldMeta, action); allValues[name] = newField.value; allFields[name] = newField; }); this.setFields(allFields); // in case normalize Object.keys(allValues).forEach(function (f) { allValues[f] = _this7.fieldsStore.getFieldValue(f); }); if (callback && isEmptyObject(allFields)) { callback(isEmptyObject(alreadyErrors) ? null : alreadyErrors, this.fieldsStore.getFieldsValue(fieldNames)); return; } var validator = new es_default.a(allRules); if (validateMessages) { validator.messages(validateMessages); } validator.validate(allValues, options, function (errors) { var errorsGroup = extends_default()({}, alreadyErrors); if (errors && errors.length) { errors.forEach(function (e) { var errorFieldName = e.field; var fieldName = errorFieldName; // Handle using array validation rule. // ref: https://github.com/ant-design/ant-design/issues/14275 Object.keys(allRules).some(function (ruleFieldName) { var rules = allRules[ruleFieldName] || []; // Exist if match rule if (ruleFieldName === errorFieldName) { fieldName = ruleFieldName; return true; } // Skip if not match array type if (rules.every(function (_ref2) { var type = _ref2.type; return type !== 'array'; }) || errorFieldName.indexOf(ruleFieldName + '.') !== 0) { return false; } // Exist if match the field name var restPath = errorFieldName.slice(ruleFieldName.length + 1); if (/^\d+$/.test(restPath)) { fieldName = ruleFieldName; return true; } return false; }); var field = get_default()(errorsGroup, fieldName); if (typeof field !== 'object' || Array.isArray(field)) { set_default()(errorsGroup, fieldName, { errors: [] }); } var fieldErrors = get_default()(errorsGroup, fieldName.concat('.errors')); fieldErrors.push(e); }); } var expired = []; var nowAllFields = {}; Object.keys(allRules).forEach(function (name) { var fieldErrors = get_default()(errorsGroup, name); var nowField = _this7.fieldsStore.getField(name); // avoid concurrency problems if (!eq_default()(nowField.value, allValues[name])) { expired.push({ name: name }); } else { nowField.errors = fieldErrors && fieldErrors.errors; nowField.value = allValues[name]; nowField.validating = false; nowField.dirty = false; nowAllFields[name] = nowField; } }); _this7.setFields(nowAllFields); if (callback) { if (expired.length) { expired.forEach(function (_ref3) { var name = _ref3.name; var fieldErrors = [{ message: name + ' need to revalidate', field: name }]; set_default()(errorsGroup, name, { expired: true, errors: fieldErrors }); }); } callback(isEmptyObject(errorsGroup) ? null : errorsGroup, _this7.fieldsStore.getFieldsValue(fieldNames)); } }); }, validateFields: function validateFields(ns, opt, cb) { var _this8 = this; var pending = new Promise(function (resolve, reject) { var _getParams = getParams(ns, opt, cb), names = _getParams.names, options = _getParams.options; var _getParams2 = getParams(ns, opt, cb), callback = _getParams2.callback; if (!callback || typeof callback === 'function') { var oldCb = callback; callback = function callback(errors, values) { if (oldCb) { oldCb(errors, values); } if (errors) { reject({ errors: errors, values: values }); } else { resolve(values); } }; } var fieldNames = names ? _this8.fieldsStore.getValidFieldsFullName(names) : _this8.fieldsStore.getValidFieldsName(); var fields = fieldNames.filter(function (name) { var fieldMeta = _this8.fieldsStore.getFieldMeta(name); return hasRules(fieldMeta.validate); }).map(function (name) { var field = _this8.fieldsStore.getField(name); field.value = _this8.fieldsStore.getFieldValue(name); return field; }); if (!fields.length) { callback(null, _this8.fieldsStore.getFieldsValue(fieldNames)); return; } if (!('firstFields' in options)) { options.firstFields = fieldNames.filter(function (name) { var fieldMeta = _this8.fieldsStore.getFieldMeta(name); return !!fieldMeta.validateFirst; }); } _this8.validateFieldsInternal(fields, { fieldNames: fieldNames, options: options }, callback); }); pending['catch'](function (e) { // eslint-disable-next-line no-console if (console.error && "production" !== 'production') { // eslint-disable-next-line no-console console.error(e); } return e; }); return pending; }, isSubmitting: function isSubmitting() { if (false) { warning(false, '`isSubmitting` is deprecated. ' + "Actually, it's more convenient to handle submitting status by yourself."); } return this.state.submitting; }, submit: function submit(callback) { var _this9 = this; if (false) { warning(false, '`submit` is deprecated. ' + "Actually, it's more convenient to handle submitting status by yourself."); } var fn = function fn() { _this9.setState({ submitting: false }); }; this.setState({ submitting: true }); callback(fn); }, render: function render() { var _props = this.props, wrappedComponentRef = _props.wrappedComponentRef, restProps = objectWithoutProperties_default()(_props, ['wrappedComponentRef']); // eslint-disable-line var formProps = defineProperty_default()({}, formPropName, this.getForm()); if (withRef) { if (false) { warning(false, '`withRef` is deprecated, please use `wrappedComponentRef` instead. ' + 'See: https://github.com/react-component/form#note-use-wrappedcomponentref-instead-of-withref-after-rc-form140'); } formProps.ref = 'wrappedComponent'; } else if (wrappedComponentRef) { formProps.ref = wrappedComponentRef; } var props = mapProps.call(this, extends_default()({}, formProps, restProps)); return react_default.a.createElement(WrappedComponent, props); } }); return argumentContainer(Object(unsafeLifecyclesPolyfill["a" /* default */])(Form), WrappedComponent); }; } /* harmony default export */ var es_createBaseForm = (createBaseForm); // CONCATENATED MODULE: ./node_modules/rc-form/es/createForm.js var mixin = { getForm: function getForm() { return { getFieldsValue: this.fieldsStore.getFieldsValue, getFieldValue: this.fieldsStore.getFieldValue, getFieldInstance: this.getFieldInstance, setFieldsValue: this.setFieldsValue, setFields: this.setFields, setFieldsInitialValue: this.fieldsStore.setFieldsInitialValue, getFieldDecorator: this.getFieldDecorator, getFieldProps: this.getFieldProps, getFieldsError: this.fieldsStore.getFieldsError, getFieldError: this.fieldsStore.getFieldError, isFieldValidating: this.fieldsStore.isFieldValidating, isFieldsValidating: this.fieldsStore.isFieldsValidating, isFieldsTouched: this.fieldsStore.isFieldsTouched, isFieldTouched: this.fieldsStore.isFieldTouched, isSubmitting: this.isSubmitting, submit: this.submit, validateFields: this.validateFields, resetFields: this.resetFields }; } }; function createForm(options) { return es_createBaseForm(options, [mixin]); } /* harmony default export */ var es_createForm = (createForm); // CONCATENATED MODULE: ./node_modules/rc-form/es/createDOMForm.js function computedStyle(el, prop) { var getComputedStyle = window.getComputedStyle; var style = // If we have getComputedStyle getComputedStyle ? // Query it // TODO: From CSS-Query notes, we might need (node, null) for FF getComputedStyle(el) : // Otherwise, we are in IE and use currentStyle el.currentStyle; if (style) { return style[ // Switch to camelCase for CSSOM // DEV: Grabbed from jQuery // https://github.com/jquery/jquery/blob/1.9-stable/src/css.js#L191-L194 // https://github.com/jquery/jquery/blob/1.9-stable/src/core.js#L593-L597 prop.replace(/-(\w)/gi, function (word, letter) { return letter.toUpperCase(); })]; } return undefined; } function getScrollableContainer(n) { var node = n; var nodeName = void 0; /* eslint no-cond-assign:0 */ while ((nodeName = node.nodeName.toLowerCase()) !== 'body') { var overflowY = computedStyle(node, 'overflowY'); // https://stackoverflow.com/a/36900407/3040605 if (node !== n && (overflowY === 'auto' || overflowY === 'scroll') && node.scrollHeight > node.clientHeight) { return node; } node = node.parentNode; } return nodeName === 'body' ? node.ownerDocument : node; } var createDOMForm_mixin = { getForm: function getForm() { return extends_default()({}, mixin.getForm.call(this), { validateFieldsAndScroll: this.validateFieldsAndScroll }); }, validateFieldsAndScroll: function validateFieldsAndScroll(ns, opt, cb) { var _this = this; var _getParams = getParams(ns, opt, cb), names = _getParams.names, callback = _getParams.callback, options = _getParams.options; var newCb = function newCb(error, values) { if (error) { var validNames = _this.fieldsStore.getValidFieldsName(); var firstNode = void 0; var firstTop = void 0; validNames.forEach(function (name) { if (has_default()(error, name)) { var instance = _this.getFieldInstance(name); if (instance) { var node = react_dom_default.a.findDOMNode(instance); var top = node.getBoundingClientRect().top; if (node.type !== 'hidden' && (firstTop === undefined || firstTop > top)) { firstTop = top; firstNode = node; } } } }); if (firstNode) { var c = options.container || getScrollableContainer(firstNode); lib_default()(firstNode, c, extends_default()({ onlyScrollIfNeeded: true }, options.scroll)); } } if (typeof callback === 'function') { callback(error, values); } }; return this.validateFields(names, options, newCb); } }; function createDOMForm(option) { return es_createBaseForm(extends_default()({}, option), [createDOMForm_mixin]); } /* harmony default export */ var es_createDOMForm = (createDOMForm); // EXTERNAL MODULE: ./node_modules/omit.js/es/index.js var omit_js_es = __webpack_require__("JkBm"); // EXTERNAL MODULE: ./node_modules/antd/es/config-provider/index.js + 1 modules var config_provider = __webpack_require__("PmSq"); // EXTERNAL MODULE: ./node_modules/antd/es/_util/type.js var _util_type = __webpack_require__("D+5j"); // EXTERNAL MODULE: ./node_modules/antd/es/_util/warning.js var _util_warning = __webpack_require__("qGip"); // EXTERNAL MODULE: ./node_modules/rc-animate/es/Animate.js + 4 modules var Animate = __webpack_require__("8aSS"); // EXTERNAL MODULE: ./node_modules/antd/es/grid/row.js + 1 modules var row = __webpack_require__("+SmI"); // EXTERNAL MODULE: ./node_modules/antd/es/grid/col.js var col = __webpack_require__("qIy2"); // EXTERNAL MODULE: ./node_modules/antd/es/icon/index.js + 5 modules var es_icon = __webpack_require__("FC3+"); // CONCATENATED MODULE: ./node_modules/antd/es/form/constants.js var FIELD_META_PROP = 'data-__meta'; var FIELD_DATA_PROP = 'data-__field'; // EXTERNAL MODULE: ./node_modules/@ant-design/create-react-context/lib/index.js var create_react_context_lib = __webpack_require__("83O8"); var create_react_context_lib_default = /*#__PURE__*/__webpack_require__.n(create_react_context_lib); // CONCATENATED MODULE: ./node_modules/antd/es/form/context.js var FormContext = create_react_context_lib_default()({ labelAlign: 'right', vertical: false }); /* harmony default export */ var context = (FormContext); // CONCATENATED MODULE: ./node_modules/antd/es/form/FormItem.js function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _extends() { _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; }; return _extends.apply(this, arguments); } 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; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); } function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } var __rest = this && this.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var ValidateStatuses = Object(_util_type["a" /* tuple */])('success', 'warning', 'error', 'validating', ''); var FormLabelAligns = Object(_util_type["a" /* tuple */])('left', 'right'); function intersperseSpace(list) { return list.reduce(function (current, item) { return [].concat(_toConsumableArray(current), [' ', item]); }, []).slice(1); } var FormItem_FormItem = /*#__PURE__*/function (_React$Component) { _inherits(FormItem, _React$Component); var _super = _createSuper(FormItem); function FormItem() { var _this; _classCallCheck(this, FormItem); _this = _super.apply(this, arguments); _this.helpShow = false; // Resolve duplicated ids bug between different forms // https://github.com/ant-design/ant-design/issues/7351 _this.onLabelClick = function () { var id = _this.props.id || _this.getId(); if (!id) { return; } var formItemNode = react_dom["findDOMNode"](_assertThisInitialized(_this)); var control = formItemNode.querySelector("[id=\"".concat(id, "\"]")); if (control && control.focus) { control.focus(); } }; _this.onHelpAnimEnd = function (_key, helpShow) { _this.helpShow = helpShow; if (!helpShow) { _this.setState({}); } }; _this.renderFormItem = function (_ref) { var _itemClassName; var getPrefixCls = _ref.getPrefixCls; var _a = _this.props, customizePrefixCls = _a.prefixCls, style = _a.style, className = _a.className, restProps = __rest(_a, ["prefixCls", "style", "className"]); var prefixCls = getPrefixCls('form', customizePrefixCls); var children = _this.renderChildren(prefixCls); var itemClassName = (_itemClassName = {}, _defineProperty(_itemClassName, "".concat(prefixCls, "-item"), true), _defineProperty(_itemClassName, "".concat(prefixCls, "-item-with-help"), _this.helpShow), _defineProperty(_itemClassName, "".concat(className), !!className), _itemClassName); return /*#__PURE__*/react["createElement"](row["a" /* default */], _extends({ className: classnames_default()(itemClassName), style: style }, Object(omit_js_es["a" /* default */])(restProps, ['id', 'htmlFor', 'label', 'labelAlign', 'labelCol', 'wrapperCol', 'help', 'extra', 'validateStatus', 'hasFeedback', 'required', 'colon']), { key: "row" }), children); }; return _this; } _createClass(FormItem, [{ key: "componentDidMount", value: function componentDidMount() { var _this$props = this.props, children = _this$props.children, help = _this$props.help, validateStatus = _this$props.validateStatus, id = _this$props.id; Object(_util_warning["a" /* default */])(this.getControls(children, true).length <= 1 || help !== undefined || validateStatus !== undefined, 'Form.Item', 'Cannot generate `validateStatus` and `help` automatically, ' + 'while there are more than one `getFieldDecorator` in it.'); Object(_util_warning["a" /* default */])(!id, 'Form.Item', '`id` is deprecated for its label `htmlFor`. Please use `htmlFor` directly.'); } }, { key: "getHelpMessage", value: function getHelpMessage() { var help = this.props.help; if (help === undefined && this.getOnlyControl()) { var _this$getField = this.getField(), errors = _this$getField.errors; if (errors) { return intersperseSpace(errors.map(function (e, index) { var node = null; if ( /*#__PURE__*/react["isValidElement"](e)) { node = e; } else if ( /*#__PURE__*/react["isValidElement"](e.message)) { node = e.message; } // eslint-disable-next-line react/no-array-index-key return node ? /*#__PURE__*/react["cloneElement"](node, { key: index }) : e.message; })); } return ''; } return help; } }, { key: "getControls", value: function getControls(children, recursively) { var controls = []; var childrenArray = react["Children"].toArray(children); for (var i = 0; i < childrenArray.length; i++) { if (!recursively && controls.length > 0) { break; } var child = childrenArray[i]; if (child.type && (child.type === FormItem || child.type.displayName === 'FormItem')) { continue; } if (!child.props) { continue; } if (FIELD_META_PROP in child.props) { // And means FIELD_DATA_PROP in child.props, too. controls.push(child); } else if (child.props.children) { controls = controls.concat(this.getControls(child.props.children, recursively)); } } return controls; } }, { key: "getOnlyControl", value: function getOnlyControl() { var child = this.getControls(this.props.children, false)[0]; return child !== undefined ? child : null; } }, { key: "getChildProp", value: function getChildProp(prop) { var child = this.getOnlyControl(); return child && child.props && child.props[prop]; } }, { key: "getId", value: function getId() { return this.getChildProp('id'); } }, { key: "getMeta", value: function getMeta() { return this.getChildProp(FIELD_META_PROP); } }, { key: "getField", value: function getField() { return this.getChildProp(FIELD_DATA_PROP); } }, { key: "getValidateStatus", value: function getValidateStatus() { var onlyControl = this.getOnlyControl(); if (!onlyControl) { return ''; } var field = this.getField(); if (field.validating) { return 'validating'; } if (field.errors) { return 'error'; } var fieldValue = 'value' in field ? field.value : this.getMeta().initialValue; if (fieldValue !== undefined && fieldValue !== null && fieldValue !== '') { return 'success'; } return ''; } }, { key: "isRequired", value: function isRequired() { var required = this.props.required; if (required !== undefined) { return required; } if (this.getOnlyControl()) { var meta = this.getMeta() || {}; var validate = meta.validate || []; return validate.filter(function (item) { return !!item.rules; }).some(function (item) { return item.rules.some(function (rule) { return rule.required; }); }); } return false; } }, { key: "renderHelp", value: function renderHelp(prefixCls) { var help = this.getHelpMessage(); var children = help ? /*#__PURE__*/react["createElement"]("div", { className: "".concat(prefixCls, "-explain"), key: "help" }, help) : null; if (children) { this.helpShow = !!children; } return /*#__PURE__*/react["createElement"](Animate["a" /* default */], { transitionName: "show-help", component: "", transitionAppear: true, key: "help", onEnd: this.onHelpAnimEnd }, children); } }, { key: "renderExtra", value: function renderExtra(prefixCls) { var extra = this.props.extra; return extra ? /*#__PURE__*/react["createElement"]("div", { className: "".concat(prefixCls, "-extra") }, extra) : null; } }, { key: "renderValidateWrapper", value: function renderValidateWrapper(prefixCls, c1, c2, c3) { var props = this.props; var onlyControl = this.getOnlyControl; var validateStatus = props.validateStatus === undefined && onlyControl ? this.getValidateStatus() : props.validateStatus; var classes = "".concat(prefixCls, "-item-control"); if (validateStatus) { classes = classnames_default()("".concat(prefixCls, "-item-control"), { 'has-feedback': validateStatus && props.hasFeedback, 'has-success': validateStatus === 'success', 'has-warning': validateStatus === 'warning', 'has-error': validateStatus === 'error', 'is-validating': validateStatus === 'validating' }); } var iconType = ''; switch (validateStatus) { case 'success': iconType = 'check-circle'; break; case 'warning': iconType = 'exclamation-circle'; break; case 'error': iconType = 'close-circle'; break; case 'validating': iconType = 'loading'; break; default: iconType = ''; break; } var icon = props.hasFeedback && iconType ? /*#__PURE__*/react["createElement"]("span", { className: "".concat(prefixCls, "-item-children-icon") }, /*#__PURE__*/react["createElement"](es_icon["default"], { type: iconType, theme: iconType === 'loading' ? 'outlined' : 'filled' })) : null; return /*#__PURE__*/react["createElement"]("div", { className: classes }, /*#__PURE__*/react["createElement"]("span", { className: "".concat(prefixCls, "-item-children") }, c1, icon), c2, c3); } }, { key: "renderWrapper", value: function renderWrapper(prefixCls, children) { var _this2 = this; return /*#__PURE__*/react["createElement"](context.Consumer, { key: "wrapper" }, function (_ref2) { var contextWrapperCol = _ref2.wrapperCol, vertical = _ref2.vertical; var wrapperCol = _this2.props.wrapperCol; var mergedWrapperCol = ('wrapperCol' in _this2.props ? wrapperCol : contextWrapperCol) || {}; var className = classnames_default()("".concat(prefixCls, "-item-control-wrapper"), mergedWrapperCol.className); // No pass FormContext since it's useless return /*#__PURE__*/react["createElement"](context.Provider, { value: { vertical: vertical } }, /*#__PURE__*/react["createElement"](col["a" /* default */], _extends({}, mergedWrapperCol, { className: className }), children)); }); } }, { key: "renderLabel", value: function renderLabel(prefixCls) { var _this3 = this; return /*#__PURE__*/react["createElement"](context.Consumer, { key: "label" }, function (_ref3) { var _classNames; var vertical = _ref3.vertical, contextLabelAlign = _ref3.labelAlign, contextLabelCol = _ref3.labelCol, contextColon = _ref3.colon; var _this3$props = _this3.props, label = _this3$props.label, labelCol = _this3$props.labelCol, labelAlign = _this3$props.labelAlign, colon = _this3$props.colon, id = _this3$props.id, htmlFor = _this3$props.htmlFor; var required = _this3.isRequired(); var mergedLabelCol = ('labelCol' in _this3.props ? labelCol : contextLabelCol) || {}; var mergedLabelAlign = 'labelAlign' in _this3.props ? labelAlign : contextLabelAlign; var labelClsBasic = "".concat(prefixCls, "-item-label"); var labelColClassName = classnames_default()(labelClsBasic, mergedLabelAlign === 'left' && "".concat(labelClsBasic, "-left"), mergedLabelCol.className); var labelChildren = label; // Keep label is original where there should have no colon var computedColon = colon === true || contextColon !== false && colon !== false; var haveColon = computedColon && !vertical; // Remove duplicated user input colon if (haveColon && typeof label === 'string' && label.trim() !== '') { labelChildren = label.replace(/[::]\s*$/, ''); } var labelClassName = classnames_default()((_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-item-required"), required), _defineProperty(_classNames, "".concat(prefixCls, "-item-no-colon"), !computedColon), _classNames)); return label ? /*#__PURE__*/react["createElement"](col["a" /* default */], _extends({}, mergedLabelCol, { className: labelColClassName }), /*#__PURE__*/react["createElement"]("label", { htmlFor: htmlFor || id || _this3.getId(), className: labelClassName, title: typeof label === 'string' ? label : '', onClick: _this3.onLabelClick }, labelChildren)) : null; }); } }, { key: "renderChildren", value: function renderChildren(prefixCls) { var children = this.props.children; return [this.renderLabel(prefixCls), this.renderWrapper(prefixCls, this.renderValidateWrapper(prefixCls, children, this.renderHelp(prefixCls), this.renderExtra(prefixCls)))]; } }, { key: "render", value: function render() { return /*#__PURE__*/react["createElement"](config_provider["ConfigConsumer"], null, this.renderFormItem); } }]); return FormItem; }(react["Component"]); FormItem_FormItem.defaultProps = { hasFeedback: false }; FormItem_FormItem.propTypes = { prefixCls: prop_types["string"], label: prop_types["oneOfType"]([prop_types["string"], prop_types["node"]]), labelCol: prop_types["object"], help: prop_types["oneOfType"]([prop_types["node"], prop_types["bool"]]), validateStatus: prop_types["oneOf"](ValidateStatuses), hasFeedback: prop_types["bool"], wrapperCol: prop_types["object"], className: prop_types["string"], id: prop_types["string"], children: prop_types["node"], colon: prop_types["bool"] }; // CONCATENATED MODULE: ./node_modules/antd/es/form/Form.js function Form__typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { Form__typeof = function _typeof(obj) { return typeof obj; }; } else { Form__typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return Form__typeof(obj); } function Form__extends() { Form__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; }; return Form__extends.apply(this, arguments); } function Form__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; } function Form__classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function Form__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); } } function Form__createClass(Constructor, protoProps, staticProps) { if (protoProps) Form__defineProperties(Constructor.prototype, protoProps); if (staticProps) Form__defineProperties(Constructor, staticProps); return Constructor; } function Form__inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) Form__setPrototypeOf(subClass, superClass); } function Form__setPrototypeOf(o, p) { Form__setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return Form__setPrototypeOf(o, p); } function Form__createSuper(Derived) { var hasNativeReflectConstruct = Form__isNativeReflectConstruct(); return function _createSuperInternal() { var Super = Form__getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = Form__getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return Form__possibleConstructorReturn(this, result); }; } function Form__possibleConstructorReturn(self, call) { if (call && (Form__typeof(call) === "object" || typeof call === "function")) { return call; } return Form__assertThisInitialized(self); } function Form__assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function Form__isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } function Form__getPrototypeOf(o) { Form__getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return Form__getPrototypeOf(o); } var FormLayouts = Object(_util_type["a" /* tuple */])('horizontal', 'inline', 'vertical'); var Form_Form = /*#__PURE__*/function (_React$Component) { Form__inherits(Form, _React$Component); var _super = Form__createSuper(Form); function Form(props) { var _this; Form__classCallCheck(this, Form); _this = _super.call(this, props); _this.renderForm = function (_ref) { var _classNames; var getPrefixCls = _ref.getPrefixCls; var _this$props = _this.props, customizePrefixCls = _this$props.prefixCls, hideRequiredMark = _this$props.hideRequiredMark, _this$props$className = _this$props.className, className = _this$props$className === void 0 ? '' : _this$props$className, layout = _this$props.layout; var prefixCls = getPrefixCls('form', customizePrefixCls); var formClassName = classnames_default()(prefixCls, (_classNames = {}, Form__defineProperty(_classNames, "".concat(prefixCls, "-horizontal"), layout === 'horizontal'), Form__defineProperty(_classNames, "".concat(prefixCls, "-vertical"), layout === 'vertical'), Form__defineProperty(_classNames, "".concat(prefixCls, "-inline"), layout === 'inline'), Form__defineProperty(_classNames, "".concat(prefixCls, "-hide-required-mark"), hideRequiredMark), _classNames), className); var formProps = Object(omit_js_es["a" /* default */])(_this.props, ['prefixCls', 'className', 'layout', 'form', 'hideRequiredMark', 'wrapperCol', 'labelAlign', 'labelCol', 'colon']); return /*#__PURE__*/react["createElement"]("form", Form__extends({}, formProps, { className: formClassName })); }; Object(_util_warning["a" /* default */])(!props.form, 'Form', 'It is unnecessary to pass `form` to `Form` after antd@1.7.0.'); return _this; } Form__createClass(Form, [{ key: "render", value: function render() { var _this$props2 = this.props, wrapperCol = _this$props2.wrapperCol, labelAlign = _this$props2.labelAlign, labelCol = _this$props2.labelCol, layout = _this$props2.layout, colon = _this$props2.colon; return /*#__PURE__*/react["createElement"](context.Provider, { value: { wrapperCol: wrapperCol, labelAlign: labelAlign, labelCol: labelCol, vertical: layout === 'vertical', colon: colon } }, /*#__PURE__*/react["createElement"](config_provider["ConfigConsumer"], null, this.renderForm)); } }]); return Form; }(react["Component"]); Form_Form.defaultProps = { colon: true, layout: 'horizontal', hideRequiredMark: false, onSubmit: function onSubmit(e) { e.preventDefault(); } }; Form_Form.propTypes = { prefixCls: prop_types["string"], layout: prop_types["oneOf"](FormLayouts), children: prop_types["any"], onSubmit: prop_types["func"], hideRequiredMark: prop_types["bool"], colon: prop_types["bool"] }; Form_Form.Item = FormItem_FormItem; Form_Form.createFormField = createFormField; Form_Form.create = function create() { var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; return es_createDOMForm(Form__extends(Form__extends({ fieldNameProp: 'id' }, options), { fieldMetaProp: FIELD_META_PROP, fieldDataProp: FIELD_DATA_PROP })); }; // CONCATENATED MODULE: ./node_modules/antd/es/form/index.js /* harmony default export */ var es_form = __webpack_exports__["default"] = (Form_Form); /***/ }), /***/ "95Zk": /***/ (function(module, exports) { module.exports = [{"code":"1101","name":"市辖区","provinceCode":"11"},{"code":"1201","name":"市辖区","provinceCode":"12"},{"code":"1301","name":"石家庄市","provinceCode":"13"},{"code":"1302","name":"唐山市","provinceCode":"13"},{"code":"1303","name":"秦皇岛市","provinceCode":"13"},{"code":"1304","name":"邯郸市","provinceCode":"13"},{"code":"1305","name":"邢台市","provinceCode":"13"},{"code":"1306","name":"保定市","provinceCode":"13"},{"code":"1307","name":"张家口市","provinceCode":"13"},{"code":"1308","name":"承德市","provinceCode":"13"},{"code":"1309","name":"沧州市","provinceCode":"13"},{"code":"1310","name":"廊坊市","provinceCode":"13"},{"code":"1311","name":"衡水市","provinceCode":"13"},{"code":"1390","name":"省直辖县级行政区划","provinceCode":"13"},{"code":"1401","name":"太原市","provinceCode":"14"},{"code":"1402","name":"大同市","provinceCode":"14"},{"code":"1403","name":"阳泉市","provinceCode":"14"},{"code":"1404","name":"长治市","provinceCode":"14"},{"code":"1405","name":"晋城市","provinceCode":"14"},{"code":"1406","name":"朔州市","provinceCode":"14"},{"code":"1407","name":"晋中市","provinceCode":"14"},{"code":"1408","name":"运城市","provinceCode":"14"},{"code":"1409","name":"忻州市","provinceCode":"14"},{"code":"1410","name":"临汾市","provinceCode":"14"},{"code":"1411","name":"吕梁市","provinceCode":"14"},{"code":"1501","name":"呼和浩特市","provinceCode":"15"},{"code":"1502","name":"包头市","provinceCode":"15"},{"code":"1503","name":"乌海市","provinceCode":"15"},{"code":"1504","name":"赤峰市","provinceCode":"15"},{"code":"1505","name":"通辽市","provinceCode":"15"},{"code":"1506","name":"鄂尔多斯市","provinceCode":"15"},{"code":"1507","name":"呼伦贝尔市","provinceCode":"15"},{"code":"1508","name":"巴彦淖尔市","provinceCode":"15"},{"code":"1509","name":"乌兰察布市","provinceCode":"15"},{"code":"1522","name":"兴安盟","provinceCode":"15"},{"code":"1525","name":"锡林郭勒盟","provinceCode":"15"},{"code":"1529","name":"阿拉善盟","provinceCode":"15"},{"code":"2101","name":"沈阳市","provinceCode":"21"},{"code":"2102","name":"大连市","provinceCode":"21"},{"code":"2103","name":"鞍山市","provinceCode":"21"},{"code":"2104","name":"抚顺市","provinceCode":"21"},{"code":"2105","name":"本溪市","provinceCode":"21"},{"code":"2106","name":"丹东市","provinceCode":"21"},{"code":"2107","name":"锦州市","provinceCode":"21"},{"code":"2108","name":"营口市","provinceCode":"21"},{"code":"2109","name":"阜新市","provinceCode":"21"},{"code":"2110","name":"辽阳市","provinceCode":"21"},{"code":"2111","name":"盘锦市","provinceCode":"21"},{"code":"2112","name":"铁岭市","provinceCode":"21"},{"code":"2113","name":"朝阳市","provinceCode":"21"},{"code":"2114","name":"葫芦岛市","provinceCode":"21"},{"code":"2201","name":"长春市","provinceCode":"22"},{"code":"2202","name":"吉林市","provinceCode":"22"},{"code":"2203","name":"四平市","provinceCode":"22"},{"code":"2204","name":"辽源市","provinceCode":"22"},{"code":"2205","name":"通化市","provinceCode":"22"},{"code":"2206","name":"白山市","provinceCode":"22"},{"code":"2207","name":"松原市","provinceCode":"22"},{"code":"2208","name":"白城市","provinceCode":"22"},{"code":"2224","name":"延边朝鲜族自治州","provinceCode":"22"},{"code":"2301","name":"哈尔滨市","provinceCode":"23"},{"code":"2302","name":"齐齐哈尔市","provinceCode":"23"},{"code":"2303","name":"鸡西市","provinceCode":"23"},{"code":"2304","name":"鹤岗市","provinceCode":"23"},{"code":"2305","name":"双鸭山市","provinceCode":"23"},{"code":"2306","name":"大庆市","provinceCode":"23"},{"code":"2307","name":"伊春市","provinceCode":"23"},{"code":"2308","name":"佳木斯市","provinceCode":"23"},{"code":"2309","name":"七台河市","provinceCode":"23"},{"code":"2310","name":"牡丹江市","provinceCode":"23"},{"code":"2311","name":"黑河市","provinceCode":"23"},{"code":"2312","name":"绥化市","provinceCode":"23"},{"code":"2327","name":"大兴安岭地区","provinceCode":"23"},{"code":"3101","name":"市辖区","provinceCode":"31"},{"code":"3201","name":"南京市","provinceCode":"32"},{"code":"3202","name":"无锡市","provinceCode":"32"},{"code":"3203","name":"徐州市","provinceCode":"32"},{"code":"3204","name":"常州市","provinceCode":"32"},{"code":"3205","name":"苏州市","provinceCode":"32"},{"code":"3206","name":"南通市","provinceCode":"32"},{"code":"3207","name":"连云港市","provinceCode":"32"},{"code":"3208","name":"淮安市","provinceCode":"32"},{"code":"3209","name":"盐城市","provinceCode":"32"},{"code":"3210","name":"扬州市","provinceCode":"32"},{"code":"3211","name":"镇江市","provinceCode":"32"},{"code":"3212","name":"泰州市","provinceCode":"32"},{"code":"3213","name":"宿迁市","provinceCode":"32"},{"code":"3301","name":"杭州市","provinceCode":"33"},{"code":"3302","name":"宁波市","provinceCode":"33"},{"code":"3303","name":"温州市","provinceCode":"33"},{"code":"3304","name":"嘉兴市","provinceCode":"33"},{"code":"3305","name":"湖州市","provinceCode":"33"},{"code":"3306","name":"绍兴市","provinceCode":"33"},{"code":"3307","name":"金华市","provinceCode":"33"},{"code":"3308","name":"衢州市","provinceCode":"33"},{"code":"3309","name":"舟山市","provinceCode":"33"},{"code":"3310","name":"台州市","provinceCode":"33"},{"code":"3311","name":"丽水市","provinceCode":"33"},{"code":"3401","name":"合肥市","provinceCode":"34"},{"code":"3402","name":"芜湖市","provinceCode":"34"},{"code":"3403","name":"蚌埠市","provinceCode":"34"},{"code":"3404","name":"淮南市","provinceCode":"34"},{"code":"3405","name":"马鞍山市","provinceCode":"34"},{"code":"3406","name":"淮北市","provinceCode":"34"},{"code":"3407","name":"铜陵市","provinceCode":"34"},{"code":"3408","name":"安庆市","provinceCode":"34"},{"code":"3410","name":"黄山市","provinceCode":"34"},{"code":"3411","name":"滁州市","provinceCode":"34"},{"code":"3412","name":"阜阳市","provinceCode":"34"},{"code":"3413","name":"宿州市","provinceCode":"34"},{"code":"3415","name":"六安市","provinceCode":"34"},{"code":"3416","name":"亳州市","provinceCode":"34"},{"code":"3417","name":"池州市","provinceCode":"34"},{"code":"3418","name":"宣城市","provinceCode":"34"},{"code":"3501","name":"福州市","provinceCode":"35"},{"code":"3502","name":"厦门市","provinceCode":"35"},{"code":"3503","name":"莆田市","provinceCode":"35"},{"code":"3504","name":"三明市","provinceCode":"35"},{"code":"3505","name":"泉州市","provinceCode":"35"},{"code":"3506","name":"漳州市","provinceCode":"35"},{"code":"3507","name":"南平市","provinceCode":"35"},{"code":"3508","name":"龙岩市","provinceCode":"35"},{"code":"3509","name":"宁德市","provinceCode":"35"},{"code":"3601","name":"南昌市","provinceCode":"36"},{"code":"3602","name":"景德镇市","provinceCode":"36"},{"code":"3603","name":"萍乡市","provinceCode":"36"},{"code":"3604","name":"九江市","provinceCode":"36"},{"code":"3605","name":"新余市","provinceCode":"36"},{"code":"3606","name":"鹰潭市","provinceCode":"36"},{"code":"3607","name":"赣州市","provinceCode":"36"},{"code":"3608","name":"吉安市","provinceCode":"36"},{"code":"3609","name":"宜春市","provinceCode":"36"},{"code":"3610","name":"抚州市","provinceCode":"36"},{"code":"3611","name":"上饶市","provinceCode":"36"},{"code":"3701","name":"济南市","provinceCode":"37"},{"code":"3702","name":"青岛市","provinceCode":"37"},{"code":"3703","name":"淄博市","provinceCode":"37"},{"code":"3704","name":"枣庄市","provinceCode":"37"},{"code":"3705","name":"东营市","provinceCode":"37"},{"code":"3706","name":"烟台市","provinceCode":"37"},{"code":"3707","name":"潍坊市","provinceCode":"37"},{"code":"3708","name":"济宁市","provinceCode":"37"},{"code":"3709","name":"泰安市","provinceCode":"37"},{"code":"3710","name":"威海市","provinceCode":"37"},{"code":"3711","name":"日照市","provinceCode":"37"},{"code":"3712","name":"莱芜市","provinceCode":"37"},{"code":"3713","name":"临沂市","provinceCode":"37"},{"code":"3714","name":"德州市","provinceCode":"37"},{"code":"3715","name":"聊城市","provinceCode":"37"},{"code":"3716","name":"滨州市","provinceCode":"37"},{"code":"3717","name":"菏泽市","provinceCode":"37"},{"code":"4101","name":"郑州市","provinceCode":"41"},{"code":"4102","name":"开封市","provinceCode":"41"},{"code":"4103","name":"洛阳市","provinceCode":"41"},{"code":"4104","name":"平顶山市","provinceCode":"41"},{"code":"4105","name":"安阳市","provinceCode":"41"},{"code":"4106","name":"鹤壁市","provinceCode":"41"},{"code":"4107","name":"新乡市","provinceCode":"41"},{"code":"4108","name":"焦作市","provinceCode":"41"},{"code":"4109","name":"濮阳市","provinceCode":"41"},{"code":"4110","name":"许昌市","provinceCode":"41"},{"code":"4111","name":"漯河市","provinceCode":"41"},{"code":"4112","name":"三门峡市","provinceCode":"41"},{"code":"4113","name":"南阳市","provinceCode":"41"},{"code":"4114","name":"商丘市","provinceCode":"41"},{"code":"4115","name":"信阳市","provinceCode":"41"},{"code":"4116","name":"周口市","provinceCode":"41"},{"code":"4117","name":"驻马店市","provinceCode":"41"},{"code":"4190","name":"省直辖县级行政区划","provinceCode":"41"},{"code":"4201","name":"武汉市","provinceCode":"42"},{"code":"4202","name":"黄石市","provinceCode":"42"},{"code":"4203","name":"十堰市","provinceCode":"42"},{"code":"4205","name":"宜昌市","provinceCode":"42"},{"code":"4206","name":"襄阳市","provinceCode":"42"},{"code":"4207","name":"鄂州市","provinceCode":"42"},{"code":"4208","name":"荆门市","provinceCode":"42"},{"code":"4209","name":"孝感市","provinceCode":"42"},{"code":"4210","name":"荆州市","provinceCode":"42"},{"code":"4211","name":"黄冈市","provinceCode":"42"},{"code":"4212","name":"咸宁市","provinceCode":"42"},{"code":"4213","name":"随州市","provinceCode":"42"},{"code":"4228","name":"恩施土家族苗族自治州","provinceCode":"42"},{"code":"4290","name":"省直辖县级行政区划","provinceCode":"42"},{"code":"4301","name":"长沙市","provinceCode":"43"},{"code":"4302","name":"株洲市","provinceCode":"43"},{"code":"4303","name":"湘潭市","provinceCode":"43"},{"code":"4304","name":"衡阳市","provinceCode":"43"},{"code":"4305","name":"邵阳市","provinceCode":"43"},{"code":"4306","name":"岳阳市","provinceCode":"43"},{"code":"4307","name":"常德市","provinceCode":"43"},{"code":"4308","name":"张家界市","provinceCode":"43"},{"code":"4309","name":"益阳市","provinceCode":"43"},{"code":"4310","name":"郴州市","provinceCode":"43"},{"code":"4311","name":"永州市","provinceCode":"43"},{"code":"4312","name":"怀化市","provinceCode":"43"},{"code":"4313","name":"娄底市","provinceCode":"43"},{"code":"4331","name":"湘西土家族苗族自治州","provinceCode":"43"},{"code":"4401","name":"广州市","provinceCode":"44"},{"code":"4402","name":"韶关市","provinceCode":"44"},{"code":"4403","name":"深圳市","provinceCode":"44"},{"code":"4404","name":"珠海市","provinceCode":"44"},{"code":"4405","name":"汕头市","provinceCode":"44"},{"code":"4406","name":"佛山市","provinceCode":"44"},{"code":"4407","name":"江门市","provinceCode":"44"},{"code":"4408","name":"湛江市","provinceCode":"44"},{"code":"4409","name":"茂名市","provinceCode":"44"},{"code":"4412","name":"肇庆市","provinceCode":"44"},{"code":"4413","name":"惠州市","provinceCode":"44"},{"code":"4414","name":"梅州市","provinceCode":"44"},{"code":"4415","name":"汕尾市","provinceCode":"44"},{"code":"4416","name":"河源市","provinceCode":"44"},{"code":"4417","name":"阳江市","provinceCode":"44"},{"code":"4418","name":"清远市","provinceCode":"44"},{"code":"4419","name":"东莞市","provinceCode":"44"},{"code":"4420","name":"中山市","provinceCode":"44"},{"code":"4451","name":"潮州市","provinceCode":"44"},{"code":"4452","name":"揭阳市","provinceCode":"44"},{"code":"4453","name":"云浮市","provinceCode":"44"},{"code":"4501","name":"南宁市","provinceCode":"45"},{"code":"4502","name":"柳州市","provinceCode":"45"},{"code":"4503","name":"桂林市","provinceCode":"45"},{"code":"4504","name":"梧州市","provinceCode":"45"},{"code":"4505","name":"北海市","provinceCode":"45"},{"code":"4506","name":"防城港市","provinceCode":"45"},{"code":"4507","name":"钦州市","provinceCode":"45"},{"code":"4508","name":"贵港市","provinceCode":"45"},{"code":"4509","name":"玉林市","provinceCode":"45"},{"code":"4510","name":"百色市","provinceCode":"45"},{"code":"4511","name":"贺州市","provinceCode":"45"},{"code":"4512","name":"河池市","provinceCode":"45"},{"code":"4513","name":"来宾市","provinceCode":"45"},{"code":"4514","name":"崇左市","provinceCode":"45"},{"code":"4601","name":"海口市","provinceCode":"46"},{"code":"4602","name":"三亚市","provinceCode":"46"},{"code":"4603","name":"三沙市","provinceCode":"46"},{"code":"4604","name":"儋州市","provinceCode":"46"},{"code":"4690","name":"省直辖县级行政区划","provinceCode":"46"},{"code":"5001","name":"市辖区","provinceCode":"50"},{"code":"5002","name":"县","provinceCode":"50"},{"code":"5101","name":"成都市","provinceCode":"51"},{"code":"5103","name":"自贡市","provinceCode":"51"},{"code":"5104","name":"攀枝花市","provinceCode":"51"},{"code":"5105","name":"泸州市","provinceCode":"51"},{"code":"5106","name":"德阳市","provinceCode":"51"},{"code":"5107","name":"绵阳市","provinceCode":"51"},{"code":"5108","name":"广元市","provinceCode":"51"},{"code":"5109","name":"遂宁市","provinceCode":"51"},{"code":"5110","name":"内江市","provinceCode":"51"},{"code":"5111","name":"乐山市","provinceCode":"51"},{"code":"5113","name":"南充市","provinceCode":"51"},{"code":"5114","name":"眉山市","provinceCode":"51"},{"code":"5115","name":"宜宾市","provinceCode":"51"},{"code":"5116","name":"广安市","provinceCode":"51"},{"code":"5117","name":"达州市","provinceCode":"51"},{"code":"5118","name":"雅安市","provinceCode":"51"},{"code":"5119","name":"巴中市","provinceCode":"51"},{"code":"5120","name":"资阳市","provinceCode":"51"},{"code":"5132","name":"阿坝藏族羌族自治州","provinceCode":"51"},{"code":"5133","name":"甘孜藏族自治州","provinceCode":"51"},{"code":"5134","name":"凉山彝族自治州","provinceCode":"51"},{"code":"5201","name":"贵阳市","provinceCode":"52"},{"code":"5202","name":"六盘水市","provinceCode":"52"},{"code":"5203","name":"遵义市","provinceCode":"52"},{"code":"5204","name":"安顺市","provinceCode":"52"},{"code":"5205","name":"毕节市","provinceCode":"52"},{"code":"5206","name":"铜仁市","provinceCode":"52"},{"code":"5223","name":"黔西南布依族苗族自治州","provinceCode":"52"},{"code":"5226","name":"黔东南苗族侗族自治州","provinceCode":"52"},{"code":"5227","name":"黔南布依族苗族自治州","provinceCode":"52"},{"code":"5301","name":"昆明市","provinceCode":"53"},{"code":"5303","name":"曲靖市","provinceCode":"53"},{"code":"5304","name":"玉溪市","provinceCode":"53"},{"code":"5305","name":"保山市","provinceCode":"53"},{"code":"5306","name":"昭通市","provinceCode":"53"},{"code":"5307","name":"丽江市","provinceCode":"53"},{"code":"5308","name":"普洱市","provinceCode":"53"},{"code":"5309","name":"临沧市","provinceCode":"53"},{"code":"5323","name":"楚雄彝族自治州","provinceCode":"53"},{"code":"5325","name":"红河哈尼族彝族自治州","provinceCode":"53"},{"code":"5326","name":"文山壮族苗族自治州","provinceCode":"53"},{"code":"5328","name":"西双版纳傣族自治州","provinceCode":"53"},{"code":"5329","name":"大理白族自治州","provinceCode":"53"},{"code":"5331","name":"德宏傣族景颇族自治州","provinceCode":"53"},{"code":"5333","name":"怒江傈僳族自治州","provinceCode":"53"},{"code":"5334","name":"迪庆藏族自治州","provinceCode":"53"},{"code":"5401","name":"拉萨市","provinceCode":"54"},{"code":"5402","name":"日喀则市","provinceCode":"54"},{"code":"5403","name":"昌都市","provinceCode":"54"},{"code":"5404","name":"林芝市","provinceCode":"54"},{"code":"5405","name":"山南市","provinceCode":"54"},{"code":"5424","name":"那曲地区","provinceCode":"54"},{"code":"5425","name":"阿里地区","provinceCode":"54"},{"code":"6101","name":"西安市","provinceCode":"61"},{"code":"6102","name":"铜川市","provinceCode":"61"},{"code":"6103","name":"宝鸡市","provinceCode":"61"},{"code":"6104","name":"咸阳市","provinceCode":"61"},{"code":"6105","name":"渭南市","provinceCode":"61"},{"code":"6106","name":"延安市","provinceCode":"61"},{"code":"6107","name":"汉中市","provinceCode":"61"},{"code":"6108","name":"榆林市","provinceCode":"61"},{"code":"6109","name":"安康市","provinceCode":"61"},{"code":"6110","name":"商洛市","provinceCode":"61"},{"code":"6201","name":"兰州市","provinceCode":"62"},{"code":"6202","name":"嘉峪关市","provinceCode":"62"},{"code":"6203","name":"金昌市","provinceCode":"62"},{"code":"6204","name":"白银市","provinceCode":"62"},{"code":"6205","name":"天水市","provinceCode":"62"},{"code":"6206","name":"武威市","provinceCode":"62"},{"code":"6207","name":"张掖市","provinceCode":"62"},{"code":"6208","name":"平凉市","provinceCode":"62"},{"code":"6209","name":"酒泉市","provinceCode":"62"},{"code":"6210","name":"庆阳市","provinceCode":"62"},{"code":"6211","name":"定西市","provinceCode":"62"},{"code":"6212","name":"陇南市","provinceCode":"62"},{"code":"6229","name":"临夏回族自治州","provinceCode":"62"},{"code":"6230","name":"甘南藏族自治州","provinceCode":"62"},{"code":"6301","name":"西宁市","provinceCode":"63"},{"code":"6302","name":"海东市","provinceCode":"63"},{"code":"6322","name":"海北藏族自治州","provinceCode":"63"},{"code":"6323","name":"黄南藏族自治州","provinceCode":"63"},{"code":"6325","name":"海南藏族自治州","provinceCode":"63"},{"code":"6326","name":"果洛藏族自治州","provinceCode":"63"},{"code":"6327","name":"玉树藏族自治州","provinceCode":"63"},{"code":"6328","name":"海西蒙古族藏族自治州","provinceCode":"63"},{"code":"6401","name":"银川市","provinceCode":"64"},{"code":"6402","name":"石嘴山市","provinceCode":"64"},{"code":"6403","name":"吴忠市","provinceCode":"64"},{"code":"6404","name":"固原市","provinceCode":"64"},{"code":"6405","name":"中卫市","provinceCode":"64"},{"code":"6501","name":"乌鲁木齐市","provinceCode":"65"},{"code":"6502","name":"克拉玛依市","provinceCode":"65"},{"code":"6504","name":"吐鲁番市","provinceCode":"65"},{"code":"6505","name":"哈密市","provinceCode":"65"},{"code":"6523","name":"昌吉回族自治州","provinceCode":"65"},{"code":"6527","name":"博尔塔拉蒙古自治州","provinceCode":"65"},{"code":"6528","name":"巴音郭楞蒙古自治州","provinceCode":"65"},{"code":"6529","name":"阿克苏地区","provinceCode":"65"},{"code":"6530","name":"克孜勒苏柯尔克孜自治州","provinceCode":"65"},{"code":"6531","name":"喀什地区","provinceCode":"65"},{"code":"6532","name":"和田地区","provinceCode":"65"},{"code":"6540","name":"伊犁哈萨克自治州","provinceCode":"65"},{"code":"6542","name":"塔城地区","provinceCode":"65"},{"code":"6543","name":"阿勒泰地区","provinceCode":"65"},{"code":"6590","name":"自治区直辖县级行政区划","provinceCode":"65"}] /***/ }), /***/ "97+s": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; __webpack_require__("crfj"); var _button = _interopRequireDefault(__webpack_require__("zwGx")); __webpack_require__("sRCI"); var _modal = _interopRequireDefault(__webpack_require__("vnWH")); __webpack_require__("/m1I"); var _tooltip = _interopRequireDefault(__webpack_require__("O6j2")); var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); __webpack_require__("LHBr"); var _input = _interopRequireDefault(__webpack_require__("A+AJ")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); var _index = _interopRequireDefault(__webpack_require__("W7F7")); var _dva = __webpack_require__("S6G3"); var _api = __webpack_require__("H/Zg"); var _back = _interopRequireDefault(__webpack_require__("lNEh")); var _eventYb = _interopRequireDefault(__webpack_require__("Vp7n")); var _eventJd = _interopRequireDefault(__webpack_require__("EYLL")); var _eventZd = _interopRequireDefault(__webpack_require__("MIZS")); var _eventTd = _interopRequireDefault(__webpack_require__("pBGO")); var _utils = __webpack_require__("oAV5"); var _moment = _interopRequireDefault(__webpack_require__("PJh5")); var _events = _interopRequireDefault(__webpack_require__("TLe5")); var _classnames = _interopRequireDefault(__webpack_require__("HW6M")); var _dec, _class; /** * 驻勤点和保安员信息 */ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } var TextArea = _input.default.TextArea; var _LEVEL = ['特别重大', '重大', '较大', '一般']; var _LEVEL_COLOR = ['#A80000', '#F48200', '#F6BD16', '#00B40C']; var _DETAIL = [{ name: '事件标题', type: 'item_eventname', default: '无', showType: 'text' }, { name: '上报者', type: 'item_username', default: '无', showType: 'text' }, { name: '上报时间', type: 'item_alarmtime', default: '无', showType: 'text' }, { name: '事发地点', type: 'item_eventplace', default: '无', showType: 'text' }, { name: '事件类型', type: 'item_eventtype', default: '无', showType: 'text' }, { name: '事件级别', type: 'item_eventlevelname', default: '无', showType: 'text' }, { name: '事件起因', type: 'item_eventcause', default: '', showType: 'input' }, { name: '已采取措施', type: 'item_localplan', default: '', showType: 'input' }, { name: '处理情况及发展趋势', type: 'handling', default: '', showType: 'input' }, { name: '进一步处置意见', type: 'item_nextdispose', default: '', showType: 'input' }, { name: '现场调度指导', type: 'item_remoteplan', default: '', showType: 'input' }]; var MapEventModule = exports.default = (_dec = (0, _dva.connect)(function (state) { return { //地图数据 pictureMarkersList: state.command.pictureMarkersList, mapStyle: state.command.mapStyle, selectComponeyInfo: state.command.selectComponeyInfo, backStepInfo: state.command.backStepInfo }; }), _dec(_class = /*#__PURE__*/function (_Component) { function MapEventModule(props) { var _this; (0, _classCallCheck2.default)(this, MapEventModule); _this = _callSuper(this, MapEventModule, [props]); _this._showEvent = function () { _events.default.emit('clearMapTag', 'eventMarker'); var _this$state = _this.state, showStatus = _this$state.showStatus, searchValue = _this$state.searchValue; console.log('showStatus', showStatus); var that = _this; _this.dataTemp = _this.state.dataSource; if (showStatus == 0) { (0, _api.getEventByLevel)().then(function (res) { console.log('getEventByLevel', res); if (res.data) { // 打点信息 var infos = []; _LEVEL.map(function (level) { res.data[level] && res.data[level].map(function (item, i) { var data = {}; data.longitude = item.item_longitude; data.latitude = item.item_latitude; if (!(0, _utils.isEmpty)(item.item_position) || !(0, _utils.isEmpty)(item.item_eventposition)) { try { var position = JSON.parse(item.item_position); data.longitude = position.longitude; data.latitude = position.latitude; } catch (error) {} try { var _position = JSON.parse(item.item_eventposition); data.longitude = _position.longitude; data.latitude = _position.latitude; } catch (error) {} switch (item.item_eventlevelname) { case '一般': data.markerIcon = _eventYb.default; break; case '较大': data.markerIcon = _eventJd.default; break; case '重大': data.markerIcon = _eventZd.default; break; case '特别重大': data.markerIcon = _eventTd.default; break; } infos.push(data); } }); }); _events.default.emit('addPictueMarks', { data: { data: infos }, type: 'eventMarker' }); // 显示数据到地图上 that.setState({ dataSource: res.data, isBack: false, title: "事件模块" }); } }); } else { (0, _api.getEventByLevelList)({ name: searchValue, level: _this.searchLevel }).then(function (res) { console.log('getEventByLevelList', res); if (res.data.length > 0) { _this._showMarker(res.data); // 显示数据到地图上 if (_this.state.isBack) { that.setState({ dataSource: res.data }); } else { that.setState({ dataSource: res.data, isBack: false, title: "事件列表" }); } } }); } }; _this.onChangeState = function (state) { var that = _this; that.state.showStatus = state; that.state.isBack = false; that._showEvent(); }; _this.onBack = function () { var _this$state2 = _this.state, isDetail = _this$state2.isDetail, isBack = _this$state2.isBack, dataSource = _this$state2.dataSource; console.log('onBack', isDetail); _this.state.searchValue = ''; _this.searchLevel = ''; if (isDetail) { _this.setState({ isDetail: false }); _this._showMarker(dataSource); } else if (isBack) { _this.state.showStatus = 0; _this._showEvent(); } }; _this.toList = function (list, type) { if (list.length > 0) { console.log('list', list); _this.searchLevel = list[0]['item_eventlevel']; } _this._showMarker(list); // 显示数据到地图上 _this.setState({ dataSource: list, showStatus: 1, isBack: true, title: type + "事件区列表" }); }; _this.renderModule = function () { var dataSource = _this.state.dataSource; return /*#__PURE__*/_react.default.createElement("div", null, _LEVEL.map(function (level, idx) { var labelColor = _LEVEL_COLOR[idx]; console.log('dataSource[level]', dataSource[level], dataSource); return /*#__PURE__*/_react.default.createElement("div", { className: _index.default.body_card }, /*#__PURE__*/_react.default.createElement("div", { className: _index.default.card_title }, /*#__PURE__*/_react.default.createElement("div", { className: _index.default.card_label, style: { backgroundColor: labelColor } }, level), /*#__PURE__*/_react.default.createElement("div", { className: _index.default.card_name }, level + "事件区")), /*#__PURE__*/_react.default.createElement("div", { className: _index.default.card_content, onClick: _this.toList.bind(_this, dataSource[level], level) }, dataSource[level] && dataSource[level].map(function (item, i) { if (i < 4) { return /*#__PURE__*/_react.default.createElement("div", { className: _index.default.card_item }, /*#__PURE__*/_react.default.createElement(_tooltip.default, { title: item.item_eventname }, item.item_eventname)); } else if (i == 4) { return /*#__PURE__*/_react.default.createElement("div", { className: _index.default.card_ellipsis }, "..."); } })), /*#__PURE__*/_react.default.createElement("div", { className: _index.default.card_sum }, dataSource[level] && dataSource[level].length + "件")); })); }; _this.onClose = function (item) { var that = _this; _modal.default.confirm({ title: '是否确认关闭事件,关闭事件后则默认事件状态为已处理', okText: '确认关闭', cancelText: '取消', onOk: function onOk() { console.log('点击了 onClose'); (0, _api.updateEventStatus)({ id: item.id, status: '已处理' }); that.setState({ showStatus: 1, isDetail: false }); setTimeout(function () { that._showEvent(); }, 700); } }); }; _this.renderDetail = function () { var detailSource = _this.state.detailSource; console.log('item_alarmTime', detailSource); var nowTime = new Date().getTime(); var duration = detailSource.item_alarmtime ? _moment.default.duration(nowTime - detailSource.item_alarmtime.time) : 0; var alarmTime = "暂未上报"; if (_moment.default.isDuration(duration)) { alarmTime = duration.get('hours') + "小时" + duration.get('minutes') + "分钟"; } return /*#__PURE__*/_react.default.createElement("div", { className: _index.default.body_detail }, /*#__PURE__*/_react.default.createElement("div", { className: _index.default.detail_time }, "距当前事发时长:" + alarmTime), _DETAIL.map(function (item, index) { var content = !(0, _utils.isEmpty)(detailSource[item.type]) ? detailSource[item.type] : item.default; var sty = index == 0 ? "15px" : "0"; if (item.type == 'item_alarmtime') { content = !(0, _utils.isEmpty)(detailSource.item_alarmtime) ? (0, _moment.default)(detailSource.item_alarmtime.time).format("YYYY-MM-DD HH:MM:SS") : ''; } return /*#__PURE__*/_react.default.createElement("div", { className: _index.default.detail_item, style: { paddingTop: sty } }, /*#__PURE__*/_react.default.createElement("div", { className: _index.default.item_title }, item.name + ":"), /*#__PURE__*/_react.default.createElement("div", { className: _index.default.item_content }, item.showType == 'input' && /*#__PURE__*/_react.default.createElement(TextArea, { autoSize: { minRows: 2, maxRows: 6 }, placeholder: "\u81EA\u52A8\u83B7\u53D6APP\u4E0A\u4F20\u6570\u636E\u4E0D\u53EF\u66F4\u6539", disabled: true, defaultValue: content }), item.showType == 'text' && /*#__PURE__*/_react.default.createElement("div", { className: item.text }, content))); }), /*#__PURE__*/_react.default.createElement("div", { className: _index.default.detail_bottom }, /*#__PURE__*/_react.default.createElement(_button.default, { style: { marginRight: '20px' }, onClick: _this.onClose.bind(_this, detailSource) }, "\u5173\u95ED\u4E8B\u4EF6"))); }; _this.toDetail = function (item) { _this._showMarker([item]); _this.setState({ isDetail: true, detailSource: item, title: "事件详情" }); }; _this.renderList = function () { var dataSource = _this.state.dataSource; console.log('dataSource', dataSource); return /*#__PURE__*/_react.default.createElement("div", { style: { maxHeight: '630px', overflowY: 'auto', marginTop: '10px', paddingRight: '10px' } }, dataSource && dataSource.map(function (item, i) { var level = item.item_eventlevelname; var idx = _LEVEL.indexOf(level); var labelColor = _LEVEL_COLOR[idx]; var alarmTime = item.item_alarmtime ? (0, _moment.default)(item.item_alarmtime.time).format("YYYY-MM-DD HH:MM:SS") : '暂未上报'; var userName = !(0, _utils.isEmpty)(item.item_username) ? item.item_username : ''; var phone = !(0, _utils.isEmpty)(item.item_phone) ? item.item_phone : ''; return /*#__PURE__*/_react.default.createElement("div", { className: _index.default.body_card, onClick: _this.toDetail.bind(_this, item) }, /*#__PURE__*/_react.default.createElement("div", { className: _index.default.card_title }, /*#__PURE__*/_react.default.createElement("div", { className: _index.default.card_label, style: { backgroundColor: labelColor } }, level), /*#__PURE__*/_react.default.createElement("div", { className: _index.default.card_name }, item.item_eventname)), /*#__PURE__*/_react.default.createElement("div", { className: _index.default.card_content }, /*#__PURE__*/_react.default.createElement("div", { className: _index.default.card_item }, "\u62A5\u8B66\u5BF9\u8C61: ", /*#__PURE__*/_react.default.createElement(_tooltip.default, { title: userName + " " + phone }, userName + " " + phone)), /*#__PURE__*/_react.default.createElement("div", { className: _index.default.card_item }, "\u4E8B\u4EF6\u7C7B\u578B: ", /*#__PURE__*/_react.default.createElement(_tooltip.default, { title: item.item_eventtype }, item.item_eventtype)), /*#__PURE__*/_react.default.createElement("div", { className: _index.default.card_item }, "\u4E8B\u53D1\u65F6\u95F4: ", /*#__PURE__*/_react.default.createElement(_tooltip.default, { title: alarmTime }, alarmTime)), /*#__PURE__*/_react.default.createElement("div", { className: _index.default.card_item }, "\u4E8B\u53D1\u5730\u70B9: ", /*#__PURE__*/_react.default.createElement(_tooltip.default, { title: item.item_eventplace }, item.item_eventplace)))); })); }; _this.onSearchInput = function (e) { console.log('Change:', e.target.value); _this.setState({ searchValue: e.target.value }); }; _this.state = { showStatus: 0, // 0: 事件模块 1:事件列表 isDetail: false, // 是否显示详情页 dataSource: {}, searchValue: '', title: '事件模块', isBack: false, detailSource: {} }; _this.searchLevel = ''; _this.dataTemp = {}; return _this; } (0, _inherits2.default)(MapEventModule, _Component); return (0, _createClass2.default)(MapEventModule, [{ key: "componentDidMount", value: function componentDidMount() { this._showEvent(); } // componentWillReceiveProps(nextProps) { // const clickType = nextProps.selectComponeyInfo.clickType; // const tabKey = clickType != 'personnel' ? "2" : "1"; // if(clickType && clickType != this.state.clickType) { // if (tabKey !== this.state.tabKey) { // this.setState({ // tabKey, // personType: 'A', // clickType // }); // } // } // } // 利用此事件来决定何时需要重新渲染组件。 }, { key: "shouldComponentUpdate", value: function shouldComponentUpdate(nextProps, nextState) { if (nextState.showStatus !== this.state.showStatus || nextState.title !== this.state.title || nextState.isBack !== this.state.isBack || nextState.dataSource !== this.state.dataSource || nextState.detailSource !== this.state.detailSource || nextState.searchValue !== this.state.searchValue || nextState.isDetail !== this.state.isDetail) { return true; } return false; } }, { key: "_showMarker", value: function _showMarker(list) { _events.default.emit('clearMapTag', 'eventMarker'); // 打点信息 var infos = []; list.map(function (item, i) { var data = {}; data.longitude = item.item_longitude; data.latitude = item.item_latitude; if (!(0, _utils.isEmpty)(item.item_position) || !(0, _utils.isEmpty)(item.item_eventposition)) { try { var position = JSON.parse(item.item_position); data.longitude = position.longitude; data.latitude = position.latitude; } catch (error) {} try { var _position2 = JSON.parse(item.item_eventposition); data.longitude = _position2.longitude; data.latitude = _position2.latitude; } catch (error) {} switch (item.item_eventlevelname) { case '一般': data.markerIcon = _eventYb.default; break; case '较大': data.markerIcon = _eventJd.default; break; case '重大': data.markerIcon = _eventZd.default; break; case '特别重大': data.markerIcon = _eventTd.default; break; } infos.push(data); } }); console.log('addPictueMarks-infos', infos); setTimeout(function () { _events.default.emit('addPictueMarks', { data: { data: infos }, type: 'eventMarker' }); }, 200); } }, { key: "render", value: function render() { var _this$props = this.props, mapStyle = _this$props.mapStyle, selectComponeyInfo = _this$props.selectComponeyInfo, pictureMarkersList = _this$props.pictureMarkersList; var _this$state3 = this.state, showStatus = _this$state3.showStatus, title = _this$state3.title, isDetail = _this$state3.isDetail, isBack = _this$state3.isBack, searchValue = _this$state3.searchValue; console.log('MapEventModule-render'); var cls = (0, _classnames.default)('map-modal-optimizing-level1', _index.default.map_event_content); return /*#__PURE__*/_react.default.createElement("div", { className: _index.default[mapStyle] }, /*#__PURE__*/_react.default.createElement("div", { className: cls }, /*#__PURE__*/_react.default.createElement("div", { className: _index.default.map_event_header }, /*#__PURE__*/_react.default.createElement("div", { className: _index.default.header_name }, title), isDetail || isBack ? /*#__PURE__*/_react.default.createElement("div", { className: _index.default.header_back }, /*#__PURE__*/_react.default.createElement("img", { src: _back.default, onClick: this.onBack.bind(this) })) : /*#__PURE__*/_react.default.createElement("div", { className: _index.default.header_icon }, /*#__PURE__*/_react.default.createElement("img", { src: showStatus == 0 ? __webpack_require__("nxuO") : __webpack_require__("kDXx"), onClick: this.onChangeState.bind(this, 0) }), /*#__PURE__*/_react.default.createElement("img", { src: showStatus == 1 ? __webpack_require__("hwng") : __webpack_require__("Wny5"), onClick: this.onChangeState.bind(this, 1) }))), /*#__PURE__*/_react.default.createElement("div", { className: _index.default.map_event_body }, !isDetail && showStatus == 1 && /*#__PURE__*/_react.default.createElement(_input.default, { placeholder: "\u8BF7\u8F93\u5165\u4E8B\u4EF6\u540D\u79F0", onChange: this.onSearchInput, onPressEnter: this._showEvent, style: { marginRight: '16px', backgroundColor: '#F8F8FA', width: '270px' }, value: searchValue }), isDetail ? this.renderDetail() : showStatus == 0 ? this.renderModule() : this.renderList()))); } }]); }(_react.Component)) || _class); /***/ }), /***/ "9SSc": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__style_index_less__ = __webpack_require__("vtiu"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__style_index_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__style_index_less__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__index_less__ = __webpack_require__("b5vB"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__index_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__index_less__); /***/ }), /***/ "9oFX": /***/ (function(module, exports, __webpack_require__) { "use strict"; function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } var __importStar = this && this.__importStar || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) { if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; } result["default"] = mod; return result; }; var __importDefault = this && this.__importDefault || function (mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); var React = __importStar(__webpack_require__("GiK3")); var findDOMNode_1 = __importDefault(__webpack_require__("x85o")); var toArray_1 = __importDefault(__webpack_require__("Hjgs")); var warning_1 = __importDefault(__webpack_require__("GNCS")); var ref_1 = __webpack_require__("MtKN"); var resize_observer_polyfill_1 = __importDefault(__webpack_require__("z+gd")); var util_1 = __webpack_require__("kXYA"); var INTERNAL_PREFIX_KEY = 'rc-observer-key'; // Still need to be compatible with React 15, we use class component here var ReactResizeObserver = /*#__PURE__*/ function (_React$Component) { _inherits(ReactResizeObserver, _React$Component); function ReactResizeObserver() { var _this; _classCallCheck(this, ReactResizeObserver); _this = _possibleConstructorReturn(this, _getPrototypeOf(ReactResizeObserver).apply(this, arguments)); _this.resizeObserver = null; _this.childNode = null; _this.currentElement = null; _this.state = { width: 0, height: 0 }; _this.onResize = function (entries) { var onResize = _this.props.onResize; var target = entries[0].target; var _target$getBoundingCl = target.getBoundingClientRect(), width = _target$getBoundingCl.width, height = _target$getBoundingCl.height; /** * Resize observer trigger when content size changed. * In most case we just care about element size, * let's use `boundary` instead of `contentRect` here to avoid shaking. */ var fixedWidth = Math.floor(width); var fixedHeight = Math.floor(height); if (_this.state.width !== fixedWidth || _this.state.height !== fixedHeight) { var size = { width: fixedWidth, height: fixedHeight }; _this.setState(size); if (onResize) { onResize(size); } } }; _this.setChildNode = function (node) { _this.childNode = node; }; return _this; } _createClass(ReactResizeObserver, [{ key: "componentDidMount", value: function componentDidMount() { this.onComponentUpdated(); } }, { key: "componentDidUpdate", value: function componentDidUpdate() { this.onComponentUpdated(); } }, { key: "componentWillUnmount", value: function componentWillUnmount() { this.destroyObserver(); } }, { key: "onComponentUpdated", value: function onComponentUpdated() { var disabled = this.props.disabled; // Unregister if disabled if (disabled) { this.destroyObserver(); return; } // Unregister if element changed var element = findDOMNode_1.default(this.childNode || this); var elementChanged = element !== this.currentElement; if (elementChanged) { this.destroyObserver(); this.currentElement = element; } if (!this.resizeObserver && element) { this.resizeObserver = new resize_observer_polyfill_1.default(this.onResize); this.resizeObserver.observe(element); } } }, { key: "destroyObserver", value: function destroyObserver() { if (this.resizeObserver) { this.resizeObserver.disconnect(); this.resizeObserver = null; } } }, { key: "render", value: function render() { var children = this.props.children; var childNodes = toArray_1.default(children); if (childNodes.length > 1) { warning_1.default(false, 'Find more than one child node with `children` in ResizeObserver. Will only observe first one.'); } else if (childNodes.length === 0) { warning_1.default(false, '`children` of ResizeObserver is empty. Nothing is in observe.'); return null; } var childNode = childNodes[0]; if (React.isValidElement(childNode) && util_1.supportRef(childNode)) { var ref = childNode.ref; childNodes[0] = React.cloneElement(childNode, { ref: ref_1.composeRef(ref, this.setChildNode) }); } return childNodes.length === 1 ? childNodes[0] : childNodes.map(function (node, index) { if (!React.isValidElement(node) || 'key' in node && node.key !== null) { return node; } return React.cloneElement(node, { key: "".concat(INTERNAL_PREFIX_KEY, "-").concat(index) }); }); } }]); return ReactResizeObserver; }(React.Component); ReactResizeObserver.displayName = 'ResizeObserver'; exports.default = ReactResizeObserver; /***/ }), /***/ "9rO7": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAA9JJREFUaEPdmstvG1UUxr/PiSE0pQ8okUD5A9ixY8HCdlERSkIRSLSilQC1FRQEjfBMhVAWxSxQJFSPUSgSiZAqJCiPdkEpJIICtUdiw45l94FKgZZXDaV25kPX2JNJyWNm7MhjvBv5HN/vd8+Ze86910SPf9jj+rEMIDelYdXwuogchDsTBUdcolBmGi+Vxznf0uYDGPFeHd9DuC1Rwm8UQ1xJ9eOeFoQPkC3qlIB9iRbfFEfgg4rN/ebRB8g4+jGQNmOuzdkkwewsaWzRw2cNTcQl1+JdywGKUkuwazORL3dmBY1LEfi/AmQdnZMwFky3MKlFoC7iHdfic2Hsw9jEikC2pJo89IcZYCWbwTQG5sb5d1z/oF88AEdVCZuiCkhOBBz9LOH2ZQDEd4P9eGBunL9HBWvHPm4ElgAIQc2ll/h2YAce/PJJVtsRFcW3bQACtojjLQgS5S2DGDt3mH9GERLXtm2A9M3YUa9hvzxM+b0I8RW3Y3f5AK/FFRbWryMAX7/AyxlHNoTjAYi5oWE8cnovr4cVE8euYwBm8KyjCQmv+UKIs3cPYs/MYdbiiAvj01EAM2CuqIIHvBKIxJmhYTx+ei8XwwiKatNxACMg42gSwssBiFM783iiQHpRBa5nvyEAjXQqqijACqTTu5U8DpD0G8T1xIX5fsMAGpEo6gSA5wNCOt6SbyiAJOZKmJbwtIHoS+GhC3l+HmZmw9rEAghudLZtw5ZPD/GP1QY0EPe/gdFFD6pYmEtECuVKOup5OAbi/U62xmFnPWgXKwJxBmrXJ+toBsA+AQXXYrH1e10DMKmVdTDSlwK/eRGza6XWrmltvX4VvxrRJH6oWBzuOkBwQ05ippzHs6tBjEzpjmoNCw3RxE+uxaGuA2SKGgWwtCIRJ1yLR1ZKtUQCNFKohJMQnvIrNuBUbNo3QiQSwIgsSKkLDt4LHp4xhclKnhNBiMQCGJF7Plbfwjw+lPBYS3QKeLVss9B6TjSAEfnMtNIXr+KMgIcD6TRRsTlpnhMP0IzETQvz+ETCiA+Rgl3J0+kJACM6d1ID+gXm0GyXn07EkVv68VHiltHVKvPuaW36rYpZCNnmui8SR+Xh3+qblDqwVmuRe0ubvWv4AsB9LYjA0U0yCpkRZmrBaiCjb+LWah3nIdy7zCYJEWg2Zgcl9EVu8oiqa3Fz11oJ86J6V/BXZOFLDnXXZrprAGbgTElvQzgIRD/hJnG2kuejXQVoY/b/49q1/UCnINYGCFzybcSGvF2IdS/5ev6atecvuhv9SS//1aDdHO2WfyIvtKNMxj/M1ulPpko7RQAAAABJRU5ErkJggg==" /***/ }), /***/ "9x0k": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAA7UlEQVQ4T62TMUpDURBFz7W3kpRaWSjYZAeCIlhkDUkgEHAJYirFJQSEQHQNFoGQQHZgE8gvfpWUYmXvhCfz4PPAapz2zpy5M2+eCIZSvZndAi/AsfMqoCOpdv0UeAfOXN8BQ0mzDNg2irOnJ0kjBzwCD4XZnaSTDLBC/AFuJC0dcAXMgYNmnlJ4Qgl4k9RrJpvZK9D9C7Dx+VLnb+AQGEiaeoM+MGloyUkl6Tw7SEtK9BXwCSyAI6DtHT+AL+AaaAGXQHJZ/wLKMLML4A64d+0ZGEtal7n/AzCz2AhmFl5i+BnDhxQ+5dhnivzoPV3pjBHxRtVoAAAAAElFTkSuQmCC" /***/ }), /***/ "9xJI": /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.newMessages = newMessages; function newMessages() { return { 'default': 'Validation error on field %s', required: '%s is required', 'enum': '%s must be one of %s', whitespace: '%s cannot be empty', date: { format: '%s date %s is invalid for format %s', parse: '%s date could not be parsed, %s is invalid ', invalid: '%s date %s is invalid' }, types: { string: '%s is not a %s', method: '%s is not a %s (function)', array: '%s is not an %s', object: '%s is not an %s', number: '%s is not a %s', date: '%s is not a %s', boolean: '%s is not a %s', integer: '%s is not an %s', float: '%s is not a %s', regexp: '%s is not a valid %s', email: '%s is not a valid %s', url: '%s is not a valid %s', hex: '%s is not a valid %s' }, string: { len: '%s must be exactly %s characters', min: '%s must be at least %s characters', max: '%s cannot be longer than %s characters', range: '%s must be between %s and %s characters' }, number: { len: '%s must equal %s', min: '%s cannot be less than %s', max: '%s cannot be greater than %s', range: '%s must be between %s and %s' }, array: { len: '%s must be exactly %s in length', min: '%s cannot be less than %s in length', max: '%s cannot be greater than %s in length', range: '%s must be between %s and %s in length' }, pattern: { mismatch: '%s value %s does not match pattern %s' }, clone: function clone() { var cloned = JSON.parse(JSON.stringify(this)); cloned.clone = this.clone; return cloned; } }; } var messages = exports.messages = newMessages(); /***/ }), /***/ "A+AJ": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); // EXTERNAL MODULE: ./node_modules/react/index.js var react = __webpack_require__("GiK3"); var react_default = /*#__PURE__*/__webpack_require__.n(react); // EXTERNAL MODULE: ./node_modules/prop-types/index.js var prop_types = __webpack_require__("KSGD"); var prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types); // EXTERNAL MODULE: ./node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js var react_lifecycles_compat_es = __webpack_require__("R8mX"); // EXTERNAL MODULE: ./node_modules/antd/node_modules/classnames/index.js var classnames = __webpack_require__("kTQ8"); var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); // EXTERNAL MODULE: ./node_modules/omit.js/es/index.js var es = __webpack_require__("JkBm"); // EXTERNAL MODULE: ./node_modules/antd/es/_util/type.js var type = __webpack_require__("D+5j"); // EXTERNAL MODULE: ./node_modules/antd/es/icon/index.js + 5 modules var es_icon = __webpack_require__("FC3+"); // CONCATENATED MODULE: ./node_modules/antd/es/input/ClearableLabeledInput.js function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } 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; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } var ClearableInputType = Object(type["a" /* tuple */])('text', 'input'); function hasPrefixSuffix(props) { return !!(props.prefix || props.suffix || props.allowClear); } var ClearableLabeledInput_ClearableLabeledInput = /*#__PURE__*/function (_React$Component) { _inherits(ClearableLabeledInput, _React$Component); var _super = _createSuper(ClearableLabeledInput); function ClearableLabeledInput() { _classCallCheck(this, ClearableLabeledInput); return _super.apply(this, arguments); } _createClass(ClearableLabeledInput, [{ key: "renderClearIcon", value: function renderClearIcon(prefixCls) { var _this$props = this.props, allowClear = _this$props.allowClear, value = _this$props.value, disabled = _this$props.disabled, readOnly = _this$props.readOnly, inputType = _this$props.inputType, handleReset = _this$props.handleReset; if (!allowClear || disabled || readOnly || value === undefined || value === null || value === '') { return null; } var className = inputType === ClearableInputType[0] ? "".concat(prefixCls, "-textarea-clear-icon") : "".concat(prefixCls, "-clear-icon"); return /*#__PURE__*/react["createElement"](es_icon["default"], { type: "close-circle", theme: "filled", onClick: handleReset, className: className, role: "button" }); } }, { key: "renderSuffix", value: function renderSuffix(prefixCls) { var _this$props2 = this.props, suffix = _this$props2.suffix, allowClear = _this$props2.allowClear; if (suffix || allowClear) { return /*#__PURE__*/react["createElement"]("span", { className: "".concat(prefixCls, "-suffix") }, this.renderClearIcon(prefixCls), suffix); } return null; } }, { key: "renderLabeledIcon", value: function renderLabeledIcon(prefixCls, element) { var _classNames; var props = this.props; var suffix = this.renderSuffix(prefixCls); if (!hasPrefixSuffix(props)) { return /*#__PURE__*/react["cloneElement"](element, { value: props.value }); } var prefix = props.prefix ? /*#__PURE__*/react["createElement"]("span", { className: "".concat(prefixCls, "-prefix") }, props.prefix) : null; var affixWrapperCls = classnames_default()(props.className, "".concat(prefixCls, "-affix-wrapper"), (_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-affix-wrapper-sm"), props.size === 'small'), _defineProperty(_classNames, "".concat(prefixCls, "-affix-wrapper-lg"), props.size === 'large'), _defineProperty(_classNames, "".concat(prefixCls, "-affix-wrapper-input-with-clear-btn"), props.suffix && props.allowClear && this.props.value), _classNames)); return /*#__PURE__*/react["createElement"]("span", { className: affixWrapperCls, style: props.style }, prefix, /*#__PURE__*/react["cloneElement"](element, { style: null, value: props.value, className: getInputClassName(prefixCls, props.size, props.disabled) }), suffix); } }, { key: "renderInputWithLabel", value: function renderInputWithLabel(prefixCls, labeledElement) { var _classNames3; var _this$props3 = this.props, addonBefore = _this$props3.addonBefore, addonAfter = _this$props3.addonAfter, style = _this$props3.style, size = _this$props3.size, className = _this$props3.className; // Not wrap when there is not addons if (!addonBefore && !addonAfter) { return labeledElement; } var wrapperClassName = "".concat(prefixCls, "-group"); var addonClassName = "".concat(wrapperClassName, "-addon"); var addonBeforeNode = addonBefore ? /*#__PURE__*/react["createElement"]("span", { className: addonClassName }, addonBefore) : null; var addonAfterNode = addonAfter ? /*#__PURE__*/react["createElement"]("span", { className: addonClassName }, addonAfter) : null; var mergedWrapperClassName = classnames_default()("".concat(prefixCls, "-wrapper"), _defineProperty({}, wrapperClassName, addonBefore || addonAfter)); var mergedGroupClassName = classnames_default()(className, "".concat(prefixCls, "-group-wrapper"), (_classNames3 = {}, _defineProperty(_classNames3, "".concat(prefixCls, "-group-wrapper-sm"), size === 'small'), _defineProperty(_classNames3, "".concat(prefixCls, "-group-wrapper-lg"), size === 'large'), _classNames3)); // Need another wrapper for changing display:table to display:inline-block // and put style prop in wrapper return /*#__PURE__*/react["createElement"]("span", { className: mergedGroupClassName, style: style }, /*#__PURE__*/react["createElement"]("span", { className: mergedWrapperClassName }, addonBeforeNode, /*#__PURE__*/react["cloneElement"](labeledElement, { style: null }), addonAfterNode)); } }, { key: "renderTextAreaWithClearIcon", value: function renderTextAreaWithClearIcon(prefixCls, element) { var _this$props4 = this.props, value = _this$props4.value, allowClear = _this$props4.allowClear, className = _this$props4.className, style = _this$props4.style; if (!allowClear) { return /*#__PURE__*/react["cloneElement"](element, { value: value }); } var affixWrapperCls = classnames_default()(className, "".concat(prefixCls, "-affix-wrapper"), "".concat(prefixCls, "-affix-wrapper-textarea-with-clear-btn")); return /*#__PURE__*/react["createElement"]("span", { className: affixWrapperCls, style: style }, /*#__PURE__*/react["cloneElement"](element, { style: null, value: value }), this.renderClearIcon(prefixCls)); } }, { key: "renderClearableLabeledInput", value: function renderClearableLabeledInput() { var _this$props5 = this.props, prefixCls = _this$props5.prefixCls, inputType = _this$props5.inputType, element = _this$props5.element; if (inputType === ClearableInputType[0]) { return this.renderTextAreaWithClearIcon(prefixCls, element); } return this.renderInputWithLabel(prefixCls, this.renderLabeledIcon(prefixCls, element)); } }, { key: "render", value: function render() { return this.renderClearableLabeledInput(); } }]); return ClearableLabeledInput; }(react["Component"]); Object(react_lifecycles_compat_es["polyfill"])(ClearableLabeledInput_ClearableLabeledInput); /* harmony default export */ var input_ClearableLabeledInput = (ClearableLabeledInput_ClearableLabeledInput); // EXTERNAL MODULE: ./node_modules/antd/es/config-provider/index.js + 1 modules var config_provider = __webpack_require__("PmSq"); // EXTERNAL MODULE: ./node_modules/antd/es/_util/warning.js var warning = __webpack_require__("qGip"); // CONCATENATED MODULE: ./node_modules/antd/es/input/Input.js function Input__typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { Input__typeof = function _typeof(obj) { return typeof obj; }; } else { Input__typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return Input__typeof(obj); } function _extends() { _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; }; return _extends.apply(this, arguments); } function Input__classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function Input__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); } } function Input__createClass(Constructor, protoProps, staticProps) { if (protoProps) Input__defineProperties(Constructor.prototype, protoProps); if (staticProps) Input__defineProperties(Constructor, staticProps); return Constructor; } function Input__inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) Input__setPrototypeOf(subClass, superClass); } function Input__setPrototypeOf(o, p) { Input__setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return Input__setPrototypeOf(o, p); } function Input__createSuper(Derived) { var hasNativeReflectConstruct = Input__isNativeReflectConstruct(); return function _createSuperInternal() { var Super = Input__getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = Input__getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return Input__possibleConstructorReturn(this, result); }; } function Input__possibleConstructorReturn(self, call) { if (call && (Input__typeof(call) === "object" || typeof call === "function")) { return call; } return Input__assertThisInitialized(self); } function Input__assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function Input__isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } function Input__getPrototypeOf(o) { Input__getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return Input__getPrototypeOf(o); } function Input__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 InputSizes = Object(type["a" /* tuple */])('small', 'default', 'large'); function fixControlledValue(value) { if (typeof value === 'undefined' || value === null) { return ''; } return value; } function resolveOnChange(target, e, onChange) { if (onChange) { var event = e; if (e.type === 'click') { // click clear icon event = Object.create(e); event.target = target; event.currentTarget = target; var originalInputValue = target.value; // change target ref value cause e.target.value should be '' when clear input target.value = ''; onChange(event); // reset target ref value target.value = originalInputValue; return; } onChange(event); } } function getInputClassName(prefixCls, size, disabled) { var _classNames; return classnames_default()(prefixCls, (_classNames = {}, Input__defineProperty(_classNames, "".concat(prefixCls, "-sm"), size === 'small'), Input__defineProperty(_classNames, "".concat(prefixCls, "-lg"), size === 'large'), Input__defineProperty(_classNames, "".concat(prefixCls, "-disabled"), disabled), _classNames)); } var Input_Input = /*#__PURE__*/function (_React$Component) { Input__inherits(Input, _React$Component); var _super = Input__createSuper(Input); function Input(props) { var _this; Input__classCallCheck(this, Input); _this = _super.call(this, props); _this.saveClearableInput = function (input) { _this.clearableInput = input; }; _this.saveInput = function (input) { _this.input = input; }; _this.handleReset = function (e) { _this.setValue('', function () { _this.focus(); }); resolveOnChange(_this.input, e, _this.props.onChange); }; _this.renderInput = function (prefixCls) { var _this$props = _this.props, className = _this$props.className, addonBefore = _this$props.addonBefore, addonAfter = _this$props.addonAfter, size = _this$props.size, disabled = _this$props.disabled; // Fix https://fb.me/react-unknown-prop var otherProps = Object(es["a" /* default */])(_this.props, ['prefixCls', 'onPressEnter', 'addonBefore', 'addonAfter', 'prefix', 'suffix', 'allowClear', // Input elements must be either controlled or uncontrolled, // specify either the value prop, or the defaultValue prop, but not both. 'defaultValue', 'size', 'inputType']); return /*#__PURE__*/react["createElement"]("input", _extends({}, otherProps, { onChange: _this.handleChange, onKeyDown: _this.handleKeyDown, className: classnames_default()(getInputClassName(prefixCls, size, disabled), Input__defineProperty({}, className, className && !addonBefore && !addonAfter)), ref: _this.saveInput })); }; _this.clearPasswordValueAttribute = function () { // https://github.com/ant-design/ant-design/issues/20541 _this.removePasswordTimeout = setTimeout(function () { if (_this.input && _this.input.getAttribute('type') === 'password' && _this.input.hasAttribute('value')) { _this.input.removeAttribute('value'); } }); }; _this.handleChange = function (e) { _this.setValue(e.target.value, _this.clearPasswordValueAttribute); resolveOnChange(_this.input, e, _this.props.onChange); }; _this.handleKeyDown = function (e) { var _this$props2 = _this.props, onPressEnter = _this$props2.onPressEnter, onKeyDown = _this$props2.onKeyDown; if (e.keyCode === 13 && onPressEnter) { onPressEnter(e); } if (onKeyDown) { onKeyDown(e); } }; _this.renderComponent = function (_ref) { var getPrefixCls = _ref.getPrefixCls; var value = _this.state.value; var customizePrefixCls = _this.props.prefixCls; var prefixCls = getPrefixCls('input', customizePrefixCls); return /*#__PURE__*/react["createElement"](input_ClearableLabeledInput, _extends({}, _this.props, { prefixCls: prefixCls, inputType: "input", value: fixControlledValue(value), element: _this.renderInput(prefixCls), handleReset: _this.handleReset, ref: _this.saveClearableInput })); }; var value = typeof props.value === 'undefined' ? props.defaultValue : props.value; _this.state = { value: value }; return _this; } Input__createClass(Input, [{ key: "componentDidMount", value: function componentDidMount() { this.clearPasswordValueAttribute(); } // Since polyfill `getSnapshotBeforeUpdate` need work with `componentDidUpdate`. // We keep an empty function here. }, { key: "componentDidUpdate", value: function componentDidUpdate() {} }, { key: "getSnapshotBeforeUpdate", value: function getSnapshotBeforeUpdate(prevProps) { if (hasPrefixSuffix(prevProps) !== hasPrefixSuffix(this.props)) { Object(warning["a" /* default */])(this.input !== document.activeElement, 'Input', "When Input is focused, dynamic add or remove prefix / suffix will make it lose focus caused by dom structure change. Read more: https://ant.design/components/input/#FAQ"); } return null; } }, { key: "componentWillUnmount", value: function componentWillUnmount() { if (this.removePasswordTimeout) { clearTimeout(this.removePasswordTimeout); } } }, { key: "focus", value: function focus() { this.input.focus(); } }, { key: "blur", value: function blur() { this.input.blur(); } }, { key: "select", value: function select() { this.input.select(); } }, { key: "setValue", value: function setValue(value, callback) { if (!('value' in this.props)) { this.setState({ value: value }, callback); } } }, { key: "render", value: function render() { return /*#__PURE__*/react["createElement"](config_provider["ConfigConsumer"], null, this.renderComponent); } }], [{ key: "getDerivedStateFromProps", value: function getDerivedStateFromProps(nextProps) { if ('value' in nextProps) { return { value: nextProps.value }; } return null; } }]); return Input; }(react["Component"]); Input_Input.defaultProps = { type: 'text' }; Input_Input.propTypes = { type: prop_types["string"], id: prop_types["string"], size: prop_types["oneOf"](InputSizes), maxLength: prop_types["number"], disabled: prop_types["bool"], value: prop_types["any"], defaultValue: prop_types["any"], className: prop_types["string"], addonBefore: prop_types["node"], addonAfter: prop_types["node"], prefixCls: prop_types["string"], onPressEnter: prop_types["func"], onKeyDown: prop_types["func"], onKeyUp: prop_types["func"], onFocus: prop_types["func"], onBlur: prop_types["func"], prefix: prop_types["node"], suffix: prop_types["node"], allowClear: prop_types["bool"] }; Object(react_lifecycles_compat_es["polyfill"])(Input_Input); /* harmony default export */ var input_Input = (Input_Input); // CONCATENATED MODULE: ./node_modules/antd/es/input/Group.js function Group__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 Group_Group = function Group(props) { return /*#__PURE__*/react["createElement"](config_provider["ConfigConsumer"], null, function (_ref) { var _classNames; var getPrefixCls = _ref.getPrefixCls; var customizePrefixCls = props.prefixCls, _props$className = props.className, className = _props$className === void 0 ? '' : _props$className; var prefixCls = getPrefixCls('input-group', customizePrefixCls); var cls = classnames_default()(prefixCls, (_classNames = {}, Group__defineProperty(_classNames, "".concat(prefixCls, "-lg"), props.size === 'large'), Group__defineProperty(_classNames, "".concat(prefixCls, "-sm"), props.size === 'small'), Group__defineProperty(_classNames, "".concat(prefixCls, "-compact"), props.compact), _classNames), className); return /*#__PURE__*/react["createElement"]("span", { className: cls, style: props.style, onMouseEnter: props.onMouseEnter, onMouseLeave: props.onMouseLeave, onFocus: props.onFocus, onBlur: props.onBlur }, props.children); }); }; /* harmony default export */ var input_Group = (Group_Group); // EXTERNAL MODULE: ./node_modules/is-mobile/index.js var is_mobile = __webpack_require__("6VvU"); var is_mobile_default = /*#__PURE__*/__webpack_require__.n(is_mobile); // EXTERNAL MODULE: ./node_modules/antd/es/button/index.js + 2 modules var es_button = __webpack_require__("zwGx"); // CONCATENATED MODULE: ./node_modules/antd/es/input/Search.js function Search__typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { Search__typeof = function _typeof(obj) { return typeof obj; }; } else { Search__typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return Search__typeof(obj); } function Search__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; } function Search__extends() { Search__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; }; return Search__extends.apply(this, arguments); } function Search__classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function Search__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); } } function Search__createClass(Constructor, protoProps, staticProps) { if (protoProps) Search__defineProperties(Constructor.prototype, protoProps); if (staticProps) Search__defineProperties(Constructor, staticProps); return Constructor; } function Search__inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) Search__setPrototypeOf(subClass, superClass); } function Search__setPrototypeOf(o, p) { Search__setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return Search__setPrototypeOf(o, p); } function Search__createSuper(Derived) { var hasNativeReflectConstruct = Search__isNativeReflectConstruct(); return function _createSuperInternal() { var Super = Search__getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = Search__getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return Search__possibleConstructorReturn(this, result); }; } function Search__possibleConstructorReturn(self, call) { if (call && (Search__typeof(call) === "object" || typeof call === "function")) { return call; } return Search__assertThisInitialized(self); } function Search__assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function Search__isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } function Search__getPrototypeOf(o) { Search__getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return Search__getPrototypeOf(o); } var __rest = this && this.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var Search_Search = /*#__PURE__*/function (_React$Component) { Search__inherits(Search, _React$Component); var _super = Search__createSuper(Search); function Search() { var _this; Search__classCallCheck(this, Search); _this = _super.apply(this, arguments); _this.saveInput = function (node) { _this.input = node; }; _this.onChange = function (e) { var _this$props = _this.props, onChange = _this$props.onChange, onSearch = _this$props.onSearch; if (e && e.target && e.type === 'click' && onSearch) { onSearch(e.target.value, e); } if (onChange) { onChange(e); } }; _this.onSearch = function (e) { var _this$props2 = _this.props, onSearch = _this$props2.onSearch, loading = _this$props2.loading, disabled = _this$props2.disabled; if (loading || disabled) { return; } if (onSearch) { onSearch(_this.input.input.value, e); } if (!Object(is_mobile["isMobile"])({ tablet: true })) { _this.input.focus(); } }; _this.renderLoading = function (prefixCls) { var _this$props3 = _this.props, enterButton = _this$props3.enterButton, size = _this$props3.size; if (enterButton) { return /*#__PURE__*/react["createElement"](es_button["default"], { className: "".concat(prefixCls, "-button"), type: "primary", size: size, key: "enterButton" }, /*#__PURE__*/react["createElement"](es_icon["default"], { type: "loading" })); } return /*#__PURE__*/react["createElement"](es_icon["default"], { className: "".concat(prefixCls, "-icon"), type: "loading", key: "loadingIcon" }); }; _this.renderSuffix = function (prefixCls) { var _this$props4 = _this.props, suffix = _this$props4.suffix, enterButton = _this$props4.enterButton, loading = _this$props4.loading; if (loading && !enterButton) { return [suffix, _this.renderLoading(prefixCls)]; } if (enterButton) return suffix; var icon = /*#__PURE__*/react["createElement"](es_icon["default"], { className: "".concat(prefixCls, "-icon"), type: "search", key: "searchIcon", onClick: _this.onSearch }); if (suffix) { return [/*#__PURE__*/react["isValidElement"](suffix) ? /*#__PURE__*/react["cloneElement"](suffix, { key: 'suffix' }) : null, icon]; } return icon; }; _this.renderAddonAfter = function (prefixCls) { var _this$props5 = _this.props, enterButton = _this$props5.enterButton, size = _this$props5.size, disabled = _this$props5.disabled, addonAfter = _this$props5.addonAfter, loading = _this$props5.loading; var btnClassName = "".concat(prefixCls, "-button"); if (loading && enterButton) { return [_this.renderLoading(prefixCls), addonAfter]; } if (!enterButton) return addonAfter; var button; var enterButtonAsElement = enterButton; var isAntdButton = enterButtonAsElement.type && enterButtonAsElement.type.__ANT_BUTTON === true; if (isAntdButton || enterButtonAsElement.type === 'button') { button = /*#__PURE__*/react["cloneElement"](enterButtonAsElement, Search__extends({ onClick: _this.onSearch, key: 'enterButton' }, isAntdButton ? { className: btnClassName, size: size } : {})); } else { button = /*#__PURE__*/react["createElement"](es_button["default"], { className: btnClassName, type: "primary", size: size, disabled: disabled, key: "enterButton", onClick: _this.onSearch }, enterButton === true ? /*#__PURE__*/react["createElement"](es_icon["default"], { type: "search" }) : enterButton); } if (addonAfter) { return [button, /*#__PURE__*/react["isValidElement"](addonAfter) ? /*#__PURE__*/react["cloneElement"](addonAfter, { key: 'addonAfter' }) : null]; } return button; }; _this.renderSearch = function (_ref) { var getPrefixCls = _ref.getPrefixCls; var _a = _this.props, customizePrefixCls = _a.prefixCls, customizeInputPrefixCls = _a.inputPrefixCls, size = _a.size, enterButton = _a.enterButton, className = _a.className, restProps = __rest(_a, ["prefixCls", "inputPrefixCls", "size", "enterButton", "className"]); delete restProps.onSearch; delete restProps.loading; var prefixCls = getPrefixCls('input-search', customizePrefixCls); var inputPrefixCls = getPrefixCls('input', customizeInputPrefixCls); var inputClassName; if (enterButton) { var _classNames; inputClassName = classnames_default()(prefixCls, className, (_classNames = {}, Search__defineProperty(_classNames, "".concat(prefixCls, "-enter-button"), !!enterButton), Search__defineProperty(_classNames, "".concat(prefixCls, "-").concat(size), !!size), _classNames)); } else { inputClassName = classnames_default()(prefixCls, className); } return /*#__PURE__*/react["createElement"](input_Input, Search__extends({ onPressEnter: _this.onSearch }, restProps, { size: size, prefixCls: inputPrefixCls, addonAfter: _this.renderAddonAfter(prefixCls), suffix: _this.renderSuffix(prefixCls), onChange: _this.onChange, ref: _this.saveInput, className: inputClassName })); }; return _this; } Search__createClass(Search, [{ key: "focus", value: function focus() { this.input.focus(); } }, { key: "blur", value: function blur() { this.input.blur(); } }, { key: "render", value: function render() { return /*#__PURE__*/react["createElement"](config_provider["ConfigConsumer"], null, this.renderSearch); } }]); return Search; }(react["Component"]); Search_Search.defaultProps = { enterButton: false }; // EXTERNAL MODULE: ./node_modules/rc-resize-observer/es/index.js var rc_resize_observer_es = __webpack_require__("9oFX"); var es_default = /*#__PURE__*/__webpack_require__.n(rc_resize_observer_es); // CONCATENATED MODULE: ./node_modules/antd/es/input/calculateNodeHeight.js // Thanks to https://github.com/andreypopp/react-textarea-autosize/ /** * calculateNodeHeight(uiTextNode, useCache = false) */ var HIDDEN_TEXTAREA_STYLE = "\n min-height:0 !important;\n max-height:none !important;\n height:0 !important;\n visibility:hidden !important;\n overflow:hidden !important;\n position:absolute !important;\n z-index:-1000 !important;\n top:0 !important;\n right:0 !important\n"; var SIZING_STYLE = ['letter-spacing', 'line-height', 'padding-top', 'padding-bottom', 'font-family', 'font-weight', 'font-size', 'font-variant', 'text-rendering', 'text-transform', 'width', 'text-indent', 'padding-left', 'padding-right', 'border-width', 'box-sizing']; var computedStyleCache = {}; var hiddenTextarea; function calculateNodeStyling(node) { var useCache = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; var nodeRef = node.getAttribute('id') || node.getAttribute('data-reactid') || node.getAttribute('name'); if (useCache && computedStyleCache[nodeRef]) { return computedStyleCache[nodeRef]; } var style = window.getComputedStyle(node); var boxSizing = style.getPropertyValue('box-sizing') || style.getPropertyValue('-moz-box-sizing') || style.getPropertyValue('-webkit-box-sizing'); var paddingSize = parseFloat(style.getPropertyValue('padding-bottom')) + parseFloat(style.getPropertyValue('padding-top')); var borderSize = parseFloat(style.getPropertyValue('border-bottom-width')) + parseFloat(style.getPropertyValue('border-top-width')); var sizingStyle = SIZING_STYLE.map(function (name) { return "".concat(name, ":").concat(style.getPropertyValue(name)); }).join(';'); var nodeInfo = { sizingStyle: sizingStyle, paddingSize: paddingSize, borderSize: borderSize, boxSizing: boxSizing }; if (useCache && nodeRef) { computedStyleCache[nodeRef] = nodeInfo; } return nodeInfo; } function calculateNodeHeight(uiTextNode) { var useCache = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; var minRows = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; var maxRows = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null; if (!hiddenTextarea) { hiddenTextarea = document.createElement('textarea'); document.body.appendChild(hiddenTextarea); } // Fix wrap="off" issue // https://github.com/ant-design/ant-design/issues/6577 if (uiTextNode.getAttribute('wrap')) { hiddenTextarea.setAttribute('wrap', uiTextNode.getAttribute('wrap')); } else { hiddenTextarea.removeAttribute('wrap'); } // Copy all CSS properties that have an impact on the height of the content in // the textbox var _calculateNodeStyling = calculateNodeStyling(uiTextNode, useCache), paddingSize = _calculateNodeStyling.paddingSize, borderSize = _calculateNodeStyling.borderSize, boxSizing = _calculateNodeStyling.boxSizing, sizingStyle = _calculateNodeStyling.sizingStyle; // Need to have the overflow attribute to hide the scrollbar otherwise // text-lines will not calculated properly as the shadow will technically be // narrower for content hiddenTextarea.setAttribute('style', "".concat(sizingStyle, ";").concat(HIDDEN_TEXTAREA_STYLE)); hiddenTextarea.value = uiTextNode.value || uiTextNode.placeholder || ''; var minHeight = Number.MIN_SAFE_INTEGER; var maxHeight = Number.MAX_SAFE_INTEGER; var height = hiddenTextarea.scrollHeight; var overflowY; if (boxSizing === 'border-box') { // border-box: add border, since height = content + padding + border height += borderSize; } else if (boxSizing === 'content-box') { // remove padding, since height = content height -= paddingSize; } if (minRows !== null || maxRows !== null) { // measure height of a textarea with a single row hiddenTextarea.value = ' '; var singleRowHeight = hiddenTextarea.scrollHeight - paddingSize; if (minRows !== null) { minHeight = singleRowHeight * minRows; if (boxSizing === 'border-box') { minHeight = minHeight + paddingSize + borderSize; } height = Math.max(minHeight, height); } if (maxRows !== null) { maxHeight = singleRowHeight * maxRows; if (boxSizing === 'border-box') { maxHeight = maxHeight + paddingSize + borderSize; } overflowY = height > maxHeight ? '' : 'hidden'; height = Math.min(maxHeight, height); } } return { height: height, minHeight: minHeight, maxHeight: maxHeight, overflowY: overflowY }; } // EXTERNAL MODULE: ./node_modules/antd/es/_util/raf.js var raf = __webpack_require__("1wHS"); // CONCATENATED MODULE: ./node_modules/antd/es/input/ResizableTextArea.js function ResizableTextArea__typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { ResizableTextArea__typeof = function _typeof(obj) { return typeof obj; }; } else { ResizableTextArea__typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return ResizableTextArea__typeof(obj); } function ResizableTextArea__extends() { ResizableTextArea__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; }; return ResizableTextArea__extends.apply(this, arguments); } function ResizableTextArea__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; } function ResizableTextArea__classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function ResizableTextArea__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); } } function ResizableTextArea__createClass(Constructor, protoProps, staticProps) { if (protoProps) ResizableTextArea__defineProperties(Constructor.prototype, protoProps); if (staticProps) ResizableTextArea__defineProperties(Constructor, staticProps); return Constructor; } function ResizableTextArea__inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) ResizableTextArea__setPrototypeOf(subClass, superClass); } function ResizableTextArea__setPrototypeOf(o, p) { ResizableTextArea__setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return ResizableTextArea__setPrototypeOf(o, p); } function ResizableTextArea__createSuper(Derived) { var hasNativeReflectConstruct = ResizableTextArea__isNativeReflectConstruct(); return function _createSuperInternal() { var Super = ResizableTextArea__getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = ResizableTextArea__getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return ResizableTextArea__possibleConstructorReturn(this, result); }; } function ResizableTextArea__possibleConstructorReturn(self, call) { if (call && (ResizableTextArea__typeof(call) === "object" || typeof call === "function")) { return call; } return ResizableTextArea__assertThisInitialized(self); } function ResizableTextArea__assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function ResizableTextArea__isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } function ResizableTextArea__getPrototypeOf(o) { ResizableTextArea__getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return ResizableTextArea__getPrototypeOf(o); } var ResizableTextArea_ResizableTextArea = /*#__PURE__*/function (_React$Component) { ResizableTextArea__inherits(ResizableTextArea, _React$Component); var _super = ResizableTextArea__createSuper(ResizableTextArea); function ResizableTextArea(props) { var _this; ResizableTextArea__classCallCheck(this, ResizableTextArea); _this = _super.call(this, props); _this.saveTextArea = function (textArea) { _this.textArea = textArea; }; _this.resizeOnNextFrame = function () { raf["a" /* default */].cancel(_this.nextFrameActionId); _this.nextFrameActionId = Object(raf["a" /* default */])(_this.resizeTextarea); }; _this.resizeTextarea = function () { var autoSize = _this.props.autoSize || _this.props.autosize; if (!autoSize || !_this.textArea) { return; } var minRows = autoSize.minRows, maxRows = autoSize.maxRows; var textareaStyles = calculateNodeHeight(_this.textArea, false, minRows, maxRows); _this.setState({ textareaStyles: textareaStyles, resizing: true }, function () { raf["a" /* default */].cancel(_this.resizeFrameId); _this.resizeFrameId = Object(raf["a" /* default */])(function () { _this.setState({ resizing: false }); _this.fixFirefoxAutoScroll(); }); }); }; _this.renderTextArea = function () { var _this$props = _this.props, prefixCls = _this$props.prefixCls, autoSize = _this$props.autoSize, autosize = _this$props.autosize, className = _this$props.className, disabled = _this$props.disabled; var _this$state = _this.state, textareaStyles = _this$state.textareaStyles, resizing = _this$state.resizing; Object(warning["a" /* default */])(autosize === undefined, 'Input.TextArea', 'autosize is deprecated, please use autoSize instead.'); var otherProps = Object(es["a" /* default */])(_this.props, ['prefixCls', 'onPressEnter', 'autoSize', 'autosize', 'defaultValue', 'allowClear']); var cls = classnames_default()(prefixCls, className, ResizableTextArea__defineProperty({}, "".concat(prefixCls, "-disabled"), disabled)); // Fix https://github.com/ant-design/ant-design/issues/6776 // Make sure it could be reset when using form.getFieldDecorator if ('value' in otherProps) { otherProps.value = otherProps.value || ''; } var style = ResizableTextArea__extends(ResizableTextArea__extends(ResizableTextArea__extends({}, _this.props.style), textareaStyles), resizing ? { overflowX: 'hidden', overflowY: 'hidden' } : null); return /*#__PURE__*/react["createElement"](es_default.a, { onResize: _this.resizeOnNextFrame, disabled: !(autoSize || autosize) }, /*#__PURE__*/react["createElement"]("textarea", ResizableTextArea__extends({}, otherProps, { className: cls, style: style, ref: _this.saveTextArea }))); }; _this.state = { textareaStyles: {}, resizing: false }; return _this; } ResizableTextArea__createClass(ResizableTextArea, [{ key: "componentDidMount", value: function componentDidMount() { this.resizeTextarea(); } }, { key: "componentDidUpdate", value: function componentDidUpdate(prevProps) { // Re-render with the new content then recalculate the height as required. if (prevProps.value !== this.props.value) { this.resizeTextarea(); } } }, { key: "componentWillUnmount", value: function componentWillUnmount() { raf["a" /* default */].cancel(this.nextFrameActionId); raf["a" /* default */].cancel(this.resizeFrameId); } // https://github.com/ant-design/ant-design/issues/21870 }, { key: "fixFirefoxAutoScroll", value: function fixFirefoxAutoScroll() { try { if (document.activeElement === this.textArea) { var currentStart = this.textArea.selectionStart; var currentEnd = this.textArea.selectionEnd; this.textArea.setSelectionRange(currentStart, currentEnd); } } catch (e) {// Fix error in Chrome: // Failed to read the 'selectionStart' property from 'HTMLInputElement' // http://stackoverflow.com/q/21177489/3040605 } } }, { key: "render", value: function render() { return this.renderTextArea(); } }]); return ResizableTextArea; }(react["Component"]); Object(react_lifecycles_compat_es["polyfill"])(ResizableTextArea_ResizableTextArea); /* harmony default export */ var input_ResizableTextArea = (ResizableTextArea_ResizableTextArea); // CONCATENATED MODULE: ./node_modules/antd/es/input/TextArea.js function TextArea__typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { TextArea__typeof = function _typeof(obj) { return typeof obj; }; } else { TextArea__typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return TextArea__typeof(obj); } function TextArea__extends() { TextArea__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; }; return TextArea__extends.apply(this, arguments); } function TextArea__classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function TextArea__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); } } function TextArea__createClass(Constructor, protoProps, staticProps) { if (protoProps) TextArea__defineProperties(Constructor.prototype, protoProps); if (staticProps) TextArea__defineProperties(Constructor, staticProps); return Constructor; } function TextArea__inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) TextArea__setPrototypeOf(subClass, superClass); } function TextArea__setPrototypeOf(o, p) { TextArea__setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return TextArea__setPrototypeOf(o, p); } function TextArea__createSuper(Derived) { var hasNativeReflectConstruct = TextArea__isNativeReflectConstruct(); return function _createSuperInternal() { var Super = TextArea__getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = TextArea__getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return TextArea__possibleConstructorReturn(this, result); }; } function TextArea__possibleConstructorReturn(self, call) { if (call && (TextArea__typeof(call) === "object" || typeof call === "function")) { return call; } return TextArea__assertThisInitialized(self); } function TextArea__assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function TextArea__isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } function TextArea__getPrototypeOf(o) { TextArea__getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return TextArea__getPrototypeOf(o); } var TextArea_TextArea = /*#__PURE__*/function (_React$Component) { TextArea__inherits(TextArea, _React$Component); var _super = TextArea__createSuper(TextArea); function TextArea(props) { var _this; TextArea__classCallCheck(this, TextArea); _this = _super.call(this, props); _this.saveTextArea = function (resizableTextArea) { _this.resizableTextArea = resizableTextArea; }; _this.saveClearableInput = function (clearableInput) { _this.clearableInput = clearableInput; }; _this.handleChange = function (e) { _this.setValue(e.target.value, function () { _this.resizableTextArea.resizeTextarea(); }); resolveOnChange(_this.resizableTextArea.textArea, e, _this.props.onChange); }; _this.handleKeyDown = function (e) { var _this$props = _this.props, onPressEnter = _this$props.onPressEnter, onKeyDown = _this$props.onKeyDown; if (e.keyCode === 13 && onPressEnter) { onPressEnter(e); } if (onKeyDown) { onKeyDown(e); } }; _this.handleReset = function (e) { _this.setValue('', function () { _this.resizableTextArea.renderTextArea(); _this.focus(); }); resolveOnChange(_this.resizableTextArea.textArea, e, _this.props.onChange); }; _this.renderTextArea = function (prefixCls) { return /*#__PURE__*/react["createElement"](input_ResizableTextArea, TextArea__extends({}, _this.props, { prefixCls: prefixCls, onKeyDown: _this.handleKeyDown, onChange: _this.handleChange, ref: _this.saveTextArea })); }; _this.renderComponent = function (_ref) { var getPrefixCls = _ref.getPrefixCls; var value = _this.state.value; var customizePrefixCls = _this.props.prefixCls; var prefixCls = getPrefixCls('input', customizePrefixCls); return /*#__PURE__*/react["createElement"](input_ClearableLabeledInput, TextArea__extends({}, _this.props, { prefixCls: prefixCls, inputType: "text", value: fixControlledValue(value), element: _this.renderTextArea(prefixCls), handleReset: _this.handleReset, ref: _this.saveClearableInput })); }; var value = typeof props.value === 'undefined' ? props.defaultValue : props.value; _this.state = { value: value }; return _this; } TextArea__createClass(TextArea, [{ key: "setValue", value: function setValue(value, callback) { if (!('value' in this.props)) { this.setState({ value: value }, callback); } } }, { key: "focus", value: function focus() { this.resizableTextArea.textArea.focus(); } }, { key: "blur", value: function blur() { this.resizableTextArea.textArea.blur(); } }, { key: "render", value: function render() { return /*#__PURE__*/react["createElement"](config_provider["ConfigConsumer"], null, this.renderComponent); } }], [{ key: "getDerivedStateFromProps", value: function getDerivedStateFromProps(nextProps) { if ('value' in nextProps) { return { value: nextProps.value }; } return null; } }]); return TextArea; }(react["Component"]); Object(react_lifecycles_compat_es["polyfill"])(TextArea_TextArea); /* harmony default export */ var input_TextArea = (TextArea_TextArea); // CONCATENATED MODULE: ./node_modules/antd/es/input/Password.js function Password__typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { Password__typeof = function _typeof(obj) { return typeof obj; }; } else { Password__typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return Password__typeof(obj); } function Password__extends() { Password__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; }; return Password__extends.apply(this, arguments); } function Password__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; } function Password__classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function Password__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); } } function Password__createClass(Constructor, protoProps, staticProps) { if (protoProps) Password__defineProperties(Constructor.prototype, protoProps); if (staticProps) Password__defineProperties(Constructor, staticProps); return Constructor; } function Password__inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) Password__setPrototypeOf(subClass, superClass); } function Password__setPrototypeOf(o, p) { Password__setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return Password__setPrototypeOf(o, p); } function Password__createSuper(Derived) { var hasNativeReflectConstruct = Password__isNativeReflectConstruct(); return function _createSuperInternal() { var Super = Password__getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = Password__getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return Password__possibleConstructorReturn(this, result); }; } function Password__possibleConstructorReturn(self, call) { if (call && (Password__typeof(call) === "object" || typeof call === "function")) { return call; } return Password__assertThisInitialized(self); } function Password__assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function Password__isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } function Password__getPrototypeOf(o) { Password__getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return Password__getPrototypeOf(o); } var Password___rest = this && this.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var ActionMap = { click: 'onClick', hover: 'onMouseOver' }; var Password_Password = /*#__PURE__*/function (_React$Component) { Password__inherits(Password, _React$Component); var _super = Password__createSuper(Password); function Password() { var _this; Password__classCallCheck(this, Password); _this = _super.apply(this, arguments); _this.state = { visible: false }; _this.onVisibleChange = function () { var disabled = _this.props.disabled; if (disabled) { return; } _this.setState(function (_ref) { var visible = _ref.visible; return { visible: !visible }; }); }; _this.saveInput = function (instance) { if (instance && instance.input) { _this.input = instance.input; } }; return _this; } Password__createClass(Password, [{ key: "getIcon", value: function getIcon() { var _iconProps; var _this$props = this.props, prefixCls = _this$props.prefixCls, action = _this$props.action; var iconTrigger = ActionMap[action] || ''; var iconProps = (_iconProps = {}, Password__defineProperty(_iconProps, iconTrigger, this.onVisibleChange), Password__defineProperty(_iconProps, "className", "".concat(prefixCls, "-icon")), Password__defineProperty(_iconProps, "type", this.state.visible ? 'eye' : 'eye-invisible'), Password__defineProperty(_iconProps, "key", 'passwordIcon'), Password__defineProperty(_iconProps, "onMouseDown", function onMouseDown(e) { // Prevent focused state lost // https://github.com/ant-design/ant-design/issues/15173 e.preventDefault(); }), _iconProps); return /*#__PURE__*/react["createElement"](es_icon["default"], iconProps); } }, { key: "focus", value: function focus() { this.input.focus(); } }, { key: "blur", value: function blur() { this.input.blur(); } }, { key: "select", value: function select() { this.input.select(); } }, { key: "render", value: function render() { var _a = this.props, className = _a.className, prefixCls = _a.prefixCls, inputPrefixCls = _a.inputPrefixCls, size = _a.size, visibilityToggle = _a.visibilityToggle, restProps = Password___rest(_a, ["className", "prefixCls", "inputPrefixCls", "size", "visibilityToggle"]); var suffixIcon = visibilityToggle && this.getIcon(); var inputClassName = classnames_default()(prefixCls, className, Password__defineProperty({}, "".concat(prefixCls, "-").concat(size), !!size)); return /*#__PURE__*/react["createElement"](input_Input, Password__extends({}, Object(es["a" /* default */])(restProps, ['suffix']), { type: this.state.visible ? 'text' : 'password', size: size, className: inputClassName, prefixCls: inputPrefixCls, suffix: suffixIcon, ref: this.saveInput })); } }]); return Password; }(react["Component"]); Password_Password.defaultProps = { inputPrefixCls: 'ant-input', prefixCls: 'ant-input-password', action: 'click', visibilityToggle: true }; // CONCATENATED MODULE: ./node_modules/antd/es/input/index.js input_Input.Group = input_Group; input_Input.Search = Search_Search; input_Input.TextArea = input_TextArea; input_Input.Password = Password_Password; /* harmony default export */ var input = __webpack_exports__["default"] = (input_Input); /***/ }), /***/ "AHKm": /***/ (function(module, exports) { module.exports = "data:image/png;base64,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" /***/ }), /***/ "ALSx": /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = _default; //定义驻勤点的信息窗体 -基本版(不可与高级版弹框混用) function _default(data) { var _this = this; if (!data) { return; } var name = data.name, taskAddress = data.taskAddress, idCardNo = data.idCardNo, perNum = data.perNum, mobilePhone = data.mobilePhone, taskName = data.taskName; var content = []; content.push("
    " + taskName + "
    负责人:" + name + "
    手机号码:" + mobilePhone + "
    证件号码:" + idCardNo + "
    地址:" + taskAddress + "
    保安员数量:" + perNum + "名
    "); content.join("
    "); var info = document.createElement("div"); info.className = "content-window-card"; //可以通过下面的方式修改自定义窗体的宽高 info.style.width = "300px"; // 定义内容 var middle = document.createElement("div"); middle.className = "info-middle"; middle.innerHTML = content; info.appendChild(middle); //定义详情 var detail = document.createElement("div"); detail.className = "detail-div"; info.appendChild(detail); //定义关闭按钮 var detail = document.createElement("div"); detail.className = "close-div"; var a = document.createElement("a"); a.innerHTML = "x"; a.onclick = function () { _this.clear('setSelectIndex'); // this.state.map.clearInfoWindow(); }; detail.appendChild(a); info.appendChild(detail); //定义三个调度按钮 var top = document.createElement("div"); top.className = "info-button"; var button1 = document.createElement("span"); button1.className = "button"; button1.innerHTML = "保安人员位置详情"; button1.onclick = function () { _this.props.dispatch({ type: 'command/clearInfoWindow', payload: true }); _this.props.dispatch({ type: "command/fetchAllAttendanceList", payload: [] }); // this.state.map.clearInfoWindow(); // this.setState({ selectedAttenData: data }); _this.props.dispatch({ type: "command/setSelectedAttenData", payload: data }); }; button1.style.borderRight = "unset"; button1.style.width = "100%"; button1.style.background = "#50aaf7"; button1.style.color = "#ffffff"; top.appendChild(button1); info.appendChild(top); // 定义底部内容 var bottom = document.createElement("div"); bottom.className = "info-bottom"; bottom.style.position = "relative"; bottom.style.top = "-1px"; bottom.style.margin = "0 auto"; var sharp = document.createElement("img"); sharp.src = "https://webapi.amap.com/images/sharp.png"; bottom.appendChild(sharp); info.appendChild(bottom); return info; } /***/ }), /***/ "APD3": /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @typechecks */ var _uppercasePattern = /([A-Z])/g; /** * Hyphenates a camelcased string, for example: * * > hyphenate('backgroundColor') * < "background-color" * * For CSS style names, use `hyphenateStyleName` instead which works properly * with all vendor prefixes, including `ms`. * * @param {string} string * @return {string} */ function hyphenate(string) { return string.replace(_uppercasePattern, '-$1').toLowerCase(); } module.exports = hyphenate; /***/ }), /***/ "AS0P": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJgAAABoCAYAAAANUDk4AAAAAXNSR0IArs4c6QAAA2xJREFUeF7tnEFOHEAQA9nP5lH5LLlGymnaLolYxb1L4K5ezBz4fH9///r6j78+n8/vv799f56ftcyPC/lhC1k7GAVTMDIBP8HIdA/suV/5foIdLABHFAwM94KeW4gd7KIBN6NgXLYNsh2skWKRMXcwdrCiHQWUghVCbCLmFmIHa+qRsxQsz5Ak2MHIdA/suYOxgx0sAEcUDAz3gp5biB3sogE3o2Bctg2yHayRYpExdzB2sKIdBZSCFUJsIuYWYgdr6pGzFCzPkCTYwch0D+y5g7GDHSwARxQMDPeCnluIHeyiATejYFy2DbIdrJFikTF3MHawoh0FlIIVQmwi5hZiB2vqkbMULM+QJNjByHQP7LmDsYMdLABHFAwM94KeW4gd7KIBN6NgXLYNsh2skWKRMXcwxWxEmcA/CXzMxATIBBSMTFf2l4IpAZqAJR+N9x0+V/J9aH2XgJxQMDLdA3tuIT60HiwARxQMDLeAtoMVQmwi5g7GDtbUI2cpWJ5hlTC3EDtY1Y8YpmBxhCjADobG+w6fOxg72LsE5ISCkeke2HMLsYMdLABHFAwMt4C2gxVCbCLmDsYO1tQjZylYnmGVMLcQO1jVjximYHGEKMAOhsb7Dp87GDvYuwTkhIKR6R7Ycwuxgx0sAEcUDAy3gLaDFUJsIuYOxg7W1CNnKVieYZUwtxA7WNWPGKZgcYQowA6GxvsOnzsYO9i7BOSEgpHpHthzC7GDHSwARxQMDLeAtoMVQmwi5g7GDtbUI2cpWJ5hlTC3EDtY1Y8YpmBxhCjAf0CHxitcwXQATUDB0HiFK5gOoAn4DobG+w6f+6PFd7B3CcgJBSPTPbDnFuI72MECcETBwHALaDtYIcQmYu5g7GBNPXKWguUZVglzC7GDVf2IYQoWR4gC7GBovO/wuYOxg71LQE4oGJnugT23EDvYwQJwRMHAcAtoO1ghxCZi7mDsYE09cpaC5RlWCXMLsYNV/YhhChZHiALsYGi87/C5g7GDvUtATigYme6BPbcQO9jBAnBEwcBwC2g7WCHEJmLuYOxgTT1yloLlGVYJcwuxg1X9iGEKFkeIAuxgaLzv8LmDsYO9S0BOKBiZ7oE9txA72MECcETBwHALaDtYIcQmYu5g7GBNPXKWguUZVglzC7GDVf2IYQoWR4gC/gD5ukXFPyHZKgAAAABJRU5ErkJggg==" /***/ }), /***/ "AfHd": /***/ (function(module, exports) { module.exports = "data:image/png;base64,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" /***/ }), /***/ "AgMr": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAARCAYAAADUryzEAAAAAXNSR0IArs4c6QAAASlJREFUOE/tlL8uRFEQh7/f3Q2FvXcrhUTBW6gkwitoFFQUIrm7ibAbBEHWisRuIgodhacgEpUHUEooJAqVu6vA7h05/lVy7e0UpjiTzJzfN5MzOSM+LT9ng3GWEUHwFfvJG0Rei/PHfd24vNzhh7YlWERkksTfOaNtUG3UtSQ/tGmJQ+AohmoW7pMgLejzXDGYMmNGQcGugKeoxhDIOuoAU1DgEuhxgFczdht1lTsTf9zyQ6tIzDuAq7oW1bSeBhAUbNXp/gF/5Q1awHZU03LKMW4CJTfGa8RttKexVICinWIMKF+0khkVYKP7hZ2HAzWTQL2zlnvuYgFYkSiLccsE/RxjTABtoPFLJz6QQZxEd0y+f2dnudCGPY9RLHkfIKI45qxZ14XTvQF/7o8/7STapgAAAABJRU5ErkJggg==" /***/ }), /***/ "AiNH": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; __webpack_require__("Qbm7"); var _menu = _interopRequireDefault(__webpack_require__("aOwA")); var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); __webpack_require__("YH+2"); var _layout = _interopRequireDefault(__webpack_require__("oKZP")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); var _config = __webpack_require__("bzuE"); var _index = _interopRequireDefault(__webpack_require__("oyBu")); var _store = _interopRequireDefault(__webpack_require__("Y4FN")); function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /** * 嵌套v5页面的框架 */ var Header = _layout.default.Header, Sider = _layout.default.Sider, Content = _layout.default.Content; var V5page = exports.default = /*#__PURE__*/function (_PureComponent) { function V5page(props) { var _this; (0, _classCallCheck2.default)(this, V5page); _this = _callSuper(this, V5page, [props]); _this.state = { currentUrl: props.children && props.children.length > 0 ? props.children[0].item_url : props.menuUrl }; return _this; } (0, _inherits2.default)(V5page, _PureComponent); return (0, _createClass2.default)(V5page, [{ key: "componentDidMount", value: function componentDidMount() { document.querySelector(".ant-layout-sider").style.display = "none"; document.querySelector(".ant-layout-content").style.margin = "0px"; //隐藏顶部菜单栏 document.querySelector(".ant-layout-header").style.display = "none"; } }, { key: "componentWillReceiveProps", value: function componentWillReceiveProps(nextProps) { this.setState({ currentUrl: nextProps.children && nextProps.children.length > 0 ? nextProps.children[0].item_url : nextProps.menuUrl }); } }, { key: "render", value: function render() { var _this2 = this; var currentUrl = this.state.currentUrl; var children = this.props.children; return /*#__PURE__*/_react.default.createElement("div", { key: children }, /*#__PURE__*/_react.default.createElement(_layout.default, null, children && children.length > 0 && /*#__PURE__*/_react.default.createElement(Sider, { className: _index.default.sider }, /*#__PURE__*/_react.default.createElement(_menu.default, { defaultSelectedKeys: [children[0].id], className: "sidemenu", mode: "inline" }, children && children.map(function (item) { return /*#__PURE__*/_react.default.createElement(_menu.default.Item, { key: item.id }, /*#__PURE__*/_react.default.createElement("a", { onClick: function onClick() { _this2.setState({ currentUrl: item.item_url }); } }, item.item_menuname)); }))), currentUrl ? /*#__PURE__*/_react.default.createElement(Content, { className: _index.default.content }, /*#__PURE__*/_react.default.createElement("iframe", { src: (0, _config.getHostByPath)('v5base') + currentUrl + '&accessToken=' + _store.default.get('saas')['v5_access_token'], style: { width: "100%", height: 'calc(100vh - 54px)', border: 'none' } })) : /*#__PURE__*/_react.default.createElement(Content, { className: _index.default.content }, "\u6682\u65E0\u5185\u5BB9..."))); } }]); }(_react.PureComponent); /***/ }), /***/ "Ap9u": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAARCAYAAADUryzEAAAAAXNSR0IArs4c6QAAAcFJREFUOE99kztrFGEUhp93IqK4GQWxDgS8gYoiVmonFrHQMmhlZ7WZXTuLsEGslDjrBuysBLFJIaRRrLQxjRBEsFDJD1AykwQUdubINzHjN7M7Tncu33Mu7xnR8B3q2rk847QFaGLI2sZAH8elqu5ste1UEPAMuFCLreYZt7cG+uz7K4Cias474EBDY2lmXN7ua203/g/QsyDcwNGPN43l/AafNmPOgMzZJSDs2gw5K97jbcFThMy443elgCvJot5WAR1bwJgvWwuYTRb10tlhZLeA5x58Po11vw7oY7RLwJDpZEnfnT3ZtWPK+eIB4jRWpz5Cm5y+l9RLYy0UgDl7IHGvjBlzaV9PKoDJu3ZCWbFEX5lVYAI47z027eVo8lBfK4Bi1o6tYMz8TwXgVRrr+qiMwMGOTZvhqh5uugPt4WzyaGc3Ix0U80Z2EXgj2F+DDIEbaSxf6sq8ZX4Y2TXgheP9PZ7fBje3Yi3XOxv5F3YTWpGdDIxlxD6M2bSvD+PGagS45CM9a2U/CH4OlDYtdgQQRub0vWrGlFx1d//GL4l14HUaqzy2sUsslBCXyJky7exAxiYB6zLeJ4/1ze/mD/cWmhLEu/SfAAAAAElFTkSuQmCC" /***/ }), /***/ "AsJy": /***/ (function(module, exports) { module.exports = "data:image/png;base64,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" /***/ }), /***/ "Aw/o": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAARCAYAAADUryzEAAAAAXNSR0IArs4c6QAAAWBJREFUOE+lk0FLAmEQhp/RVLRWjegkdZKinxDUHwi6dOratcgUvEXhIToE4aZ1iaBj3YP6Af2JILxV5/pEK1MndrHS3FykPS3zzTy8886M8M9PvuqtnC46/9Wi3A7D/AbEt7TmFJojGfUErOtYIsKSKjVjcw2iTt4PIKtuwNjyHXNBmxpJBMkr5IGkGxP2TFF2fAFWRhckwBkw+0tVxdiS/htQ0ED8mW1gFxjxaKltkkQpSKO/hUciVooLgZVBZjabpOrH8tQHEOFclTXfSbSZMSW57wMAdSDmB9Agc9VDufMCXAHLfgBpkX4pS6UPEIyQbL1zA8wP9CBMqn7g4YG7BzmNJuBkgBdqksQoyNvARYrndBWlBEx2q1F4qNoy5btIToK1oROE2BfcyYQ6oLKxJdMDsLLacI/JlrBX7+MZnW4GcBS1qq+UOJWPXgWOXOcWinLpN4Hu997DGaayk/sJSSmJEqumzMgAAAAASUVORK5CYII=" /***/ }), /***/ "BBpN": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAARCAYAAADUryzEAAAAAXNSR0IArs4c6QAAAcNJREFUOE+dkz9oU2EUxc/5GmhjA1Zo6+agSHEQaaeOughCq7i0YsVNJAkdGumUl9fb95KpNgEheXQsWLEuYjsIDoVuTop0kCI6uNUWzNCQDsm75UXbJpqkf+743XN/nHvvd4kWISKmavrnVcmQbiVExG8mZStActabIPVlkFflo8xMdOk0AFqO9wXQ63+KuJG2ozcC1r+Qpg7s2fyoT67Ui1X1bmYmvtoWoKq0MvlLVPMaiuEGMfFR6T9IJ+M/SR46oeV6I4Q+VmAAiqsAwq3m8ve9DOIbgU2ajkVaTqEI4PwxRa3SRVpuIbA7fiYAsczJyRedPX2htwrcOQ2EwPviduV+bQsi0lUx/e8A3D4h5EPI/3VPRPYO1zg1lQ13X+j6jGCY7WOz9HtvMJdLlGs/pF6bdArfCVxuV6/Aj4wdu3KgOXKQfRPu3t3ZBWCOceCXIr2RXGKs0UHK8QYV+ukkMyA45NrRoN2jFlJO4aECdQejWwSldkxQAXixzvaEa8deNQAs17upqmsESgSyHb7OicSDliCSj1QNp33oM4DnDHDLtWPr/w3RcvPXytXQ9rw83WnWijxf6K2UTV869eTrQX4fD4GcLEfzbsEAAAAASUVORK5CYII=" /***/ }), /***/ "BDM4": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAARCAYAAADUryzEAAAAAXNSR0IArs4c6QAAAgRJREFUOE+Vk01IVGEUhp/3Tgo6zh0jAiEKicJFCG3alLWJwkURUdImF0WLfsi5I7pp5aqNojNG0SJq4SpKQmohSZuyNm0CaSFFSD8kROTMdSy0+U7cwRlSBnHO8pz3PN85H+cV1SJtDUlHh4NdUdmDzzmPaUb0e71c/yfi/dbirTAgoxvRuEZsLJkYc3UMFAY1X65VAE0pO+KJxwa+4L4c48vGbCSsF23mccbgoiDvjLOLWb2MaiVAc2D7HUwDczhO50f1odpmfo/txeMJ0OpBx0JG70SXxfwdzACNrsiBxVv6UfVfVpNN1227F+MtsJT/Rrv8XjuPY8yMk2FWzzZqLtcSKTsh8RSPbvmBTQD78hnt2UxzWeMH9hF4r0RgXz0xmRvRpVoAybTdc0ZnNMEfg+Ewoxu1ABKB3RT0yk/ZdxMTYUaXawTclXEqmmDKjJYwq/aaACmbkZhXMrArBncMOsKMXm8GkgjskGBacFWkrcE3Zg1+hVs4yJAKG0L6LJ74yxvB1rxoK11isteOmmNS4pVbpiu8rZ/VIIlrts2r55EZh+XRmRvWi4oXkik758QDwaJgiCLjuVE+lR7oYTexkhf6DJo840Iuq4cVL5Rfi6etPWYMAscjnxisrIrqAAOeF0V/YUTR6ZdijZ3LyebAWovGMYmdUc6MLzExtZDR3PrV/gE9jsFCYXq5kQAAAABJRU5ErkJggg==" /***/ }), /***/ "BDbo": /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = _default; var _maps = __webpack_require__("YWwU"); /** * 初始化多个页面的地图 * @param {*} satelliteLayer 解决地球图层到卫星图层的过渡问题 * @returns */ function _default(satelliteLayer) { var _window = window, AMap = _window.AMap, Loca = _window.Loca, BMapGL = _window.BMapGL; //驻勤点图层 var normalMap = new AMap.Map("map_container", { resizeEnable: true, rotateEnable: true, pitchEnable: true, zoom: _maps._DEFAULT_MAP_ZOOM, viewMode: "2D", //开启2D视图 buildingAnimation: true, //楼块出现是否带动画 expandZoomRange: true, zooms: _maps._DEFAULT_MAP_ZOOMS }); //人员图层 var personMap = new AMap.Map("map_container3", { resizeEnable: true, rotateEnable: true, pitchEnable: true, zoom: _maps._DEFAULT_MAP_ZOOM, viewMode: "2D", //开启2D视图 buildingAnimation: true, //楼块出现是否带动画 expandZoomRange: true, zooms: _maps._DEFAULT_MAP_ZOOMS }); //防空指挥一张图图层 var locaMap = new AMap.Map("map_container2", { resizeEnable: true, rotateEnable: true, pitchEnable: true, zoom: _maps._DEFAULT_MAP_ZOOM, viewMode: "3D", //开启3D视图 buildingAnimation: true, //楼块出现是否带动画 expandZoomRange: true, zooms: _maps._DEFAULT_MAP_ZOOMS, // pitch: 50, pitch: 0, rotation: 0, showBuildingBlock: false, showIndoorMap: false, layers: [ // new AMap.TileLayer.Satellite(), new AMap.TileLayer.RoadNet(), satelliteLayer] }); //警保联动图层 var policeMap = new AMap.Map("map_container4", { // features: ["bg", "road"], // mapStyle: "amap://styles/midnight", // zoom: 5, // viewMode: "2D", // skyColor: "#33216a", resizeEnable: true, rotateEnable: true, pitchEnable: true, zoom: _maps._DEFAULT_MAP_ZOOM, viewMode: "2D", //开启2D视图 buildingAnimation: true, //楼块出现是否带动画 expandZoomRange: true, zooms: _maps._DEFAULT_MAP_ZOOMS }); //南宁武装押运管控图层 var nanNingMap = new AMap.Map("map_container5", { resizeEnable: true, rotateEnable: true, pitchEnable: true, zoom: _maps._DEFAULT_MAP_ZOOM, viewMode: "2D", //开启2D视图 buildingAnimation: true, //楼块出现是否带动画 expandZoomRange: true, zooms: _maps._DEFAULT_MAP_ZOOMS }); // 地球图层 var earthMap = new BMapGL.Map("map_container6"); earthMap.centerAndZoom(new BMapGL.Point(_maps._DEFAULT_MAP_CENTER_POINT.LATITUDE, _maps._DEFAULT_MAP_CENTER_POINT.LONGITUDE), 3.3677066378158855); // 初始化地图,设置中心点坐标和地图级别 earthMap.enableScrollWheelZoom(true); //开启鼠标滚轮缩放 earthMap.setMapType(BMAP_EARTH_MAP); if (AMap.ControlBar) { normalMap.addControl(new AMap.ControlBar({ showZoomBar: false, showControlButton: true })); personMap.addControl(new AMap.ControlBar({ showZoomBar: false, showControlButton: true })); locaMap.addControl(new AMap.ControlBar({ showZoomBar: false, showControlButton: true })); policeMap.addControl(new AMap.ControlBar({ showZoomBar: false, showControlButton: true })); nanNingMap.addControl(new AMap.ControlBar({ showZoomBar: false, showControlButton: true })); } var infoWindow = new AMap.InfoWindow({ isCustom: true, //使用自定义窗体 offset: new AMap.Pixel(16, -45) }); // normalMap.on("zoomchange", (info) => { // let zoom = normalMap.getZoom(); //获取当前地图级别 // if (zoom > 6) { // for (let i = 0; i < this.state.massDataTotalPage; i++) { // let index = i + 1; // this.state['mass' + index].setStyle({ // url: 'https://a.amap.com/jsapi_demos/static/images/mass1.png', // anchor: new AMap.Pixel(3, 3), // size: new AMap.Size(5, 5) // }); // } // } else { // for (let i = 0; i < this.state.massDataTotalPage; i++) { // let index = i + 1; // this.state['mass' + index].setStyle({ // url: 'https://a.amap.com/jsapi_demos/static/images/mass1.png', // anchor: new AMap.Pixel(3, 3), // size: new AMap.Size(1.5, 1.5) // }); // } // } // }); return { normalMap: normalMap, locaMap: locaMap, personMap: personMap, policeMap: policeMap, nanNingMap: nanNingMap, earthMap: earthMap, infoWindow: infoWindow }; } /***/ }), /***/ "BGAA": /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 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 _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; }; }(); exports.default = connect; var _react = __webpack_require__("GiK3"); var _react2 = _interopRequireDefault(_react); var _shallowequal = __webpack_require__("Ngpj"); var _shallowequal2 = _interopRequireDefault(_shallowequal); var _hoistNonReactStatics = __webpack_require__("BGz1"); var _hoistNonReactStatics2 = _interopRequireDefault(_hoistNonReactStatics); var _reactLifecyclesCompat = __webpack_require__("R8mX"); var _PropTypes = __webpack_require__("0ymm"); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } function getDisplayName(WrappedComponent) { return WrappedComponent.displayName || WrappedComponent.name || 'Component'; } function isStateless(Component) { return !Component.prototype.render; } var defaultMapStateToProps = function defaultMapStateToProps() { return {}; }; function connect(mapStateToProps) { var shouldSubscribe = !!mapStateToProps; var finnalMapStateToProps = mapStateToProps || defaultMapStateToProps; return function wrapWithConnect(WrappedComponent) { var Connect = function (_Component) { _inherits(Connect, _Component); _createClass(Connect, null, [{ key: 'getDerivedStateFromProps', value: function getDerivedStateFromProps(props, prevState) { // using ownProps if (mapStateToProps && mapStateToProps.length === 2 && props !== prevState.props) { return { subscribed: finnalMapStateToProps(prevState.store.getState(), props), props: props }; } return { props: props }; } }]); function Connect(props, context) { _classCallCheck(this, Connect); var _this = _possibleConstructorReturn(this, (Connect.__proto__ || Object.getPrototypeOf(Connect)).call(this, props, context)); _this.handleChange = function () { if (!_this.unsubscribe) { return; } var nextState = finnalMapStateToProps(_this.store.getState(), _this.props); _this.setState({ subscribed: nextState }); }; _this.store = context.miniStore; _this.state = { subscribed: finnalMapStateToProps(_this.store.getState(), props), store: _this.store, props: props }; return _this; } _createClass(Connect, [{ key: 'componentDidMount', value: function componentDidMount() { this.trySubscribe(); } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { this.tryUnsubscribe(); } }, { key: 'shouldComponentUpdate', value: function shouldComponentUpdate(nextProps, nextState) { return !(0, _shallowequal2.default)(this.props, nextProps) || !(0, _shallowequal2.default)(this.state.subscribed, nextState.subscribed); } }, { key: 'trySubscribe', value: function trySubscribe() { if (shouldSubscribe) { this.unsubscribe = this.store.subscribe(this.handleChange); this.handleChange(); } } }, { key: 'tryUnsubscribe', value: function tryUnsubscribe() { if (this.unsubscribe) { this.unsubscribe(); this.unsubscribe = null; } } }, { key: 'getWrappedInstance', value: function getWrappedInstance() { return this.wrappedInstance; } }, { key: 'render', value: function render() { var _this2 = this; var props = _extends({}, this.props, this.state.subscribed, { store: this.store }); if (!isStateless(WrappedComponent)) { props = _extends({}, props, { ref: function ref(c) { return _this2.wrappedInstance = c; } }); } return _react2.default.createElement(WrappedComponent, props); } }]); return Connect; }(_react.Component); Connect.displayName = 'Connect(' + getDisplayName(WrappedComponent) + ')'; Connect.contextTypes = { miniStore: _PropTypes.storeShape.isRequired }; (0, _reactLifecyclesCompat.polyfill)(Connect); return (0, _hoistNonReactStatics2.default)(Connect, WrappedComponent); }; } /***/ }), /***/ "BGz1": /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Copyright 2015, Yahoo! Inc. * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. */ var REACT_STATICS = { childContextTypes: true, contextTypes: true, defaultProps: true, displayName: true, getDefaultProps: true, getDerivedStateFromProps: true, mixins: true, propTypes: true, type: true }; var KNOWN_STATICS = { name: true, length: true, prototype: true, caller: true, callee: true, arguments: true, arity: true }; var defineProperty = Object.defineProperty; var getOwnPropertyNames = Object.getOwnPropertyNames; var getOwnPropertySymbols = Object.getOwnPropertySymbols; var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; var getPrototypeOf = Object.getPrototypeOf; var objectPrototype = getPrototypeOf && getPrototypeOf(Object); function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) { if (typeof sourceComponent !== 'string') { // don't hoist over string (html) components if (objectPrototype) { var inheritedComponent = getPrototypeOf(sourceComponent); if (inheritedComponent && inheritedComponent !== objectPrototype) { hoistNonReactStatics(targetComponent, inheritedComponent, blacklist); } } var keys = getOwnPropertyNames(sourceComponent); if (getOwnPropertySymbols) { keys = keys.concat(getOwnPropertySymbols(sourceComponent)); } for (var i = 0; i < keys.length; ++i) { var key = keys[i]; if (!REACT_STATICS[key] && !KNOWN_STATICS[key] && (!blacklist || !blacklist[key])) { var descriptor = getOwnPropertyDescriptor(sourceComponent, key); try { // Avoid failures from read-only properties defineProperty(targetComponent, key, descriptor); } catch (e) {} } } return targetComponent; } return targetComponent; } module.exports = hoistNonReactStatics; /***/ }), /***/ "BJ3c": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAAAgCAYAAAEAiJpfAAAAAXNSR0IArs4c6QAAA5pJREFUWAm1l09sTUEUxvtPVKIlqUqbIqQhQSQkrESsbLC2sO3GhoWtRJsmmgiJWBESsfGnCwt2XZDYlJCSEISFBV0gqLQNmlaf33d7z3TuvTP3Pk2c5Lw55/u+c2bevHl33mtoSK1Wqz23uIGkUwljzYEGgL3IEEqwnXrJqDMJ5Em814GSywQ0OTQfmIJxQpzlipMqgPUeMZMKPjKeEO5MBLZCwEK4uNxGU4mw2MZGzGI3oiuAtp7dqapbI8IdrsoPIL7hjw0j3tjIi7pokdNGaLQ1NBHMe+QRE1H41OLC24NMTIIWpyIQ6ueK459FXqmcBr14clzSfF2+K/mAuFJDNIkne5YXgo/g2/K4Zh/CZQMiGbWamH2wBgh+SGS5G8GmROSsP5cr3eyKCDJnQaxHzvCZteYwR9sHK6Bs55erQSr+5KoDQebzDfBfYyvxtU2Inkgo84k0XhPAEmihInnNbElBj+Q+3logygAKzvh8Mk+ttscw8pX4TsuDI4J5/ICRxBP4Li+fIz9seXBE0IWPhkjwNnw2xOmEZg6ORGA9+ENcppN5KlQM3pPgUmE/TUT8KkHCL8lbgzqe0tetTjP3KWF8mZJlw1rIVfgy18ACwI5A5fkANmc1hRHx3XyBRHlMeb7YnTa4Scg2T7Aljd95mIXtfKemLHEjTXRGzN47ggDwgRHp2OXzLob0m1jNRYJ2S7wx06TsUaAJ7uDf3UyRoKqJ9qU5Uutgf2N187jcKcJBNxvrHlS61wofWbguiI7TLLnlg2wVyNz6fpnZ9VxVFuWj+8oM59JZ7kWq/e3zYyen/lLa46YDlxLQ5FraSA+HqnshMwV6PZ1lIxliqQmNtuKxd6zbLflhFuoPtz2EBzHEz3DZML4hJALXA/os/guvslkEl3H3G8fvCa6n4lX8D+5OfKIB2IuP4bJbVki8Cf8icIk2TZ1/Zdm5ewt+0OYpHRH241Wmdz9YJYK/UjpZjKSwr47m42h0s9+uQyvJ6dh8UZwibV2ZJd8EBM347zKhxxWvlugKUoLi0K1hPQetHqAF7/R8H7EOYcwyN4z10Rj7Wsae92+okZuN8XgeUsLMRxluGBEZM3dDRLMI07RsR/x3e0xVALpj67HojizO7kV0rHcheiY8qmcFqSa6kH96bHtrVfg69Y4cvqRUh201lfvxyh8NuRmKf9xygkB6iPmSf/xw+ukwyhn7nOggLuBlJx36v9mwLfYvO3ss6OBO/74AAAAASUVORK5CYII=" /***/ }), /***/ "BJfm": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); // EXTERNAL MODULE: ./node_modules/react/index.js var react = __webpack_require__("GiK3"); var react_default = /*#__PURE__*/__webpack_require__.n(react); // EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/defineProperty.js var defineProperty = __webpack_require__("bOdI"); var defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty); // EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/extends.js var helpers_extends = __webpack_require__("Dd8w"); var extends_default = /*#__PURE__*/__webpack_require__.n(helpers_extends); // EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/classCallCheck.js var classCallCheck = __webpack_require__("Zrlr"); var classCallCheck_default = /*#__PURE__*/__webpack_require__.n(classCallCheck); // EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/createClass.js var createClass = __webpack_require__("wxAW"); var createClass_default = /*#__PURE__*/__webpack_require__.n(createClass); // EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/possibleConstructorReturn.js var possibleConstructorReturn = __webpack_require__("zwoO"); var possibleConstructorReturn_default = /*#__PURE__*/__webpack_require__.n(possibleConstructorReturn); // EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/inherits.js var inherits = __webpack_require__("Pf15"); var inherits_default = /*#__PURE__*/__webpack_require__.n(inherits); // EXTERNAL MODULE: ./node_modules/classnames/index.js var classnames = __webpack_require__("HW6M"); var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); // EXTERNAL MODULE: ./node_modules/prop-types/index.js var prop_types = __webpack_require__("KSGD"); var prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types); // CONCATENATED MODULE: ./node_modules/rc-pagination/es/Pager.js var Pager_Pager = function Pager(props) { var _classNames; var prefixCls = props.rootPrefixCls + '-item'; var cls = classnames_default()(prefixCls, prefixCls + '-' + props.page, (_classNames = {}, defineProperty_default()(_classNames, prefixCls + '-active', props.active), defineProperty_default()(_classNames, props.className, !!props.className), defineProperty_default()(_classNames, prefixCls + '-disabled', !props.page), _classNames)); var handleClick = function handleClick() { props.onClick(props.page); }; var handleKeyPress = function handleKeyPress(e) { props.onKeyPress(e, props.onClick, props.page); }; return react_default.a.createElement( 'li', { title: props.showTitle ? props.page : null, className: cls, onClick: handleClick, onKeyPress: handleKeyPress, tabIndex: '0' }, props.itemRender(props.page, 'page', react_default.a.createElement( 'a', null, props.page )) ); }; Pager_Pager.propTypes = { page: prop_types_default.a.number, active: prop_types_default.a.bool, last: prop_types_default.a.bool, locale: prop_types_default.a.object, className: prop_types_default.a.string, showTitle: prop_types_default.a.bool, rootPrefixCls: prop_types_default.a.string, onClick: prop_types_default.a.func, onKeyPress: prop_types_default.a.func, itemRender: prop_types_default.a.func }; /* harmony default export */ var es_Pager = (Pager_Pager); // CONCATENATED MODULE: ./node_modules/rc-pagination/es/KeyCode.js /* harmony default export */ var KeyCode = ({ ZERO: 48, NINE: 57, NUMPAD_ZERO: 96, NUMPAD_NINE: 105, BACKSPACE: 8, DELETE: 46, ENTER: 13, ARROW_UP: 38, ARROW_DOWN: 40 }); // CONCATENATED MODULE: ./node_modules/rc-pagination/es/Options.js var Options_Options = function (_React$Component) { inherits_default()(Options, _React$Component); function Options() { var _ref; var _temp, _this, _ret; classCallCheck_default()(this, Options); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _ret = (_temp = (_this = possibleConstructorReturn_default()(this, (_ref = Options.__proto__ || Object.getPrototypeOf(Options)).call.apply(_ref, [this].concat(args))), _this), _this.state = { goInputText: '' }, _this.buildOptionText = function (value) { return value + ' ' + _this.props.locale.items_per_page; }, _this.changeSize = function (value) { _this.props.changeSize(Number(value)); }, _this.handleChange = function (e) { _this.setState({ goInputText: e.target.value }); }, _this.handleBlur = function (e) { var _this$props = _this.props, goButton = _this$props.goButton, quickGo = _this$props.quickGo, rootPrefixCls = _this$props.rootPrefixCls; if (goButton) { return; } if (e.relatedTarget && (e.relatedTarget.className.indexOf(rootPrefixCls + '-prev') >= 0 || e.relatedTarget.className.indexOf(rootPrefixCls + '-next') >= 0)) { return; } quickGo(_this.getValidValue()); }, _this.go = function (e) { var goInputText = _this.state.goInputText; if (goInputText === '') { return; } if (e.keyCode === KeyCode.ENTER || e.type === 'click') { _this.setState({ goInputText: '' }); _this.props.quickGo(_this.getValidValue()); } }, _temp), possibleConstructorReturn_default()(_this, _ret); } createClass_default()(Options, [{ key: 'getValidValue', value: function getValidValue() { var _state = this.state, goInputText = _state.goInputText, current = _state.current; return !goInputText || isNaN(goInputText) ? current : Number(goInputText); } }, { key: 'render', value: function render() { var _this2 = this; var _props = this.props, pageSize = _props.pageSize, pageSizeOptions = _props.pageSizeOptions, locale = _props.locale, rootPrefixCls = _props.rootPrefixCls, changeSize = _props.changeSize, quickGo = _props.quickGo, goButton = _props.goButton, selectComponentClass = _props.selectComponentClass, buildOptionText = _props.buildOptionText, selectPrefixCls = _props.selectPrefixCls, disabled = _props.disabled; var goInputText = this.state.goInputText; var prefixCls = rootPrefixCls + '-options'; var Select = selectComponentClass; var changeSelect = null; var goInput = null; var gotoButton = null; if (!changeSize && !quickGo) { return null; } if (changeSize && Select) { var options = pageSizeOptions.map(function (opt, i) { return react_default.a.createElement( Select.Option, { key: i, value: opt }, (buildOptionText || _this2.buildOptionText)(opt) ); }); changeSelect = react_default.a.createElement( Select, { disabled: disabled, prefixCls: selectPrefixCls, showSearch: false, className: prefixCls + '-size-changer', optionLabelProp: 'children', dropdownMatchSelectWidth: false, value: (pageSize || pageSizeOptions[0]).toString(), onChange: this.changeSize, getPopupContainer: function getPopupContainer(triggerNode) { return triggerNode.parentNode; } }, options ); } if (quickGo) { if (goButton) { gotoButton = typeof goButton === 'boolean' ? react_default.a.createElement( 'button', { type: 'button', onClick: this.go, onKeyUp: this.go, disabled: disabled }, locale.jump_to_confirm ) : react_default.a.createElement( 'span', { onClick: this.go, onKeyUp: this.go }, goButton ); } goInput = react_default.a.createElement( 'div', { className: prefixCls + '-quick-jumper' }, locale.jump_to, react_default.a.createElement('input', { disabled: disabled, type: 'text', value: goInputText, onChange: this.handleChange, onKeyUp: this.go, onBlur: this.handleBlur }), locale.page, gotoButton ); } return react_default.a.createElement( 'li', { className: '' + prefixCls }, changeSelect, goInput ); } }]); return Options; }(react_default.a.Component); Options_Options.propTypes = { disabled: prop_types_default.a.bool, changeSize: prop_types_default.a.func, quickGo: prop_types_default.a.func, selectComponentClass: prop_types_default.a.func, current: prop_types_default.a.number, pageSizeOptions: prop_types_default.a.arrayOf(prop_types_default.a.string), pageSize: prop_types_default.a.number, buildOptionText: prop_types_default.a.func, locale: prop_types_default.a.object, rootPrefixCls: prop_types_default.a.string, selectPrefixCls: prop_types_default.a.string, goButton: prop_types_default.a.oneOfType([prop_types_default.a.bool, prop_types_default.a.node]) }; Options_Options.defaultProps = { pageSizeOptions: ['10', '20', '30', '40'] }; /* harmony default export */ var es_Options = (Options_Options); // CONCATENATED MODULE: ./node_modules/rc-pagination/es/locale/zh_CN.js /* harmony default export */ var zh_CN = ({ // Options.jsx items_per_page: '条/页', jump_to: '跳至', jump_to_confirm: '确定', page: '页', // Pagination.jsx prev_page: '上一页', next_page: '下一页', prev_5: '向前 5 页', next_5: '向后 5 页', prev_3: '向前 3 页', next_3: '向后 3 页' }); // EXTERNAL MODULE: ./node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js var react_lifecycles_compat_es = __webpack_require__("R8mX"); // CONCATENATED MODULE: ./node_modules/rc-pagination/es/Pagination.js function noop() {} function isInteger(value) { return typeof value === 'number' && isFinite(value) && Math.floor(value) === value; } function defaultItemRender(page, type, element) { return element; } function calculatePage(p, state, props) { var pageSize = p; if (typeof pageSize === 'undefined') { pageSize = state.pageSize; } return Math.floor((props.total - 1) / pageSize) + 1; } var Pagination_Pagination = function (_React$Component) { inherits_default()(Pagination, _React$Component); function Pagination(props) { classCallCheck_default()(this, Pagination); var _this = possibleConstructorReturn_default()(this, (Pagination.__proto__ || Object.getPrototypeOf(Pagination)).call(this, props)); Pagination__initialiseProps.call(_this); var hasOnChange = props.onChange !== noop; var hasCurrent = 'current' in props; if (hasCurrent && !hasOnChange) { console.warn('Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.'); // eslint-disable-line } var current = props.defaultCurrent; if ('current' in props) { current = props.current; } var pageSize = props.defaultPageSize; if ('pageSize' in props) { pageSize = props.pageSize; } current = Math.min(current, calculatePage(pageSize, undefined, props)); _this.state = { current: current, currentInputValue: current, pageSize: pageSize }; return _this; } createClass_default()(Pagination, [{ key: 'componentDidUpdate', value: function componentDidUpdate(prevProps, prevState) { // When current page change, fix focused style of prev item // A hacky solution of https://github.com/ant-design/ant-design/issues/8948 var prefixCls = this.props.prefixCls; if (prevState.current !== this.state.current && this.paginationNode) { var lastCurrentNode = this.paginationNode.querySelector('.' + prefixCls + '-item-' + prevState.current); if (lastCurrentNode && document.activeElement === lastCurrentNode) { lastCurrentNode.blur(); } } } }, { key: 'getValidValue', value: function getValidValue(e) { var inputValue = e.target.value; var allPages = calculatePage(undefined, this.state, this.props); var currentInputValue = this.state.currentInputValue; var value = void 0; if (inputValue === '') { value = inputValue; } else if (isNaN(Number(inputValue))) { value = currentInputValue; } else if (inputValue >= allPages) { value = allPages; } else { value = Number(inputValue); } return value; } }, { key: 'render', value: function render() { var _props = this.props, prefixCls = _props.prefixCls, className = _props.className, disabled = _props.disabled; // When hideOnSinglePage is true and there is only 1 page, hide the pager if (this.props.hideOnSinglePage === true && this.props.total <= this.state.pageSize) { return null; } var props = this.props; var locale = props.locale; var allPages = calculatePage(undefined, this.state, this.props); var pagerList = []; var jumpPrev = null; var jumpNext = null; var firstPager = null; var lastPager = null; var gotoButton = null; var goButton = props.showQuickJumper && props.showQuickJumper.goButton; var pageBufferSize = props.showLessItems ? 1 : 2; var _state = this.state, current = _state.current, pageSize = _state.pageSize; var prevPage = current - 1 > 0 ? current - 1 : 0; var nextPage = current + 1 < allPages ? current + 1 : allPages; var dataOrAriaAttributeProps = Object.keys(props).reduce(function (prev, key) { if (key.substr(0, 5) === 'data-' || key.substr(0, 5) === 'aria-' || key === 'role') { prev[key] = props[key]; } return prev; }, {}); if (props.simple) { if (goButton) { if (typeof goButton === 'boolean') { gotoButton = react_default.a.createElement( 'button', { type: 'button', onClick: this.handleGoTO, onKeyUp: this.handleGoTO }, locale.jump_to_confirm ); } else { gotoButton = react_default.a.createElement( 'span', { onClick: this.handleGoTO, onKeyUp: this.handleGoTO }, goButton ); } gotoButton = react_default.a.createElement( 'li', { title: props.showTitle ? '' + locale.jump_to + this.state.current + '/' + allPages : null, className: prefixCls + '-simple-pager' }, gotoButton ); } return react_default.a.createElement( 'ul', extends_default()({ className: prefixCls + ' ' + prefixCls + '-simple ' + props.className, style: props.style, ref: this.savePaginationNode }, dataOrAriaAttributeProps), react_default.a.createElement( 'li', { title: props.showTitle ? locale.prev_page : null, onClick: this.prev, tabIndex: this.hasPrev() ? 0 : null, onKeyPress: this.runIfEnterPrev, className: (this.hasPrev() ? '' : prefixCls + '-disabled') + ' ' + prefixCls + '-prev', 'aria-disabled': !this.hasPrev() }, props.itemRender(prevPage, 'prev', this.getItemIcon(props.prevIcon)) ), react_default.a.createElement( 'li', { title: props.showTitle ? this.state.current + '/' + allPages : null, className: prefixCls + '-simple-pager' }, react_default.a.createElement('input', { type: 'text', value: this.state.currentInputValue, onKeyDown: this.handleKeyDown, onKeyUp: this.handleKeyUp, onChange: this.handleKeyUp, size: '3' }), react_default.a.createElement( 'span', { className: prefixCls + '-slash' }, '/' ), allPages ), react_default.a.createElement( 'li', { title: props.showTitle ? locale.next_page : null, onClick: this.next, tabIndex: this.hasPrev() ? 0 : null, onKeyPress: this.runIfEnterNext, className: (this.hasNext() ? '' : prefixCls + '-disabled') + ' ' + prefixCls + '-next', 'aria-disabled': !this.hasNext() }, props.itemRender(nextPage, 'next', this.getItemIcon(props.nextIcon)) ), gotoButton ); } if (allPages <= 5 + pageBufferSize * 2) { var pagerProps = { locale: locale, rootPrefixCls: prefixCls, onClick: this.handleChange, onKeyPress: this.runIfEnter, showTitle: props.showTitle, itemRender: props.itemRender }; if (!allPages) { pagerList.push(react_default.a.createElement(es_Pager, extends_default()({}, pagerProps, { key: 'noPager', page: allPages, className: prefixCls + '-disabled' }))); } for (var i = 1; i <= allPages; i++) { var active = this.state.current === i; pagerList.push(react_default.a.createElement(es_Pager, extends_default()({}, pagerProps, { key: i, page: i, active: active }))); } } else { var prevItemTitle = props.showLessItems ? locale.prev_3 : locale.prev_5; var nextItemTitle = props.showLessItems ? locale.next_3 : locale.next_5; if (props.showPrevNextJumpers) { var jumpPrevClassString = prefixCls + '-jump-prev'; if (props.jumpPrevIcon) { jumpPrevClassString += ' ' + prefixCls + '-jump-prev-custom-icon'; } jumpPrev = react_default.a.createElement( 'li', { title: props.showTitle ? prevItemTitle : null, key: 'prev', onClick: this.jumpPrev, tabIndex: '0', onKeyPress: this.runIfEnterJumpPrev, className: jumpPrevClassString }, props.itemRender(this.getJumpPrevPage(), 'jump-prev', this.getItemIcon(props.jumpPrevIcon)) ); var jumpNextClassString = prefixCls + '-jump-next'; if (props.jumpNextIcon) { jumpNextClassString += ' ' + prefixCls + '-jump-next-custom-icon'; } jumpNext = react_default.a.createElement( 'li', { title: props.showTitle ? nextItemTitle : null, key: 'next', tabIndex: '0', onClick: this.jumpNext, onKeyPress: this.runIfEnterJumpNext, className: jumpNextClassString }, props.itemRender(this.getJumpNextPage(), 'jump-next', this.getItemIcon(props.jumpNextIcon)) ); } lastPager = react_default.a.createElement(es_Pager, { locale: props.locale, last: true, rootPrefixCls: prefixCls, onClick: this.handleChange, onKeyPress: this.runIfEnter, key: allPages, page: allPages, active: false, showTitle: props.showTitle, itemRender: props.itemRender }); firstPager = react_default.a.createElement(es_Pager, { locale: props.locale, rootPrefixCls: prefixCls, onClick: this.handleChange, onKeyPress: this.runIfEnter, key: 1, page: 1, active: false, showTitle: props.showTitle, itemRender: props.itemRender }); var left = Math.max(1, current - pageBufferSize); var right = Math.min(current + pageBufferSize, allPages); if (current - 1 <= pageBufferSize) { right = 1 + pageBufferSize * 2; } if (allPages - current <= pageBufferSize) { left = allPages - pageBufferSize * 2; } for (var _i = left; _i <= right; _i++) { var _active = current === _i; pagerList.push(react_default.a.createElement(es_Pager, { locale: props.locale, rootPrefixCls: prefixCls, onClick: this.handleChange, onKeyPress: this.runIfEnter, key: _i, page: _i, active: _active, showTitle: props.showTitle, itemRender: props.itemRender })); } if (current - 1 >= pageBufferSize * 2 && current !== 1 + 2) { pagerList[0] = react_default.a.cloneElement(pagerList[0], { className: prefixCls + '-item-after-jump-prev' }); pagerList.unshift(jumpPrev); } if (allPages - current >= pageBufferSize * 2 && current !== allPages - 2) { pagerList[pagerList.length - 1] = react_default.a.cloneElement(pagerList[pagerList.length - 1], { className: prefixCls + '-item-before-jump-next' }); pagerList.push(jumpNext); } if (left !== 1) { pagerList.unshift(firstPager); } if (right !== allPages) { pagerList.push(lastPager); } } var totalText = null; if (props.showTotal) { totalText = react_default.a.createElement( 'li', { className: prefixCls + '-total-text' }, props.showTotal(props.total, [props.total === 0 ? 0 : (current - 1) * pageSize + 1, current * pageSize > props.total ? props.total : current * pageSize]) ); } var prevDisabled = !this.hasPrev() || !allPages; var nextDisabled = !this.hasNext() || !allPages; return react_default.a.createElement( 'ul', extends_default()({ className: classnames_default()(prefixCls, className, defineProperty_default()({}, prefixCls + '-disabled', disabled)), style: props.style, unselectable: 'unselectable', ref: this.savePaginationNode }, dataOrAriaAttributeProps), totalText, react_default.a.createElement( 'li', { title: props.showTitle ? locale.prev_page : null, onClick: this.prev, tabIndex: prevDisabled ? null : 0, onKeyPress: this.runIfEnterPrev, className: (!prevDisabled ? '' : prefixCls + '-disabled') + ' ' + prefixCls + '-prev', 'aria-disabled': prevDisabled }, props.itemRender(prevPage, 'prev', this.getItemIcon(props.prevIcon)) ), pagerList, react_default.a.createElement( 'li', { title: props.showTitle ? locale.next_page : null, onClick: this.next, tabIndex: nextDisabled ? null : 0, onKeyPress: this.runIfEnterNext, className: (!nextDisabled ? '' : prefixCls + '-disabled') + ' ' + prefixCls + '-next', 'aria-disabled': nextDisabled }, props.itemRender(nextPage, 'next', this.getItemIcon(props.nextIcon)) ), react_default.a.createElement(es_Options, { disabled: disabled, locale: props.locale, rootPrefixCls: prefixCls, selectComponentClass: props.selectComponentClass, selectPrefixCls: props.selectPrefixCls, changeSize: this.props.showSizeChanger ? this.changePageSize : null, current: this.state.current, pageSize: this.state.pageSize, pageSizeOptions: this.props.pageSizeOptions, quickGo: this.shouldDisplayQuickJumper() ? this.handleChange : null, goButton: goButton }) ); } }], [{ key: 'getDerivedStateFromProps', value: function getDerivedStateFromProps(props, prevState) { var newState = {}; if ('current' in props) { newState.current = props.current; if (props.current !== prevState.current) { newState.currentInputValue = newState.current; } } if ('pageSize' in props && props.pageSize !== prevState.pageSize) { var current = prevState.current; var newCurrent = calculatePage(props.pageSize, prevState, props); current = current > newCurrent ? newCurrent : current; if (!('current' in props)) { newState.current = current; newState.currentInputValue = current; } newState.pageSize = props.pageSize; } return newState; } /** * computed icon node that need to be rendered. * @param {React.ReactNode | React.ComponentType} icon received icon. * @returns {React.ReactNode} */ }]); return Pagination; }(react_default.a.Component); Pagination_Pagination.propTypes = { disabled: prop_types_default.a.bool, prefixCls: prop_types_default.a.string, className: prop_types_default.a.string, current: prop_types_default.a.number, defaultCurrent: prop_types_default.a.number, total: prop_types_default.a.number, pageSize: prop_types_default.a.number, defaultPageSize: prop_types_default.a.number, onChange: prop_types_default.a.func, hideOnSinglePage: prop_types_default.a.bool, showSizeChanger: prop_types_default.a.bool, showLessItems: prop_types_default.a.bool, onShowSizeChange: prop_types_default.a.func, selectComponentClass: prop_types_default.a.func, showPrevNextJumpers: prop_types_default.a.bool, showQuickJumper: prop_types_default.a.oneOfType([prop_types_default.a.bool, prop_types_default.a.object]), showTitle: prop_types_default.a.bool, pageSizeOptions: prop_types_default.a.arrayOf(prop_types_default.a.string), showTotal: prop_types_default.a.func, locale: prop_types_default.a.object, style: prop_types_default.a.object, itemRender: prop_types_default.a.func, prevIcon: prop_types_default.a.oneOfType([prop_types_default.a.func, prop_types_default.a.node]), nextIcon: prop_types_default.a.oneOfType([prop_types_default.a.func, prop_types_default.a.node]), jumpPrevIcon: prop_types_default.a.oneOfType([prop_types_default.a.func, prop_types_default.a.node]), jumpNextIcon: prop_types_default.a.oneOfType([prop_types_default.a.func, prop_types_default.a.node]) }; Pagination_Pagination.defaultProps = { defaultCurrent: 1, total: 0, defaultPageSize: 10, onChange: noop, className: '', selectPrefixCls: 'rc-select', prefixCls: 'rc-pagination', selectComponentClass: null, hideOnSinglePage: false, showPrevNextJumpers: true, showQuickJumper: false, showSizeChanger: false, showLessItems: false, showTitle: true, onShowSizeChange: noop, locale: zh_CN, style: {}, itemRender: defaultItemRender }; var Pagination__initialiseProps = function _initialiseProps() { var _this2 = this; this.getJumpPrevPage = function () { return Math.max(1, _this2.state.current - (_this2.props.showLessItems ? 3 : 5)); }; this.getJumpNextPage = function () { return Math.min(calculatePage(undefined, _this2.state, _this2.props), _this2.state.current + (_this2.props.showLessItems ? 3 : 5)); }; this.getItemIcon = function (icon) { var prefixCls = _this2.props.prefixCls; var iconNode = icon || react_default.a.createElement('a', { className: prefixCls + '-item-link' }); if (typeof icon === 'function') { iconNode = react_default.a.createElement(icon, extends_default()({}, _this2.props)); } return iconNode; }; this.savePaginationNode = function (node) { _this2.paginationNode = node; }; this.isValid = function (page) { return isInteger(page) && page !== _this2.state.current; }; this.shouldDisplayQuickJumper = function () { var _props2 = _this2.props, showQuickJumper = _props2.showQuickJumper, pageSize = _props2.pageSize, total = _props2.total; if (total <= pageSize) { return false; } return showQuickJumper; }; this.handleKeyDown = function (e) { if (e.keyCode === KeyCode.ARROW_UP || e.keyCode === KeyCode.ARROW_DOWN) { e.preventDefault(); } }; this.handleKeyUp = function (e) { var value = _this2.getValidValue(e); var currentInputValue = _this2.state.currentInputValue; if (value !== currentInputValue) { _this2.setState({ currentInputValue: value }); } if (e.keyCode === KeyCode.ENTER) { _this2.handleChange(value); } else if (e.keyCode === KeyCode.ARROW_UP) { _this2.handleChange(value - 1); } else if (e.keyCode === KeyCode.ARROW_DOWN) { _this2.handleChange(value + 1); } }; this.changePageSize = function (size) { var current = _this2.state.current; var newCurrent = calculatePage(size, _this2.state, _this2.props); current = current > newCurrent ? newCurrent : current; // fix the issue: // Once 'total' is 0, 'current' in 'onShowSizeChange' is 0, which is not correct. if (newCurrent === 0) { current = _this2.state.current; } if (typeof size === 'number') { if (!('pageSize' in _this2.props)) { _this2.setState({ pageSize: size }); } if (!('current' in _this2.props)) { _this2.setState({ current: current, currentInputValue: current }); } } _this2.props.onShowSizeChange(current, size); }; this.handleChange = function (p) { var disabled = _this2.props.disabled; var page = p; if (_this2.isValid(page) && !disabled) { var currentPage = calculatePage(undefined, _this2.state, _this2.props); if (page > currentPage) { page = currentPage; } else if (page < 1) { page = 1; } if (!('current' in _this2.props)) { _this2.setState({ current: page, currentInputValue: page }); } var pageSize = _this2.state.pageSize; _this2.props.onChange(page, pageSize); return page; } return _this2.state.current; }; this.prev = function () { if (_this2.hasPrev()) { _this2.handleChange(_this2.state.current - 1); } }; this.next = function () { if (_this2.hasNext()) { _this2.handleChange(_this2.state.current + 1); } }; this.jumpPrev = function () { _this2.handleChange(_this2.getJumpPrevPage()); }; this.jumpNext = function () { _this2.handleChange(_this2.getJumpNextPage()); }; this.hasPrev = function () { return _this2.state.current > 1; }; this.hasNext = function () { return _this2.state.current < calculatePage(undefined, _this2.state, _this2.props); }; this.runIfEnter = function (event, callback) { for (var _len = arguments.length, restParams = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { restParams[_key - 2] = arguments[_key]; } if (event.key === 'Enter' || event.charCode === 13) { callback.apply(undefined, restParams); } }; this.runIfEnterPrev = function (e) { _this2.runIfEnter(e, _this2.prev); }; this.runIfEnterNext = function (e) { _this2.runIfEnter(e, _this2.next); }; this.runIfEnterJumpPrev = function (e) { _this2.runIfEnter(e, _this2.jumpPrev); }; this.runIfEnterJumpNext = function (e) { _this2.runIfEnter(e, _this2.jumpNext); }; this.handleGoTO = function (e) { if (e.keyCode === KeyCode.ENTER || e.type === 'click') { _this2.handleChange(_this2.state.currentInputValue); } }; }; Object(react_lifecycles_compat_es["polyfill"])(Pagination_Pagination); /* harmony default export */ var es_Pagination = (Pagination_Pagination); // CONCATENATED MODULE: ./node_modules/rc-pagination/es/index.js // EXTERNAL MODULE: ./node_modules/rc-pagination/es/locale/en_US.js var en_US = __webpack_require__("lZc+"); // EXTERNAL MODULE: ./node_modules/antd/node_modules/classnames/index.js var node_modules_classnames = __webpack_require__("kTQ8"); var node_modules_classnames_default = /*#__PURE__*/__webpack_require__.n(node_modules_classnames); // EXTERNAL MODULE: ./node_modules/antd/es/select/index.js + 8 modules var es_select = __webpack_require__("8/ER"); // CONCATENATED MODULE: ./node_modules/antd/es/pagination/MiniSelect.js function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _extends() { _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; }; return _extends.apply(this, arguments); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } var MiniSelect_MiniSelect = /*#__PURE__*/function (_React$Component) { _inherits(MiniSelect, _React$Component); var _super = _createSuper(MiniSelect); function MiniSelect() { _classCallCheck(this, MiniSelect); return _super.apply(this, arguments); } _createClass(MiniSelect, [{ key: "render", value: function render() { return /*#__PURE__*/react["createElement"](es_select["default"], _extends({ size: "small" }, this.props)); } }]); return MiniSelect; }(react["Component"]); MiniSelect_MiniSelect.Option = es_select["default"].Option; // EXTERNAL MODULE: ./node_modules/antd/es/icon/index.js + 5 modules var es_icon = __webpack_require__("FC3+"); // EXTERNAL MODULE: ./node_modules/antd/es/locale-provider/LocaleReceiver.js + 1 modules var LocaleReceiver = __webpack_require__("IIvH"); // EXTERNAL MODULE: ./node_modules/antd/es/config-provider/index.js + 1 modules var config_provider = __webpack_require__("PmSq"); // CONCATENATED MODULE: ./node_modules/antd/es/pagination/Pagination.js function Pagination__typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { Pagination__typeof = function _typeof(obj) { return typeof obj; }; } else { Pagination__typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return Pagination__typeof(obj); } function Pagination__extends() { Pagination__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; }; return Pagination__extends.apply(this, arguments); } function Pagination__classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function Pagination__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); } } function Pagination__createClass(Constructor, protoProps, staticProps) { if (protoProps) Pagination__defineProperties(Constructor.prototype, protoProps); if (staticProps) Pagination__defineProperties(Constructor, staticProps); return Constructor; } function Pagination__inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) Pagination__setPrototypeOf(subClass, superClass); } function Pagination__setPrototypeOf(o, p) { Pagination__setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return Pagination__setPrototypeOf(o, p); } function Pagination__createSuper(Derived) { var hasNativeReflectConstruct = Pagination__isNativeReflectConstruct(); return function _createSuperInternal() { var Super = Pagination__getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = Pagination__getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return Pagination__possibleConstructorReturn(this, result); }; } function Pagination__possibleConstructorReturn(self, call) { if (call && (Pagination__typeof(call) === "object" || typeof call === "function")) { return call; } return Pagination__assertThisInitialized(self); } function Pagination__assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function Pagination__isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } function Pagination__getPrototypeOf(o) { Pagination__getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return Pagination__getPrototypeOf(o); } var __rest = this && this.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var pagination_Pagination_Pagination = /*#__PURE__*/function (_React$Component) { Pagination__inherits(Pagination, _React$Component); var _super = Pagination__createSuper(Pagination); function Pagination() { var _this; Pagination__classCallCheck(this, Pagination); _this = _super.apply(this, arguments); _this.getIconsProps = function (prefixCls) { var prevIcon = /*#__PURE__*/react["createElement"]("a", { className: "".concat(prefixCls, "-item-link") }, /*#__PURE__*/react["createElement"](es_icon["default"], { type: "left" })); var nextIcon = /*#__PURE__*/react["createElement"]("a", { className: "".concat(prefixCls, "-item-link") }, /*#__PURE__*/react["createElement"](es_icon["default"], { type: "right" })); var jumpPrevIcon = /*#__PURE__*/react["createElement"]("a", { className: "".concat(prefixCls, "-item-link") }, /*#__PURE__*/react["createElement"]("div", { className: "".concat(prefixCls, "-item-container") }, /*#__PURE__*/react["createElement"](es_icon["default"], { className: "".concat(prefixCls, "-item-link-icon"), type: "double-left" }), /*#__PURE__*/react["createElement"]("span", { className: "".concat(prefixCls, "-item-ellipsis") }, "\u2022\u2022\u2022"))); var jumpNextIcon = /*#__PURE__*/react["createElement"]("a", { className: "".concat(prefixCls, "-item-link") }, /*#__PURE__*/react["createElement"]("div", { className: "".concat(prefixCls, "-item-container") }, /*#__PURE__*/react["createElement"](es_icon["default"], { className: "".concat(prefixCls, "-item-link-icon"), type: "double-right" }), /*#__PURE__*/react["createElement"]("span", { className: "".concat(prefixCls, "-item-ellipsis") }, "\u2022\u2022\u2022"))); return { prevIcon: prevIcon, nextIcon: nextIcon, jumpPrevIcon: jumpPrevIcon, jumpNextIcon: jumpNextIcon }; }; _this.renderPagination = function (contextLocale) { var _a = _this.props, customizePrefixCls = _a.prefixCls, customizeSelectPrefixCls = _a.selectPrefixCls, className = _a.className, size = _a.size, customLocale = _a.locale, restProps = __rest(_a, ["prefixCls", "selectPrefixCls", "className", "size", "locale"]); var locale = Pagination__extends(Pagination__extends({}, contextLocale), customLocale); var isSmall = size === 'small'; return /*#__PURE__*/react["createElement"](config_provider["ConfigConsumer"], null, function (_ref) { var getPrefixCls = _ref.getPrefixCls; var prefixCls = getPrefixCls('pagination', customizePrefixCls); var selectPrefixCls = getPrefixCls('select', customizeSelectPrefixCls); return /*#__PURE__*/react["createElement"](es_Pagination, Pagination__extends({}, restProps, { prefixCls: prefixCls, selectPrefixCls: selectPrefixCls }, _this.getIconsProps(prefixCls), { className: node_modules_classnames_default()(className, { mini: isSmall }), selectComponentClass: isSmall ? MiniSelect_MiniSelect : es_select["default"], locale: locale })); }); }; return _this; } Pagination__createClass(Pagination, [{ key: "render", value: function render() { return /*#__PURE__*/react["createElement"](LocaleReceiver["a" /* default */], { componentName: "Pagination", defaultLocale: en_US["a" /* default */] }, this.renderPagination); } }]); return Pagination; }(react["Component"]); // CONCATENATED MODULE: ./node_modules/antd/es/pagination/index.js /* harmony default export */ var pagination = __webpack_exports__["default"] = (pagination_Pagination_Pagination); /***/ }), /***/ "BUm/": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAqZJREFUWEfdl0uIjWEYx3//b2Y0bnPOcSm3oqwkoWHBUrKQMikpKbKxsDFnimaaGBulmXOOhcLCAiW5bGywsiIlosbCgiQplHPOuA1jvr9majDO5ftmHEO+7fu8z/N7n8v/e1/xlz/95fiUAKTa3GHTaTM5BtxnRE8xq84YtmVNSgCSaX8cDi7ymHwVxwlgJjC4IMGUR136Mh6IEoBEqz0UPNXEvGdd6q/ktPmUG5485pnNvEkJpr/p0vvaAcDTYk6Loxwm035gs/z/AxA8L+S0MDIDre41LK11BkJAEscFLytB2Mw27Buybaxj2qsefYgCLrdebgpu2ayN60yit5DVsrj2v9qVAMw45Cb3sckBSxzSibiLOVUuQBDQPzXk2ouc3tYMYMTRrP1eNTDAXeBiMadt4w0Qta+iFFcDmNXhuV/76cbMjwoAhIhb+QyHJDmyBHEykEj7JGZPjODfTYKAjfmMrtUEINnqK4YtQUA79ZyvBBKKej5zAtiggF2FjM6MHUBcWtnE9p83Pujjkk2LxIpCVg+rZSLZ6oOGw+MHqOJ9QgAk3tmjBUkw3zBtQgDKjeFIDwhygbhYUS3raAi/chRY8zslKNGBZNo5e1iGY38S6wpZ3Rx7E5YRotQBJxigw8TSAWtYB3Qy1r8gjg7YVipNy1AvRKZAOBR3ihndqxlAKu320ByJDP7DYDCoY0W+R701KcFIEyJuCK5XbELTILHXZqHEzkJWZ2sLUE9zsVv3qwpRmw875OC4p0DiJWZU/SxWY+ZMlA5UPOAfBVjU5ca+T5S9GQ9+4RiwXmJzIaurVUuQ9mmb3WMuQYTTczY7hh4lgtcVmxDqgdnD6wFbixldjt2E1QASbW7GXAAWRI2iTGi43VhHS7mL67/3OI06Ua3XvwHYL4cw6diBEwAAAABJRU5ErkJggg==" /***/ }), /***/ "BzKO": /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.removeSensor = exports.getSensor = exports.Sensors = void 0; var _id = _interopRequireDefault(__webpack_require__("Y/Jx")); var _sensors = __webpack_require__("QmcU"); var _constant = __webpack_require__("ZFdq"); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } /** * Created by hustcc on 18/6/9. * Contract: i@hust.cc */ /** * all the sensor objects. * sensor pool */ var Sensors = {}; /** * When destroy the sensor, remove it from the pool */ exports.Sensors = Sensors; function clean(sensorId) { // exist, then remove from pool if (sensorId && Sensors[sensorId]) { delete Sensors[sensorId]; } } /** * get one sensor * @param element * @returns {*} */ var getSensor = function getSensor(element) { var sensorId = element.getAttribute(_constant.SizeSensorId); // 1. if the sensor exists, then use it if (sensorId && Sensors[sensorId]) { return Sensors[sensorId]; } // 2. not exist, then create one var newId = (0, _id["default"])(); element.setAttribute(_constant.SizeSensorId, newId); var sensor = (0, _sensors.createSensor)(element, function () { return clean(newId); }); // add sensor into pool Sensors[newId] = sensor; return sensor; }; /** * 移除 sensor * @param sensor */ exports.getSensor = getSensor; var removeSensor = function removeSensor(sensor) { var sensorId = sensor.element.getAttribute(_constant.SizeSensorId); // remove event, dom of the sensor used sensor.destroy(); clean(sensorId); }; exports.removeSensor = removeSensor; /***/ }), /***/ "CE2x": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAAAXNSR0IArs4c6QAABLhJREFUWEfFl2+IVFUUwH/nzaa7IPNm1sUITEQC0XChRJH60ofMRMoI+kusZYb0wXpv1zTCaO2/sTtvjBA1U0qM/lCBFJlQH6IWCltIKoMCDawwdJ03+Wed3Xkn3t034+w2s/NmV/F+ujP33HN+97xz7jlXuMJDVaW1i+UhxkAvn8tkebq71cr8y1KKLBHhgsJXeU++j6M3hEl18qYqj4byCYsVkwKyu3QhATtUWVgJIMIe12ZNd7cEtcDGwkwaKNWpDwcB24Gp1YyKRY+fkaeqrVWDEeGtXIbHGvbQPR9o4os+egCnZEwgj7BNlfnAneZ/oTBFmX0yK39XQo0LI6INAdlPa5pB3ldYWgFzWJpZmXtVjoXG7E76UJZEUOvynrxRkq0HM3KOmGP6Bp03PMR+Va4rwwgfNSdYdaJHzpb+S7n6ZKBkjXJhp+/J2nAeByY2UNrRFQG8q5CMDCuw2fd4XkTCeXmEskX4NAI66HuyLC7M/4CSrj4oSocK7QLTLrrazI03RTgrFh25Xvm4mnPT67W9OMyP0doR3+P6ytSOdIwE8JjDjAKyHQ098MB4X1DgmNXEytM9criWXOtzmhz28SPD5wk9G90z9WDKQElH1wGv14QRwvvks2kWq//qlZP1ws529ZwqLWPlyqldxTMVSQK2o0cVZkeEO66CzUzhTEmoeYjh456Ep401bFdPqdJaKRwHxtgPs2eowC8RTD5hc+3AZsnHslxFyASwy1nloofiwhiGMVlxwPfEFLqJjKrZBLtzHmuqBXA1GxKVgD1mUdib96TjksEIH+Yy3BcXxiCkOtUJArwIaGvek3JJiAvWyD1TT6fYjm5Q2GLoLF7zM7Kx3qbK9UsJYxiSrm5CeSH8YQkv5jx5Ni7QpYaZFNDlgDFAE/lklwtmJKgrqjNC3aCOAxO2tVvPMH/6LH77/Qm5EDcESlnWEQS8bWLIYl8uIw/VUhAHJtybdDTU1yHCId+TRQ0BJbt0GUUOGDrhS9+TW6spiAtjgFw9gTIjukqm5z0ZiAsl6Y06q3iBPyKggZk21/zcLYXJpLbtak4VO9SRmErq9BYx1T/OMD1O0tFfgbnRhncsi2wTlLvAQmCuhXtLCuvVpqSjg6Xmf8YcmhuJIwOUcvWRQNkd6wSl10GNFuKWbm3qzzEU6Srms9IUR2/5sKWJ7eh2BdP/1hzCXj/DqvFq09Xrdcb5YU5EOk7ls9I2IaBwU7pLlxeL3C/CAlXmwEgcRMF5yM+wuF6hTHXqDUFAv4lJ+MnPyoIJA4Ubo35ml8LqCjeOaiGSrt4ugj0zySdjEyDt6h1FZb8BEhpuZ0Y9g+LAtHbqTcMB30Ze62tu4e5/XpbSJwrjsStQ85AMgbb7njw+IQ/FgTEZ6epilO8qvHecBHf5vfJD+Ko92Ee/QnsEtNb3ZGfDQHFhSoqjHir0QiLyVEFgn8K80qtV4Ny0Fmb9+YqcahjIdnXXqKdKjLbTdvU24D1V0tUMisUmPyMvNQJjvJp29OYifFMrgMdTaLs6B2WbwrIKuSGBHj8rzzQKY4DaNujcQoEjJgbrXHq1DNiO3ojFIlEGNcHXfo8cnQhMdFVACFUs0HY6KyPZcwXHf/5Hk9e7LmkkAAAAAElFTkSuQmCC" /***/ }), /***/ "CEIq": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.closeAttendanceMarker = closeAttendanceMarker; exports.closeEventMarkers = closeEventMarkers; exports.closePersonMarkers = closePersonMarkers; exports.markEventList = markEventList; exports.markNowErrorEvent = markNowErrorEvent; exports.markPersonList = markPersonList; exports.markPicture = markPicture; exports.markPolice = markPolice; exports.markerAttendanceList = markerAttendanceList; exports.openAttendanceInfo = openAttendanceInfo; exports.openEventInfo = openEventInfo; exports.openPersonInfo = openPersonInfo; var _CreateAbnormalEventInfoWindow = _interopRequireDefault(__webpack_require__("gyGh")); var _CreateTrajectoryInfoWindow = _interopRequireDefault(__webpack_require__("XDoD")); var _CreateComponeyInfoWindow = _interopRequireDefault(__webpack_require__("3Mtx")); var _CreateAttendPointInfoWindow = _interopRequireDefault(__webpack_require__("xkQS")); var _CreateSearchAddressInfoWindow = _interopRequireDefault(__webpack_require__("4caS")); var _attendancePoint = _interopRequireDefault(__webpack_require__("6Mj6")); var _utils = __webpack_require__("oAV5"); var _recordHistory = __webpack_require__("eXDv"); var _events = _interopRequireDefault(__webpack_require__("TLe5")); // 引入 EventEmitter //打点(人员跟驻勤点的样式) //事件列表对搜索出的人员打点 function markEventList(eventList) { var _this = this; var where = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ""; var eventMarkers = []; eventList.length > 0 && eventList.map(function (item, index) { var map = _this.state.map; if (item.lnglat) { var marker = new AMap.Marker({ position: new AMap.LngLat(item.lnglat[0], item.lnglat[1]), // 经纬度对象,也可以是经纬度构成的一维数组[116.39, 39.9] title: "负责人:" + item.name || "--", content: '
    ' + index + "
    ", key: item.id, indexText: index }); var that = _this; // 手动驻的点给点击事件 AMap.event.addListener(marker, "click", function () { that.props.dispatch({ type: "command/setEventSelectIndex", payload: marker.w.key }); that.openEventInfo(item, map, marker); }); marker.setAnimation("AMAP_ANIMATION_DROP"); eventMarkers.push(marker); } }); this.state.map.add(eventMarkers); this.state.map.setFitView(eventMarkers); //自适应显示所有的标注点 return eventMarkers; // this.setState({ personMarkers }); } //事件的打点更换 function openEventInfo(item, map, marker) { var infoWindow = new AMap.InfoWindow({ isCustom: true, //使用自定义窗体 content: this.createEventInfoWindow(item), offset: new AMap.Pixel(16, -45) }); infoWindow.open(this.state.map, marker.getPosition()); var markers = this.state.eventMarkers; markers.map(function (itemMark, i) { if (itemMark.w.key === item.id) { markers[i].setContent('
    ' + itemMark.w.indexText + "
    "); } else { markers[i].setContent('
    ' + itemMark.w.indexText + "
    "); } }); this.state.map.setZoomAndCenter(this.state.zoom, [marker.getPosition().lng, marker.getPosition().lat]); //同时设置地图层级与中心点 // this.state.map.setCenter(marker.getPosition());//设置中心点 // this.setState({ // personMarkers: markers, // }); return markers; } //人员的打点更换图标,切换成未打点状态 function closeEventMarkers() { var markers = this.state.eventMarkers; markers.map(function (itemMark, i) { markers[i].setContent('
    ' + itemMark.w.indexText + "
    "); }); return markers; } //人员图层对搜索出的人员打点 function markPersonList(personList) { var _this2 = this; var where = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ""; var selectComponeyInfo = this.props.selectComponeyInfo; // where代表搜索的值,“软件园三期”“百川信”有特殊的打点位置需求 if (!(0, _utils.isEmpty)(this.state.personMarkers)) { console.log('准备清除 markPersonList 标记'); this.state.map.remove(this.state.personMarkers); } if (!(0, _utils.isEmpty)(this.state.beijingMarkers)) { this.state.map.remove(this.state.beijingMarkers); } if (!(0, _utils.isEmpty)(this.state.gaoqiMarkers)) { this.state.map.remove(this.state.gaoqiMarkers); } var personMarkers = []; personList.length > 0 && personList.map(function (item, index) { var map = _this2.state.map; if (item.lnglat) { var marker = new AMap.Marker({ position: new AMap.LngLat(item.lnglat[0], item.lnglat[1]), // 经纬度对象,也可以是经纬度构成的一维数组[116.39, 39.9] title: "负责人:" + item.name || "--", content: '
    ' + index + "
    ", key: item.perId, indexText: index }); var that = _this2; //手动驻的点给点击事件 AMap.event.addListener(marker, "click", function () { selectComponeyInfo.clickType = 'personnel'; (0, _recordHistory.recordAdd)({ from: 'ComponeyInfo', to: 'CreateTrajectoryInfoWindow', fromData: selectComponeyInfo, toID: '' }); that.props.dispatch({ type: "command/setPersonSelectIndex", payload: marker.w.key }); that.openPersonInfo(item, marker, 'police'); // that.openPersonInfo(item, marker); }); marker.setAnimation("AMAP_ANIMATION_DROP"); personMarkers.push(marker); } }); this.state.map.add(personMarkers); if (where === "厦门软件园三期" || where === "软件园三期") { var allMark = []; //假的点,用来居中到软三的作用 var marker1 = new AMap.Marker({ position: new AMap.LngLat(118.051211, 24.60608) // 经纬度对象,也可以是经纬度构成的一维数组[116.39, 39.9] }); allMark.push(marker1); var marker2 = new AMap.Marker({ position: new AMap.LngLat(118.047843, 24.611016) // 经纬度对象,也可以是经纬度构成的一维数组[116.39, 39.9] }); allMark.push(marker2); this.state.map.setFitView(allMark); } else { this.state.map.setFitView(personMarkers); //自适应显示所有的标注点 } return personMarkers; // this.setState({ personMarkers }); } //人员的打点更换 function openPersonInfo(item, marker, type) { var infoWindow; if (type == 'police') { infoWindow = new AMap.InfoWindow({ isCustom: true, //使用自定义窗体 content: _CreateTrajectoryInfoWindow.default.call(this, item, type, marker), offset: new AMap.Pixel(16, -45) }); } else { infoWindow = new AMap.InfoWindow({ isCustom: true, //使用自定义窗体 content: this.createInfoWindow(item), offset: new AMap.Pixel(16, -45) }); } infoWindow.open(this.state.map, marker.getPosition()); var markers = this.state.personMarkers; if (type != 'place') { markers.map(function (itemMark, i) { if (itemMark.w.key === item.perId) { markers[i].setContent('
    ' + itemMark.w.indexText + "
    "); } else { markers[i].setContent('
    ' + itemMark.w.indexText + "
    "); } }); } this.state.map.setZoomAndCenter(this.state.zoom, [marker.getPosition().lng, marker.getPosition().lat]); return markers; } //人员的打点更换图标,切换成未打点状态 function closePersonMarkers() { var markers = this.state.personMarkers; markers.map(function (itemMark, i) { markers[i].setContent('
    ' + itemMark.w.indexText + "
    "); }); return markers; } //搜索出的驻勤点打点 function markerAttendanceList(attendanceList) { var _this3 = this; var typeName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ""; //先删除之前的打点 if (!!this.state.attendanceMarkers) { //如果是搜索列表的打点,先删除之前地图上的搜索的驻勤标记 this.state.map.remove(this.state.attendanceMarkers); } var attendanceMarkers = []; var length = attendanceList.length; if (length > 0) { var _loop = function _loop(i) { if (attendanceList[i].lnglat) { marker = new AMap.Marker({ position: new AMap.LngLat(attendanceList[i].lnglat[0], attendanceList[i].lnglat[1]), // 经纬度对象,也可以是经纬度构成的一维数组[116.39, 39.9] title: "负责人:" + attendanceList[i].name || "--", content: attendanceList[i].markerIcon ? '
    ' + "
    " : '
    ' + "
    ", comTaskId: attendanceList[i].comTaskId, markerIcon: attendanceList[i].markerIcon, clickMarkerIcon: attendanceList[i].clickMarkerIcon }); marker.setAnimation("AMAP_ANIMATION_DROP"); var that = _this3; //手动驻的点给点击事件 AMap.event.addListener(marker, "click", function () { that.props.dispatch({ type: "command/setSelectIndex", // payload: marker.w.comTaskId, payload: i }); }); attendanceMarkers.push(marker); } }, marker; for (var i = 0; i < length; i++) { _loop(i); } } this.state.map.add(attendanceMarkers); this.state.map.setFitView(attendanceMarkers); //自适应显示所有的标注点 return attendanceMarkers; // this.setState({ attendanceMarkers }); } //驻勤点的打点更换 function openAttendanceInfo(_ref) { var item = _ref.item, map = _ref.map, marker = _ref.marker, currentIndex = _ref.currentIndex, afterIndex = _ref.afterIndex, _ref$layerStatus = _ref.layerStatus, layerStatus = _ref$layerStatus === void 0 ? '' : _ref$layerStatus; var that = this; var _defaultInfo = { isCustom: true, //使用自定义窗体 content: this.createAttendanceInfoWindow(item), offset: new AMap.Pixel(16, -45) }; var infoJson = (0, _utils.isEmpty)(layerStatus) || layerStatus != 'aPicture' ? _defaultInfo : { isCustom: true, //使用自定义窗体 content: _CreateAttendPointInfoWindow.default.call(that, item, '', marker), offset: new AMap.Pixel(16, -45) }; var infoWindow = new AMap.InfoWindow(infoJson); infoWindow.open(map, marker.getPosition()); map.setZoomAndCenter(this.state.zoom, [item.lnglat[0], item.lnglat[1]]); //同时设置地图层级与中心点 // map.setCenter([item.lnglat[0], item.lnglat[1]]); var markers = this.state.attendanceMarkers; // markers.map((itemMark, i) => { // if (itemMark.w.comTaskId == item.comTaskId) { // markers[i].setContent( // '
    ' + // "
    " // ); // } else { // markers[i].setContent( // '
    ' + // "
    " // ); // } // }); // this.setState({ // attendanceMarkers: markers, // }); markers[currentIndex].setContent('
    ' + "
    "); if (afterIndex != null && afterIndex != currentIndex) { markers[afterIndex].setContent('
    ' + "
    "); } return markers; } //驻勤点的打点更换图标,切换成未打点状态 function closeAttendanceMarker() { var markers = this.state.attendanceMarkers; markers.map(function (itemMark, i) { markers[i].setContent('
    ' + "
    "); }); // this.setState({ // attendanceMarkers: markers, // }); return markers; } /****************一张图的图层*****************/ //数据展示的打点信息 function markPicture(pictureList, type) { var _this4 = this; var where = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ''; console.log('markPicture', pictureList, type); var selectComponeyInfo = this.props.selectComponeyInfo; var pictureMarks = []; var pictureDatas = []; pictureList.data.map(function (item, index) { // item.longitude = "118."+parseInt(Math.random() * 1000000); // item.latitude = "24."+parseInt(Math.random() * 1000000); if (item.longitude && item.latitude) { item.mapIcon = pictureList.mapIcon ? pictureList.mapIcon : "//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-default.png"; item.clickMapIcon = pictureList.clickMarkerIcon ? pictureList.clickMarkerIcon : item.mapIcon; if (type == 'attendancePoint' || type == 'attendance' || type == 'eventMarker') { item.mapIcon = item.markerIcon; item.clickMapIcon = item.clickMarkerIcon; } var key = !(0, _utils.isEmpty)(item.perId) ? item.perId : item.id; var marker = new AMap.Marker({ icon: item.mapIcon, // markerIcon: mapIcon, // clickMarkerIcon: clickMarkerIcon, position: new AMap.LngLat(item.longitude, item.latitude), // position: [0,0], offset: new AMap.Pixel(-13, -30), key: key, indexText: index }); var that = _this4; switch (type) { //保安人员定位 case 'securityResource': case 'attendancePolice': // 手动驻的点给点击事件 AMap.event.addListener(marker, "click", function (e) { if (type == 'attendancePolice') { (0, _recordHistory.recordAdd)({ from: 'AttendInfo', to: 'CreateTrajectoryInfoWindow', fromData: item, toID: 'attendancePolice' }); } else { var lastJSON = (0, _recordHistory.getRecordLastJSON)(); if (lastJSON.to != 'CreateTrajectoryInfoWindow') { var fromData = lastJSON.to == "ComponeyInfo" ? selectComponeyInfo : null; (0, _recordHistory.recordAdd)({ from: lastJSON.to, to: 'CreateTrajectoryInfoWindow', fromData: fromData, toID: lastJSON.toID }); } } if ((0, _utils.isEmpty)(where)) { _events.default.emit('checkedMapTag', { type: type, item: item, checked: true }); } else { // 周边搜索 _events.default.emit('checkedMapTag', { type: "securityResourceSearch", item: item, checked: true }); } }); break; //保安公司定位 case 'securityCompany': var companyLogo = item.componeyLogo; // 创建一个 Icon marker = new AMap.Marker({ position: new AMap.LngLat(item.longitude, item.latitude), content: "
    \n \n
    "), // position: [0,0], offset: new AMap.Pixel(-13, -30) }); var infoWindow = new AMap.InfoWindow({ isCustom: true, //使用自定义窗体 content: _CreateComponeyInfoWindow.default.call(that, item, type, marker), offset: new AMap.Pixel(16, -45) }); // 手动给驻点添加鼠标移入/移出事件 AMap.event.addListener(marker, "mouseover", function () { infoWindow.open(that.state.map, marker.getPosition()); }); AMap.event.addListener(marker, "mouseout", function () { infoWindow.close(); }); // TAG: 根据需求 368。点击打开公司办公地点定位,并打开公司信息弹框 // this.props.dispatch({ // type: 'command/clearInfoWindow', // payload: true // }) // this.props.dispatch({ // type: 'command/setSelectComponeyInfo', // payload: item // }) break; // 驻勤点 case 'attendancePoint': // 手动驻的点给点击事件 infoWindow = new AMap.InfoWindow({ isCustom: true, //使用自定义窗体 content: _CreateAttendPointInfoWindow.default.call(that, item, type, marker), offset: new AMap.Pixel(0, -15) }); // 手动给驻点添加鼠标移入/移出事件 AMap.event.addListener(marker, "mouseover", function () { if ((0, _utils.isEmpty)(selectComponeyInfo.componeyLogo)) { (0, _recordHistory.recordAdd)({ from: 'AttendInfo', to: 'CreateAttendPointInfoWindow', fromData: item, toID: '' }); } else { selectComponeyInfo.clickType = 'attendancePoints'; (0, _recordHistory.recordAdd)({ from: 'ComponeyInfo', to: 'AttendInfo', fromData: selectComponeyInfo, toID: '' }); } infoWindow.open(that.state.map, marker.getPosition()); }); AMap.event.addListener(marker, "mouseout", function () { infoWindow.close(); }); // TAG: 根据需求 368。点击打开点击打开驻勤点定位,并打开驻勤点弹框 _this4.props.dispatch({ type: 'command/clearInfoWindow', payload: true }); break; // 搜索地址 case 'searchAddress': AMap.event.addListener(marker, "click", function () { infoWindow = new AMap.InfoWindow({ isCustom: true, content: _CreateSearchAddressInfoWindow.default.call(that, item, type, marker), offset: new AMap.Pixel(0, -15) }); infoWindow.open(that.state.map, marker.getPosition()); }); break; // 事件标记 case 'eventMarker': break; default: console.log("default"); // 手动驻的点给点击事件 AMap.event.addListener(marker, "click", function () { var infoWindow = new AMap.InfoWindow({ isCustom: true, //使用自定义窗体 content: that.createPicturePerception(item, pictureList.name, type), offset: new AMap.Pixel(16, -45) }); infoWindow.open(that.state.map, marker.getPosition()); }); break; } pictureMarks.push(marker); pictureDatas.push(item); } }); return { pictureMarks: pictureMarks, pictureDatas: pictureDatas }; } //实时异常的打点信息 function markNowErrorEvent(data) { var lng = JSON.parse(data.position); var latitude = lng.latitude, longitude = lng.longitude; var infoWindow = new AMap.InfoWindow({ content: (0, _CreateAbnormalEventInfoWindow.default)(data) }); infoWindow.open(this.state.map, latitude && longitude ? [longitude, latitude] : this.state.map.getCenter()); } /****************警保联动图层****************/ function markPolice(data) { var _this5 = this; var policeMarks = []; data.map(function (item, index) { if (item.longitude && item.latitude) { var marker = new AMap.Marker({ position: new AMap.LngLat(item.longitude, item.latitude), title: "负责人:" + item.name || "--", content: '
    ' + index + "
    ", key: item.id, indexText: index }); var that = _this5; //手动驻的点给点击事件 AMap.event.addListener(marker, "click", function () { //存储选中的点id that.props.dispatch({ type: "command/setPoliceSelectIndex", payload: marker.w.key }); marker.setContent('
    ' + marker.w.indexText + "
    "); that.openPersonInfo(item, marker, 'police'); }); policeMarks.push(marker); } }); return policeMarks; } /***/ }), /***/ "CEMJ": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAiCAYAAAC0nUK+AAAAAXNSR0IArs4c6QAABO9JREFUSA2tVn1MHFUQn7e7dyfXgrBXSIstCVZKaJA/hDQFBeSjaKNtYtJqSIgJ/zQlGuJX+Dg1wVhaToxJ/9M2aY3RxNjYRomSUsC0NKmGQkxjUCva2FosRQ5y157H3u4+Z5Yu9/a4AzROsnkz82Z+7715M/OWwQrU0DNXpZvmHgBewzjkAjAfZzyI/B8gsfMyk7482545whhqkhBLooO67rkaALOHA9+RbF7UMQajwOX2odezvhH1xDvAuziXLhyZ7QYOHTSZnS5BXbEbdj7khtwsGTLSGIT+5jA1Z8C3kxoM/aDBTNgkUwRivZV+taOLsUWFpbOm8OCcs/ojwc9w3OeSAZqrvfBM2X3gVhzr37NeHDSdw5nLUTh5PgIxg9DY6apOdb+9AMIs0kVP61sI3JLpZRBozICa7R6QpdTA5EXzxZtd8Ei+Cy79okE0xotujCwovw0Hhmne8m7oma3QTbjokjh7rykDtj/gAhOv6NqMAVf/1K3vZxyvzxqwRZWhYJMC2zYqUIDfgzky0EknbsbglY9DEDMZxxBVD/nVEYVWMExOcWYUCgImeqo3CKW4o20ItLPADc9XemHf0SBcvYWL4feVZQWgyAzOtquWH/kfG45Q6hzC6WplV2C+zND1x+nyKMY2UTwP7U+3xZSjbsSzkPzPjEbpkqtqA3/tkEzDwDwGKytWuryU6MIE+VN2ETGdPS3hunUkULr9H2TjEK6CAcqjg1Eer4WG/D6HWd3hWYe8hMMgTwHGc/AyrQJxWKGQ6Jg4n0ymQiNiwLMl4OwuCVR5IklY16tRNAbYYpx2SziIKyHANIFQSYtE+bsaXbkeg/wEOxsHk31KwrCMEwj1CpGaHksTxWU8lfsJLPvGcqedjYOlNI7gUj95UhOi3LapstANTY96bdExYjXD4S/uwMNbXNgm4llG/oRjEeN9knsd78OGM0fdjZqQSM3VafDy7vXgccXjOnFTh5c+CkEhVu4Lu5yLk7/VJRnMyC61X57sf2chv75NwYyppRhSE8rOiMebyr++2AN3cUO3QybMhjm0ICidTCTqLYG+O1ZPws2+MdjhHbG21NDL1xlacBQfhyLqim9j2ds9RgRIxRPwm6fCMB/BBgUw7k73VfS3soWl8z4ZCBVqhoavCqT/136OWXlb9rCygVd9N2gjS+Ak1PYEdzOT92Fft+Ly714iiGCDrB3wb/iOsIgc4KTA1+iAaZofEL92YjrIbO9wh2plnu1HReSgwU71GF7Iuw7lKgI+SAcSgcllGTgpq8rVTvxduET8qsTY8UG/72Qyu6TgXTVM97ilRozafDInW4cbuJK3SW215cQxKTgZff1a1u9MYi8mOtgyZsYCvp7PfdjMnJVnG+CYEpxshjrVT3B35wT7OMtY94A/46e4Yjm3IjiZuxW5BQfH7vB1/1HdqgaWwzk1q4L3t2X+ik27R3STZengqWeZs42KBvf4ZXku2pSWlnpjsZgK9xflbHji6AAwxce10IWZz/celCQp7HK5gmNjYxHRR+TjHUrUIl9SUpITjUa3Goax3ohMM8/mCk3x5pSHJz7tiE5dDpMeF87Ozc01pqenrdcsASL1hWKVbhSNg4Ntp7X5ayfC3x+fFPWJduJcypjjsW+JhqY2r8/0Nb0v6ohPtBPn1xRz3F06NjM3jjKCGZie2lpi/g8fovCi9gmGJQAAAABJRU5ErkJggg==" /***/ }), /***/ "CF3O": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAUCAYAAABvVQZ0AAAB/0lEQVQ4T6WTPWhUURCFv3M3CP7kJQhBRQVFYmVkRcFSxEYLG1NY2K5FhLhvFTshGqwssptt/E2nhYVaCGqhop2FYiI2akBBCLppNrskFrp35D0NZl/ei5hMOXPPd2funCuWiM6inZM4DwRA0+BSs6LLWRJlFbrO2l5r8SpZl2ffTFWv03TZsNAKBjcWwURhpqyxTFhw2nrNUQCmzfPYObYajAk2JUVmTEkUvOeLHIeBHnluNqr6qLWnbGNuFW+j5FLv949arWXsVmfJrss4uQJQLDW4piC02gq7+t2HqCko2ROMQ2mdmfHViWHvmXCiz4uhtHf8A3uqdYPW43I8APYvBBp8x9jTHNX7+XznGduJZ1ywuu1y8dIcR2NrRNvE8aENZtxvjupYsuOgaI9QvMW/IXobZU3GsO7Qtnn4lOjsXrOi/kWw0B4CRxbmHWyvV/Q5HlMd3JFxsE1ozGHkI//M5+MJxDhiTeLiZ+Q4HlnjuYwDqQuAKcRFeSZM9AEXBJtTz4oXkTVmof2mZXpuLoLdAk4sE7BQdlvrB23LzxzvgK4VAGc6Wuya32a+BQOCb67FXXLs8HA142dMyzGgH0z6HP0GGzxcma0o8l96BCUrYlQWVR3FxoiqaapMWHdoeQ9vkiLnyNdHNPFfsPhnhDYEhJGvgTpGuTGq4axpfgHDYbDqQpHzVgAAAABJRU5ErkJggg==" /***/ }), /***/ "CVrl": /***/ (function(module, exports) { module.exports = "data:image/png;base64,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" /***/ }), /***/ "CXoh": /***/ (function(module, exports, __webpack_require__) { var MediaQuery = __webpack_require__("t+OW"); var Util = __webpack_require__("xFob"); var each = Util.each; var isFunction = Util.isFunction; var isArray = Util.isArray; /** * Allows for registration of query handlers. * Manages the query handler's state and is responsible for wiring up browser events * * @constructor */ function MediaQueryDispatch () { if(!window.matchMedia) { throw new Error('matchMedia not present, legacy browsers require a polyfill'); } this.queries = {}; this.browserIsIncapable = !window.matchMedia('only all').matches; } MediaQueryDispatch.prototype = { constructor : MediaQueryDispatch, /** * Registers a handler for the given media query * * @param {string} q the media query * @param {object || Array || Function} options either a single query handler object, a function, or an array of query handlers * @param {function} options.match fired when query matched * @param {function} [options.unmatch] fired when a query is no longer matched * @param {function} [options.setup] fired when handler first triggered * @param {boolean} [options.deferSetup=false] whether setup should be run immediately or deferred until query is first matched * @param {boolean} [shouldDegrade=false] whether this particular media query should always run on incapable browsers */ register : function(q, options, shouldDegrade) { var queries = this.queries, isUnconditional = shouldDegrade && this.browserIsIncapable; if(!queries[q]) { queries[q] = new MediaQuery(q, isUnconditional); } //normalise to object in an array if(isFunction(options)) { options = { match : options }; } if(!isArray(options)) { options = [options]; } each(options, function(handler) { if (isFunction(handler)) { handler = { match : handler }; } queries[q].addHandler(handler); }); return this; }, /** * unregisters a query and all it's handlers, or a specific handler for a query * * @param {string} q the media query to target * @param {object || function} [handler] specific handler to unregister */ unregister : function(q, handler) { var query = this.queries[q]; if(query) { if(handler) { query.removeHandler(handler); } else { query.clear(); delete this.queries[q]; } } return this; } }; module.exports = MediaQueryDispatch; /***/ }), /***/ "Cc6B": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); // EXTERNAL MODULE: ./node_modules/react/index.js var react = __webpack_require__("GiK3"); var react_default = /*#__PURE__*/__webpack_require__.n(react); // EXTERNAL MODULE: ./node_modules/prop-types/index.js var prop_types = __webpack_require__("KSGD"); var prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types); // CONCATENATED MODULE: ./node_modules/react-audio-analyser/lib/AudioAnalyser/audioConvertWav.js /** * Created by j_bleach on 2018/8/25. */ function audioBufferToWav(buffer) { var opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; var numChannels = buffer.numberOfChannels; var sampleRate = opt.sampleRate || buffer.sampleRate; var format = opt.float32 ? 3 : 1; var bitDepth = format === 3 ? 32 : 16; var result = void 0; if (numChannels === 2) { result = interleave(buffer.getChannelData(0), buffer.getChannelData(1)); } else { result = buffer.getChannelData(0); } return encodeWAV(result, format, sampleRate, numChannels, bitDepth); } function encodeWAV(samples, format, sampleRate, numChannels, bitDepth) { var bytesPerSample = bitDepth / 8; var blockAlign = numChannels * bytesPerSample; var buffer = new ArrayBuffer(44 + samples.length * bytesPerSample); var view = new DataView(buffer); /* RIFF identifier */ writeString(view, 0, "RIFF"); /* RIFF chunk length */ view.setUint32(4, 36 + samples.length * bytesPerSample, true); /* RIFF type */ writeString(view, 8, "WAVE"); /* format chunk identifier */ writeString(view, 12, "fmt "); /* format chunk length */ view.setUint32(16, 16, true); /* sample format (raw) */ view.setUint16(20, format, true); /* channel count */ view.setUint16(22, numChannels, true); /* sample rate */ view.setUint32(24, sampleRate, true); /* byte rate (sample rate * block align) */ view.setUint32(28, sampleRate * blockAlign, true); /* block align (channel count * bytes per sample) */ view.setUint16(32, blockAlign, true); /* bits per sample */ view.setUint16(34, bitDepth, true); /* data chunk identifier */ writeString(view, 36, "data"); /* data chunk length */ view.setUint32(40, samples.length * bytesPerSample, true); if (format === 1) { // Raw PCM floatTo16BitPCM(view, 44, samples); } else { writeFloat32(view, 44, samples); } return buffer; } function interleave(inputL, inputR) { var length = inputL.length + inputR.length; var result = new Float32Array(length); var index = 0; var inputIndex = 0; while (index < length) { result[index++] = inputL[inputIndex]; result[index++] = inputR[inputIndex]; inputIndex++; } return result; } function writeFloat32(output, offset, input) { for (var i = 0; i < input.length; i++, offset += 4) { output.setFloat32(offset, input[i], true); } } function floatTo16BitPCM(output, offset, input) { for (var i = 0; i < input.length; i++, offset += 2) { var s = Math.max(-1, Math.min(1, input[i])); output.setInt16(offset, s < 0 ? s * 0x8000 : s * 0x7FFF, true); } } function writeString(view, offset, string) { for (var i = 0; i < string.length; i++) { view.setUint8(offset + i, string.charCodeAt(i)); } } /* harmony default export */ var audioConvertWav = (audioBufferToWav); //# sourceMappingURL=audioConvertWav.js.map // EXTERNAL MODULE: ./node_modules/react-audio-analyser/lib/AudioAnalyser/mp3worker.js var mp3worker = __webpack_require__("VfRB"); var mp3worker_default = /*#__PURE__*/__webpack_require__.n(mp3worker); // CONCATENATED MODULE: ./node_modules/react-audio-analyser/lib/AudioAnalyser/MediaRecorder.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"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /** * @author j_bleach 2018/8/18 * @describe 媒体记录(包含开始,暂停,停止等媒体流及回调操作) * @param Target 被装饰类(AudioAnalyser) */ var MediaRecorder_MediaRecorderFn = function MediaRecorderFn(Target) { var _class, _temp; var constraints = { audio: true }; var mp3Worker = new Worker(mp3worker_default.a); return _temp = _class = function (_Target) { _inherits(MediaRecorderClass, _Target); // 音频上下文 // 音频信息存储对象 function MediaRecorderClass(props) { _classCallCheck(this, MediaRecorderClass); var _this = _possibleConstructorReturn(this, (MediaRecorderClass.__proto__ || Object.getPrototypeOf(MediaRecorderClass)).call(this, props)); _this.startAudio = function () { var recorder = MediaRecorderClass.mediaRecorder; if (!recorder || recorder && recorder.state === "inactive") { navigator.mediaDevices.getUserMedia(constraints).then(function (stream) { _this.recordAudio(stream); }).catch(function (err) { MediaRecorderClass.checkAndExecFn(_this.props.errorCallback, err); // throw new Error("getUserMedia failed:", err); }); return false; } if (recorder && recorder.state === "paused") { MediaRecorderClass.resumeAudio(); } }; _this.pauseAudio = function () { var recorder = MediaRecorderClass.mediaRecorder; if (recorder && recorder.state === "recording") { recorder.pause(); recorder.onpause = function () { MediaRecorderClass.checkAndExecFn(_this.props.pauseCallback); }; MediaRecorderClass.audioCtx.suspend(); } }; _this.stopAudio = function () { var _this$props = _this.props, audioType = _this$props.audioType, audioOptions = _this$props.audioOptions; var recorder = MediaRecorderClass.mediaRecorder; if (recorder && ["recording", "paused"].includes(recorder.state)) { recorder.stop(); recorder.onstop = function () { MediaRecorderClass.audioStream2Blob(audioType, audioOptions, _this.props.stopCallback); MediaRecorderClass.audioChunk = []; // 结束后,清空音频存储 }; MediaRecorderClass.audioCtx.suspend(); _this.initCanvas(); } }; MediaRecorderClass.compatibility(); _this.analyser = MediaRecorderClass.audioCtx.createAnalyser(); return _this; } /** * @author j_bleach 2018/08/02 17:06 * @describe 浏览器navigator.mediaDevices兼容性处理 */ // 媒体记录对象 _createClass(MediaRecorderClass, [{ key: "recordAudio", /** * @author j_bleach 2018/8/18 * @describe mediaRecorder音频记录 * @param stream: binary data 音频流 */ value: function recordAudio(stream) { var _this2 = this; var _props = this.props, audioBitsPerSecond = _props.audioBitsPerSecond, mimeType = _props.mimeType, timeslice = _props.timeslice; MediaRecorderClass.mediaRecorder = new MediaRecorder(stream, { audioBitsPerSecond: audioBitsPerSecond, mimeType: mimeType }); MediaRecorderClass.mediaRecorder.ondataavailable = function (event) { MediaRecorderClass.checkAndExecFn(_this2.props.onRecordCallback, event.data); MediaRecorderClass.audioChunk.push(event.data); }; MediaRecorderClass.audioCtx.resume(); MediaRecorderClass.mediaRecorder.start(timeslice); MediaRecorderClass.mediaRecorder.onstart = function (e) { MediaRecorderClass.checkAndExecFn(_this2.props.startCallback, e); }; MediaRecorderClass.mediaRecorder.onresume = function (e) { _this2.initAudioAnalyser(stream); MediaRecorderClass.checkAndExecFn(_this2.props.startCallback, e); }; MediaRecorderClass.mediaRecorder.onerror = function (e) { MediaRecorderClass.checkAndExecFn(_this2.props.errorCallback, e); }; this.initAudioAnalyser(stream); this.renderCurve(this.analyser); } /** * @author j_bleach 2019/10/31 * @describe 重置音频上下文(解决谷歌浏览器 音频数组链接断开问题) */ }, { key: "initAudioAnalyser", value: function initAudioAnalyser(stream) { this.analyser = MediaRecorderClass.audioCtx.createAnalyser(); var source = MediaRecorderClass.audioCtx.createMediaStreamSource(stream); source.connect(this.analyser); } /** * @author j_bleach 2018/8/19 * @describe 恢复录音 */ }], [{ key: "compatibility", value: function compatibility() { var _this3 = this; var promisifiedOldGUM = function promisifiedOldGUM(constraints) { // First get ahold of getUserMedia, if present var getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia; // Some browsers just don't implement it - return a rejected promise with an error // to keep a consistent interface if (!getUserMedia) { MediaRecorderClass.checkAndExecFn(_this3.props.errorCallback); return Promise.reject(new Error("getUserMedia is not implemented in this browser")); } // Otherwise, wrap the call to the old navigator.getUserMedia with a Promise return new Promise(function (resolve, reject) { getUserMedia.call(navigator, constraints, resolve, reject); }); }; // Older browsers might not implement mediaDevices at all, so we set an empty object first if (navigator.mediaDevices === undefined) { navigator.mediaDevices = {}; } // Some browsers partially implement mediaDevices. We can't just assign an object // with getUserMedia as it would overwrite existing properties. // Here, we will just add the getUserMedia property if it's missing. if (navigator.mediaDevices.getUserMedia === undefined) { navigator.mediaDevices.getUserMedia = promisifiedOldGUM; } } /** * @author j_bleach 2018/8/19 * @describe 验证函数,如果存在即执行 * @param fn: function 被验证函数 * @param e: object 事件对象 event object */ }, { key: "checkAndExecFn", value: function checkAndExecFn(fn, e) { typeof fn === "function" && fn(e); } /** * @author j_bleach 2018/8/19 * @describe 音频流转blob对象 * @param type: string 音频的mime-type * @param cb: function 录音停止回调 */ }, { key: "audioStream2Blob", value: function audioStream2Blob(type, audioOptions, cb) { var wavBlob = null; var chunk = MediaRecorderClass.audioChunk; var audioWav = function audioWav() { var fr = new FileReader(); fr.readAsArrayBuffer(new Blob(chunk, { type: type })); var frOnload = function frOnload(e) { var buffer = e.target.result; MediaRecorderClass.audioCtx.decodeAudioData(buffer).then(function (data) { wavBlob = new Blob([new DataView(audioConvertWav(data, audioOptions))], { type: "audio/wav" }); MediaRecorderClass.checkAndExecFn(cb, wavBlob); }); }; fr.onload = frOnload; }; var audioMp3 = function audioMp3() { var fr = new FileReader(); fr.readAsArrayBuffer(new Blob(chunk, { type: "audio/wav" })); var frOnload = function frOnload(e) { var buffer = e.target.result; MediaRecorderClass.audioCtx.decodeAudioData(buffer).then(function (data) { var wavBuf = audioConvertWav(data, audioOptions); mp3Worker.postMessage({ cmd: "init", config: { bitRate: 128 } }); mp3Worker.postMessage({ cmd: "encode", rawInput: wavBuf }); mp3Worker.postMessage({ cmd: "finish" }); mp3Worker.onmessage = function (e) { if (e.data.cmd == "end") { var mp3Blob = new Blob(e.data.buf, { type: type }); MediaRecorderClass.checkAndExecFn(cb, mp3Blob); } }; }); }; fr.onload = frOnload; }; switch (type) { case "audio/webm": MediaRecorderClass.checkAndExecFn(cb, new Blob(chunk, { type: type })); break; case "audio/wav": audioWav(); break; case "audio/mp3": audioMp3(); break; default: return void 0; } } /** * @author j_bleach 2018/8/18 * @describe 开始录音 */ /** * @author j_bleach 2018/8/19 * @describe 暂停录音 */ /** * @author j_bleach 2018/8/18 * @describe 停止录音 */ }, { key: "resumeAudio", value: function resumeAudio() { MediaRecorderClass.audioCtx.resume(); MediaRecorderClass.mediaRecorder.resume(); } }]); return MediaRecorderClass; }(Target), _class.audioChunk = [], _class.mediaRecorder = null, _class.audioCtx = new (window.AudioContext || window.webkitAudioContext)(), _temp; }; /* harmony default export */ var AudioAnalyser_MediaRecorder = (MediaRecorder_MediaRecorderFn); //# sourceMappingURL=MediaRecorder.js.map // CONCATENATED MODULE: ./node_modules/react-audio-analyser/lib/AudioAnalyser/RenderCanvas.js var RenderCanvas__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 RenderCanvas__classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function RenderCanvas__possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function RenderCanvas__inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /** * Created by j_bleach on 2018/8/6. */ var RenderCanvas_RenderCanvas = function RenderCanvas(Target) { var _class, _temp2; return _temp2 = _class = function (_Target) { RenderCanvas__inherits(RenderCanvasClass, _Target); function RenderCanvasClass() { var _ref; var _temp, _this, _ret; RenderCanvas__classCallCheck(this, RenderCanvasClass); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _ret = (_temp = (_this = RenderCanvas__possibleConstructorReturn(this, (_ref = RenderCanvasClass.__proto__ || Object.getPrototypeOf(RenderCanvasClass)).call.apply(_ref, [this].concat(args))), _this), _this.renderCurve = function () { var _this$props = _this.props, height = _this$props.height, width = _this$props.width; RenderCanvasClass.animationId = window.requestAnimationFrame(_this.renderCurve); // 定时动画 var bufferLength = _this.analyser.fftSize; // 默认为2048 var dataArray = new Uint8Array(bufferLength); // console.log("data",dataArray) _this.analyser.getByteTimeDomainData(dataArray); // 将音频信息存储在长度为2048(默认)的类型数组(dataArray) _this.configCanvas(); var sliceWidth = Number(width) / bufferLength; var x = 0; RenderCanvasClass.canvasCtx.moveTo(x, height / 2); for (var i = 0; i < bufferLength; i++) { var v = dataArray[i] / 128.0; var y = v * height / 2; RenderCanvasClass.canvasCtx["lineTo"](x, y); x += sliceWidth; } RenderCanvasClass.canvasCtx.lineTo(width, height / 2); RenderCanvasClass.canvasCtx.stroke(); }, _temp), RenderCanvas__possibleConstructorReturn(_this, _ret); } // react ref // canvas 上下文 RenderCanvas__createClass(RenderCanvasClass, [{ key: "componentDidMount", value: function componentDidMount() { this.initCanvas(); } }, { key: "componentWillUnmount", value: function componentWillUnmount() { window.cancelAnimationFrame(RenderCanvasClass.animationId); //组件销毁前,注销定时动画 } /** * @author j_bleach 2018/8/18 * @describe canvas 配置 */ }, { key: "configCanvas", value: function configCanvas() { var _props = this.props, height = _props.height, width = _props.width, backgroundColor = _props.backgroundColor, strokeColor = _props.strokeColor; var canvas = RenderCanvasClass.canvasRef.current; RenderCanvasClass.canvasCtx = canvas.getContext("2d"); RenderCanvasClass.canvasCtx.clearRect(0, 0, width, height); RenderCanvasClass.canvasCtx.fillStyle = backgroundColor; RenderCanvasClass.canvasCtx.fillRect(0, 0, width, height); RenderCanvasClass.canvasCtx.lineWidth = 2; RenderCanvasClass.canvasCtx.strokeStyle = strokeColor; RenderCanvasClass.canvasCtx.beginPath(); } /** * @author j_bleach 2018/8/18 * @describe 画布初始化,停止动画 */ }, { key: "initCanvas", value: function initCanvas() { window.cancelAnimationFrame(RenderCanvasClass.animationId); var _props2 = this.props, height = _props2.height, width = _props2.width; this.configCanvas(); RenderCanvasClass.canvasCtx.moveTo(0, height / 2); RenderCanvasClass.canvasCtx.lineTo(width, height / 2); RenderCanvasClass.canvasCtx.stroke(); } /** * @author j_bleach 2018/8/18 * @describe 动态绘制音频曲线 */ }, { key: "renderCanvas", /** * @author j_bleach 2018/8/18 * @describe 初始化渲染canvas节点 */ value: function renderCanvas() { var _props3 = this.props, height = _props3.height, width = _props3.width; return react_default.a.createElement("canvas", { ref: RenderCanvasClass.canvasRef, height: height, width: width, style: { width: width, height: height } }); } }]); return RenderCanvasClass; }(Target), _class.canvasRef = react_default.a.createRef(), _class.canvasCtx = null, _class.animationId = null, _temp2; }; /* harmony default export */ var AudioAnalyser_RenderCanvas = (RenderCanvas_RenderCanvas); //# sourceMappingURL=RenderCanvas.js.map // CONCATENATED MODULE: ./node_modules/react-audio-analyser/lib/AudioAnalyser/index.js var AudioAnalyser__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; }; }(); var AudioAnalyser__class; function AudioAnalyser__classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function AudioAnalyser__possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function AudioAnalyser__inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /** * Created by j_bleach on 2018/8/1. */ // import "./index.css"; var AudioAnalyser_AudioAnalyser = AudioAnalyser_MediaRecorder(AudioAnalyser__class = AudioAnalyser_RenderCanvas(AudioAnalyser__class = function (_Component) { AudioAnalyser__inherits(AudioAnalyser, _Component); function AudioAnalyser() { AudioAnalyser__classCallCheck(this, AudioAnalyser); return AudioAnalyser__possibleConstructorReturn(this, (AudioAnalyser.__proto__ || Object.getPrototypeOf(AudioAnalyser)).apply(this, arguments)); } AudioAnalyser__createClass(AudioAnalyser, [{ key: "componentDidUpdate", value: function componentDidUpdate(prevProps) { if (this.props.status !== prevProps.status) { var event = { inactive: this.stopAudio, recording: this.startAudio, paused: this.pauseAudio }[this.props.status]; event && event(); } } }, { key: "render", value: function render() { var _props = this.props, children = _props.children, className = _props.className, audioSrc = _props.audioSrc; return react_default.a.createElement( "div", { className: className }, react_default.a.createElement( "div", null, this.renderCanvas() ), children, audioSrc && react_default.a.createElement( "div", null, react_default.a.createElement("audio", { controls: true, src: audioSrc }) ) ); } }]); return AudioAnalyser; }(react["Component"])) || AudioAnalyser__class) || AudioAnalyser__class; AudioAnalyser_AudioAnalyser.defaultProps = { status: "", audioSrc: "", backgroundColor: "rgba(0, 0, 0, 1)", strokeColor: "#ffffff", className: "audioContainer", audioBitsPerSecond: 128000, mimeType: "audio/webm", audioType: "audio/webm", audioOptions: {}, width: 500, height: 100 }; AudioAnalyser_AudioAnalyser.propTypes = { status: prop_types_default.a.string, audioSrc: prop_types_default.a.string, backgroundColor: prop_types_default.a.string, strokeColor: prop_types_default.a.string, className: prop_types_default.a.string, audioBitsPerSecond: prop_types_default.a.number, audioType: prop_types_default.a.string, audioOptions: prop_types_default.a.object, width: prop_types_default.a.number, height: prop_types_default.a.number, timeslice: prop_types_default.a.number, startCallback: prop_types_default.a.func, pauseCallback: prop_types_default.a.func, stopCallback: prop_types_default.a.func, onRecordCallback: prop_types_default.a.func }; /* harmony default export */ var lib_AudioAnalyser = (AudioAnalyser_AudioAnalyser); //# sourceMappingURL=index.js.map // CONCATENATED MODULE: ./node_modules/react-audio-analyser/lib/index.js /** * Created by j_bleach on 2018/8/1. */ /* harmony default export */ var lib = __webpack_exports__["default"] = (lib_AudioAnalyser); //# sourceMappingURL=index.js.map /***/ }), /***/ "CdOH": /***/ (function(module, exports) { // removed by extract-text-webpack-plugin /***/ }), /***/ "CpD9": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); __webpack_require__("yQBS"); var _tabs = _interopRequireDefault(__webpack_require__("qA/u")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); var _PersonList = _interopRequireDefault(__webpack_require__("QBvF")); var _AttendanceList = _interopRequireDefault(__webpack_require__("2CEz")); var _dva = __webpack_require__("S6G3"); var _func = __webpack_require__("PmMp"); __webpack_require__("d4VB"); var _dec, _class; function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } var TabPane = _tabs.default.TabPane; var EventListTab = exports.default = (_dec = (0, _dva.connect)(function (state) { return { selectedId: state.command.policeData.selectedId, mapStyle: state.command.mapStyle }; }), _dec(_class = /*#__PURE__*/function (_PureComponent) { function EventListTab(props) { var _this; (0, _classCallCheck2.default)(this, EventListTab); _this = _callSuper(this, EventListTab, [props]); _this.state = { clickTab: '1' //当前是哪个tab }; return _this; } (0, _inherits2.default)(EventListTab, _PureComponent); return (0, _createClass2.default)(EventListTab, [{ key: "render", value: function render() { var _this2 = this; var mapStyle = this.props.mapStyle; return /*#__PURE__*/_react.default.createElement("div", { className: mapStyle + " EventListTab", style: { opacity: '0.8' } }, /*#__PURE__*/_react.default.createElement("div", { className: "drawer_container_tab", style: { boxShadow: "unset", width: '294px' } }, /*#__PURE__*/_react.default.createElement(_tabs.default, { // defaultActiveKey={"2"} onChange: function onChange(index) { if (_this2.props.selectedId) { _this2.props.dispatch({ type: "command/setPoliceSelectIndex", payload: null }); } _this2.setState({ clickTab: index //用于关掉别的tab的打点信息 }); } }, /*#__PURE__*/_react.default.createElement(TabPane, { tab: "\u4EBA\u5458\u4FE1\u606F", key: "1" }, /*#__PURE__*/_react.default.createElement(_PersonList.default, { clickTab: this.state.clickTab, _thisGIS: this.props._thisGIS, addPoliceMarks: function addPoliceMarks(addData, place, tab) { //打点 _func.policeAddPictueMarks.call(_this2.props._thisGIS, addData, place, tab); }, reducePoliceMarks: function reducePoliceMarks(reduceData, place, tab) { _func.policeReduceMarks.call(_this2.props._thisGIS, reduceData, place, tab); } })), /*#__PURE__*/_react.default.createElement(TabPane, { tab: "\u9A7B\u52E4\u4FE1\u606F", key: "2" }, /*#__PURE__*/_react.default.createElement(_AttendanceList.default, { clickTab: this.state.clickTab, _thisGIS: this.props._thisGIS, addPoliceMarks: function addPoliceMarks(addData, place, tab) { //打点 _func.policeAddPictueMarks.call(_this2.props._thisGIS, addData, place, tab); }, reducePoliceMarks: function reducePoliceMarks(reduceData, place, tab) { _func.policeReduceMarks.call(_this2.props._thisGIS, reduceData, place, tab); } }))))); } }]); }(_react.PureComponent)) || _class); /***/ }), /***/ "DAm7": /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 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; }; }(); var _react = __webpack_require__("GiK3"); var _react2 = _interopRequireDefault(_react); var _PropTypes = __webpack_require__("0ymm"); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Provider = function (_Component) { _inherits(Provider, _Component); function Provider() { _classCallCheck(this, Provider); return _possibleConstructorReturn(this, (Provider.__proto__ || Object.getPrototypeOf(Provider)).apply(this, arguments)); } _createClass(Provider, [{ key: 'getChildContext', value: function getChildContext() { return { miniStore: this.props.store }; } }, { key: 'render', value: function render() { return _react.Children.only(this.props.children); } }]); return Provider; }(_react.Component); Provider.propTypes = { store: _PropTypes.storeShape.isRequired }; Provider.childContextTypes = { miniStore: _PropTypes.storeShape.isRequired }; exports.default = Provider; /***/ }), /***/ "DN4D": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAXCAYAAAAP6L+eAAABE0lEQVRIS+3UPUoEQRCG4fdzQTDxEoYLm3kE1ysIXkBMNjVbMTMx3QMogkfQAyiGgoHgHVZNdhOhpKSVceyfmdEJBBsmmaGfqq6qHtHTUk8u//BnZb+VwsxWgSPgEbgGHiRZ217E4CFwX4HmwE14PNCtpEUpUAxeAZ6A9cTmV+AOOJF0ngoQnQozuwTGhayOJR20hafAYQaeSdrPBU5l7Nl61rFVRH1TCvb6etMGNdnfbUh6bt28jw1m5g0aVYALYDuM4biEJ6+0mc2AvQC/H9/MNoGrJngO3gXOgC81bYrnYJ/nndisNsE7/91q+Jakl2pDO8OOBNzHciLp9NfggK9JWtbH70cZt755peFv8v3vZfwG3rZiGGjLD8EAAAAASUVORK5CYII=" /***/ }), /***/ "DRaW": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony export (immutable) */ __webpack_exports__["parse"] = parse; /* harmony export (immutable) */ __webpack_exports__["lift"] = lift; /* harmony export (immutable) */ __webpack_exports__["toHex"] = toHex; /* harmony export (immutable) */ __webpack_exports__["fastLerp"] = fastLerp; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fastMapToColor", function() { return fastMapToColor; }); /* harmony export (immutable) */ __webpack_exports__["lerp"] = lerp; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mapToColor", function() { return mapToColor; }); /* harmony export (immutable) */ __webpack_exports__["modifyHSL"] = modifyHSL; /* harmony export (immutable) */ __webpack_exports__["modifyAlpha"] = modifyAlpha; /* harmony export (immutable) */ __webpack_exports__["stringify"] = stringify; /* harmony export (immutable) */ __webpack_exports__["lum"] = lum; /* harmony export (immutable) */ __webpack_exports__["random"] = random; /* harmony export (immutable) */ __webpack_exports__["liftColor"] = liftColor; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__core_LRU_js__ = __webpack_require__("zMj2"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__core_util_js__ = __webpack_require__("/gxq"); var kCSSColorTable = { 'transparent': [0, 0, 0, 0], 'aliceblue': [240, 248, 255, 1], 'antiquewhite': [250, 235, 215, 1], 'aqua': [0, 255, 255, 1], 'aquamarine': [127, 255, 212, 1], 'azure': [240, 255, 255, 1], 'beige': [245, 245, 220, 1], 'bisque': [255, 228, 196, 1], 'black': [0, 0, 0, 1], 'blanchedalmond': [255, 235, 205, 1], 'blue': [0, 0, 255, 1], 'blueviolet': [138, 43, 226, 1], 'brown': [165, 42, 42, 1], 'burlywood': [222, 184, 135, 1], 'cadetblue': [95, 158, 160, 1], 'chartreuse': [127, 255, 0, 1], 'chocolate': [210, 105, 30, 1], 'coral': [255, 127, 80, 1], 'cornflowerblue': [100, 149, 237, 1], 'cornsilk': [255, 248, 220, 1], 'crimson': [220, 20, 60, 1], 'cyan': [0, 255, 255, 1], 'darkblue': [0, 0, 139, 1], 'darkcyan': [0, 139, 139, 1], 'darkgoldenrod': [184, 134, 11, 1], 'darkgray': [169, 169, 169, 1], 'darkgreen': [0, 100, 0, 1], 'darkgrey': [169, 169, 169, 1], 'darkkhaki': [189, 183, 107, 1], 'darkmagenta': [139, 0, 139, 1], 'darkolivegreen': [85, 107, 47, 1], 'darkorange': [255, 140, 0, 1], 'darkorchid': [153, 50, 204, 1], 'darkred': [139, 0, 0, 1], 'darksalmon': [233, 150, 122, 1], 'darkseagreen': [143, 188, 143, 1], 'darkslateblue': [72, 61, 139, 1], 'darkslategray': [47, 79, 79, 1], 'darkslategrey': [47, 79, 79, 1], 'darkturquoise': [0, 206, 209, 1], 'darkviolet': [148, 0, 211, 1], 'deeppink': [255, 20, 147, 1], 'deepskyblue': [0, 191, 255, 1], 'dimgray': [105, 105, 105, 1], 'dimgrey': [105, 105, 105, 1], 'dodgerblue': [30, 144, 255, 1], 'firebrick': [178, 34, 34, 1], 'floralwhite': [255, 250, 240, 1], 'forestgreen': [34, 139, 34, 1], 'fuchsia': [255, 0, 255, 1], 'gainsboro': [220, 220, 220, 1], 'ghostwhite': [248, 248, 255, 1], 'gold': [255, 215, 0, 1], 'goldenrod': [218, 165, 32, 1], 'gray': [128, 128, 128, 1], 'green': [0, 128, 0, 1], 'greenyellow': [173, 255, 47, 1], 'grey': [128, 128, 128, 1], 'honeydew': [240, 255, 240, 1], 'hotpink': [255, 105, 180, 1], 'indianred': [205, 92, 92, 1], 'indigo': [75, 0, 130, 1], 'ivory': [255, 255, 240, 1], 'khaki': [240, 230, 140, 1], 'lavender': [230, 230, 250, 1], 'lavenderblush': [255, 240, 245, 1], 'lawngreen': [124, 252, 0, 1], 'lemonchiffon': [255, 250, 205, 1], 'lightblue': [173, 216, 230, 1], 'lightcoral': [240, 128, 128, 1], 'lightcyan': [224, 255, 255, 1], 'lightgoldenrodyellow': [250, 250, 210, 1], 'lightgray': [211, 211, 211, 1], 'lightgreen': [144, 238, 144, 1], 'lightgrey': [211, 211, 211, 1], 'lightpink': [255, 182, 193, 1], 'lightsalmon': [255, 160, 122, 1], 'lightseagreen': [32, 178, 170, 1], 'lightskyblue': [135, 206, 250, 1], 'lightslategray': [119, 136, 153, 1], 'lightslategrey': [119, 136, 153, 1], 'lightsteelblue': [176, 196, 222, 1], 'lightyellow': [255, 255, 224, 1], 'lime': [0, 255, 0, 1], 'limegreen': [50, 205, 50, 1], 'linen': [250, 240, 230, 1], 'magenta': [255, 0, 255, 1], 'maroon': [128, 0, 0, 1], 'mediumaquamarine': [102, 205, 170, 1], 'mediumblue': [0, 0, 205, 1], 'mediumorchid': [186, 85, 211, 1], 'mediumpurple': [147, 112, 219, 1], 'mediumseagreen': [60, 179, 113, 1], 'mediumslateblue': [123, 104, 238, 1], 'mediumspringgreen': [0, 250, 154, 1], 'mediumturquoise': [72, 209, 204, 1], 'mediumvioletred': [199, 21, 133, 1], 'midnightblue': [25, 25, 112, 1], 'mintcream': [245, 255, 250, 1], 'mistyrose': [255, 228, 225, 1], 'moccasin': [255, 228, 181, 1], 'navajowhite': [255, 222, 173, 1], 'navy': [0, 0, 128, 1], 'oldlace': [253, 245, 230, 1], 'olive': [128, 128, 0, 1], 'olivedrab': [107, 142, 35, 1], 'orange': [255, 165, 0, 1], 'orangered': [255, 69, 0, 1], 'orchid': [218, 112, 214, 1], 'palegoldenrod': [238, 232, 170, 1], 'palegreen': [152, 251, 152, 1], 'paleturquoise': [175, 238, 238, 1], 'palevioletred': [219, 112, 147, 1], 'papayawhip': [255, 239, 213, 1], 'peachpuff': [255, 218, 185, 1], 'peru': [205, 133, 63, 1], 'pink': [255, 192, 203, 1], 'plum': [221, 160, 221, 1], 'powderblue': [176, 224, 230, 1], 'purple': [128, 0, 128, 1], 'red': [255, 0, 0, 1], 'rosybrown': [188, 143, 143, 1], 'royalblue': [65, 105, 225, 1], 'saddlebrown': [139, 69, 19, 1], 'salmon': [250, 128, 114, 1], 'sandybrown': [244, 164, 96, 1], 'seagreen': [46, 139, 87, 1], 'seashell': [255, 245, 238, 1], 'sienna': [160, 82, 45, 1], 'silver': [192, 192, 192, 1], 'skyblue': [135, 206, 235, 1], 'slateblue': [106, 90, 205, 1], 'slategray': [112, 128, 144, 1], 'slategrey': [112, 128, 144, 1], 'snow': [255, 250, 250, 1], 'springgreen': [0, 255, 127, 1], 'steelblue': [70, 130, 180, 1], 'tan': [210, 180, 140, 1], 'teal': [0, 128, 128, 1], 'thistle': [216, 191, 216, 1], 'tomato': [255, 99, 71, 1], 'turquoise': [64, 224, 208, 1], 'violet': [238, 130, 238, 1], 'wheat': [245, 222, 179, 1], 'white': [255, 255, 255, 1], 'whitesmoke': [245, 245, 245, 1], 'yellow': [255, 255, 0, 1], 'yellowgreen': [154, 205, 50, 1] }; function clampCssByte(i) { i = Math.round(i); return i < 0 ? 0 : i > 255 ? 255 : i; } function clampCssAngle(i) { i = Math.round(i); return i < 0 ? 0 : i > 360 ? 360 : i; } function clampCssFloat(f) { return f < 0 ? 0 : f > 1 ? 1 : f; } function parseCssInt(val) { var str = val; if (str.length && str.charAt(str.length - 1) === '%') { return clampCssByte(parseFloat(str) / 100 * 255); } return clampCssByte(parseInt(str, 10)); } function parseCssFloat(val) { var str = val; if (str.length && str.charAt(str.length - 1) === '%') { return clampCssFloat(parseFloat(str) / 100); } return clampCssFloat(parseFloat(str)); } function cssHueToRgb(m1, m2, h) { if (h < 0) { h += 1; } else if (h > 1) { h -= 1; } if (h * 6 < 1) { return m1 + (m2 - m1) * h * 6; } if (h * 2 < 1) { return m2; } if (h * 3 < 2) { return m1 + (m2 - m1) * (2 / 3 - h) * 6; } return m1; } function lerpNumber(a, b, p) { return a + (b - a) * p; } function setRgba(out, r, g, b, a) { out[0] = r; out[1] = g; out[2] = b; out[3] = a; return out; } function copyRgba(out, a) { out[0] = a[0]; out[1] = a[1]; out[2] = a[2]; out[3] = a[3]; return out; } var colorCache = new __WEBPACK_IMPORTED_MODULE_0__core_LRU_js__["a" /* default */](20); var lastRemovedArr = null; function putToCache(colorStr, rgbaArr) { if (lastRemovedArr) { copyRgba(lastRemovedArr, rgbaArr); } lastRemovedArr = colorCache.put(colorStr, lastRemovedArr || (rgbaArr.slice())); } function parse(colorStr, rgbaArr) { if (!colorStr) { return; } rgbaArr = rgbaArr || []; var cached = colorCache.get(colorStr); if (cached) { return copyRgba(rgbaArr, cached); } colorStr = colorStr + ''; var str = colorStr.replace(/ /g, '').toLowerCase(); if (str in kCSSColorTable) { copyRgba(rgbaArr, kCSSColorTable[str]); putToCache(colorStr, rgbaArr); return rgbaArr; } var strLen = str.length; if (str.charAt(0) === '#') { if (strLen === 4 || strLen === 5) { var iv = parseInt(str.slice(1, 4), 16); if (!(iv >= 0 && iv <= 0xfff)) { setRgba(rgbaArr, 0, 0, 0, 1); return; } setRgba(rgbaArr, ((iv & 0xf00) >> 4) | ((iv & 0xf00) >> 8), (iv & 0xf0) | ((iv & 0xf0) >> 4), (iv & 0xf) | ((iv & 0xf) << 4), strLen === 5 ? parseInt(str.slice(4), 16) / 0xf : 1); putToCache(colorStr, rgbaArr); return rgbaArr; } else if (strLen === 7 || strLen === 9) { var iv = parseInt(str.slice(1, 7), 16); if (!(iv >= 0 && iv <= 0xffffff)) { setRgba(rgbaArr, 0, 0, 0, 1); return; } setRgba(rgbaArr, (iv & 0xff0000) >> 16, (iv & 0xff00) >> 8, iv & 0xff, strLen === 9 ? parseInt(str.slice(7), 16) / 0xff : 1); putToCache(colorStr, rgbaArr); return rgbaArr; } return; } var op = str.indexOf('('); var ep = str.indexOf(')'); if (op !== -1 && ep + 1 === strLen) { var fname = str.substr(0, op); var params = str.substr(op + 1, ep - (op + 1)).split(','); var alpha = 1; switch (fname) { case 'rgba': if (params.length !== 4) { return params.length === 3 ? setRgba(rgbaArr, +params[0], +params[1], +params[2], 1) : setRgba(rgbaArr, 0, 0, 0, 1); } alpha = parseCssFloat(params.pop()); case 'rgb': if (params.length >= 3) { setRgba(rgbaArr, parseCssInt(params[0]), parseCssInt(params[1]), parseCssInt(params[2]), params.length === 3 ? alpha : parseCssFloat(params[3])); putToCache(colorStr, rgbaArr); return rgbaArr; } else { setRgba(rgbaArr, 0, 0, 0, 1); return; } case 'hsla': if (params.length !== 4) { setRgba(rgbaArr, 0, 0, 0, 1); return; } params[3] = parseCssFloat(params[3]); hsla2rgba(params, rgbaArr); putToCache(colorStr, rgbaArr); return rgbaArr; case 'hsl': if (params.length !== 3) { setRgba(rgbaArr, 0, 0, 0, 1); return; } hsla2rgba(params, rgbaArr); putToCache(colorStr, rgbaArr); return rgbaArr; default: return; } } setRgba(rgbaArr, 0, 0, 0, 1); return; } function hsla2rgba(hsla, rgba) { var h = (((parseFloat(hsla[0]) % 360) + 360) % 360) / 360; var s = parseCssFloat(hsla[1]); var l = parseCssFloat(hsla[2]); var m2 = l <= 0.5 ? l * (s + 1) : l + s - l * s; var m1 = l * 2 - m2; rgba = rgba || []; setRgba(rgba, clampCssByte(cssHueToRgb(m1, m2, h + 1 / 3) * 255), clampCssByte(cssHueToRgb(m1, m2, h) * 255), clampCssByte(cssHueToRgb(m1, m2, h - 1 / 3) * 255), 1); if (hsla.length === 4) { rgba[3] = hsla[3]; } return rgba; } function rgba2hsla(rgba) { if (!rgba) { return; } var R = rgba[0] / 255; var G = rgba[1] / 255; var B = rgba[2] / 255; var vMin = Math.min(R, G, B); var vMax = Math.max(R, G, B); var delta = vMax - vMin; var L = (vMax + vMin) / 2; var H; var S; if (delta === 0) { H = 0; S = 0; } else { if (L < 0.5) { S = delta / (vMax + vMin); } else { S = delta / (2 - vMax - vMin); } var deltaR = (((vMax - R) / 6) + (delta / 2)) / delta; var deltaG = (((vMax - G) / 6) + (delta / 2)) / delta; var deltaB = (((vMax - B) / 6) + (delta / 2)) / delta; if (R === vMax) { H = deltaB - deltaG; } else if (G === vMax) { H = (1 / 3) + deltaR - deltaB; } else if (B === vMax) { H = (2 / 3) + deltaG - deltaR; } if (H < 0) { H += 1; } if (H > 1) { H -= 1; } } var hsla = [H * 360, S, L]; if (rgba[3] != null) { hsla.push(rgba[3]); } return hsla; } function lift(color, level) { var colorArr = parse(color); if (colorArr) { for (var i = 0; i < 3; i++) { if (level < 0) { colorArr[i] = colorArr[i] * (1 - level) | 0; } else { colorArr[i] = ((255 - colorArr[i]) * level + colorArr[i]) | 0; } if (colorArr[i] > 255) { colorArr[i] = 255; } else if (colorArr[i] < 0) { colorArr[i] = 0; } } return stringify(colorArr, colorArr.length === 4 ? 'rgba' : 'rgb'); } } function toHex(color) { var colorArr = parse(color); if (colorArr) { return ((1 << 24) + (colorArr[0] << 16) + (colorArr[1] << 8) + (+colorArr[2])).toString(16).slice(1); } } function fastLerp(normalizedValue, colors, out) { if (!(colors && colors.length) || !(normalizedValue >= 0 && normalizedValue <= 1)) { return; } out = out || []; var value = normalizedValue * (colors.length - 1); var leftIndex = Math.floor(value); var rightIndex = Math.ceil(value); var leftColor = colors[leftIndex]; var rightColor = colors[rightIndex]; var dv = value - leftIndex; out[0] = clampCssByte(lerpNumber(leftColor[0], rightColor[0], dv)); out[1] = clampCssByte(lerpNumber(leftColor[1], rightColor[1], dv)); out[2] = clampCssByte(lerpNumber(leftColor[2], rightColor[2], dv)); out[3] = clampCssFloat(lerpNumber(leftColor[3], rightColor[3], dv)); return out; } var fastMapToColor = fastLerp; function lerp(normalizedValue, colors, fullOutput) { if (!(colors && colors.length) || !(normalizedValue >= 0 && normalizedValue <= 1)) { return; } var value = normalizedValue * (colors.length - 1); var leftIndex = Math.floor(value); var rightIndex = Math.ceil(value); var leftColor = parse(colors[leftIndex]); var rightColor = parse(colors[rightIndex]); var dv = value - leftIndex; var color = stringify([ clampCssByte(lerpNumber(leftColor[0], rightColor[0], dv)), clampCssByte(lerpNumber(leftColor[1], rightColor[1], dv)), clampCssByte(lerpNumber(leftColor[2], rightColor[2], dv)), clampCssFloat(lerpNumber(leftColor[3], rightColor[3], dv)) ], 'rgba'); return fullOutput ? { color: color, leftIndex: leftIndex, rightIndex: rightIndex, value: value } : color; } var mapToColor = lerp; function modifyHSL(color, h, s, l) { var colorArr = parse(color); if (color) { colorArr = rgba2hsla(colorArr); h != null && (colorArr[0] = clampCssAngle(h)); s != null && (colorArr[1] = parseCssFloat(s)); l != null && (colorArr[2] = parseCssFloat(l)); return stringify(hsla2rgba(colorArr), 'rgba'); } } function modifyAlpha(color, alpha) { var colorArr = parse(color); if (colorArr && alpha != null) { colorArr[3] = clampCssFloat(alpha); return stringify(colorArr, 'rgba'); } } function stringify(arrColor, type) { if (!arrColor || !arrColor.length) { return; } var colorStr = arrColor[0] + ',' + arrColor[1] + ',' + arrColor[2]; if (type === 'rgba' || type === 'hsva' || type === 'hsla') { colorStr += ',' + arrColor[3]; } return type + '(' + colorStr + ')'; } function lum(color, backgroundLum) { var arr = parse(color); return arr ? (0.299 * arr[0] + 0.587 * arr[1] + 0.114 * arr[2]) * arr[3] / 255 + (1 - arr[3]) * backgroundLum : 0; } function random() { return stringify([ Math.round(Math.random() * 255), Math.round(Math.random() * 255), Math.round(Math.random() * 255) ], 'rgb'); } var liftedColorCache = new __WEBPACK_IMPORTED_MODULE_0__core_LRU_js__["a" /* default */](100); function liftColor(color) { if (Object(__WEBPACK_IMPORTED_MODULE_1__core_util_js__["isString"])(color)) { var liftedColor = liftedColorCache.get(color); if (!liftedColor) { liftedColor = lift(color, -0.1); liftedColorCache.put(color, liftedColor); } return liftedColor; } else if (Object(__WEBPACK_IMPORTED_MODULE_1__core_util_js__["isGradientObject"])(color)) { var ret = Object(__WEBPACK_IMPORTED_MODULE_1__core_util_js__["extend"])({}, color); ret.colorStops = Object(__WEBPACK_IMPORTED_MODULE_1__core_util_js__["map"])(color.colorStops, function (stop) { return ({ offset: stop.offset, color: lift(stop.color, -0.1) }); }); return ret; } return color; } /***/ }), /***/ "DSNT": /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__("/mHU"); /***/ }), /***/ "DT0+": /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * */ var React = __webpack_require__("GiK3"); var factory = __webpack_require__("wqO5"); if (typeof React === 'undefined') { throw Error( 'create-react-class could not find the React object. If you are using script tags, ' + 'make sure that React is being loaded before create-react-class.' ); } // Hack to grab NoopUpdateQueue from isomorphic React var ReactNoopUpdateQueue = new React.Component().updater; module.exports = factory( React.Component, React.isValidElement, ReactNoopUpdateQueue ); /***/ }), /***/ "DXmu": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAA5ZJREFUWEfFl1uIlXUUxX/LSgjUrMx6KUq7UZGWaBcML2klQRAGGhRhmRapeHkwCJroJZFoNLWIMiqKCCEKoom0yALtpR66aAZqCBINUU2j0X3LOu1Pvvk6Z+acmVPzvZ2Z/957/ffea+39F5UvIi4FFgM3AOcAo6pnWvx9BDgEvAs8J+nLsr2KHxExEngCuB8Y0WKQZo//DTwNrJb0u41qADJ4FzC7WU9DPPc+MM8gCgCbgQeG6LRV8y2Slilr/tl/mPZGwFyOyw2gE1jZKvw2nd9gAO7KS9rksFU3ewygtw1UazVwcf6IAUQL1j3AKZXzvsDR/Jvpe0bBrmb8NgPgN+ChFJGeiBgDLALWA9aOVZI2lPRkNHAlsA64eiAQzQBYKWljRCwAZgKvSfogIh4EHisARMTtwBXAfmAb4GxtBe7qD0QzAGYBfwIfZmq/B84CLga+KAF4Cbgzg1l6nYW/gH3A+EYgmgFQtXXNTwcuAz5tAMA2HZIejQhL733tAPAW8A3wKrAHeAOY0Q+A1yXNj4jlwJPtAHCNpI9zdtwCvAiM7QfATkkzI+K27Im6GBqVwNQ8PinT0tPrl7z5PTmuPcBqLIiIcg/YxM26MCLWAI8Dlt5/TdkqgB+zccZlUAP5IelmehXfVOAT4FdgbQMAKyRtiggz4e40tC9f7NTCURnAAWAvcHMpkFGfluLyFXBCMuL8zEZ3gwzsAuakrX2Wwb8DXAhMcJwygJuAF5Ji5Xp5eeiMCGvAVcDbkj6PiA7gkRIABzSwr5OyJ2ftb6wU/7vUBgPpA8AS643I9S1/1oCNgGt8GDg3zyzNmq4FNqWBM3QBMAV4GDi7Tuc9b9ApVH0A+Aa7gWeAOwaS0EH+/2VgCXAtsKOaAdd4hqTuiJgOuHvdDyfVCeb58FTuEVW2VI//AVhDOiV9FBFWxZ2ppH0yYMODwL2S3ku+u1u9J16XqZ0InAf0ShoXEbemHhRNZtZYrLxjWKbNlO2SPBe8e9rXs0UDVjNQRr4d8J7YJck3OP5FhLk8RtJP6dTLzJuAdWKOpG8r5z0x3YhWxLnV9Ay0kPyc+7w13/JrSh2Q5MasfQnIqmgG+IZnetcDJgGTgevr7BCFeW0haXUl8013p8yaOa+UtKOu2vXTsLWVbDBLqSfitJTliwbJCJvVllI/xQazlrsMJw4h+D9redZx+B4mCcCdOnxPsxKI4XmcVnj7vz7PjwGDLovcE0d1cQAAAABJRU5ErkJggg==" /***/ }), /***/ "DXrd": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAA7klEQVQ4T+3TMSvFURjH8c8v2QyYUAaUIuPNYLBhNHkD8iKUbBarQVnZvAIrA7syCSXDHS2E5dFf1HW7E5s843PO+Z6ec76/+GWlOV9Vc3hOctvNq6p53CdpV9UQZnGepJq9qappXDUc7GInyWtVjWEfq7hNMlVVp1jEGTaSXDeAFZx03HyIddxhvKPfhweMfvYeMdULcIlltLvG6QY0y61/wJ95g8a4xsTBz3/v5cFFkoWqOsZahx+tryxM4ABLOOowsbFuD9tJnqqqH5vYwgsmPwBfVVUzuEnyVlXDGEhy3yNgIx9BStrfAD9J9jv/2Iff635D4gAAAABJRU5ErkJggg==" /***/ }), /***/ "Da15": /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.emojiUrl = exports.emojiName = exports.emojiMap = void 0; var emojiUrl = exports.emojiUrl = 'https://imgcache.qq.com/open/qcloud/tim/assets/emoji/'; var emojiMap = exports.emojiMap = { '[NO]': 'emoji_0@2x.png', '[OK]': 'emoji_1@2x.png', '[下雨]': 'emoji_2@2x.png', '[么么哒]': 'emoji_3@2x.png', '[乒乓]': 'emoji_4@2x.png', '[便便]': 'emoji_5@2x.png', '[信封]': 'emoji_6@2x.png', '[偷笑]': 'emoji_7@2x.png', '[傲慢]': 'emoji_8@2x.png', '[再见]': 'emoji_9@2x.png', '[冷汗]': 'emoji_10@2x.png', '[凋谢]': 'emoji_11@2x.png', '[刀]': 'emoji_12@2x.png', '[删除]': 'emoji_13@2x.png', '[勾引]': 'emoji_14@2x.png', '[发呆]': 'emoji_15@2x.png', '[发抖]': 'emoji_16@2x.png', '[可怜]': 'emoji_17@2x.png', '[可爱]': 'emoji_18@2x.png', '[右哼哼]': 'emoji_19@2x.png', '[右太极]': 'emoji_20@2x.png', '[右车头]': 'emoji_21@2x.png', '[吐]': 'emoji_22@2x.png', '[吓]': 'emoji_23@2x.png', '[咒骂]': 'emoji_24@2x.png', '[咖啡]': 'emoji_25@2x.png', '[啤酒]': 'emoji_26@2x.png', '[嘘]': 'emoji_27@2x.png', '[回头]': 'emoji_28@2x.png', '[困]': 'emoji_29@2x.png', '[坏笑]': 'emoji_30@2x.png', '[多云]': 'emoji_31@2x.png', '[大兵]': 'emoji_32@2x.png', '[大哭]': 'emoji_33@2x.png', '[太阳]': 'emoji_34@2x.png', '[奋斗]': 'emoji_35@2x.png', '[奶瓶]': 'emoji_36@2x.png', '[委屈]': 'emoji_37@2x.png', '[害羞]': 'emoji_38@2x.png', '[尴尬]': 'emoji_39@2x.png', '[左哼哼]': 'emoji_40@2x.png', '[左太极]': 'emoji_41@2x.png', '[左车头]': 'emoji_42@2x.png', '[差劲]': 'emoji_43@2x.png', '[弱]': 'emoji_44@2x.png', '[强]': 'emoji_45@2x.png', '[彩带]': 'emoji_46@2x.png', '[彩球]': 'emoji_47@2x.png', '[得意]': 'emoji_48@2x.png', '[微笑]': 'emoji_49@2x.png', '[心碎了]': 'emoji_50@2x.png', '[快哭了]': 'emoji_51@2x.png', '[怄火]': 'emoji_52@2x.png', '[怒]': 'emoji_53@2x.png', '[惊恐]': 'emoji_54@2x.png', '[惊讶]': 'emoji_55@2x.png', '[憨笑]': 'emoji_56@2x.png', '[手枪]': 'emoji_57@2x.png', '[打哈欠]': 'emoji_58@2x.png', '[抓狂]': 'emoji_59@2x.png', '[折磨]': 'emoji_60@2x.png', '[抠鼻]': 'emoji_61@2x.png', '[抱抱]': 'emoji_62@2x.png', '[抱拳]': 'emoji_63@2x.png', '[拳头]': 'emoji_64@2x.png', '[挥手]': 'emoji_65@2x.png', '[握手]': 'emoji_66@2x.png', '[撇嘴]': 'emoji_67@2x.png', '[擦汗]': 'emoji_68@2x.png', '[敲打]': 'emoji_69@2x.png', '[晕]': 'emoji_70@2x.png', '[月亮]': 'emoji_71@2x.png', '[棒棒糖]': 'emoji_72@2x.png', '[汽车]': 'emoji_73@2x.png', '[沙发]': 'emoji_74@2x.png', '[流汗]': 'emoji_75@2x.png', '[流泪]': 'emoji_76@2x.png', '[激动]': 'emoji_77@2x.png', '[灯泡]': 'emoji_78@2x.png', '[炸弹]': 'emoji_79@2x.png', '[熊猫]': 'emoji_80@2x.png', '[爆筋]': 'emoji_81@2x.png', '[爱你]': 'emoji_82@2x.png', '[爱心]': 'emoji_83@2x.png', '[爱情]': 'emoji_84@2x.png', '[猪头]': 'emoji_85@2x.png', '[猫咪]': 'emoji_86@2x.png', '[献吻]': 'emoji_87@2x.png', '[玫瑰]': 'emoji_88@2x.png', '[瓢虫]': 'emoji_89@2x.png', '[疑问]': 'emoji_90@2x.png', '[白眼]': 'emoji_91@2x.png', '[皮球]': 'emoji_92@2x.png', '[睡觉]': 'emoji_93@2x.png', '[磕头]': 'emoji_94@2x.png', '[示爱]': 'emoji_95@2x.png', '[礼品袋]': 'emoji_96@2x.png', '[礼物]': 'emoji_97@2x.png', '[篮球]': 'emoji_98@2x.png', '[米饭]': 'emoji_99@2x.png', '[糗大了]': 'emoji_100@2x.png', '[红双喜]': 'emoji_101@2x.png', '[红灯笼]': 'emoji_102@2x.png', '[纸巾]': 'emoji_103@2x.png', '[胜利]': 'emoji_104@2x.png', '[色]': 'emoji_105@2x.png', '[药]': 'emoji_106@2x.png', '[菜刀]': 'emoji_107@2x.png', '[蛋糕]': 'emoji_108@2x.png', '[蜡烛]': 'emoji_109@2x.png', '[街舞]': 'emoji_110@2x.png', '[衰]': 'emoji_111@2x.png', '[西瓜]': 'emoji_112@2x.png', '[调皮]': 'emoji_113@2x.png', '[象棋]': 'emoji_114@2x.png', '[跳绳]': 'emoji_115@2x.png', '[跳跳]': 'emoji_116@2x.png', '[车厢]': 'emoji_117@2x.png', '[转圈]': 'emoji_118@2x.png', '[鄙视]': 'emoji_119@2x.png', '[酷]': 'emoji_120@2x.png', '[钞票]': 'emoji_121@2x.png', '[钻戒]': 'emoji_122@2x.png', '[闪电]': 'emoji_123@2x.png', '[闭嘴]': 'emoji_124@2x.png', '[闹钟]': 'emoji_125@2x.png', '[阴险]': 'emoji_126@2x.png', '[难过]': 'emoji_127@2x.png', '[雨伞]': 'emoji_128@2x.png', '[青蛙]': 'emoji_129@2x.png', '[面条]': 'emoji_130@2x.png', '[鞭炮]': 'emoji_131@2x.png', '[风车]': 'emoji_132@2x.png', '[飞吻]': 'emoji_133@2x.png', '[飞机]': 'emoji_134@2x.png', '[饥饿]': 'emoji_135@2x.png', '[香蕉]': 'emoji_136@2x.png', '[骷髅]': 'emoji_137@2x.png', '[麦克风]': 'emoji_138@2x.png', '[麻将]': 'emoji_139@2x.png', '[鼓掌]': 'emoji_140@2x.png', '[龇牙]': 'emoji_141@2x.png' }; var emojiName = exports.emojiName = ['[龇牙]', '[调皮]', '[流汗]', '[偷笑]', '[再见]', '[敲打]', '[擦汗]', '[猪头]', '[玫瑰]', '[流泪]', '[大哭]', '[嘘]', '[酷]', '[抓狂]', '[委屈]', '[便便]', '[炸弹]', '[菜刀]', '[可爱]', '[色]', '[害羞]', '[得意]', '[吐]', '[微笑]', '[怒]', '[尴尬]', '[惊恐]', '[冷汗]', '[爱心]', '[示爱]', '[白眼]', '[傲慢]', '[难过]', '[惊讶]', '[疑问]', '[困]', '[么么哒]', '[憨笑]', '[爱情]', '[衰]', '[撇嘴]', '[阴险]', '[奋斗]', '[发呆]', '[右哼哼]', '[抱抱]', '[坏笑]', '[飞吻]', '[鄙视]', '[晕]', '[大兵]', '[可怜]', '[强]', '[弱]', '[握手]', '[胜利]', '[抱拳]', '[凋谢]', '[米饭]', '[蛋糕]', '[西瓜]', '[啤酒]', '[瓢虫]', '[勾引]', '[OK]', '[爱你]', '[咖啡]', '[月亮]', '[刀]', '[发抖]', '[差劲]', '[拳头]', '[心碎了]', '[太阳]', '[礼物]', '[皮球]', '[骷髅]', '[挥手]', '[闪电]', '[饥饿]', '[咒骂]', '[折磨]', '[抠鼻]', '[鼓掌]', '[糗大了]', '[左哼哼]', '[打哈欠]', '[快哭了]', '[吓]', '[篮球]', '[乒乓]', '[NO]', '[跳跳]', '[怄火]', '[转圈]', '[磕头]', '[回头]', '[跳绳]', '[激动]', '[街舞]', '[献吻]', '[左太极]', '[右太极]', '[闭嘴]', '[猫咪]', '[红双喜]', '[鞭炮]', '[红灯笼]', '[麻将]', '[麦克风]', '[礼品袋]', '[信封]', '[象棋]', '[彩带]', '[蜡烛]', '[爆筋]', '[棒棒糖]', '[奶瓶]', '[面条]', '[香蕉]', '[飞机]', '[左车头]', '[车厢]', '[右车头]', '[多云]', '[下雨]', '[钞票]', '[熊猫]', '[灯泡]', '[风车]', '[闹钟]', '[雨伞]', '[彩球]', '[钻戒]', '[沙发]', '[纸巾]', '[手枪]', '[青蛙]']; /***/ }), /***/ "DcFL": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); __webpack_require__("yQBS"); var _tabs = _interopRequireDefault(__webpack_require__("qA/u")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); var _AllPerson = _interopRequireDefault(__webpack_require__("vEOg")); var _index = _interopRequireDefault(__webpack_require__("RtRc")); var _group = _interopRequireDefault(__webpack_require__("T2Uv")); var _dva = __webpack_require__("S6G3"); var _dec, _class; function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } var TabPane = _tabs.default.TabPane; var PersonMessage = exports.default = (_dec = (0, _dva.connect)(function (state) { return { tabIndex: state.command.tabIndex, layoutAuthority: state.command.layoutAuthority }; }), _dec(_class = /*#__PURE__*/function (_PureComponent) { function PersonMessage(props) { var _this; (0, _classCallCheck2.default)(this, PersonMessage); _this = _callSuper(this, PersonMessage, [props]); _this.state = { visible: props.visible }; return _this; } (0, _inherits2.default)(PersonMessage, _PureComponent); return (0, _createClass2.default)(PersonMessage, [{ key: "componentWillReceiveProps", value: function componentWillReceiveProps(nextProps) { if (nextProps.visible !== this.state.visible) { this.setState({ visible: nextProps.visible }); } } }, { key: "clickTextScheduling", value: function clickTextScheduling(item, type, isNeedRecord) { this.props.clickTextScheduling(item, type, isNeedRecord); this.props.dispatch({ type: "command/setPersonSelectIndex", payload: null }); } }, { key: "render", value: function render() { var _this2 = this; return /*#__PURE__*/_react.default.createElement("div", { className: "child-searchList all-person", style: { display: this.state.visible ? "block" : "none" } }, /*#__PURE__*/_react.default.createElement(_tabs.default, { defaultActiveKey: this.props.tabIndex.person.tabIndex2 || "1", onChange: function onChange(index) { _this2.props.dispatch({ type: "command/setTabIndex", payload: { person: { tabIndex2: index } } }); _this2.props.dispatch({ type: "command/clearInfoWindow", payload: true }); } }, /*#__PURE__*/_react.default.createElement(TabPane, { tab: "\u6240\u6709\u4EBA\u5458", key: "1" }, /*#__PURE__*/_react.default.createElement(_AllPerson.default, { key: "1", onClickPerson: function onClickPerson(item, index) { _this2.props.onClickPerson(item, index); } })), this.props.layoutAuthority.basisLayer ? /*#__PURE__*/_react.default.createElement(TabPane, { tab: "\u7FA4\u7EC4", key: "3" }, /*#__PURE__*/_react.default.createElement(_group.default, { key: "3", changeImStatus: function changeImStatus(value) { _this2.props.changeImStatus(value); }, groupVideo: function groupVideo(list) { _this2.props.groupVideo(list); } })) : "")); } }]); }(_react.PureComponent)) || _class); /***/ }), /***/ "Def1": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAiCAYAAAC0nUK+AAAAAXNSR0IArs4c6QAABO5JREFUSA2dVWtsVFUQnjl3dy192Ha3XZsmRQw/bCuUmDZqMd26JY0xWI2xSSMJ/BAFRFMNApb4pxpIQP1R/SEIvqKiAkUNDTGUpO3WxGpKi9oXMYpRFGl3u+22st3Xvcczd/de7t0HXZ1k95z5ZuY7c+eemYtwE5mrcrkUDi0KcDcgliNwBwf0I4c/EcDDEM4UTXq+QRRIGhE+qeK9q9GNCj/IOb8n1WpGEHCYS/hS6YSn32wBMJHzzk42e7LvAFd4BzmyMifc0tIMtsZ6kCrKAYsKgc8HQL5yFSKeIQj3nAfl2ozKyZC9bm9zd2Bnp5J8CIgs0VfZcMpb2cC9a5v49XePcyUcFnBmITv5kT/F+apcpynBFHJvdcMrqsP6Fh65OJ6ZMY2F/H0iLnHAfhP57BrXepG1QhmYiINLPHSmlwee3s3nNm7mkYFv01DHIYqjeOLxVzc26AcIoJ9OpUckEfXki7tf5b67m9VsYr/9wZc+/4ov7Orkge1742xp/tUSUVmrXB4iR++aB+ogJg/Tyys+9ymgzQaidvrBtLH3d4P882Wwuu6DwKadcOuR18TL7IXQ6bPAnCWQt2cnSKtvBx6JwNyDm9SXjBLcy0CRW4iAbgURa2Lv6wb7uc9U1e9u1WCw1teB3/UY/LO/Sz0w5/GNsLB9DygzPjWeeEi4wh4W5LCBFLpuRvE3tULgyV0q5Bj8UjcF3/4QeDgM9vMnVMzW7AJLTTVANBrXEzzI+QYmumsloXSPjeL47izIf/0dh1bk6CbrumooPHwI/M1tOmbcGHhWMs7BSUZqEKNgXi6UjMWbDnNukAOTAKwWcAz16O7MUQzRoRFV13jEPCgVmfPrhFLnGcW31g30I9FW2kcvjkHgqRdhtl59VQRBbvtWCB79RN1rPMQrugmnCaWW/r+CBfnAEk9+gwevMuAwSqQ0K7IRa906KPzoLb1kyTEGnlHGGXxNDjSE6J4uJ9ELP0JgS7upVFoMxRMPCTLWw1hBXg8izNF0W/q4W/PLuEp3VID+W1Vh8qP4xJT02iWbmjR15MvU/imzJU2LZ4K02UI8s1UNL9Cp6nh0WHO6xH2fokZYeHYfRH+YMGW0nEL+FKc2EuKofVX+YYrRPxbeGvedGIkNi/tZAFYr5D6/FVZsbjWNhORDqMZUiuCb72kdOsMsWOcYH7xiIidFjMqHFIX3cOCiU/7bl0ikGUS0NJVM9n9PsSR65nEVwFvZuA1AeUfTs1lFSWOiGx+xT3riLzERlPJJKr3kOcoA38iGVPMR5NuSicmWQk6gvYztEwHZdRXCMcek5wOKS5a05DgwEJPA8oQ4YD45IEn/qeQ2qT0J09W05GQtnur7nSM8p3umbDCMVqlNJBJKMSWAjORkL50cPC6yj/dzEgNDfqBkbOBSEmxSb0pOnhbJ8oy4VKbsxIFTdlZ2yMSURlmWvGi871fhdNAYK5pgB06cWnbKpdxzI0ltbW1uNBq1V0XB2cULey0AjgVUBh+VAjsYY4tWq9U/MjISNMYY92onGgFtX1NT4wyFQqtlWc6fBhnv57aIE6X6ExjsuKCEFwkXB5eWl5fL09PT6tdMi9XWjGVRFKVMc6J1r7LwxWUuv3+MB38x4sl+RltGcvHY14yO85IS24L+I0aM9sl+RntWNRfZFYg5bhOrJMhkcVsi2dT8X1Tg6CXt7Jq6AAAAAElFTkSuQmCC" /***/ }), /***/ "DxMF": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAiCAYAAAC0nUK+AAAAAXNSR0IArs4c6QAABPRJREFUSA2VVmtoXFUQnjl3dxM3CUn3kYaAVegPkyYGIaHQliTdFkXBKKVCbY39YTVUjFVBNNUfpmCgYn9UEXz0ISpVNNZS86M+IMnGikiaKDWPUqxQKqXpPrJJm3Wzu/ceZ+7u3Z67u0nTgXDOzHzzndk5c+YGYRmZrW9rMyR0GCADgFiLIL0SMIoS/kWAoED4vmoq+AsiWYoIYQol1NAeQEMelFKuL/TaLQg4KjV83T8ZHLJ7AGzksrdXRL4Z7JOG7GGgqKmGko4HwdW+AbS7awGrKkHG5kC/chWSwd9gceBnMK5dNzkFinc9OwI92Ntr5B8ClCWG61r7Q3WtMnT/Frlw9IQ0FhfJvLSwn3GM57hwfdtJTrCAPLSu9YAJ2Nghk39MFDAmTv8oow89KXnNF8aHKS57wNsWuVmWSGPbRpmWZ6XTiZWfvw/OBxosP8hQBG6+dQgWh37N2UoCm6D8wKuAfm/OlvpzEuZ27wNMpaQQot1DF23+BCLuo+tG90t7bMT6pcsQ6+y2ETMbH8R29lvCCXE88+hSmtmLUOPmFjJs5su76+knLKy5amvvAXdXp81mKe7nngL2q8LxzEMX2BZuaF0vwNA7GMBdgS6XirXty17pAu/oGSjrfiZjR1ujmTaOZx4WaYhHiRy2ssLtZkma6pceOw/pyYuWCUp3bQMsL4PSzu05mz51MYMjvCUWD0q51UGvaw3dvtnHFiC283lzq632g/vFTKaJz/pN4sRXpywYzL/wBujZPvdNj2Ri6D1kZY2DeKlIdAv0QFTxnvsBIJmC5OBZ07zwwXHgP1WqTh6lerog0vJwzmzx0D36KXO5QAeU8MvDal8OlL/xTQwBaBqArkO4MZDvzunMw8K81Io4wwo/aVU4m9i27OWxg4nVlfax7c/asmb3LR68Kqgxx9nIs0IVLkvVKXsZVD/vuSxm+RSHwjMupIAz7OMhJJPJHKwgcyqHKdZKSn7mHM88LCjEgENUlA3I+ZuzNN1W/ffFt+DeswuQSiCJxIjMQvzYlyY4v85sN8LRDFG2ZByfnZIhj+YykwaaZm9a07DY0MofVMV0jrOmY6S+9WU+lS4UwOssPUz9Pg2pFPXufuAhdCfCeI7jeGqTcc+95R9yfO4Nh5oC92EyPUr9WQFOpzmEeFYsNxK4xlyK+HvHMsQA14UDW7wTI1ds5KxE17U/YhhyQII0++5OvkSUZhzRscU3NfQ7c7HkMs+oAKG69i4A42NLX8lKJU0LxMdohmcuMRtk1lwl8F8IfiIAD6m22+2JvCufmGMKyNnoqRH7KcD+qthRTBCOeKeCnxZzFSXH4eG0Bo6ddECsWJBiO+9bre1TdNu2KDkjVk0PXpYI3Ta0TcFFdGo7KJGEzawoS5Izxj81coKyz7xnJYi3AmWf76/hC3lmm7osOSMdmoO+HGjLjg6c9oiad2xMRZTbkldNDF4i0EE1lh7BXpzsvzXlVKeyL+hzxQfNzc3uVCrlqU9B9WFZ+ZODJsU8GiOPa3N76X+TG06nMzo2NhZXY9R99gugmjL7pqam6kQisVbX9fIZ0HGTdCWrUdvwNcZ7zhmLN9hOB/tra2v1mZmZhUKGJfqcgYZh1KgBrxnz3/0j9eNHZPxv1Z6PU31L1px+9jUVGNOM9G6MfqTaeJ+PU/0rqjllV0Ez3EWrRmQ6dUtyJTX/H2wXoHVD79evAAAAAElFTkSuQmCC" /***/ }), /***/ "DyFj": /***/ (function(module, exports) { // removed by extract-text-webpack-plugin /***/ }), /***/ "E+tM": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__style_index_less__ = __webpack_require__("vtiu"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__style_index_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__style_index_less__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__index_less__ = __webpack_require__("Px4o"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__index_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__index_less__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__empty_style__ = __webpack_require__("mxhB"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__input_style__ = __webpack_require__("LHBr"); // style dependencies /***/ }), /***/ "E4Xz": /***/ (function(module, exports) { module.exports = "data:image/png;base64,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" /***/ }), /***/ "E4fC": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAWRJREFUOE+lkj8vQ2EUh5/fbWKhbWo2SxgZmCQSiUg6Ed9ADJZeFro0WLBoJUj4BBJhspEYdSYxmMVG09500LT3yL20qdJbiTO9J79znvPvFUB8zYbx2RHMBL7BDQ5Zb19PgR9lCpLlUwRSHYElc5jsBVHctQvB/G9VDC69ghYiO0i4VgYSXYIqlYKS/wHUG8Z49UD33SCRI3zuEwF3Jk7wKUocIiYwijWfpcglYszhMAksY4y2AZsNXQf01hmB9Jdy1XnGgYxNSQQJfa1xhBcCmpZ07TZ4lwua7pw5nrG0xBnQ36Z9dhAFGHBtxIE8MIt4xHj5toMwedH6kkNs+4YbuI4o1H3yMYcsxgrgYWxVUhyzqXp70bCD5KrtmrHeLhi8C2KIU6uR8470+tspQ0AiY2/ox1euN8RYNa+HyI/UFWCUKgcajEoOtK4jSOyV89r4E6C5RPNZDqkOp+Vncpyr1gvwAdKFkBUP3AnjAAAAAElFTkSuQmCC" /***/ }), /***/ "EKta": /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.byteLength = byteLength exports.toByteArray = toByteArray exports.fromByteArray = fromByteArray var lookup = [] var revLookup = [] var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' for (var i = 0, len = code.length; i < len; ++i) { lookup[i] = code[i] revLookup[code.charCodeAt(i)] = i } // Support decoding URL-safe base64 strings, as Node.js does. // See: https://en.wikipedia.org/wiki/Base64#URL_applications revLookup['-'.charCodeAt(0)] = 62 revLookup['_'.charCodeAt(0)] = 63 function getLens (b64) { var len = b64.length if (len % 4 > 0) { throw new Error('Invalid string. Length must be a multiple of 4') } // Trim off extra bytes after placeholder bytes are found // See: https://github.com/beatgammit/base64-js/issues/42 var validLen = b64.indexOf('=') if (validLen === -1) validLen = len var placeHoldersLen = validLen === len ? 0 : 4 - (validLen % 4) return [validLen, placeHoldersLen] } // base64 is 4/3 + up to two characters of the original data function byteLength (b64) { var lens = getLens(b64) var validLen = lens[0] var placeHoldersLen = lens[1] return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen } function _byteLength (b64, validLen, placeHoldersLen) { return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen } function toByteArray (b64) { var tmp var lens = getLens(b64) var validLen = lens[0] var placeHoldersLen = lens[1] var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen)) var curByte = 0 // if there are placeholders, only get up to the last complete 4 chars var len = placeHoldersLen > 0 ? validLen - 4 : validLen var i for (i = 0; i < len; i += 4) { tmp = (revLookup[b64.charCodeAt(i)] << 18) | (revLookup[b64.charCodeAt(i + 1)] << 12) | (revLookup[b64.charCodeAt(i + 2)] << 6) | revLookup[b64.charCodeAt(i + 3)] arr[curByte++] = (tmp >> 16) & 0xFF arr[curByte++] = (tmp >> 8) & 0xFF arr[curByte++] = tmp & 0xFF } if (placeHoldersLen === 2) { tmp = (revLookup[b64.charCodeAt(i)] << 2) | (revLookup[b64.charCodeAt(i + 1)] >> 4) arr[curByte++] = tmp & 0xFF } if (placeHoldersLen === 1) { tmp = (revLookup[b64.charCodeAt(i)] << 10) | (revLookup[b64.charCodeAt(i + 1)] << 4) | (revLookup[b64.charCodeAt(i + 2)] >> 2) arr[curByte++] = (tmp >> 8) & 0xFF arr[curByte++] = tmp & 0xFF } return arr } function tripletToBase64 (num) { return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F] } function encodeChunk (uint8, start, end) { var tmp var output = [] for (var i = start; i < end; i += 3) { tmp = ((uint8[i] << 16) & 0xFF0000) + ((uint8[i + 1] << 8) & 0xFF00) + (uint8[i + 2] & 0xFF) output.push(tripletToBase64(tmp)) } return output.join('') } function fromByteArray (uint8) { var tmp var len = uint8.length var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes var parts = [] var maxChunkLength = 16383 // must be multiple of 3 // go through the array every three bytes, we'll deal with trailing stuff later for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) { parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength))) } // pad the end with zeros, but make sure to not forget the extra bytes if (extraBytes === 1) { tmp = uint8[len - 1] parts.push( lookup[tmp >> 2] + lookup[(tmp << 4) & 0x3F] + '==' ) } else if (extraBytes === 2) { tmp = (uint8[len - 2] << 8) + uint8[len - 1] parts.push( lookup[tmp >> 10] + lookup[(tmp >> 4) & 0x3F] + lookup[(tmp << 2) & 0x3F] + '=' ) } return parts.join('') } /***/ }), /***/ "ELni": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; __webpack_require__("faxx"); var _row = _interopRequireDefault(__webpack_require__("FV1P")); __webpack_require__("JYrs"); var _col = _interopRequireDefault(__webpack_require__("QoDT")); __webpack_require__("rpBe"); var _checkbox = _interopRequireDefault(__webpack_require__("hK1P")); __webpack_require__("LHBr"); var _input = _interopRequireDefault(__webpack_require__("A+AJ")); var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); var _dva = __webpack_require__("S6G3"); var _index = _interopRequireDefault(__webpack_require__("W7F7")); var _api = __webpack_require__("H/Zg"); var _events = _interopRequireDefault(__webpack_require__("TLe5")); var _dec, _class; /** * 搜索保安员,保安公司,驻勤点的功能 */ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } // 引入 EventEmitter var InfoSearch = exports.default = (_dec = (0, _dva.connect)(function (state) { return { searchAround: state.command.searchAround, mapStyle: state.command.mapStyle, pictureMarkersList: state.command.pictureMarkersList }; }), _dec(_class = /*#__PURE__*/function (_Component) { function InfoSearch(props) { var _this; (0, _classCallCheck2.default)(this, InfoSearch); _this = _callSuper(this, InfoSearch, [props]); _this.state = { range: 400, checkdata: [], securityManData: { data: [] }, //搜索出来的保安员数据 situationData: [], //动态感知的数据 circle: null }; return _this; } (0, _inherits2.default)(InfoSearch, _Component); return (0, _createClass2.default)(InfoSearch, [{ key: "componentDidMount", value: function componentDidMount() {} }, { key: "searchInfo", value: function searchInfo(e) { var _this2 = this; var _this$props$pictureMa = this.props.pictureMarkersList, securityResource = _this$props$pictureMa.securityResource, securityCompany = _this$props$pictureMa.securityCompany, attendancePoint = _this$props$pictureMa.attendancePoint; if (securityResource.length > 0) { this.propsOption('reduce', { data: securityResource[0].data }, 'securityResource'); } if (securityCompany.length > 0) { this.propsOption('reduce', { data: securityCompany[0].data }, 'securityCompany'); } if (attendancePoint.length > 0) { this.propsOption('reduce', { data: attendancePoint[0].data }, 'attendancePoint'); } this.state.checkdata.forEach(function (item) { switch (item) { case 'A': // 保安公司 var data = { data: [{ latitude: "24.603706", longitude: "118.054048", name: "负责人", companyName: "防控指挥公司", componeyLogo: "", mobilePhone: "123" }] }; _this2.propsOption('add', data, "securityCompany"); break; case 'B': // 保安员 // location = {longitude:"118.051982",latitude:"24.607542"} var data2 = [{ ATTENDANCESITENAME: null, DEPTNAME: "保安部", ID: "0TjufwmZhCVm4KKqBQB", TUserID: "track__2t8RijBWNoIGeIjqotR0TjufwmZhCVm4KKqBQB", domainid: "__2t8RijBWNoIGeIjqotR", formId: null, id: "0TjufwmZhCVm4KKqBQB", location: "", longitude: "118.051982", latitude: "24.607542", mobilePhone: "17700011712", name: "司秀隽", phone: "17700011712", pirture: null, securityName: "司秀隽" }]; _this2.propsOption('add', { data: data2 }, 'securityResource'); break; case 'C': // 驻勤点 var param = { attendName: "驻勤点名称", latitude: "24.606064", longitude: "118.046998", componey: "所属公司", name: "负责人姓名", phone: "负责人电话", address: "驻勤点省市区", addressDetail: "驻勤点详细地点", scope: "执勤范围", org: "所属监管机构", obj: "服务对象名称", contract: "合同状态" }; _this2.propsOption('add', { data: [param] }, "attendancePoint"); break; } }); } }, { key: "propsOption", value: function propsOption(optionType, data, type) { switch (optionType) { case 'add': _events.default.emit('addPictueMarks', { data: data, type: type }); // this.props.addPictueMarks(data, type); break; case 'reduce': // this.props.reducePictueMarks(data, type); _events.default.emit('reducePictueMarks', { data: data, type: type }); break; } } //清掉所有周边搜索打点的值,并且把圆圈去掉 }, { key: "clearAll", value: function clearAll() { var _this$props = this.props, searchAround = _this$props.searchAround, _thisGIS = _this$props._thisGIS; var circle = this.state.circle; if (searchAround.securitySearch.length > 0) { var data = { data: searchAround.securitySearch }; // this.props.reducePictueMarks(data, 'securityResource', { // where: 'searchAround', // type: 'A' // }); _events.default.emit('reducePictueMarks', { data: data, type: 'securityResource', where: { where: 'searchAround', type: 'securitySearch' } }); } if (searchAround.awarenessSearch.length > 0) { var _data = { data: searchAround.awarenessSearch }; // this.props.reducePictueMarks(data, 'perception', { // where: 'searchAround', // type: 'B' // }); _events.default.emit('reducePictueMarks', { data: _data, type: 'perception', where: { where: 'searchAround', type: 'awarenessSearch' } }); } //先把之前的圆圈去掉 if (circle) { _thisGIS.state.map.remove(circle); } } }, { key: "render", value: function render() { var _this3 = this; var range = this.state.range; return /*#__PURE__*/_react.default.createElement("div", { className: this.props.mapStyle }, /*#__PURE__*/_react.default.createElement("div", { className: _index.default.info__search }, /*#__PURE__*/_react.default.createElement(_input.default.Search, { className: _index.default.search_input, size: "large", placeholder: "\u8BF7\u8F93\u5165\u516C\u53F8\u540D\u79F0/\u9A7B\u52E4\u70B9\u540D\u79F0/\u4FDD\u5B89\u4EBA\u5458\u540D\u79F0", enterButton: "\u641C\u7D22", onSearch: function onSearch(e) { return _this3.searchInfo(e); } }), /*#__PURE__*/_react.default.createElement("div", { className: _index.default.check_box }, /*#__PURE__*/_react.default.createElement(_checkbox.default.Group, { style: { width: '100%' }, onChange: function onChange(e) { _this3.setState({ checkdata: e }); } }, /*#__PURE__*/_react.default.createElement(_row.default, null, /*#__PURE__*/_react.default.createElement(_col.default, { span: 8 }, /*#__PURE__*/_react.default.createElement(_checkbox.default, { value: "A", style: { color: this.props.mapStyle == 'dark' ? '#fff' : '#000' } }, "\u4FDD\u5B89\u516C\u53F8")), /*#__PURE__*/_react.default.createElement(_col.default, { span: 8 }, /*#__PURE__*/_react.default.createElement(_checkbox.default, { value: "B", style: { color: this.props.mapStyle == 'dark' ? '#fff' : '#000' } }, "\u4FDD\u5B89\u5458")), /*#__PURE__*/_react.default.createElement(_col.default, { span: 8 }, /*#__PURE__*/_react.default.createElement(_checkbox.default, { value: "C", style: { color: this.props.mapStyle == 'dark' ? '#fff' : '#000' } }, "\u9A7B\u52E4\u70B9"))))))); } }]); }(_react.Component)) || _class); /***/ }), /***/ "EMr2": /***/ (function(module, exports, __webpack_require__) { var map = { "./3d-white.png": "DXmu", "./all-white.png": "9x0k", "./cancel-white.png": "DN4D", "./chat-white.png": "0P2q", "./circle-white.png": "k7S3", "./down-white.png": "5cEz", "./left-white.png": "rn6j", "./map1-white.png": "yO0l", "./polygon-white.png": "UuDn", "./rectangle-white.png": "3opF", "./resource-white.png": "8j3R", "./right-white.png": "foLZ", "./search-white.png": "wmKa", "./style-white.png": "DXrd" }; function webpackContext(req) { return __webpack_require__(webpackContextResolve(req)); }; function webpackContextResolve(req) { var id = map[req]; if(!(id + 1)) // check for number or string throw new Error("Cannot find module '" + req + "'."); return id; }; webpackContext.keys = function webpackContextKeys() { return Object.keys(map); }; webpackContext.resolve = webpackContextResolve; module.exports = webpackContext; webpackContext.id = "EMr2"; /***/ }), /***/ "EYLL": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAhCAYAAADdy1suAAAAAXNSR0IArs4c6QAABQ9JREFUSEuNll1sVEUUx/9n7t37saUfK3QXW6AgClQBJRH5UIKlQSIRRUwwEQzE+KAPvmgwwSeNQCJGEz+CD0KCEh8kJIY0EQttt3xE0ojGgCZGKYKlDd2WlW7d7t3u3Dnm3v2gu9uFnrd7zsxv/vfMmTNDqGB8tjaUlsZLimk9GMsAhAnIABgAoYcVt9l1Q8fpUd9XZlTq4QsNQWcksxugNxkIVlo45+8nYLfdGjtSOq4I7ETr72dF3zGw+C7A0vAxW9JO2jCYzAcKYKczPF8BZwA0FIJVzdAatkG7Zy3IbATAYKcPbrwbbv8RcKr39gLM3Tfj5sbZW6+nPKcP5igsR4UvMPCQP5IMBBbshdawHURiUvHMErLvIGTv+wDL7DTiQ/a6oVcL4FRX/V5mesePChPGI0eh1a2cUjbc4S6MX9oOsJudLmi91TLYQdzROD1FmasApnmBwKKPoTdsmxI0PyjzzwHIy+/lP88HW2OryYmGX1MKX/jypy2Bufxk0e+z0w/n/AqAc1VFGqzVv4DMmYXFWUmke9aAU1d8nxRuM4111rcB9IyvdsF+6LN2FKl1Y20Y/81Pm2964w4EFu4v+6PMtc8ge/dk00F4i1Jd4avMaPIc5qoeCHtu0aRM717Ia59mN8dsgLniDEivLgOr0YtI/7Te9zPjKxrrDI8BsD2H9WQfSBhFk9K/vggV787JrQYFpsNo/gSiZHN5/Caccw9mBYC+98Be3VmVwM7ZZnAmXliM7CaYK86ChFkkoBiMEx74MoD5fipW9kAEi1Mh+w9DjfwM98ZRH2QsOQyt/unyVCQuIn0hmwoCH6SxjvAxEF7Ibt4H0GftLJskB75G5o9d0EJrYCw7Vhb3HBM3D+A3KNUVeYWZD/krTVsMc/mpstOWubIP8trnMB/rgqhaVAYuKTcWwAPE7ZGqVED1gSnkq174EfTG7UWTx39/HRQIIbBgXwW1ByB7sweEgJN2a2yD3yvGusK7wMgWp3ekH/4WWmhVAaLip0E1y0B6TRnYHe7E+KWX/SNNgMtEjwfXDfbkm5CeUmGvs2VpfhPak2tC2qQqvd+X17/MNaFcnyB8aK2LvZ1Tnp032h4J6zr/yLkK8YNVi6Ddm2ubViPA6nbbHPimpG3iuN0a20IEVQT2PlKnQnOYAt0gzJtUZgWndyCs9OAW2oh0fkjZ1ZTqrGsCGVHmqcEJOGGlY89PhJYpzq/mwRmGd46LT0uJYiL8YDmxzaXQimA/LdGZc1kpD+43qFIjQrtFsc3UAmfS+J1ymTodmceSPficieOIcNKi2HOVoHdUnAc5HZH7mDjKOTgTOuLDxrP5S7OSsLLNm2ygf4MTR8H0p20bm2h19ia+k00JnM+59Z+I0aYBr3/f1SYF87sQeGpWnZMZrZWuFhSaZkCx5j0rmMhlqdI6VNKytX/pieHRKW0en5tRnXTceQRhMnFIEKrBwiAB/4HBXj8AO8KlESWQcImT1UM3r9BWjBdt8MQPT2lybf1SYtaUy026Tv6VxawiBLKEAEtGQoBueX6X1TBBDGsaJay1Q39VBjMoGa1bStB1KJ4tNKrKlo6aQSDbBVgQEsyU8P2uirlCxCXRSG3LkHcTFawsxzfaI1VVgcxcIYUtdK5VCtUk2FAQupdjASW9VCjoI4I4KSUlagJDf1MLsu+snFWsivipUK1lUI1wRVAq14Sm+zkOQEoWetpNczKYNm5VqpL/Ad/tG1fSEdnsAAAAAElFTkSuQmCC" /***/ }), /***/ "EeqU": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAX5JREFUOE+lkz1LHFEUhp8zM9oIihb+BEHLpNBKCAREsNK/IAsOCumSXcfhZmdwtdJCV91fYKOV3QqWbq2QIj8goJAsapUwMyfMfvix7uwKVpdzzz3Pfd9z7hWA/GZlwo6iEvA5jYHz2HHypULuZyvOXKRVXANGO07VY8eZ6QcRr1g+ARYzrjgNfXepl4oUcAcMZxy6D3135D2AKEn4uGncqyxIHwuioAJ6qSpHYlFD2UNkWpSaFVvLPZso2PMqOiOqOUWnAAWkrUaQaiN4GqMsNJN61jnG9fBwVpKkCgw+2hF5eKSlm15wcJGu4cbKp07PXnCwgOoxMPRKQXujG8AL9idFZUdhTuCHwq8XPUiLjTGDkT1eVOVLGouwm1gDO1YS5VF1oSH1u53clI0x0XN1DQteUN5C+fo8ofBXwBakEjmxXyqs/u42yiagWP7T5SlHQvwh8Neuez6kHoB66LtjfT9TlgWE7XDD/fYmQLuJKLlGgVBx4lvfGPOvH+A/hh6io5gHGqQAAAAASUVORK5CYII=" /***/ }), /***/ "Efzv": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAAAgCAYAAAB3j6rJAAAAAXNSR0IArs4c6QAAApRJREFUWEfNl71v00AYxp/Xxk2kthJi6MCI+FoZ2FjKwD+AWkakKpJxkRigAyS25fpSoULTSiWyy1DBwoeyMiAq8Q8wsIAQQkioZYABWFKBEiV5kWMchSaxnThRc5PtOz3Pz/d+6I4M210BsMTgCQAgUBXAmjC1nPc+6nnPo+lr2G4lgGh9BFWFqaV8EKfMwFQw58NiX5iL0/Hmw/VbnrrtcLtJ8Jw3F2kYOxKlHxukG2Q/32KDRIWmH9Nua+PqezkSmqxDAIml38yDcRjjA+KHhm8AtBn0jlHtUJhXq494jSzoHSMEafasbl7UXl5B7xgVSJjX+IAEdX7ooRmbZB1VPvSrm6iPlEol+cPcHFtEjX6ND67/1+IH6yPMTKZwXxDhpTQjP7JU9fegQIn7iGG7CwzeJtAvAFtpWSrmcuq3foESl69VKk3UP/74wsBx/9BEVUh4ioa0Lkz1XVygxCCekS7cW2Be6zAl7MiQC8uGuhMFlDg0nsHq6vb0fqWyx8DRroZE7yXQunTm2BNrft47E3cyD6uPeDoMzob9OQHfmah4ZFJxrZsZL6daI1H5tgtZ992Z+h/sMjgdGQaQV12PZUXZsO5kPvu5NcShC9cBsxZLkqgsAZvShbOWNTtbG+pR0brrnKjV6BOY5Z4wTQAupuXJQjZ79WewLvJeE+vv2hbpwnkOxpXObKQyMR7IU0rhYH40QxP3uB8XyLDdcwx++996QkVW5NPLt9W9XjqRIIOc8nXhvALjUmvbQY4wteuhFRV174i6cnYTt4R7scb82q8Gqqak1EldX/gaBZLoEt5L3LCdNwycB9HDvKFdiwrtUMu33czMu5cbjGdpUk7pemb30EAsZqm+srUkdO1eFIQ3/xdihq8w33M1/QAAAABJRU5ErkJggg==" /***/ }), /***/ "EgTV": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAFo9M/3AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAEKADAAQAAAABAAAAEAAAAAA0VXHyAAABoUlEQVQ4EaVTPUsDQRCdWRLxA+4uWggiNqKYWvAHCFGx8g9YW4iQgChYbSuEJIIW2thYWaS0SGE6G7HQQgQFsRRCckkIggkZZy7Zy50cRHDhmHkz783O7O4BBJedIXeArTSRjwSEAiYT1vSjaKepxOKU4EYBUdULuCZAOZAQG1qJQ7JRIv4OCDcKIevmsGyYShxEWPcCBJvdLtwun1PcEHwrVUxC2nM0OX7yXw5OHVCy/Q3P3EcVEHKjCgqfWWyZquEp+lGe5NTN455AbwrDFsuKokkK7o0J8CSAL6DMjDnxzTKErCibJ7jK57zLY94bQqS1MrQylDSboTFRe1PMaBpvuXDE6D0Wh7vKMbwg4uBJRO7TC3oFtCaVd6HGCiuSi9Bh4iN/Z3wCl0GON6TW2EUF+WAi5BPEgOBjfgmuQnEGXgcSnNRkdepQY2L47Ik7S8BiU2Plt1iwT65qbHC1C0Niv7iQhBFmbKg6vMmpRr0wvwMRTu/TxFcHtlh4/bCDbVNMrFwNk0vsvqINKVdj4C8MMof43h2nqeakaXsI9W/pHwNei1YgLg0BAAAAAElFTkSuQmCC" /***/ }), /***/ "ErMw": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; __webpack_require__("baa2"); var _icon = _interopRequireDefault(__webpack_require__("FC3+")); var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); var _api = __webpack_require__("H/Zg"); var _index = _interopRequireDefault(__webpack_require__("W7F7")); var _PersonItem = _interopRequireDefault(__webpack_require__("baF6")); var _dva = __webpack_require__("S6G3"); var _events = _interopRequireDefault(__webpack_require__("TLe5")); var _dec, _class; /** * 驻勤点和保安员信息 */ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } // 引入 EventEmitter var EmployeesList = exports.default = (_dec = (0, _dva.connect)(function (state) { return { //地图数据 pictureMarkersList: state.command.pictureMarkersList, mapStyle: state.command.mapStyle }; }), _dec(_class = /*#__PURE__*/function (_Component) { function EmployeesList(props) { var _this; (0, _classCallCheck2.default)(this, EmployeesList); _this = _callSuper(this, EmployeesList, [props]); _this.changePersonType = function (e) { _this.setState({ personType: e.target.value }); }; _this.getDepList = function (item) { console.log('getDepList-item', item); var navList = _this.state.navList; if (!item.leaf) { (0, _api.getSubdepartmentList)({ domainId: _this.props.domainId, depId: item.id }).then(function (res) { if (res.errcode == 0 && res.data.length > 0) { console.log(res); _this.setState({ depList: res.data, navList: navList.concat({ id: item.id, name: item.name }) }); } }); } else { _this.setState({ depList: [], navList: navList.concat({ id: item.id, name: item.name }) }); } _this._getPersonList(item); }; // 部门列表 _this._renderDepartment = function () { var _this$state = _this.state, depList = _this$state.depList, rootDep = _this$state.rootDep; return /*#__PURE__*/_react.default.createElement("div", { className: _index.default.dep_list }, depList.map(function (item) { return /*#__PURE__*/_react.default.createElement("div", { key: item.id, className: _index.default.dep_item }, /*#__PURE__*/_react.default.createElement("div", { className: _index.default.dep_name, onClick: _this.getDepList.bind(_this, item) }, /*#__PURE__*/_react.default.createElement("img", { src: __webpack_require__("aX42"), alt: "" }), /*#__PURE__*/_react.default.createElement("div", null, item.name)), item.leaf ? "" : /*#__PURE__*/_react.default.createElement("div", { className: _index.default.dep_next, onClick: _this.getDepList.bind(_this, item) }, /*#__PURE__*/_react.default.createElement("img", { src: __webpack_require__("BUm/"), alt: "" }), /*#__PURE__*/_react.default.createElement("div", null, "\u4E0B\u7EA7"))); })); }; // 面包屑点击事件 _this.onNavClick = function (index) { console.log('this.state.navList', JSON.stringify(_this.state.navList)); var navList = _this.state.navList; navList = navList.slice(0, index + 1); var item = navList[navList.length - 1]; navList = navList.slice(0, index); _this.state.navList = navList; _this.getDepList(item); }; // 面包屑 _this._renderNavBar = function () { var navList = _this.state.navList; console.log('navList', navList); return /*#__PURE__*/_react.default.createElement("div", { className: _index.default.nav_content, ref: "navPartment", id: "s" }, navList.map(function (val, index) { if (navList.length - 1 !== index) { return /*#__PURE__*/_react.default.createElement("span", { key: index, onClick: _this.onNavClick.bind(_this, index), className: _index.default.nav }, val.name, /*#__PURE__*/_react.default.createElement(_icon.default, { type: "right" })); } return /*#__PURE__*/_react.default.createElement("span", { className: _index.default.root_dep, key: index }, val.name); })); }; _this._renderPersonList = function () { return /*#__PURE__*/_react.default.createElement("div", { className: "security search-list_command amap_lib_placeSearch" }, /*#__PURE__*/_react.default.createElement("div", { className: "list", style: { maxHeight: _this.state.height, overflow: "auto" } }, /*#__PURE__*/_react.default.createElement(_PersonItem.default, { data: _this.state.personList, loadingText: _this.state.loadingText }))); }; _this.state = { height: null, //保安员资源列表的最大高度 allHeight: null, personType: 'B', rootDep: {}, navList: [], // 面包屑层级 personList: [], // 保安人员列表 loadingText: '', total: 0, depList: [] }; return _this; } (0, _inherits2.default)(EmployeesList, _Component); return (0, _createClass2.default)(EmployeesList, [{ key: "componentDidMount", value: function componentDidMount() { var _this2 = this; (0, _api.getRootDep)({ domainId: this.props.domainId }).then(function (res) { if (res.errcode == 0 && res.data) { var data = res.data; _this2.setState({ rootDep: { depName: data.name, id: data.id } }); _this2.getDepList(data); } }); } // 根据企业部门获取保安人员列表 }, { key: "_getPersonList", value: function _getPersonList(item) { var _this3 = this; var pageNo = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1; this.setState({ loadingText: "正在加载中..." }); (0, _api.passDepartIdGetPersonList)({ _currpage: pageNo, lines: 100 }, { did: item.id, appId: "__ZLuP7RGirprZZ6SCdiX", viewId: "__P1bb27ekxYoAiowqVv1", opentarget: "detail", containTitle: "部门ID查询保安员信息接口" }).then(function (res) { var data = res.data.data; var result = data.map(function (item) { console.log('position', item); item.perId = item.id; item.ID = item.id; delete item.id; item.name = item.securityName ? item.securityName : item.principalName; delete item.securityName; delete item.principalName; var lnglatData = item.item_lonlatjson ? JSON.parse(item.item_lonlatjson) : ''; item.lnglat = lnglatData ? [lnglatData.longitude, lnglatData.latitude] : ''; item.location = lnglatData ? [lnglatData.longitude, lnglatData.latitude] : ''; item.longitude = lnglatData.longitude; item.latitude = lnglatData.latitude; // item.lnglat = [118.051982,24.607542] delete item.item_lonlatjson; item.idCardNo = item.documentID ? item.documentID : item.principalIdCardNo; delete item.documentID; delete item.principalIdCardNo; item.mobilePhone = item.phone ? item.phone : item.principalPhoneNo; delete item.phone; delete item.principalPhoneNo; return item; }); console.log('passDepartIdGetPersonList', result); _this3.setState({ personList: result, total: res.data.total, loadingText: result.length > 0 ? "加载完成" : "暂无数据" }); _events.default.emit('addPictueMarks', { data: { data: result }, type: "securityResource" }); }); } }, { key: "render", value: // 获取部门 function render() { var domainId = this.props.domainId; var _this$state2 = this.state, depList = _this$state2.depList, rootDep = _this$state2.rootDep; console.log('depList', depList); return /*#__PURE__*/_react.default.createElement("div", { className: _index.default.dep_box }, this._renderNavBar(), this._renderDepartment(), this._renderPersonList()); } }]); }(_react.Component)) || _class); /***/ }), /***/ "EuP9": /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(global) {/*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */ /* eslint-disable no-proto */ var base64 = __webpack_require__("EKta") var ieee754 = __webpack_require__("ujcs") var isArray = __webpack_require__("Ht8P") exports.Buffer = Buffer exports.SlowBuffer = SlowBuffer exports.INSPECT_MAX_BYTES = 50 /** * If `Buffer.TYPED_ARRAY_SUPPORT`: * === true Use Uint8Array implementation (fastest) * === false Use Object implementation (most compatible, even IE6) * * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, * Opera 11.6+, iOS 4.2+. * * Due to various browser bugs, sometimes the Object implementation will be used even * when the browser supports typed arrays. * * Note: * * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances, * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438. * * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function. * * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of * incorrect length in some situations. * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they * get the Object implementation, which is slower but behaves correctly. */ Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined ? global.TYPED_ARRAY_SUPPORT : typedArraySupport() /* * Export kMaxLength after typed array support is determined. */ exports.kMaxLength = kMaxLength() function typedArraySupport () { try { var arr = new Uint8Array(1) arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }} return arr.foo() === 42 && // typed array instances can be augmented typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray` arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray` } catch (e) { return false } } function kMaxLength () { return Buffer.TYPED_ARRAY_SUPPORT ? 0x7fffffff : 0x3fffffff } function createBuffer (that, length) { if (kMaxLength() < length) { throw new RangeError('Invalid typed array length') } if (Buffer.TYPED_ARRAY_SUPPORT) { // Return an augmented `Uint8Array` instance, for best performance that = new Uint8Array(length) that.__proto__ = Buffer.prototype } else { // Fallback: Return an object instance of the Buffer class if (that === null) { that = new Buffer(length) } that.length = length } return that } /** * The Buffer constructor returns instances of `Uint8Array` that have their * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of * `Uint8Array`, so the returned instances will have all the node `Buffer` methods * and the `Uint8Array` methods. Square bracket notation works as expected -- it * returns a single octet. * * The `Uint8Array` prototype remains unmodified. */ function Buffer (arg, encodingOrOffset, length) { if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) { return new Buffer(arg, encodingOrOffset, length) } // Common case. if (typeof arg === 'number') { if (typeof encodingOrOffset === 'string') { throw new Error( 'If encoding is specified then the first argument must be a string' ) } return allocUnsafe(this, arg) } return from(this, arg, encodingOrOffset, length) } Buffer.poolSize = 8192 // not used by this implementation // TODO: Legacy, not needed anymore. Remove in next major version. Buffer._augment = function (arr) { arr.__proto__ = Buffer.prototype return arr } function from (that, value, encodingOrOffset, length) { if (typeof value === 'number') { throw new TypeError('"value" argument must not be a number') } if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) { return fromArrayBuffer(that, value, encodingOrOffset, length) } if (typeof value === 'string') { return fromString(that, value, encodingOrOffset) } return fromObject(that, value) } /** * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError * if value is a number. * Buffer.from(str[, encoding]) * Buffer.from(array) * Buffer.from(buffer) * Buffer.from(arrayBuffer[, byteOffset[, length]]) **/ Buffer.from = function (value, encodingOrOffset, length) { return from(null, value, encodingOrOffset, length) } if (Buffer.TYPED_ARRAY_SUPPORT) { Buffer.prototype.__proto__ = Uint8Array.prototype Buffer.__proto__ = Uint8Array if (typeof Symbol !== 'undefined' && Symbol.species && Buffer[Symbol.species] === Buffer) { // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97 Object.defineProperty(Buffer, Symbol.species, { value: null, configurable: true }) } } function assertSize (size) { if (typeof size !== 'number') { throw new TypeError('"size" argument must be a number') } else if (size < 0) { throw new RangeError('"size" argument must not be negative') } } function alloc (that, size, fill, encoding) { assertSize(size) if (size <= 0) { return createBuffer(that, size) } if (fill !== undefined) { // Only pay attention to encoding if it's a string. This // prevents accidentally sending in a number that would // be interpretted as a start offset. return typeof encoding === 'string' ? createBuffer(that, size).fill(fill, encoding) : createBuffer(that, size).fill(fill) } return createBuffer(that, size) } /** * Creates a new filled Buffer instance. * alloc(size[, fill[, encoding]]) **/ Buffer.alloc = function (size, fill, encoding) { return alloc(null, size, fill, encoding) } function allocUnsafe (that, size) { assertSize(size) that = createBuffer(that, size < 0 ? 0 : checked(size) | 0) if (!Buffer.TYPED_ARRAY_SUPPORT) { for (var i = 0; i < size; ++i) { that[i] = 0 } } return that } /** * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance. * */ Buffer.allocUnsafe = function (size) { return allocUnsafe(null, size) } /** * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. */ Buffer.allocUnsafeSlow = function (size) { return allocUnsafe(null, size) } function fromString (that, string, encoding) { if (typeof encoding !== 'string' || encoding === '') { encoding = 'utf8' } if (!Buffer.isEncoding(encoding)) { throw new TypeError('"encoding" must be a valid string encoding') } var length = byteLength(string, encoding) | 0 that = createBuffer(that, length) var actual = that.write(string, encoding) if (actual !== length) { // Writing a hex string, for example, that contains invalid characters will // cause everything after the first invalid character to be ignored. (e.g. // 'abxxcd' will be treated as 'ab') that = that.slice(0, actual) } return that } function fromArrayLike (that, array) { var length = array.length < 0 ? 0 : checked(array.length) | 0 that = createBuffer(that, length) for (var i = 0; i < length; i += 1) { that[i] = array[i] & 255 } return that } function fromArrayBuffer (that, array, byteOffset, length) { array.byteLength // this throws if `array` is not a valid ArrayBuffer if (byteOffset < 0 || array.byteLength < byteOffset) { throw new RangeError('\'offset\' is out of bounds') } if (array.byteLength < byteOffset + (length || 0)) { throw new RangeError('\'length\' is out of bounds') } if (byteOffset === undefined && length === undefined) { array = new Uint8Array(array) } else if (length === undefined) { array = new Uint8Array(array, byteOffset) } else { array = new Uint8Array(array, byteOffset, length) } if (Buffer.TYPED_ARRAY_SUPPORT) { // Return an augmented `Uint8Array` instance, for best performance that = array that.__proto__ = Buffer.prototype } else { // Fallback: Return an object instance of the Buffer class that = fromArrayLike(that, array) } return that } function fromObject (that, obj) { if (Buffer.isBuffer(obj)) { var len = checked(obj.length) | 0 that = createBuffer(that, len) if (that.length === 0) { return that } obj.copy(that, 0, 0, len) return that } if (obj) { if ((typeof ArrayBuffer !== 'undefined' && obj.buffer instanceof ArrayBuffer) || 'length' in obj) { if (typeof obj.length !== 'number' || isnan(obj.length)) { return createBuffer(that, 0) } return fromArrayLike(that, obj) } if (obj.type === 'Buffer' && isArray(obj.data)) { return fromArrayLike(that, obj.data) } } throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.') } function checked (length) { // Note: cannot use `length < kMaxLength()` here because that fails when // length is NaN (which is otherwise coerced to zero.) if (length >= kMaxLength()) { throw new RangeError('Attempt to allocate Buffer larger than maximum ' + 'size: 0x' + kMaxLength().toString(16) + ' bytes') } return length | 0 } function SlowBuffer (length) { if (+length != length) { // eslint-disable-line eqeqeq length = 0 } return Buffer.alloc(+length) } Buffer.isBuffer = function isBuffer (b) { return !!(b != null && b._isBuffer) } Buffer.compare = function compare (a, b) { if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { throw new TypeError('Arguments must be Buffers') } if (a === b) return 0 var x = a.length var y = b.length for (var i = 0, len = Math.min(x, y); i < len; ++i) { if (a[i] !== b[i]) { x = a[i] y = b[i] break } } if (x < y) return -1 if (y < x) return 1 return 0 } Buffer.isEncoding = function isEncoding (encoding) { switch (String(encoding).toLowerCase()) { case 'hex': case 'utf8': case 'utf-8': case 'ascii': case 'latin1': case 'binary': case 'base64': case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': return true default: return false } } Buffer.concat = function concat (list, length) { if (!isArray(list)) { throw new TypeError('"list" argument must be an Array of Buffers') } if (list.length === 0) { return Buffer.alloc(0) } var i if (length === undefined) { length = 0 for (i = 0; i < list.length; ++i) { length += list[i].length } } var buffer = Buffer.allocUnsafe(length) var pos = 0 for (i = 0; i < list.length; ++i) { var buf = list[i] if (!Buffer.isBuffer(buf)) { throw new TypeError('"list" argument must be an Array of Buffers') } buf.copy(buffer, pos) pos += buf.length } return buffer } function byteLength (string, encoding) { if (Buffer.isBuffer(string)) { return string.length } if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' && (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) { return string.byteLength } if (typeof string !== 'string') { string = '' + string } var len = string.length if (len === 0) return 0 // Use a for loop to avoid recursion var loweredCase = false for (;;) { switch (encoding) { case 'ascii': case 'latin1': case 'binary': return len case 'utf8': case 'utf-8': case undefined: return utf8ToBytes(string).length case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': return len * 2 case 'hex': return len >>> 1 case 'base64': return base64ToBytes(string).length default: if (loweredCase) return utf8ToBytes(string).length // assume utf8 encoding = ('' + encoding).toLowerCase() loweredCase = true } } } Buffer.byteLength = byteLength function slowToString (encoding, start, end) { var loweredCase = false // No need to verify that "this.length <= MAX_UINT32" since it's a read-only // property of a typed array. // This behaves neither like String nor Uint8Array in that we set start/end // to their upper/lower bounds if the value passed is out of range. // undefined is handled specially as per ECMA-262 6th Edition, // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization. if (start === undefined || start < 0) { start = 0 } // Return early if start > this.length. Done here to prevent potential uint32 // coercion fail below. if (start > this.length) { return '' } if (end === undefined || end > this.length) { end = this.length } if (end <= 0) { return '' } // Force coersion to uint32. This will also coerce falsey/NaN values to 0. end >>>= 0 start >>>= 0 if (end <= start) { return '' } if (!encoding) encoding = 'utf8' while (true) { switch (encoding) { case 'hex': return hexSlice(this, start, end) case 'utf8': case 'utf-8': return utf8Slice(this, start, end) case 'ascii': return asciiSlice(this, start, end) case 'latin1': case 'binary': return latin1Slice(this, start, end) case 'base64': return base64Slice(this, start, end) case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': return utf16leSlice(this, start, end) default: if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) encoding = (encoding + '').toLowerCase() loweredCase = true } } } // The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect // Buffer instances. Buffer.prototype._isBuffer = true function swap (b, n, m) { var i = b[n] b[n] = b[m] b[m] = i } Buffer.prototype.swap16 = function swap16 () { var len = this.length if (len % 2 !== 0) { throw new RangeError('Buffer size must be a multiple of 16-bits') } for (var i = 0; i < len; i += 2) { swap(this, i, i + 1) } return this } Buffer.prototype.swap32 = function swap32 () { var len = this.length if (len % 4 !== 0) { throw new RangeError('Buffer size must be a multiple of 32-bits') } for (var i = 0; i < len; i += 4) { swap(this, i, i + 3) swap(this, i + 1, i + 2) } return this } Buffer.prototype.swap64 = function swap64 () { var len = this.length if (len % 8 !== 0) { throw new RangeError('Buffer size must be a multiple of 64-bits') } for (var i = 0; i < len; i += 8) { swap(this, i, i + 7) swap(this, i + 1, i + 6) swap(this, i + 2, i + 5) swap(this, i + 3, i + 4) } return this } Buffer.prototype.toString = function toString () { var length = this.length | 0 if (length === 0) return '' if (arguments.length === 0) return utf8Slice(this, 0, length) return slowToString.apply(this, arguments) } Buffer.prototype.equals = function equals (b) { if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') if (this === b) return true return Buffer.compare(this, b) === 0 } Buffer.prototype.inspect = function inspect () { var str = '' var max = exports.INSPECT_MAX_BYTES if (this.length > 0) { str = this.toString('hex', 0, max).match(/.{2}/g).join(' ') if (this.length > max) str += ' ... ' } return '' } Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) { if (!Buffer.isBuffer(target)) { throw new TypeError('Argument must be a Buffer') } if (start === undefined) { start = 0 } if (end === undefined) { end = target ? target.length : 0 } if (thisStart === undefined) { thisStart = 0 } if (thisEnd === undefined) { thisEnd = this.length } if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) { throw new RangeError('out of range index') } if (thisStart >= thisEnd && start >= end) { return 0 } if (thisStart >= thisEnd) { return -1 } if (start >= end) { return 1 } start >>>= 0 end >>>= 0 thisStart >>>= 0 thisEnd >>>= 0 if (this === target) return 0 var x = thisEnd - thisStart var y = end - start var len = Math.min(x, y) var thisCopy = this.slice(thisStart, thisEnd) var targetCopy = target.slice(start, end) for (var i = 0; i < len; ++i) { if (thisCopy[i] !== targetCopy[i]) { x = thisCopy[i] y = targetCopy[i] break } } if (x < y) return -1 if (y < x) return 1 return 0 } // Finds either the first index of `val` in `buffer` at offset >= `byteOffset`, // OR the last index of `val` in `buffer` at offset <= `byteOffset`. // // Arguments: // - buffer - a Buffer to search // - val - a string, Buffer, or number // - byteOffset - an index into `buffer`; will be clamped to an int32 // - encoding - an optional encoding, relevant is val is a string // - dir - true for indexOf, false for lastIndexOf function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) { // Empty buffer means no match if (buffer.length === 0) return -1 // Normalize byteOffset if (typeof byteOffset === 'string') { encoding = byteOffset byteOffset = 0 } else if (byteOffset > 0x7fffffff) { byteOffset = 0x7fffffff } else if (byteOffset < -0x80000000) { byteOffset = -0x80000000 } byteOffset = +byteOffset // Coerce to Number. if (isNaN(byteOffset)) { // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer byteOffset = dir ? 0 : (buffer.length - 1) } // Normalize byteOffset: negative offsets start from the end of the buffer if (byteOffset < 0) byteOffset = buffer.length + byteOffset if (byteOffset >= buffer.length) { if (dir) return -1 else byteOffset = buffer.length - 1 } else if (byteOffset < 0) { if (dir) byteOffset = 0 else return -1 } // Normalize val if (typeof val === 'string') { val = Buffer.from(val, encoding) } // Finally, search either indexOf (if dir is true) or lastIndexOf if (Buffer.isBuffer(val)) { // Special case: looking for empty string/buffer always fails if (val.length === 0) { return -1 } return arrayIndexOf(buffer, val, byteOffset, encoding, dir) } else if (typeof val === 'number') { val = val & 0xFF // Search for a byte value [0-255] if (Buffer.TYPED_ARRAY_SUPPORT && typeof Uint8Array.prototype.indexOf === 'function') { if (dir) { return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset) } else { return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset) } } return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir) } throw new TypeError('val must be string, number or Buffer') } function arrayIndexOf (arr, val, byteOffset, encoding, dir) { var indexSize = 1 var arrLength = arr.length var valLength = val.length if (encoding !== undefined) { encoding = String(encoding).toLowerCase() if (encoding === 'ucs2' || encoding === 'ucs-2' || encoding === 'utf16le' || encoding === 'utf-16le') { if (arr.length < 2 || val.length < 2) { return -1 } indexSize = 2 arrLength /= 2 valLength /= 2 byteOffset /= 2 } } function read (buf, i) { if (indexSize === 1) { return buf[i] } else { return buf.readUInt16BE(i * indexSize) } } var i if (dir) { var foundIndex = -1 for (i = byteOffset; i < arrLength; i++) { if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) { if (foundIndex === -1) foundIndex = i if (i - foundIndex + 1 === valLength) return foundIndex * indexSize } else { if (foundIndex !== -1) i -= i - foundIndex foundIndex = -1 } } } else { if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength for (i = byteOffset; i >= 0; i--) { var found = true for (var j = 0; j < valLength; j++) { if (read(arr, i + j) !== read(val, j)) { found = false break } } if (found) return i } } return -1 } Buffer.prototype.includes = function includes (val, byteOffset, encoding) { return this.indexOf(val, byteOffset, encoding) !== -1 } Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) { return bidirectionalIndexOf(this, val, byteOffset, encoding, true) } Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) { return bidirectionalIndexOf(this, val, byteOffset, encoding, false) } function hexWrite (buf, string, offset, length) { offset = Number(offset) || 0 var remaining = buf.length - offset if (!length) { length = remaining } else { length = Number(length) if (length > remaining) { length = remaining } } // must be an even number of digits var strLen = string.length if (strLen % 2 !== 0) throw new TypeError('Invalid hex string') if (length > strLen / 2) { length = strLen / 2 } for (var i = 0; i < length; ++i) { var parsed = parseInt(string.substr(i * 2, 2), 16) if (isNaN(parsed)) return i buf[offset + i] = parsed } return i } function utf8Write (buf, string, offset, length) { return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length) } function asciiWrite (buf, string, offset, length) { return blitBuffer(asciiToBytes(string), buf, offset, length) } function latin1Write (buf, string, offset, length) { return asciiWrite(buf, string, offset, length) } function base64Write (buf, string, offset, length) { return blitBuffer(base64ToBytes(string), buf, offset, length) } function ucs2Write (buf, string, offset, length) { return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length) } Buffer.prototype.write = function write (string, offset, length, encoding) { // Buffer#write(string) if (offset === undefined) { encoding = 'utf8' length = this.length offset = 0 // Buffer#write(string, encoding) } else if (length === undefined && typeof offset === 'string') { encoding = offset length = this.length offset = 0 // Buffer#write(string, offset[, length][, encoding]) } else if (isFinite(offset)) { offset = offset | 0 if (isFinite(length)) { length = length | 0 if (encoding === undefined) encoding = 'utf8' } else { encoding = length length = undefined } // legacy write(string, encoding, offset, length) - remove in v0.13 } else { throw new Error( 'Buffer.write(string, encoding, offset[, length]) is no longer supported' ) } var remaining = this.length - offset if (length === undefined || length > remaining) length = remaining if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) { throw new RangeError('Attempt to write outside buffer bounds') } if (!encoding) encoding = 'utf8' var loweredCase = false for (;;) { switch (encoding) { case 'hex': return hexWrite(this, string, offset, length) case 'utf8': case 'utf-8': return utf8Write(this, string, offset, length) case 'ascii': return asciiWrite(this, string, offset, length) case 'latin1': case 'binary': return latin1Write(this, string, offset, length) case 'base64': // Warning: maxLength not taken into account in base64Write return base64Write(this, string, offset, length) case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': return ucs2Write(this, string, offset, length) default: if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) encoding = ('' + encoding).toLowerCase() loweredCase = true } } } Buffer.prototype.toJSON = function toJSON () { return { type: 'Buffer', data: Array.prototype.slice.call(this._arr || this, 0) } } function base64Slice (buf, start, end) { if (start === 0 && end === buf.length) { return base64.fromByteArray(buf) } else { return base64.fromByteArray(buf.slice(start, end)) } } function utf8Slice (buf, start, end) { end = Math.min(buf.length, end) var res = [] var i = start while (i < end) { var firstByte = buf[i] var codePoint = null var bytesPerSequence = (firstByte > 0xEF) ? 4 : (firstByte > 0xDF) ? 3 : (firstByte > 0xBF) ? 2 : 1 if (i + bytesPerSequence <= end) { var secondByte, thirdByte, fourthByte, tempCodePoint switch (bytesPerSequence) { case 1: if (firstByte < 0x80) { codePoint = firstByte } break case 2: secondByte = buf[i + 1] if ((secondByte & 0xC0) === 0x80) { tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F) if (tempCodePoint > 0x7F) { codePoint = tempCodePoint } } break case 3: secondByte = buf[i + 1] thirdByte = buf[i + 2] if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) { tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F) if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) { codePoint = tempCodePoint } } break case 4: secondByte = buf[i + 1] thirdByte = buf[i + 2] fourthByte = buf[i + 3] if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) { tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F) if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) { codePoint = tempCodePoint } } } } if (codePoint === null) { // we did not generate a valid codePoint so insert a // replacement char (U+FFFD) and advance only 1 byte codePoint = 0xFFFD bytesPerSequence = 1 } else if (codePoint > 0xFFFF) { // encode to utf16 (surrogate pair dance) codePoint -= 0x10000 res.push(codePoint >>> 10 & 0x3FF | 0xD800) codePoint = 0xDC00 | codePoint & 0x3FF } res.push(codePoint) i += bytesPerSequence } return decodeCodePointsArray(res) } // Based on http://stackoverflow.com/a/22747272/680742, the browser with // the lowest limit is Chrome, with 0x10000 args. // We go 1 magnitude less, for safety var MAX_ARGUMENTS_LENGTH = 0x1000 function decodeCodePointsArray (codePoints) { var len = codePoints.length if (len <= MAX_ARGUMENTS_LENGTH) { return String.fromCharCode.apply(String, codePoints) // avoid extra slice() } // Decode in chunks to avoid "call stack size exceeded". var res = '' var i = 0 while (i < len) { res += String.fromCharCode.apply( String, codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH) ) } return res } function asciiSlice (buf, start, end) { var ret = '' end = Math.min(buf.length, end) for (var i = start; i < end; ++i) { ret += String.fromCharCode(buf[i] & 0x7F) } return ret } function latin1Slice (buf, start, end) { var ret = '' end = Math.min(buf.length, end) for (var i = start; i < end; ++i) { ret += String.fromCharCode(buf[i]) } return ret } function hexSlice (buf, start, end) { var len = buf.length if (!start || start < 0) start = 0 if (!end || end < 0 || end > len) end = len var out = '' for (var i = start; i < end; ++i) { out += toHex(buf[i]) } return out } function utf16leSlice (buf, start, end) { var bytes = buf.slice(start, end) var res = '' for (var i = 0; i < bytes.length; i += 2) { res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256) } return res } Buffer.prototype.slice = function slice (start, end) { var len = this.length start = ~~start end = end === undefined ? len : ~~end if (start < 0) { start += len if (start < 0) start = 0 } else if (start > len) { start = len } if (end < 0) { end += len if (end < 0) end = 0 } else if (end > len) { end = len } if (end < start) end = start var newBuf if (Buffer.TYPED_ARRAY_SUPPORT) { newBuf = this.subarray(start, end) newBuf.__proto__ = Buffer.prototype } else { var sliceLen = end - start newBuf = new Buffer(sliceLen, undefined) for (var i = 0; i < sliceLen; ++i) { newBuf[i] = this[i + start] } } return newBuf } /* * Need to make sure that buffer isn't trying to write out of bounds. */ function checkOffset (offset, ext, length) { if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint') if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length') } Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) { offset = offset | 0 byteLength = byteLength | 0 if (!noAssert) checkOffset(offset, byteLength, this.length) var val = this[offset] var mul = 1 var i = 0 while (++i < byteLength && (mul *= 0x100)) { val += this[offset + i] * mul } return val } Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) { offset = offset | 0 byteLength = byteLength | 0 if (!noAssert) { checkOffset(offset, byteLength, this.length) } var val = this[offset + --byteLength] var mul = 1 while (byteLength > 0 && (mul *= 0x100)) { val += this[offset + --byteLength] * mul } return val } Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) { if (!noAssert) checkOffset(offset, 1, this.length) return this[offset] } Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) { if (!noAssert) checkOffset(offset, 2, this.length) return this[offset] | (this[offset + 1] << 8) } Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) { if (!noAssert) checkOffset(offset, 2, this.length) return (this[offset] << 8) | this[offset + 1] } Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) { if (!noAssert) checkOffset(offset, 4, this.length) return ((this[offset]) | (this[offset + 1] << 8) | (this[offset + 2] << 16)) + (this[offset + 3] * 0x1000000) } Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) { if (!noAssert) checkOffset(offset, 4, this.length) return (this[offset] * 0x1000000) + ((this[offset + 1] << 16) | (this[offset + 2] << 8) | this[offset + 3]) } Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) { offset = offset | 0 byteLength = byteLength | 0 if (!noAssert) checkOffset(offset, byteLength, this.length) var val = this[offset] var mul = 1 var i = 0 while (++i < byteLength && (mul *= 0x100)) { val += this[offset + i] * mul } mul *= 0x80 if (val >= mul) val -= Math.pow(2, 8 * byteLength) return val } Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) { offset = offset | 0 byteLength = byteLength | 0 if (!noAssert) checkOffset(offset, byteLength, this.length) var i = byteLength var mul = 1 var val = this[offset + --i] while (i > 0 && (mul *= 0x100)) { val += this[offset + --i] * mul } mul *= 0x80 if (val >= mul) val -= Math.pow(2, 8 * byteLength) return val } Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) { if (!noAssert) checkOffset(offset, 1, this.length) if (!(this[offset] & 0x80)) return (this[offset]) return ((0xff - this[offset] + 1) * -1) } Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) { if (!noAssert) checkOffset(offset, 2, this.length) var val = this[offset] | (this[offset + 1] << 8) return (val & 0x8000) ? val | 0xFFFF0000 : val } Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) { if (!noAssert) checkOffset(offset, 2, this.length) var val = this[offset + 1] | (this[offset] << 8) return (val & 0x8000) ? val | 0xFFFF0000 : val } Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) { if (!noAssert) checkOffset(offset, 4, this.length) return (this[offset]) | (this[offset + 1] << 8) | (this[offset + 2] << 16) | (this[offset + 3] << 24) } Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) { if (!noAssert) checkOffset(offset, 4, this.length) return (this[offset] << 24) | (this[offset + 1] << 16) | (this[offset + 2] << 8) | (this[offset + 3]) } Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) { if (!noAssert) checkOffset(offset, 4, this.length) return ieee754.read(this, offset, true, 23, 4) } Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) { if (!noAssert) checkOffset(offset, 4, this.length) return ieee754.read(this, offset, false, 23, 4) } Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) { if (!noAssert) checkOffset(offset, 8, this.length) return ieee754.read(this, offset, true, 52, 8) } Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) { if (!noAssert) checkOffset(offset, 8, this.length) return ieee754.read(this, offset, false, 52, 8) } function checkInt (buf, value, offset, ext, max, min) { if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance') if (value > max || value < min) throw new RangeError('"value" argument is out of bounds') if (offset + ext > buf.length) throw new RangeError('Index out of range') } Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) { value = +value offset = offset | 0 byteLength = byteLength | 0 if (!noAssert) { var maxBytes = Math.pow(2, 8 * byteLength) - 1 checkInt(this, value, offset, byteLength, maxBytes, 0) } var mul = 1 var i = 0 this[offset] = value & 0xFF while (++i < byteLength && (mul *= 0x100)) { this[offset + i] = (value / mul) & 0xFF } return offset + byteLength } Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) { value = +value offset = offset | 0 byteLength = byteLength | 0 if (!noAssert) { var maxBytes = Math.pow(2, 8 * byteLength) - 1 checkInt(this, value, offset, byteLength, maxBytes, 0) } var i = byteLength - 1 var mul = 1 this[offset + i] = value & 0xFF while (--i >= 0 && (mul *= 0x100)) { this[offset + i] = (value / mul) & 0xFF } return offset + byteLength } Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) { value = +value offset = offset | 0 if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0) if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) this[offset] = (value & 0xff) return offset + 1 } function objectWriteUInt16 (buf, value, offset, littleEndian) { if (value < 0) value = 0xffff + value + 1 for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) { buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>> (littleEndian ? i : 1 - i) * 8 } } Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) { value = +value offset = offset | 0 if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) if (Buffer.TYPED_ARRAY_SUPPORT) { this[offset] = (value & 0xff) this[offset + 1] = (value >>> 8) } else { objectWriteUInt16(this, value, offset, true) } return offset + 2 } Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) { value = +value offset = offset | 0 if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) if (Buffer.TYPED_ARRAY_SUPPORT) { this[offset] = (value >>> 8) this[offset + 1] = (value & 0xff) } else { objectWriteUInt16(this, value, offset, false) } return offset + 2 } function objectWriteUInt32 (buf, value, offset, littleEndian) { if (value < 0) value = 0xffffffff + value + 1 for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) { buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff } } Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) { value = +value offset = offset | 0 if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) if (Buffer.TYPED_ARRAY_SUPPORT) { this[offset + 3] = (value >>> 24) this[offset + 2] = (value >>> 16) this[offset + 1] = (value >>> 8) this[offset] = (value & 0xff) } else { objectWriteUInt32(this, value, offset, true) } return offset + 4 } Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) { value = +value offset = offset | 0 if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) if (Buffer.TYPED_ARRAY_SUPPORT) { this[offset] = (value >>> 24) this[offset + 1] = (value >>> 16) this[offset + 2] = (value >>> 8) this[offset + 3] = (value & 0xff) } else { objectWriteUInt32(this, value, offset, false) } return offset + 4 } Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) { value = +value offset = offset | 0 if (!noAssert) { var limit = Math.pow(2, 8 * byteLength - 1) checkInt(this, value, offset, byteLength, limit - 1, -limit) } var i = 0 var mul = 1 var sub = 0 this[offset] = value & 0xFF while (++i < byteLength && (mul *= 0x100)) { if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) { sub = 1 } this[offset + i] = ((value / mul) >> 0) - sub & 0xFF } return offset + byteLength } Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) { value = +value offset = offset | 0 if (!noAssert) { var limit = Math.pow(2, 8 * byteLength - 1) checkInt(this, value, offset, byteLength, limit - 1, -limit) } var i = byteLength - 1 var mul = 1 var sub = 0 this[offset + i] = value & 0xFF while (--i >= 0 && (mul *= 0x100)) { if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) { sub = 1 } this[offset + i] = ((value / mul) >> 0) - sub & 0xFF } return offset + byteLength } Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) { value = +value offset = offset | 0 if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80) if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) if (value < 0) value = 0xff + value + 1 this[offset] = (value & 0xff) return offset + 1 } Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) { value = +value offset = offset | 0 if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) if (Buffer.TYPED_ARRAY_SUPPORT) { this[offset] = (value & 0xff) this[offset + 1] = (value >>> 8) } else { objectWriteUInt16(this, value, offset, true) } return offset + 2 } Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) { value = +value offset = offset | 0 if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) if (Buffer.TYPED_ARRAY_SUPPORT) { this[offset] = (value >>> 8) this[offset + 1] = (value & 0xff) } else { objectWriteUInt16(this, value, offset, false) } return offset + 2 } Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) { value = +value offset = offset | 0 if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) if (Buffer.TYPED_ARRAY_SUPPORT) { this[offset] = (value & 0xff) this[offset + 1] = (value >>> 8) this[offset + 2] = (value >>> 16) this[offset + 3] = (value >>> 24) } else { objectWriteUInt32(this, value, offset, true) } return offset + 4 } Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) { value = +value offset = offset | 0 if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) if (value < 0) value = 0xffffffff + value + 1 if (Buffer.TYPED_ARRAY_SUPPORT) { this[offset] = (value >>> 24) this[offset + 1] = (value >>> 16) this[offset + 2] = (value >>> 8) this[offset + 3] = (value & 0xff) } else { objectWriteUInt32(this, value, offset, false) } return offset + 4 } function checkIEEE754 (buf, value, offset, ext, max, min) { if (offset + ext > buf.length) throw new RangeError('Index out of range') if (offset < 0) throw new RangeError('Index out of range') } function writeFloat (buf, value, offset, littleEndian, noAssert) { if (!noAssert) { checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38) } ieee754.write(buf, value, offset, littleEndian, 23, 4) return offset + 4 } Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) { return writeFloat(this, value, offset, true, noAssert) } Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) { return writeFloat(this, value, offset, false, noAssert) } function writeDouble (buf, value, offset, littleEndian, noAssert) { if (!noAssert) { checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308) } ieee754.write(buf, value, offset, littleEndian, 52, 8) return offset + 8 } Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) { return writeDouble(this, value, offset, true, noAssert) } Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) { return writeDouble(this, value, offset, false, noAssert) } // copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) Buffer.prototype.copy = function copy (target, targetStart, start, end) { if (!start) start = 0 if (!end && end !== 0) end = this.length if (targetStart >= target.length) targetStart = target.length if (!targetStart) targetStart = 0 if (end > 0 && end < start) end = start // Copy 0 bytes; we're done if (end === start) return 0 if (target.length === 0 || this.length === 0) return 0 // Fatal error conditions if (targetStart < 0) { throw new RangeError('targetStart out of bounds') } if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds') if (end < 0) throw new RangeError('sourceEnd out of bounds') // Are we oob? if (end > this.length) end = this.length if (target.length - targetStart < end - start) { end = target.length - targetStart + start } var len = end - start var i if (this === target && start < targetStart && targetStart < end) { // descending copy from end for (i = len - 1; i >= 0; --i) { target[i + targetStart] = this[i + start] } } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) { // ascending copy from start for (i = 0; i < len; ++i) { target[i + targetStart] = this[i + start] } } else { Uint8Array.prototype.set.call( target, this.subarray(start, start + len), targetStart ) } return len } // Usage: // buffer.fill(number[, offset[, end]]) // buffer.fill(buffer[, offset[, end]]) // buffer.fill(string[, offset[, end]][, encoding]) Buffer.prototype.fill = function fill (val, start, end, encoding) { // Handle string cases: if (typeof val === 'string') { if (typeof start === 'string') { encoding = start start = 0 end = this.length } else if (typeof end === 'string') { encoding = end end = this.length } if (val.length === 1) { var code = val.charCodeAt(0) if (code < 256) { val = code } } if (encoding !== undefined && typeof encoding !== 'string') { throw new TypeError('encoding must be a string') } if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) { throw new TypeError('Unknown encoding: ' + encoding) } } else if (typeof val === 'number') { val = val & 255 } // Invalid ranges are not set to a default, so can range check early. if (start < 0 || this.length < start || this.length < end) { throw new RangeError('Out of range index') } if (end <= start) { return this } start = start >>> 0 end = end === undefined ? this.length : end >>> 0 if (!val) val = 0 var i if (typeof val === 'number') { for (i = start; i < end; ++i) { this[i] = val } } else { var bytes = Buffer.isBuffer(val) ? val : utf8ToBytes(new Buffer(val, encoding).toString()) var len = bytes.length for (i = 0; i < end - start; ++i) { this[i + start] = bytes[i % len] } } return this } // HELPER FUNCTIONS // ================ var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g function base64clean (str) { // Node strips out invalid characters like \n and \t from the string, base64-js does not str = stringtrim(str).replace(INVALID_BASE64_RE, '') // Node converts strings with length < 2 to '' if (str.length < 2) return '' // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not while (str.length % 4 !== 0) { str = str + '=' } return str } function stringtrim (str) { if (str.trim) return str.trim() return str.replace(/^\s+|\s+$/g, '') } function toHex (n) { if (n < 16) return '0' + n.toString(16) return n.toString(16) } function utf8ToBytes (string, units) { units = units || Infinity var codePoint var length = string.length var leadSurrogate = null var bytes = [] for (var i = 0; i < length; ++i) { codePoint = string.charCodeAt(i) // is surrogate component if (codePoint > 0xD7FF && codePoint < 0xE000) { // last char was a lead if (!leadSurrogate) { // no lead yet if (codePoint > 0xDBFF) { // unexpected trail if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) continue } else if (i + 1 === length) { // unpaired lead if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) continue } // valid lead leadSurrogate = codePoint continue } // 2 leads in a row if (codePoint < 0xDC00) { if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) leadSurrogate = codePoint continue } // valid surrogate pair codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000 } else if (leadSurrogate) { // valid bmp char, but last char was a lead if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) } leadSurrogate = null // encode utf8 if (codePoint < 0x80) { if ((units -= 1) < 0) break bytes.push(codePoint) } else if (codePoint < 0x800) { if ((units -= 2) < 0) break bytes.push( codePoint >> 0x6 | 0xC0, codePoint & 0x3F | 0x80 ) } else if (codePoint < 0x10000) { if ((units -= 3) < 0) break bytes.push( codePoint >> 0xC | 0xE0, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80 ) } else if (codePoint < 0x110000) { if ((units -= 4) < 0) break bytes.push( codePoint >> 0x12 | 0xF0, codePoint >> 0xC & 0x3F | 0x80, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80 ) } else { throw new Error('Invalid code point') } } return bytes } function asciiToBytes (str) { var byteArray = [] for (var i = 0; i < str.length; ++i) { // Node's code seems to be doing this and not & 0x7F.. byteArray.push(str.charCodeAt(i) & 0xFF) } return byteArray } function utf16leToBytes (str, units) { var c, hi, lo var byteArray = [] for (var i = 0; i < str.length; ++i) { if ((units -= 2) < 0) break c = str.charCodeAt(i) hi = c >> 8 lo = c % 256 byteArray.push(lo) byteArray.push(hi) } return byteArray } function base64ToBytes (str) { return base64.toByteArray(base64clean(str)) } function blitBuffer (src, dst, offset, length) { for (var i = 0; i < length; ++i) { if ((i + offset >= dst.length) || (i >= src.length)) break dst[i + offset] = src[i] } return i } function isnan (val) { return val !== val // eslint-disable-line no-self-compare } /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__("DuR2"))) /***/ }), /***/ "F022": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // EXTERNAL MODULE: ./node_modules/react/index.js var react = __webpack_require__("GiK3"); var react_default = /*#__PURE__*/__webpack_require__.n(react); // EXTERNAL MODULE: ./node_modules/prop-types/index.js var prop_types = __webpack_require__("KSGD"); var prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types); // EXTERNAL MODULE: ./node_modules/classnames/index.js var classnames = __webpack_require__("HW6M"); var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); // EXTERNAL MODULE: ./node_modules/warning/warning.js var warning = __webpack_require__("Trj0"); var warning_default = /*#__PURE__*/__webpack_require__.n(warning); // EXTERNAL MODULE: ./node_modules/rc-util/es/Children/toArray.js var toArray = __webpack_require__("7fBz"); // EXTERNAL MODULE: ./node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js var react_lifecycles_compat_es = __webpack_require__("R8mX"); // EXTERNAL MODULE: ./node_modules/rc-tree/es/contextTypes.js var contextTypes = __webpack_require__("uJF6"); // EXTERNAL MODULE: ./node_modules/rc-tree/es/util.js var util = __webpack_require__("z//q"); // CONCATENATED MODULE: ./node_modules/rc-tree/es/Tree.js function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } 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; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } var Tree_Tree = /*#__PURE__*/function (_React$Component) { _inherits(Tree, _React$Component); var _super = _createSuper(Tree); function Tree() { var _this; _classCallCheck(this, Tree); _this = _super.apply(this, arguments); /** Internal usage for `rc-tree-select`, we don't promise it will not change. */ _this.domTreeNodes = {}; _this.state = { keyEntities: {}, selectedKeys: [], checkedKeys: [], halfCheckedKeys: [], loadedKeys: [], loadingKeys: [], expandedKeys: [], dragNodesKeys: [], dragOverNodeKey: null, dropPosition: null, treeNode: [], prevProps: null }; _this.onNodeDragStart = function (event, node) { var expandedKeys = _this.state.expandedKeys; var onDragStart = _this.props.onDragStart; var _node$props = node.props, eventKey = _node$props.eventKey, children = _node$props.children; _this.dragNode = node; _this.setState({ dragNodesKeys: Object(util["j" /* getDragNodesKeys */])(children, node), expandedKeys: Object(util["b" /* arrDel */])(expandedKeys, eventKey) }); if (onDragStart) { onDragStart({ event: event, node: node }); } }; /** * [Legacy] Select handler is less small than node, * so that this will trigger when drag enter node or select handler. * This is a little tricky if customize css without padding. * Better for use mouse move event to refresh drag state. * But let's just keep it to avoid event trigger logic change. */ _this.onNodeDragEnter = function (event, node) { var _this$state = _this.state, expandedKeys = _this$state.expandedKeys, dragNodesKeys = _this$state.dragNodesKeys; var onDragEnter = _this.props.onDragEnter; var _node$props2 = node.props, pos = _node$props2.pos, eventKey = _node$props2.eventKey; if (!_this.dragNode || dragNodesKeys.indexOf(eventKey) !== -1) return; var dropPosition = Object(util["c" /* calcDropPosition */])(event, node); // Skip if drag node is self if (_this.dragNode.props.eventKey === eventKey && dropPosition === 0) { _this.setState({ dragOverNodeKey: '', dropPosition: null }); return; } // Ref: https://github.com/react-component/tree/issues/132 // Add timeout to let onDragLevel fire before onDragEnter, // so that we can clean drag props for onDragLeave node. // Macro task for this: // https://html.spec.whatwg.org/multipage/webappapis.html#clean-up-after-running-script setTimeout(function () { // Update drag over node _this.setState({ dragOverNodeKey: eventKey, dropPosition: dropPosition }); // Side effect for delay drag if (!_this.delayedDragEnterLogic) { _this.delayedDragEnterLogic = {}; } Object.keys(_this.delayedDragEnterLogic).forEach(function (key) { clearTimeout(_this.delayedDragEnterLogic[key]); }); _this.delayedDragEnterLogic[pos] = window.setTimeout(function () { var newExpandedKeys = Object(util["a" /* arrAdd */])(expandedKeys, eventKey); if (!('expandedKeys' in _this.props)) { _this.setState({ expandedKeys: newExpandedKeys }); } if (onDragEnter) { onDragEnter({ event: event, node: node, expandedKeys: newExpandedKeys }); } }, 400); }, 0); }; _this.onNodeDragOver = function (event, node) { var dragNodesKeys = _this.state.dragNodesKeys; var onDragOver = _this.props.onDragOver; var eventKey = node.props.eventKey; if (dragNodesKeys.indexOf(eventKey) !== -1) { return; } // Update drag position if (_this.dragNode && eventKey === _this.state.dragOverNodeKey) { var dropPosition = Object(util["c" /* calcDropPosition */])(event, node); if (dropPosition === _this.state.dropPosition) return; _this.setState({ dropPosition: dropPosition }); } if (onDragOver) { onDragOver({ event: event, node: node }); } }; _this.onNodeDragLeave = function (event, node) { var onDragLeave = _this.props.onDragLeave; _this.setState({ dragOverNodeKey: '' }); if (onDragLeave) { onDragLeave({ event: event, node: node }); } }; _this.onNodeDragEnd = function (event, node) { var onDragEnd = _this.props.onDragEnd; _this.setState({ dragOverNodeKey: '' }); if (onDragEnd) { onDragEnd({ event: event, node: node }); } _this.dragNode = null; }; _this.onNodeDrop = function (event, node) { var _this$state2 = _this.state, _this$state2$dragNode = _this$state2.dragNodesKeys, dragNodesKeys = _this$state2$dragNode === void 0 ? [] : _this$state2$dragNode, dropPosition = _this$state2.dropPosition; var onDrop = _this.props.onDrop; var _node$props3 = node.props, eventKey = _node$props3.eventKey, pos = _node$props3.pos; _this.setState({ dragOverNodeKey: '' }); if (dragNodesKeys.indexOf(eventKey) !== -1) { warning_default()(false, "Can not drop to dragNode(include it's children node)"); return; } var posArr = Object(util["o" /* posToArr */])(pos); var dropResult = { event: event, node: node, dragNode: _this.dragNode, dragNodesKeys: dragNodesKeys.slice(), dropPosition: dropPosition + Number(posArr[posArr.length - 1]), dropToGap: false }; if (dropPosition !== 0) { dropResult.dropToGap = true; } if (onDrop) { onDrop(dropResult); } _this.dragNode = null; }; _this.onNodeClick = function (e, treeNode) { var onClick = _this.props.onClick; if (onClick) { onClick(e, treeNode); } }; _this.onNodeDoubleClick = function (e, treeNode) { var onDoubleClick = _this.props.onDoubleClick; if (onDoubleClick) { onDoubleClick(e, treeNode); } }; _this.onNodeSelect = function (e, treeNode) { var selectedKeys = _this.state.selectedKeys; var keyEntities = _this.state.keyEntities; var _this$props = _this.props, onSelect = _this$props.onSelect, multiple = _this$props.multiple; var _treeNode$props = treeNode.props, selected = _treeNode$props.selected, eventKey = _treeNode$props.eventKey; var targetSelected = !selected; // Update selected keys if (!targetSelected) { selectedKeys = Object(util["b" /* arrDel */])(selectedKeys, eventKey); } else if (!multiple) { selectedKeys = [eventKey]; } else { selectedKeys = Object(util["a" /* arrAdd */])(selectedKeys, eventKey); } // [Legacy] Not found related usage in doc or upper libs var selectedNodes = selectedKeys.map(function (key) { var entity = keyEntities[key]; if (!entity) return null; return entity.node; }).filter(function (node) { return node; }); _this.setUncontrolledState({ selectedKeys: selectedKeys }); if (onSelect) { onSelect(selectedKeys, { event: 'select', selected: targetSelected, node: treeNode, selectedNodes: selectedNodes, nativeEvent: e.nativeEvent }); } }; _this.onNodeCheck = function (e, treeNode, checked) { var _this$state3 = _this.state, keyEntities = _this$state3.keyEntities, oriCheckedKeys = _this$state3.checkedKeys, oriHalfCheckedKeys = _this$state3.halfCheckedKeys; var _this$props2 = _this.props, checkStrictly = _this$props2.checkStrictly, onCheck = _this$props2.onCheck; var eventKey = treeNode.props.eventKey; // Prepare trigger arguments var checkedObj; var eventObj = { event: 'check', node: treeNode, checked: checked, nativeEvent: e.nativeEvent }; if (checkStrictly) { var checkedKeys = checked ? Object(util["a" /* arrAdd */])(oriCheckedKeys, eventKey) : Object(util["b" /* arrDel */])(oriCheckedKeys, eventKey); var halfCheckedKeys = Object(util["b" /* arrDel */])(oriHalfCheckedKeys, eventKey); checkedObj = { checked: checkedKeys, halfChecked: halfCheckedKeys }; eventObj.checkedNodes = checkedKeys.map(function (key) { return keyEntities[key]; }).filter(function (entity) { return entity; }).map(function (entity) { return entity.node; }); _this.setUncontrolledState({ checkedKeys: checkedKeys }); } else { var _conductCheck = Object(util["e" /* conductCheck */])([eventKey], checked, keyEntities, { checkedKeys: oriCheckedKeys, halfCheckedKeys: oriHalfCheckedKeys }), _checkedKeys = _conductCheck.checkedKeys, _halfCheckedKeys = _conductCheck.halfCheckedKeys; checkedObj = _checkedKeys; // [Legacy] This is used for `rc-tree-select` eventObj.checkedNodes = []; eventObj.checkedNodesPositions = []; eventObj.halfCheckedKeys = _halfCheckedKeys; _checkedKeys.forEach(function (key) { var entity = keyEntities[key]; if (!entity) return; var node = entity.node, pos = entity.pos; eventObj.checkedNodes.push(node); eventObj.checkedNodesPositions.push({ node: node, pos: pos }); }); _this.setUncontrolledState({ checkedKeys: _checkedKeys, halfCheckedKeys: _halfCheckedKeys }); } if (onCheck) { onCheck(checkedObj, eventObj); } }; _this.onNodeLoad = function (treeNode) { return new Promise(function (resolve) { // We need to get the latest state of loading/loaded keys _this.setState(function (_ref) { var _ref$loadedKeys = _ref.loadedKeys, loadedKeys = _ref$loadedKeys === void 0 ? [] : _ref$loadedKeys, _ref$loadingKeys = _ref.loadingKeys, loadingKeys = _ref$loadingKeys === void 0 ? [] : _ref$loadingKeys; var _this$props3 = _this.props, loadData = _this$props3.loadData, onLoad = _this$props3.onLoad; var eventKey = treeNode.props.eventKey; if (!loadData || loadedKeys.indexOf(eventKey) !== -1 || loadingKeys.indexOf(eventKey) !== -1) { // react 15 will warn if return null return {}; } // Process load data var promise = loadData(treeNode); promise.then(function () { var _this$state4 = _this.state, currentLoadedKeys = _this$state4.loadedKeys, currentLoadingKeys = _this$state4.loadingKeys; var newLoadedKeys = Object(util["a" /* arrAdd */])(currentLoadedKeys, eventKey); var newLoadingKeys = Object(util["b" /* arrDel */])(currentLoadingKeys, eventKey); // onLoad should trigger before internal setState to avoid `loadData` trigger twice. // https://github.com/ant-design/ant-design/issues/12464 if (onLoad) { onLoad(newLoadedKeys, { event: 'load', node: treeNode }); } _this.setUncontrolledState({ loadedKeys: newLoadedKeys }); _this.setState({ loadingKeys: newLoadingKeys }); resolve(); }); return { loadingKeys: Object(util["a" /* arrAdd */])(loadingKeys, eventKey) }; }); }); }; _this.onNodeExpand = function (e, treeNode) { var expandedKeys = _this.state.expandedKeys; var _this$props4 = _this.props, onExpand = _this$props4.onExpand, loadData = _this$props4.loadData; var _treeNode$props2 = treeNode.props, eventKey = _treeNode$props2.eventKey, expanded = _treeNode$props2.expanded; // Update selected keys var index = expandedKeys.indexOf(eventKey); var targetExpanded = !expanded; warning_default()(expanded && index !== -1 || !expanded && index === -1, 'Expand state not sync with index check'); if (targetExpanded) { expandedKeys = Object(util["a" /* arrAdd */])(expandedKeys, eventKey); } else { expandedKeys = Object(util["b" /* arrDel */])(expandedKeys, eventKey); } _this.setUncontrolledState({ expandedKeys: expandedKeys }); if (onExpand) { onExpand(expandedKeys, { node: treeNode, expanded: targetExpanded, nativeEvent: e.nativeEvent }); } // Async Load data if (targetExpanded && loadData) { var loadPromise = _this.onNodeLoad(treeNode); return loadPromise ? loadPromise.then(function () { // [Legacy] Refresh logic _this.setUncontrolledState({ expandedKeys: expandedKeys }); }) : null; } return null; }; _this.onNodeMouseEnter = function (event, node) { var onMouseEnter = _this.props.onMouseEnter; if (onMouseEnter) { onMouseEnter({ event: event, node: node }); } }; _this.onNodeMouseLeave = function (event, node) { var onMouseLeave = _this.props.onMouseLeave; if (onMouseLeave) { onMouseLeave({ event: event, node: node }); } }; _this.onNodeContextMenu = function (event, node) { var onRightClick = _this.props.onRightClick; if (onRightClick) { event.preventDefault(); onRightClick({ event: event, node: node }); } }; /** * Only update the value which is not in props */ _this.setUncontrolledState = function (state) { var needSync = false; var newState = {}; Object.keys(state).forEach(function (name) { if (name in _this.props) return; needSync = true; newState[name] = state[name]; }); if (needSync) { _this.setState(newState); } }; _this.registerTreeNode = function (key, node) { if (node) { _this.domTreeNodes[key] = node; } else { delete _this.domTreeNodes[key]; } }; _this.isKeyChecked = function (key) { var _this$state$checkedKe = _this.state.checkedKeys, checkedKeys = _this$state$checkedKe === void 0 ? [] : _this$state$checkedKe; return checkedKeys.indexOf(key) !== -1; }; /** * [Legacy] Original logic use `key` as tracking clue. * We have to use `cloneElement` to pass `key`. */ _this.renderTreeNode = function (child, index) { var level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0; var _this$state5 = _this.state, keyEntities = _this$state5.keyEntities, _this$state5$expanded = _this$state5.expandedKeys, expandedKeys = _this$state5$expanded === void 0 ? [] : _this$state5$expanded, _this$state5$selected = _this$state5.selectedKeys, selectedKeys = _this$state5$selected === void 0 ? [] : _this$state5$selected, _this$state5$halfChec = _this$state5.halfCheckedKeys, halfCheckedKeys = _this$state5$halfChec === void 0 ? [] : _this$state5$halfChec, _this$state5$loadedKe = _this$state5.loadedKeys, loadedKeys = _this$state5$loadedKe === void 0 ? [] : _this$state5$loadedKe, _this$state5$loadingK = _this$state5.loadingKeys, loadingKeys = _this$state5$loadingK === void 0 ? [] : _this$state5$loadingK, dragOverNodeKey = _this$state5.dragOverNodeKey, dropPosition = _this$state5.dropPosition; var pos = Object(util["l" /* getPosition */])(level, index); var key = child.key || pos; if (!keyEntities[key]) { Object(util["p" /* warnOnlyTreeNode */])(); return null; } return react["cloneElement"](child, { key: key, eventKey: key, expanded: expandedKeys.indexOf(key) !== -1, selected: selectedKeys.indexOf(key) !== -1, loaded: loadedKeys.indexOf(key) !== -1, loading: loadingKeys.indexOf(key) !== -1, checked: _this.isKeyChecked(key), halfChecked: halfCheckedKeys.indexOf(key) !== -1, pos: pos, // [Legacy] Drag props dragOver: dragOverNodeKey === key && dropPosition === 0, dragOverGapTop: dragOverNodeKey === key && dropPosition === -1, dragOverGapBottom: dragOverNodeKey === key && dropPosition === 1 }); }; return _this; } _createClass(Tree, [{ key: "render", value: function render() { var _this2 = this; var treeNode = this.state.treeNode; var _this$props5 = this.props, prefixCls = _this$props5.prefixCls, className = _this$props5.className, focusable = _this$props5.focusable, style = _this$props5.style, showLine = _this$props5.showLine, _this$props5$tabIndex = _this$props5.tabIndex, tabIndex = _this$props5$tabIndex === void 0 ? 0 : _this$props5$tabIndex, selectable = _this$props5.selectable, showIcon = _this$props5.showIcon, icon = _this$props5.icon, switcherIcon = _this$props5.switcherIcon, draggable = _this$props5.draggable, checkable = _this$props5.checkable, checkStrictly = _this$props5.checkStrictly, disabled = _this$props5.disabled, motion = _this$props5.motion, loadData = _this$props5.loadData, filterTreeNode = _this$props5.filterTreeNode; var domProps = Object(util["i" /* getDataAndAria */])(this.props); if (focusable) { domProps.tabIndex = tabIndex; } return react["createElement"](contextTypes["a" /* TreeContext */].Provider, { value: { prefixCls: prefixCls, selectable: selectable, showIcon: showIcon, icon: icon, switcherIcon: switcherIcon, draggable: draggable, checkable: checkable, checkStrictly: checkStrictly, disabled: disabled, motion: motion, loadData: loadData, filterTreeNode: filterTreeNode, renderTreeNode: this.renderTreeNode, isKeyChecked: this.isKeyChecked, onNodeClick: this.onNodeClick, onNodeDoubleClick: this.onNodeDoubleClick, onNodeExpand: this.onNodeExpand, onNodeSelect: this.onNodeSelect, onNodeCheck: this.onNodeCheck, onNodeLoad: this.onNodeLoad, onNodeMouseEnter: this.onNodeMouseEnter, onNodeMouseLeave: this.onNodeMouseLeave, onNodeContextMenu: this.onNodeContextMenu, onNodeDragStart: this.onNodeDragStart, onNodeDragEnter: this.onNodeDragEnter, onNodeDragOver: this.onNodeDragOver, onNodeDragLeave: this.onNodeDragLeave, onNodeDragEnd: this.onNodeDragEnd, onNodeDrop: this.onNodeDrop, registerTreeNode: this.registerTreeNode } }, react["createElement"]("ul", Object.assign({}, domProps, { className: classnames_default()(prefixCls, className, _defineProperty({}, "".concat(prefixCls, "-show-line"), showLine)), style: style, role: "tree", unselectable: "on" }), Object(util["m" /* mapChildren */])(treeNode, function (node, index) { return _this2.renderTreeNode(node, index); }))); } }], [{ key: "getDerivedStateFromProps", value: function getDerivedStateFromProps(props, prevState) { var prevProps = prevState.prevProps; var newState = { prevProps: props }; function needSync(name) { return !prevProps && name in props || prevProps && prevProps[name] !== props[name]; } // ================== Tree Node ================== var treeNode = null; // Check if `treeData` or `children` changed and save into the state. if (needSync('treeData')) { treeNode = Object(util["g" /* convertDataToTree */])(props.treeData); } else if (needSync('children')) { treeNode = Object(toArray["a" /* default */])(props.children); } // Tree support filter function which will break the tree structure in the vdm. // We cache the treeNodes in state so that we can return the treeNode in event trigger. if (treeNode) { newState.treeNode = treeNode; // Calculate the entities data for quick match var entitiesMap = Object(util["h" /* convertTreeToEntities */])(treeNode); newState.keyEntities = entitiesMap.keyEntities; } var keyEntities = newState.keyEntities || prevState.keyEntities; // ================ expandedKeys ================= if (needSync('expandedKeys') || prevProps && needSync('autoExpandParent')) { newState.expandedKeys = props.autoExpandParent || !prevProps && props.defaultExpandParent ? Object(util["f" /* conductExpandParent */])(props.expandedKeys, keyEntities) : props.expandedKeys; } else if (!prevProps && props.defaultExpandAll) { newState.expandedKeys = Object.keys(keyEntities); } else if (!prevProps && props.defaultExpandedKeys) { newState.expandedKeys = props.autoExpandParent || props.defaultExpandParent ? Object(util["f" /* conductExpandParent */])(props.defaultExpandedKeys, keyEntities) : props.defaultExpandedKeys; } // ================ selectedKeys ================= if (props.selectable) { if (needSync('selectedKeys')) { newState.selectedKeys = Object(util["d" /* calcSelectedKeys */])(props.selectedKeys, props); } else if (!prevProps && props.defaultSelectedKeys) { newState.selectedKeys = Object(util["d" /* calcSelectedKeys */])(props.defaultSelectedKeys, props); } } // ================= checkedKeys ================= if (props.checkable) { var checkedKeyEntity; if (needSync('checkedKeys')) { checkedKeyEntity = Object(util["n" /* parseCheckedKeys */])(props.checkedKeys) || {}; } else if (!prevProps && props.defaultCheckedKeys) { checkedKeyEntity = Object(util["n" /* parseCheckedKeys */])(props.defaultCheckedKeys) || {}; } else if (treeNode) { // If treeNode changed, we also need check it checkedKeyEntity = Object(util["n" /* parseCheckedKeys */])(props.checkedKeys) || { checkedKeys: prevState.checkedKeys, halfCheckedKeys: prevState.halfCheckedKeys }; } if (checkedKeyEntity) { var _checkedKeyEntity = checkedKeyEntity, _checkedKeyEntity$che = _checkedKeyEntity.checkedKeys, checkedKeys = _checkedKeyEntity$che === void 0 ? [] : _checkedKeyEntity$che, _checkedKeyEntity$hal = _checkedKeyEntity.halfCheckedKeys, halfCheckedKeys = _checkedKeyEntity$hal === void 0 ? [] : _checkedKeyEntity$hal; if (!props.checkStrictly) { var conductKeys = Object(util["e" /* conductCheck */])(checkedKeys, true, keyEntities); checkedKeys = conductKeys.checkedKeys; halfCheckedKeys = conductKeys.halfCheckedKeys; } newState.checkedKeys = checkedKeys; newState.halfCheckedKeys = halfCheckedKeys; } } // ================= loadedKeys ================== if (needSync('loadedKeys')) { newState.loadedKeys = props.loadedKeys; } return newState; } }]); return Tree; }(react["Component"]); Tree_Tree.propTypes = { prefixCls: prop_types_default.a.string, className: prop_types_default.a.string, style: prop_types_default.a.object, tabIndex: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.number]), children: prop_types_default.a.any, treeData: prop_types_default.a.array, showLine: prop_types_default.a.bool, showIcon: prop_types_default.a.bool, icon: prop_types_default.a.oneOfType([prop_types_default.a.node, prop_types_default.a.func]), focusable: prop_types_default.a.bool, selectable: prop_types_default.a.bool, disabled: prop_types_default.a.bool, multiple: prop_types_default.a.bool, checkable: prop_types_default.a.oneOfType([prop_types_default.a.bool, prop_types_default.a.node]), checkStrictly: prop_types_default.a.bool, draggable: prop_types_default.a.bool, defaultExpandParent: prop_types_default.a.bool, autoExpandParent: prop_types_default.a.bool, defaultExpandAll: prop_types_default.a.bool, defaultExpandedKeys: prop_types_default.a.arrayOf(prop_types_default.a.string), expandedKeys: prop_types_default.a.arrayOf(prop_types_default.a.string), defaultCheckedKeys: prop_types_default.a.arrayOf(prop_types_default.a.string), checkedKeys: prop_types_default.a.oneOfType([prop_types_default.a.arrayOf(prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.number])), prop_types_default.a.object]), defaultSelectedKeys: prop_types_default.a.arrayOf(prop_types_default.a.string), selectedKeys: prop_types_default.a.arrayOf(prop_types_default.a.string), onClick: prop_types_default.a.func, onDoubleClick: prop_types_default.a.func, onExpand: prop_types_default.a.func, onCheck: prop_types_default.a.func, onSelect: prop_types_default.a.func, onLoad: prop_types_default.a.func, loadData: prop_types_default.a.func, loadedKeys: prop_types_default.a.arrayOf(prop_types_default.a.string), onMouseEnter: prop_types_default.a.func, onMouseLeave: prop_types_default.a.func, onRightClick: prop_types_default.a.func, onDragStart: prop_types_default.a.func, onDragEnter: prop_types_default.a.func, onDragOver: prop_types_default.a.func, onDragLeave: prop_types_default.a.func, onDragEnd: prop_types_default.a.func, onDrop: prop_types_default.a.func, filterTreeNode: prop_types_default.a.func, motion: prop_types_default.a.object, switcherIcon: prop_types_default.a.oneOfType([prop_types_default.a.node, prop_types_default.a.func]) }; Tree_Tree.defaultProps = { prefixCls: 'rc-tree', showLine: false, showIcon: true, selectable: true, multiple: false, checkable: false, disabled: false, checkStrictly: false, draggable: false, defaultExpandParent: true, autoExpandParent: false, defaultExpandAll: false, defaultExpandedKeys: [], defaultCheckedKeys: [], defaultSelectedKeys: [] }; Object(react_lifecycles_compat_es["polyfill"])(Tree_Tree); /* harmony default export */ var es_Tree = (Tree_Tree); // EXTERNAL MODULE: ./node_modules/rc-tree/es/TreeNode.js var TreeNode = __webpack_require__("8FQI"); // CONCATENATED MODULE: ./node_modules/rc-tree/es/index.js /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "a", function() { return TreeNode["a" /* default */]; }); var rc_tree_es_Tree = es_Tree; rc_tree_es_Tree.TreeNode = TreeNode["a" /* default */]; /* harmony default export */ var es = __webpack_exports__["b"] = (rc_tree_es_Tree); /***/ }), /***/ "F1Lc": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); var _react = _interopRequireDefault(__webpack_require__("GiK3")); function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } // 屏幕录制 var RecordVideo = /*#__PURE__*/function (_React$Component) { function RecordVideo(props) { (0, _classCallCheck2.default)(this, RecordVideo); return _callSuper(this, RecordVideo, [props]); } (0, _inherits2.default)(RecordVideo, _React$Component); return (0, _createClass2.default)(RecordVideo, [{ key: "render", value: function render() { console.log('this.props', this.props); return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("video", { style: { display: 'none' }, volume: "1", id: "record_rtc_video", controls: true, src: this.props.src, srcObject: this.props.srcObject }), /*#__PURE__*/_react.default.createElement("audio", { id: "record_rtc_audio", controls: true, style: { display: 'none' } })); } }]); }(_react.default.Component); var _default = exports.default = RecordVideo; /***/ }), /***/ "F61X": /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _util = __webpack_require__("eCjd"); var util = _interopRequireWildcard(_util); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } /** * Rule for validating required fields. * * @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 required(rule, value, source, errors, options, type) { if (rule.required && (!source.hasOwnProperty(rule.field) || util.isEmptyValue(value, type || rule.type))) { errors.push(util.format(options.messages.required, rule.fullField)); } } exports['default'] = required; /***/ }), /***/ "F8UN": /***/ (function(module, exports) { module.exports = "data:image/png;base64,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" /***/ }), /***/ "F8xi": /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; var _rule = __webpack_require__("hGxU"); var _rule2 = _interopRequireDefault(_rule); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } function required(rule, value, callback, source, options) { var errors = []; var type = Array.isArray(value) ? 'array' : typeof value === 'undefined' ? 'undefined' : _typeof(value); _rule2['default'].required(rule, value, source, errors, options, type); callback(errors); } exports['default'] = required; /***/ }), /***/ "FSKz": /***/ (function(module, exports) { module.exports = "data:image/png;base64,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" /***/ }), /***/ "FV1P": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__grid__ = __webpack_require__("pmXr"); /* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_0__grid__["b" /* Row */]); /***/ }), /***/ "FW3O": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAiCAYAAAC0nUK+AAAAAXNSR0IArs4c6QAABJlJREFUSA2lVn1oHEUUf292966JSZrsJaHGNqIVtKVGMEFtxcQkWitoVfCDQhD6T0mgFPwgTa4WIjTkgiL1r2oLVqSCWK1iwGJMIm0qVdsEv6iKVanR4BlzCTm9XvZud3xvLxvmNnfpRX//zMx7v/fbuTdv3hzCMtgamWlMO86DALIZJdQAYEiijNH8NxB4SkPxwUd7y0cRyZIDmMMGrb0zzQBORIK8LZdftSHCOZDa3uF9FZ+odp5nifdIKU73TfeChC52VpUKaN0UgDtuCEBNhQZlRQhzlyVMztjw2UULhr+1YCruMJWE8IW7wmZXD2LG4NpcF/1wKfGevtjbND5qaAA7m4rhkYZVENCzvr/AzgxWWsJ755Nw9FQCUjar4YnGbvMx7wMkk8GZ4J7nSbijvBihf0cZNG8MgibyC3MU+zetNeDW6ww4+6MFyZTcMDE6r/880j/Cfjd6a2R6S9qBM4aQ+FJbGWy8xmDfinDh9xQ8fWwOUg5KSlHTcNgc1VnBdiTnGTkVfmHO8bFPL8M3EymYmLZhXUiDm9cZ0HZnkXsG3g44juMPjyS4dA6QvQnv7Z9tsNPpc3x4b3SUZ+X4q1/TcOD9OMT+XjwjTwvMEgHPPVwKt9S6+3PtfAZPHprNHLIOtwvHtqmOwa0K9fB4x/mEmc8fZD/zPHA8VxcD0/iAIFcrL7jcVHAqcu1Y5bCfeSo8HdYVlKBadnIdq+AcFwI/b1EHoVYAymoW4Quigg+vEPh5ng6CrBIg8R8WUXPHa66KQuDnLeqQriCBKIvwlVbB5VYI/DxPh4p9ktMyziLcK1RwHXO5LQf2M0+Fp0NXaZzExUl2chPiOvXAueM6zvcBr869HHMcx7OOC5QD2k0PdV6yU9iemJdFVwUzvSLjBVizWsC2ulVArYFuMUDCknB9tQ53U9/ZTx++tjL7XN75IgmjP5A4wpRuhHa7JdLS99c+oDvB3fB/95ZMd3xqJBw66CZV10MHqdl8x21z//E4cBNaCZjPcRxPux0PlpiHOH6xuLf1z91o2Ra9KlD6X/s5vUp/akFsGHwmNJElzouWSOx+dOQA9XU3mSt7iSChIbQMhis/Zy3G4s4zSwB6jXY5jvOqty5sxDRouH2ky3Qrz4tZUshD3eZheq5e9AiFjPQg7fILc9wScTY2bja76e/CWZ5fEYhHhsKho7l4OcV7mjEdDIgdlLXZXEGejTbwde3V5h5v7R9zijPpw2crLqHA3f4Ab02VMa+B8cTrOzHp2fxjXnEmDnebb9LuPvYHuWvE3sFw2fc5fQvGZcWZE9C1DhqydscXzlxv9i9o5B2uKH6ys/wn+l8YURU0TbQffxyz26hKWJgvqXOVU19fX5xKpUxYvaG68r6XBwH1kLTmTk+9u71dCBE3DCM2NjaWUGPUeXZbUzx1dXXVyWRyvW3bJXYiisG1Wyy9uHpz/MJbXcnJ83G204erampq7Gg06r5mSrg7zZsWuqVrVHJsqPOENfvLa/Evj1xU7X6e6ssrTj/7D5XoWLPpqYG2V1Qbz/081V9Qzml3pdTMAjRqJGZTeVqF5Pxf45blL95CA8EAAAAASUVORK5CYII=" /***/ }), /***/ "FeTs": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAARCAYAAADUryzEAAAAAXNSR0IArs4c6QAAAVZJREFUOE+l0rtKA0EUBuD/XyMi4q31HWy8ICq2glgLeQHBXUUEGzWbzbrZRAsbb7uFL6D2Ith6wYCx8Bl8gETEQs0cSUjixqy6IdMNM/PNf+YM0eZgm+dRAZKOHwdkojWMubSln1YA0/EKAPpbA1B0LWOgmsCbUcBoECClB8JFABTgBMBrcF0D8mnLuA59A9s+6CtpsSsBamXlYupz1rZXX36mbAJEhFbavxBgriERcOkk9XmyHOh7NAEJx98gZCfsPQSymbGWd38Fks7hsEJHnkBnOIAPURjL2sZTbT2YgKbj3wIy+Wc3iHvX1KdQLaUOJFxvgQrnUVopmhbPmEtn5b11wHS8GwDTUQAI7tyUUdkbBN4AdEcCgIJrGYONwPbxHsj1SIBw303paw1AebJlH41o5DjJISF7KegCRFOQd4pWJOW5pNRD1l55DOtCpMv//YmtKl9q7W0SCso5yQAAAABJRU5ErkJggg==" /***/ }), /***/ "Fqq0": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; __webpack_require__("UQ5M"); var _message2 = _interopRequireDefault(__webpack_require__("/qCn")); var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); __webpack_require__("sRCI"); var _modal = _interopRequireDefault(__webpack_require__("vnWH")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); var _dva = __webpack_require__("S6G3"); var _dec, _class; //渲染每一个人员item /** * 通过搜索获得地图列表(保安人员) */ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } // import "../person.less"; var confirm = _modal.default.confirm; var EventItem = exports.default = (_dec = (0, _dva.connect)(function (state) { return { selectedId: state.command.eventList.selectedId // tabIndex2: state.command.tabIndex.person.tabIndex2, }; }), _dec(_class = /*#__PURE__*/function (_Component) { function EventItem(props) { var _this; (0, _classCallCheck2.default)(this, EventItem); _this = _callSuper(this, EventItem, [props]); _this.state = { data: props.data || [] // loadingText: props.data, }; return _this; } (0, _inherits2.default)(EventItem, _Component); return (0, _createClass2.default)(EventItem, [{ key: "componentDidMount", value: function componentDidMount() {} }, { key: "componentWillReceiveProps", value: function componentWillReceiveProps(nextProps) { // this.setState({ // loadingText: nextProps.loadingText, // }); if (nextProps.data != this.state.data) { this.setState({ data: nextProps.data }); } } }, { key: "render", value: function render() { var _this2 = this; return /*#__PURE__*/_react.default.createElement("div", null, this.state.data.length > 0 ? this.state.data.map(function (item, index) { return /*#__PURE__*/_react.default.createElement("div", { key: index, className: "item", onClick: function onClick() { if (item.lnglat) { // if (this.props.selectedId != item.perId) { _this2.props.dispatch({ type: "command/setEventSelectIndex", payload: item.id }); } else { _message2.default.warning("该人员暂未定位"); } } }, /*#__PURE__*/_react.default.createElement("div", { className: _this2.props.selectedId === item.id ? "selected poibox" : "poibox" }, item.name)); }) : /*#__PURE__*/_react.default.createElement("div", { style: { textAlign: "center", fontSize: "14px", color: "#afb0b1" } }, this.state.loadingText || "暂无数据")); } }]); }(_react.Component)) || _class); /***/ }), /***/ "G9B+": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAABQBJREFUWEe9l3tsFFUUxr8z225LWzoFsYRH425bNVpjpLO1Vo1p0gKiMfFBTSARESREE8QImmgiCYmG+CIREjQKKCaCSTWE+AKjBpTQlHZa/KPKo92pAgVaKDvLoyzdnc/MdHfZbbft1jbe//bec8/5ne+evXOuII1xxzRtxrV+PkbIAgAeIWcCKIBIN4AuEEch8m2OO29vW8/+y2m4jJvISMbeKZV3MxLeANAOPKKt7UeAEEW2S1bGeqO78Vw6ICmdajO1nAtXuBnEUgBKOo4SbURwGZD1hqm/P9reIQAlUyuKIhFrD8g5sc0CCUPwqxB7XIpyyMrK7MqeNisQOvNPIcCiSDhSQ8ETIMuTAorsmjHZvbzhVEPfcCBJAE7wsNUIcMaNQ5LdkimvG+ebj42WTbFaUWvBejcJXvBbzuySuW1t9ddT7Y8DDMiOg7HNznkqsrIzoO8YLXDiel1dnat5n38jwZfiCopsM0z9+REBPGr5NhDL4sWkuOZ3BpoOjCV4oq1X1daSfC8251LwXEeg5fPB/hwFBqq9vzVecIosHWvmqUC9qvYpyVjmXTflya16l341qWDtH5587XuAjzgLIrs7Tf3J/5p54r5qT3X23xcvHSdZZM8rIm/4TX1DEoB9yfRd52kntF3tbrkrnYJLF7CkoHxpxMJn0aM9YQRbbksC8Ki+laD18UDy8pNh6vPTdZ6OnaZpmb3t6CGp2vYZGZll7b2Nf8YL1KNqu0E+HpXoRb+pf5SO47HYeFRtJ8hFTgxF1vgD+sZEgFaQ99gTmYprzolA05GxOE/H1puvrSK4yVFZkc1GQL/xF/Xml58jUGgvuiZlT+84d8j+wEzoKFZ9T1m0vh44ZnxjmC0L4wp488tDBNz2RG5RSdZwN9Z4iIrVihqLkZ+jAL8YZkvtDQBVO0lydrRAitp7G0+NJ1iqvcX5vkUWrJ3OmsiuTlNfnAjQSPLeAYCM+9t7DzdMNIBH9b0GWu8MxJcPDFNfm3AE2g6CS5xFyJtGUH9rogG8qraP5LwowArD1LcmKOBbSFr1UXlaOk1dm0iA4imaygh6CGYC4CS3zPrrvH4mDlB2c3Xe1VDwPIEse1IR11y/2eQUzESM4gJtvWVxXVThRiOo35fo1/kYeVRtC8gXoiq0Vswrrqivr4+MF+D2aQ/MDPX3HQeR6yQHZbE/2LxrCIC3sHI6Qv3tJPKipJuMoL56PAClpQuywt3dBwBWxo7XCDT7RIRDAOyJwd9vEXk1nZ4uFaQdPNLT/QXJp6PrdEF5tCPY/ONg+6SWLPHOjlbs1lumTF61v3P/tXTVcGS/3mffelVJe0Rac+mubQs29KZUwJ6sml016eyl0F4SD8WrVOSkIlxXUCJf6rrePxyIXe0gXrHINbEzj2Ufb+lTQAzpisvK6txXT/m3kFyeRCpiEvhBiAYR6QIkALLQEhQJWAOyOnalR+soDPBlKnIZFrfHuy2RI7l018SUGPaxEW0k3gZgv4LGNkRaFAWr/Rf1g86/rEB7djBEdp6r9ujpwxdGfO3YnfLFK1hNcBmJ0lEoKJDDAvmww2z6anC1ewt8S2hZdmfkPHRE8EeOO//BUZ9bsaClUyvvtKzwwwQ8iL4NCekW+20IHsvOlO8Sb7hUsEMhZEXaAGM7g+GtvQW+Z2jxEwEVgSt9BSYKwPZTll81NZST4Wo/+3vP/67A4ET+BRz8ECwEzedJAAAAAElFTkSuQmCC" /***/ }), /***/ "GDoE": /***/ (function(module, exports) { // removed by extract-text-webpack-plugin /***/ }), /***/ "GKDd": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__style_index_less__ = __webpack_require__("vtiu"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__style_index_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__style_index_less__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__index_less__ = __webpack_require__("DyFj"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__index_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__index_less__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__select_style__ = __webpack_require__("cwkc"); // style dependencies /***/ }), /***/ "GNCS": /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.warning = warning; exports.note = note; exports.resetWarned = resetWarned; exports.call = call; exports.warningOnce = warningOnce; exports.noteOnce = noteOnce; exports.default = void 0; /* eslint-disable no-console */ var warned = {}; function warning(valid, message) { // Support uglify if (false) { console.error("Warning: ".concat(message)); } } function note(valid, message) { // Support uglify if (false) { console.warn("Note: ".concat(message)); } } function resetWarned() { warned = {}; } function call(method, valid, message) { if (!valid && !warned[message]) { method(false, message); warned[message] = true; } } function warningOnce(valid, message) { call(warning, valid, message); } function noteOnce(valid, message) { call(note, valid, message); } var _default = warningOnce; /* eslint-enable */ exports.default = _default; /***/ }), /***/ "GYFM": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _defineProperty2 = _interopRequireDefault(__webpack_require__("mAPx")); __webpack_require__("faxx"); var _row = _interopRequireDefault(__webpack_require__("FV1P")); __webpack_require__("JYrs"); var _col = _interopRequireDefault(__webpack_require__("QoDT")); var _objectSpread2 = _interopRequireDefault(__webpack_require__("+TWC")); var _toConsumableArray2 = _interopRequireDefault(__webpack_require__("V4Os")); __webpack_require__("UQ5M"); var _message2 = _interopRequireDefault(__webpack_require__("/qCn")); var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("jlIA")); __webpack_require__("crfj"); var _button = _interopRequireDefault(__webpack_require__("zwGx")); __webpack_require__("sRCI"); var _modal = _interopRequireDefault(__webpack_require__("vnWH")); var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); __webpack_require__("gZEk"); var _form = _interopRequireDefault(__webpack_require__("8rR3")); var _taggedTemplateLiteral2 = _interopRequireDefault(__webpack_require__("hRBA")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); var _styledComponents = _interopRequireDefault(__webpack_require__("w2vo")); var _CreateInfoWindow = _interopRequireDefault(__webpack_require__("TP+C")); var _CreateEventInfoWindow = _interopRequireDefault(__webpack_require__("3X+C")); var _CreateAttenInfoWindow = _interopRequireDefault(__webpack_require__("ALSx")); var _CreatePicturePerception = _interopRequireDefault(__webpack_require__("1cTg")); var _CreateTrajectoryInfoWindow = _interopRequireDefault(__webpack_require__("XDoD")); var _dva = __webpack_require__("S6G3"); __webpack_require__("d4VB"); var _timJsSdk = _interopRequireDefault(__webpack_require__("B5T/")); var _imInitialize = _interopRequireDefault(__webpack_require__("cLc/")); var _api = __webpack_require__("H/Zg"); var _index = _interopRequireDefault(__webpack_require__("gpon")); var _BeijingVideo = _interopRequireDefault(__webpack_require__("03XS")); var _SearchListTab = _interopRequireDefault(__webpack_require__("gqlY")); var _PersonSearch = _interopRequireDefault(__webpack_require__("77oj")); var _APicture = _interopRequireDefault(__webpack_require__("Qohn")); var _index2 = _interopRequireDefault(__webpack_require__("nQ8R")); var _index3 = _interopRequireDefault(__webpack_require__("dJ6t")); var _NanNing = _interopRequireDefault(__webpack_require__("nxrg")); var _loadMap = _interopRequireDefault(__webpack_require__("kRvI")); var _InitMap = _interopRequireDefault(__webpack_require__("BDbo")); var _ModalView = _interopRequireDefault(__webpack_require__("+1Vq")); var _AllMapLayer = _interopRequireDefault(__webpack_require__("ZZIB")); var _markMarkers = __webpack_require__("CEIq"); var _func = __webpack_require__("ZKAp"); var _utils = __webpack_require__("oAV5"); var _localMapRightClickContent = _interopRequireDefault(__webpack_require__("b8x8")); var _earthEvent = __webpack_require__("xD8h"); var _loading = _interopRequireDefault(__webpack_require__("Ae19")); var _maps = __webpack_require__("YWwU"); var _events = _interopRequireDefault(__webpack_require__("TLe5")); var _classnames = _interopRequireDefault(__webpack_require__("HW6M")); var _utils2 = __webpack_require__("oAV5"); var _biz = __webpack_require__("Q3h8"); var _TopButton = _interopRequireDefault(__webpack_require__("emEp")); var _Record = _interopRequireDefault(__webpack_require__("tVfF")); var _templateObject, _dec, _dec2, _class; /** * 地图主页面入口 */ // import DeviceDetector from 'rtc-device-detector-react'; // import 'rtc-device-detector-react/dist/index.css'; // 引入 EventEmitter' function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t3 in e) "default" !== _t3 && {}.hasOwnProperty.call(e, _t3) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t3)) && (i.get || i.set) ? o(f, _t3, i) : f[_t3] = e[_t3]); return f; })(e, t); } function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i.return) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); } function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, _regeneratorDefine2(e, r, n, t); } function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; } function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } // import { imKey } from "@utils/config"; // import Presetting from "../Video/presetting"; var store = __webpack_require__("Y4FN"); var GIS = exports.default = (_dec = (0, _dva.connect)(function (state) { return { //im loginAccount: state.login.loginAccount, imSig: state.global.imSig, imIsLogin: state.global.imIsLogin, comName: state.global.companyInfo.comName, nextReqMessageID: state.im.nextReqMessageID, conversationList: state.im.conversationList, currentMessageList: state.im.currentMessageList, cid: state.im.cid, //地图数据 eventList: state.command.eventList, attendanceList: state.command.attendanceList, personList: state.command.personList, clearInfoWindow: state.command.clearInfoWindow, tabIndex1: state.command.tabIndex.tabIndex1, mapStyle: state.command.mapStyle, //一张图数据 securityResourceData: state.command.securityResourceData, pictureMarkersList: state.command.pictureMarkersList, //警保联动 policePersonData: state.command.policeData.personData, layoutAuthority: state.command.layoutAuthority, // 记录上一步操作信息 backStepInfo: state.command.backStepInfo, switchOpenStatus: state.command.switchOpenStatus, selectComponeyInfo: state.command.selectComponeyInfo, searchAround: state.command.searchAround, searchAroundList: state.command.searchAroundList, videoGenre: state.command.videoGenre // 功能类型 0: 视频调度(一对多) 1: 视频上拉(一对一) }; }), _dec2 = _form.default.create(), _dec(_class = _dec2(_class = /*#__PURE__*/function (_PureComponent) { function GIS(props) { var _this; (0, _classCallCheck2.default)(this, GIS); _this = _callSuper(this, GIS, [props]); // 检查事件在地图上的标记 _this._checkMarkerEvent = function (nextProps) { var _this$state = _this.state, eventList = _this$state.eventList, map = _this$state.map, eventMarkers = _this$state.eventMarkers; var _nextProps$eventList = nextProps.eventList, selectedId = _nextProps$eventList.selectedId, list = _nextProps$eventList.list; console.log('_checkMarkerEvent', JSON.stringify(list), JSON.stringify(eventList)); if (JSON.stringify(list) !== JSON.stringify(eventList)) { console.log('GIS-setState'); // 先渲染事件列表信息,再渲染事件在地图上的打点信息 _this.setState({ eventList: list }); _this.markEventList(list); } //点击点改变点的状态(当有个别打点信息需要改变时 if (eventMarkers.length > 0 && selectedId) { eventMarkers.map(function (marker) { if (marker.w.key === selectedId) { list.forEach(function (item) { if (item.id == marker.w.key) { _this.openEventInfo(item, map, marker); } }); } }); } }; // 检查人员在地图上的标记 _this._checkMarkerPerson = function (nextProps) { var _nextProps$personList = nextProps.personList, selectedId = _nextProps$personList.selectedId, list = _nextProps$personList.list; var _nextProps$pictureMar = nextProps.pictureMarkersList, securityResource = _nextProps$pictureMar.securityResource, attendancePolice = _nextProps$pictureMar.attendancePolice; var _this$state2 = _this.state, allPersonList = _this$state2.allPersonList, personMarkers = _this$state2.personMarkers; console.log('_checkMarkerPerson', JSON.stringify(list), JSON.stringify(allPersonList)); if (JSON.stringify(list) !== JSON.stringify(allPersonList)) { console.log('GIS-setState'); // 先渲染事件列表信息,再渲染事件在地图上的打点信息 _this.setState({ allPersonList: list }); _this.markPersonList(list); } //点击点改变点的状态(当有个别打点信息需要改变时 // if (personMarkers.length > 0 && selectedId) { // personMarkers.map((marker) => { // if (marker.w.key === selectedId) { // list.forEach((item) => { // if (item.perId == marker.w.key) { // // this.openPersonInfo(item, marker); // this.openPersonInfo(item, marker, 'police'); // } // }); // } // }); // } debugger; if (securityResource.length > 0 && securityResource[0].data.length > 0) { var securityInfo = securityResource[0].info; securityResource[0].data.map(function (marker, index) { console.log('securityResource', marker); var icon = new AMap.Icon({ size: new AMap.Size(32, 42), image: securityInfo[index]["mapIcon"], imageSize: new AMap.Size(32, 42) }); marker.setIcon(icon); // 设置默认图标 }); if (!(0, _utils2.isEmpty)(selectedId)) { securityResource[0].data.map(function (marker, index) { console.log('securityResource', marker); // 命中 if (marker.w.key === selectedId) { var clickIcon = new AMap.Icon({ size: new AMap.Size(32, 42), image: securityInfo[index]["clickMapIcon"], imageSize: new AMap.Size(32, 42) }); marker.setIcon(clickIcon); // 设置选中图标 // this.openPersonInfo(securityInfo[index], marker, 'police'); _events.default.emit('openTrajectoryInfoWindow', { item: securityInfo[index], type: 'securityResource', marker: marker }); } }); } } }; // 检查人员在地图上的标记(周边搜索) _this._checkMarkerSearchPerson = function (nextProps) { debugger; var _nextProps$searchArou = nextProps.searchAroundList, selectedId = _nextProps$searchArou.selectedId, list = _nextProps$searchArou.list; var securitySearch = nextProps.searchAround.securitySearch; console.log('securitySearch', securitySearch); if (securitySearch.length > 0 && securitySearch[0].data.length > 0) { var securityInfo = securitySearch[0].info; securitySearch[0].data.map(function (marker, index) { console.log('securitySearch', marker); var icon = new AMap.Icon({ size: new AMap.Size(32, 42), image: securityInfo[index]["mapIcon"], imageSize: new AMap.Size(32, 42) }); marker.setIcon(icon); // 设置默认图标 }); if (!(0, _utils2.isEmpty)(selectedId)) { securitySearch[0].data.map(function (marker, index) { console.log('securitySearch', marker); // 命中 if (marker.w.key === selectedId) { var clickIcon = new AMap.Icon({ size: new AMap.Size(32, 42), image: securityInfo[index]["clickMapIcon"], imageSize: new AMap.Size(32, 42) }); marker.setIcon(clickIcon); // 设置选中图标 // this.openPersonInfo(securityInfo[index], marker, 'police'); _events.default.emit('openTrajectoryInfoWindow', { item: securityInfo[index], type: 'securityResource', marker: marker }); } }); } } }; // 检查驻勤点在地图上的标记 _this._checkMarkerAttendance = function (nextProps) { //所有驻勤点有值,并且更换的时候,打点, // this.state.layerSatatus == "aPicture" var _nextProps$attendance = nextProps.attendanceList, selectedId = _nextProps$attendance.selectedId, list = _nextProps$attendance.list; var _this$state3 = _this.state, allAttendanceList = _this$state3.allAttendanceList, attendanceMarkers = _this$state3.attendanceMarkers, afterAttenSelectedId = _this$state3.afterAttenSelectedId, map = _this$state3.map, layerSatatus = _this$state3.layerSatatus; console.log('_checkMarkerAttendance', JSON.stringify(list), JSON.stringify(allAttendanceList)); if (JSON.stringify(list) !== JSON.stringify(allAttendanceList)) { console.log('GIS-setState'); // 先渲染事件列表信息,再渲染事件在地图上的打点信息 _this.setState({ allAttendanceList: list }); _this.markerAttendanceList(list); } //点击点改变点的状态(当有个别打点信息需要改变时 if (attendanceMarkers.length > 0 && selectedId != null) { _this.openAttendanceInfo({ item: list[selectedId], map: map, marker: attendanceMarkers[selectedId], currentIndex: selectedId, afterIndex: afterAttenSelectedId, layerStatus: layerSatatus }); // this.openAttendanceInfo(list[selectedId], map, attendanceMarkers[selectedId], selectedId, afterAttenSelectedId); console.log('GIS-setState'); _this.setState({ afterAttenSelectedId: selectedId }); } }; _this.initialMap = function (layoutName, mapName) { var satelliteLayer = new window.AMap.TileLayer.Satellite(); // 卫星图层类 var mapList = _InitMap.default.call(_this, satelliteLayer); var normalMap = mapList.normalMap; var locaMap = mapList.locaMap; var infoWindow = mapList.infoWindow; var personMap = mapList.personMap; var policeMap = mapList.policeMap; var nanNingMap = mapList.nanNingMap; var earthMap = mapList.earthMap; // console.log('GIS-setState'); // 初始化地图层 _this.setState({ normalMap: normalMap, locaMap: locaMap, //增值版 personMap: personMap, policeMap: policeMap, nanNingMap: nanNingMap, earthMap: earthMap, map: mapList[mapName], infoWindow: infoWindow, layerSatatus: layoutName, // satelliteLayer: new window.AMap.TileLayer.Satellite({map:locaMap}), satelliteLayer: satelliteLayer }, function () { var mapStyle = _this.props.mapStyle; if (mapStyle !== 'normal') { var styleName = "amap://styles/" + mapStyle; _this.state.map.setMapStyle(styleName); } // 防控指挥一张图 默认为卫星地图 _this.setSatellite(true); //防控指挥一张图跟警保联动图层需要做鼠标右击的事件 locaMap.on('rightclick', function (e) { new AMap.ContextMenu({ isCustom: true, content: _localMapRightClickContent.default.call(_this, e.lnglat, 'aPicture') }).open(locaMap, e.lnglat); }); policeMap.on('rightclick', function (e) { new AMap.ContextMenu({ isCustom: true, content: _localMapRightClickContent.default.call(_this, e.lnglat, 'police') }).open(policeMap, e.lnglat); }); var that = _this; // event 监听器: eventCenter.addListener("事件名称", 参数列表); // 这样做的好处是,爷传孙,不需要父级组件做承载 // 添加地图标记点 _events.default.addListener('addPictueMarks', function (result) { _func.APictureAddPictueMarks.call(that, result.data, result.type, result.where); }); _events.default.addListener('reducePictueMarks', function (result) { _func.APictureReducePictueMarks.call(that, result.data, result.type, result.where); }); // 地球模式下,跳转到 xx 中心点 _events.default.addListener('gotoPosition', function (point) { that.state.map.setZoomAndCenter(_maps._DEFAULT_MAP_ZOOM, [point.lng, point.lat]); }); // 打开保安人员自定义窗体 _events.default.addListener('openTrajectoryInfoWindow', function (result) { var infoWindow = new AMap.InfoWindow({ isCustom: true, //使用自定义窗体 content: _CreateTrajectoryInfoWindow.default.call(that, result.item, result.type, result.marker), offset: new AMap.Pixel(16, -45) }); infoWindow.open(that.state.map, result.marker.getPosition()); }); _events.default.addListener('clickTextScheduling', function (result) { // 调度处理 var type = result.type, item = result.item, isNeedRecord = result.isNeedRecord, name = result.name; var schedulingName = (0, _utils2.isEmpty)(name) ? "个人调度" : name; switch (type) { case "text": that.character(item); break; case "voice": that.voice(item); break; case "videoDetect": case "video": var dataType = Object.prototype.toString.call(item); if (dataType == "[object Array]") { that.video({ info: item, schedulingName: schedulingName, isNeedRecord: isNeedRecord }); } else if (dataType == "[object Object]") { that.video({ info: [item], schedulingName: schedulingName, isNeedRecord: isNeedRecord }); } else { console.log("数据出错"); } break; // case "video": // const _roomId = new Date().getTime()+"_detector"; // const _userId = 999999 // const _name = 'detector' // Presetting(false, _roomId, _userId+"_uplink", '', _name, (upRes) => { // Presetting(false, _roomId, _userId+"_downlink", '', _name, (downRes) => { // console.log('Presetting', upRes); // const _network_detect_info = { // sdkAppId: imKey.SDKAppID, // roomId: _roomId, // uplinkUserInfo: { // uplinkUserId: _userId+"_uplink", // uplinkUserSig: upRes.data, // }, // downlinkUserInfo: { // downlinkUserId: _userId+"_downlink", // downlinkUserSig: downRes.data, // }, // } // result.type = 'videoDetect'; // that.setState({ // deviceDetect: true, // // deviceDetectInfo: _network_detect_info // deviceDetectInfo: result // }) // }); // }); // break; } }); // 地图标记点 check 统一处理 _events.default.addListener('checkedMapTag', function (result) { console.log('checkedMapTag', result); switch (result.type) { case "securityResource": { if (result.checked) { var key = !(0, _utils2.isEmpty)(result.item.perId) ? result.item.perId : result.item.ID; that.props.dispatch({ type: "command/setPersonSelectIndex", payload: key }); } else { that.props.dispatch({ type: "command/setPersonSelectIndex", payload: null }); } break; } case "securityResourceSearch": { if (result.checked) { var _key = !(0, _utils2.isEmpty)(result.item.perId) ? result.item.perId : result.item.ID; that.props.dispatch({ type: "command/setSearchMarkSelectIndex", payload: _key }); } else { that.props.dispatch({ type: "command/setSearchMarkSelectIndex", payload: null }); } break; } } }); // 头部图标开关 _events.default.addListener('isOpenTopSwitch', function (result) { console.log("isOpenTopSwitch", result); that.props.dispatch({ type: "command/setSwitchOpenStatus", payload: result }); }); // 头部图标开关 _events.default.addListener('isOpenMapSwitch', function (result) { console.log("isOpenMapSwitch", result); that.props.dispatch({ type: "command/initMapLayerSwitchState" }); that.props.dispatch({ type: "command/setMapLayerSwitchState", payload: result }); }); // 清除地图上的所有弹框 _events.default.addListener('clearMapModal', function (type) { switch (type) { case 'ComponeyInfo': { // 初始化公司人员信息弹框 that.props.dispatch({ type: 'command/setSelectComponeyInfo', payload: {} }); break; } case 'AttendInfo': { // 初始化驻勤点人员信息弹框 that.props.dispatch({ type: 'command/setSelectAttendInfo', payload: {} }); break; } } that.props.dispatch({ type: "command/setPersonSelectIndex", payload: null }); }); _events.default.addListener('openPersonInfo', function (result) { that.openPersonInfo(result.item, result.marker, result.type); }); // 清除地图上的所有标记点 _events.default.addListener('clearMapTag', function (type) { if ((0, _utils2.isEmpty)(type)) { var _that$props$pictureMa = that.props.pictureMarkersList, securityResource = _that$props$pictureMa.securityResource, securityCompany = _that$props$pictureMa.securityCompany, attendancePoint = _that$props$pictureMa.attendancePoint, attendancePolice = _that$props$pictureMa.attendancePolice, searchAddress = _that$props$pictureMa.searchAddress, eventMarker = _that$props$pictureMa.eventMarker; var _that$props$searchAro = that.props.searchAround, securitySearch = _that$props$searchAro.securitySearch, awarenessSearch = _that$props$searchAro.awarenessSearch; console.log('开始清除所有标记', that.props.pictureMarkersList, that.props.searchAround); // 清除人员标记 if (securityResource.length > 0) { _func.APictureReducePictueMarks.call(that, { data: securityResource[0].data }, 'securityResource'); } // 清除公司标记 if (securityCompany.length > 0) { _func.APictureReducePictueMarks.call(that, { data: securityCompany[0].data }, 'securityCompany'); } // 清除驻勤点标记 if (attendancePoint.length > 0) { _func.APictureReducePictueMarks.call(that, { data: attendancePoint[0].data }, 'attendancePoint'); } // 清除驻勤点人员标记 if (attendancePolice.length > 0) { _func.APictureReducePictueMarks.call(that, { data: attendancePolice[0].data }, 'attendancePolice'); } // 清除搜索地址标记 if (searchAddress.length > 0) { _func.APictureReducePictueMarks.call(that, { data: searchAddress[0].data }, 'searchAddress'); } // 清除事件标记 if (eventMarker.length > 0) { _func.APictureReducePictueMarks.call(that, { data: eventMarker[0].data }, 'eventMarker'); } // 清除人员标记 _this.props.dispatch({ type: "command/fetchPersonList", payload: { list: [] } }); // 清除周边搜索标记 if (securitySearch.length > 0) { _func.APictureReducePictueMarks.call(that, { data: securitySearch }, 'securityResource', { where: 'searchAround', type: 'securitySearch' }); } if (awarenessSearch.length > 0) { _func.APictureReducePictueMarks.call(that, { data: awarenessSearch }, 'perception', { where: 'searchAround', type: 'awarenessSearch' }); } } else { var markerType = type; var markerList = that.props.pictureMarkersList[markerType]; console.log('开始清除单个标记', markerList, markerType); if (markerList && markerList.length > 0) { _func.APictureReducePictueMarks.call(that, { data: markerList[0].data }, markerType); } else { var searchMarkerList = that.props.searchAround[markerType]; console.log('开始清除单个标记', searchMarkerList, markerType); if (markerType == 'securitySearch') { if (searchMarkerList && searchMarkerList.length > 0) { _func.APictureReducePictueMarks.call(that, { data: searchMarkerList[0].data }, 'securityResource', { where: 'searchAround', type: markerType }); } } else if (markerType == 'awarenessSearch') { if (searchMarkerList && searchMarkerList.length > 0) { _func.APictureReducePictueMarks.call(that, { data: searchMarkerList[0].data }, 'perception', { where: 'searchAround', type: markerType }); } } } } }); // 初始化右侧数据展示图 _events.default.addListener('initRightDataModule', function (result) { _this.props.dispatch({ type: 'command/setSelectComponyList', payload: [] }); }); // TAG: 根据需求 394,取消搜索功能 // earthMap.addEventListener("zoomend", (e) => { // var ZoomNum = earthMap.getZoom(); // // clearInterval(this.state.rotation) // if (ZoomNum >= 8) { // let point = earthMap.getCenter() // this.state.map.on('complete', () => { // this.state.map.setZoomAndCenter(12, [point.lng, point.lat]) // }) // this.setState({ // showEarchMap: false, // }) // this.props.dispatch({ // type: 'command/setMapStyle', // payload: 'dark' // }) // } else { // // setTimeout(() => { // // this.setState({ // // rotation: rotation(earthMap,ZoomNum) // // }) // // }, 1000) // } // }); // earthMap.addEventListener('dblclick', () => { // clearInterval(this.state.rotation); // setTimeout(() => { // this.setState({ // rotation: rotation(earthMap) // }) // }, 1000) // }) locaMap.plugin(["AMap.GltfLoader"], function () {}); }); //创建矢量图画图工具 _this.createMouseTool(_this.state.map); //检查im有没有失效 if (!!!_this.props.imIsLogin) { if (_this.state.mobilePhone) { _this.props.dispatch({ type: "global/imLogin", payload: { username: _this.state.mobilePhone, name: _this.state.name } }); } } var that = _this; if (navigator.geolocation) { _loading.default.open("正在获取当前定位。。。"); var point = store.get('userPosition'); if (!(0, _utils2.isEmpty)(point)) { // 初步渲染好地图之后,使用定时器进行改变地图中心点 setTimeout(function () { that.mapSetTimeout(earthMap, point); }, 2000); } else { // @see https://lbs.amap.com/api/javascript-api/reference/location#m_AMap.Geolocation AMap.plugin('AMap.Geolocation', function () { var geolocation = new AMap.Geolocation({ // 是否使用高精度定位,默认:true // enableHighAccuracy: true, // 设置定位超时时间,默认:无穷大 timeout: 10000, // 定位按钮的停靠位置的偏移量,默认:Pixel(10, 20) buttonOffset: new AMap.Pixel(10, 20), // 定位成功后调整地图视野范围使定位位置及精度范围视野内可见,默认:false zoomToAccuracy: true, // 定位按钮的排放位置, RB表示右下 buttonPosition: 'RB' }); // 获取用户当前的精确位置信息 geolocation.getCurrentPosition(); AMap.event.addListener(geolocation, 'complete', onComplete); AMap.event.addListener(geolocation, 'error', onError); function onComplete(data) { // data是具体的定位信息 var point = data.position; store.set('userPosition', point); // 初步渲染好地图之后,使用定时器进行改变地图中心点 setTimeout(function () { that.mapSetTimeout(earthMap, point); }, 2000); } function onError(data) { console.error('AMap.Geolocation', data); // 定位出错 IP精确定位失败,精确IP定位服务目前无法完全覆盖所有用户IP,失败率在5%左右; var point = { lng: _maps._BEIJING_MAP_POINT.LATITUDE, lat: _maps._BEIJING_MAP_POINT.LONGITUDE }; store.set('userPosition', point); // 初步渲染好地图之后,使用定时器进行改变地图中心点 setTimeout(function () { that.mapSetTimeout(earthMap, point); }, 2000); } }); } } else { // 当前浏览器不支持定位服务 console.log('当前浏览器不支持定位服务'); } }; _this.setModalBtn = function () { var layoutAuthority = _this.props.layoutAuthority; var layerSatatus = _this.state.layerSatatus; var btns = []; if (layerSatatus == "attendance") { if (layoutAuthority.basisLayer) { btns = [/*#__PURE__*/_react.default.createElement("span", { style: { float: "left" }, key: "number" }, "\u5171\u9009\u4E2D", _this.state.selectedPoints.length, "\u4EBA"), /*#__PURE__*/_react.default.createElement(_button.default, { key: "text", type: "primary", onClick: function onClick() { var that = _this; //超过50人 if (_this.state.selectedPoints.length > 50 && _this.state.selectedPoints.length < 100) { _modal.default.confirm({ title: "提示", content: "您调度人员已经超过50人,建议减少人数已达到调度效果。", okText: "继续调度", onOk: function onOk() { that.setState({ selectedPointsStatus: false, createTaskStatus: true }); }, cancelText: "重新选择", onCancel: function onCancel() { that.setState({ selectedPointsStatus: false }); that.state.map.remove([that.state.overlays]); } }); } else if (_this.state.selectedPoints.length > 100) { _modal.default.error({ title: "提示", content: "您调度人员已经超过100人,请减少人数已达到调度效果。", okText: "重新选择", onOk: function onOk() { that.setState({ selectedPointsStatus: false }); that.state.map.remove([that.state.overlays]); } }); } else { _this.setState({ selectedPointsStatus: false, createTaskStatus: true, dispatchType: "text" }); } } }, "\u6587\u5B57\u8C03\u5EA6"), /*#__PURE__*/_react.default.createElement(_button.default, { key: "voice", type: "primary", onClick: function onClick() { _this.setState({ dispatchType: "voice", selectedPointsStatus: false, createTaskStatus: true }); } }, "\u8BED\u97F3\u8C03\u5EA6")]; } else { btns = []; } } else if (layerSatatus == "aPicture") { btns = [/*#__PURE__*/_react.default.createElement("span", { style: { float: "left" }, key: "number" }, "\u5171\u9009\u4E2D", _this.state.selectedPoints.length, "\u4EBA"), /*#__PURE__*/_react.default.createElement(_button.default, { key: "text", type: "primary", onClick: function onClick() { var that = _this; //超过50人 if (_this.state.selectedPoints.length > 50 && _this.state.selectedPoints.length < 100) { _modal.default.confirm({ title: "提示", content: "您调度人员已经超过50人,建议减少人数已达到调度效果。", okText: "继续调度", onOk: function onOk() { that.setState({ selectedPointsStatus: false, createTaskStatus: true }); }, cancelText: "重新选择", onCancel: function onCancel() { that.setState({ selectedPointsStatus: false }); that.state.map.remove([that.state.overlays]); } }); } else if (_this.state.selectedPoints.length > 100) { _modal.default.error({ title: "提示", content: "您调度人员已经超过100人,请减少人数已达到调度效果。", okText: "重新选择", onOk: function onOk() { that.setState({ selectedPointsStatus: false }); that.state.map.remove([that.state.overlays]); } }); } else { _this.setState({ selectedPointsStatus: false, createTaskStatus: true, dispatchType: "text" }); } } }, "\u6587\u5B57\u8C03\u5EA6"), /*#__PURE__*/_react.default.createElement(_button.default, { key: "voice", type: "primary", onClick: function onClick() { _this.setState({ dispatchType: "voice", selectedPointsStatus: false, createTaskStatus: true }); } }, "\u8BED\u97F3\u8C03\u5EA6"), /*#__PURE__*/_react.default.createElement(_button.default, { style: { display: _this.props.layoutAuthority.basisLayer }, key: "video", type: "primary", onClick: function onClick() { _this.setState({ dispatchType: "video", selectedPointsStatus: false, createTaskStatus: true }); // if(this.state.selectedPoints.length>8){ // message.info('目前最多自能调度8人'); // }else{ // this.setState({ // dispatchType: "video", // selectedPointsStatus: false, // createTaskStatus: true, // }); // } } }, "\u89C6\u9891\u8C03\u5EA6")]; } return btns; }; _this.state = { mobilePhone: (0, _utils.gup)('mobilePhone', window.location.href), name: decodeURI((0, _utils.gup)('username', window.location.href)), // mouseTool: null, 避免不必要的 setState 更新 //地图部门功能全局化 map: null, // 事件列表 eventList: [], //事件图层 eventMarkers: [], //驻勤点图层 attendanceMarkers: [], //驻勤点的数据 //人员图层 personMarkers: [], //人员打点 personList: [], //人员数据 infoWindow: null, //全局定义信息窗体(在初始化地图的时候,也初始化信息窗体) // imStatus: false, //是否展示im的可视化页面 videoStatus: false, //视频通话页面是否显示 deviceDetect: false, // Web 端设备及网络检测公共组件是否显示 deviceDetectInfo: {}, // Web 端设备及网络检测 JSON 配置 selectedPoints: [], //通过矢量图选中的多个数据点 overlays: [], //矢量图绘制的点(主要用在清空矢量图) selectedPointsStatus: false, //显示选中多人数据的弹窗 selectedData: { phone: "" }, //选中的点的数据 //调度的内容 dispatchType: "", //调度类型(text文字,voice语音,video视频) createTaskStatus: false, //创建任务弹窗状态 schedulingContent: "", //调度任务内容 schedulingName: "", //调度任务名称 recordMobile: "", //调度需要录制视频的人员 needCreateConversation: false, //是否需要创建单人会话 layerSatatus: "", //海量点图层(attendance是驻勤点图层,aPicture是防空指挥一张图图层,person是人员图层,police是警保联动图层) normalMap: null, //正常的图层(变成是驻勤点图层) locaMap: null, //防空指挥一张图图层 earthMap: null, //地球图层 showEarchMap: true, showEarchMapSearch: false, // paintValue: "cancel", //选中的是用哪个图形画图 conversationID: "", //当前在地图中选中的哪个人或群组的id beijingVideo: false, //北京视频的展示状态 //录音 showRecord: false, //是否显示录音的页面 onlyPersonVoiceStatus: false, //个人调度的录音状态 allAttendanceList: [], //所有驻勤点信息 allPersonList: [], //所有人员信息 zoom: 18, //点击某个点,然后放大图层 currentTabKey1: "2", //当前选中的tab页面 afterAttenSelectedId: null, //过去驻勤点选中的值,默认没有 searchAround: { //周边搜索的显隐 type: '', show: false, lnglat: {} }, satelliteLayer: null, satellite: true, //卫星图层 rotation: null, //自转定时器 gITFPoint: [{ name: "rjyA", lng: 118.051053, lat: 24.607252, gIFTurl: "https://bcxin-vedio-prod.obs.myhuaweicloud.com/glTF/0914san-fbx2/0914san-fbx.gltf", isShow: false }, { name: "rjyB", lng: 118.048937, lat: 24.611863, gIFTurl: "https://bcxin-vedio-prod.obs.myhuaweicloud.com/glTF/B-1/B-1.gltf", isShow: false }], layerExtensionType: 'search' // 图层扩展类型。search: 搜索图层; resource: 资源图层。默认为搜索图层 }; _this.mouseTool = null; // 创建矢量图画图工具 return _this; } /******************************生命周期******************************/ (0, _inherits2.default)(GIS, _PureComponent); return (0, _createClass2.default)(GIS, [{ key: "componentDidMount", value: function componentDidMount() { _loadMap.default.call(this); //加载地图组件--进入加载地球loading } }, { key: "componentWillReceiveProps", value: function componentWillReceiveProps(nextProps) { var _this2 = this; //要先让地图加载完在判断 if (this.state.map) { // 检查事件在地图上的标记 this._checkMarkerEvent(nextProps); // 检查人员在地图上的标记 this._checkMarkerPerson(nextProps); // 检查人员在地图上的标记(周边搜索) this._checkMarkerSearchPerson(nextProps); // 检查驻勤点在地图上的标记 this._checkMarkerAttendance(nextProps); //清除地图上的信息窗体 if (nextProps.clearInfoWindow) { setTimeout(function () { _this2.state.map.clearInfoWindow(); //清除信息窗体,异步调用 }, 100); this.props.dispatch({ type: "command/clearInfoWindow", payload: false }); _markMarkers.closeEventMarkers.call(this); _markMarkers.closePersonMarkers.call(this); _markMarkers.closeAttendanceMarker.call(this); console.log('GIS-setState'); this.setState({ afterAttenSelectedId: null }); } //Tab改变 if (this.state.currentTabKey1 != nextProps.tabIndex1) { var tabKey = [{ key: "1", marker: "event" }, { key: "2", marker: "person" }, { key: "3", marker: "attendance" }]; console.log('GIS-setState'); this.setState({ currentTabKey1: nextProps.tabIndex1 }); var current = null; var past = null; tabKey.map(function (item) { if (item.key == nextProps.tabIndex1) { current = item.marker; } if (item.key == _this2.state.currentTabKey1) { past = item.marker; } }); this.clearMarkerAdd(current, past); } } } }, { key: "componentWillUnmount", value: function componentWillUnmount() { // if (document.querySelector(".ant-layout-sider")) { // // 显示左侧菜单栏 // document.querySelector(".ant-layout-sider").style.display = "block"; // document.querySelector(".ant-layout-content").style.margin = "16px"; // // document.querySelector(".oneKeySearchHidden").style.display = "block"; // } window.AMap = null; window.recordStream = {}; window.recordVideo = null; } }, { key: "mapSetTimeout", value: // 初步渲染好地图之后,使用定时器进行改变地图中心点 function mapSetTimeout(earthMap, point) { var that = this; earthMap.centerAndZoom(new BMapGL.Point(_maps._DEFAULT_MAP_CENTER_POINT.LATITUDE, _maps._DEFAULT_MAP_CENTER_POINT.LONGITUDE), 4); // 该中心点是位于中国 _loading.default.close(); earthMap.centerAndZoom(new BMapGL.Point(point.lng, point.lat), 6); // 该中心点是位于用户当前位置 // 延时切换到高德地图 setTimeout(function () { that.state.map.on('complete', function () { that.state.map.setZoomAndCenter(_maps._DEFAULT_MAP_ZOOM, [point.lng, point.lat]); }); // console.log('GIS-setState'); that.setState({ showEarchMap: false }); // that.props.dispatch({ // type: 'command/setMapStyle', // payload: 'dark' // }) }, 4000); } //创建矢量图画图工具 }, { key: "createMouseTool", value: function createMouseTool(currentMap) { var _this3 = this; var _window = window, AMap = _window.AMap; var that = this; AMap.plugin(["AMap.MouseTool", "AMap.PlaceSearch", 'AMap.MapType'], function () { that.mouseTool = new AMap.MouseTool(currentMap); // console.log('GIS-setState'); // this.setState({ // mouseTool, // }); //添加事件 AMap.event.addListener(that.mouseTool, "draw", function (e) { // console.log('GIS-setState'); _this3.setState({ overlays: e.obj }); var polygonPoints = e.obj.getPath(); // 整理多边形点的数据 变成[[],[]]的格式 polygonPoints.map(function (point) { return [point.lng, point.lat]; }); var selectedPoints = null; switch (_this3.state.layerSatatus) { case 'attendance': //正常图层的时候 selectedPoints = _this3.props.personList.list.filter(function (pos) { //取的数据是该驻勤点下的人员数据 if (pos.lnglat) { // 地图点的坐标转换成[] var posArray = [pos.lnglat[0], pos.lnglat[1]]; return AMap.GeometryUtil.isPointInRing(posArray, polygonPoints); } }); break; case 'aPicture': //一张图图层 if (_this3.props.pictureMarkersList.securityResource.length > 0) { selectedPoints = _this3.props.securityResourceData.filter(function (pos) { if (pos.longitude && pos.latitude) { var posArray = [pos.longitude, pos.latitude]; return AMap.GeometryUtil.isPointInRing(posArray, polygonPoints); } }); } else { selectedPoints = []; } break; case 'person': selectedPoints = _this3.state.personList.filter(function (pos) { if (pos.lnglat) { // 地图点的坐标转换成[] var posArray = [pos.lnglat[0], pos.lnglat[1]]; return AMap.GeometryUtil.isPointInRing(posArray, polygonPoints); } }); break; //警保联动图层 case 'police': // selectedPoints = [] var allMarks = []; //因为数据是对象数组,需要组合成数组 if (_this3.props.policePersonData) { for (var key in _this3.props.policePersonData) { if (_this3.props.policePersonData[key] !== null) { allMarks = allMarks.concat(_this3.props.policePersonData[key]); } } } selectedPoints = allMarks.filter(function (pos) { if (pos.longitude && pos.latitude) { // 地图点的坐标转换成[] var posArray = [pos.longitude, pos.latitude]; return AMap.GeometryUtil.isPointInRing(posArray, polygonPoints); } }); break; } if (selectedPoints.length === 0) { _modal.default.error({ title: "没有选中项", onOk: function onOk() { _this3.state.map.remove([e.obj]); } }); } else { // console.log('GIS-setState'); _this3.setState({ selectedPoints: selectedPoints, selectedPointsStatus: true }); } }); // new AMap.PlaceSearch({}); var placeSearch = new AMap.PlaceSearch({ pageSize: 6, // 单页显示结果条数 pageIndex: 1, // 页码 city: "010", // 兴趣点城市 citylimit: true, //是否强制限制在设置的城市内搜索 map: _this3.state.map, // 展现结果的地图实例 panel: "panel", // 结果列表将在此容器中进行展示。 autoFitView: true // 是否自动调整地图视野使绘制的 Marker点都处于视口的可见范围 }); // console.log('GIS-setState'); // this.setState({ placeSearch }); // 关键字查询 // placeSearch.search('厦门市软件园三期'); }); // var gps =[120.216123284763,30.21168569675452] // AMap.convertFrom(gps, 'gps', function (status, result) { // if (result.info === 'ok') { // var lnglats = result.locations; // Array. // } // }); } //事件列表打点 }, { key: "markEventList", value: function markEventList(eventList) { var where = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ""; var eventMarkers = _markMarkers.markEventList.call(this, eventList, where); this.setState({ eventMarkers: eventMarkers }); } //事件的打点更换 }, { key: "openEventInfo", value: function openEventInfo(item, map, marker) { var markers = _markMarkers.openEventInfo.call(this, item, map, marker); this.setState({ eventMarkers: markers }); } //人员图层对搜索出的人员打点 }, { key: "markPersonList", value: function markPersonList(personList) { var where = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ""; var personMarkers = _markMarkers.markPersonList.call(this, personList, where); this.setState({ personMarkers: personMarkers }); } //人员的打点更换 }, { key: "openPersonInfo", value: function openPersonInfo(item, marker, type) { var markers = _markMarkers.openPersonInfo.call(this, item, marker, type); // this.setState({ // personMarkers: markers, // }); } // 地球搜索打点 }, { key: "markEarthSearch", value: function markEarthSearch(point) { var marker = new AMap.Marker({ position: new AMap.LngLat(point.lng, point.lat) }); this.state.map.add(marker); this.state.map.setCenter([point.lng, point.lat]); this.props.dispatch({ type: "command/setEarthPoint", payload: { earthPoint: point } }); } //搜索出的驻勤点打点 }, { key: "markerAttendanceList", value: function markerAttendanceList(attendanceList) { var typeName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ""; var attendanceMarkers = _markMarkers.markerAttendanceList.call(this, attendanceList, typeName); this.setState({ attendanceMarkers: attendanceMarkers }); } //驻勤点的打点更换 }, { key: "openAttendanceInfo", value: function openAttendanceInfo(_ref) { var item = _ref.item, map = _ref.map, marker = _ref.marker, currentIndex = _ref.currentIndex, afterIndex = _ref.afterIndex, layerStatus = _ref.layerStatus; var markers = _markMarkers.openAttendanceInfo.call(this, { item: item, map: map, marker: marker, currentIndex: currentIndex, afterIndex: afterIndex, layerStatus: layerStatus }); //这里会导致类查询,先点开一个类型,点击该类型的一个驻勤点,在打开其他类型。所有的驻勤点值还是只有第一个打开的类型的驻勤点数量 // this.setState({ // attendanceMarkers: markers, // }); } }, { key: "createEventInfoWindow", value: function createEventInfoWindow(data) { return _CreateEventInfoWindow.default.call(this, data); } //定义单个的人员信息窗体 }, { key: "createInfoWindow", value: function createInfoWindow(data) { return _CreateInfoWindow.default.call(this, data); } //驻勤点的信息窗体 }, { key: "createAttendanceInfoWindow", value: function createAttendanceInfoWindow(data) { return _CreateAttenInfoWindow.default.call(this, data); } //一张图的信息窗体(放在这是为了this的指向) }, { key: "createPicturePerception", value: function createPicturePerception(data, name, type) { return _CreatePicturePerception.default.call(this, data, name, type); } //清空点击数据 }, { key: "clear", value: function clear(clearType) { //清空人员的点击数据 this.props.dispatch({ type: "command/" + clearType, payload: null }); this.props.dispatch({ type: "command/clearInfoWindow", payload: true }); } //清空不是本tab下的驻勤点,并且打上自己原本有的驻勤点 }, { key: "clearMarkerAdd", value: function clearMarkerAdd(current, past) { if (this.state[past + "Markers"]) { //清空不属于自己tab下的驻勤点 this.state.map.remove(this.state[past + "Markers"]); } if (this.state[current + "Markers"]) { this.state.map.add(this.state[current + "Markers"]); this.state.map.setFitView(this.state[current + "Markers"]); //自适应显示所有的标注点 } } // 调度弹框底部配置 //视频调度(单人与多人) }, { key: "video", value: function () { var _video = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator().m(function _callee(_ref2) { var _this4 = this; var _ref2$info, info, _ref2$schedulingName, schedulingName, _ref2$isNeedRecord, isNeedRecord, Members, videoMember, Room_No, memberCidList, uidList, cidInfoOwn, phoneOwn, needRecordCidList, _iterator, _step, item, data, _iterator2, _step2, recordPhone, dataOwn, v5_comId, Yardman_Type, _t, _t2; return _regenerator().w(function (_context) { while (1) switch (_context.p = _context.n) { case 0: _ref2$info = _ref2.info, info = _ref2$info === void 0 ? [] : _ref2$info, _ref2$schedulingName = _ref2.schedulingName, schedulingName = _ref2$schedulingName === void 0 ? "个人调度" : _ref2$schedulingName, _ref2$isNeedRecord = _ref2.isNeedRecord, isNeedRecord = _ref2$isNeedRecord === void 0 ? [] : _ref2$isNeedRecord; this.setState({ isNeedRecord: isNeedRecord, schedulingName: schedulingName }); //输入人员信息,调度名称 Members = []; videoMember = []; //用于记录是否已经进入房间使用 info.map(function (item) { Members.push(item.mobilePhone); videoMember.push({ mobilePhone: item.mobilePhone, status: 'no', id: item.mobilePhone + 'no' }); }); console.log('video', 'fetchVideoMemberList'); this.props.dispatch({ type: 'command/fetchVideoMemberList', payload: { memberList: videoMember } }); Room_No = Math.round(new Date() / 1000); console.log('GIS-setState'); this.setState({ Room_No: Room_No, MemberList: Members.join(",") }); //视频人的信息 //测试数据 memberCidList = []; //视频人员cid uidList = []; //视频人员uid cidInfoOwn = []; //发起人cid phoneOwn = this.state.mobilePhone; //发起人cid needRecordCidList = []; //需要录屏的人员cid //邀请视频的所有人的信息(不包括发起人) console.log('video-info', info); _iterator = _createForOfIteratorHelper(info); _context.p = 1; _iterator.s(); case 2: if ((_step = _iterator.n()).done) { _context.n = 15; break; } item = _step.value; if (!item.mobilePhone) { _context.n = 13; break; } _context.n = 3; return (0, _api.searchDeptUser)({ keyWord: item.mobilePhone }); case 3: data = _context.v; if (!(data && data.data)) { _context.n = 11; break; } uidList.push("".concat(item.mobilePhone, ";").concat(item.id, ";").concat(item.domainid)); // uidList.push(item.mobilePhone) memberCidList.push(data.data[0].item_cid); // memberCidList.push("2fbc66314f8740eb733d4ceaa8ba4085") if (!(isNeedRecord.length > 0)) { _context.n = 10; break; } _iterator2 = _createForOfIteratorHelper(isNeedRecord); _context.p = 4; _iterator2.s(); case 5: if ((_step2 = _iterator2.n()).done) { _context.n = 7; break; } recordPhone = _step2.value; if (!(recordPhone == item.mobilePhone)) { _context.n = 6; break; } needRecordCidList.push(data.data[0].item_cid); return _context.a(3, 7); case 6: _context.n = 5; break; case 7: _context.n = 9; break; case 8: _context.p = 8; _t = _context.v; _iterator2.e(_t); case 9: _context.p = 9; _iterator2.f(); return _context.f(9); case 10: _context.n = 12; break; case 11: return _context.a(2, _message2.default.info('视频人员未完成基础信息初始化,无法进行视频调度。')); case 12: _context.n = 14; break; case 13: return _context.a(2, _message2.default.info('视频人员未完成基础信息初始化,无法进行视频调度。')); case 14: _context.n = 2; break; case 15: _context.n = 17; break; case 16: _context.p = 16; _t2 = _context.v; _iterator.e(_t2); case 17: _context.p = 17; _iterator.f(); return _context.f(17); case 18: if (!(uidList.length > 0)) { _context.n = 22; break; } _context.n = 19; return (0, _api.searchDeptUser)({ keyWord: phoneOwn }); case 19: dataOwn = _context.v; if (!(dataOwn && dataOwn.data)) { _context.n = 20; break; } // let userInfoOwnData = await getUserAllInfo(dataOwn.data.data[0].id); // if(userInfoOwnData.errcode === 0 && userInfoOwnData.data && userInfoOwnData.data.field24){ cidInfoOwn = dataOwn.data[0].item_cid; // } this.props.dispatch({ type: "im/fetchV5Data", payload: { cid: cidInfoOwn, name: dataOwn.data[0].item_securityname } }); _context.n = 21; break; case 20: return _context.a(2, _message2.default.info('视频人员未完成基础信息初始化,无法进行视频调度!')); case 21: _context.n = 23; break; case 22: return _context.a(2, _message2.default.info('视频人员未完成基础信息初始化,无法进行视频调度!')); case 23: v5_comId = (0, _utils.gup)('v5_comId', window.location.href); if (!!memberCidList.join(",")) { // videoGenre: state.command.videoGenre, // 功能类型 0: 视频调度(一对多) 1: 视频上拉(一对一) Yardman_Type = this.props.videoGenre == 0 ? 1 : 2; (0, _api.sendVideoRoomMsg)({ RoomNo: Room_No, //房间号 // MemberList: Members.join(","), //视频人员,cid,多个逗号隔开 MemberList: memberCidList.join(","), //视频人员,cid,多个逗号隔开 Yardman_Name: phoneOwn, //本人的公司名 Yardman_Task_Name: schedulingName, //调度任务名称 Yardman_Task_Explain: "任务说明", //调度任务说明(视频的时候不用填) Transcriber: isNeedRecord ? needRecordCidList : '', //需要录制的人员的cid,多个逗号隔开 // transcribeMobiles: isNeedRecord ? isNeedRecord.join(",") : "", //需要录制的人员手机号 Originator: cidInfoOwn + ';' + phoneOwn, //发起人 cid;useid // 'b54e5c73119c9991f567a743e1c5df20;15600070001' UseList: uidList.join(","), //视频人员uid(手机号;userId;组织id),跟MemberList一一对应 ComId: v5_comId, //v5的企业ID Yardman_Type: Yardman_Type }).then(function (res) { if (res.retType === "0") { _this4.state.map.clearInfoWindow(); _this4.setState({ createTaskStatus: false, //关掉任务创建页面 videoStatus: true //把视频页面打开 // isNeedRecord, }); } }).catch(function (err) { console.error(); err; }); } else { _message2.default.warning("视频人员未完成基础信息初始化,无法进行视频调度"); } case 24: return _context.a(2); } }, _callee, this, [[4, 8, 9, 10], [1, 16, 17, 18]]); })); function video(_x) { return _video.apply(this, arguments); } return video; }() //文字调度事件(单人) }, { key: "character", value: function character(info) { var _this5 = this; //添加会话(单人对单人) _imInitialize.default.getConversationProfile("C2C".concat(info.mobilePhone)).then(function (_ref3) { var data = _ref3.data; // 3.1 更新当前会话 _this5.props.dispatch({ type: "im/updateCurrentConversation", payload: data.conversation }); _this5.setState({ conversationID: "C2C".concat(info.mobilePhone), // imStatus: true, selectedData: info, //这个会把搜索列表的红标记去掉 needCreateConversation: true }); _events.default.emit('changeImStatus', true); // 3.2 获取消息列表 _this5.getMessageList(data.conversation.conversationID); return Promise.resolve(); }, function (err) { // message.error(err.toString()); }); this.state.map.clearInfoWindow(); } //文字调度(多人,先创建群组) }, { key: "createGroup", value: function createGroup() { var _this6 = this; var Members = []; var memberList = []; Members.push(this.props.adminPhone + "admin"); this.state.selectedPoints.map(function (item) { Members.push(item.mobilePhone); memberList.push({ userID: item.mobilePhone + "" }); }); var options = { name: this.state.schedulingName, type: _timJsSdk.default.TYPES.GRP_PRIVATE, memberList: memberList }; _imInitialize.default.createGroup(options).then(function (info) { //创建成功之后,往里面发送一条消息 _this6.sendTextMessage(info.data.group.groupID); _this6.setState({ selectedPointsStatus: false }); //关闭调度的窗口 }).catch(function (err) { console.error(err); }); } //语音调度(单人)单人的就是打开会话,然后调用录音 }, { key: "voice", value: function voice(data) { this.setState({ onlyPersonVoiceStatus: true, selectedData: data }); this.state.map.clearInfoWindow(); } //语音调度(多人),//先创建一个群,录完音,在这个会话中发送该录音 }, { key: "voiceGroup", value: function voiceGroup(url, time) { var _this7 = this; var memberList = []; this.state.selectedPoints.map(function (item) { memberList.push({ userID: item.mobilePhone + "" }); }); var options = { name: this.state.schedulingName, type: _timJsSdk.default.TYPES.GRP_PRIVATE, memberList: memberList }; _imInitialize.default.createGroup(options).then(function (info) { //创建成功之后,往里面发送一条消息 _this7.sendCustomMessage(info.data.group.groupID, url, time, _timJsSdk.default.TYPES.CONV_GROUP); _this7.state.map.remove([_this7.state.overlays]); _this7.state.map.clearInfoWindow(); _this7.setState({ showRecord: false, selectedPointsStatus: false }); }).catch(function (err) { console.error(err); }); } //发送文字消息 }, { key: "sendTextMessage", value: function sendTextMessage(groupID) { var _this8 = this; var messageData = _imInitialize.default.createTextMessage({ to: groupID, conversationType: _timJsSdk.default.TYPES.CONV_GROUP, //群组调度 payload: { text: this.state.schedulingContent } }); _imInitialize.default.sendMessage(messageData).then(function (res) { //获取当前的会话 _this8.getCurrentConvarsation(groupID); }).catch(function (err) { _message2.default.error("发送失败"); }); } //发送自定义消息 }, { key: "sendCustomMessage", value: function sendCustomMessage(groupID, url, time, type) { var _this9 = this; var content = { url: url, time: time }; var messageSound = _imInitialize.default.createCustomMessage({ to: groupID, conversationType: type, payload: { data: "Sound", // 用于标识该消息是音频类型消息 description: "[语音]", // 获取音频路径 extension: JSON.stringify(content) } }); _imInitialize.default.sendMessage(messageSound).then(function (res) { if (type === _timJsSdk.default.TYPES.CONV_GROUP) { //获取群组当前的会话 _this9.getCurrentConvarsation(groupID); } else { //获取个人当前的会话 _this9.getMessageList(res.data.message.conversationID); } }).catch(function (err) { _message2.default.error("发送失败"); }); } //发送音频mp3 }, { key: "createAudioMessage", value: function createAudioMessage(groupID, url, time, type, state) { var _this0 = this; console.log('state语音blob流', state.blob); var audioFile = new File([state.blob], 'hello.wav', { type: 'wav' }); audioFile.duration = time; console.log('audioFile', audioFile); // const content = { // url, // time, // }; var messageSound = _imInitialize.default.createAudioMessage({ to: groupID, conversationType: type, payload: { file: audioFile //blob转file文件 // data: "Sound", // 用于标识该消息是音频类型消息 // description: "[语音]", // 获取音频路径 // extension: JSON.stringify(content), } }); messageSound.payload.second = time; //语音时长 console.log('messageSound', messageSound); _imInitialize.default.sendMessage(messageSound).then(function (res) { if (type === _timJsSdk.default.TYPES.CONV_GROUP) { //获取群组当前的会话 _this0.getCurrentConvarsation(groupID); } else { console.log('777'); console.log(res.data.message.conversationID); //获取个人当前的会话 _this0.getMessageList(res.data.message.conversationID); } }).catch(function (err) { _message2.default.error("发送失败"); }); } //获取当前的会话 }, { key: "getCurrentConvarsation", value: function getCurrentConvarsation(groupID) { var _this1 = this; _imInitialize.default.getConversationProfile("GROUP".concat(groupID)).then(function (_ref4) { var data = _ref4.data; // 3.1 更新当前会话 _this1.props.dispatch({ type: "im/updateCurrentConversation", payload: data.conversation }); _this1.setState({ createTaskStatus: false, // imStatus: true, conversationID: "GROUP" + groupID }); //打开im的会话框 _events.default.emit('changeImStatus', true); // 3.2 获取消息列表 _this1.getMessageList(data.conversation.conversationID); return Promise.resolve(); }); } //获取当前会话的消息列表 }, { key: "getMessageList", value: function getMessageList(conversationID) { var _this10 = this; var _this$props = this.props, nextReqMessageID = _this$props.nextReqMessageID, currentMessageList = _this$props.currentMessageList; _imInitialize.default.getMessageList({ conversationID: conversationID, nextReqMessageID: nextReqMessageID, count: 15 }).then(function (imReponse) { // 更新messageID,续拉时要用到 _this10.props.dispatch({ type: "im/updateCurrentConversationCont", payload: { nextReqMessageID: imReponse.data.nextReqMessageID, isCompleted: imReponse.data.isCompleted, currentMessageList: [].concat((0, _toConsumableArray2.default)(imReponse.data.messageList), (0, _toConsumableArray2.default)(currentMessageList)) // 更新当前消息列表,从头部插入 } }); }); } //卫星地图切换 }, { key: "setSatellite", value: function setSatellite(satellite) { if (satellite) { this.state.locaMap.add(this.state.satelliteLayer); this.state.map.setMapStyle('normal'); } // this.setState({ satellite }) } }, { key: "render", value: /******************************相关事件******************************/ function render() { var _this11 = this; var mapStyle = this.props.mapStyle; var clsNameRadio = (0, _classnames.default)("radio_container", mapStyle); console.log('GIS-state', this.state); return /*#__PURE__*/_react.default.createElement(Container, { className: "lalal", key: "GIS", style: { backgroundColor: this.state.showEarchMap ? '#000' : '#fff' } }, /*#__PURE__*/_react.default.createElement(_index3.default, { showEarchMap: this.state.showEarchMap, markEarthSearch: this.markEarthSearch.bind(this), earthMap: this.state.earthMap, clearRotation: function clearRotation() { clearInterval(_this11.state.rotation); } }), /*#__PURE__*/_react.default.createElement(_AllMapLayer.default, { layerSatatus: this.state.layerSatatus, showEarchMap: this.state.showEarchMap }), /*#__PURE__*/_react.default.createElement("div", null, this.state.map && this.state.layerSatatus == "attendance" && /*#__PURE__*/_react.default.createElement(_SearchListTab.default //调度处理 , { changeImStatus: function changeImStatus(value) { _events.default.emit('changeImStatus', value); } //群组里的视频调度,获取多人的调度逻辑 , groupVideo: function groupVideo(list) { // console.log('GIS-setState'); _this11.setState({ createTaskStatus: true, selectedPoints: list, dispatchType: "video" }); } }), /*#__PURE__*/_react.default.createElement(_PersonSearch.default, { layerSatatus: this.state.layerSatatus, markesBeiJing: function markesBeiJing() { //驻点北京 var marker = new AMap.Marker({ position: new AMap.LngLat(116.344081, 39.940512) // 经纬度对象,也可以是经纬度构成的一维数组[116.39, 39.9] }); // console.log('GIS-setState'); _this11.setState({ beijingMarkers: marker }); _this11.state.map.add(marker); _this11.state.map.setFitView(marker); }, markesGaoQi: function markesGaoQi() { //驻点高崎 var marker = new AMap.Marker({ position: new AMap.LngLat(118.12902, 24.533153) // 经纬度对象,也可以是经纬度构成的一维数组[116.39, 39.9] }); // console.log('GIS-setState'); _this11.setState({ gaoqiMarkers: marker }); _this11.state.map.add(marker); _this11.state.map.setCenter([118.12902, 24.533153]); }, beijingVideo: function beijingVideo(value) { // console.log('GIS-setState'); _this11.setState({ beijingVideo: value }); } }), this.state.map && this.state.layerSatatus == "aPicture" && !this.state.showEarchMap && /*#__PURE__*/_react.default.createElement(_APicture.default, { _thisGIS: this //数据展示的增加打点@param where:数据展示(‘’)/周边搜索(searchView) // addPictueMarks={(addData, type, where = '') => { // APictureAddPictueMarks.call(this, addData, type, where) // }} //数据展示的减少打点 // reducePictueMarks={(reduceData, type, where = '') => { // APictureReducePictueMarks.call(this, reduceData, type) // }} //实时异常增加打点 , addNowErrorEvent: function addNowErrorEvent(data) { _markMarkers.markNowErrorEvent.call(_this11, data); }, searchAround: this.state.searchAround, changeShowSearchView: function changeShowSearchView(value) { _this11.setState({ searchAround: (0, _objectSpread2.default)({}, _this11.state.searchAround, { show: value }) }); }, setSatellite: this.setSatellite.bind(this), locaMap: this.state.locaMap, satelliteLayer: this.state.satelliteLayer }), this.state.map && this.state.layerSatatus == "police" && /*#__PURE__*/_react.default.createElement(_index2.default, { _thisGIS: this //将GIS的this事件传下去,在自己的页面去处理地图事件 , layerSatatus: this.state.layerSatatus //一张图数据展示的增加打点 // addPictueMarks={(addData, type, where = '') => { // APictureAddPictueMarks.call(this, addData, type, where) // }} //一张图数据展示的减少打点 // reducePictueMarks={(reduceData, type, where = '') => { // APictureReducePictueMarks.call(this, reduceData, type, where) // }} , searchAround: this.state.searchAround, changeShowSearchView: function changeShowSearchView(value) { _this11.setState({ searchAround: (0, _objectSpread2.default)({}, _this11.state.searchAround, { show: value }) }); } }), this.state.map && this.state.layerSatatus == "nanNing" && /*#__PURE__*/_react.default.createElement(_NanNing.default, { _thisGIS: this }), !this.state.showEarchMap && /*#__PURE__*/_react.default.createElement(_TopButton.default, { layerStatus: this.state.layerSatatus, gisMAP: this.state.map, localMap: this.state.locaMap, satelliteLayer: this.state.satelliteLayer, setSatellite: this.setSatellite.bind(this), _thisGIS: this, conversationID: this.state.conversationID }), /*#__PURE__*/_react.default.createElement(_modal.default, { className: "selected-points-modal" // title="调度" , visible: this.state.selectedPointsStatus, onOk: this.handleOk, onCancel: function onCancel() { _this11.setState({ selectedPointsStatus: false }); _this11.state.map.remove([_this11.state.overlays]); }, footer: this.setModalBtn() }, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_row.default, { gutter: 24 }, this.state.selectedPoints.map(function (item, index) { return /*#__PURE__*/_react.default.createElement(_col.default, { span: 12, key: index }, /*#__PURE__*/_react.default.createElement("div", { className: "content-window-card", style: { marginBottom: 10 } }, /*#__PURE__*/_react.default.createElement("div", { className: "info-middle" }, item.photoUrl ? /*#__PURE__*/_react.default.createElement("img", { className: "avator", src: item.photoUrl }) : /*#__PURE__*/_react.default.createElement("span", { className: "avator span-header" }, item.name ? item.name.substring(item.name.length - 2, item.name.length) : ""), /*#__PURE__*/_react.default.createElement("div", { className: "text" }, /*#__PURE__*/_react.default.createElement("div", { className: "name" }, item.name), /*#__PURE__*/_react.default.createElement("div", null, "\u624B\u673A\u53F7\uFF1A", item.mobilePhone), /*#__PURE__*/_react.default.createElement("div", null, "\u8BC1\u4EF6\u53F7\u7801\uFF1A", item.idCardNo))))); })))), /*#__PURE__*/_react.default.createElement(_modal.default, { className: "create-task-modal", visible: this.state.createTaskStatus, onOk: this.handleOk, onCancel: function onCancel() { _this11.setState({ createTaskStatus: false }); _this11.state.map.remove([_this11.state.overlays]); }, footer: //语音调度的时候,不需要取消、开始调度按钮 this.state.dispatchType === "voice" ? "" : [/*#__PURE__*/_react.default.createElement(_button.default, { key: "voice", onClick: function onClick() { _this11.setState({ createTaskStatus: false }); _this11.state.map.remove([_this11.state.overlays]); } }, "\u53D6\u6D88\u8C03\u5EA6"), /*#__PURE__*/_react.default.createElement(_button.default, { key: "text", type: "primary", onClick: function onClick() { if (_this11.state.dispatchType === "text") { if (_this11.state.schedulingName.trim().length === 0) { _message2.default.warning("请输入调度任务名称"); } else if (_this11.state.schedulingContent.trim().length === 0) { _message2.default.warning("请输入调度任务内容"); } else { _this11.state.map.remove([_this11.state.overlays]); //输入的数据都没有错的时候,开始文字调度(创建群组) _this11.createGroup(); } } if (_this11.state.dispatchType === "voice") { //语音调度 } if (_this11.state.dispatchType === "video") { if (_this11.state.schedulingName.trim().length === 0) { _message2.default.warning("请输入调度任务名称"); } else if (_this11.state.recordMobile.length > 16) { _message2.default.error("录制人数限制16个以内,请重新选择"); } else { _this11.state.map.remove([_this11.state.overlays]); _this11.state.map.clearInfoWindow(); //开始视频调度 // this.video( // this.state.selectedPoints, // this.state.schedulingName.trim(), // this.state.recordMobile // ); //选中的人员,调度任务名称 _events.default.emit('clickTextScheduling', { item: _this11.state.selectedPoints, name: _this11.state.schedulingName.trim(), isNeedRecord: _this11.state.recordMobile, type: "video" }); } } } }, "\u5F00\u59CB\u8C03\u5EA6")] }, /*#__PURE__*/_react.default.createElement(_ModalView.default, (0, _defineProperty2.default)((0, _defineProperty2.default)({ selectedPoints: this.state.selectedPoints, dispatchType: this.state.dispatchType, showRecord: this.state.showRecord, schedulingName: function schedulingName(value) { _this11.setState({ schedulingName: value }); }, schedulingContent: function schedulingContent(value) { _this11.setState({ schedulingContent: value }); }, voiceGroup: function voiceGroup(url, time) { _this11.voiceGroup(url, time); } }, "showRecord", function showRecord(value) { _this11.setState({ showRecord: value }); }), "onCheckPerRecord", function onCheckPerRecord(recordMobile) { _this11.setState({ recordMobile: recordMobile }); }))), this.state.videoStatus && /*#__PURE__*/_react.default.createElement(_index.default, { Room_No: this.state.Room_No, mobilePhone: this.state.mobilePhone, imSig: this.props.imSig, closeVideoState: function closeVideoState() { _this11.setState({ videoStatus: !_this11.state.videoStatus }); }, _thisGIS: this, schedulingName: this.state.schedulingName, isNeedRecord: this.state.isNeedRecord }), this.state.onlyPersonVoiceStatus && /*#__PURE__*/_react.default.createElement("div", { className: "only-person-voice" }, /*#__PURE__*/_react.default.createElement("div", { className: "avatar-header" }, this.state.selectedData.photoUrl ? /*#__PURE__*/_react.default.createElement("img", { src: this.state.selectedData.photoUrl }) : /*#__PURE__*/_react.default.createElement("span", { className: "img-span" }, this.state.selectedData.name.substring(this.state.selectedData.name.length - 2, this.state.selectedData.name.length)), /*#__PURE__*/_react.default.createElement("span", { className: "label-voice" }, "\u8BED\u97F3\u8C03\u5EA6"), /*#__PURE__*/_react.default.createElement("div", { className: "close", onClick: function onClick() { _this11.setState({ onlyPersonVoiceStatus: false }); } }, "x")), /*#__PURE__*/_react.default.createElement(_Record.default, { where: "index", sendSound: function sendSound(url, time, state) { //点击了发送 //关掉单人的录音页面 _this11.setState({ onlyPersonVoiceStatus: false }); //主要是区分了群组页面的语音调度内容 var conversonID = _this11.state.selectedData.mobilePhone ? "C2C".concat(_this11.state.selectedData.mobilePhone) : _this11.state.selectedData.conversonGroupID; var type = _this11.state.selectedData.mobilePhone ? _timJsSdk.default.TYPES.CONV_C2C : _timJsSdk.default.TYPES.CONV_GROUP; var id = _this11.state.selectedData.mobilePhone ? _this11.state.selectedData.mobilePhone + "" : _this11.state.selectedData.group; _imInitialize.default.getConversationProfile(conversonID).then(function (_ref5) { var data = _ref5.data; // 3.1 更新当前会话 _this11.props.dispatch({ type: "im/updateCurrentConversation", payload: data.conversation }); _this11.setState({ conversationID: conversonID, // imStatus: true, needCreateConversation: true }); _events.default.emit('changeImStatus', true); //发送单人的语音 // this.sendCustomMessage(id, url, time, type); _this11.createAudioMessage(id, url, time, type, state); return Promise.resolve(); }); } })), this.state.beijingVideo ? /*#__PURE__*/_react.default.createElement(_BeijingVideo.default, { changeBeijingVideo: function changeBeijingVideo(value) { return _this11.setState({ beijingVideo: value }); } }) : "")); } }]); }(_react.PureComponent)) || _class) || _class); var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width:100%;\n height:100%;\n "]))); /***/ }), /***/ "Gf0r": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAATpJREFUOE+tk79KA0EQh7/ZBK+1sxAsLGwsfAfFxsInECsJJEElxDJ3bu4sjUEkFwhW4hNY2Ii+g6CNhYVgkU7sIsmOXEjgDCjmzxYLy4/5Zn47M8LI8cPWKnT3FDaBpYH8JnAH2csoyD2nQ2T4sNbO9cxCzaF5gY7Avaq+JLqIrChsKHgGaWZcu2yt/epryTUIvnXouoF6xnUia0sf6UzW1ud7xvMdlAzykHHtrQTSB/hh88KhRQO7UVC4HrWVfvthvOPgyiCNKMjvS+LZ0X00cB4FhfJfwUPND+Oag0NDdk38MK4r5LKuszha9m+wxE7XeO8CLamE8ZPAaxQUtv+TPVXFjcJyAvhEtXVyXDwaB1CpNk4Ryc0EMJ2FqT9xkjZWqo0zFTnot3HqQZrJKKcgky3Tz1kfb52/AcJXzb2NoY6SAAAAAElFTkSuQmCC" /***/ }), /***/ "Gu7T": /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _from = __webpack_require__("c/Tr"); var _from2 = _interopRequireDefault(_from); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = function (arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return (0, _from2.default)(arr); } }; /***/ }), /***/ "HA4o": /***/ (function(module, exports) { module.exports = "data:image/png;base64,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" /***/ }), /***/ "HAGj": /***/ (function(module, exports, __webpack_require__) { var assignValue = __webpack_require__("i4ON"), castPath = __webpack_require__("bIjD"), isIndex = __webpack_require__("ZGh9"), isObject = __webpack_require__("yCNF"), toKey = __webpack_require__("Ubhr"); /** * The base implementation of `_.set`. * * @private * @param {Object} object The object to modify. * @param {Array|string} path The path of the property to set. * @param {*} value The value to set. * @param {Function} [customizer] The function to customize path creation. * @returns {Object} Returns `object`. */ function baseSet(object, path, value, customizer) { if (!isObject(object)) { return object; } path = castPath(path, object); var index = -1, length = path.length, lastIndex = length - 1, nested = object; while (nested != null && ++index < length) { var key = toKey(path[index]), newValue = value; if (key === '__proto__' || key === 'constructor' || key === 'prototype') { return object; } if (index != lastIndex) { var objValue = nested[key]; newValue = customizer ? customizer(objValue, key, nested) : undefined; if (newValue === undefined) { newValue = isObject(objValue) ? objValue : (isIndex(path[index + 1]) ? [] : {}); } } assignValue(nested, key, newValue); nested = nested[key]; } return object; } module.exports = baseSet; /***/ }), /***/ "HGVe": /***/ (function(module, exports) { // removed by extract-text-webpack-plugin /***/ }), /***/ "HV3m": /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.data = void 0; var data = exports.data = [{ title: "党政机关", typeName: "policy", initPng: __webpack_require__("4GKM"), clickPng: __webpack_require__("jsww"), grayPng: __webpack_require__("1u8q"), markerIcon: __webpack_require__("mwMK"), clickMarkerIcon: __webpack_require__("t+3X"), key: "01", whetherHas: false, //当前的公司是否有该类型的驻勤点 whetherClick: false //是否点击 }, { title: "高等院校", typeName: "school", initPng: __webpack_require__("qhXr"), clickPng: __webpack_require__("0QVo"), grayPng: __webpack_require__("jJi2"), markerIcon: __webpack_require__("RaPn"), clickMarkerIcon: __webpack_require__("1Pj1"), key: "02", whetherHas: false, whetherClick: false }, { title: "公共安全", typeName: "safety", initPng: __webpack_require__("6Qz+"), clickPng: __webpack_require__("487x"), grayPng: __webpack_require__("U7cL"), markerIcon: __webpack_require__("CEMJ"), clickMarkerIcon: __webpack_require__("bpzx"), key: "03", whetherHas: false, whetherClick: false }, { title: "公园景点", typeName: "park", initPng: __webpack_require__("/RIB"), clickPng: __webpack_require__("J9M/"), grayPng: __webpack_require__("LvxY"), markerIcon: __webpack_require__("WoMo"), clickMarkerIcon: __webpack_require__("JkqM"), key: "04", whetherHas: false, whetherClick: false }, { title: "轨道交通", typeName: "pathway", initPng: __webpack_require__("FSKz"), clickPng: __webpack_require__("lgO+"), grayPng: __webpack_require__("iu5k"), markerIcon: __webpack_require__("rFqi"), clickMarkerIcon: __webpack_require__("3yYd"), key: "05", whetherHas: false, whetherClick: false }, { title: "金融初始", typeName: "financial", initPng: __webpack_require__("/XOZ"), clickPng: __webpack_require__("Prs7"), grayPng: __webpack_require__("Un61"), markerIcon: __webpack_require__("5OIZ"), clickMarkerIcon: __webpack_require__("vy8Z"), key: "06", whetherHas: false, whetherClick: false }, { title: "酒店餐饮", typeName: "hotel", initPng: __webpack_require__("o8J4"), clickPng: __webpack_require__("s4+4"), grayPng: __webpack_require__("SJXl"), markerIcon: __webpack_require__("uZ7l"), clickMarkerIcon: __webpack_require__("I2Sz"), key: "07", whetherHas: false, whetherClick: false }, { title: "居民社区", typeName: "resident", initPng: __webpack_require__("KaAZ"), clickPng: __webpack_require__("jNq1"), grayPng: __webpack_require__("Z3I/"), markerIcon: __webpack_require__("Jcla"), clickMarkerIcon: __webpack_require__("DxMF"), key: "08", whetherHas: false, whetherClick: false }, { title: "企事业单位", typeName: "enterprise", initPng: __webpack_require__("1Sdw"), clickPng: __webpack_require__("IItY"), grayPng: __webpack_require__("0kwy"), markerIcon: __webpack_require__("hLDL"), clickMarkerIcon: __webpack_require__("Iw+v"), key: "09", whetherHas: false, whetherClick: false }, { title: "商市场", typeName: "bazaar", initPng: __webpack_require__("Sgor"), clickPng: __webpack_require__("ojPL"), grayPng: __webpack_require__("HWmu"), markerIcon: __webpack_require__("q1aE"), clickMarkerIcon: __webpack_require__("kQGz"), key: "10", whetherHas: false, whetherClick: false }, { title: "医疗机构", typeName: "medical", initPng: __webpack_require__("ygRb"), clickPng: __webpack_require__("hfjK"), grayPng: __webpack_require__("HA4o"), markerIcon: __webpack_require__("2WCT"), clickMarkerIcon: __webpack_require__("fQY3"), key: "11", whetherHas: false, whetherClick: false }, { title: "娱乐场所", typeName: "recreation", initPng: __webpack_require__("AfHd"), clickPng: __webpack_require__("IZEb"), grayPng: __webpack_require__("AHKm"), markerIcon: __webpack_require__("1DFu"), clickMarkerIcon: __webpack_require__("jjnV"), key: "12", whetherHas: false, whetherClick: false }, { title: "文化/会展", typeName: "convention", initPng: __webpack_require__("1FcO"), clickPng: __webpack_require__("bcoi"), grayPng: __webpack_require__("zRue"), markerIcon: __webpack_require__("zHum"), clickMarkerIcon: __webpack_require__("8dqN"), key: "13", whetherHas: false, whetherClick: false }, { title: "园区", typeName: "garden", initPng: __webpack_require__("5dWf"), clickPng: __webpack_require__("ouaO"), grayPng: __webpack_require__("RRDu"), markerIcon: __webpack_require__("NPce"), clickMarkerIcon: __webpack_require__("Def1"), key: "14", whetherHas: false, whetherClick: false }, { title: "乡镇街道", typeName: "street", initPng: __webpack_require__("NrWQ"), clickPng: __webpack_require__("ORE9"), grayPng: __webpack_require__("PtIz"), markerIcon: __webpack_require__("sdXI"), clickMarkerIcon: __webpack_require__("7aT7"), key: "15", whetherHas: false, whetherClick: false }, { title: "小学幼儿园", typeName: "kindergarten", initPng: __webpack_require__("vPVG"), clickPng: __webpack_require__("3Ykx"), grayPng: __webpack_require__("QP22"), markerIcon: __webpack_require__("i9CR"), clickMarkerIcon: __webpack_require__("uGaE"), key: "16", whetherHas: false, whetherClick: false }, { title: "其他", typeName: "other", // initPng: require("@assets/images/prevention/attendance/kindergarten_init.png"), // clickPng: require("@assets/images/prevention/attendance/kindergarten_click.png"), // grayPng: require("@assets/images/prevention/attendance/kindergarten_gray.png"), markerIcon: __webpack_require__("FW3O"), clickMarkerIcon: __webpack_require__("7HHs"), key: "17", whetherHas: false, whetherClick: false }]; /***/ }), /***/ "HWmu": /***/ (function(module, exports) { module.exports = "data:image/png;base64,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" /***/ }), /***/ "Hjgs": /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = toArray; var _react = _interopRequireDefault(__webpack_require__("GiK3")); var _reactIs = __webpack_require__("ncfW"); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function toArray(children) { var ret = []; _react.default.Children.forEach(children, function (child) { if (child === undefined || child === null) { return; } if (Array.isArray(child)) { ret = ret.concat(toArray(child)); } else if ((0, _reactIs.isFragment)(child) && child.props) { ret = ret.concat(toArray(child.props.children)); } else { ret.push(child); } }); return ret; } /***/ }), /***/ "Ht8P": /***/ (function(module, exports) { var toString = {}.toString; module.exports = Array.isArray || function (arr) { return toString.call(arr) == '[object Array]'; }; /***/ }), /***/ "Hxdr": /***/ (function(module, exports) { /** * A specialized version of `_.map` for arrays without support for iteratee * shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns the new mapped array. */ function arrayMap(array, iteratee) { var index = -1, length = array == null ? 0 : array.length, result = Array(length); while (++index < length) { result[index] = iteratee(array[index], index, array); } return result; } module.exports = arrayMap; /***/ }), /***/ "I2+Y": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _objectSpread2 = _interopRequireDefault(__webpack_require__("+TWC")); var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); __webpack_require__("gZEk"); var _form = _interopRequireDefault(__webpack_require__("8rR3")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); var _styledComponents = _interopRequireDefault(__webpack_require__("w2vo")); var _dva = __webpack_require__("S6G3"); var _Header = _interopRequireDefault(__webpack_require__("0CdG")); var _Router = __webpack_require__("naA8"); var _api = __webpack_require__("H/Zg"); var _TypeData = __webpack_require__("HV3m"); var _V5Page = _interopRequireDefault(__webpack_require__("AiNH")); var _store = _interopRequireDefault(__webpack_require__("Y4FN")); var _utils = __webpack_require__("oAV5"); var _dec, _dec2, _class; /** * 地图页面 */ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } var Command = exports.default = (_dec = (0, _dva.connect)(function (state) { return {}; }), _dec2 = _form.default.create(), _dec(_class = _dec2(_class = /*#__PURE__*/function (_PureComponent) { function Command(props) { var _this; (0, _classCallCheck2.default)(this, Command); _this = _callSuper(this, Command, [props]); var app_type = (0, _utils.gup)('app_type', window.location.href); var saas = _store.default.get('saas') || {}; _store.default.set('saas', (0, _objectSpread2.default)({}, saas, { app_type: app_type })); // const currentIndex = app_type==1?0:1 //默认第二个GIS打开 var currentIndex = 0; _this.state = { path: "dataScreen", //初始化第一个页面路径 menuRouter: _Router.CommandRouter, //所有的菜单路由 currentIndex: currentIndex, renderRouter: _Router.CommandRouter[currentIndex], //当前渲染的路由 headerLogo: null }; return _this; } /******************************生命周期******************************/ // componentWillMount() { // var script = document.createElement('script'); // script.type = 'text/javascript'; // script.async = true; // script.src = '/sdk/trtc.js'; // document.head.appendChild(script); // } (0, _inherits2.default)(Command, _PureComponent); return (0, _createClass2.default)(Command, [{ key: "componentDidMount", value: function componentDidMount() { this._getGISMenu(); if (document.querySelector(".ant-layout-header")) { // 隐藏左侧菜单栏 document.querySelector(".ant-layout-sider").style.display = "none"; document.querySelector(".ant-layout-content").style.margin = "0px"; // document.querySelector(".oneKeySearchHidden").style.display = "none"; //隐藏顶部菜单栏 document.querySelector(".ant-layout-header").style.display = "none"; } } }, { key: "componentWillUnmount", value: function componentWillUnmount() { if (document.querySelector(".ant-layout-sider")) { // 显示左侧菜单栏 document.querySelector(".ant-layout-sider").style.display = "block"; document.querySelector(".ant-layout-content").style.margin = "16px"; // document.querySelector(".oneKeySearchHidden").style.display = "block"; } } //获取gis菜单路径 }, { key: "_getGISMenu", value: function _getGISMenu() { var _this2 = this; (0, _api.getGISMenu)({ _currpage: 1, lines: 100 }, { appId: "__ZLuP7RGirprZZ6SCdiX", viewId: "__yCQ9PtckfTJYgpHrgGm", opentarget: "detail", containTitle: "gis菜单接口" }).then(function (res) { if (res.data.total > 0) { var _data = []; res.data.data.map(function (item) { if (item.type == 'logo') { _this2.setState({ headerLogo: item.menuIcon && JSON.parse(item.menuIcon) // headerLogo: item.menuIcon && JSON.parse(item.menuIcon)[0] && JSON.parse(item.menuIcon)[0].path, }); } else { var value = typeof item.children == 'string' ? JSON.parse(item.children) : item.children; _data.push({ menuName: item.menuName, path: 'v5Page' + item.id, component: /*#__PURE__*/_react.default.createElement(_V5Page.default, { menuUrl: item.url, children: value }) }); } }); _this2.setState({ menuRouter: _Router.CommandRouter.concat(_data) }); } }); } /******************************相关事件******************************/ }, { key: "render", value: function render() { var _this3 = this; var _this$state = this.state, menuRouter = _this$state.menuRouter, renderRouter = _this$state.renderRouter, currentIndex = _this$state.currentIndex, headerLogo = _this$state.headerLogo; return /*#__PURE__*/_react.default.createElement("div", { style: { padding: 'unset' } }, /*#__PURE__*/_react.default.createElement(_Header.default, { headerLogo: headerLogo, currentIndex: currentIndex, currentRouter: function currentRouter(item) { _this3.setState({ path: item.path, renderRouter: item }); }, CommandRouter: menuRouter }), /*#__PURE__*/_react.default.createElement("div", { style: { height: "calc(100vh)", paddingTop: '54px' // paddingTop: this.state.path == "GIS"|| this.state.path == "dataScreen"? "0" : "54px", } }, renderRouter && renderRouter.component)); } }]); }(_react.PureComponent)) || _class) || _class); /***/ }), /***/ "I2Sz": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAiCAYAAAC0nUK+AAAAAXNSR0IArs4c6QAABE5JREFUSA2tVl1oXFUQnjl3d8XEmHT/DAsWwQeTpi5CSqHRZJsWRcHog0JRsC+lpaLUF9H0LYLRigoqCGr8ASUPWvXBPAQqpNlYkDYmSpufPqhQWkq3m2ySrdnu7t17x5mb3OXs7t38QOdhz5yZb74zd845cxZhA1lq7+mxCfpsoF5AjCFQiAAzSHANAZIK4ZeWueRviGzxEMbUSroj0Ys2nSKivbXeSgsCTpKBb0Zmk2crPQAV5DQwoBZ/GBskm/oFqFqjcFff4xBI7APj/hhgSzPQ8gpYV69DMfk7FEZ+BfvGTYdToXo/eKi3HwcG7OpFgLPEhbbu0+m2bko/fIBWvxwmu1Bgc30Rv+AEL3EL7T0/SYI15Old3W85gK4+Kv45U5/RwyP4BY5bX+Btl9wpy+Luni4q0Tny+7H520/A/0iH6y+PnFVZr1bC8xNg/jULK4dPAJomKaUSQd5o5xOYeJC3GxteO+JJXE3mNZeEJF54LKK17NO79++Rz1nc/9yGNRaMK/V02QPhccrT0b3XB7bVJ5nIqcBAwEnKPHehIjn/Y5ueSAcv8cJze2gYyFZPMzkcFI8cN1dWjr7uqs4oNRXR667rjnP9R3iEHIkOKr5dO8Uu5/hOiMazUxFBVEjlgugi2boZu3bdpuuuX0aXhzc2wpnTqhjl5t0JcXmE18drpZg6KFdaRcNlfq+a6jZdLwexIjxrgtcVH8xpmUiv0MXrs3WbrutxGs+0IgWj4pQmRMWijtu2LvHCI4JKjfhUU+MIZf9b4u624/Z3P0LDkRcdp/7ZS0/W2nS/E8A/Er/eJdNBIzCqQudHs7zOhwLIffyV0yNcsDtaV665at1ReovEi/Aj8g5ePLPqNC6KP9G4aOYn+Xq3Y7AF7v303W31GCHOvnISKLPMeeJ0+IHGLhwdLZQfi3S89yEslib5fDaB3+80obtfer7cErxSlhpLKZyMTVMgN5UP94RmJq7KpEwuk8yuxFO2TSMEZMh8Oy8RM+UQfQfCc2fPS6xIBbkY0m2JYwD256JvVbiFlPg2PsM93Dl5blzNkxS5nPxCAX7gArYyMvmxamKJqyEXY7BVneSAylslDi9BGArNJb/xcnmS4/h4yQDfC7wAb/+GcjF8n3GiHsKTXMA75seuEMKr9QJ5uwroNw5xIvl6mLrkEhCZmxjm7NfucxWDQhoMXxq/XGWumG5ILkif4XuZs6zIjhecD6rW9yqYPCabkrfMjP3DoFN6LF+C4zh7etMuV3POdZLOzs4G0zSD7SZEP6LmM9z8Q1m0J541Vo7zf5Nbfr8/MzU1ldNjdN25ibrB1ePxeDSfzz9oWdY9KbDwUQoUo2js+x5z/X/YhVti54UjsVjMSqVSzmvmxrpj3bLYtt3qgmR8w87+/C9ZXw9R7m/dXo3TfXXJ+bNv6MBlwy4dxsxnuk30apzu31LNObsmbscBHg0ms/i0FLdS8/8BGxRs+p+5y6AAAAAASUVORK5CYII=" /***/ }), /***/ "IDpA": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); // EXTERNAL MODULE: ./node_modules/react/index.js var react = __webpack_require__("GiK3"); var react_default = /*#__PURE__*/__webpack_require__.n(react); // EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/extends.js var helpers_extends = __webpack_require__("Dd8w"); var extends_default = /*#__PURE__*/__webpack_require__.n(helpers_extends); // EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/classCallCheck.js var classCallCheck = __webpack_require__("Zrlr"); var classCallCheck_default = /*#__PURE__*/__webpack_require__.n(classCallCheck); // EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/createClass.js var createClass = __webpack_require__("wxAW"); var createClass_default = /*#__PURE__*/__webpack_require__.n(createClass); // EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/possibleConstructorReturn.js var possibleConstructorReturn = __webpack_require__("zwoO"); var possibleConstructorReturn_default = /*#__PURE__*/__webpack_require__.n(possibleConstructorReturn); // EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/inherits.js var inherits = __webpack_require__("Pf15"); var inherits_default = /*#__PURE__*/__webpack_require__.n(inherits); // EXTERNAL MODULE: ./node_modules/prop-types/index.js var prop_types = __webpack_require__("KSGD"); var prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types); // EXTERNAL MODULE: ./node_modules/warning/warning.js var warning = __webpack_require__("Trj0"); var warning_default = /*#__PURE__*/__webpack_require__.n(warning); // EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/defineProperty.js var defineProperty = __webpack_require__("bOdI"); var defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty); // CONCATENATED MODULE: ./node_modules/rc-slider/es/common/Track.js /* eslint-disable react/prop-types */ var Track_Track = function Track(props) { var _ref, _ref2; var className = props.className, included = props.included, vertical = props.vertical, offset = props.offset, length = props.length, style = props.style, reverse = props.reverse; var positonStyle = vertical ? (_ref = {}, defineProperty_default()(_ref, reverse ? 'top' : 'bottom', offset + '%'), defineProperty_default()(_ref, reverse ? 'bottom' : 'top', 'auto'), defineProperty_default()(_ref, 'height', length + '%'), _ref) : (_ref2 = {}, defineProperty_default()(_ref2, reverse ? 'right' : 'left', offset + '%'), defineProperty_default()(_ref2, reverse ? 'left' : 'right', 'auto'), defineProperty_default()(_ref2, 'width', length + '%'), _ref2); var elStyle = extends_default()({}, style, positonStyle); return included ? react_default.a.createElement('div', { className: className, style: elStyle }) : null; }; /* harmony default export */ var common_Track = (Track_Track); // EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/objectWithoutProperties.js var objectWithoutProperties = __webpack_require__("+6Bu"); var objectWithoutProperties_default = /*#__PURE__*/__webpack_require__.n(objectWithoutProperties); // EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/get.js var get = __webpack_require__("yEsh"); var get_default = /*#__PURE__*/__webpack_require__.n(get); // EXTERNAL MODULE: ./node_modules/rc-util/es/Dom/addEventListener.js var addEventListener = __webpack_require__("iQU3"); // EXTERNAL MODULE: ./node_modules/classnames/index.js var classnames = __webpack_require__("HW6M"); var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); // CONCATENATED MODULE: ./node_modules/rc-slider/es/common/Steps.js var Steps_calcPoints = function calcPoints(vertical, marks, dots, step, min, max) { warning_default()(dots ? step > 0 : true, '`Slider[step]` should be a positive number in order to make Slider[dots] work.'); var points = Object.keys(marks).map(parseFloat).sort(function (a, b) { return a - b; }); if (dots && step) { for (var i = min; i <= max; i += step) { if (points.indexOf(i) === -1) { points.push(i); } } } return points; }; var Steps_Steps = function Steps(_ref) { var prefixCls = _ref.prefixCls, vertical = _ref.vertical, reverse = _ref.reverse, marks = _ref.marks, dots = _ref.dots, step = _ref.step, included = _ref.included, lowerBound = _ref.lowerBound, upperBound = _ref.upperBound, max = _ref.max, min = _ref.min, dotStyle = _ref.dotStyle, activeDotStyle = _ref.activeDotStyle; var range = max - min; var elements = Steps_calcPoints(vertical, marks, dots, step, min, max).map(function (point) { var _classNames; var offset = Math.abs(point - min) / range * 100 + '%'; var isActived = !included && point === upperBound || included && point <= upperBound && point >= lowerBound; var style = vertical ? extends_default()({}, dotStyle, defineProperty_default()({}, reverse ? 'top' : 'bottom', offset)) : extends_default()({}, dotStyle, defineProperty_default()({}, reverse ? 'right' : 'left', offset)); if (isActived) { style = extends_default()({}, style, activeDotStyle); } var pointClassName = classnames_default()((_classNames = {}, defineProperty_default()(_classNames, prefixCls + '-dot', true), defineProperty_default()(_classNames, prefixCls + '-dot-active', isActived), defineProperty_default()(_classNames, prefixCls + '-dot-reverse', reverse), _classNames)); return react_default.a.createElement('span', { className: pointClassName, style: style, key: point }); }); return react_default.a.createElement( 'div', { className: prefixCls + '-step' }, elements ); }; Steps_Steps.propTypes = { prefixCls: prop_types_default.a.string, activeDotStyle: prop_types_default.a.object, dotStyle: prop_types_default.a.object, min: prop_types_default.a.number, max: prop_types_default.a.number, upperBound: prop_types_default.a.number, lowerBound: prop_types_default.a.number, included: prop_types_default.a.bool, dots: prop_types_default.a.bool, step: prop_types_default.a.number, marks: prop_types_default.a.object, vertical: prop_types_default.a.bool, reverse: prop_types_default.a.bool }; /* harmony default export */ var common_Steps = (Steps_Steps); // CONCATENATED MODULE: ./node_modules/rc-slider/es/common/Marks.js var Marks_Marks = function Marks(_ref) { var className = _ref.className, vertical = _ref.vertical, reverse = _ref.reverse, marks = _ref.marks, included = _ref.included, upperBound = _ref.upperBound, lowerBound = _ref.lowerBound, max = _ref.max, min = _ref.min, onClickLabel = _ref.onClickLabel; var marksKeys = Object.keys(marks); var range = max - min; var elements = marksKeys.map(parseFloat).sort(function (a, b) { return a - b; }).map(function (point) { var _classNames; var markPoint = marks[point]; var markPointIsObject = typeof markPoint === 'object' && !react_default.a.isValidElement(markPoint); var markLabel = markPointIsObject ? markPoint.label : markPoint; if (!markLabel && markLabel !== 0) { return null; } var isActive = !included && point === upperBound || included && point <= upperBound && point >= lowerBound; var markClassName = classnames_default()((_classNames = {}, defineProperty_default()(_classNames, className + '-text', true), defineProperty_default()(_classNames, className + '-text-active', isActive), _classNames)); var bottomStyle = defineProperty_default()({ marginBottom: '-50%' }, reverse ? 'top' : 'bottom', (point - min) / range * 100 + '%'); var leftStyle = defineProperty_default()({ transform: 'translateX(-50%)', msTransform: 'translateX(-50%)' }, reverse ? 'right' : 'left', reverse ? (point - min / 4) / range * 100 + '%' : (point - min) / range * 100 + '%'); var style = vertical ? bottomStyle : leftStyle; var markStyle = markPointIsObject ? extends_default()({}, style, markPoint.style) : style; return react_default.a.createElement( 'span', { className: markClassName, style: markStyle, key: point, onMouseDown: function onMouseDown(e) { return onClickLabel(e, point); }, onTouchStart: function onTouchStart(e) { return onClickLabel(e, point); } }, markLabel ); }); return react_default.a.createElement( 'div', { className: className }, elements ); }; Marks_Marks.propTypes = { className: prop_types_default.a.string, vertical: prop_types_default.a.bool, reverse: prop_types_default.a.bool, marks: prop_types_default.a.object, included: prop_types_default.a.bool, upperBound: prop_types_default.a.number, lowerBound: prop_types_default.a.number, max: prop_types_default.a.number, min: prop_types_default.a.number, onClickLabel: prop_types_default.a.func }; /* harmony default export */ var common_Marks = (Marks_Marks); // CONCATENATED MODULE: ./node_modules/rc-slider/es/Handle.js var Handle_Handle = function (_React$Component) { inherits_default()(Handle, _React$Component); function Handle() { var _ref; var _temp, _this, _ret; classCallCheck_default()(this, Handle); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _ret = (_temp = (_this = possibleConstructorReturn_default()(this, (_ref = Handle.__proto__ || Object.getPrototypeOf(Handle)).call.apply(_ref, [this].concat(args))), _this), _this.state = { clickFocused: false }, _this.setHandleRef = function (node) { _this.handle = node; }, _this.handleMouseUp = function () { if (document.activeElement === _this.handle) { _this.setClickFocus(true); } }, _this.handleMouseDown = function () { // fix https://github.com/ant-design/ant-design/issues/15324 _this.focus(); }, _this.handleBlur = function () { _this.setClickFocus(false); }, _this.handleKeyDown = function () { _this.setClickFocus(false); }, _temp), possibleConstructorReturn_default()(_this, _ret); } createClass_default()(Handle, [{ key: 'componentDidMount', value: function componentDidMount() { // mouseup won't trigger if mouse moved out of handle, // so we listen on document here. this.onMouseUpListener = Object(addEventListener["a" /* default */])(document, 'mouseup', this.handleMouseUp); } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { if (this.onMouseUpListener) { this.onMouseUpListener.remove(); } } }, { key: 'setClickFocus', value: function setClickFocus(focused) { this.setState({ clickFocused: focused }); } }, { key: 'clickFocus', value: function clickFocus() { this.setClickFocus(true); this.focus(); } }, { key: 'focus', value: function focus() { this.handle.focus(); } }, { key: 'blur', value: function blur() { this.handle.blur(); } }, { key: 'render', value: function render() { var _ref2, _ref3; var _props = this.props, prefixCls = _props.prefixCls, vertical = _props.vertical, reverse = _props.reverse, offset = _props.offset, style = _props.style, disabled = _props.disabled, min = _props.min, max = _props.max, value = _props.value, tabIndex = _props.tabIndex, restProps = objectWithoutProperties_default()(_props, ['prefixCls', 'vertical', 'reverse', 'offset', 'style', 'disabled', 'min', 'max', 'value', 'tabIndex']); var className = classnames_default()(this.props.className, defineProperty_default()({}, prefixCls + '-handle-click-focused', this.state.clickFocused)); var positionStyle = vertical ? (_ref2 = {}, defineProperty_default()(_ref2, reverse ? 'top' : 'bottom', offset + '%'), defineProperty_default()(_ref2, reverse ? 'bottom' : 'top', 'auto'), defineProperty_default()(_ref2, 'transform', 'translateY(+50%)'), _ref2) : (_ref3 = {}, defineProperty_default()(_ref3, reverse ? 'right' : 'left', offset + '%'), defineProperty_default()(_ref3, reverse ? 'left' : 'right', 'auto'), defineProperty_default()(_ref3, 'transform', 'translateX(' + (reverse ? '+' : '-') + '50%)'), _ref3); var elStyle = extends_default()({}, style, positionStyle); var _tabIndex = tabIndex || 0; if (disabled || tabIndex === null) { _tabIndex = null; } return react_default.a.createElement('div', extends_default()({ ref: this.setHandleRef, tabIndex: _tabIndex }, restProps, { className: className, style: elStyle, onBlur: this.handleBlur, onKeyDown: this.handleKeyDown, onMouseDown: this.handleMouseDown // aria attribute , role: 'slider', 'aria-valuemin': min, 'aria-valuemax': max, 'aria-valuenow': value, 'aria-disabled': !!disabled })); } }]); return Handle; }(react_default.a.Component); /* harmony default export */ var es_Handle = (Handle_Handle); Handle_Handle.propTypes = { prefixCls: prop_types_default.a.string, className: prop_types_default.a.string, vertical: prop_types_default.a.bool, offset: prop_types_default.a.number, style: prop_types_default.a.object, disabled: prop_types_default.a.bool, min: prop_types_default.a.number, max: prop_types_default.a.number, value: prop_types_default.a.number, tabIndex: prop_types_default.a.number, reverse: prop_types_default.a.bool }; // EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/toConsumableArray.js var toConsumableArray = __webpack_require__("Gu7T"); var toConsumableArray_default = /*#__PURE__*/__webpack_require__.n(toConsumableArray); // EXTERNAL MODULE: ./node_modules/react-dom/index.js var react_dom = __webpack_require__("O27J"); var react_dom_default = /*#__PURE__*/__webpack_require__.n(react_dom); // EXTERNAL MODULE: ./node_modules/rc-util/es/KeyCode.js var KeyCode = __webpack_require__("opmb"); // CONCATENATED MODULE: ./node_modules/rc-slider/es/utils.js function isEventFromHandle(e, handles) { try { return Object.keys(handles).some(function (key) { return e.target === Object(react_dom["findDOMNode"])(handles[key]); }); } catch (error) { return false; } } function isValueOutOfRange(value, _ref) { var min = _ref.min, max = _ref.max; return value < min || value > max; } function isNotTouchEvent(e) { return e.touches.length > 1 || e.type.toLowerCase() === 'touchend' && e.touches.length > 0; } function getClosestPoint(val, _ref2) { var marks = _ref2.marks, step = _ref2.step, min = _ref2.min, max = _ref2.max; var points = Object.keys(marks).map(parseFloat); if (step !== null) { var maxSteps = Math.floor((max - min) / step); var steps = Math.min((val - min) / step, maxSteps); var closestStep = Math.round(steps) * step + min; points.push(closestStep); } var diffs = points.map(function (point) { return Math.abs(val - point); }); return points[diffs.indexOf(Math.min.apply(Math, toConsumableArray_default()(diffs)))]; } function getPrecision(step) { var stepString = step.toString(); var precision = 0; if (stepString.indexOf('.') >= 0) { precision = stepString.length - stepString.indexOf('.') - 1; } return precision; } function getMousePosition(vertical, e) { return vertical ? e.clientY : e.pageX; } function getTouchPosition(vertical, e) { return vertical ? e.touches[0].clientY : e.touches[0].pageX; } function getHandleCenterPosition(vertical, handle) { var coords = handle.getBoundingClientRect(); return vertical ? coords.top + coords.height * 0.5 : window.pageXOffset + coords.left + coords.width * 0.5; } function ensureValueInRange(val, _ref3) { var max = _ref3.max, min = _ref3.min; if (val <= min) { return min; } if (val >= max) { return max; } return val; } function ensureValuePrecision(val, props) { var step = props.step; var closestPoint = isFinite(getClosestPoint(val, props)) ? getClosestPoint(val, props) : 0; // eslint-disable-line return step === null ? closestPoint : parseFloat(closestPoint.toFixed(getPrecision(step))); } function pauseEvent(e) { e.stopPropagation(); e.preventDefault(); } function calculateNextValue(func, value, props) { var operations = { increase: function increase(a, b) { return a + b; }, decrease: function decrease(a, b) { return a - b; } }; var indexToGet = operations[func](Object.keys(props.marks).indexOf(JSON.stringify(value)), 1); var keyToGet = Object.keys(props.marks)[indexToGet]; if (props.step) { return operations[func](value, props.step); } else if (!!Object.keys(props.marks).length && !!props.marks[keyToGet]) { return props.marks[keyToGet]; } return value; } function getKeyboardValueMutator(e, vertical, reverse) { var increase = 'increase'; var decrease = 'decrease'; var method = increase; switch (e.keyCode) { case KeyCode["a" /* default */].UP: method = vertical && reverse ? decrease : increase;break; case KeyCode["a" /* default */].RIGHT: method = !vertical && reverse ? decrease : increase;break; case KeyCode["a" /* default */].DOWN: method = vertical && reverse ? increase : decrease;break; case KeyCode["a" /* default */].LEFT: method = !vertical && reverse ? increase : decrease;break; case KeyCode["a" /* default */].END: return function (value, props) { return props.max; }; case KeyCode["a" /* default */].HOME: return function (value, props) { return props.min; }; case KeyCode["a" /* default */].PAGE_UP: return function (value, props) { return value + props.step * 2; }; case KeyCode["a" /* default */].PAGE_DOWN: return function (value, props) { return value - props.step * 2; }; default: return undefined; } return function (value, props) { return calculateNextValue(method, value, props); }; } // CONCATENATED MODULE: ./node_modules/rc-slider/es/common/createSlider.js function noop() {} function createSlider(Component) { var _class, _temp; return _temp = _class = function (_Component) { inherits_default()(ComponentEnhancer, _Component); function ComponentEnhancer(props) { classCallCheck_default()(this, ComponentEnhancer); var _this = possibleConstructorReturn_default()(this, (ComponentEnhancer.__proto__ || Object.getPrototypeOf(ComponentEnhancer)).call(this, props)); _this.onMouseDown = function (e) { if (e.button !== 0) { return; } var isVertical = _this.props.vertical; var position = getMousePosition(isVertical, e); if (!isEventFromHandle(e, _this.handlesRefs)) { _this.dragOffset = 0; } else { var handlePosition = getHandleCenterPosition(isVertical, e.target); _this.dragOffset = position - handlePosition; position = handlePosition; } _this.removeDocumentEvents(); _this.onStart(position); _this.addDocumentMouseEvents(); }; _this.onTouchStart = function (e) { if (isNotTouchEvent(e)) return; var isVertical = _this.props.vertical; var position = getTouchPosition(isVertical, e); if (!isEventFromHandle(e, _this.handlesRefs)) { _this.dragOffset = 0; } else { var handlePosition = getHandleCenterPosition(isVertical, e.target); _this.dragOffset = position - handlePosition; position = handlePosition; } _this.onStart(position); _this.addDocumentTouchEvents(); pauseEvent(e); }; _this.onFocus = function (e) { var _this$props = _this.props, onFocus = _this$props.onFocus, vertical = _this$props.vertical; if (isEventFromHandle(e, _this.handlesRefs)) { var handlePosition = getHandleCenterPosition(vertical, e.target); _this.dragOffset = 0; _this.onStart(handlePosition); pauseEvent(e); if (onFocus) { onFocus(e); } } }; _this.onBlur = function (e) { var onBlur = _this.props.onBlur; _this.onEnd(); if (onBlur) { onBlur(e); } }; _this.onMouseUp = function () { if (_this.handlesRefs[_this.prevMovedHandleIndex]) { _this.handlesRefs[_this.prevMovedHandleIndex].clickFocus(); } }; _this.onMouseMove = function (e) { if (!_this.sliderRef) { _this.onEnd(); return; } var position = getMousePosition(_this.props.vertical, e); _this.onMove(e, position - _this.dragOffset); }; _this.onTouchMove = function (e) { if (isNotTouchEvent(e) || !_this.sliderRef) { _this.onEnd(); return; } var position = getTouchPosition(_this.props.vertical, e); _this.onMove(e, position - _this.dragOffset); }; _this.onKeyDown = function (e) { if (_this.sliderRef && isEventFromHandle(e, _this.handlesRefs)) { _this.onKeyboard(e); } }; _this.onClickMarkLabel = function (e, value) { e.stopPropagation(); _this.onChange({ value: value }); _this.setState({ value: value }, function () { return _this.onEnd(true); }); }; _this.saveSlider = function (slider) { _this.sliderRef = slider; }; var step = props.step, max = props.max, min = props.min; var isPointDiffEven = isFinite(max - min) ? (max - min) % step === 0 : true; // eslint-disable-line warning_default()(step && Math.floor(step) === step ? isPointDiffEven : true, 'Slider[max] - Slider[min] (%s) should be a multiple of Slider[step] (%s)', max - min, step); _this.handlesRefs = {}; return _this; } createClass_default()(ComponentEnhancer, [{ key: 'componentDidMount', value: function componentDidMount() { // Snapshot testing cannot handle refs, so be sure to null-check this. this.document = this.sliderRef && this.sliderRef.ownerDocument; var _props = this.props, autoFocus = _props.autoFocus, disabled = _props.disabled; if (autoFocus && !disabled) { this.focus(); } } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { if (get_default()(ComponentEnhancer.prototype.__proto__ || Object.getPrototypeOf(ComponentEnhancer.prototype), 'componentWillUnmount', this)) get_default()(ComponentEnhancer.prototype.__proto__ || Object.getPrototypeOf(ComponentEnhancer.prototype), 'componentWillUnmount', this).call(this); this.removeDocumentEvents(); } }, { key: 'getSliderStart', value: function getSliderStart() { var slider = this.sliderRef; var _props2 = this.props, vertical = _props2.vertical, reverse = _props2.reverse; var rect = slider.getBoundingClientRect(); if (vertical) { return reverse ? rect.bottom : rect.top; } return window.pageXOffset + (reverse ? rect.right : rect.left); } }, { key: 'getSliderLength', value: function getSliderLength() { var slider = this.sliderRef; if (!slider) { return 0; } var coords = slider.getBoundingClientRect(); return this.props.vertical ? coords.height : coords.width; } }, { key: 'addDocumentTouchEvents', value: function addDocumentTouchEvents() { // just work for Chrome iOS Safari and Android Browser this.onTouchMoveListener = Object(addEventListener["a" /* default */])(this.document, 'touchmove', this.onTouchMove); this.onTouchUpListener = Object(addEventListener["a" /* default */])(this.document, 'touchend', this.onEnd); } }, { key: 'addDocumentMouseEvents', value: function addDocumentMouseEvents() { this.onMouseMoveListener = Object(addEventListener["a" /* default */])(this.document, 'mousemove', this.onMouseMove); this.onMouseUpListener = Object(addEventListener["a" /* default */])(this.document, 'mouseup', this.onEnd); } }, { key: 'removeDocumentEvents', value: function removeDocumentEvents() { /* eslint-disable no-unused-expressions */ this.onTouchMoveListener && this.onTouchMoveListener.remove(); this.onTouchUpListener && this.onTouchUpListener.remove(); this.onMouseMoveListener && this.onMouseMoveListener.remove(); this.onMouseUpListener && this.onMouseUpListener.remove(); /* eslint-enable no-unused-expressions */ } }, { key: 'focus', value: function focus() { if (!this.props.disabled) { this.handlesRefs[0].focus(); } } }, { key: 'blur', value: function blur() { var _this2 = this; if (!this.props.disabled) { Object.keys(this.handlesRefs).forEach(function (key) { if (_this2.handlesRefs[key] && _this2.handlesRefs[key].blur) { _this2.handlesRefs[key].blur(); } }); } } }, { key: 'calcValue', value: function calcValue(offset) { var _props3 = this.props, vertical = _props3.vertical, min = _props3.min, max = _props3.max; var ratio = Math.abs(Math.max(offset, 0) / this.getSliderLength()); var value = vertical ? (1 - ratio) * (max - min) + min : ratio * (max - min) + min; return value; } }, { key: 'calcValueByPos', value: function calcValueByPos(position) { var sign = this.props.reverse ? -1 : +1; var pixelOffset = sign * (position - this.getSliderStart()); var nextValue = this.trimAlignValue(this.calcValue(pixelOffset)); return nextValue; } }, { key: 'calcOffset', value: function calcOffset(value) { var _props4 = this.props, min = _props4.min, max = _props4.max; var ratio = (value - min) / (max - min); return ratio * 100; } }, { key: 'saveHandle', value: function saveHandle(index, handle) { this.handlesRefs[index] = handle; } }, { key: 'render', value: function render() { var _classNames; var _props5 = this.props, prefixCls = _props5.prefixCls, className = _props5.className, marks = _props5.marks, dots = _props5.dots, step = _props5.step, included = _props5.included, disabled = _props5.disabled, vertical = _props5.vertical, reverse = _props5.reverse, min = _props5.min, max = _props5.max, children = _props5.children, maximumTrackStyle = _props5.maximumTrackStyle, style = _props5.style, railStyle = _props5.railStyle, dotStyle = _props5.dotStyle, activeDotStyle = _props5.activeDotStyle; var _get$call = get_default()(ComponentEnhancer.prototype.__proto__ || Object.getPrototypeOf(ComponentEnhancer.prototype), 'render', this).call(this), tracks = _get$call.tracks, handles = _get$call.handles; var sliderClassName = classnames_default()(prefixCls, (_classNames = {}, defineProperty_default()(_classNames, prefixCls + '-with-marks', Object.keys(marks).length), defineProperty_default()(_classNames, prefixCls + '-disabled', disabled), defineProperty_default()(_classNames, prefixCls + '-vertical', vertical), defineProperty_default()(_classNames, className, className), _classNames)); return react_default.a.createElement( 'div', { ref: this.saveSlider, className: sliderClassName, onTouchStart: disabled ? noop : this.onTouchStart, onMouseDown: disabled ? noop : this.onMouseDown, onMouseUp: disabled ? noop : this.onMouseUp, onKeyDown: disabled ? noop : this.onKeyDown, onFocus: disabled ? noop : this.onFocus, onBlur: disabled ? noop : this.onBlur, style: style }, react_default.a.createElement('div', { className: prefixCls + '-rail', style: extends_default()({}, maximumTrackStyle, railStyle) }), tracks, react_default.a.createElement(common_Steps, { prefixCls: prefixCls, vertical: vertical, reverse: reverse, marks: marks, dots: dots, step: step, included: included, lowerBound: this.getLowerBound(), upperBound: this.getUpperBound(), max: max, min: min, dotStyle: dotStyle, activeDotStyle: activeDotStyle }), handles, react_default.a.createElement(common_Marks, { className: prefixCls + '-mark', onClickLabel: disabled ? noop : this.onClickMarkLabel, vertical: vertical, marks: marks, included: included, lowerBound: this.getLowerBound(), upperBound: this.getUpperBound(), max: max, min: min, reverse: reverse }), children ); } }]); return ComponentEnhancer; }(Component), _class.displayName = 'ComponentEnhancer(' + Component.displayName + ')', _class.propTypes = extends_default()({}, Component.propTypes, { min: prop_types_default.a.number, max: prop_types_default.a.number, step: prop_types_default.a.number, marks: prop_types_default.a.object, included: prop_types_default.a.bool, className: prop_types_default.a.string, prefixCls: prop_types_default.a.string, disabled: prop_types_default.a.bool, children: prop_types_default.a.any, onBeforeChange: prop_types_default.a.func, onChange: prop_types_default.a.func, onAfterChange: prop_types_default.a.func, handle: prop_types_default.a.func, dots: prop_types_default.a.bool, vertical: prop_types_default.a.bool, style: prop_types_default.a.object, reverse: prop_types_default.a.bool, minimumTrackStyle: prop_types_default.a.object, // just for compatibility, will be deperecate maximumTrackStyle: prop_types_default.a.object, // just for compatibility, will be deperecate handleStyle: prop_types_default.a.oneOfType([prop_types_default.a.object, prop_types_default.a.arrayOf(prop_types_default.a.object)]), trackStyle: prop_types_default.a.oneOfType([prop_types_default.a.object, prop_types_default.a.arrayOf(prop_types_default.a.object)]), railStyle: prop_types_default.a.object, dotStyle: prop_types_default.a.object, activeDotStyle: prop_types_default.a.object, autoFocus: prop_types_default.a.bool, onFocus: prop_types_default.a.func, onBlur: prop_types_default.a.func }), _class.defaultProps = extends_default()({}, Component.defaultProps, { prefixCls: 'rc-slider', className: '', min: 0, max: 100, step: 1, marks: {}, handle: function handle(_ref) { var index = _ref.index, restProps = objectWithoutProperties_default()(_ref, ['index']); delete restProps.dragging; if (restProps.value === null) { return null; } return react_default.a.createElement(es_Handle, extends_default()({}, restProps, { key: index })); }, onBeforeChange: noop, onChange: noop, onAfterChange: noop, included: true, disabled: false, dots: false, vertical: false, reverse: false, trackStyle: [{}], handleStyle: [{}], railStyle: {}, dotStyle: {}, activeDotStyle: {} }), _temp; } // CONCATENATED MODULE: ./node_modules/rc-slider/es/Slider.js /* eslint-disable react/prop-types */ var Slider_Slider = function (_React$Component) { inherits_default()(Slider, _React$Component); function Slider(props) { classCallCheck_default()(this, Slider); var _this = possibleConstructorReturn_default()(this, (Slider.__proto__ || Object.getPrototypeOf(Slider)).call(this, props)); _this.onEnd = function (force) { var dragging = _this.state.dragging; _this.removeDocumentEvents(); if (dragging || force) { _this.props.onAfterChange(_this.getValue()); } _this.setState({ dragging: false }); }; var defaultValue = props.defaultValue !== undefined ? props.defaultValue : props.min; var value = props.value !== undefined ? props.value : defaultValue; _this.state = { value: _this.trimAlignValue(value), dragging: false }; warning_default()(!('minimumTrackStyle' in props), 'minimumTrackStyle will be deprecated, please use trackStyle instead.'); warning_default()(!('maximumTrackStyle' in props), 'maximumTrackStyle will be deprecated, please use railStyle instead.'); return _this; } createClass_default()(Slider, [{ key: 'componentDidUpdate', value: function componentDidUpdate(prevProps, prevState) { if (!('value' in this.props || 'min' in this.props || 'max' in this.props)) { return; } var _props = this.props, value = _props.value, onChange = _props.onChange; var theValue = value !== undefined ? value : prevState.value; var nextValue = this.trimAlignValue(theValue, this.props); if (nextValue !== prevState.value) { // eslint-disable-next-line this.setState({ value: nextValue }); if (isValueOutOfRange(theValue, this.props)) { onChange(nextValue); } } } }, { key: 'onChange', value: function onChange(state) { var props = this.props; var isNotControlled = !('value' in props); var nextState = state.value > this.props.max ? extends_default()({}, state, { value: this.props.max }) : state; if (isNotControlled) { this.setState(nextState); } var changedValue = nextState.value; props.onChange(changedValue); } }, { key: 'onStart', value: function onStart(position) { this.setState({ dragging: true }); var props = this.props; var prevValue = this.getValue(); props.onBeforeChange(prevValue); var value = this.calcValueByPos(position); this.startValue = value; this.startPosition = position; if (value === prevValue) return; this.prevMovedHandleIndex = 0; this.onChange({ value: value }); } }, { key: 'onMove', value: function onMove(e, position) { pauseEvent(e); var oldValue = this.state.value; var value = this.calcValueByPos(position); if (value === oldValue) return; this.onChange({ value: value }); } }, { key: 'onKeyboard', value: function onKeyboard(e) { var _props2 = this.props, reverse = _props2.reverse, vertical = _props2.vertical; var valueMutator = getKeyboardValueMutator(e, vertical, reverse); if (valueMutator) { pauseEvent(e); var state = this.state; var oldValue = state.value; var mutatedValue = valueMutator(oldValue, this.props); var value = this.trimAlignValue(mutatedValue); if (value === oldValue) return; this.onChange({ value: value }); this.props.onAfterChange(value); this.onEnd(); } } }, { key: 'getValue', value: function getValue() { return this.state.value; } }, { key: 'getLowerBound', value: function getLowerBound() { return this.props.min; } }, { key: 'getUpperBound', value: function getUpperBound() { return this.state.value; } }, { key: 'trimAlignValue', value: function trimAlignValue(v) { var nextProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; if (v === null) { return null; } var mergedProps = extends_default()({}, this.props, nextProps); var val = ensureValueInRange(v, mergedProps); return ensureValuePrecision(val, mergedProps); } }, { key: 'render', value: function render() { var _this2 = this; var _props3 = this.props, prefixCls = _props3.prefixCls, vertical = _props3.vertical, included = _props3.included, disabled = _props3.disabled, minimumTrackStyle = _props3.minimumTrackStyle, trackStyle = _props3.trackStyle, handleStyle = _props3.handleStyle, tabIndex = _props3.tabIndex, min = _props3.min, max = _props3.max, reverse = _props3.reverse, handleGenerator = _props3.handle; var _state = this.state, value = _state.value, dragging = _state.dragging; var offset = this.calcOffset(value); var handle = handleGenerator({ className: prefixCls + '-handle', prefixCls: prefixCls, vertical: vertical, offset: offset, value: value, dragging: dragging, disabled: disabled, min: min, max: max, reverse: reverse, index: 0, tabIndex: tabIndex, style: handleStyle[0] || handleStyle, ref: function ref(h) { return _this2.saveHandle(0, h); } }); var _trackStyle = trackStyle[0] || trackStyle; var track = react_default.a.createElement(common_Track, { className: prefixCls + '-track', vertical: vertical, included: included, offset: 0, reverse: reverse, length: offset, style: extends_default()({}, minimumTrackStyle, _trackStyle) }); return { tracks: track, handles: handle }; } }]); return Slider; }(react_default.a.Component); Slider_Slider.propTypes = { defaultValue: prop_types_default.a.number, value: prop_types_default.a.number, disabled: prop_types_default.a.bool, autoFocus: prop_types_default.a.bool, tabIndex: prop_types_default.a.number, reverse: prop_types_default.a.bool, min: prop_types_default.a.number, max: prop_types_default.a.number }; /* harmony default export */ var es_Slider = (createSlider(Slider_Slider)); // EXTERNAL MODULE: ./node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js var react_lifecycles_compat_es = __webpack_require__("R8mX"); // EXTERNAL MODULE: ./node_modules/shallowequal/index.js var shallowequal = __webpack_require__("Ngpj"); var shallowequal_default = /*#__PURE__*/__webpack_require__.n(shallowequal); // CONCATENATED MODULE: ./node_modules/rc-slider/es/Range.js /* eslint-disable react/prop-types */ var Range__trimAlignValue = function _trimAlignValue(_ref) { var value = _ref.value, handle = _ref.handle, bounds = _ref.bounds, props = _ref.props; var allowCross = props.allowCross, pushable = props.pushable; var thershold = Number(pushable); var valInRange = ensureValueInRange(value, props); var valNotConflict = valInRange; if (!allowCross && handle != null && bounds !== undefined) { if (handle > 0 && valInRange <= bounds[handle - 1] + thershold) { valNotConflict = bounds[handle - 1] + thershold; } if (handle < bounds.length - 1 && valInRange >= bounds[handle + 1] - thershold) { valNotConflict = bounds[handle + 1] - thershold; } } return ensureValuePrecision(valNotConflict, props); }; var Range_Range = function (_React$Component) { inherits_default()(Range, _React$Component); function Range(props) { classCallCheck_default()(this, Range); var _this = possibleConstructorReturn_default()(this, (Range.__proto__ || Object.getPrototypeOf(Range)).call(this, props)); _this.onEnd = function (force) { var handle = _this.state.handle; _this.removeDocumentEvents(); if (handle !== null || force) { _this.props.onAfterChange(_this.getValue()); } _this.setState({ handle: null }); }; var count = props.count, min = props.min, max = props.max; var initialValue = Array.apply(undefined, toConsumableArray_default()(Array(count + 1))).map(function () { return min; }); var defaultValue = 'defaultValue' in props ? props.defaultValue : initialValue; var value = props.value !== undefined ? props.value : defaultValue; var bounds = value.map(function (v, i) { return Range__trimAlignValue({ value: v, handle: i, props: props }); }); var recent = bounds[0] === max ? 0 : bounds.length - 1; _this.state = { handle: null, recent: recent, bounds: bounds }; return _this; } createClass_default()(Range, [{ key: 'componentDidUpdate', value: function componentDidUpdate(prevProps, prevState) { var _this2 = this; if (!('value' in this.props || 'min' in this.props || 'max' in this.props)) { return; } if (this.props.min === prevProps.min && this.props.max === prevProps.max && shallowequal_default()(this.props.value, prevProps.value)) { return; } var _props = this.props, onChange = _props.onChange, value = _props.value; var currentValue = value || prevState.bounds; if (currentValue.some(function (v) { return isValueOutOfRange(v, _this2.props); })) { var newValues = currentValue.map(function (v) { return ensureValueInRange(v, _this2.props); }); onChange(newValues); } } }, { key: 'onChange', value: function onChange(state) { var props = this.props; var isNotControlled = !('value' in props); if (isNotControlled) { this.setState(state); } else { var controlledState = {}; ['handle', 'recent'].forEach(function (item) { if (state[item] !== undefined) { controlledState[item] = state[item]; } }); if (Object.keys(controlledState).length) { this.setState(controlledState); } } var data = extends_default()({}, this.state, state); var changedValue = data.bounds; props.onChange(changedValue); } }, { key: 'onStart', value: function onStart(position) { var props = this.props; var state = this.state; var bounds = this.getValue(); props.onBeforeChange(bounds); var value = this.calcValueByPos(position); this.startValue = value; this.startPosition = position; var closestBound = this.getClosestBound(value); this.prevMovedHandleIndex = this.getBoundNeedMoving(value, closestBound); this.setState({ handle: this.prevMovedHandleIndex, recent: this.prevMovedHandleIndex }); var prevValue = bounds[this.prevMovedHandleIndex]; if (value === prevValue) return; var nextBounds = [].concat(toConsumableArray_default()(state.bounds)); nextBounds[this.prevMovedHandleIndex] = value; this.onChange({ bounds: nextBounds }); } }, { key: 'onMove', value: function onMove(e, position) { pauseEvent(e); var state = this.state; var value = this.calcValueByPos(position); var oldValue = state.bounds[state.handle]; if (value === oldValue) return; this.moveTo(value); } }, { key: 'onKeyboard', value: function onKeyboard(e) { var _props2 = this.props, reverse = _props2.reverse, vertical = _props2.vertical; var valueMutator = getKeyboardValueMutator(e, vertical, reverse); if (valueMutator) { pauseEvent(e); var state = this.state, props = this.props; var bounds = state.bounds, handle = state.handle; var oldValue = bounds[handle === null ? state.recent : handle]; var mutatedValue = valueMutator(oldValue, props); var value = Range__trimAlignValue({ value: mutatedValue, handle: handle, bounds: state.bounds, props: props }); if (value === oldValue) return; var isFromKeyboardEvent = true; this.moveTo(value, isFromKeyboardEvent); } } }, { key: 'getValue', value: function getValue() { return this.state.bounds; } }, { key: 'getClosestBound', value: function getClosestBound(value) { var bounds = this.state.bounds; var closestBound = 0; for (var i = 1; i < bounds.length - 1; ++i) { if (value >= bounds[i]) { closestBound = i; } } if (Math.abs(bounds[closestBound + 1] - value) < Math.abs(bounds[closestBound] - value)) { closestBound += 1; } return closestBound; } }, { key: 'getBoundNeedMoving', value: function getBoundNeedMoving(value, closestBound) { var _state = this.state, bounds = _state.bounds, recent = _state.recent; var boundNeedMoving = closestBound; var isAtTheSamePoint = bounds[closestBound + 1] === bounds[closestBound]; if (isAtTheSamePoint && bounds[recent] === bounds[closestBound]) { boundNeedMoving = recent; } if (isAtTheSamePoint && value !== bounds[closestBound + 1]) { boundNeedMoving = value < bounds[closestBound + 1] ? closestBound : closestBound + 1; } return boundNeedMoving; } }, { key: 'getLowerBound', value: function getLowerBound() { return this.state.bounds[0]; } }, { key: 'getUpperBound', value: function getUpperBound() { var bounds = this.state.bounds; return bounds[bounds.length - 1]; } /** * Returns an array of possible slider points, taking into account both * `marks` and `step`. The result is cached. */ }, { key: 'getPoints', value: function getPoints() { var _props3 = this.props, marks = _props3.marks, step = _props3.step, min = _props3.min, max = _props3.max; var cache = this._getPointsCache; if (!cache || cache.marks !== marks || cache.step !== step) { var pointsObject = extends_default()({}, marks); if (step !== null) { for (var point = min; point <= max; point += step) { pointsObject[point] = point; } } var points = Object.keys(pointsObject).map(parseFloat); points.sort(function (a, b) { return a - b; }); this._getPointsCache = { marks: marks, step: step, points: points }; } return this._getPointsCache.points; } }, { key: 'moveTo', value: function moveTo(value, isFromKeyboardEvent) { var _this3 = this; var state = this.state, props = this.props; var nextBounds = [].concat(toConsumableArray_default()(state.bounds)); var handle = state.handle === null ? state.recent : state.handle; nextBounds[handle] = value; var nextHandle = handle; if (props.pushable !== false) { this.pushSurroundingHandles(nextBounds, nextHandle); } else if (props.allowCross) { nextBounds.sort(function (a, b) { return a - b; }); nextHandle = nextBounds.indexOf(value); } this.onChange({ recent: nextHandle, handle: nextHandle, bounds: nextBounds }); if (isFromKeyboardEvent) { // known problem: because setState is async, // so trigger focus will invoke handler's onEnd and another handler's onStart too early, // cause onBeforeChange and onAfterChange receive wrong value. // here use setState callback to hack,but not elegant this.props.onAfterChange(nextBounds); this.setState({}, function () { _this3.handlesRefs[nextHandle].focus(); }); this.onEnd(); } } }, { key: 'pushSurroundingHandles', value: function pushSurroundingHandles(bounds, handle) { var value = bounds[handle]; var threshold = this.props.pushable; threshold = Number(threshold); var direction = 0; if (bounds[handle + 1] - value < threshold) { direction = +1; // push to right } if (value - bounds[handle - 1] < threshold) { direction = -1; // push to left } if (direction === 0) { return; } var nextHandle = handle + direction; var diffToNext = direction * (bounds[nextHandle] - value); if (!this.pushHandle(bounds, nextHandle, direction, threshold - diffToNext)) { // revert to original value if pushing is impossible bounds[handle] = bounds[nextHandle] - direction * threshold; } } }, { key: 'pushHandle', value: function pushHandle(bounds, handle, direction, amount) { var originalValue = bounds[handle]; var currentValue = bounds[handle]; while (direction * (currentValue - originalValue) < amount) { if (!this.pushHandleOnePoint(bounds, handle, direction)) { // can't push handle enough to create the needed `amount` gap, so we // revert its position to the original value bounds[handle] = originalValue; return false; } currentValue = bounds[handle]; } // the handle was pushed enough to create the needed `amount` gap return true; } }, { key: 'pushHandleOnePoint', value: function pushHandleOnePoint(bounds, handle, direction) { var points = this.getPoints(); var pointIndex = points.indexOf(bounds[handle]); var nextPointIndex = pointIndex + direction; if (nextPointIndex >= points.length || nextPointIndex < 0) { // reached the minimum or maximum available point, can't push anymore return false; } var nextHandle = handle + direction; var nextValue = points[nextPointIndex]; var threshold = this.props.pushable; var diffToNext = direction * (bounds[nextHandle] - nextValue); if (!this.pushHandle(bounds, nextHandle, direction, threshold - diffToNext)) { // couldn't push next handle, so we won't push this one either return false; } // push the handle bounds[handle] = nextValue; return true; } }, { key: 'trimAlignValue', value: function trimAlignValue(value) { var _state2 = this.state, handle = _state2.handle, bounds = _state2.bounds; return Range__trimAlignValue({ value: value, handle: handle, bounds: bounds, props: this.props }); } }, { key: 'render', value: function render() { var _this4 = this; var _state3 = this.state, handle = _state3.handle, bounds = _state3.bounds; var _props4 = this.props, prefixCls = _props4.prefixCls, vertical = _props4.vertical, included = _props4.included, disabled = _props4.disabled, min = _props4.min, max = _props4.max, reverse = _props4.reverse, handleGenerator = _props4.handle, trackStyle = _props4.trackStyle, handleStyle = _props4.handleStyle, tabIndex = _props4.tabIndex; var offsets = bounds.map(function (v) { return _this4.calcOffset(v); }); var handleClassName = prefixCls + '-handle'; var handles = bounds.map(function (v, i) { var _classNames; var _tabIndex = tabIndex[i] || 0; if (disabled || tabIndex[i] === null) { _tabIndex = null; } return handleGenerator({ className: classnames_default()((_classNames = {}, defineProperty_default()(_classNames, handleClassName, true), defineProperty_default()(_classNames, handleClassName + '-' + (i + 1), true), _classNames)), prefixCls: prefixCls, vertical: vertical, offset: offsets[i], value: v, dragging: handle === i, index: i, tabIndex: _tabIndex, min: min, max: max, reverse: reverse, disabled: disabled, style: handleStyle[i], ref: function ref(h) { return _this4.saveHandle(i, h); } }); }); var tracks = bounds.slice(0, -1).map(function (_, index) { var _classNames2; var i = index + 1; var trackClassName = classnames_default()((_classNames2 = {}, defineProperty_default()(_classNames2, prefixCls + '-track', true), defineProperty_default()(_classNames2, prefixCls + '-track-' + i, true), _classNames2)); return react_default.a.createElement(common_Track, { className: trackClassName, vertical: vertical, reverse: reverse, included: included, offset: offsets[i - 1], length: offsets[i] - offsets[i - 1], style: trackStyle[index], key: i }); }); return { tracks: tracks, handles: handles }; } }], [{ key: 'getDerivedStateFromProps', value: function getDerivedStateFromProps(props, state) { if ('value' in props || 'min' in props || 'max' in props) { var value = props.value || state.bounds; var nextBounds = value.map(function (v, i) { return Range__trimAlignValue({ value: v, handle: i, bounds: state.bounds, props: props }); }); if (nextBounds.length === state.bounds.length && nextBounds.every(function (v, i) { return v === state.bounds[i]; })) { return null; } return extends_default()({}, state, { bounds: nextBounds }); } return null; } }]); return Range; }(react_default.a.Component); Range_Range.displayName = 'Range'; Range_Range.propTypes = { autoFocus: prop_types_default.a.bool, defaultValue: prop_types_default.a.arrayOf(prop_types_default.a.number), value: prop_types_default.a.arrayOf(prop_types_default.a.number), count: prop_types_default.a.number, pushable: prop_types_default.a.oneOfType([prop_types_default.a.bool, prop_types_default.a.number]), allowCross: prop_types_default.a.bool, disabled: prop_types_default.a.bool, reverse: prop_types_default.a.bool, tabIndex: prop_types_default.a.arrayOf(prop_types_default.a.number), min: prop_types_default.a.number, max: prop_types_default.a.number }; Range_Range.defaultProps = { count: 1, allowCross: true, pushable: false, tabIndex: [] }; Object(react_lifecycles_compat_es["polyfill"])(Range_Range); /* harmony default export */ var es_Range = (createSlider(Range_Range)); // EXTERNAL MODULE: ./node_modules/antd/es/tooltip/index.js + 5 modules var tooltip = __webpack_require__("O6j2"); // EXTERNAL MODULE: ./node_modules/antd/es/config-provider/index.js + 1 modules var config_provider = __webpack_require__("PmSq"); // CONCATENATED MODULE: ./node_modules/antd/es/slider/index.js /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return slider_Slider; }); function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } 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; } function _extends() { _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; }; return _extends.apply(this, arguments); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } var __rest = this && this.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var slider_Slider = /*#__PURE__*/function (_React$Component) { _inherits(Slider, _React$Component); var _super = _createSuper(Slider); function Slider(props) { var _this; _classCallCheck(this, Slider); _this = _super.call(this, props); _this.toggleTooltipVisible = function (index, visible) { _this.setState(function (_ref) { var visibles = _ref.visibles; return { visibles: _extends(_extends({}, visibles), _defineProperty({}, index, visible)) }; }); }; _this.handleWithTooltip = function (_a) { var tooltipPrefixCls = _a.tooltipPrefixCls, prefixCls = _a.prefixCls, _b = _a.info, value = _b.value, dragging = _b.dragging, index = _b.index, restProps = __rest(_b, ["value", "dragging", "index"]); var _this$props = _this.props, tipFormatter = _this$props.tipFormatter, tooltipVisible = _this$props.tooltipVisible, tooltipPlacement = _this$props.tooltipPlacement, getTooltipPopupContainer = _this$props.getTooltipPopupContainer; var visibles = _this.state.visibles; var isTipFormatter = tipFormatter ? visibles[index] || dragging : false; var visible = tooltipVisible || tooltipVisible === undefined && isTipFormatter; return /*#__PURE__*/react["createElement"](tooltip["default"], { prefixCls: tooltipPrefixCls, title: tipFormatter ? tipFormatter(value) : '', visible: visible, placement: tooltipPlacement || 'top', transitionName: "zoom-down", key: index, overlayClassName: "".concat(prefixCls, "-tooltip"), getPopupContainer: getTooltipPopupContainer || function () { return document.body; } }, /*#__PURE__*/react["createElement"](es_Handle, _extends({}, restProps, { value: value, onMouseEnter: function onMouseEnter() { return _this.toggleTooltipVisible(index, true); }, onMouseLeave: function onMouseLeave() { return _this.toggleTooltipVisible(index, false); } }))); }; _this.saveSlider = function (node) { _this.rcSlider = node; }; _this.renderSlider = function (_ref2) { var getPrefixCls = _ref2.getPrefixCls; var _a = _this.props, customizePrefixCls = _a.prefixCls, customizeTooltipPrefixCls = _a.tooltipPrefixCls, range = _a.range, restProps = __rest(_a, ["prefixCls", "tooltipPrefixCls", "range"]); var prefixCls = getPrefixCls('slider', customizePrefixCls); var tooltipPrefixCls = getPrefixCls('tooltip', customizeTooltipPrefixCls); if (range) { return /*#__PURE__*/react["createElement"](es_Range, _extends({}, restProps, { ref: _this.saveSlider, handle: function handle(info) { return _this.handleWithTooltip({ tooltipPrefixCls: tooltipPrefixCls, prefixCls: prefixCls, info: info }); }, prefixCls: prefixCls, tooltipPrefixCls: tooltipPrefixCls })); } return /*#__PURE__*/react["createElement"](es_Slider, _extends({}, restProps, { ref: _this.saveSlider, handle: function handle(info) { return _this.handleWithTooltip({ tooltipPrefixCls: tooltipPrefixCls, prefixCls: prefixCls, info: info }); }, prefixCls: prefixCls, tooltipPrefixCls: tooltipPrefixCls })); }; _this.state = { visibles: {} }; return _this; } _createClass(Slider, [{ key: "focus", value: function focus() { this.rcSlider.focus(); } }, { key: "blur", value: function blur() { this.rcSlider.blur(); } }, { key: "render", value: function render() { return /*#__PURE__*/react["createElement"](config_provider["ConfigConsumer"], null, this.renderSlider); } }]); return Slider; }(react["Component"]); slider_Slider.defaultProps = { tipFormatter: function tipFormatter(value) { return value.toString(); } }; /***/ }), /***/ "IGcM": /***/ (function(module, exports, __webpack_require__) { var castPath = __webpack_require__("bIjD"), isArguments = __webpack_require__("1Yb9"), isArray = __webpack_require__("NGEn"), isIndex = __webpack_require__("ZGh9"), isLength = __webpack_require__("Rh28"), toKey = __webpack_require__("Ubhr"); /** * Checks if `path` exists on `object`. * * @private * @param {Object} object The object to query. * @param {Array|string} path The path to check. * @param {Function} hasFunc The function to check properties. * @returns {boolean} Returns `true` if `path` exists, else `false`. */ function hasPath(object, path, hasFunc) { path = castPath(path, object); var index = -1, length = path.length, result = false; while (++index < length) { var key = toKey(path[index]); if (!(result = object != null && hasFunc(object, key))) { break; } object = object[key]; } if (result || ++index != length) { return result; } length = object == null ? 0 : object.length; return !!length && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments(object)); } module.exports = hasPath; /***/ }), /***/ "IItY": /***/ (function(module, exports) { module.exports = "data:image/png;base64,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" /***/ }), /***/ "IM/B": /***/ (function(module, exports, __webpack_require__) { (function (factory) { true ? (module['exports'] = factory()) : typeof define === 'function' && define['amd'] ? define(factory()) : (window['stylisRuleSheet'] = factory()) }(function () { 'use strict' return function (insertRule) { var delimiter = '/*|*/' var needle = delimiter+'}' function toSheet (block) { if (block) try { insertRule(block + '}') } catch (e) {} } return function ruleSheet (context, content, selectors, parents, line, column, length, ns, depth, at) { switch (context) { // property case 1: // @import if (depth === 0 && content.charCodeAt(0) === 64) return insertRule(content+';'), '' break // selector case 2: if (ns === 0) return content + delimiter break // at-rule case 3: switch (ns) { // @font-face, @page case 102: case 112: return insertRule(selectors[0]+content), '' default: return content + (at === 0 ? delimiter : '') } case -2: content.split(needle).forEach(toSheet) } } } })) /***/ }), /***/ "IUBM": /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _rule = __webpack_require__("hGxU"); var _rule2 = _interopRequireDefault(_rule); var _util = __webpack_require__("eCjd"); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } function type(rule, value, callback, source, options) { var ruleType = rule.type; var errors = []; var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate) { if ((0, _util.isEmptyValue)(value, ruleType) && !rule.required) { return callback(); } _rule2['default'].required(rule, value, source, errors, options, ruleType); if (!(0, _util.isEmptyValue)(value, ruleType)) { _rule2['default'].type(rule, value, source, errors, options); } } callback(errors); } exports['default'] = type; /***/ }), /***/ "IUGU": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return PresetColorTypes; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__type__ = __webpack_require__("D+5j"); // eslint-disable-next-line import/prefer-default-export var PresetColorTypes = Object(__WEBPACK_IMPORTED_MODULE_0__type__["a" /* tuple */])('pink', 'red', 'yellow', 'orange', 'cyan', 'green', 'blue', 'purple', 'geekblue', 'magenta', 'volcano', 'gold', 'lime'); /***/ }), /***/ "IW3u": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; __webpack_require__("faxx"); var _row = _interopRequireDefault(__webpack_require__("FV1P")); __webpack_require__("tIHZ"); var _popover = _interopRequireDefault(__webpack_require__("tjvM")); __webpack_require__("JYrs"); var _col = _interopRequireDefault(__webpack_require__("QoDT")); __webpack_require__("Vg41"); var _badge = _interopRequireDefault(__webpack_require__("M4IF")); var _toConsumableArray2 = _interopRequireDefault(__webpack_require__("V4Os")); __webpack_require__("UQ5M"); var _message2 = _interopRequireDefault(__webpack_require__("/qCn")); var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); var _dva = __webpack_require__("S6G3"); var _utils = __webpack_require__("oAV5"); __webpack_require__("RKq/"); var _imInitialize = _interopRequireDefault(__webpack_require__("cLc/")); var _timJsSdk = _interopRequireDefault(__webpack_require__("B5T/")); var _CurrentConversation = _interopRequireDefault(__webpack_require__("lc4m")); var _events = _interopRequireDefault(__webpack_require__("TLe5")); var _dec, _class; /** * 会话列表 */ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } // 引入 EventEmitter' var ConversationList = exports.default = (_dec = (0, _dva.connect)(function (state) { return { conversationList: state.im.conversationList, currentConversation: state.im.currentConversation, nextReqMessageID: state.im.nextReqMessageID, isCompleted: state.im.isCompleted, currentMessageList: state.im.currentMessageList }; }), _dec(_class = /*#__PURE__*/function (_Component) { function ConversationList(props) { var _this; (0, _classCallCheck2.default)(this, ConversationList); _this = _callSuper(this, ConversationList, [props]); _this.state = { visible: props.visible, clicked: false, hovered: false, conversationID: props.currentConversation.conversationID }; return _this; } (0, _inherits2.default)(ConversationList, _Component); return (0, _createClass2.default)(ConversationList, [{ key: "componentDidMount", value: function componentDidMount() { // this.selectConversation(this.props.conversationID) } }, { key: "componentWillReceiveProps", value: function componentWillReceiveProps(nextProps) { if (this.state.conversationID !== nextProps.currentConversation.conversationID) { this.setState({ conversationID: nextProps.currentConversation.conversationID }); } // this.setState({ // visible: nextPsrops.visible, // conversationID: nextProps.conversationID // }); } }, { key: "getDate", value: function getDate(data) { var date = new Date(data * 1000); if ((0, _utils.isToday)(date)) { return (0, _utils.getTime)(date); } return (0, _utils.getDate)(date); } //切换会话 }, { key: "selectConversation", value: function selectConversation(conversationID) { var _this2 = this; // 1.切换会话前,将切换前的会话进行已读上报 if (this.props.conversationID) { _imInitialize.default.setMessageRead({ conversationID: this.props.conversation && this.props.conversation.conversationID // conversationID: this.props.conversationID }); } // 2.待切换的会话也进行已读上报 _imInitialize.default.setMessageRead({ conversationID: conversationID }); this.props.dispatch({ type: 'im/totalUnreadCount', payload: '' }); // 3. 获取会话信息 return _imInitialize.default.getConversationProfile(conversationID).then(function (_ref) { var data = _ref.data; // // 3.1 更新当前会话 _this2.props.dispatch({ type: "im/updateCurrentConversation", payload: data.conversation }); _events.default.emit('changeImStatus', true); // 3.2 获取消息列表 _this2.getMessageList(conversationID); return Promise.resolve(); }, function (err) { _message2.default.error(err.toString()); }); } }, { key: "getMessageList", value: function getMessageList(conversationID) { var _this3 = this; if (this.props.isCompleted) { _message2.default.info('没有更多的历史消息了'); return; } var _this$props = this.props, nextReqMessageID = _this$props.nextReqMessageID, currentMessageList = _this$props.currentMessageList; _imInitialize.default.getMessageList({ conversationID: conversationID, nextReqMessageID: nextReqMessageID, count: 15 }).then(function (imReponse) { // 更新messageID,续拉时要用到 _this3.props.dispatch({ type: 'im/updateCurrentConversationCont', payload: { nextReqMessageID: imReponse.data.nextReqMessageID, isCompleted: imReponse.data.isCompleted, currentMessageList: [].concat((0, _toConsumableArray2.default)(imReponse.data.messageList), (0, _toConsumableArray2.default)(currentMessageList)) // 更新当前消息列表,从头部插入 } }); }); } // setConversationId(index) { // this.setState({ // ['popClickeState' + index]: true // }); // } }, { key: "render", value: function render() { var _this4 = this; return /*#__PURE__*/_react.default.createElement(_row.default, { className: "list-container", style: { display: this.state.visible ? 'block' : 'none' } }, this.props.conversationList.map(function (item, index) { var showPopClickeState = false; if (_this4.state.conversationID === item.conversationID) { // this.setState({ // ['popClickeState' + index]: true // }); showPopClickeState = true; } if (item.type === '@TIM#SYSTEM') { return ''; } // const date = this.getDate(item.lastMessage.lastTime); var avatar = ''; var name = ''; // let letShowCovId = false; if (item.type === 'C2C') { avatar = item.userProfile.avatar; name = item.userProfile.nick; } else if (item.type === 'GROUP') { name = item.groupProfile.name; avatar = __webpack_require__("0gU3"); } //单人 // if (this.state.conversationID === item.conversationID) { // letShowCovId = true; // this.setConversationId(index); // } return ( /*#__PURE__*/ // //
    {name}
    // {/*
    s
    */} //
    // } // trigger="hover" // visible={this.state['hovered' + index]} // onVisibleChange={visible => { // this.setState({ // ['hovered' + index]: visible // // clicked: false // }); // }} // > _react.default.createElement(_popover.default, { key: index, placement: "left", visible: // this.state.conversationID === item.conversationID // ? true // : // showPopClickeState?showPopClickeState:this.state['popClickeState' + index] showPopClickeState, onVisibleChange: function onVisibleChange(visible) { // this.setState({ // conversationID: item.conversationID // }); // this.setState({ // ['popClickeState' + index]: visible // // hovered: false // }); }, content: /*#__PURE__*/_react.default.createElement(_CurrentConversation.default, { key: index, visible: _this4.state.visible, closeClick: function closeClick() { // this.props.closeClick(); // this.setState({ // conversationID: null, // ['popClickeState' + index]: false // }); // this.setState({ conversationID: null }, () => { // }); } }), trigger: "click" }, /*#__PURE__*/_react.default.createElement(_col.default, { span: 6, key: item.conversationID, onClick: function onClick() { _this4.selectConversation(item.conversationID); // this.setState({ // conversationID: item.conversationID // }); }, className: "avatar" }, /*#__PURE__*/_react.default.createElement("div", { style: { display: 'flex', flexDirection: 'column', alignItems: 'center' } }, item.type === 'C2C' ? avatar ? /*#__PURE__*/_react.default.createElement("img", { className: "avatar-header", src: avatar }) : /*#__PURE__*/_react.default.createElement("span", { className: "avatar-header span-header" }, name.substring(name.length - 2, name.length)) : /*#__PURE__*/_react.default.createElement("img", { className: "avatar-header", src: __webpack_require__("PgSr") }), /*#__PURE__*/_react.default.createElement("span", { className: "name" }, name)), /*#__PURE__*/_react.default.createElement(_badge.default, { count: item.unreadCount, showZero: false }))) // ); })); } }]); }(_react.Component)) || _class); /***/ }), /***/ "IXBG": /***/ (function(module, exports, __webpack_require__) { var map = { "./attendance.png": "1+y7", "./attendancePoint.png": "6Mj6", "./back.png": "lNEh", "./dep.png": "aX42", "./errorReport.png": "LK1H", "./errorTime.png": "rm0p", "./errorTimeReport.png": "1Bek", "./event-jd.png": "EYLL", "./event-list-click.png": "hwng", "./event-list.png": "Wny5", "./event-module-click.png": "nxuO", "./event-module.png": "kDXx", "./event-td.png": "pBGO", "./event-yb.png": "Vp7n", "./event-zd.png": "MIZS", "./float-check.png": "Pe7w", "./float.png": "wEcu", "./magnify-check.png": "9rO7", "./magnify.png": "IqXq", "./minimize-check.png": "TGlF", "./minimize.png": "qEAy", "./nextDep.png": "BUm/", "./nowError.png": "BJ3c", "./perception.png": "Q+cA", "./recording.png": "RMDC", "./searchAddress.png": "6upA", "./security.png": "dDE8", "./securityCompany.png": "0vbU", "./securityResource.png": "V8Q4", "./securityResourceChecked.png": "vD6o", "./setting-click.png": "CF3O", "./setting.png": "X/W6", "./time.png": "R07g", "./todayError.png": "IldK" }; function webpackContext(req) { return __webpack_require__(webpackContextResolve(req)); }; function webpackContextResolve(req) { var id = map[req]; if(!(id + 1)) // check for number or string throw new Error("Cannot find module '" + req + "'."); return id; }; webpackContext.keys = function webpackContextKeys() { return Object.keys(map); }; webpackContext.resolve = webpackContextResolve; module.exports = webpackContext; webpackContext.id = "IXBG"; /***/ }), /***/ "IZEb": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAAAXNSR0IArs4c6QAAGqBJREFUeAHtXWuMJFd1PvfeenTPa3fWzIb1AxswCx4bHMUYC2TCAg4EjAIibAIST6FIgQQIARMZkoxXAQEhP0ICIgSUBDAEWKIoARQMAQbCG69lg3fsODYYYzLgsXe88+pHVd2b77vVNV093T3T0zP2rhVq5anqetw656tzzj333HOulZyizTmner36yJEjPc8X987MzLjiuLxXSvU8X77ngTjelNjdfGEZsDZIM/4Vx6ePtug43PHKhblZf35q+tAGcI76+y6cO9w6f8T/LoP7YAH6gAJYgNYbsMOSA3RIDh441qLjElmcn2sdT3eAKTLnf08emAZox/zxbfOX4HhWcoCPSj9AH0gwdx3AAjRymAM3I7mEdQK2OF/Fu6dlZd/tqnYi8HRMTeR7PltfMh20VSaydSlcWEr9cXVf6sZOnI/jOZk8UHO9AT0iD6RkBiR2N7YCuLK0HZ+e9iAszB1WuZTtVwTstvkzFMGqL82rrDGuolGR5ohWjRWlkprOgdvXSdXKifx3WLVOppyL1qzLGgBa5l1lYgLgjbjqvtsB6H43uXgMvw+7416Ip/Eh+az/I6DTN7RbUpkTm9M21N8COD5clriFuSm0TfUUtTgvakHu1DloRjVGtapYo5OqVsmaUrFb1mkDwE1MSFpXKmuuqPGxsQ56lldWxERjLqgAgaUlCWLrGmrchiPOhTXr6jqz8aoFmJmjhE7JeXbygABIAWJU8wWXq/juSuSOACzAKwMnQlUVSJyonzZu11TPcYl1AdqaW9Jj8T5Vc1o3llZ1NVKqieM4BHCJUjYQvyd6Nqx7+nRS8WJjQud0Ko77RgIpVNbWms7FE6O2iuOVxgk3oiZsAeayNCzV/Jz4fEsgp6YJZmEr20DuRBqHBrAbPEhZC7hC4gjcsgS6KkbXZEnHOI7G9uiGW9OqaUzilA6koW1QVYHL9zYVZU1DhZnqoC0xAC+LHR4AiDWXqtj6vcQ2VM66KMtiNWKbKydtQ1JblQlbk8yO45hAliWSQF44RzB3DuK2bWA3cNMAblYdXBwHw1XYtxGvqlFW1elqaPbu0Xq5tmqqUtEqMGa13jQ6sCbQsZa0aZyEOksyLVGoXZIpq0WFSagy00R7UUuNmxIkkUtM5lwizkIEs2ZmlYRWAJIyQC9L7GrazCojcVZNg6wpNbu3Opo1ThobjepMzN2gjaq9ZicXa25WliGR066wj+DLv2u70tjxlVvU9t11g3cU4E1BXQ+tq2s0WjW0b0u1FWOi0JgwMJQ2HWjTMNpIrRko7BX+6TQ1aVAdMbb5a5moC+EKnyeizgUrZyhxo/C1R0gMfOQ1J2oVxN4n4n4CF/xOI+54pqMbgrS2ZoMgc/6fzaQapXFmM5vajFKZJWmWNZNsojqWUbWbq7WsrdazALHbNm4HxIEB7AYvV9kpmdMr+6bVWHq3XliKTVBZNqYeGR0FxrogIHDONgMnJoASBolWVMYpiN/zlFPPAEgXAZSw71fb9IKC1XQ3O+W+YiX4HCzoQojOGftUSZYqHaUEUqs0tU0AWWlmaX08m5poZCvB2XbsxJxbkGm7E5UeCMDNwFuQEU1bp6qhyaXuDAhHDWCZQComCJOEpp+WK8iUuwx4vALa8mSAtm3zsSmWolJYzW/jno8Yp74LS4rfNk3CMJE6wFQZrGs1zZr3eWl0tSTLbeOa3QmIWwLYHzzRdE2osga2TscrkLgooNQRMAvlzUi+zsJUhU+Ger7WifvVzUHYnatK1I1Oy/sDm3wnsSbhZ9RQZgJKaUQPltrGWJaNJhlVmh3MAjr9YSRxIADbboooOKl6cf4S79d58OLQ2BNrgRsNA1j3IAO1lLrUZZE21QNpml0Fe/bs3YFme63Abl4XBOY9NqvNw/A2KY0GX1VpSORqkup9I2nWaIM4eeCYW5y8xJZ76K3s4aYAUvrK4NFNmZKS5BG8NIAdr0NNDUQvjTJInnEmSrU9JFa9E6ra6RFvD4NduFutiHZXB1bPZnDRDbsVFTSp0kG1kugAn7gEYi9J3AxE3Y/CQnVF8rFsDt5cW21L4EVBEGqTxegnYjgZlVS5Vyur3nvqwSN3boy0kCbSRhpJK2nmh6cAGPBCbfKjJXSK5DUfv894eNpYdKPVUwKLByh9HM/SVZmS/QBvJLd5G8CDnYk0pA9COGbT7BrYuiu7X3Xqz8A2fl4H5hoI34qFFMI+N5tpmnRLIjuWe2AT6eLMuSIY0UsS+wJYqO6szOrczxMdnJg3qcSBlbUgDaOQX5HgiU5jV3cPh0/8XoD/+FMPVX8KAMIPJbFvUBX1c7FBYx3EpJloGUkxMkrTfQeyc2LB8G/WHZJDcNbzEUsvALtUuJC+XHU5ph33TjL9PLoq7G19hwFxS2yaS56VsYcCeITVf2B+aNBMrSEPtN/kibyRR/LKcTx5Pz4tELL+qtwFIF+Sqy5HGYykVOEkV7yTTD+Prgp7W3YYGp2F0gbfSs2c7pJHvorN0wqaSTt5IC/kibyRRw4IyDN5L+xhrpFFC+19hzOLhlsqnSOeR1SmEbP7heYIw9kpANjwrooyEgpcFfj9r8J3PS1tXpvN7iPa6SSzt2PE8g9iwBbw85Ge6Ayr9II7mY06s2/aHowhRFJMHXgJhia351+6JLBT+sQP0Ti25fAsH2FoP7qgq4JR/CEg/rpu8h4aZ0g7eSAv7RFTLSCv5Jmq7CNLrV65lxSuA1iWvjxAkAdBT2ahDwxwbEtbwREGneRUuzMxln0HvuR6Gw8N2NpUknbyQF7IE3kjj+SVqkze6dpQE/MAcbct7GC+kD5GkmlEOcblMI1RFQ7ROLbl8CzQFaivexN9rDY5D9Uj8ABeyBN5I4/k1UeSwDsxIBbEhL7hRinssIFFb0PEb8PgRxAAZTwPPrvRVhsv5tqGmTOXIRz5rN2C7JkXRvLl480tm3vcgUCe8IhAzhjPv/u9y1Z+eFcqt86nWz676Q3gBZHGf4FL8y2VuAy+Yob4m4mrOrv/ZKDlRGCJSdkWFu2tA5hLH53mwwBOfBg+RSSZwdDAxQZRdwQJHCwtopjOvbZoYKf76bMCedXTRmSt4eQ7tyNa2qPBKy6K5OWXj8hZ+0yPqyLz92fyj19bG+gj9GwAJz1PWn9fI97trA5UarLlhIHgKmYZYtpCu4C5HUghvBQ/xepJ9Z+ybf8O+zla6j3nMBiGjwCij+lJ4kNSkMpLIfIX9yNku+fPQfRr74iWR+0PJNiAD+fn/uwFY3L1b433BY/vO7DXyFufPy4zLxyDm79dClr3gyfIx5MYdnPglTyTd2JALHJbyPnrfPK/wKz0upnWRPd+P+XYSAzoD3wYvq41jB+lL4X0mZcPSWLPx677QUNGIiX/en296zomML16HpqOu671OvHrj4t9W1d/ahkS1euOzc+hU3mZ1dn3KIWMnleUMXEzyGL0yHsmAuv9wnlmS8yst54bE7SbD54PYaI7wnytUZw94wRQvZmH4RlJtmKmoGMMiu7q1gu8Z8AujsZKjn63Lh/88urA73vioyJ56eXVge/vuBG8kUfyyqkH8k4MiAUxITZFZ1I855UGjqFemJpSZwd1/YuFMS2jkR6Nxk3d1jHJmEaigsgpTHo5Dfl1Tyke3un+cWcGwo5g4zY5quQ9L9kjlz46lK/d0pQbf5JKvemE4Ayysd0v3FSXWjLI3R33QKDUfeD5BxpBQ20Sa1WaAQu71BCX1jJ38MAdrl5ddHOf+YzMzs46XegydZsiyslvOpGct+VkUOAw+80pIKgxXvX0jtft8MdTH9sbkCsuijE3pOSCM0N594vHvVp+ehuSWAmVsI0ht6eTV/LseQcGxGKiqjw2xKhsB1sqXNi/aZ+TwowBTnpz3raJqUfOnmkbj0B9N2b8DEmjyMVwR154aUUeObWh50CLlz6qPcd0wVkA8SVtEP/+K4Op82Xn9/44WxIMHskreSbvxMBjAUzyfJ3pVl8x45tat4HUbeatsMdhugUzBjjpbQSyLIgbYOoR6tvmbEtK+t/wmitG5F0vnpAIrub7XrlHXvPMEWGPW2xnTXaCOl0C8VPfqcsgIB7YW2KtaHigvQvJK3km78SAWBATYkOMiFWx+bewA2HyT5ElxVwVplswYwBTWRpTkBphhguKh3a6/8B/rskfX7uEKXEnf/nZFfnAl9c6ek2q78aNIL4L6lyFYBHED20hieyAht3IK3km78TAp54AE7ZHjIhV3ulifqP9kkv8IbOkmOjDXBWmWzBglYVKI2R1bvvenR/d8r+pfPaGhnzt1u4RyOJqd8fCN154Nm3ihAfxk1uAeBJT8UNv4JU8k3diQCyICbHJ28yx4nEJQBF2IBNIMWOWVJ7oU1WcpjZN3KfkEUMT1OfBz9/Y7fvx1v/5edbniRzEd/3uhGA0LpuB+KN7djC8A6/k2U/RQwKJBTEhNsSoTJzJXZjXqvqP57TEsa6vRjCcxkiQBS4zodWwe8onqbwaD+5q8GBxtbeU3HRXApcllH3wqHpt+/cYdEKhzN7SkBsxFm4mTi55ZGen8clv1+WOe/p/iF7trp9TYmGUP2mhjEjWwYjWYi4PeQENZ6M4sfX77kaO4iG4Mkc6JbBogPl5XgJbWVIIWOETqCG906LVrfe0b095TCjLdSdXfWJJ7vhFfym66BzaxJIkfrXdO9+zlMlX55B9OeRGXskzM8SYKUYsiEmv5kqfOHdhBJmhRXJj3oBAjTEp6MQn+vRqZDfORRhUvuPwhBx50bg8+/GxLNWcvHkLEB8PEN9ZqDMk7kMtEN/3xVVJhhQ+8kJeybNFN1yk2XlMgE3hyhQ8lwAsTuX7IrmRv0IpDZk7b9uVXwZUXPPb43LxuSE0R8mbnzfaAeJm9uwJUOUyiK/7yEn55m3bH4JsZKTMcxmLjff1BXDjjeBrbeO53fhNvXjb88fkske3bVgB4rNKknjnQn91Joh//sJxT87cz/rfNyi92+G1L4BFWi1fmgjyajEhMigB27nvTVeOytMu6B52EcSrIIkEkS7Jmz6+JL1AvB8uz78dq8tffW7Fv3bocFaJaPJKnoutjEVxrtiXdHNOmO3ObPhlQTpJEAnTagNmhGISU1KFK5g838WNI5LnXFzp22IBIm/44g8b8nsfPilnTmrhSIU2jv7ijxc6jd3hy6py7Td3+K2dOqHAM/pfx+Q8wSuY5F6VGBih3GKJAdV8VNtTApkN7xO6kZNMEJUVB4G4qy+nQ1x4+VOr8qInbd2xE8Q3PmdU9k/Al4fXc/cJK9+9I5Eb7ky6wGMvzjAYbepONvJKnou8bD/VBEx6tanzvI+jKFRhBRA6DNRhsJSA6Pu0SDSkMWGAhMVdA/BFT6rIK546WKe+2rDytk8vyz1LvUcnBVPnISjByPW5DwvkqivH5BGIdA+9gVfyrMm7T2pHNigw8TUqaDTH6qgv4On4VqyvWBoDWKjD8BKIbHgm5GYRBnKibx2aoNKDz704ltdcMVo60/9wAf7cGz665KWt/12I4OHiBYgBnr0vZ4dq/piHDw8gefU8g3dWAhALYkJsiiqpgp6SDTyGc2cIK4BYxFJHHYYysWU2fIBYDP7cKNbCPxg+IvO0CyJ543MHA49O9FsRmr93ZXPJIyNUnf+4qSHX/yiRv33lhLzln5ekPrQng3k5rW80SFtILUYkIcBIElfBzgGbfOROrPLNfzJW8LDOjNnrPM0KIBaxEH1IsEUCt1VJowbbcEvruW3vzn2YkT953pj387Z6+PofNeWPPrY0EHjlthYQ3f73Y40dgMeKALmFvJJn8k4MiAUx4buIEbHKq546ggmzwsI9lkuxfIoVQEhlQ90A0m6kydwRdD/u62WCt3P8gidWBFGNLR/5wg/q8lbYvDWE8IfZPvGtnfXA5JG8kmfyTgyIBTEhNnlx4+w6aS0beKRVMkpXJvO1ZyyfYgVQFETQYYBnEJsIouvwjTr9hvWmNj84c4AA50e+vibv+dwq4oSbt/XAXVWeR/JKnsk7MfBYoB4vrxida2F1xJMBL6HINGJPXPNGkgUprD1joUqq8CSLWKxFlUJyL0T8e8Mw8LPF/qikkG0GVj/6jZ1JzzB0lZ8hb+SRvJJnzzswIBbEhB0IMWK9HTdi5yWwSGEt7CBFlYV7rD1D/iGagjRLgBl7RsjUJ8ovHeSYijsFP67XRjeFKnsdHOVTvZE38uh59dVOka+/81gAk8L+kc4Cs3WucqNIO9j0osqqRxbuVaK8fMpXAAk6JuVuwPM3b4fZ1//mKMJUkfzXrQ256962BWBn8Yf/tCTHfjx0l7kdMra692byhlAgswd8yRh5JwbEgupLbFg6W3QgbLDkxtAOzrSKlUdcNIq6MlY9onAvNgYVfShSsQG6eHROYj6M8c1fb0VRcf0WDvBdXd57XR6z2zuipIlTw3YURbu7uUcM8MOIYyXkUWFKLkZNhEOpHSs/MZKwS1Dfg1TfyUNO5mj/ZvzrvQSW7SDVmJU7VGOWjDZh0llvhspIFqKiBs2mzjW/D+/1K4MywHFsAR6fuR/BgdMJPPICn+P75C3nMfQ1duSdGBALYkJsyvaPvKz7FZxgR+mnT6qeXBR92zwKImU02LsnDNbSRmRsGMG2VmBgKy5AAqcEZ0uWXQsffTDPmG87DTd0HKtI8X0pZuHuRhJCHXOQTAWqZzppjgRx8/6TCXRlNT144LxscVJ8FdPMDGMDeee7bgNz3iiaR4XV3TSYLFZunARsKBmlFLJUirVnGjEaOJs/x/TfX0D0+3evpyFgZZJIu+cBvJAn8kYeySt5Ju/EIO88OOBh70uM2luHBPI0pbCoDaEUsoIHBXlhNaqEDUgh8rRiuNkYWgeo+tEVydTLkF33++0mH0pH+u/EuI9BU7FSA1drqNZtljZiSF+tWU/Ae8JiREpfUTNC6SOHXRJYnCDCrNChFFLv9yDBhsXKrLdlfRmrHlm4F4hpGmWZu/VxtPbFhxJsnlbQTNrJA3khT3lFZ+Zri8kzec9tH9dbWABwufS1sSrZQDZaJBqVbeFPG6JR5hDYbBX1IVMIMzaiJA4iVIz6ujgkZVcQXhjXmfobPJ9HGU9zNAHAnDXu9SqRZQhFHQkIdZSINMJG2sRaDE3kqqXajKYm/pWUFUtl20fWygB22MD2hbYtZFU3vwQrvVmszHpbloyy6hEJTE1U9DdQHL6iRV9Nwk5z7Mg8JsD11aSZtJMHzwt4Im/kkbySZ/JOTSzbvjZGOafrNrBgvFsKjyFLfQ9qJiq6kVSCzK4FSRCHaSOv0GSlj0MVJFIMYwQNxxG6eQva+o2ivdNs/yWEl94dZrICmhuguW4x42sz0whipOinzMsdSeOwnq4EdXtOfBLSl9cPb7R9BV8dEsiTbYSPwOPmwjXLft0VrjHAMnlWerNYmfYw1EGTVY8uwEomIChz6TJm8d+O8PUHT6fe2fe2oIm0UfJIK2nOKzbz2mHyRN7II3nN15pZXl8epRObAr4NNrA43ZbCwctdWbHJih/0/jEStOEzyuWoVP9TtHVK/UQIBBJI1NuRYvYNuCfe5DibtcB7gMpdCWQbxLz4eAHlD1yho3/NcF58iPFPRAAzp1mMeADDmD9Ac08vPs6DvP8qSgzeDzWdZ29LAGnzqLbUnv61wlzJ46gPmvZT3YKPLhUuLnSq8mG/bJJf3QKuDX0jlsmzXJ7FyiSEdgTq0WCPhhqLOn0ryeo/g9pcg7ZQ1aS2FYAo6Bhur27278S7PQ3080gTaCONpLU3eFx8olgGhQWG3W7LRnq6OpGNN1AS8/Imlv5vb9EJlk+xBg2DchQaaywzpDGYdL+DgdATIePDz/psJNL/RqBXueth7z6NCdBjGMEnqFLwPmtq637/oC86QbraqnwEYOcgsoZ2qrz4xBbLnliA5zBVjwEksvqQNpeaKQwlr0CPdTmchMfiLUOmDsOTU/LfIPIbGJJ9Cfmk9yJSxEyohIEBDRA5PDuly55sDmJuEwddeIeFOgRSsQ7DqUBBl1BLMKJtejGk8yC+0DkQ+LMhSZOooqxCh/zMO85jfhWpJU4tAvi7cf6nkLLbUJF1E1L31hxWkcAzecDXA4d8CkaO8B+l7pQuvOO1Y1NJ3P7STyIpQEQpQYZigiw1Fi4lwWROHpKxMYmaR4lQjOpNDIb8wAxWVGOWB3MUzBogaBqm1092YQ6DYXhGkn3g14fdEJF/EJZ+6tuJFMAV+6JTyUPZuY/InoqrW3C4Q8eTYR8OgWJ0LByMp6rRZFgIyTUNhojSyNRUktZR+VkDUDUsOgPJitYwElhzgVpFuqxfZKw4Dpxg/Cj5eVyHO7J+7J/hs2iDbbFNts138F18J99NGkgLaSJtpDF3klE86FfmYG/L0cZwS+H5L1yANMi+2yYWK7iN+/UV6OYwj5jFyqw1jlvL3zFjhcvfsXwKHoQvYmEdBksJmA3PhG6fk7yeGdq5/J1GX+RzVSB9PluCnwUCyalHzp5xAojzNwzDOy7YBjdg3C9/B9HEEk8cmuUrW2L5O7/eKpe/29nKbcSrFNIfBL72SAVA+gfy0s8Zd3wSVd0oB0VdrWOZfFPuRDzROtbbsmTUL8CIwr1RvwAjyiaaKbBjQSMqAbgAo8UCjCHKgYBmGnIBRmbEQ2D8piUJkbnNBRhR6s3JbmYMKO4xb4vZWwuvM6sGUccCjPc3Ex/Pq3HmCu4XafNj20lxhzjGRWg+9/NmSiOw1isH3G1bAsvt9pLGXy4BWkZogOMCRN7a9hdztRb55SK0A0CY31IAmYPIc+X1o6nax7yNZMkoq31oJ5mwzfIp3s0iFtZh9FsGWUrLIDNLiklQfI4TPpxypH1j6J1Tj8Wa0lzOjqGofBryCG9fn88tOkV/cgd/tm0D+72rIKiwjbyvVRrPWmThegML87NKTuQrl7PqsYIszzRuLcSNGc8YoMYtl7p+ov9C3LKQ+iwpAlZZPd9njHLKkbNmNczbcupxarIAbm7dzpGmgk4e78a2Ixu4FQG9pJLP5HVmnSub5239cin4vpgWYPKGsprzdw4ojw7zz/r2//5/RrCORI+DMqDly21wy2fbx0VOSvtMfrTbqrmx/X6//w/c34CyrsSKUAAAAABJRU5ErkJggg==" /***/ }), /***/ "IldK": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAAEEfUpiAAAAAXNSR0IArs4c6QAAA1ZJREFUWAm1l09IFVEUxtVMsVwEtSitiOjPrihq1aaFGkEJ7apFq6BVkYuKaOUmchNUiwiCIohcJBG0KihpFYabiIIoCcqEpD9qpiH5+n3jnHl3Zu7cNwgdOO+e853vO/e+O//r6mKrVCrfLa4jqSjR2IBPJhULVDFGhJHfxHcrqY+rf4mXCGjQDxYlCgxQLJuPfpHtlDRrVrzuFgS6uVrej5jxD8Ufbl5viVQW21iPWay2Lfh7/HECWgDoswUild9WlYC4x821yBbrFI9dlouY+kvk20xto+2tibLjhDpcMLaqxHNuHikABg10xuxxidTLIMw4JF94OLsOTatN9Nks4FtfAazXltdcQBi1magfLOD0a5feQdxsZHe0Yy2xi7uxNuKzC7gxujt4k4tl4+hsCs2AYBpfnhXGeUeC02REjTK2XYQMFqWJMBtQXYl/9YnATmT53hxiN/4c15n+Gr+IVy8erwoQUh8eso9ZbdIV1RjF1VlCQd7KIdbmLtxnEL8k9omHChr8SnDEbQVr3mCkgvpT1XUmTjG2GtlGOwuVq4Hh7iiOzsScWCQ0h1yyL4bTlb+mq8xTCiFtqkK5qDPUYG9MP5mTVYE1wXuW/iMrmIXfXNWkop5gA6gj+MaUJJ006S9cSWOpzLvBxmCBc1HMMn32REUKrb4i2A5rJNIqD2kmbnDWU7uXiC2ApMu4jF0yjXekw+WCLm/AG72iEIhoPX4Ln8bL2ieIZ/Ciwx+aMtr4tYiHy85WgncNTvKqUjg7pHZ8rETDxVIGECb3wNRCKOi2W9aGIK6zBsQd+GRJ8Ty8XaaNRoAbJcWivUqJ4wQ8925To+c+m3x/DaKv3J5dBKReHzGATVBr0kU8GCAVlXLXIsRvReQAfloLmAoQikrSJLdy4qNFxBr4XTVJ3sKy2xrIdZM97tRDzwyHlgtHtQNXa6yyqDxOQa+WnUWEEninnke6PY7jK3Lr+79AP4+jI9EULEJPE52VZU3X8jGJGbULt8sKY573c2gpxWclGw24m4OmEa/1bWGtz7vaXAxrK/7B2IFREz7CXwQ4bukhSfarLTd/AkDWjpzDf+KLNX0gHUiaegL/g8FDpJGeZnvwbnwL3hb7H0Zdyl/wYfwBJ5e+m0rZP9nCKYUv9en2AAAAAElFTkSuQmCC" /***/ }), /***/ "IqXq": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAA/5JREFUaEPdmk9sFHUUx9+bXSgtFIzVGk0P3vRivHnwogeMoVWjiW6EqKQa3D+EHixQs84sw/6GFg1wUOzsVGNjIqgbDhK0xOiBixdvxoucrRKREhBLS5mZr/ltuzO7pC2d2Wlm1rlN8nv7+372vfd77/f7DVObP9zm+qkJQH//kz57wf6AiJ4m4MFEwTFfIqIL6Y3pg/rInum6Ng9Aindu2b+AcG+ihN8hhomvpjrSj9chPABVmKcJ2Jlk8Z425i8NLb9LvjcC/OmFDSsDhpabShJM6Yg14DrOtzVNzJcMLf9QM0B5HHXBRqmQyORWl9Hoe+D/CqAJ8xyIBggI5BUmsonoU1Eq5KMKxVAe0IR5G0A6rIjeex7eNDTUfyusfaNdOICyOQtCV1ABifGAKsavEKinCYD55/S27mf0odf+CQrWyvhQHmgCYEY9F5j4p62dm589cOCN2VZEBbFtGYBJGQbjmJfQzBfSvcqAns3eDCIk7NiWAbrSm++bd+Z2uXA/9Ksi/Zju63xeHxycDytsrXaRABSLu2dUYQ4TcMxvqPh86tGeF/VMZmGtYsKMiwxATq4Z40W4dKQB4mzfA8or2Wz2dhhxa7GJFEBOWBKm7gKHPAjmM4890vNqJpNx1iIo6JjIAWqeKJtjILzbAHE6peZe15ndoALvNn5dABYhxo+D6B0/sflzoeYGWS67ET7rBiA1qqJykuDu9SGib8nXFQAAa0bFImCPhFBSqefK72W/i9ABFBLA9DY63R0dW0dG3rqxkigJcWh0ot91AaFmzycihDSjsh9AiYFTUbbGYTwTygNhJmrVRhXmBAM7wawbWv54/fdiA1jMD2uHojAfLr49tVpoHT1qbft3wblWE838h6Hl+2IHaNyQM9FEWcvnVoIYHf3s/pv2/OVFAPrb0Aq9sQOootJPcL0ViYlPilJ+33KhlkiApSV2koDdfu9EJ0SpMHwnRCIBpEgdUGyj8kXj4ZnCNFbWCsVGiMQCSJHVajX168WZrwC8XBct87qs5fX6e6IBpEjLsjZMX3bPAHihoe0oGlpuTL4nHqAWTtXqRue3mW9A2OHlhKIMCzV3oi0AahCTk5vs6blzBNruQ/C+TqXj68QtoytVZt2yupy/nCkQPbVUuMDAfhAtVt+k1IHVWgv94+oW++qV7wn0ZB3CP/VISCGTwmQtWAnk8Eenuu3rN34g4ImmMUnwgGzMiOhNAlKBmzymWUMrbImtlagl6u9zc4GFLxnI81VRKmyIDUBOrAqzUvMAUbATboCIlbOGlnspVoCw//5ydrHtB6KCWB1A+Hvf9diQtwpx90u+dr9mbfuL7lp/0s6fGrQao3HZB7o6jUvkavP+B52LHV54q7JeAAAAAElFTkSuQmCC" /***/ }), /***/ "Irxy": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__style_index_less__ = __webpack_require__("vtiu"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__style_index_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__style_index_less__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__index_less__ = __webpack_require__("r+rT"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__index_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__index_less__); /***/ }), /***/ "Iw+v": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAiCAYAAAC0nUK+AAAAAXNSR0IArs4c6QAABGpJREFUSA2VVltsVFUU3fvcmQGRhjIvm0lAox+2BScmJRLQzliMMX5U/dCQYvTHBCEa/MOS+FETazBqgl8+8PGBmCDqh41pBFM6xUegtCq0U2LUxGBIpzPMtEM6dh73HPe+5U7OnbnTdvbH3LPXWWvtc8/rDsIKkeuIxaSCXgmqBxAjCCqgALOo4F8ESAiEb1uTifOIhLgEceojvS3eg1IdVUo9UN/rRBBwXBn4amg6cc7ZA+AwVwMD4saXI4NKqn4mirYwrOt9FHzxXWBsiQC2bgI1vwDmtetQSvwCxaGzIGfnLE+B4m3/3p5+HBiQtUWARomZ9u7T6fZulb5vj1r8+KSSxSLBjYP7mcd81mU6Yl/zAOvM053dr1uE3b2q9OtUY0eXHuZnSHerwBsO8xvbY7tp1JJH0KyxXYt1rGefbGe8mwtYr6AqapCWGze88gJ479/mKLzWhHWsZx9TKWv0mN7+8A6omOO8eJu//wLQ53P4LfQdhPJv0w6ME8/dd0LrdyccuCqVIPfYPmuR0YCdxuHglhepXHx931Pge2inRa5M/wHlny9C8dQQFH847zCwE5lbACgWQc6lAUwFIhwANAyQ2RxUJq8QTcwCLcKPvBClS78vT1+ppDLRR+yptBaJ+/XgXMcsPuk42If7Mu2xnwSdrq08Gt7HVlRM4NdrJiw+6TiqPgBbPUpBmEE+IHrQntVTqM250w2zfWhhQx66FhapwDo+eRgOVg2DM2NW2zawc93UxmwO97EPB/t66JEiyM9HWmjmuoDJtXkjjH2WA68L2imTnPBdwZE/9Jr1bPbH1tk+pJ/EdGfsWZDq80b7vJki+j4XhvGMEC23DyFCjm+3/0581YxXHZf1t27JtN/wDYvAheE8zfu7zCy894nraaxzcQH4FLOegz4ib+LlM4vW3RLwrj9G+30GymXIv3Sk6QJszDrW0zaZ9N+18X0uUv1YpKM992KpMk77swW8XusSuu25p+vuGhbZwXPMU2GNmI0B5oQHdwSmxq5xUjXnhK7Kx6VUQwqUwXkzXyJyKiB69gST5y6wlsNhzkC6Pb4fQH7I7bUGTWmF7pEn/MnEsK6p+ySFriY+EoDv6KTV2mS+v9aYNXXmDPrbxBESLJ8qBlYKhOOBZOIzN4qrOY6OVgzw9FGBeTeRhl0O3mEc0nJH09WcGZtnRv5RCC872I4Ei+g19tJAlhywljQ0Z04oOXaSRn9W41ebAtVg8Mro1Srg0ljRnPkew3OQNpVjdFRwxi/a3nLxc0CrmrdOjfxFpKO6ig7BAZw+vernqm6f6yZdXV0byuWyv6MM4WNq0xm6/AN5lGNPGgsHhBA3vV5vdmJioqBr9LZ1EnXAbkej0fDS0tI9pmluTIGJDypfKYzGrlNY6L8kizcZp8KhSCRiplKpRVunPxtOi5SyTScelvlv/lbmp8dV4U8dr+XpfQ3N6bVndeK8ISvPY/YDHeN2LU/vX9Oc0+ha6C+Jj54GmZm0W0prmfP/AQ28rz+gSKUqAAAAAElFTkSuQmCC" /***/ }), /***/ "J+Rs": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; __webpack_require__("baa2"); var _icon = _interopRequireDefault(__webpack_require__("FC3+")); var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); var _api = __webpack_require__("H/Zg"); var _index = _interopRequireDefault(__webpack_require__("W7F7")); var _PersonItem = _interopRequireDefault(__webpack_require__("baF6")); var _events = _interopRequireDefault(__webpack_require__("TLe5")); var _dva = __webpack_require__("S6G3"); var _biz = __webpack_require__("Q3h8"); var _recordHistory = __webpack_require__("eXDv"); var _dec, _class; /** * 驻勤点和保安员信息 */ // 引入 EventEmitter function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } var DutyPersonList = exports.default = (_dec = (0, _dva.connect)(function (state) { return { mapStyle: state.command.mapStyle, selectComponeyInfo: state.command.selectComponeyInfo }; }), _dec(_class = /*#__PURE__*/function (_Component) { function DutyPersonList(props) { var _this; (0, _classCallCheck2.default)(this, DutyPersonList); _this = _callSuper(this, DutyPersonList, [props]); _this._gotoAttend = function (item) { var that = _this; var selectComponeyInfo = _this.props.selectComponeyInfo; selectComponeyInfo.clickType = 'attendancePoints'; (0, _biz.showAttendPointInfo)({ aid: item.selectAttendId, companyName: item.companyName, doMainId: _this.props.domainId, success: function success(result) { that.props.dispatch({ type: 'command/setSelectAttendInfo', payload: result }); } }); (0, _recordHistory.recordAdd)({ from: 'ComponeyInfo', to: 'AttendInfo', fromData: selectComponeyInfo, toID: item.selectAttendId }); }; // 驻勤点列表 _this._renderDepartment = function () { var _this$state = _this.state, attendanceList = _this$state.attendanceList, rootDep = _this$state.rootDep; return /*#__PURE__*/_react.default.createElement("div", { className: _index.default.dep_list }, attendanceList.map(function (item) { return /*#__PURE__*/_react.default.createElement("div", { key: item.id, className: _index.default.dep_item, "data-item": item, onClick: _this._gotoAttend.bind(_this, item) }, /*#__PURE__*/_react.default.createElement("div", { className: _index.default.dep_name }, /*#__PURE__*/_react.default.createElement("img", { src: __webpack_require__("aX42"), alt: "" }), /*#__PURE__*/_react.default.createElement("div", null, item.attendName))); })); }; // 获取驻勤点列表 _this._getAttendance = function () { _this.props.dispatch({ type: "command/fetchAllAttendanceList", payload: { attendanceList: [] } }); var that = _this; (0, _biz.showAttendList)({ doMainId: _this.props.domainId, doMainName: _this.props.domainName, success: function success(result) { that.setState({ attendanceList: result, personList: [], checkName: '' }); } }); }; // 面包屑点击事件 _this.onNavBack = function (index) { _this._getAttendance(); }; // 面包屑 _this._renderNavBar = function () { var checkName = _this.state.checkName; return /*#__PURE__*/_react.default.createElement("div", { className: _index.default.nav_content, ref: "navPartment", id: "s" }, /*#__PURE__*/_react.default.createElement("span", { key: 'all', onClick: _this.onNavBack.bind(_this), className: _index.default.nav }, _this.props.domainName, checkName != "" ? /*#__PURE__*/_react.default.createElement(_icon.default, { type: "right" }) : null), checkName != "" ? /*#__PURE__*/_react.default.createElement("span", { className: _index.default.root_dep, key: 'index' }, checkName) : null); }; _this._renderPersonList = function () { var _this$state2 = _this.state, height = _this$state2.height, personList = _this$state2.personList, loadingText = _this$state2.loadingText; return /*#__PURE__*/_react.default.createElement("div", { className: "security search-list_command amap_lib_placeSearch" }, /*#__PURE__*/_react.default.createElement("div", { className: "list", style: { maxHeight: height, overflow: "auto" } }, /*#__PURE__*/_react.default.createElement(_PersonItem.default, { data: personList, loadingText: loadingText }))); }; _this.state = { attendanceList: [], navList: [], personList: [], checkName: '', loadingText: ' ' }; return _this; } (0, _inherits2.default)(DutyPersonList, _Component); return (0, _createClass2.default)(DutyPersonList, [{ key: "componentDidMount", value: function componentDidMount() { this._getAttendance(); } // 根据企业部门获取保安人员列表 }, { key: "_getPersonList", value: function _getPersonList(items) { var _this2 = this; this.setState({ loadingText: "正在加载中..." }); var checkName = items.item_attendancesitename; var attendanceId = items.id; (0, _api.getSecurityManByAttendanceId)({ attendanceId: items.id }).then(function (res) { var datas = res.data; var result = datas.map(function (item) { item.perId = item.item_userid; item.ATTENDANCESITEID = attendanceId; delete item.item_userid; item.name = item.item_securityname ? item.item_securityname : item.principalName; delete item.item_securityname; delete item.principalName; var lnglatData = item.item_lonlatjson ? JSON.parse(item.item_lonlatjson) : ''; item.lnglat = lnglatData ? [lnglatData.longitude, lnglatData.latitude] : ''; item.longitude = lnglatData.longitude; item.latitude = lnglatData.latitude; // item.lnglat = [118.051982,24.607542] delete item.item_lonlatjson; item.companyName = item.item_companyname; delete item.item_companyname; item.ATTENDANCESITENAME = item.item_attendancesitename; delete item.item_attendancesitename; item.DeptName = item.item_deptname; delete item.item_deptname; item.idCardNo = item.item_documentid ? item.item_documentid : item.principalIdCardNo; delete item.item_documentid; delete item.principalIdCardNo; item.mobilePhone = item.item_phone ? item.item_phone : item.principalPhoneNo; delete item.item_phone; delete item.principalPhoneNo; return item; }); _this2.setState({ personList: result, total: res.data.total, loadingText: result.length > 0 ? "加载完成" : "暂无数据", attendanceList: [], checkName: checkName }); _this2.props.dispatch({ type: "command/fetchAttendPoliceList", payload: { list: result } }); }); } }, { key: "render", value: // 获取部门 function render() { var domainId = this.props.domainId; var _this$state3 = this.state, attendanceList = _this$state3.attendanceList, rootDep = _this$state3.rootDep; console.log('depList', attendanceList); return /*#__PURE__*/_react.default.createElement("div", { className: _index.default.dep_box }, this._renderNavBar(), this._renderDepartment()); } }]); }(_react.Component)) || _class); /***/ }), /***/ "J5z1": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); __webpack_require__("yQBS"); var _tabs = _interopRequireDefault(__webpack_require__("qA/u")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); var _One = _interopRequireDefault(__webpack_require__("/72g")); var _dva = __webpack_require__("S6G3"); var _dec, _class; function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } var TabPane = _tabs.default.TabPane; var EventList = exports.default = (_dec = (0, _dva.connect)(function (state) { return { tabIndex: state.command.tabIndex }; }), _dec(_class = /*#__PURE__*/function (_PureComponent) { function EventList(props) { var _this; (0, _classCallCheck2.default)(this, EventList); _this = _callSuper(this, EventList, [props]); _this.state = {}; return _this; } (0, _inherits2.default)(EventList, _PureComponent); return (0, _createClass2.default)(EventList, [{ key: "render", value: function render() { return /*#__PURE__*/_react.default.createElement("div", { className: "child-searchList event" }, /*#__PURE__*/_react.default.createElement(_One.default, { key: "1" })); } }]); }(_react.PureComponent)) || _class); /***/ }), /***/ "J9M/": /***/ (function(module, exports) { module.exports = "data:image/png;base64,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" /***/ }), /***/ "JUD+": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // ================== Collapse Motion ================== var getCollapsedHeight = function getCollapsedHeight() { return { height: 0, opacity: 0 }; }; var getRealHeight = function getRealHeight(node) { return { height: node.scrollHeight, opacity: 1 }; }; var getCurrentHeight = function getCurrentHeight(node) { return { height: node.offsetHeight }; }; var collapseMotion = { motionName: 'ant-motion-collapse', onAppearStart: getCollapsedHeight, onEnterStart: getCollapsedHeight, onAppearActive: getRealHeight, onEnterActive: getRealHeight, onLeaveStart: getCurrentHeight, onLeaveActive: getCollapsedHeight }; /* harmony default export */ __webpack_exports__["a"] = (collapseMotion); /***/ }), /***/ "JYrs": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__style_index_less__ = __webpack_require__("vtiu"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__style_index_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__style_index_less__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__grid_style__ = __webpack_require__("Irxy"); // style dependencies // deps-lint-skip: grid /***/ }), /***/ "Jcla": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAiCAYAAAC0nUK+AAAAAXNSR0IArs4c6QAABRZJREFUSA2dVmtsVFUQnrl3H/Td3m0brQSjaAyE9IdtCDSx0FbwEcGYqKSGxCAJlkQxCIF2ibEmNO1GovhLkAhiNFFJIWkTGktbQ0sEA22MmmpS1JBKw9p2+9hStrt773Hm3r27Z7fbB06y95wzj+/MmTMzZxEWoa0tE5VRw9gGIKpQQAkAegSKAM3/AQUvq6i0fX84vw+ROGkI0/CgpmmiCsBoESDWp5PLPES4DkI93H2k4AeZz/Mk8EYhlN7m8SYQUM/CohwFata5YMNjLigpUCE3A2H6noCRCR2u3QxD929hGA0arEpA+OFTXq2+EdFimDxTRAcXAp9uDnxH48tOFWDXpkx4qXwFuBxJ+8e0rSEcFXDhRgjOXJ6FiM5oeL6yQXvF3oBgLLri3vcBAe/Nz0Tw1eZC1Vo3qEoCuIu8fL81SN4r8GixZcbydSud8OQjTrg6FIZQRKwZ7ptz/NXj62FU03pry3hF1IArTkXgRztzYe1DztiWAIG7Aj6+OAM/krFNFY+7YP/z2aBlJTYfvB2Bd7+ahoiBgkK0qdur9SlsoBuC4iyQQyED3xrT4Z0vp5KAWZ83Yj7LbWI7tmccisBR5itbfJPlQsBmvjyOsUwPF6rwWkWGzIrPa4nPcpnYnnFoh8pq39h6xdB1ymMws2Kxy9u9ORPaDmjweiV5R5QIiLk0P2zP2cWEUXxBoeyv4QWnm02Dt6Pw63AUhu4kjv1i2QrIcmPS6Yb8uqnH+jbZOIzroNpaxeXFeWzT22enzGlRjkqeWmFpvR4ygdv6Q7YavHcuCKPTlgPdXo/Jj+MgrHIAimIqGrNA4lY0aT+oQYQcsrPkbO8s8E+mE2/kUR0AbDsWiLO50JgQRJEDBN6lC3Bz5Xmy00XSsrvU4KF2Qk2BHNnSPG4x03wZxyTCpX3BTz+NS9qTbWamKWNv5LDY9WSPrFR3eioeFtOIPozDRMk+olBYBnjBvUImDsvJ3Xkya96cw8J6Mtk4VEoDBK50sJCbEPcKm9jzNz+3LpZ5HA555Dl7Lseb7RnHJBTtDleWaJ+bwQnqbgXchHZsyDB7ClUtlb4B3167Z+qmxpn5gRmrAdo9iO3NLokwqjq1DvMGq5vHjoABR7kbpvYWy42lv/HewiFH3N/j9Rw3b9Dh8BynZvM7t03OXVa8H2J9tmN78nbAna19yvbx3HvWN/1EWA/TqwI5/7ef06v0r+rG8s4DnuEkcF5UtwSeQ0O0U1czy/X+XiKYVRGqO72FPzEWU9xzawlAr9EewzBO2uvljRgFFbf31Gtm5tk2iaqJcboatM/oQo7ZCssZqbD2pAKz3TxwZlZu1Bro78JVni9JiKe6vJ4z6fTSgjdWYdTtUmopapPpjGweOfDLqge1ffY6dUwLzkoXDxbcQgXfSjWw15QZcyo4d3yxCxM92BbGxgXBWd7doH1N3l1KsbGWiE2d3tw/0spizEXBWcflUPfSkOQdF5y2WvPFMBYclgTvOJT/JzXyFhlBVZW6c69ichuVFWLzeXku65SVlWVGIhEN8tYUFz7zSSegwyPC072jrdvrFEUJOp3OQH9/f/LzJAEkHk6JydPS0tLiUCi0Wtf1bH3Wj+6VFWFHZvHG4OA39aGRG0Hm08ZFJSUlut/vp9dsPi0YFqrSB2T1QNeh8+HJv08Hfz51U+an6smyBcHp2HdkRSM8GR1t33lC5vE8VU+WLyvm5F0ONTMXjSqB6ZSe4eXE/D9Zsho4685cYQAAAABJRU5ErkJggg==" /***/ }), /***/ "JjPw": /***/ (function(module, exports) { // removed by extract-text-webpack-plugin /***/ }), /***/ "JkqM": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAiCAYAAAC0nUK+AAAAAXNSR0IArs4c6QAABPdJREFUSA2dVmtMXFUQnjl3d3lYyhuRKBGNCi0SE5o2bQNIsWqj1EdMGmj0D0lDo9HEGEt/iUkxNa1JTTRWK+0PUxpFjUpjW5oCS2sQKahYoGlorakh0OX92O7ufRxnLuz23mWXh5Ow98zj+87cOTPngrCETOQVFxsSyg2QpYCYhSBTJeA4SvgXAdwC4aekfvdFRLJEEIpZLJ71JaVoyINSyo2LvXYLAnZJBfel97lb7R4AG7msrRVj37TUSUPWcKDIzICY8u3gKtkMygNZgEmJICenQL81BAF3B/ibzoMxfNvkFCgOpewqrcHaWiN8E6AscTS3qNGTWyQ9j2+Tc1+elIbfT+bown6O43jGjeYVf8cJLiL3rCt63wzYUi4Dv1+JzhjBw/GjhFvY4ICNfCy/eAtlbXAGyxEbc145WbFXTlW9LaWmhbZiHOOZZ3xdSRFvYL6C1GQdHTfGv1UFzifW2za2KYYBgfPt4Nq6EQK/dIH/x3MhN+MYzzy6lGb26Ml/cgNoehcfXvK5BkCXKwQIX6h0iCIrE5ScbJh4thJERhokNnwaCpOBAEw8U2keMiqwSYChl7OXu2IpYo7RBm+C8kgOgEOB2N0vgfZnH8iJKXaZwnjmYZGGeJ7IoYwVbrflRB/8G7yfHIfZfQcgcOESEVCZLnbaYEEelLLMQdOVTadi9rEtihT10m+gDw1DzHNPAd4TD+rlXtB/OGsL436P2fl0yMbzsCDZgngzWOEBsYmmw+x7hwBjYyFwthXk2AQo999nC2FF7ei22YI8dLDplLmcow1iePKQDigo/p8vUNYjMEMlYInb/TLEVrwIgV/tZMbEJOjXboDy6ENmHPOwMC+1Io6wwiNtlTv1p6wq+BpPgyM/F8TaBJudFbWzJ2S7y4NDghrT9HDtgqK2dYB27XpQNZ/cZn6qt6vMnA+bT+3uDekWnh4hBZxhD19CTMDiPXEK0OEAVJT5PyHoNRF8p5vBtX0xufZHn4kzEyAeFhSiCcc27Vgrp2dvUt2T49+phviqStP5f3689Q3gPXyUoZ40V1yOSO08M037fMQW78f1oC5kwfpqhHGMZ6GPyAfY28wHCpDqjD1Crz0AqgrTr+9f9QZMzDjGU/16Uh5c8xnzhj4WnoLSxzCgdVF/JoDTaV5Cca++suSVwDW+89W38xkzMcBt4cANqVfab9nIWaGrcodhyCYJUmF9NV8iStOL6NiW1t8aug9CmTMZiye3ZA+A8fm8trJfKqkmEHem9LvNzguizJoHFX6mX3V/QY132Gpbbk3ke8KJGbOInI0pmWI/Ae5OFRujCcKx1H73iUjuiOTY1qYp4KigDSYjgSy23rR7lTctum0ZkZwjkgda/pEIb9iibQr60ansokR8NrNFiUrOMen97Scp+/l5toB4KVDWpf3VdjXMbFOXJOdIh+LYS+Ngy442HEgRmR/amCIoy5InXWm5TkEHrVgagmrsa5y/5ayOsPWiPrf6CwsL41VVTclTIeOITGx20E0xjUb7C8pUtRBixul0jnd3d3utGOvanESrIbguKCjI8Pl8D+u6vmYEdNwqXYEMVDZ/jd6ay4Z/hu20cXpWVpY+MjIyF8RZn1HLYhhGpjXwXWP6+xtSP35Meget9vA4qy8qOb32sDVwUjG013D8qNXG6/A4q39FNafsEujfDxc9FSLTqVsCK6n5f5dsnXKxeEa6AAAAAElFTkSuQmCC" /***/ }), /***/ "JyvE": /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ver = exports.clear = exports.bind = void 0; var _sensorPool = __webpack_require__("BzKO"); /** * Created by hustcc on 18/6/9.[高考时间] * Contract: i@hust.cc */ /** * bind an element with resize callback function * @param {*} element * @param {*} cb */ var bind = function bind(element, cb) { var sensor = (0, _sensorPool.getSensor)(element); // listen with callback sensor.bind(cb); // return unbind function return function () { sensor.unbind(cb); }; }; /** * clear all the listener and sensor of an element * @param element */ exports.bind = bind; var clear = function clear(element) { var sensor = (0, _sensorPool.getSensor)(element); (0, _sensorPool.removeSensor)(sensor); }; exports.clear = clear; var ver = "1.0.2"; exports.ver = ver; /***/ }), /***/ "K+uK": /***/ (function(module, exports) { module.exports = "data:image/png;base64,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" /***/ }), /***/ "K6ED": /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__("cnlX"), __esModule: true }; /***/ }), /***/ "K7vd": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJgAAABoCAYAAAANUDk4AAAAAXNSR0IArs4c6QAAAn5JREFUeF7t1kFO5EAQRUF8WQ7FZZstEhKLqnxSkwr2/hqew0w+r9fr8+Mf/zzP8/Xzn+/3ea+X+Xghb/ZCtn0wgAFWFvAXrKx7sL3uv3x/wQ4UhI8AFsY9mV73QtxgJwy6ZwDr2k4su8EmKg5urPtg3GCDOgamABuIODmx7oW4wSZ53G8Bdt+wXHCDlXUPttd9MG6wAwXhI4CFcU+m170QN9gJg+4ZwLq2E8tusImKgxvrPhg32KCOgSnABiJOTqx7IW6wSR73W4DdNywX3GBl3YPtdR+MG+xAQfgIYGHck+l1L8QNdsKgewawru3EshtsouLgxroPxg02qGNgCrCBiJMT616IG2ySx/0WYPcNywU3WFn3YHvdB+MGO1AQPgJYGPdket0LcYOdMOieAaxrO7HsBpuoOLix7oMZbGNKgV8FHk0UKAsAVta1/QEYBGmBf3/kp3WMXxcA7Dqhgb8KAMZHWgCwNK9xwBhICwCW5jUOGANpAcDSvMYBYyAtAFia1zhgDKQFAEvzGgeMgbQAYGle44AxkBYALM1rHDAG0gKApXmNA8ZAWgCwNK9xwBhICwCW5jUOGANpAcDSvMYBYyAtAFia1zhgDKQFAEvzGgeMgbQAYGle44AxkBYALM1rHDAG0gKApXmNA8ZAWgCwNK9xwBhICwCW5jUOGANpAcDSvMYBYyAtAFia1zhgDKQFAEvzGgeMgbQAYGle44AxkBYALM1rHDAG0gKApXmNA8ZAWgCwNK9xwBhICwCW5jUOGANpAcDSvMYBYyAtAFia1zhgDKQFAEvzGgeMgbQAYGle44AxkBYALM1rHDAG0gKApXmNA8ZAWgCwNK/xb40WUzNbhY4CAAAAAElFTkSuQmCC" /***/ }), /***/ "KXcl": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); var _dva = __webpack_require__("S6G3"); __webpack_require__("11Jr"); var _timJsSdk = _interopRequireDefault(__webpack_require__("B5T/")); function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /** * IM可视化视图 */ // @connect(state => ({ // currentMessageList: state.im.currentMessageList // })) var GroupSystemNoticeElement = exports.default = /*#__PURE__*/function (_Component) { function GroupSystemNoticeElement(props) { var _this; (0, _classCallCheck2.default)(this, GroupSystemNoticeElement); _this = _callSuper(this, GroupSystemNoticeElement, [props]); _this.state = { payload: props.payload, text: '' }; return _this; } (0, _inherits2.default)(GroupSystemNoticeElement, _Component); return (0, _createClass2.default)(GroupSystemNoticeElement, [{ key: "componentDidMount", value: function componentDidMount() { var text = this.translateGroupSystemNotice(this.state.payload); this.setState({ text: text }); } }, { key: "componentWillReceiveProps", value: function componentWillReceiveProps(nextProps) {} }, { key: "translateGroupSystemNotice", value: function translateGroupSystemNotice(payload) { var groupName = payload.groupProfile.groupName || payload.groupProfile.groupID; switch (payload.operationType) { case 1: return "".concat(payload.operatorID, " \u7533\u8BF7\u52A0\u5165\u7FA4\u7EC4\uFF1A"); case 2: return "\u6210\u529F\u52A0\u5165\u7FA4\u7EC4\uFF1A"; case 3: return "\u7533\u8BF7\u52A0\u5165\u7FA4\u7EC4\uFF1A\u88AB\u62D2\u7EDD"; case 4: return "\u88AB\u7BA1\u7406\u5458".concat(payload.operatorID, "\u8E22\u51FA\u7FA4\u7EC4\uFF1A"); case 5: return "\u7FA4\uFF1A \u5DF2\u88AB".concat(payload.operatorID, "\u89E3\u6563"); case 6: return "".concat(payload.operatorID, "\u521B\u5EFA\u7FA4\uFF1A"); case 7: return "".concat(payload.operatorID, "\u9080\u8BF7\u4F60\u52A0\u7FA4\uFF1A"); case 8: return "\u4F60\u9000\u51FA\u7FA4\u7EC4\uFF1A"; case 9: return "\u4F60\u88AB".concat(payload.operatorID, "\u8BBE\u7F6E\u4E3A\u7FA4\uFF1A\u7684\u7BA1\u7406\u5458"); case 10: return "\u4F60\u88AB".concat(payload.operatorID, "\u64A4\u9500\u7FA4\uFF1A\u7684\u7BA1\u7406\u5458\u8EAB\u4EFD"); case 255: return '自定义群系统通知'; } } }, { key: "render", value: function render() { return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("div", { className: "group-system-element-wrapper" }, this.state.text)); } }]); }(_react.Component); /***/ }), /***/ "KaAZ": /***/ (function(module, exports) { module.exports = "data:image/png;base64,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" /***/ }), /***/ "Kw5M": /***/ (function(module, exports, __webpack_require__) { "use strict"; module.exports = __webpack_require__("8rJT"); /***/ }), /***/ "KwxL": /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(global) {var _interopRequireDefault=__webpack_require__("ouCL");var _classCallCheck2=_interopRequireDefault(__webpack_require__("Q9dM"));var _createClass2=_interopRequireDefault(__webpack_require__("wm7F"));(function(global,factory){ true?module.exports=factory():typeof define==='function'&&define.amd?define(factory):(global=global||self,global.BenzAMRRecorder=factory());})(void 0,function(){var commonjsGlobal=typeof window!=='undefined'?window:typeof global!=='undefined'?global:typeof self!=='undefined'?self:{};function createCommonjsModule(fn,module){return module={exports:{}},fn(module,module.exports),module.exports;}var recorder_build=createCommonjsModule(function(module,exports){(function(global,factory){module.exports=factory();})(commonjsGlobal,function(){var recorderWorker=function recorderWorker(){var recLength=0,recBuffersL=[],recBuffersR=[],sampleRate;self.onmessage=function(e){switch(e.data.command){case'init':init(e.data.config);break;case'record':record(e.data.buffer);break;case'exportWAV':exportWAV(e.data.type);break;case'getBuffer':getBuffer();break;case'clear':clear();break;}};function init(config){sampleRate=config.sampleRate;}function record(inputBuffer){recBuffersL.push(inputBuffer[0]);recBuffersR.push(inputBuffer[1]);recLength+=inputBuffer[0].length;}function exportWAV(type){var bufferL=mergeBuffers(recBuffersL,recLength);var bufferR=mergeBuffers(recBuffersR,recLength);var interleaved=interleave(bufferL,bufferR);var dataview=encodeWAV(interleaved);var audioBlob=new Blob([dataview],{type:type});self.postMessage({type:'blob',data:audioBlob});}function getBuffer(){var buffers=[];buffers.push(mergeBuffers(recBuffersL,recLength));buffers.push(mergeBuffers(recBuffersR,recLength));self.postMessage({type:'buffer',data:buffers});}function clear(){recLength=0;recBuffersL=[];recBuffersR=[];}function mergeBuffers(recBuffers,recLength){var result=new Float32Array(recLength);var offset=0;for(var i=0;i0.001?// 根据开始位置(秒数)截取播放采样 samples.slice(sampleRate*startPos):samples;if(!_samples.length){return onEnded();}var buffer,channelBuffer;this._curSourceNode=ctx['createBufferSource']();try{buffer=ctx['createBuffer'](1,_samples.length,sampleRate);}catch(e){// iOS 不支持 22050 以下的采样率,于是先提升采样率,然后用慢速播放 if(sampleRate<11025){/*buffer = ctx['createBuffer'](1, _samples.length * 3, sampleRate * 3); _samples = this._increaseSampleRate(_samples, 3);*/buffer=ctx['createBuffer'](1,_samples.length,sampleRate*4);this._curSourceNode['playbackRate'].value=0.25;}else{/*buffer = ctx['createBuffer'](1, _samples.length * 2, sampleRate * 2); _samples = this._increaseSampleRate(_samples, 2);*/buffer=ctx['createBuffer'](1,_samples.length,sampleRate*2);this._curSourceNode['playbackRate'].value=0.5;}}if(buffer['copyToChannel']){buffer['copyToChannel'](_samples,0,0);}else{channelBuffer=buffer['getChannelData'](0);channelBuffer.set(_samples);}this._curSourceNode['buffer']=buffer;this._curSourceNode['loop']=false;this._curSourceNode['connect'](ctx['destination']);this._curSourceNode.onended=onEnded;this._curSourceNode.start();}},{key:"stopPcm",value:function stopPcm(){if(this._curSourceNode){this._curSourceNode.stop();this._curSourceNode=null;}}},{key:"stopPcmSilently",value:function stopPcmSilently(){this._curSourceNode.onended=null;this.stopPcm();}},{key:"initRecorder",value:function initRecorder(){var _this=this;return new Promise(function(resolve,reject){var s=function s(stream){_this._recorderStream=stream;_this._recorderStreamSourceNode=ctx.createMediaStreamSource(stream);_this._recorder=new recorder_build(_this._recorderStreamSourceNode);_this._isRecording=false;resolve();};var j=function j(e){reject(e);};if(!_this._recorder){if(window.navigator.mediaDevices&&window.navigator.mediaDevices.getUserMedia){window.navigator.mediaDevices.getUserMedia({audio:true}).then(s).catch(j);}else if(window.navigator.getUserMedia){window.navigator.getUserMedia({audio:true},s,j);}else{j();}}else{resolve();}});}},{key:"isRecording",value:function isRecording(){return this._recorder&&this._isRecording;}},{key:"startRecord",value:function startRecord(){if(this._recorder){this._recorder.clear();this._recorder.record();this._isRecording=true;}}},{key:"stopRecord",value:function stopRecord(){if(this._recorder){this._recorder.stop();this._isRecording=false;}}},{key:"generateRecordSamples",value:function generateRecordSamples(){var _this2=this;return new Promise(function(resolve){if(_this2._recorder){_this2._recorder.getBuffer(function(buffers){resolve(buffers[0]);});}});}},{key:"releaseRecord",value:function releaseRecord(){if(this._recorderStream&&this._recorderStream.getTracks){this._recorderStream.getTracks().forEach(function(track){track.stop();});this._recorderStream=null;}if(this._recorder){this._recorder.release();this._recorder=null;}}}],[{key:"isPlaySupported",value:function isPlaySupported(){return isSupport;}},{key:"isRecordSupported",value:function isRecordSupported(){return!!(window.navigator.mediaDevices&&window.navigator.mediaDevices.getUserMedia||window.navigator.getUserMedia);}},{key:"getCtxSampleRate",value:function getCtxSampleRate(){return ctx.sampleRate;}},{key:"getCtxTime",value:function getCtxTime(){return ctx.currentTime;}},{key:"decodeAudioArrayBufferByContext",value:function decodeAudioArrayBufferByContext(array){return new Promise(function(resolve,reject){ctx['decodeAudioData'](array,function(audioBuf){// 把多声道音频 mix 成单声道 var numberOfChannels=audioBuf.numberOfChannels;var dest=new Float32Array(audioBuf.length);switch(numberOfChannels){default:case 1:{dest=audioBuf.getChannelData(0);break;}case 2:{var left=audioBuf.getChannelData(0);var right=audioBuf.getChannelData(1);for(var i=0,l=dest.length;i>3&15];if(inOffset+size+1>amr.length){break;}decodeInBuffer.set(amr.subarray(inOffset,inOffset+size+1));this.Decoder_Interface_Decode(decoder,decodeInBuffer.byteOffset,decodeOutBuffer.byteOffset,0);if(outOffset+this.PCM_BUFFER_COUNT>out.length){var newOut=new Int16Array(out.length*2);newOut.set(out.subarray(0,outOffset));out=newOut;}out.set(decodeOutBuffer,outOffset);outOffset+=this.PCM_BUFFER_COUNT;inOffset+=size+1;}Module._free(decodeInBuffer.byteOffset);Module._free(decodeOutBuffer.byteOffset);this.Decoder_Interface_exit(decoder);return out.subarray(0,outOffset);},encode:function encode(pcm,pcmSampleRate,mode){if(pcmSampleRate<8e3){console.error("pcmSampleRate should not be less than 8000.");return null;}if(typeof mode==="undefined"){mode=this.Mode.MR795;}var encoder=this.Encoder_Interface_init();if(!encoder){return null;}var buf=Module._malloc(this.PCM_BUFFER_COUNT*2);var encodeInBuffer=new Int16Array(Module.HEAPU8.buffer,buf,this.PCM_BUFFER_COUNT);buf=Module._malloc(this.AMR_BUFFER_COUNT);var encodeOutBuffer=new Uint8Array(Module.HEAPU8.buffer,buf,this.AMR_BUFFER_COUNT);var ratio=pcmSampleRate/8e3;var inLength=Math.floor(pcm.length/ratio);var inData=new Int16Array(inLength);for(var i=0;i=TOTAL_MEMORY){var success=enlargeMemory();if(!success){DYNAMICTOP=ret;return 0;}}return ret;},alignMemory:function alignMemory(size,quantum){var ret=size=Math.ceil(size/(quantum?quantum:16))*(quantum?quantum:16);return ret;},makeBigInt:function makeBigInt(low,high,unsigned){var ret=unsigned?+(low>>>0)+ +(high>>>0)*+4294967296:+(low>>>0)+ +(high|0)*+4294967296;return ret;},GLOBAL_BASE:8,QUANTUM_SIZE:4,__dummy__:0};Module["Runtime"]=Runtime;var ABORT=false;var tempDouble;var tempI64;var tempRet0;function assert(condition,text){if(!condition){abort("Assertion failed: "+text);}}function getCFunc(ident){var func=Module["_"+ident];if(!func){try{func=[eval][0]("_"+ident);}catch(e){}}assert(func,"Cannot call unknown function "+ident+" (perhaps LLVM optimizations or closure removed it?)");return func;}var cwrap,ccall;(function(){var JSfuncs={"stackSave":function stackSave(){Runtime.stackSave();},"stackRestore":function stackRestore(){Runtime.stackRestore();},"arrayToC":function arrayToC(arr){var ret=Runtime.stackAlloc(arr.length);writeArrayToMemory(arr,ret);return ret;},"stringToC":function stringToC(str){var ret=0;if(str!==null&&str!==undefined&&str!==0){ret=Runtime.stackAlloc((str.length<<2)+1);writeStringToMemory(str,ret);}return ret;}};var toC={"string":JSfuncs["stringToC"],"array":JSfuncs["arrayToC"]};ccall=function ccallFunc(ident,returnType,argTypes,args,opts){var func=getCFunc(ident);var cArgs=[];var stack=0;if(args){for(var i=0;i>0]=value;break;case"i8":HEAP8[ptr>>0]=value;break;case"i16":HEAP16[ptr>>1]=value;break;case"i32":HEAP32[ptr>>2]=value;break;case"i64":tempI64=[value>>>0,(tempDouble=value,+Math_abs(tempDouble)>=+1?tempDouble>+0?(Math_min(+Math_floor(tempDouble/+4294967296),+4294967295)|0)>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/+4294967296)>>>0:0)],HEAP32[ptr>>2]=tempI64[0],HEAP32[ptr+4>>2]=tempI64[1];break;case"float":HEAPF32[ptr>>2]=value;break;case"double":HEAPF64[ptr>>3]=value;break;default:abort("invalid type for setValue: "+type);}}Module["setValue"]=setValue;function getValue(ptr,type,noSafe){type=type||"i8";if(type.charAt(type.length-1)==="*")type="i32";switch(type){case"i1":return HEAP8[ptr>>0];case"i8":return HEAP8[ptr>>0];case"i16":return HEAP16[ptr>>1];case"i32":return HEAP32[ptr>>2];case"i64":return HEAP32[ptr>>2];case"float":return HEAPF32[ptr>>2];case"double":return HEAPF64[ptr>>3];default:abort("invalid type for setValue: "+type);}return null;}Module["getValue"]=getValue;var ALLOC_NORMAL=0;var ALLOC_STACK=1;var ALLOC_STATIC=2;var ALLOC_DYNAMIC=3;var ALLOC_NONE=4;Module["ALLOC_NORMAL"]=ALLOC_NORMAL;Module["ALLOC_STACK"]=ALLOC_STACK;Module["ALLOC_STATIC"]=ALLOC_STATIC;Module["ALLOC_DYNAMIC"]=ALLOC_DYNAMIC;Module["ALLOC_NONE"]=ALLOC_NONE;function allocate(slab,types,allocator,ptr){var zeroinit,size;if(typeof slab==="number"){zeroinit=true;size=slab;}else{zeroinit=false;size=slab.length;}var singleType=typeof types==="string"?types:null;var ret;if(allocator==ALLOC_NONE){ret=ptr;}else{ret=[_malloc,Runtime.stackAlloc,Runtime.staticAlloc,Runtime.dynamicAlloc][allocator===undefined?ALLOC_STATIC:allocator](Math.max(size,singleType?1:types.length));}if(zeroinit){var ptr=ret,stop;assert((ret&3)==0);stop=ret+(size&~3);for(;ptr>2]=0;}stop=ret+size;while(ptr>0]=0;}return ret;}if(singleType==="i8"){if(slab.subarray||slab.slice){HEAPU8.set(slab,ret);}else{HEAPU8.set(new Uint8Array(slab),ret);}return ret;}var i=0,type,typeSize,previousType;while(i>0];hasUtf|=t;if(t==0&&!length)break;i++;if(length&&i==length)break;}if(!length)length=i;var ret="";if(hasUtf<128){var MAX_CHUNK=1024;var curr;while(length>0){curr=String.fromCharCode.apply(String,HEAPU8.subarray(ptr,ptr+Math.min(length,MAX_CHUNK)));ret=ret?ret+curr:curr;ptr+=MAX_CHUNK;length-=MAX_CHUNK;}return ret;}return Module["UTF8ToString"](ptr);}Module["Pointer_stringify"]=Pointer_stringify;function AsciiToString(ptr){var str="";while(1){var ch=HEAP8[ptr++>>0];if(!ch)return str;str+=String.fromCharCode(ch);}}Module["AsciiToString"]=AsciiToString;function stringToAscii(str,outPtr){return writeAsciiToMemory(str,outPtr,false);}Module["stringToAscii"]=stringToAscii;function UTF8ArrayToString(u8Array,idx){var u0,u1,u2,u3,u4,u5;var str="";while(1){u0=u8Array[idx++];if(!u0)return str;if(!(u0&128)){str+=String.fromCharCode(u0);continue;}u1=u8Array[idx++]&63;if((u0&224)==192){str+=String.fromCharCode((u0&31)<<6|u1);continue;}u2=u8Array[idx++]&63;if((u0&240)==224){u0=(u0&15)<<12|u1<<6|u2;}else{u3=u8Array[idx++]&63;if((u0&248)==240){u0=(u0&7)<<18|u1<<12|u2<<6|u3;}else{u4=u8Array[idx++]&63;if((u0&252)==248){u0=(u0&3)<<24|u1<<18|u2<<12|u3<<6|u4;}else{u5=u8Array[idx++]&63;u0=(u0&1)<<30|u1<<24|u2<<18|u3<<12|u4<<6|u5;}}}if(u0<65536){str+=String.fromCharCode(u0);}else{var ch=u0-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023);}}}Module["UTF8ArrayToString"]=UTF8ArrayToString;function UTF8ToString(ptr){return UTF8ArrayToString(HEAPU8,ptr);}Module["UTF8ToString"]=UTF8ToString;function stringToUTF8Array(str,outU8Array,outIdx,maxBytesToWrite){if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i=55296&&u<=57343)u=65536+((u&1023)<<10)|str.charCodeAt(++i)&1023;if(u<=127){if(outIdx>=endIdx)break;outU8Array[outIdx++]=u;}else if(u<=2047){if(outIdx+1>=endIdx)break;outU8Array[outIdx++]=192|u>>6;outU8Array[outIdx++]=128|u&63;}else if(u<=65535){if(outIdx+2>=endIdx)break;outU8Array[outIdx++]=224|u>>12;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63;}else if(u<=2097151){if(outIdx+3>=endIdx)break;outU8Array[outIdx++]=240|u>>18;outU8Array[outIdx++]=128|u>>12&63;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63;}else if(u<=67108863){if(outIdx+4>=endIdx)break;outU8Array[outIdx++]=248|u>>24;outU8Array[outIdx++]=128|u>>18&63;outU8Array[outIdx++]=128|u>>12&63;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63;}else{if(outIdx+5>=endIdx)break;outU8Array[outIdx++]=252|u>>30;outU8Array[outIdx++]=128|u>>24&63;outU8Array[outIdx++]=128|u>>18&63;outU8Array[outIdx++]=128|u>>12&63;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63;}}outU8Array[outIdx]=0;return outIdx-startIdx;}Module["stringToUTF8Array"]=stringToUTF8Array;function stringToUTF8(str,outPtr,maxBytesToWrite){return stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite);}Module["stringToUTF8"]=stringToUTF8;function lengthBytesUTF8(str){var len=0;for(var i=0;i=55296&&u<=57343)u=65536+((u&1023)<<10)|str.charCodeAt(++i)&1023;if(u<=127){++len;}else if(u<=2047){len+=2;}else if(u<=65535){len+=3;}else if(u<=2097151){len+=4;}else if(u<=67108863){len+=5;}else{len+=6;}}return len;}Module["lengthBytesUTF8"]=lengthBytesUTF8;function UTF16ToString(ptr){var i=0;var str="";while(1){var codeUnit=HEAP16[ptr+i*2>>1];if(codeUnit==0)return str;++i;str+=String.fromCharCode(codeUnit);}}Module["UTF16ToString"]=UTF16ToString;function stringToUTF16(str,outPtr,maxBytesToWrite){if(maxBytesToWrite===undefined){maxBytesToWrite=2147483647;}if(maxBytesToWrite<2)return 0;maxBytesToWrite-=2;var startPtr=outPtr;var numCharsToWrite=maxBytesToWrite>1]=codeUnit;outPtr+=2;}HEAP16[outPtr>>1]=0;return outPtr-startPtr;}Module["stringToUTF16"]=stringToUTF16;function lengthBytesUTF16(str){return str.length*2;}Module["lengthBytesUTF16"]=lengthBytesUTF16;function UTF32ToString(ptr){var i=0;var str="";while(1){var utf32=HEAP32[ptr+i*4>>2];if(utf32==0)return str;++i;if(utf32>=65536){var ch=utf32-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023);}else{str+=String.fromCharCode(utf32);}}}Module["UTF32ToString"]=UTF32ToString;function stringToUTF32(str,outPtr,maxBytesToWrite){if(maxBytesToWrite===undefined){maxBytesToWrite=2147483647;}if(maxBytesToWrite<4)return 0;var startPtr=outPtr;var endPtr=startPtr+maxBytesToWrite-4;for(var i=0;i=55296&&codeUnit<=57343){var trailSurrogate=str.charCodeAt(++i);codeUnit=65536+((codeUnit&1023)<<10)|trailSurrogate&1023;}HEAP32[outPtr>>2]=codeUnit;outPtr+=4;if(outPtr+4>endPtr)break;}HEAP32[outPtr>>2]=0;return outPtr-startPtr;}Module["stringToUTF32"]=stringToUTF32;function lengthBytesUTF32(str){var len=0;for(var i=0;i=55296&&codeUnit<=57343)++i;len+=4;}return len;}Module["lengthBytesUTF32"]=lengthBytesUTF32;function demangle(func){var hasLibcxxabi=!!Module["___cxa_demangle"];if(hasLibcxxabi){try{var buf=_malloc(func.length);writeStringToMemory(func.substr(1),buf);var status=_malloc(4);var ret=Module["___cxa_demangle"](buf,0,0,status);if(getValue(status,"i32")===0&&ret){return Pointer_stringify(ret);}}catch(e){}finally{if(buf)_free(buf);if(status)_free(status);if(ret)_free(ret);}}var i=3;var basicTypes={"v":"void","b":"bool","c":"char","s":"short","i":"int","l":"long","f":"float","d":"double","w":"wchar_t","a":"signed char","h":"unsigned char","t":"unsigned short","j":"unsigned int","m":"unsigned long","x":"long long","y":"unsigned long long","z":"..."};var subs=[];var first=true;function parseNested(){i++;if(func[i]==="K")i++;var parts=[];while(func[i]!=="E"){if(func[i]==="S"){i++;var next=func.indexOf("_",i);var num=func.substring(i,next)||0;parts.push(subs[num]||"?");i=next+1;continue;}if(func[i]==="C"){parts.push(parts[parts.length-1]);i+=2;continue;}var size=parseInt(func.substr(i));var pre=size.toString().length;if(!size||!pre){i--;break;}var curr=func.substr(i+pre,size);parts.push(curr);subs.push(curr);i+=pre+size;}i++;return parts;}function parse(rawList,limit,allowVoid){limit=limit||Infinity;var ret="",list=[];function flushList(){return"("+list.join(", ")+")";}var name;if(func[i]==="N"){name=parseNested().join("::");limit--;if(limit===0)return rawList?[name]:name;}else{if(func[i]==="K"||first&&func[i]==="L")i++;var size=parseInt(func.substr(i));if(size){var pre=size.toString().length;name=func.substr(i+pre,size);i+=pre+size;}}first=false;if(func[i]==="I"){i++;var iList=parse(true);var iRet=parse(true,1,true);ret+=iRet[0]+" "+name+"<"+iList.join(", ")+">";}else{ret=name;}paramLoop:while(i0){var c=func[i++];if(c in basicTypes){list.push(basicTypes[c]);}else{switch(c){case"P":list.push(parse(true,1,true)[0]+"*");break;case"R":list.push(parse(true,1,true)[0]+"&");break;case"L":{i++;var end=func.indexOf("E",i);var size=end-i;list.push(func.substr(i,size));i+=size+2;break;}case"A":{var size=parseInt(func.substr(i));i+=size.toString().length;if(func[i]!=="_")throw"?";i++;list.push(parse(true,1,true)[0]+" ["+size+"]");break;}case"E":break paramLoop;default:ret+="?"+c;break paramLoop;}}}if(!allowVoid&&list.length===1&&list[0]==="void")list=[];if(rawList){if(ret){list.push(ret+"?");}return list;}else{return ret+flushList();}}var parsed=func;try{if(func=="Object._main"||func=="_main"){return"main()";}if(typeof func==="number")func=Pointer_stringify(func);if(func[0]!=="_")return func;if(func[1]!=="_")return func;if(func[2]!=="Z")return func;switch(func[3]){case"n":return"operator new()";case"d":return"operator delete()";}parsed=parse();}catch(e){parsed+="?";}if(parsed.indexOf("?")>=0&&!hasLibcxxabi){Runtime.warnOnce("warning: a problem occurred in builtin C++ name demangling; build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling");}return parsed;}function demangleAll(text){return text.replace(/__Z[\w\d_]+/g,function(x){var y=demangle(x);return x===y?x:x+" ["+y+"]";});}function jsStackTrace(){var err=new Error();if(!err.stack){try{throw new Error(0);}catch(e){err=e;}if(!err.stack){return"(no stack trace available)";}}return err.stack.toString();}function stackTrace(){return demangleAll(jsStackTrace());}Module["stackTrace"]=stackTrace;var PAGE_SIZE=4096;function alignMemoryPage(x){if(x%4096>0){x+=4096-x%4096;}return x;}var HEAP;var HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;var STATIC_BASE=0,STATICTOP=0,staticSealed=false;var STACK_BASE=0,STACKTOP=0,STACK_MAX=0;var DYNAMIC_BASE=0,DYNAMICTOP=0;function enlargeMemory(){abort("Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+TOTAL_MEMORY+", (2) compile with ALLOW_MEMORY_GROWTH which adjusts the size at runtime but prevents some optimizations, or (3) set Module.TOTAL_MEMORY before the program runs.");}var TOTAL_STACK=Module["TOTAL_STACK"]||65536;var TOTAL_MEMORY=Module["TOTAL_MEMORY"]||524288;var totalMemory=64*1024;while(totalMemory0){var callback=callbacks.shift();if(typeof callback=="function"){callback();continue;}var func=callback.func;if(typeof func==="number"){if(callback.arg===undefined){Runtime.dynCall("v",func);}else{Runtime.dynCall("vi",func,[callback.arg]);}}else{func(callback.arg===undefined?null:callback.arg);}}}var __ATPRERUN__=[];var __ATINIT__=[];var __ATMAIN__=[];var __ATEXIT__=[];var __ATPOSTRUN__=[];var runtimeInitialized=false;function preRun(){if(Module["preRun"]){if(typeof Module["preRun"]=="function")Module["preRun"]=[Module["preRun"]];while(Module["preRun"].length){addOnPreRun(Module["preRun"].shift());}}callRuntimeCallbacks(__ATPRERUN__);}function ensureInitRuntime(){if(runtimeInitialized)return;runtimeInitialized=true;callRuntimeCallbacks(__ATINIT__);}function preMain(){callRuntimeCallbacks(__ATMAIN__);}function exitRuntime(){callRuntimeCallbacks(__ATEXIT__);}function postRun(){if(Module["postRun"]){if(typeof Module["postRun"]=="function")Module["postRun"]=[Module["postRun"]];while(Module["postRun"].length){addOnPostRun(Module["postRun"].shift());}}callRuntimeCallbacks(__ATPOSTRUN__);}function addOnPreRun(cb){__ATPRERUN__.unshift(cb);}Module["addOnPreRun"]=addOnPreRun;function addOnInit(cb){__ATINIT__.unshift(cb);}Module["addOnInit"]=addOnInit;function addOnPreMain(cb){__ATMAIN__.unshift(cb);}Module["addOnPreMain"]=addOnPreMain;function addOnExit(cb){__ATEXIT__.unshift(cb);}Module["addOnExit"]=addOnExit;function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb);}Module["addOnPostRun"]=addOnPostRun;function intArrayFromString(stringy,dontAddNull,length){var len=length>0?length:lengthBytesUTF8(stringy)+1;var u8array=new Array(len);var numBytesWritten=stringToUTF8Array(stringy,u8array,0,u8array.length);if(dontAddNull)u8array.length=numBytesWritten;return u8array;}Module["intArrayFromString"]=intArrayFromString;function intArrayToString(array){var ret=[];for(var i=0;i255){chr&=255;}ret.push(String.fromCharCode(chr));}return ret.join("");}Module["intArrayToString"]=intArrayToString;function writeStringToMemory(string,buffer,dontAddNull){var array=intArrayFromString(string,dontAddNull);var i=0;while(i>0]=chr;i=i+1;}}Module["writeStringToMemory"]=writeStringToMemory;function writeArrayToMemory(array,buffer){for(var i=0;i>0]=array[i];}}Module["writeArrayToMemory"]=writeArrayToMemory;function writeAsciiToMemory(str,buffer,dontAddNull){for(var i=0;i>0]=str.charCodeAt(i);}if(!dontAddNull)HEAP8[buffer>>0]=0;}Module["writeAsciiToMemory"]=writeAsciiToMemory;if(!Math["imul"]||Math["imul"](4294967295,5)!==-5)Math["imul"]=function imul(a,b){var ah=a>>>16;var al=a&65535;var bh=b>>>16;var bl=b&65535;return al*bl+(ah*bl+al*bh<<16)|0;};Math.imul=Math["imul"];if(!Math["clz32"])Math["clz32"]=function(x){x=x>>>0;for(var i=0;i<32;i++){if(x&1<<31-i)return i;}return 32;};Math.clz32=Math["clz32"];var Math_abs=Math.abs;var Math_ceil=Math.ceil;var Math_floor=Math.floor;var Math_min=Math.min;var runDependencies=0;var runDependencyWatcher=null;var dependenciesFulfilled=null;function getUniqueRunDependency(id){return id;}function addRunDependency(id){runDependencies++;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies);}}Module["addRunDependency"]=addRunDependency;function removeRunDependency(id){runDependencies--;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies);}if(runDependencies==0){if(runDependencyWatcher!==null){clearInterval(runDependencyWatcher);runDependencyWatcher=null;}if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback();}}}Module["removeRunDependency"]=removeRunDependency;Module["preloadedImages"]={};Module["preloadedAudios"]={};STATIC_BASE=8;STATICTOP=STATIC_BASE+31776;__ATINIT__.push();allocate([154,14,0,0,188,14,0,0,226,14,0,0,8,15,0,0,46,15,0,0,84,15,0,0,130,15,0,0,208,15,0,0,66,16,0,0,108,16,0,0,42,17,0,0,248,17,0,0,228,18,0,0,240,19,0,0,24,21,0,0,86,22,0,0,238,23,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,13,0,15,0,17,0,19,0,20,0,26,0,31,0,5,0,6,0,5,0,5,0,0,0,0,0,0,0,0,0,1,252,146,252,36,253,182,253,72,254,218,254,108,255,0,0,0,0,32,78,32,78,32,78,32,78,32,78,80,70,0,64,0,32,0,0,0,0,255,127,112,125,112,125,112,125,112,125,112,125,153,89,255,127,112,125,112,125,102,102,102,38,153,25,153,25,154,89,185,62,232,43,188,30,132,21,16,15,139,10,97,7,42,5,157,3,0,96,0,72,0,54,128,40,96,30,200,22,22,17,209,12,157,9,54,7,102,70,184,38,75,21,182,11,113,6,139,3,243,1,18,1,151,0,83,0,154,89,185,62,232,43,188,30,132,21,16,15,139,10,97,7,42,5,157,3,44,3,128,0,30,2,140,0,57,11,111,4,218,8,74,13,19,8,51,2,133,49,135,2,36,16,6,7,225,21,165,20,9,30,118,1,151,14,185,1,160,42,78,10,31,46,190,9,10,80,29,3,98,20,163,2,68,26,162,32,162,20,160,6,208,5,172,1,250,22,196,1,212,20,232,15,255,13,244,4,165,9,133,3,22,62,237,3,134,58,199,12,91,40,250,18,51,14,229,7,36,10,67,3,72,48,28,19,174,47,168,6,120,52,68,6,158,35,37,9,128,15,2,6,103,21,208,38,211,14,161,1,79,5,158,1,56,14,33,6,59,31,213,13,141,44,133,2,104,33,123,2,216,15,97,5,224,64,236,23,156,44,188,2,215,7,95,2,127,48,42,6,111,43,46,18,112,53,172,6,214,46,205,4,60,31,129,28,175,51,83,22,124,9,135,4,25,8,149,7,74,24,233,23,218,13,12,7,221,34,10,7,231,33,44,6,111,54,248,13,1,52,93,24,254,23,106,4,106,23,198,6,61,55,54,18,7,44,249,12,194,47,15,6,107,54,199,11,217,19,224,40,228,36,50,26,153,6,171,2,156,5,26,5,44,28,93,15,242,15,153,10,113,30,192,2,222,58,34,3,155,24,92,20,241,16,237,20,20,26,29,2,174,23,114,2,83,53,116,14,234,44,104,9,28,63,204,2,145,47,239,2,129,31,225,44,170,24,208,8,114,17,240,1,125,28,11,2,229,39,249,14,202,32,221,11,211,32,198,3,148,55,88,7,255,33,33,21,11,64,255,18,252,28,187,7,201,23,206,4,155,36,46,17,222,56,35,13,247,52,57,11,107,51,185,5,158,21,142,6,82,51,179,57,170,28,88,2,38,5,36,2,156,16,211,13,60,39,60,9,91,41,110,2,32,51,157,2,46,55,198,13,175,19,56,38,234,59,107,2,43,12,78,2,58,64,197,11,182,60,72,16,177,60,75,6,45,60,204,4,151,62,83,36,110,29,112,19,198,7,189,4,183,44,133,4,224,48,143,21,3,37,84,10,36,30,242,7,224,51,191,8,139,62,229,19,130,31,105,26,99,39,133,5,138,19,43,9,235,48,87,23,22,59,83,11,88,71,241,8,211,61,223,9,137,63,14,40,59,57,55,44,5,7,81,1,43,12,141,1,182,13,112,11,240,17,110,10,95,29,116,2,151,44,144,2,58,23,131,9,144,25,199,28,46,32,61,3,160,15,95,3,48,39,188,9,185,62,223,13,28,71,30,4,215,23,174,5,252,22,220,30,64,73,140,13,72,7,32,2,238,35,171,2,103,45,64,16,242,17,108,6,86,12,133,4,81,62,0,10,61,48,149,14,12,68,140,20,218,23,212,7,101,11,206,6,83,64,137,20,147,65,144,6,53,67,223,6,165,18,159,12,218,28,147,23,6,56,28,39,195,15,186,1,98,16,202,1,254,35,194,8,3,29,121,16,60,50,33,3,178,43,57,3,104,49,36,8,156,50,154,25,33,37,228,3,229,25,217,3,41,41,198,9,185,59,142,19,58,49,7,8,124,60,117,6,66,63,9,27,151,55,158,22,66,10,60,3,239,21,150,6,95,53,146,22,84,14,18,6,49,44,73,10,42,38,179,5,179,54,125,18,25,62,147,24,134,24,78,7,230,30,237,8,82,66,219,17,192,64,9,15,144,59,7,9,151,62,172,12,123,56,144,69,71,46,203,10,189,7,127,5,120,5,108,3,239,16,219,13,39,17,114,16,29,21,168,2,53,68,13,3,101,25,254,19,155,31,253,29,187,28,26,3,141,32,158,4,193,58,88,12,80,58,223,11,197,79,112,3,209,56,84,3,49,48,116,57,248,26,128,7,129,16,165,3,26,32,63,4,163,41,244,15,98,39,181,17,175,10,72,3,177,80,57,4,71,65,78,23,1,62,226,17,119,42,14,10,189,14,142,4,183,56,204,15,219,80,67,10,115,59,174,10,170,59,138,8,113,24,154,12,69,51,24,76,28,28,162,3,158,9,82,6,163,17,20,12,28,54,181,16,220,40,65,3,187,67,42,3,251,65,241,8,186,60,25,32,35,53,148,6,125,12,42,7,76,62,4,11,196,61,207,20,110,66,134,9,148,65,46,5,55,61,220,31,206,45,108,33,178,14,5,8,91,37,37,5,249,52,134,26,195,47,144,7,244,31,222,13,231,51,242,6,171,63,199,25,163,63,78,30,73,33,247,9,57,28,85,10,93,71,65,29,245,65,200,8,218,69,68,11,113,67,0,13,201,36,194,78,34,43,128,32,6,5,108,2,151,5,71,2,105,23,241,8,138,15,42,14,24,20,240,2,97,52,62,3,177,21,44,11,244,45,20,23,241,41,48,2,70,21,52,2,9,52,192,11,170,46,99,14,175,77,30,3,97,38,216,2,95,53,44,34,223,28,237,11,211,9,10,3,162,23,65,3,69,25,210,19,113,32,159,9,253,23,73,7,204,59,238,4,72,56,195,17,95,53,163,17,65,12,167,11,175,9,235,4,240,58,39,18,22,60,47,10,156,56,88,9,174,48,233,9,115,29,133,11,109,50,28,47,92,21,172,2,69,12,210,2,217,19,250,4,188,49,104,16,198,59,169,2,139,30,80,2,134,25,229,7,94,64,33,34,52,52,114,3,21,21,131,3,64,57,130,8,149,57,131,16,190,55,18,5,105,54,237,7,117,60,58,29,199,61,220,17,217,9,221,7,198,19,12,7,39,20,182,25,218,27,13,14,168,42,75,6,209,45,172,6,7,66,127,13,140,63,240,25,90,36,239,3,153,36,58,8,238,74,173,19,153,48,173,16,47,62,52,5,253,59,184,13,122,46,61,55,229,62,198,26,218,7,225,2,195,14,93,3,190,44,64,11,236,13,212,13,97,35,217,4,103,48,128,3,98,33,21,18,41,45,144,22,193,31,77,2,26,32,76,2,40,73,171,14,173,50,77,12,113,61,246,2,250,64,242,2,118,59,130,43,255,61,160,8,65,18,98,2,234,39,166,2,153,59,50,16,97,22,255,12,185,32,134,6,150,77,17,9,90,60,135,21,230,54,105,21,96,22,72,11,156,29,66,5,48,56,205,20,108,63,110,15,14,59,160,14,202,59,155,5,5,57,230,15,13,48,80,61,193,29,163,6,122,8,116,3,107,17,215,17,174,70,234,12,198,49,47,3,78,58,139,3,168,58,185,16,158,60,176,32,74,70,63,4,54,9,97,3,153,63,203,14,63,61,244,17,228,63,254,5,200,64,162,8,193,65,225,37,57,62,161,17,205,12,61,4,171,37,139,8,197,46,180,23,239,35,110,17,251,34,93,6,49,40,246,11,97,64,35,20,106,60,154,27,110,53,239,9,153,20,229,8,106,65,69,24,15,65,80,13,80,79,35,13,0,73,193,7,92,55,67,50,50,59,87,61,121,17,252,3,145,6,118,3,215,16,205,16,248,34,73,14,5,23,123,4,127,45,172,5,14,62,179,8,230,17,244,25,17,27,181,4,76,24,31,3,127,48,81,13,96,62,37,15,147,77,61,8,217,37,93,8,150,57,126,34,144,56,39,10,25,7,214,4,91,30,45,3,135,74,58,17,178,21,16,8,103,14,28,11,27,68,208,8,57,65,134,17,71,63,12,21,92,31,203,10,77,13,71,8,18,68,101,21,130,53,226,10,167,77,160,10,138,35,40,15,252,70,225,18,184,67,175,47,252,19,228,3,71,19,220,3,160,38,9,12,126,23,251,20,9,62,131,6,213,32,159,4,239,58,62,9,65,77,90,27,187,46,26,6,111,28,104,4,219,65,252,5,146,61,5,21,116,57,17,8,137,78,107,8,6,67,53,32,247,69,174,24,91,21,224,5,4,16,14,10,13,68,154,26,41,22,72,11,252,64,54,13,15,35,39,7,191,78,129,18,94,76,126,28,2,26,221,10,208,44,249,12,197,75,190,19,190,73,114,18,55,64,69,9,206,79,34,17,89,44,158,103,73,45,252,11,50,11,30,6,244,19,46,4,142,37,51,19,75,19,208,13,117,29,110,3,237,80,83,3,26,27,43,17,159,65,53,30,153,39,251,3,117,38,196,3,134,60,115,15,99,60,102,13,175,73,214,3,152,78,195,3,236,65,87,50,254,55,104,16,199,25,196,4,6,36,46,3,46,66,14,20,29,22,34,19,112,21,6,7,34,79,122,15,109,66,34,24,9,70,41,23,149,36,92,13,50,29,179,7,81,76,57,20,59,74,190,11,70,64,204,14,198,62,63,9,216,33,183,10,229,36,246,102,104,42,7,5,227,13,241,3,230,21,38,14,253,75,136,21,165,48,29,3,154,80,143,3,67,60,250,11,141,66,35,40,195,73,73,10,73,15,244,4,63,76,43,13,132,70,110,20,91,75,142,6,52,76,100,12,152,70,2,42,241,64,189,26,62,12,250,8,117,42,133,9,220,60,1,27,53,49,53,13,108,43,225,12,122,65,120,9,165,73,59,26,19,67,159,38,199,49,45,10,233,34,68,12,89,74,84,30,171,71,40,15,251,79,98,14,146,76,52,13,244,50,173,75,30,41,84,90,1,0,3,0,0,0,1,0,2,0,4,0,82,120,26,113,81,106,240,99,241,93,78,88,2,83,7,78,89,73,242,68,51,115,174,103,80,93,251,83,149,75,6,68,56,61,25,55,150,49,161,44,205,76,21,46,166,27,151,16,244,9,249,5,149,3,38,2,74,1,198,0,249,79,26,80,59,80,92,80,125,80,164,80,197,80,236,80,13,81,52,81,85,81,124,81,157,81,196,81,236,81,19,82,58,82,97,82,137,82,176,82,215,82,255,82,38,83,84,83,123,83,169,83,208,83,254,83,38,84,84,84,129,84,175,84,221,84,11,85,57,85,103,85,149,85,201,85,247,85,43,86,89,86,142,86,194,86,247,86,43,87,95,87,148,87,200,87,3,88,56,88,115,88,174,88,233,88,36,89,95,89,154,89,219,89,22,90,88,90,153,90,212,90,28,91,94,91,159,91,231,91,48,92,113,92,192,92,8,93,80,93,159,93,237,93,60,94,138,94,224,94,46,95,131,95,217,95,52,96,138,96,229,96,72,97,163,97,6,98,104,98,209,98,51,99,156,99,11,100,123,100,234,100,96,101,214,101,76,102,201,102,76,103,207,103,82,104,220,104,108,105,252,105,147,106,48,107,205,107,113,108,27,109,204,109,125,110,59,111,249,111,197,112,150,113,111,114,84,115,64,116,50,117,50,118,63,119,88,120,225,122,255,127,255,127,255,127,255,127,255,127,255,127,255,127,225,122,88,120,63,119,50,118,50,117,64,116,84,115,111,114,150,113,197,112,249,111,59,111,125,110,204,109,27,109,113,108,205,107,48,107,147,106,252,105,108,105,220,104,82,104,207,103,76,103,201,102,76,102,214,101,96,101,234,100,123,100,11,100,156,99,51,99,209,98,104,98,6,98,163,97,72,97,229,96,138,96,52,96,217,95,131,95,46,95,224,94,138,94,60,94,237,93,159,93,80,93,8,93,192,92,113,92,48,92,231,91,159,91,94,91,28,91,212,90,153,90,88,90,22,90,219,89,154,89,95,89,36,89,233,88,174,88,115,88,56,88,3,88,200,87,148,87,95,87,43,87,247,86,194,86,142,86,89,86,43,86,247,85,201,85,149,85,103,85,57,85,11,85,221,84,175,84,129,84,84,84,38,84,254,83,208,83,169,83,123,83,84,83,38,83,255,82,215,82,176,82,137,82,97,82,58,82,19,82,236,81,196,81,157,81,124,81,85,81,52,81,13,81,236,80,197,80,164,80,125,80,92,80,59,80,26,80,249,79,210,79,177,79,145,79,112,79,13,0,14,0,16,0,18,0,20,0,21,0,27,0,32,0,6,0,7,0,6,0,6,0,0,0,0,0,0,0,1,0,13,0,14,0,16,0,18,0,19,0,21,0,26,0,31,0,6,0,6,0,6,0,6,0,0,0,0,0,0,0,1,0,79,115,156,110,74,97,126,77,72,54,9,31,195,10,153,251,125,242,48,239,127,240,173,244,231,249,176,254,22,2,202,3,255,3,55,3,4,2,220,0,0,0,125,255,62,255,41,255,0,0,216,127,107,127,182,126,187,125,123,124,248,122,53,121,53,119,250,116,137,114,128,46,128,67,0,120,0,101,128,94,64,113,64,95,192,28,64,76,192,57,84,0,1,0,254,255,2,0,5,0,10,0,5,0,9,0,20,0,84,0,1,0,254,255,2,0,5,0,10,0,5,0,9,0,20,0,84,0,1,0,254,255,2,0,3,0,6,0,5,0,9,0,20,0,84,0,1,0,254,255,2,0,3,0,6,0,5,0,9,0,20,0,84,0,1,0,254,255,2,0,3,0,6,0,5,0,9,0,20,0,84,0,1,0,254,255,2,0,3,0,6,0,10,0,19,0,20,0,84,0,1,0,254,255,2,0,3,0,6,0,5,0,9,0,20,0,94,0,0,0,253,255,3,0,3,0,6,0,5,0,9,0,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,17,0,19,0,19,0,19,0,19,0,23,0,39,0,57,0,5,0,8,0,8,0,7,0,8,0,7,0,2,0,8,0,4,0,7,0,2,0,4,0,7,0,2,0,8,0,4,0,7,0,2,0,8,0,8,0,7,0,8,0,7,0,2,0,6,0,4,0,7,0,2,0,6,0,4,0,7,0,2,0,6,0,4,0,7,0,2,0,6,0,8,0,9,0,9,0,8,0,9,0,2,0,6,0,4,0,9,0,2,0,6,0,8,0,9,0,2,0,6,0,4,0,9,0,2,0,6,0,8,0,9,0,9,0,8,0,11,0,3,0,7,0,4,0,11,0,3,0,7,0,8,0,11,0,3,0,7,0,4,0,11,0,3,0,7,0,8,0,9,0,9,0,8,0,13,0,4,0,7,0,5,0,13,0,4,0,7,0,8,0,13,0,4,0,7,0,5,0,13,0,4,0,7,0,9,0,9,0,9,0,8,0,13,0,4,0,4,0,5,0,6,0,13,0,4,0,4,0,5,0,8,0,13,0,4,0,4,0,5,0,6,0,13,0,4,0,4,0,5,0,8,0,9,0,9,0,8,0,1,0,1,0,1,0,1,0,10,0,10,0,7,0,7,0,5,0,1,0,1,0,1,0,1,0,10,0,10,0,7,0,7,0,8,0,1,0,1,0,1,0,1,0,10,0,10,0,7,0,7,0,5,0,1,0,1,0,1,0,1,0,10,0,10,0,7,0,7,0,7,0,8,0,9,0,8,0,6,0,9,0,4,0,4,0,4,0,4,0,4,0,4,0,3,0,3,0,3,0,3,0,3,0,5,0,6,0,4,0,4,0,4,0,4,0,4,0,4,0,3,0,3,0,3,0,3,0,3,0,5,0,9,0,4,0,4,0,4,0,4,0,4,0,4,0,3,0,3,0,3,0,3,0,3,0,5,0,6,0,4,0,4,0,4,0,4,0,4,0,4,0,3,0,3,0,3,0,3,0,3,0,5,0,3,0,8,0,9,0,9,0,6,0,95,0,103,0,118,0,134,0,148,0,159,0,204,0,244,0,39,0,43,0,38,0,37,0,0,0,0,0,0,0,0,0,0,0,1,0,2,0,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,14,0,15,0,23,0,24,0,25,0,26,0,27,0,28,0,48,0,49,0,61,0,62,0,82,0,83,0,47,0,46,0,45,0,44,0,81,0,80,0,79,0,78,0,17,0,18,0,20,0,22,0,77,0,76,0,75,0,74,0,29,0,30,0,43,0,42,0,41,0,40,0,38,0,39,0,16,0,19,0,21,0,50,0,51,0,59,0,60,0,63,0,64,0,72,0,73,0,84,0,85,0,93,0,94,0,32,0,33,0,35,0,36,0,53,0,54,0,56,0,57,0,66,0,67,0,69,0,70,0,87,0,88,0,90,0,91,0,34,0,55,0,68,0,89,0,37,0,58,0,71,0,92,0,31,0,52,0,65,0,86,0,7,0,6,0,5,0,4,0,3,0,2,0,1,0,0,0,15,0,14,0,13,0,12,0,11,0,10,0,9,0,8,0,23,0,24,0,25,0,26,0,27,0,46,0,65,0,84,0,45,0,44,0,43,0,64,0,63,0,62,0,83,0,82,0,81,0,102,0,101,0,100,0,42,0,61,0,80,0,99,0,28,0,47,0,66,0,85,0,18,0,41,0,60,0,79,0,98,0,29,0,48,0,67,0,17,0,20,0,22,0,40,0,59,0,78,0,97,0,21,0,30,0,49,0,68,0,86,0,19,0,16,0,87,0,39,0,38,0,58,0,57,0,77,0,35,0,54,0,73,0,92,0,76,0,96,0,95,0,36,0,55,0,74,0,93,0,32,0,51,0,33,0,52,0,70,0,71,0,89,0,90,0,31,0,50,0,69,0,88,0,37,0,56,0,75,0,94,0,34,0,53,0,72,0,91,0,0,0,1,0,4,0,5,0,3,0,6,0,7,0,2,0,13,0,15,0,8,0,9,0,11,0,12,0,14,0,10,0,16,0,28,0,74,0,29,0,75,0,27,0,73,0,26,0,72,0,30,0,76,0,51,0,97,0,50,0,71,0,96,0,117,0,31,0,77,0,52,0,98,0,49,0,70,0,95,0,116,0,53,0,99,0,32,0,78,0,33,0,79,0,48,0,69,0,94,0,115,0,47,0,68,0,93,0,114,0,46,0,67,0,92,0,113,0,19,0,21,0,23,0,22,0,18,0,17,0,20,0,24,0,111,0,43,0,89,0,110,0,64,0,65,0,44,0,90,0,25,0,45,0,66,0,91,0,112,0,54,0,100,0,40,0,61,0,86,0,107,0,39,0,60,0,85,0,106,0,36,0,57,0,82,0,103,0,35,0,56,0,81,0,102,0,34,0,55,0,80,0,101,0,42,0,63,0,88,0,109,0,41,0,62,0,87,0,108,0,38,0,59,0,84,0,105,0,37,0,58,0,83,0,104,0,0,0,1,0,4,0,3,0,5,0,6,0,13,0,7,0,2,0,8,0,9,0,11,0,15,0,12,0,14,0,10,0,28,0,82,0,29,0,83,0,27,0,81,0,26,0,80,0,30,0,84,0,16,0,55,0,109,0,56,0,110,0,31,0,85,0,57,0,111,0,48,0,73,0,102,0,127,0,32,0,86,0,51,0,76,0,105,0,130,0,52,0,77,0,106,0,131,0,58,0,112,0,33,0,87,0,19,0,23,0,53,0,78,0,107,0,132,0,21,0,22,0,18,0,17,0,20,0,24,0,25,0,50,0,75,0,104,0,129,0,47,0,72,0,101,0,126,0,54,0,79,0,108,0,133,0,46,0,71,0,100,0,125,0,128,0,103,0,74,0,49,0,45,0,70,0,99,0,124,0,42,0,67,0,96,0,121,0,39,0,64,0,93,0,118,0,38,0,63,0,92,0,117,0,35,0,60,0,89,0,114,0,34,0,59,0,88,0,113,0,44,0,69,0,98,0,123,0,43,0,68,0,97,0,122,0,41,0,66,0,95,0,120,0,40,0,65,0,94,0,119,0,37,0,62,0,91,0,116,0,36,0,61,0,90,0,115,0,0,0,1,0,2,0,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,14,0,15,0,16,0,26,0,87,0,27,0,88,0,28,0,89,0,29,0,90,0,30,0,91,0,51,0,80,0,112,0,141,0,52,0,81,0,113,0,142,0,54,0,83,0,115,0,144,0,55,0,84,0,116,0,145,0,58,0,119,0,59,0,120,0,21,0,22,0,23,0,17,0,18,0,19,0,31,0,60,0,92,0,121,0,56,0,85,0,117,0,146,0,20,0,24,0,25,0,50,0,79,0,111,0,140,0,57,0,86,0,118,0,147,0,49,0,78,0,110,0,139,0,48,0,77,0,53,0,82,0,114,0,143,0,109,0,138,0,47,0,76,0,108,0,137,0,32,0,33,0,61,0,62,0,93,0,94,0,122,0,123,0,41,0,42,0,43,0,44,0,45,0,46,0,70,0,71,0,72,0,73,0,74,0,75,0,102,0,103,0,104,0,105,0,106,0,107,0,131,0,132,0,133,0,134,0,135,0,136,0,34,0,63,0,95,0,124,0,35,0,64,0,96,0,125,0,36,0,65,0,97,0,126,0,37,0,66,0,98,0,127,0,38,0,67,0,99,0,128,0,39,0,68,0,100,0,129,0,40,0,69,0,101,0,130,0,8,0,7,0,6,0,5,0,4,0,3,0,2,0,14,0,16,0,9,0,10,0,12,0,13,0,15,0,11,0,17,0,20,0,22,0,24,0,23,0,19,0,18,0,21,0,56,0,88,0,122,0,154,0,57,0,89,0,123,0,155,0,58,0,90,0,124,0,156,0,52,0,84,0,118,0,150,0,53,0,85,0,119,0,151,0,27,0,93,0,28,0,94,0,29,0,95,0,30,0,96,0,31,0,97,0,61,0,127,0,62,0,128,0,63,0,129,0,59,0,91,0,125,0,157,0,32,0,98,0,64,0,130,0,1,0,0,0,25,0,26,0,33,0,99,0,34,0,100,0,65,0,131,0,66,0,132,0,54,0,86,0,120,0,152,0,60,0,92,0,126,0,158,0,55,0,87,0,121,0,153,0,117,0,116,0,115,0,46,0,78,0,112,0,144,0,43,0,75,0,109,0,141,0,40,0,72,0,106,0,138,0,36,0,68,0,102,0,134,0,114,0,149,0,148,0,147,0,146,0,83,0,82,0,81,0,80,0,51,0,50,0,49,0,48,0,47,0,45,0,44,0,42,0,39,0,35,0,79,0,77,0,76,0,74,0,71,0,67,0,113,0,111,0,110,0,108,0,105,0,101,0,145,0,143,0,142,0,140,0,137,0,133,0,41,0,73,0,107,0,139,0,37,0,69,0,103,0,135,0,38,0,70,0,104,0,136,0,7,0,6,0,5,0,4,0,3,0,2,0,1,0,0,0,16,0,15,0,14,0,13,0,12,0,11,0,10,0,9,0,8,0,26,0,27,0,28,0,29,0,30,0,31,0,115,0,116,0,117,0,118,0,119,0,120,0,72,0,73,0,161,0,162,0,65,0,68,0,69,0,108,0,111,0,112,0,154,0,157,0,158,0,197,0,200,0,201,0,32,0,33,0,121,0,122,0,74,0,75,0,163,0,164,0,66,0,109,0,155,0,198,0,19,0,23,0,21,0,22,0,18,0,17,0,20,0,24,0,25,0,37,0,36,0,35,0,34,0,80,0,79,0,78,0,77,0,126,0,125,0,124,0,123,0,169,0,168,0,167,0,166,0,70,0,67,0,71,0,113,0,110,0,114,0,159,0,156,0,160,0,202,0,199,0,203,0,76,0,165,0,81,0,82,0,92,0,91,0,93,0,83,0,95,0,85,0,84,0,94,0,101,0,102,0,96,0,104,0,86,0,103,0,87,0,97,0,127,0,128,0,138,0,137,0,139,0,129,0,141,0,131,0,130,0,140,0,147,0,148,0,142,0,150,0,132,0,149,0,133,0,143,0,170,0,171,0,181,0,180,0,182,0,172,0,184,0,174,0,173,0,183,0,190,0,191,0,185,0,193,0,175,0,192,0,176,0,186,0,38,0,39,0,49,0,48,0,50,0,40,0,52,0,42,0,41,0,51,0,58,0,59,0,53,0,61,0,43,0,60,0,44,0,54,0,194,0,179,0,189,0,196,0,177,0,195,0,178,0,187,0,188,0,151,0,136,0,146,0,153,0,134,0,152,0,135,0,144,0,145,0,105,0,90,0,100,0,107,0,88,0,106,0,89,0,98,0,99,0,62,0,47,0,57,0,64,0,45,0,63,0,46,0,55,0,56,0,0,0,1,0,2,0,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,14,0,23,0,15,0,16,0,17,0,18,0,19,0,20,0,21,0,22,0,24,0,25,0,26,0,27,0,28,0,38,0,141,0,39,0,142,0,40,0,143,0,41,0,144,0,42,0,145,0,43,0,146,0,44,0,147,0,45,0,148,0,46,0,149,0,47,0,97,0,150,0,200,0,48,0,98,0,151,0,201,0,49,0,99,0,152,0,202,0,86,0,136,0,189,0,239,0,87,0,137,0,190,0,240,0,88,0,138,0,191,0,241,0,91,0,194,0,92,0,195,0,93,0,196,0,94,0,197,0,95,0,198,0,29,0,30,0,31,0,32,0,33,0,34,0,35,0,50,0,100,0,153,0,203,0,89,0,139,0,192,0,242,0,51,0,101,0,154,0,204,0,55,0,105,0,158,0,208,0,90,0,140,0,193,0,243,0,59,0,109,0,162,0,212,0,63,0,113,0,166,0,216,0,67,0,117,0,170,0,220,0,36,0,37,0,54,0,53,0,52,0,58,0,57,0,56,0,62,0,61,0,60,0,66,0,65,0,64,0,70,0,69,0,68,0,104,0,103,0,102,0,108,0,107,0,106,0,112,0,111,0,110,0,116,0,115,0,114,0,120,0,119,0,118,0,157,0,156,0,155,0,161,0,160,0,159,0,165,0,164,0,163,0,169,0,168,0,167,0,173,0,172,0,171,0,207,0,206,0,205,0,211,0,210,0,209,0,215,0,214,0,213,0,219,0,218,0,217,0,223,0,222,0,221,0,73,0,72,0,71,0,76,0,75,0,74,0,79,0,78,0,77,0,82,0,81,0,80,0,85,0,84,0,83,0,123,0,122,0,121,0,126,0,125,0,124,0,129,0,128,0,127,0,132,0,131,0,130,0,135,0,134,0,133,0,176,0,175,0,174,0,179,0,178,0,177,0,182,0,181,0,180,0,185,0,184,0,183,0,188,0,187,0,186,0,226,0,225,0,224,0,229,0,228,0,227,0,232,0,231,0,230,0,235,0,234,0,233,0,238,0,237,0,236,0,96,0,199,0,0,0,2,0,0,0,3,0,0,0,2,0,0,0,3,0,1,0,3,0,2,0,4,0,1,0,4,0,1,0,4,0,0,0,205,12,156,25,0,32,102,38,205,44,0,48,51,51,102,54,154,57,205,60,0,64,51,67,102,70,154,73,205,76,159,0,64,241,53,167,206,0,190,242,52,176,12,1,67,244,88,185,93,1,201,245,133,194,163,1,215,246,223,200,226,1,166,247,189,205,42,2,116,248,147,210,125,2,66,249,109,215,221,2,18,250,77,220,74,3,222,250,30,225,201,3,174,251,0,230,90,4,124,252,216,234,1,5,74,253,179,239,193,5,25,254,141,244,158,6,231,254,104,249,156,7,181,255,67,254,193,8,133,0,33,3,17,10,83,1,252,7,147,11,33,2,213,12,80,13,240,2,178,17,79,15,190,3,140,22,155,17,141,4,104,27,63,20,91,5,67,32,72,23,41,6,29,37,199,26,248,6,249,41,203,30,199,7,212,46,105,35,149,8,175,51,185,40,100,9,138,56,222,48,113,10,224,62,135,63,244,11,253,71,150,82,120,13,27,81,93,107,252,14,57,90,93,107,252,14,57,90,0,0,1,0,3,0,2,0,6,0,4,0,5,0,7,0,0,0,1,0,3,0,2,0,5,0,6,0,4,0,7,0,248,127,211,127,76,127,108,126,51,125,163,123,188,121,127,119,239,116,12,114,217,110,89,107,141,103,121,99,31,95,130,90,166,85,141,80,60,75,182,69,0,64,28,58,15,52,223,45,141,39,32,33,156,26,6,20,97,13,178,6,0,0,78,249,159,242,250,235,100,229,224,222,115,216,33,210,241,203,228,197,0,192,74,186,196,180,115,175,90,170,126,165,225,160,135,156,115,152,167,148,39,145,244,141,17,139,129,136,68,134,93,132,205,130,148,129,180,128,45,128,8,128,255,127,46,124,174,120,118,117,125,114,186,111,41,109,194,106,131,104,102,102,105,100,137,98,194,96,19,95,122,93,245,91,130,90,33,89,207,87,139,86,85,85,44,84,15,83,252,81,244,80,246,79,1,79,20,78,48,77,83,76,126,75,175,74,231,73,37,73,104,72,178,71,0,71,84,70,173,69,10,69,107,68,209,67,59,67,168,66,25,66,142,65,6,65,130,64,0,64,0,0,175,5,50,11,140,16,192,21,207,26,188,31,136,36,53,41,196,45,55,50,143,54,206,58,245,62,4,67,252,70,223,74,174,78,105,82,17,86,167,89,44,93,159,96,3,100,87,103,155,106,209,109,250,112,20,116,33,119,34,122,23,125,255,127,255,127,217,127,98,127,157,126,138,125,42,124,125,122,133,120,66,118,182,115,227,112,202,109,110,106,208,102,242,98,215,94,130,90,246,85,52,81,64,76,29,71,206,65,87,60,186,54,252,48,31,43,40,37,26,31,249,24,200,18,140,12,72,6,0,0,184,249,116,243,56,237,7,231,230,224,216,218,225,212,4,207,70,201,169,195,50,190,227,184,192,179,204,174,10,170,126,165,41,161,14,157,48,153,146,149,54,146,29,143,74,140,190,137,123,135,131,133,214,131,118,130,99,129,158,128,39,128,0,128,249,150,148,221,53,235,27,241,93,244,116,246,223,247,237,248,184,249,86,250,214,250,61,251,148,251,221,251,26,252,78,252,123,252,163,252,197,252,227,252,252,252,18,253,38,253,55,253,69,253,81,253,91,253,100,253,106,253,111,253,114,253,116,253,116,253,114,253,111,253,106,253,100,253,91,253,81,253,69,253,55,253,38,253,18,253,252,252,227,252,197,252,163,252,123,252,78,252,26,252,221,251,148,251,61,251,214,250,86,250,184,249,237,248,223,247,116,246,93,244,27,241,53,235,148,221,249,150,48,117,144,101,8,82,152,58,64,31,0,0,192,224,104,197,248,173,112,154,153,104,33,3,201,9,85,253,154,250,70,2,92,2,6,251,183,13,250,232,182,17,13,254,108,248,195,11,62,236,238,21,58,248,219,251,77,250,90,17,68,253,41,235,1,18,196,1,179,253,232,242,137,11,243,4,68,251,226,245,195,6,86,14,133,238,49,252,39,17,23,246,181,3,173,250,45,252,102,22,66,118,247,14,60,240,156,11,232,251,22,252,173,9,29,244,255,10,73,247,217,6,181,249,178,6,17,249,7,6,16,252,173,1,87,255,216,1,16,251,128,8,110,245,219,9,171,249,88,1,58,3,7,250,188,6,135,249,165,6,241,247,84,10,12,244,81,11,70,248,45,2,12,3,167,250,74,3,143,2,98,57,254,44,244,4,55,245,217,233,90,29,221,255,9,245,32,244,215,18,136,11,24,223,201,14,175,5,131,8,67,222,115,31,201,247,82,250,9,3,84,4,175,246,206,8,149,254,94,253,201,247,158,23,207,233,48,4,51,12,62,236,192,20,231,246,112,241,12,27,207,240,163,2,17,249,29,0,161,39,66,118,247,14,60,240,156,11,232,251,22,252,173,9,29,244,255,10,73,247,217,6,181,249,178,6,17,249,7,6,16,252,173,1,87,255,216,1,16,251,128,8,110,245,219,9,171,249,88,1,58,3,7,250,188,6,135,249,165,6,241,247,84,10,12,244,81,11,70,248,45,2,12,3,167,250,74,3,143,2,0,64,103,65,213,66,76,68,203,69,82,71,226,72,122,74,28,76,199,77,123,79,56,81,255,82,209,84,172,86,146,88,130,90,126,92,132,94,150,96,180,98,221,100,18,103,84,105,162,107,254,109,102,112,221,114,96,117,242,119,147,122,66,125,255,127,3,115,186,110,119,98,225,79,109,57,245,33,71,12,184,250,206,238,23,233,38,233,191,237,33,245,96,253,187,4,232,9,58,12,175,11,211,8,146,4,0,0,23,252,140,249,180,248,126,249,133,251,48,254,218,0,244,2,36,4,75,4,136,3,38,2,135,0,11,255,254,253,134,253,166,253,61,254,25,255,0,0,191,0,52,1,84,1,40,1,198,0,78,0,220,255,136,255,93,255,91,255,124,255,177,255,237,255,34,0,73,0,91,0,89,0,70,0,38,0,0,0,254,254,194,254,73,254,134,253,112,253,251,252,57,253,10,254,244,254,63,255,254,255,125,0,122,0,217,255,247,255,105,0,129,0,27,1,116,1,63,2,235,254,188,254,59,255,25,254,67,254,150,254,220,254,229,255,177,0,31,2,86,1,5,2,4,2,130,0,27,0,152,255,136,255,116,255,182,255,200,255,204,253,81,252,16,250,59,252,210,252,242,253,190,254,254,255,159,0,145,2,200,254,228,254,126,254,171,253,19,254,242,253,94,254,27,255,105,0,193,1,211,253,154,252,205,251,105,252,74,252,16,253,59,253,196,254,62,0,230,1,198,254,65,255,53,255,182,254,96,255,153,255,205,255,131,0,82,1,3,2,10,6,224,8,194,14,112,21,60,27,190,32,63,39,221,43,222,49,146,53,84,37,17,42,27,49,236,51,45,56,131,45,92,41,39,38,145,33,84,25,6,0,82,0,125,255,154,0,200,255,33,253,183,0,191,255,247,254,9,0,46,255,151,254,113,0,206,2,25,7,242,3,190,4,37,6,89,3,53,5,228,8,59,3,32,6,141,7,205,2,197,7,158,8,70,3,148,4,31,7,209,2,232,3,106,8,30,1,220,1,229,5,9,255,237,253,230,0,147,0,174,255,57,2,26,0,79,255,80,252,229,255,239,254,180,2,92,255,248,254,73,255,224,0,22,3,15,4,131,3,178,3,89,2,229,1,3,3,126,4,12,2,165,2,135,3,116,255,119,1,10,3,154,1,164,2,173,1,45,1,18,2,241,3,207,2,134,2,38,0,226,0,111,1,40,0,145,0,211,255,7,254,34,1,121,0,135,255,46,1,127,0,166,0,132,255,129,254,68,252,154,254,57,254,47,252,203,2,110,3,126,3,210,3,155,3,211,0,221,1,16,1,64,0,188,0,178,255,17,0,113,255,191,255,38,0,131,2,74,2,109,2,122,255,86,254,117,253,91,1,33,2,4,11,164,4,166,10,138,9,142,0,176,255,199,6,27,1,130,0,205,1,250,254,113,254,135,251,101,254,155,0,174,1,73,1,119,1,11,3,53,0,30,255,117,255,127,255,20,255,146,6,29,1,232,2,47,5,226,2,185,2,128,6,56,1,153,1,10,1,69,1,208,2,135,0,1,0,221,0,197,1,8,0,203,0,145,0,43,1,128,2,248,2,29,0,212,1,126,2,103,0,173,1,123,1,164,1,186,3,164,3,46,5,186,4,234,4,192,2,244,3,128,4,90,255,68,254,246,254,196,254,126,255,136,254,191,0,127,4,112,7,16,255,225,253,20,251,144,255,12,1,183,4,70,0,38,4,47,6,22,1,80,5,38,6,254,254,240,254,0,253,19,0,51,2,192,8,253,255,247,254,135,0,217,254,177,253,124,254,140,0,98,1,50,255,252,254,8,254,229,252,79,254,50,253,217,250,109,0,75,1,194,3,83,254,169,255,140,2,216,254,170,1,251,3,17,255,7,3,83,3,233,1,54,5,49,4,178,254,180,254,25,0,31,2,182,4,15,7,70,1,61,0,215,2,66,2,81,3,125,5,48,255,235,254,73,1,104,255,64,0,157,2,78,254,90,253,41,253,58,254,185,255,251,0,93,2,224,1,254,0,30,254,11,0,228,3,223,254,139,1,230,1,210,2,25,4,160,5,226,255,196,254,238,252,150,255,141,255,149,253,93,3,194,5,132,5,31,4,86,5,160,4,44,3,213,4,157,3,42,0,5,255,192,253,86,1,141,0,58,254,88,255,176,255,79,5,170,254,112,253,29,249,100,0,53,3,213,2,222,3,235,2,32,3,76,1,184,1,56,2,151,2,123,1,84,3,112,0,165,0,143,254,85,2,142,3,26,1,248,255,66,3,1,5,160,254,60,2,183,2,206,1,198,8,14,7,89,1,190,0,94,5,160,1,147,3,118,8,168,0,174,255,24,1,252,253,66,254,72,3,47,0,21,2,44,0,150,254,57,253,137,251,22,0,193,0,192,5,171,255,233,0,21,7,194,255,67,2,224,5,38,2,176,3,213,6,211,2,138,2,124,4,204,3,116,3,115,5,87,254,131,2,0,0,232,3,184,3,74,4,249,0,166,5,160,2,178,254,169,255,124,8,214,253,90,7,112,10,140,0,34,7,61,7,152,3,213,6,30,10,52,4,141,7,246,7,119,255,69,254,237,249,245,4,150,4,212,1,19,254,134,255,241,5,61,254,9,4,190,4,226,1,159,6,94,4,47,3,137,2,128,1,66,254,76,253,107,0,193,254,163,253,138,255,49,255,7,254,13,2,44,254,244,255,176,10,75,0,142,7,25,5,112,3,54,9,219,8,5,5,39,6,212,7,208,255,208,254,94,251,77,254,51,254,5,255,146,254,108,254,221,253,223,254,163,253,171,253,230,253,214,252,91,255,136,255,3,0,100,1,127,2,217,4,222,5,96,0,177,0,238,2,77,254,183,253,106,251,156,254,109,0,177,255,27,254,32,1,213,7,9,0,92,4,219,2,112,3,86,8,178,3,247,254,49,6,41,4,133,4,186,4,75,3,14,254,100,253,175,1,118,1,65,1,27,255,160,5,53,8,101,5,193,1,205,1,131,4,151,255,39,0,128,254,249,254,111,1,182,0,141,254,108,253,5,3,68,255,127,4,203,3,53,5,96,6,155,5,6,3,243,4,197,4,30,254,192,252,47,250,19,255,46,255,92,3,122,3,79,6,40,4,216,1,38,4,168,4,185,0,53,4,221,3,200,253,32,252,88,249,63,254,122,252,5,248,114,255,135,254,54,254,46,255,214,253,251,251,245,255,109,4,217,8,183,254,93,253,131,252,6,255,145,2,163,4,7,2,230,5,243,6,8,2,27,2,123,5,15,2,141,5,22,5,205,253,153,252,32,251,109,255,49,254,111,3,180,255,30,9,24,11,51,2,13,10,81,9,120,2,134,7,104,11,207,2,231,7,48,7,223,253,45,253,84,4,129,0,131,255,116,3,137,5,96,6,157,3,162,255,30,6,215,6,171,254,253,5,15,6,79,2,139,1,238,254,180,255,213,3,15,11,153,0,169,11,52,7,8,4,5,10,189,10,228,5,16,11,87,7,23,3,175,4,26,2,66,255,59,254,209,5,234,254,220,253,134,4,11,255,149,7,252,7,0,4,24,6,114,6,0,2,253,0,210,1,194,255,189,254,127,4,39,254,136,254,251,1,79,254,100,5,114,8,131,3,151,7,165,5,134,0,192,2,184,1,204,1,13,2,228,255,62,254,23,1,58,5,0,0,203,3,252,0,67,254,141,253,33,252,164,254,166,253,112,250,142,1,200,2,120,6,149,255,58,1,78,255,93,0,178,8,190,8,6,2,81,3,144,2,50,254,57,253,65,254,174,0,222,255,167,4,137,255,42,0,237,3,140,254,18,1,246,2,12,4,48,9,46,7,163,2,188,6,218,5,174,1,6,5,85,8,127,255,73,254,0,0,139,254,32,3,96,8,6,0,51,6,174,9,222,1,84,2,80,8,84,254,32,253,225,5,129,1,178,0,212,3,139,0,193,1,201,4,242,253,182,252,42,252,145,0,18,6,218,4,111,2,168,5,144,2,93,1,248,3,202,5,31,0,232,254,159,1,196,254,212,2,105,6,104,1,34,4,44,2,76,254,154,254,177,4,157,254,99,4,147,7,145,1,48,6,200,8,241,253,12,252,99,1,233,0,238,0,185,8,218,253,127,252,129,253,147,254,11,254,165,7,133,1,68,7,85,6,162,0,108,4,240,4,19,255,150,4,110,5,128,253,101,254,116,0,28,255,158,6,250,8,103,6,138,8,219,8,50,2,249,4,98,10,67,1,82,1,238,6,66,2,83,4,84,3,22,0,82,2,166,3,113,255,206,2,190,1,50,0,71,0,247,255,174,254,70,253,129,250,102,0,118,255,204,252,202,254,43,254,133,251,158,1,67,0,245,254,36,4,46,3,161,5,12,6,80,5,248,4,218,6,103,7,125,6,227,7,85,8,28,7,16,7,14,9,53,7,132,2,163,255,198,1,90,3,73,1,120,255,233,1,254,254,128,255,58,255,23,253,215,255,204,255,247,254,39,252,90,1,137,0,223,1,51,249,20,253,84,253,117,251,67,249,145,254,129,252,135,251,240,252,24,254,78,252,56,252,171,255,122,254,43,253,215,0,172,254,85,255,252,3,148,3,177,7,52,2,179,0,234,2,150,2,209,3,198,6,119,3,110,2,146,3,171,3,88,3,141,4,53,1,176,2,35,3,149,3,161,0,58,2,118,0,236,255,229,254,208,252,214,255,204,0,52,251,187,254,50,254,61,252,54,255,113,255,36,252,28,254,151,254,66,253,46,252,35,254,210,254,234,252,92,251,156,255,238,252,192,251,226,251,77,252,108,249,54,255,181,252,242,252,241,251,158,250,123,252,144,253,146,255,171,255,100,1,213,0,246,255,19,254,108,1,6,3,169,1,54,3,223,1,173,255,45,2,8,2,32,252,232,249,196,253,165,253,27,253,230,255,10,254,130,253,121,252,209,0,50,1,147,0,196,254,175,253,172,253,171,255,45,255,31,255,106,252,239,253,117,0,233,0,73,254,30,253,77,4,239,2,121,2,177,5,180,6,231,5,229,6,177,5,142,3,98,4,132,4,81,3,74,5,100,3,214,1,153,252,130,251,252,248,153,252,163,252,32,252,138,255,155,0,212,0,229,251,175,252,162,253,163,251,199,248,66,245,5,252,109,250,179,248,114,1,72,255,98,254,191,3,237,1,104,0,190,3,15,4,31,2,154,0,141,2,201,0,225,4,251,1,150,0,151,2,247,1,230,0,111,2,9,3,163,2,147,2,88,0,146,255,75,3,244,0,224,0,126,1,29,2,46,1,212,2,177,1,154,2,142,4,222,2,85,1,118,255,20,0,115,254,97,251,88,254,210,255,191,254,160,254,132,255,53,5,253,3,56,4,6,1,110,1,211,2,154,3,27,1,217,253,31,0,132,253,157,253,79,253,71,253,97,254,72,252,245,252,55,255,207,250,170,253,153,254,71,252,251,250,166,0,237,1,49,1,221,0,78,3,191,2],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE);allocate([98,2,72,3,168,3,6,3,45,253,212,250,19,251,155,254,255,251,148,250,184,251,160,250,147,254,120,250,167,248,160,253,250,248,65,249,94,253,223,253,107,251,65,253,166,2,18,3,148,0,133,255,184,2,8,5,132,2,94,1,246,255,158,1,102,2,15,0,137,0,88,1,45,255,210,252,24,250,205,252,121,254,94,252,180,253,47,0,177,253,126,252,115,252,183,251,93,255,8,251,113,251,99,255,72,250,11,250,123,254,6,251,92,251,144,253,159,2,213,0,198,1,124,0,238,254,243,253,39,253,16,254,104,255,192,250,122,0,135,0,167,244,179,253,118,254,64,249,185,1,206,255,196,5,136,3,19,3,60,1,236,0,72,254,165,254,217,0,157,1,113,252,107,252,121,0,57,254,92,252,202,0,164,255,47,254,137,254,232,1,134,1,218,1,108,3,217,2,60,1,233,248,224,250,99,253,87,0,194,3,176,1,51,2,7,255,222,251,250,0,29,1,81,4,117,4,171,1,184,2,242,251,128,249,210,249,76,252,90,1,160,0,203,254,240,254,166,252,158,2,112,2,226,4,80,252,104,254,102,253,162,253,192,254,128,254,20,254,230,0,65,0,78,1,206,255,240,255,240,255,78,253,139,250,255,6,180,6,119,5,174,9,15,8,124,5,221,4,191,5,146,5,130,254,243,251,254,255,173,0,114,254,121,4,211,5,232,7,9,7,4,3,250,4,226,5,149,5,199,6,209,7,55,4,194,4,249,4,126,251,197,248,207,250,216,252,147,251,184,251,61,254,247,251,70,249,65,0,66,2,172,255,60,250,126,246,14,249,3,253,170,250,18,254,38,255,174,253,93,252,81,1,20,255,50,2,53,9,102,10,146,7,209,5,252,4,106,3,189,0,102,1,118,1,17,250,23,247,214,246,57,252,9,251,209,247,140,253,92,251,250,249,125,6,19,4,34,2,53,2,37,4,220,2,192,255,188,252,78,254,76,254,160,255,203,0,54,4,192,4,100,6,139,3,254,5,218,3,70,1,197,3,77,3,142,0,172,255,197,0,214,1,75,9,34,6,109,4,214,1,190,4,139,1,96,5,176,4,101,4,18,4,92,1,225,253,46,251,136,254,41,255,75,255,225,1,101,248,171,249,46,255,18,253,95,251,134,1,29,0,113,254,27,0,52,3,212,4,243,2,183,2,211,3,153,1,82,255,173,4,11,4,144,3,76,5,54,7,32,252,99,250,228,1,51,250,92,249,208,0,100,254,180,4,152,5,241,254,128,3,120,4,96,254,241,6,154,5,96,249,172,245,52,255,3,249,241,249,9,4,136,249,233,249,23,5,27,251,203,249,57,4,99,253,185,251,190,255,86,253,64,1,167,254,147,2,49,1,45,4,244,250,220,252,237,255,157,249,245,250,29,0,109,249,15,254,71,0,225,254,249,255,156,255,18,254,62,252,19,255,84,3,89,7,204,6,63,251,149,250,227,0,108,253,46,1,117,1,96,0,63,4,233,4,206,251,123,249,160,0,229,1,28,8,6,7,90,252,36,255,40,2,172,253,156,253,237,0,80,1,184,6,111,3,131,2,117,2,178,1,243,4,10,2,97,6,15,0,244,0,71,254,195,5,205,2,184,0,27,7,54,6,173,6,220,3,5,1,169,3,45,8,41,9,240,5,91,8,66,7,70,6,191,253,189,253,77,251,68,252,135,0,24,254,48,254,51,0,174,254,139,253,164,254,45,253,122,4,25,8,162,5,144,8,186,5,143,3,92,250,220,249,26,247,120,5,198,2,17,5,55,5,121,2,160,3,154,5,146,8,34,10,118,9,156,8,89,7,214,3,194,8,62,7,124,1,24,3,121,4,193,255,229,253,158,1,4,255,60,252,198,254,19,251,85,253,244,252,193,252,242,253,19,252,126,249,145,251,88,254,181,249,60,254,213,254,244,4,24,4,130,2,123,4,85,3,88,3,93,253,176,254,139,0,220,8,63,5,138,5,29,0,0,3,29,3,56,251,167,1,52,2,218,250,198,251,245,0,234,250,212,252,61,2,238,250,175,249,134,2,56,252,66,3,211,2,225,3,116,6,235,7,65,255,207,252,176,1,150,2,60,0,198,0,114,2,229,3,50,5,112,6,171,7,9,5,195,249,163,255,211,255,192,251,37,0,172,255,117,6,47,10,33,9,41,4,248,7,73,9,115,4,22,9,70,8,91,3,101,1,230,5,152,2,203,4,75,4,223,1,80,5,144,3,105,7,218,6,227,7,144,4,117,7,248,6,143,1,34,0,0,1,175,253,208,254,227,251,35,2,158,6,127,5,135,2,157,255,171,254,212,5,111,6,166,4,38,0,124,253,44,255,139,1,78,3,222,0,64,253,3,253,52,253,44,253,84,248,12,245,106,255,35,1,174,255,209,4,179,5,239,3,116,255,101,255,153,0,183,1,41,1,32,6,7,250,102,254,132,253,0,6,199,1,19,255,208,250,117,255,252,254,19,2,42,2,100,3,13,1,240,4,94,2,23,255,115,3,207,1,230,2,88,2,136,255,183,255,165,1,212,0,73,254,198,255,36,3,250,250,39,251,216,2,38,1,22,254,50,0,177,253,119,252,26,251,42,0,81,253,147,0,231,255,17,1,84,2,201,254,189,4,89,2,14,253,81,3,72,2,173,1,95,2,75,2,166,253,90,255,205,1,228,252,201,252,9,3,100,5,142,3,219,6,119,0,137,5,204,3,37,255,144,252,196,249,231,251,14,252,182,1,55,253,157,250,78,0,0,0,65,254,101,251,144,251,217,250,219,249,200,8,231,6,29,5,178,3,47,6,152,5,126,4,226,1,180,1,43,254,172,251,106,2,65,254,58,252,64,4,28,251,21,250,142,255,176,251,40,248,189,253,210,0,101,2,241,1,73,248,99,250,130,2,11,251,168,252,243,3,146,249,95,251,39,4,237,249,96,253,180,4,100,249,166,251,111,2,45,252,210,250,3,251,27,2,109,255,126,3,182,250,127,252,78,254,120,3,219,1,172,1,153,0,128,254,82,1,44,250,1,254,103,1,50,252,165,251,42,254,105,0,218,253,165,2,87,252,135,251,109,3,124,1,252,254,210,0,149,6,156,3,232,4,239,6,166,4,71,4,139,5,119,2,21,2,115,2,43,1,165,254,101,254,234,253,135,2,118,253,29,0,173,253,134,254,169,250,27,6,122,5,97,4,185,5,65,4,130,5,136,2,208,247,190,251,250,255,55,1,62,255,155,252,129,253,193,252,160,1,118,251,56,251,69,5,33,251,83,252,21,7,111,247,61,248,197,1,149,253,169,250,68,252,186,249,76,248,29,250,105,251,223,251,176,251,135,254,89,2,201,0,84,7,57,3,118,1,82,254,213,250,29,0,139,250,31,251,205,250,17,252,32,250,192,3,135,250,39,248,197,0,157,250,99,248,20,255,203,251,123,0,166,1,103,2,245,4,34,2,206,254,246,5,136,3,170,4,252,6,153,4,142,253,140,252,10,250,199,0,254,2,224,5,215,251,94,3,197,0,246,251,19,249,137,252,224,252,145,0,87,2,146,251,249,253,114,2,75,251,122,248,244,1,114,252,239,251,141,250,60,250,225,249,55,252,245,253,74,3,34,0,2,7,134,2,94,3,73,251,160,248,22,252,178,255,247,255,96,253,20,4,247,2,80,0,168,253,115,4,251,3,57,0,208,7,142,5,191,252,134,5,97,4,78,251,94,6,236,4,51,254,140,5,220,4,1,6,207,3,253,0,229,254,68,1,153,254,87,2,61,255,106,0,76,2,62,0,181,253,11,253,133,2,205,0,51,0,177,4,246,2,71,251,161,2,122,254,144,253,45,6,173,3,105,255,255,3,223,2,4,11,21,5,178,2,210,254,12,2,157,255,124,252,204,249,91,251,60,4,251,0,238,0,222,7,0,7,242,3,221,4,97,6,205,6,53,251,252,249,72,251,147,253,200,1,147,255,40,0,191,255,20,3,219,252,69,253,186,250,185,253,136,3,64,3,223,252,20,2,82,2,180,7,128,5,71,5,103,251,168,248,190,247,251,252,56,2,180,3,9,252,55,4,236,4,169,251,226,1,126,255,242,6,20,4,12,3,45,250,245,0,144,3,196,254,139,251,107,252,232,253,94,250,214,246,239,252,246,249,60,248,45,248,1,1,141,3,199,248,135,253,71,251,254,249,130,248,226,251,70,6,191,8,40,6,201,253,36,250,248,249,1,251,195,0,89,5,207,252,37,1,195,4,243,253,118,2,173,4,94,249,135,246,208,248,209,254,219,2,235,2,111,251,5,255,13,1,74,252,181,255,148,6,98,251,59,254,237,3,193,249,73,2,122,1,229,247,197,253,85,254,239,253,121,251,109,251,229,254,51,255,204,253,228,252,222,4,205,2,229,8,159,3,27,2,58,254,47,2,184,1,51,253,180,5,79,6,250,251,28,4,74,6,111,251,118,255,79,3,226,0,39,0,156,253,29,251,150,255,39,253,117,253,200,3,22,5,54,253,132,253,191,6,97,1,45,4,154,1,226,252,100,255,75,4,194,253,150,3,190,1,226,250,244,3,210,1,128,5,55,6,253,2,149,5,100,5,221,6,157,7,164,7,74,9,42,6,255,7,100,8,148,3,98,0,249,255,101,7,138,5,93,8,92,1,125,5,43,6,152,0,110,4,9,7,245,254,154,0,115,5,114,251,213,1,30,4,138,251,107,254,207,251,195,250,40,247,211,249,148,254,101,3,170,6,118,251,37,2,14,6,55,251,116,248,126,249,51,250,71,248,249,247,65,249,118,252,158,255,151,248,233,0,212,5,124,3,108,0,181,254,64,249,110,251,92,249,220,251,188,7,254,6,210,251,51,249,139,248,245,255,3,6,37,5,192,249,94,0,241,1,165,1,187,1,59,255,214,249,163,254,30,252,169,253,229,253,116,4,59,252,117,250,127,255,195,250,175,0,65,254,137,254,31,5,7,8,141,254,118,253,205,254,207,251,93,2,109,1,247,247,143,255,174,1,140,2,146,3,199,3,12,252,206,249,237,246,225,5,224,4,47,2,6,1,26,254,111,254,65,249,62,5,10,6,50,0,56,0,176,1,182,254,119,0,164,253,19,250,200,251,214,252,178,3,103,4,31,4,136,250,89,249,80,249,10,251,64,253,219,250,39,3,29,7,119,4,200,10,70,6,123,8,96,4,153,1,106,255,109,255,148,1,191,3,135,9,119,7,141,8,118,252,115,255,158,252,120,252,114,255,54,254,211,253,60,253,113,249,194,252,105,250,209,249,206,248,190,250,194,251,188,249,240,254,147,3,84,251,4,3,32,4,130,253,46,251,151,248,12,254,175,255,202,252,247,250,179,249,33,253,139,255,17,3,168,0,190,251,109,4,154,3,184,251,22,253,104,5,31,1,221,253,217,251,160,250,103,247,76,251,128,247,222,249,35,249,25,250,63,247,253,252,55,249,75,4,62,3,204,249,212,2,219,4,250,249,181,2,37,3,102,249,16,255,129,6,92,249,252,255,100,253,101,8,48,3,18,4,206,252,207,248,22,0,4,253,5,254,193,1,129,251,151,253,33,1,181,252,196,249,16,255,242,1,22,255,111,253,16,253,224,1,142,6,193,254,31,254,193,0,213,252,171,0,137,255,176,247,54,255,176,252,181,6,116,4,164,6,67,0,239,255,66,0,244,255,102,249,187,253,152,255,240,254,204,251,94,251,203,248,136,254,140,251,98,252,92,254,198,255,253,254,112,253,146,251,215,253,252,6,203,4,199,1,129,0,206,1,185,1,16,255,240,253,72,3,2,2,130,0,181,255,90,4,111,2,153,0,216,0,44,4,52,2,250,255,236,254,95,4,215,2,190,0,188,255,192,2,50,1,119,0,248,254,73,1,61,0,156,255,156,0,108,1,123,0,183,0,48,255,85,255,133,255,220,0,191,255,206,254,194,255,146,1,17,0,108,253,86,252,246,254,0,0,129,1,235,0,20,1,29,1,64,1,12,1,176,254,56,255,44,253,17,0,172,255,125,1,224,253,173,1,238,1,7,2,139,255,32,1,48,1,73,1,131,2,157,0,189,2,252,1,176,4,113,2,28,3,96,2,230,3,165,1,236,1,120,2,180,4,12,3,190,1,132,0,233,4,76,3,35,2,193,1,61,3,146,2,29,2,214,1,108,4,234,4,150,3,127,2,35,2,51,0,167,1,23,1,9,0,136,1,83,0,94,0,30,2,31,2,229,0,109,255,58,255,129,0,194,0,71,255,161,252,215,250,210,254,30,0,171,253,139,253,237,255,114,0,124,252,199,251,210,1,97,1,53,250,219,249,15,0,113,255,84,249,245,247,17,253,196,0,172,248,237,247,126,253,254,254,225,246,66,250,62,254,204,253,184,253,70,255,152,252,98,254,243,248,36,252,155,251,226,250,42,253,151,251,28,0,169,0,241,251,160,252,50,253,10,255,228,1,36,0,23,255,207,255,9,1,67,0,33,1,211,1,178,0,31,2,42,3,28,2,84,0,26,1,160,2,191,2,49,252,247,252,129,0,31,1,86,252,29,255,187,3,83,2,175,249,223,254,68,3,137,2,201,248,41,255,82,4,206,2,14,248,195,251,138,2,184,1,203,247,239,253,139,3,63,2,37,248,176,254,158,2,204,0,171,246,76,253,104,1,137,0,148,247,100,247,247,255,24,1,246,254,119,0,39,0,193,0,78,0,197,255,136,255,226,0,49,252,166,252,243,252,185,251,149,253,99,254,61,254,182,252,64,251,215,250,211,252,141,252,160,250,177,249,118,254,84,254,31,253,167,251,219,253,234,252,144,252,49,252,57,252,126,253,39,252,138,252,7,251,175,250,39,254,220,252,135,250,129,250,160,0,247,254,105,252,237,254,8,255,6,255,50,253,132,254,97,0,153,255,137,254,27,255,97,254,63,255,121,255,213,253,116,2,105,1,119,0,216,0,67,2,108,1,135,1,209,0,122,2,10,2,102,255,108,255,14,2,133,1,170,0,33,0,105,0,11,1,64,0,124,1,33,250,24,252,226,255,143,254,210,251,58,0,135,2,223,0,16,250,221,254,109,2,51,1,5,250,156,0,250,2,148,1,19,248,141,0,222,2,243,1,199,248,118,253,50,1,0,2,69,255,152,255,197,255,182,1,134,0,26,255,156,0,70,255,195,255,252,254,240,255,10,0,199,253,253,255,91,254,215,254,67,249,247,253,166,254,178,0,174,250,197,255,212,255,157,0,158,247,51,254,42,254,163,254,134,247,255,255,143,254,135,255,213,249,139,254,124,252,9,252,163,251,177,253,155,253,240,252,207,253,122,0,181,255,63,254,252,255,85,255,133,255,140,254,192,0,168,0,180,255,124,255,252,0,149,255,84,1,210,0,136,1,253,1,16,1,181,0,147,255,145,0,218,0,119,0,96,254,249,254,229,1,9,1,75,255,248,255,226,254,226,0,12,255,38,255,69,0,222,254,98,255,191,0,255,255,192,255,176,253,166,255,213,0,160,255,255,0,179,1,178,0,176,255,143,254,238,255,223,255,176,255,214,255,159,1,140,0,34,255,119,4,139,2,137,2,73,1,255,2,44,2,249,0,235,0,180,3,157,1,186,1,23,1,141,0,83,1,100,1,45,2,42,254,86,255,99,0,237,0,199,253,224,252,96,1,53,2,26,1,217,1,214,1,76,1,57,255,78,253,252,250,107,252,63,255,86,254,224,252,158,251,230,255,141,254,22,254,63,255,125,2,83,2,7,2,74,1,152,1,141,255,79,0,12,0,221,1,87,0,153,255,136,254,102,253,165,254,235,254,221,254,2,254,31,254,169,0,41,1,195,252,30,253,51,255,85,255,192,254,228,253,72,1,27,1,165,252,66,252,186,1,254,255,44,2,174,2,130,0,56,0,103,5,244,3,243,2,171,1,100,2,229,2,116,2,41,2,173,254,228,252,134,0,21,1,135,253,195,251,254,255,10,255,144,252,245,251,185,249,216,251,30,252,38,254,142,251,24,254,98,254,229,252,73,0,50,255,248,255,117,255,183,1,204,0,80,255,190,253,23,0,131,0,243,254,11,253,65,255,245,0,147,255,174,254,112,0,60,1,120,0,106,254,138,255,99,2,76,255,70,255,123,253,115,0,83,255,34,0,250,253,23,254,105,255,61,0,185,253,180,252,220,0,118,255,87,253,4,252,135,1,239,255,170,253,191,254,157,0,217,254,129,0,155,0,98,252,149,252,37,252,29,1,241,0,173,255,131,255,131,255,108,2,85,2,176,1,92,0,137,1,78,0,153,1,61,0,119,254,29,253,99,254,20,253,83,0,54,0,105,1,27,0,196,251,130,0,175,254,74,253,227,249,41,1,62,1,237,255,175,248,36,0,51,0,195,254,237,246,10,255,231,0,172,255,254,246,241,252,40,0,77,255,71,247,94,252,38,254,50,254,14,253,170,255,224,254,142,253,149,246,57,254,193,255,171,0,181,251,186,251,230,255,113,255,87,251,57,254,106,254,131,254,163,253,46,255,160,255,205,255,188,253,36,254,236,254,241,255,85,251,134,253,77,251,143,252,134,254,35,255,99,253,72,252,82,2,178,0,109,254,92,253,251,2,71,1,89,2,34,1,172,0,44,1,203,0,157,0,200,255,176,254,100,1,24,0,28,255,216,254,253,254,227,255,70,255,7,1,160,1,14,0,159,254,117,1,244,255,40,255,1,1,96,0,174,0,57,0,10,250,152,253,70,252,13,254,15,254,104,255,179,254,125,0,105,0,200,0,179,0,159,255,181,254,32,255,253,2,185,2,248,2,0,1,45,1,59,0,199,1,171,255,204,0,32,1,254,253,240,0,251,0,147,255,0,1,161,1,222,255,99,254,101,0,174,1,128,1,156,0,225,255,246,255,206,0,170,1,77,2,145,0,143,0,71,0,40,3,138,3,77,1,93,1,218,3,170,3,77,2,75,1,20,5,56,3,187,0,253,1,38,4,141,2,123,1,210,1,182,5,169,3,145,1,18,1,19,3,93,3,9,1,2,0,97,2,41,2,28,0,49,1,158,3,84,1,106,0,130,1,241,0,245,254,109,255,225,0,78,255,234,253,91,1,246,1,125,253,131,254,141,1,30,0,117,253,35,253,77,254,142,1,105,254,42,253,28,254,8,255,235,252,110,252,74,254,36,254,14,254,122,254,75,0,217,254,60,252,178,253,162,253,150,0,135,255,207,255,101,255,178,255,167,3,38,2,133,1,38,0,191,254,127,0,168,1,59,1,227,254,143,255,27,1,3,1,146,2,203,0,66,1,230,1,135,3,249,1,236,2,161,1,99,2,167,1,43,2,0,2,239,0,173,255,190,253,237,255,173,254,37,253,93,1,13,0,90,252,137,250,142,255,152,254,107,0,180,2,182,0,90,0,37,251,254,249,241,249,43,253,200,253,121,252,173,250,243,253,251,253,171,252,163,252,20,252,88,255,78,253,189,252,63,0,119,255,212,253,221,253,144,0,226,254,207,252,229,1,63,1,109,255,104,254,14,2,246,0,165,254,78,254,41,1,228,255,222,254,41,254,170,251,251,250,52,254,153,254,36,252,230,252,67,5,19,5,178,2,11,2,192,4,44,4,70,4,245,2,57,3,116,4,240,2,238,1,228,4,85,5,171,4,130,3,9,2,29,4,20,2,176,1,178,254,40,255,199,254,249,254,96,255,52,0,40,254,101,255,127,0,136,0,132,254,44,0,83,3,154,1,94,255,23,254,123,0,1,255,228,252,101,253,66,4,149,3,21,3,237,1,117,5,173,4,46,2,202,0,205,255,138,255,170,254,67,253,83,0,108,0,214,255,71,254,61,0,95,0,31,1,0,1,229,255,89,0,12,2,19,2,95,1,227,0,80,2,33,2,185,2,155,0,92,255,51,1,126,2,18,1,23,254,206,255,242,2,240,0,90,255,132,255,140,255,189,253,68,251,193,255,190,0,217,254,240,251,240,250,147,0,136,254,79,255,143,255,73,3,217,4,27,4,156,2,2,0,37,1,39,2,48,1,184,251,71,252,8,255,120,1,18,253,59,252,87,0,4,2,237,254,252,253,177,2,135,1,133,254,125,253,108,3,82,2,122,254,11,252,123,253,61,2,149,255,200,253,79,253,198,252,255,251,229,255,184,254,53,255,93,3,237,2,36,2,233,0,132,249,237,251,195,1,108,0,108,253,148,253,174,1,236,0,21,0,116,254,122,251,137,253,92,5,18,5,199,3,65,2,101,4,101,4,77,2,198,1,189,254,159,252,45,254,153,0,44,254,69,253,220,252,3,254,120,254,50,253,52,255,221,255,165,253,187,251,201,253,94,255,7,254,20,252,154,255,94,1,219,0,224,0,167,1,252,0,139,1,79,2,96,2,107,1,22,253,160,255,117,1,172,0,171,0,39,1,202,2,83,1,233,0,77,0,107,0,21,1,157,0,153,0,13,254,156,254,11,6,49,4,64,2,238,1,220,254,173,254,8,254,176,253,121,252,184,255,149,253,31,254,198,249,163,251,201,253,2,255,231,252,5,254,204,253,221,254,20,254,236,253,246,1,48,2,130,254,171,1,88,2,230,0,29,255,221,1,251,0,75,0,29,1,74,3,45,3,220,1,226,250,203,250,186,0,121,1,181,253,107,252,131,2,125,1,94,251,215,253,155,1,82,0,153,251,204,252,82,255,228,253,164,253,119,0,31,2,205,0,132,254,145,2,141,3,55,2,112,0,214,254,138,254,114,0,167,252,5,255,56,0,159,0,145,1,89,1,222,255,116,255,145,255,161,253,41,0,102,2,99,1,142,255,179,255,218,1,66,2,56,0,170,5,156,3,74,4,140,5,229,2,144,1,246,0,22,0,76,2,57,1,135,255,71,1,63,3,216,1,142,251,160,253,88,3,40,2,39,251,208,251,126,2,88,2,154,254,254,0,179,254,209,254,122,253,227,2,102,1,74,0,202,4,135,6,197,4,81,3,193,8,88,6,215,3,124,2,49,7,197,5,237,2,128,1,94,1,7,1,87,0,128,0,146,248,83,252,112,255,192,255,58,249,1,255,32,1,225,255,172,245,42,251,110,1,235,0,149,249,188,251,192,250,208,254,227,253,205,251,164,251,123,0,102,251,4,255,208,252,76,255,8,252,21,2,53,2,233,0,25,254,82,254,68,255,78,1,99,3,212,4,22,2,171,0,202,249,185,249,123,2,118,2,108,247,54,1,156,3,156,1,202,246,184,254,188,3,17,2,177,245,135,254,118,2,22,1,214,245,61,1,31,3,43,1,154,246,133,0,84,1,31,0,148,247,68,250,131,0,125,0,96,251,22,254,117,255,46,0,24,253,191,1,123,3,52,2,67,0,61,254,134,2,92,2,215,253,83,254,148,252,140,1,162,0,190,255,25,5,147,3,223,1,67,2,64,4,26,3,194,1,22,1,54,2,68,1,223,251,102,255,148,0,79,255,15,246,168,0,46,4,80,2,209,246,214,255,51,3,89,1,216,246,61,253,209,2,250,0,129,247,39,250,203,254,122,0,178,255,183,255,120,0,173,0,252,255,6,1,249,254,251,254,81,254,192,255,107,254,36,253,207,245,116,0,173,255,63,255,11,250,80,252,35,254,43,253,4,254,51,1,170,0,172,0,64,3,161,1,64,3,174,2,31,255,177,0,126,3,50,3,30,254,123,254,255,4,15,4,129,254,201,0,162,254,40,0,218,2,123,2,226,0,14,2,247,1,206,1,82,1,142,1,23,2,202,2,40,0,230,254,202,5,191,5,61,4,219,2,25,6,48,4,141,3,181,2,139,5,2,5,121,3,111,3,129,4,216,2,162,4,72,3,30,255,106,4,181,3,177,2,18,254,38,252,236,249,128,255,200,253,47,253,55,253,230,255,61,1,12,2,70,0,135,0,107,254,159,252,26,249,116,253,82,255,223,252,117,3,5,3,103,255,165,255,75,4,239,2,6,254,131,251,85,3,134,2,241,0,14,3,7,2,27,2,61,7,164,6,77,4,172,2,31,251,50,250,48,254,188,0,131,252,127,250,224,250,171,254,121,255,182,1,81,255,18,0,87,4,208,3,63,1,208,0,106,250,24,249,83,0,202,1,238,253,24,252,51,1,129,0,184,252,241,255,227,255,156,254,113,252,100,252,133,251,14,255,137,255,240,253,127,0,123,255,7,253,3,253,190,0,173,255,197,254,127,3,10,2,231,0,34,255,102,0,193,255,84,254,60,1,187,2,123,1,70,0,25,0,204,2,58,1,148,255,251,1,106,3,54,2,238,0,108,0,173,3,7,2,195,0,169,1,196,255,85,254,1,1,139,0,153,255,138,253,190,1,78,1,114,1,156,1,48,0,84,255,78,253,229,254,45,2,187,0,226,254,158,0,227,1,140,0,14,1,168,254,137,253,156,3,67,2,140,255,132,0,142,0,210,1,188,255,192,255,230,0,111,255,210,254,226,253,221,252,112,252,250,3,225,2,251,252,247,3,118,2,41,1,220,245,95,0,189,1,80,1,182,247,235,1,254,1,191,0,27,251,161,0,254,255,188,254,86,250,135,253,56,253,151,255,182,252,2,255,101,254,100,0,128,253,222,254,242,3,251,2,118,253,57,1,145,4,218,2,140,0,249,1,6,4,254,2,4,3,31,1,43,4,55,3,239,1,237,2,49,1,67,1,92,255,206,1,78,0,143,1,170,254,150,252,69,0,85,2,240,255,108,2,109,2,81,1,118,255,68,254,247,254,218,0,84,0,62,254,185,3,154,2,34,255,221,252,29,2,92,2,103,252,160,250,244,0,116,0,183,252,45,253,118,2,76,2,140,0,151,2,38,1,112,1,167,3,22,4,113,3,247,2,210,6,184,5,148,3,116,2,180,1,195,3,25,1,1,0,137,255,74,0,30,2,213,0,1,0,201,253,45,1,241,0,4,1,179,1,222,0,140,1,168,3,189,3,84,4,191,2,254,1,250,1,40,3,222,1,89,2,182,2,192,3,108,2,204,3,229,2,212,3,88,2,66,3,205,2,255,2,172,2,131,2,204,3,167,3,126,2,245,1,149,2,208,2,83,3,151,255,136,253,209,254,139,255,83,254,130,0,21,3,186,1,246,253,68,255,192,2,117,1,9,253,42,0,46,3,11,2,237,253,143,251,117,1,66,2,86,253,77,251,57,254,29,1,117,251,215,249,182,251,44,0,81,0,174,255,200,2,107,1,221,1,246,0,186,3,110,2,68,6,86,6,253,4,123,3,129,5,91,3,156,3,124,3,6,3,17,4,179,3,118,4,40,0,222,253,181,255,32,1,152,253,150,255,71,253,230,255,87,255,96,255,133,252,29,253,233,254,128,254,251,251,162,254,245,6,28,5,22,4,48,3,44,6,253,5,192,5,154,4,225,5,52,4,192,4,131,3,122,3,136,3,52,2,142,2,152,3,180,2,253,3,88,3,19,254,132,0,177,0,249,1,71,0,195,0,228,255,97,0,200,1,95,1,92,255,88,0,183,1,22,1,216,255,94,1,115,5,181,3,234,0,161,255,219,252,40,254,38,0,93,255,111,1,158,255,233,1,11,2,1,4,154,4,188,4,138,3,63,1,34,5,46,3,205,1,133,255,225,253,220,252,191,1,20,253,188,254,127,252,153,251,31,253,11,254,235,252,55,253,203,2,9,3,215,4,154,3,157,7,147,7,88,5,97,3,218,2,112,3,246,2,132,1,153,252,198,1,17,0,5,255,131,254,214,252,209,249,239,0,247,253,58,252,232,252,3,1,134,252,178,250,254,252,183,255,166,0,93,1,44,255,67,1,184,252,211,254,217,1,179,1,89,253,48,254,216,2,95,1,100,255,57,255,155,2,176,1,29,0,4,255,159,1,224,1,37,253,133,254,145,0,47,2,240,253,137,253,122,251,97,255,189,1,17,1,123,0,127,2,117,1,130,255,32,3,56,2,84,0,94,255,208,2,200,2,194,252,232,253,71,255,222,0,152,1,196,1,245,1,3,3,127,252,181,250,189,255,186,1,232,252,130,250,54,2,90,2,167,0,186,254,253,1,74,1,161,255,142,253,38,253,168,254,132,6,193,4,11,3,199,1,36,5,60,3,72,2,207,2,148,1,225,255,245,3,21,3,89,0,107,0,123,3,37,2,103,3,45,6,149,3,159,2,98,3,199,5,9,5,86,3,135,1,44,4,98,4,44,3,78,0,206,253,89,1,51,2,173,1,153,255,161,1,19,3,134,255,75,254,155,1,20,3,111,252,95,254,90,2,242,2,30,255,240,255,151,0,248,2,68,253,118,0,152,255,242,255,152,251,48,0,28,1,137,1,122,254,93,254,129,253,140,255,114,252,50,1,60,1,243,255,183,4,216,3,53,3,157,2,85,251,75,253,140,0,43,255,140,252,96,254,57,255,210,253,152,253,245,0,108,254,104,253,6,1,56,0,151,253,44,253,171,255,21,254,192,254,112,253,198,253,193,252,127,255,240,253,30,250,193,255,145,254,127,254,154,254,191,254,4,0,51,0,146,254,42,255,63,1,255,1,146,0,159,2,239,255,221,254,146,255,208,1,117,255,16,254,54,255,220,0,200,254,137,253,108,253,183,255,113,253,204,252,106,253,115,253,248,250,167,252,82,254,71,252,65,252,248,254,207,255,44,254,184,255,131,254,162,254,205,253,63,255,105,254,55,0,104,254,221,252,11,0,203,254,137,2,188,0,58,255,0,254,205,1,177,255,54,254,218,250,249,254,122,255,245,253,135,249,77,254,17,254,3,253,57,0,165,254,98,254,178,1,139,251,14,255,104,253,167,252,34,0,188,255,61,253,174,254,163,1,163,0,226,255,250,254,57,254,235,252,106,250,47,253,238,3,152,2,13,1,25,0,107,2,4,1,183,0,96,0,56,252,178,250,124,254,135,0,75,253,67,3,200,1,154,0,81,4,191,2,57,2,107,1,89,6,46,5,217,3,236,2,36,255,219,0,76,0,48,255,81,250,130,249,49,0,149,0,60,252,84,255,16,253,176,254,113,2,209,0,6,255,190,255,7,252,186,252,254,255,61,1,136,247,51,250,118,255,123,0,172,248,205,247,247,253,85,0,57,252,146,254,73,253,143,252,103,252,13,252,5,253,75,252,132,255,0,255,160,254,108,253,178,0,207,1,98,1,48,1,48,249,177,253,230,254,79,0,55,247,175,0,99,3,243,1,118,255,76,255,75,255,235,255,13,247,39,251,52,254,248,253,253,252,195,1,246,255,204,254,15,1,191,255,4,0,214,0,233,254,77,254,213,255,164,254,98,253,35,0,191,255,45,255,38,3,23,2,85,0,41,1,57,0,239,0,210,2,237,1,225,0,149,2,72,3,35,2,228,253,136,254,14,0,93,1,213,1,209,2,75,1,162,0,224,253,16,253,194,255,246,255,142,1,168,255,212,2,189,2,237,255,235,253,162,255,89,2,136,0,185,255,87,253,21,253,90,255,168,254,5,1,206,255,161,0,204,255,229,1,81,1,117,249,50,0,190,0,163,255,22,247,25,255,62,255,174,255,161,255,173,253,102,255,128,0,126,3,245,1,76,2,201,1,167,254,206,0,122,0,110,0,137,253,29,255,199,253,3,0,152,1,239,0,141,1,226,0,59,255,254,255,128,0,235,1,1,5,136,3,36,1,215,0,26,2,50,1,3,1,253,1,91,253,233,251,13,0,65,1,89,253,180,253,154,254,44,255,210,253,243,0,134,2,223,1,230,1,86,1,122,2,20,2,107,0,34,3,75,1,136,0,144,255,114,254,249,251,226,254,186,254,63,253,32,1,16,1,19,5,120,4,154,4,92,3,89,254,121,0,127,254,108,255,217,254,210,254,190,252,205,252,16,0,232,255,55,255,36,254,43,2,91,0,11,255,38,1,218,255,133,254,62,252,59,251,89,251,18,250,239,254,117,254,122,254,11,252,123,253,61,2,205,248,250,251,249,1,212,1,232,2,179,3,97,2,237,1,79,253,108,251,140,253,121,255,254,251,195,0,155,1,196,0,46,6,123,4,63,2,81,1,41,251,247,252,120,253,114,255,83,2,57,3,199,3,223,2,74,251,54,252,175,255,170,254,23,253,13,0,184,255,119,1,198,1,19,0,127,5,153,3,145,249,84,255,93,3,50,2,160,3,1,6,39,4,228,2,88,246,72,252,8,1,82,0,10,254,59,252,202,250,123,0,99,3,212,4,22,2,171,0,240,246,52,254,12,3,107,1,90,251,151,253,252,0,195,255,82,255,34,0,243,3,20,3,227,246,247,0,167,1,153,0,240,255,157,254,6,1,193,1,216,249,207,251,224,253,141,254,153,253,207,254,27,4,37,3,175,2,16,2,6,0,74,255,167,3,107,3,234,3,41,3,199,0,1,1,126,0,76,0,184,253,142,251,87,2,44,2,175,251,145,250,201,249,249,253,47,252,211,250,108,0,91,1,46,253,49,252,109,1,101,0,111,255,169,2,249,0,103,255,0,0,178,254,198,253,159,0,156,1,29,1,176,254,151,253,71,252,58,252,119,3,177,2,29,251,84,0,71,255,114,254,176,253,177,1,20,4,141,2,85,0,73,1,216,255,105,1,79,254,63,253,210,1,62,2,102,255,142,2,80,2,34,1,89,255,72,0,93,1,175,0,162,2,41,1,209,3,208,2,211,4,180,4,245,2,232,1,112,254,243,254,26,2,116,1,186,250,149,250,86,251,165,255,238,4,108,3,7,3,188,2,169,253,218,255,82,254,46,253,184,7,94,6,223,3,96,2,111,0,20,1,30,255,160,255,77,252,124,254,245,255,249,255,209,254,237,253,185,252,82,1,198,6,174,6,125,5,245,3,252,253,169,252,123,253,210,0,80,253,96,254,1,2,230,0,202,252,131,253,134,251,192,254,72,252,110,253,74,253,183,0,142,255,145,253,50,3,162,2,65,255,52,255,219,2,123,2,51,0,197,4,115,3,64,2,70,252,81,254,58,3,86,2,170,254,13,253,124,252,105,254,154,251,158,254,50,255,0,254,221,253,214,252,155,254,148,253,66,0,3,2,183,255,102,254,152,252,79,252,92,250,53,251,191,0,239,255,224,253,25,255,252,249,224,253,123,252,138,252,134,252,242,249,19,246,205,252,54,252,175,0,198,252,46,251,6,253,169,253,234,255,122,2,213,252,37,252,122,252,189,254,203,0,26,0,129,254,21,255,243,252,113,254,238,4,138,3,92,252,137,250,156,250,144,253,93,0,87,0,98,254,229,253,77,253,37,0,121,2,254,1,125,254,36,254,206,250,143,1,66,0,7,1,105,254,207,255,177,254,95,254,17,4,73,7,245,252,191,251,96,250,22,253,166,252,64,3,187,253,9,253,141,254,95,253,6,254,40,8,208,253,134,253,101,251,15,1,241,0,14,0,74,254,12,255,115,254,207,1,178,4,23,4,162,253,227,252,98,250,205,255,189,254,225,1,32,255,184,253,241,253,238,1,113,3,170,2,79,254,206,254,22,252,42,2,147,2,222,0,171,0,96,255,159,254,169,2,6,7,29,6,172,252,99,251,97,249,176,254,102,253,114,0,187,253,12,253,24,253,61,255,119,1,241,1,47,254,220,252,182,251,154,0,26,1,125,255,206,255,65,255,49,253,67,1,220,2,6,6,46,253,205,252,132,250,105,0,6,255,185,0,78,255,10,254,26,253,65,1,254,1,87,4,189,254,201,253,58,252,127,0,228,1,82,1,96,255,52,0,174,254,220,2,87,5,18,6,142,253,222,252,96,249,226,254,182,253,164,2,73,253,169,254,142,254,22,254,39,1,101,7,138,253,194,253,10,252,176,255,133,2,187,255,250,255,194,254,148,254,14,3,170,5,14,4,199,254,35,253,141,250,120,0,60,0,221,1,248,254,183,253,133,255,199,2,221,4,121,2,165,255,157,254,8,252,3,3,246,2,5,1,253,0,81,0,38,254,162,3,167,8,184,6,216,252,181,251,123,248,208,253,242,252,169,0,220,252,206,251,68,255,142,253,201,255,125,5,74,253,52,253,86,251,108,253,98,1,73,1,254,253,201,255,225,253,110,1,9,4,158,4,110,253,65,252,179,250,201,255,72,255,93,0,163,253,226,254,106,253,148,1,193,1,59,3,226,254,162,254,17,251,116,2,50,1,227,0,240,255,147,0,145,253,186,0,155,3,98,8,94,253,134,252,186,249,69,254,28,255,83,1,143,254,234,252,103,254,231,0,86,0,189,5,64,254,187,253,219,251,82,2,194,1,79,255,132,255,86,255,65,254,159,2,135,4,124,5,36,254,101,253,25,250,179,255,118,255,204,2,79,255,140,254,131,254,195,1,166,3,147,3,6,255,80,254,202,252,16,1,60,3,190,1,26,0,19,0,225,255,186,2,156,6,120,8,122,253,47,252,124,248,77,255,39,254,12,1,133,254,23,253,77,253,11,0,127,0,9,4,24,254,107,252,199,252,61,0,67,1,135,0,147,0,111,255,82,253,173,2,18,3,146,6,6,254,176,252,239,250,35,0,90,0,222,0,233,255,166,254,98,253,199,1,79,2,7,5,53,255,175,253,194,251,140,2,96,1,181,1,39,0,63,0,55,254,73,3,241,4,57,8,248,253,142,252,208,249,184,254,57,253,141,5,172,253,170,254,186,255,209,0,173,0,136,7,89,254,170,253,103,252,165,1,93,2,218,255,254,255,11,255,129,255,128,3,177,7,111,4,133,254,250,253,213,249,173,0,118,0,241,2,201,255,131,254,204,255,217,3,253,3,241,2,254,255,221,254,133,252,241,2,224,3,167,1,8,1,131,0,60,255,127,3,226,8,239,9,133,253,192,251,61,246,239,253,42,252,14,2,4,253,194,252,220,253,76,254,60,1,87,2,93,253,84,252,22,253,199,255,236,0,245,255,55,255,175,255,226,252,16,0,77,3,22,6,31,253,39,252,68,251,44,254,17,0,34,1,233,254,184,253,68,253,183,0,54,3,193,2,247,254,20,254,93,251,165,1,152,0,212,1,122,254,166,0,244,254,39,0,14,6,76,7,133,253,58,252,221,249,59,254,20,254,142,3,228,254,253,251,181,255,75,255,123,255,60,7,67,254,144,253,106,251,164,1,111,1,207,255,123,254,44,255,87,255,195,2,49,4,184,4,229,253,58,253,87,250,83,0,93,255,228,1,20,255,225,253,157,254,82,1,151,4,46,3,10,255,203,254,66,252,94,2,248,2,60,0,166,0,248,255,93,255,206,254,57,7,3,10,21,253,255,251,9,249,93,254,66,254,209,0,50,253,202,253,234,253,6,254,181,2,89,3,49,254,71,253,198,251,69,1,175,1,50,255,241,255,248,255,5,253,33,2,151,3,238,5,157,253,241,252,223,250,0,1,201,255,208,0,91,255,164,254,106,253,65,1,168,2,162,3,186,254,83,254,73,252,228,1,190,1,58,2,59,255,72,0,183,255,141,3,175,5,205,6,205,253,31,253,74,248,132,255,96,254,206,2,34,254,108,254,198,254,240,255,190,1,100,6,217,253,231,253,18,253,198,255,126,2,214,0,55,0,71,255,241,254,124,4,21,5,188,4,29,254,97,253,16,251,117,0,29,1,31,2,52,255,121,254,145,255,1,2,2,6,86,3,142,255,66,255,46,252,109,3,83,2,208,1,4,1,4,1,201,254,236,2,235,8,168,8,251,253,79,252,133,247,186,254,60,253,122,1,212,252,77,253,24,255,208,253,175,2,129,5,36,253,78,253,188,252,153,254,133,2,130,1,247,254,62,0,90,253,145,0,108,6,184,4,213,253,36,252,47,251,178,255,14,0,114,0,185,254,154,254,23,254,136,1,165,2,185,2,55,255,20,255,140,251,181,2,193,1,178,0,13,255,0,1,79,254,99,2,105,5,152,9,156,253,123,252,72,250,205,254,239,255,243,1,197,254,101,253,2,255,0,1,172,1,183,5,26,254,90,254,224,251,143,2,114,1,18,0,154,255,71,255,236,254,243,2,42,6,55,5,24,254,165,253,118,250,182,0,163,255,102,3,183,255,54,254,164,254,67,3,94,3,189,3,230,254,179,254,22,253,35,2,71,3,172,1,17,1,167,255,13,0,172,3,172,6,16,10,94,254,196,251,34,249,212,255,154,254,3,1,15,254,125,253,208,253,99,0,45,2,193,3,91,254,2,253,107,252,39,1,70,1,184,0,175,0,15,0,142,253,20,2,110,3,189,7,69,254,0,253,5,251,221,0,156,0,12,1,39,0,149,254,7,254,183,2,4,3,116,4,94,255,53,254,112,252,197,2,188,1,146,2,25,0,47,1,200,254,244,4,130,5,179,6,215,254,2,253,212,248,249,254,148,255,46,4,106,254,243,255,127,255,57,0,182,1,174,10,138,254,25,254,189,252,48,1,184,2,164,0,104,0,21,255,5,0,75,6,108,7,119,5,27,255,186,253,211,250,149,1,192,0,49,3,169,255,74,254,111,0,4,4,175,4,225,3,68,0,81,255,90,252,9,4,93,4,195,1,222,1,200,0,8,255,79,8,136,10,250,7,189,252,213,250,173,247,225,252,76,253,210,1,212,252,248,251,43,254,146,253,32,1,152,3,67,253,183,252,210,251,101,254,0,2,8,0,122,254,165,255,24,253,226,255,19,4,137,4,202,252,132,251,124,251,218,254,210,255,110,0,101,254,138,254,90,253,214,0,19,2,156,2,106,254,92,254,86,251,231,1,232,0,47,1,194,254,91,0,40,254,123,0,208,4,141,9,46,253,72,252,41,250,30,253,93,253,52,5,225,253,162,253,45,255,161,255,158,255,228,5,219,253,254,253,87,251,217,1,211,0,73,0,224,254,144,255,123,254,25,2,52,5,234,4,201,253,13,253,247,249,71,0,229,254,120,2,86,255,31,254,19,254,169,2,234,3,49,3,156,254,181,254,147,252,163,1,194,2,90,1,241,0,222,255,186,254,121,1,158,7,91,7,41,253,205,251,167,249,23,255,225,253,116,0,244,253,218,252,183,253,183,255,222,1,217,2,224,254,99,252,137,251,173,0,191,1,204,255,68,0,27,255,162,253,193,1,17,2,5,7,177,253,149,252,173,250,183,0,112,255,68,1,153,255,60,254,102,253,111,2,232,1,152,4,18,255,1,254,20,252,70,1,40,2,202,1,136,0,108,0,193,254,114,2,63,5,91,7,22,254,122,253,62,249,70,255,63,254,216,3,30,253,180,255,86,255,218,253,243,2,0,10,16,254,2,254,77,252,210,0,182,2,204,255,84,0,190,254,57,255,66,4,89,6,200,4,136,254,165,253,140,250,87,1,74,0,120,2,81,255,10,254,224,255,204,3,52,5,222,2,52,0,217,254,167,251,41,4,150,3,160,0,137,1,107,0,115,254,190,4,89,10,205,6,136,253,79,251,157,248,49,253,235,254,97,1,117,253,144,252,134,255,45,255,209,0,58,5,206,253,54,253,221,251,48,255,132,1,159,0,192,254,195,255,217,253,37,1,68,4,163,5,120,253,159,252,27,251,207,255,113,255,49,1,111,254,29,255,183,253,49,2,20,2,159,3,139,255,69,254,92,251,251,1,180,1,36,1,177,255,233,0,54,254,159,2,1,4,92,9,135,253,182,252,11,250,204,254,226,254,128,2,139,254,147,253,105,254,162,1,253,0,25,5,197,254,187,253,143,251,60,2,173,2,231,254,61,0,188,255,141,254,223,3,77,4,218,5,19,254,85,253,174,250,209,255,164,0,192,2,0,255,198,254,244,254,119,2,181,3,28,4,138,255,164,254,191,252,68,0,156,4,56,2,152,0,117,0,34,0,89,4,110,7,191,8,167,253,65,252,86,249,113,255,23,254,224,1,180,254,113,253,194,253,54,0,97,1,168,4,50,254,116,253,228,252,150,0,37,2,112,0,195,0,145,255,253,253,167,2,84,4,111,6,210,253,19,253,63,251,247,255,16,1,85,1,203,255,247,254,233,253,233,1,75,3,18,5,136,255,30,254,248,251,120,2,31,2,152,1,179,0,50,1,242,253,100,4,184,5,196,8,95,254,238,252,230,249,32,255,128,254,84,5,135,254,53,254,231,255,129,1,233,1,126,8,180,254,117,253,195,252,32,2,41,2,61,0,22,0,143,255,167,255,104,4,189,6,244,5,40,255,139,254,139,249,161,0,60,1,140,3,91,255,34,255,189,255,82,5,151,4,21,3,73,0,4,255,1,253,226,2,164,3,104,2,106,1,246,0,130,255,19,3,94,10,211,11,77,253,174,251,114,247,203,253,180,253,12,2,178,253,45,252,22,254,249,254,141,1,214,3,191,253,187,252,79,252,234,255,179,1,207,255,66,255,138,255,139,253,168,255,216,4,233,5,132,253,229,251,5,252,221,254,189,0,3,1,255,254,42,254,139,253,145,0,177,3,126,3,186,254,148,254,186,251,31,2,4,1,118,2,54,255,189,0,47,255,101,1,99,5,43,8,199,253,205,251,87,250,54,253,17,255,151,3,92,254,63,253,172,255,147,255,142,255,103,9,99,254,239,253,103,251,226,1,112,1,131,0,70,255,184,255,125,255,93,3,231,4,196,4,157,253,110,253,195,250,227,0,135,255,119,2,80,255,23,254,38,255,233,2,151,4,189,3,191,254,108,255,88,252,159,2,198,3,216,0,84,1,253,255,113,255,213,1,56,7,133,9,39,253,63,252,109,249,43,255,2,255,65,1,1,254,74,254,247,253,130,255,213,2,135,3,172,254,83,253,248,251,60,1,224,1,20,0,23,0,167,255,217,253,97,1,27,4,253,6,224,253,11,253,172,250,42,1,231,255,180,1,156,255,120,254,249,253,211,1,242,2,54,4,46,255,114,254,202,251,108,2,146,2,118,2],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE+10240);allocate([33,0,147,0,78,255,153,3,151,6,129,7,187,254,240,253,70,248,2,0,227,254,142,3,141,254,22,254,26,255,0,0,85,2,218,7,16,254,117,254,190,252,37,0,177,3,245,0,181,0,96,255,112,255,201,5,93,5,77,5,157,254,167,253,10,251,42,1,66,1,160,2,63,255,176,254,77,0,65,4,253,5,154,3,177,0,217,255,155,251,228,3,13,3,24,2,200,1,110,1,80,254,135,5,136,9,231,8,46,254,10,253,235,246,209,254,3,254,131,1,41,253,211,253,66,0,111,255,131,2,224,4,224,253,92,253,108,252,31,255,94,3,76,2,104,255,40,0,235,253,167,1,143,5,22,6,196,253,181,252,135,251,128,255,85,0,205,1,18,255,255,254,184,253,93,2,236,2,93,3,24,0,54,255,127,250,29,3,231,1,47,1,75,255,108,1,74,255,104,2,98,5,126,11,18,254,172,252,95,250,220,254,61,0,44,3,172,255,45,253,74,255,43,2,20,2,226,5,147,254,19,254,223,251,54,3,76,2,11,0,242,255,238,255,26,255,233,3,121,5,171,5,38,254,199,253,244,250,46,1,62,0,38,4,186,255,136,254,34,255,214,3,206,3,125,4,60,255,22,255,229,252,223,1,74,4,243,1,106,1,58,0,70,0,123,4,21,8,41,11,25,254,146,252,224,248,73,0,224,254,92,1,154,254,12,254,4,254,199,0,209,2,218,4,178,255,71,253,229,252,105,1,24,2,196,0,118,1,110,0,33,253,79,3,27,4,104,7,146,254,55,253,98,251,59,1,64,1,173,1,72,0,41,255,62,254,247,2,118,3,83,5,226,255,84,254,190,252,93,3,115,2,28,3,118,0,212,1,233,254,75,5,91,7,101,7,68,255,126,253,180,249,63,0,81,255,174,4,94,254,45,255,51,0,158,1,75,2,41,10,22,255,211,253,166,252,168,1,121,3,222,0,136,0,155,255,83,0,133,5,230,8,103,5,172,255,67,254,147,250,158,1,57,1,21,4,29,0,169,254,65,0,16,6,111,6,212,3,183,0,165,255,195,252,249,4,133,5,104,1,41,2,16,1,149,255,51,6,77,12,43,10,104,5,29,8,92,13,244,19,86,26,186,31,135,38,84,43,170,49,133,53,61,254,215,251,239,253,231,250,62,254,12,253,15,254,161,252,128,254,149,253,99,254,99,253,195,254,230,253,181,254,212,253,98,254,4,254,88,254,134,254,238,254,188,254,78,254,154,253,30,255,12,254,24,255,254,253,249,254,135,254,214,254,102,254,105,255,58,253,82,255,206,252,107,255,100,254,100,255,83,254,224,254,50,254,70,255,53,255,86,255,210,254,65,255,191,254,125,255,109,255,215,254,117,254,28,255,42,255,11,255,64,255,189,255,196,254,185,255,185,254,152,255,51,255,162,255,73,255,113,255,218,255,63,255,161,255,16,0,180,255,132,255,8,255,23,0,19,255,24,0,12,255,18,0,120,255,44,0,145,255,223,255,232,255,231,255,0,0,149,0,19,0,23,0,113,255,158,0,87,255,174,0,75,255,133,0,201,255,165,0,230,255,111,0,84,0,98,0,75,0,87,0,183,0,141,255,245,255,248,255,130,0,11,0,170,0,254,0,77,0,205,0,17,0,183,0,112,0,6,1,194,0,202,0,31,1,95,0,189,0,214,255,151,255,234,0,179,0,39,0,186,0,163,0,89,1,76,1,199,0,43,1,161,0,202,255,29,1,178,255,25,1,123,255,141,0,74,255,111,0,249,0,85,1,15,1,108,1,93,0,147,1,75,0,135,1,92,0,254,1,118,255,220,0,71,255,227,255,222,255,105,1,141,255,64,1,3,0,42,2,99,0,30,1,218,0,79,2,11,255,150,1,244,254,197,1,0,0,68,2,25,0,94,2,19,1,20,2,148,0,194,1,183,255,227,2,227,254,6,2,224,254,94,0,53,255,162,2,116,255,182,255,205,0,202,2,142,255,43,1,176,0,155,3,182,0,45,2,240,0,193,2,240,255,1,2,229,1,81,2,37,1,128,1,195,1,105,2,218,255,50,0,51,2,17,2,47,1,209,0,203,1,107,1,177,1,196,1,194,1,198,1,111,1,94,2,221,1,229,2,176,1,97,1,112,1,11,1,105,1,204,2,17,1,71,2,197,1,166,0,254,1,172,0,201,0,117,2,18,1,191,0,56,2,127,2,46,1,42,1,122,2,131,1,131,2,94,1,75,2,48,2,100,2,53,2,88,2,20,3,231,1,160,2,0,2,247,3,65,1,77,1,101,1,86,3,131,255,157,1,218,1,200,2,17,0,105,255,52,2,29,1,14,1,15,255,203,3,121,3,233,1,220,0,254,1,128,3,37,2,156,3,71,1,57,3,34,1,143,3,28,2,84,4,158,0,37,3,199,0,189,3,255,1,218,2,100,0,106,3,13,0,23,3,179,1,120,2,164,2,204,3,249,0,132,3,211,1,194,4,13,3,50,4,73,2,17,3,233,255,157,2,11,1,19,4,107,2,60,4,103,2,121,4,110,2,137,3,148,3,25,4,80,0,75,1,72,2,51,4,89,0,127,2,220,3,193,3,2,3,208,2,30,3,187,2,236,1,191,1,131,3,115,2,15,1,164,4,213,2,53,5,87,0,91,2,64,3,67,6,104,2,103,4,122,3,225,5,232,3,132,4,98,3,241,3,227,3,59,3,125,4,90,3,49,3,170,5,5,3,40,5,244,1,109,5,56,1,129,4,236,255,60,4,64,0,3,5,2,0,148,4,143,1,77,7,2,2,170,6,246,1,100,6,118,3,242,5,160,1,88,2,107,4,70,5,251,4,110,5,121,3,3,7,146,3,230,6,227,0,159,4,226,4,34,7,249,1,62,7,151,3,49,9,57,255,175,1,152,0,199,6,43,255,228,255,136,1,54,5,103,255,204,255,210,3,127,4,189,254,112,254,45,3,167,6,120,255,84,0,169,5,223,7,181,254,113,255,119,255,168,4,0,255,22,2,99,255,7,4,205,254,73,254,30,2,219,2,183,254,92,254,159,255,104,2,150,254,88,255,190,254,110,1,9,255,146,255,45,255,89,0,60,255,203,254,20,0,59,0,148,254,49,254,226,254,89,0,176,254,175,0,80,254,141,0,133,254,66,255,78,254,60,255,177,255,150,0,234,254,29,255,232,254,166,0,213,253,90,254,101,255,29,2,146,254,54,0,227,255,173,255,211,254,250,252,186,0,116,2,115,254,248,254,242,0,37,1,59,255,183,253,124,0,154,1,53,0,123,255,10,0,84,1,198,253,215,251,65,0,66,254,68,0,19,254,127,1,169,3,155,254,57,253,153,254,6,255,91,253,212,251,36,1,230,255,107,1,6,0,95,2,33,5,129,255,246,255,233,5,94,7,201,2,204,3,189,5,133,8,163,5,224,7,161,249,192,249,252,248,14,247,253,251,22,249,180,251,23,248,3,251,148,250,169,250,2,250,77,252,75,250,52,252,12,250,25,252,58,251,4,252,108,251,209,252,37,252,32,252,165,250,64,251,18,252,247,250,186,251,24,253,12,251,13,253,243,250,162,252,101,252,119,252,40,252,90,253,229,251,83,253,230,251,193,251,39,252,218,251,89,253,35,252,127,253,153,251,48,252,6,253,114,253,134,252,218,252,191,252,189,251,62,253,139,253,147,253,218,252,128,253,212,252,249,252,134,253,245,252,225,253,28,252,203,253,205,251,188,253,222,253,157,253,196,253,149,253,8,253,222,254,145,252,242,253,201,252,50,254,229,252,3,255,215,253,97,254,179,253,73,254,235,253,172,254,76,253,89,252,7,254,252,252,66,253,149,251,249,254,206,254,53,252,29,254,67,254,182,255,213,253,220,253,154,253,127,255,75,253,22,255,116,254,10,255,37,254,6,255,247,254,108,254,136,254,254,253,95,254,2,254,212,254,199,254,178,254,104,253,49,254,210,252,126,254,64,253,175,254,153,253,22,255,55,255,23,255,17,255,89,255,201,253,53,255,149,253,109,255,97,254,141,255,160,254,90,255,18,253,85,255,7,253,242,254,145,252,248,254,121,252,145,254,24,253,43,0,37,254,14,0,115,253,43,0,98,253,11,0,64,254,197,255,247,253,130,255,137,255,101,255,155,253,214,255,161,252,229,255,93,252,136,0,29,254,183,0,44,254,55,0,214,254,55,0,208,254,57,1,159,253,57,1,48,253,66,1,89,255,100,0,227,253,253,255,137,255,145,255,69,255,233,0,20,255,4,1,22,255,26,0,91,255,134,0,211,255,216,255,219,253,104,1,53,255,122,1,124,254,194,1,129,254,19,1,20,0,182,0,153,255,246,0,145,255,175,1,37,0,206,1,110,255,231,1,99,255,228,254,197,255,247,1,72,255,24,0,53,0,253,255,54,0,122,0,3,1,77,1,66,0,228,1,104,0,180,1,68,0,195,0,116,0,190,0,206,0,13,1,247,255,226,1,96,1,126,1,29,1,143,1,21,1,196,1,0,1,69,0,186,0,13,0,41,1,243,255,3,1,161,255,30,0,56,0,138,1,196,0,169,1,205,0,200,1,25,1,65,2,15,0,191,0,119,1,34,1,151,1,64,2,200,255,227,0,32,2,149,1,0,0,37,2,164,255,16,2,27,255,95,1,11,255,82,1,150,254,179,1,167,0,15,2,181,255,46,1,91,0,56,3,129,0,87,2,240,1,167,2,186,0,237,2,153,0,225,2,231,254,88,2,164,254,103,2,20,255,1,3,41,0,113,3,38,0,122,3,36,255,73,3,155,254,115,3,119,254,135,3,134,253,218,1,68,254,82,3,81,255,166,2,19,254,242,0,249,253,17,3,54,253,70,2,227,253,110,1,225,253,178,1,171,253,244,1,3,253,222,0,66,253,149,3,25,253,194,3,155,252,245,1,125,252,36,2,133,254,200,0,77,254,157,0,205,252,214,0,163,252,157,0,154,253,40,0,136,253,94,0,141,252,202,255,27,253,4,2,11,254,42,1,154,253,85,255,154,252,95,255,159,252,233,255,206,252,93,0,9,252,245,254,106,253,153,254,219,253,2,0,70,254,135,255,135,254,0,0,29,255,33,0,98,254,130,255,127,255,212,0,90,252,34,0,198,251,230,254,161,251,244,254,58,253,199,252,92,254,65,255,204,251,96,252,107,252,163,255,140,253,154,254,97,0,7,0,50,255,119,254,155,255,24,0,53,255,38,0,88,255,83,0,169,253,89,254,233,254,170,1,68,253,118,0,181,255,206,0,43,252,95,253,88,253,161,1,145,254,37,0,233,254,218,1,127,255,194,254,63,1,40,1,142,253,217,255,87,1,90,2,72,253,217,255,209,254,172,3,104,0,233,0,132,254,137,0,220,255,13,1,181,255,42,255,120,0,43,0,239,253,35,254,203,1,164,0,54,255,27,255,207,255,89,255,97,2,24,3,98,0,36,255,147,3,148,0,37,1,27,1,101,3,91,0,63,2,138,1,70,1,178,255,205,2,67,0,109,1,189,254,104,2,220,255,219,2,27,0,107,2,238,0,120,2,17,1,192,1,99,0,33,3,220,1,101,3,17,1,173,2,64,0,21,3,72,0,253,3,217,0,25,3,203,1,222,2,104,1,134,2,224,1,104,1,66,1,173,1,208,1,126,2,174,1,244,2,107,1,232,3,148,1,171,2,16,2,90,2,103,2,143,2,157,1,178,3,175,2,169,3,90,2,136,3,92,2,43,2,225,2,18,3,150,2,211,1,142,2,106,1,77,2,161,3,198,2,242,1,222,1,159,1,164,1,181,2,115,3,45,3,171,2,13,3,157,3,145,3,171,3,214,2,220,2,235,1,85,3,19,2,180,3,222,2,195,3,59,1,40,3,249,2,243,2,120,4,248,2,143,2,52,4,58,3,33,4,67,4,70,3,235,3,40,3,23,4,109,4,147,2,77,4,224,3,26,4,50,4,51,4,203,3,182,2,202,4,30,4,59,2,73,3,116,3,124,5,99,5,72,4,56,4,93,3,207,4,223,2,4,5,248,2,248,4,223,3,87,5,29,4,233,4,188,2,26,4,22,2,220,3,197,1,240,4,87,2,116,4,167,2,85,6,47,3,104,5,9,2,37,5,137,1,28,6,37,3,168,5,174,2,44,4,136,2,107,3,51,1,59,4,105,1,23,4,61,1,137,5,196,3,163,2,59,2,128,4,79,0,90,4,209,255,250,5,55,1,185,6,58,1,142,4,177,2,2,2,162,255,93,1,26,1,132,5,72,1,1,4,231,1,191,255,57,0,37,3,202,3,36,0,62,0,1,3,249,254,23,3,166,254,125,2,187,2,119,255,108,2,22,2,29,2,33,253,194,0,199,2,44,1,244,254,161,252,158,3,1,3,60,253,84,254,250,1,174,0,132,252,138,253,179,1,35,2,101,250,254,254,109,2,215,1,6,252,168,250,119,254,9,2,104,252,82,253,231,255,20,0,42,252,124,251,84,1,9,0,234,249,145,251,160,254,48,0,213,249,110,254,137,252,6,0,124,251,136,252,220,253,160,254,149,249,112,251,97,255,98,2,24,248,61,252,31,255,193,0,136,249,88,248,11,255,19,254,60,252,112,249,88,252,133,253,237,250,48,249,148,250,164,253,252,249,189,252,139,250,121,255,204,249,222,254,122,249,56,253,37,248,160,249,129,249,229,255,46,247,213,252,123,251,184,0,15,251,189,0,169,250,74,2,37,248,201,0,234,252,200,2,70,251,3,0,247,251,40,3,29,251,62,3,145,255,123,2,156,249,191,1,49,254,75,252,67,254,96,252,8,254,118,251,11,254,69,251,144,0,161,254,140,254,228,251,229,254,221,251,233,254,157,251,193,253,98,250,181,253,178,249,89,252,40,252,229,0,178,2,103,252,49,253,109,254,82,5,83,253,47,254,106,3,141,1,3,254,210,255,61,1,54,5,27,254,200,1,45,3,183,1,101,254,83,1,130,3,43,4,87,254,46,0,161,5,241,1,115,252,224,252,185,5,22,4,2,255,191,254,150,5,141,4,68,0,94,1,10,4,154,2,114,1,11,0,31,5,22,3,143,0,232,0,17,4,26,6,142,255,151,2,80,6,54,4,198,1,67,2,251,4,16,4,180,255,141,3,240,2,43,4,153,0,0,2,92,1,190,4,102,2,129,1,51,7,40,3,13,1,10,4,203,0,62,4,140,2,249,3,247,6,106,4,173,1,47,5,131,1,104,5,207,255,159,4,184,255,191,4,96,254,233,3,32,2,213,6,160,254,199,4,10,254,175,4,179,253,57,2,29,255,94,6,114,255,42,6,26,255,179,6,54,253,8,5,186,252,118,5,107,4,77,5,48,255,208,4,181,1,197,3,95,252,50,3,43,3,130,5,91,3,227,5,164,0,188,4,107,5,1,7,228,1,82,7,200,1,15,8,228,3,146,4,46,5,122,5,36,5,80,5,111,4,238,4,210,4,82,6,81,5,232,6,141,5,203,4,48,6,67,5,86,3,160,2,149,6,30,6,115,4,246,4,224,7,33,7,237,6,45,6,252,5,180,5,207,5,178,3,123,6,253,3,208,6,188,4,112,5,209,3,236,6,137,4,34,7,140,4,182,6,149,5,181,7,55,6,161,4,96,3,84,8,37,4,7,7,46,3,46,7,245,2,56,8,35,5,6,8,234,4,65,8,147,3,27,9,162,3,187,5,123,4,30,10,159,5,197,8,208,6,42,8,84,6,54,9,174,5,106,10,226,5,84,7,45,7,22,8,183,7,203,6,41,6,170,2,9,5,48,6,253,7,174,5,50,8,194,9,212,7,151,10,18,8,214,2,52,6,196,10,32,9,228,0,79,3,152,9,123,6,36,0,45,1,150,7,165,7,66,254,160,255,106,8,116,5,253,5,77,4,14,0,96,2,101,252,36,253,103,5,190,7,65,5,184,3,88,253,65,1,1,5,244,4,198,249,109,1,173,3,178,3,55,249,202,252,70,9,227,10,29,7,228,10,236,248,29,247,169,248,23,246,152,249,200,248,97,249,44,248,60,251,136,248,59,251,198,247,233,249,204,249,219,249,236,249,85,251,177,249,56,251,65,249,177,250,129,251,176,249,100,248,6,251,145,250,231,250,133,250,185,249,101,251,116,249,225,250,93,250,58,250,169,250,126,252,24,251,221,251,205,250,146,251,42,252,147,251,131,251,32,250,200,251,228,250,4,252,97,251,44,252,50,250,57,252,41,250,36,252,102,252,233,251,203,251,186,252,101,251,166,252,58,251,149,251,239,251,216,251,1,253,152,252,123,251,67,253,144,252,62,253,118,252,250,252,8,252,190,253,200,251,223,252,58,250,177,253,169,251,176,253,134,251,55,253,148,250,128,253,160,250,171,253,221,251,96,254,121,252,82,253,192,252,107,253,60,253,68,254,156,252,22,254,103,252,138,254,248,252,149,253,110,251,183,253,219,253,255,252,229,252,77,254,109,253,238,253,27,253,14,254,187,252,155,254,171,253,233,254,153,252,13,255,137,252,230,254,103,253,232,254,101,253,91,255,208,253,118,254,121,252,150,254,102,254,64,254,185,253,103,254,194,253,199,254,155,254,131,253,220,253,198,253,76,254,128,252,8,254,130,254,11,253,198,255,31,254,91,255,150,253,65,255,138,254,22,255,130,254,34,255,85,253,231,255,32,254,94,254,153,254,38,253,159,254,188,254,99,255,80,254,190,254,118,254,209,254,228,254,152,255,167,253,223,254,212,253,60,255,180,253,106,255,109,253,160,253,39,254,232,255,188,255,64,254,38,254,248,255,6,254,211,255,20,253,72,255,180,252,4,255,123,252,165,255,184,253,159,255,116,253,138,0,4,253,125,255,90,253,244,255,98,253,165,0,253,254,253,255,184,252,149,255,115,252,37,0,32,252,44,0,170,252,97,254,185,252,13,0,23,252,241,254,254,251,203,254,226,252,34,254,192,252,24,254,81,252,168,0,168,251,125,254,95,251,155,255,97,251,216,255,83,252,196,254,250,251,254,252,236,251,143,253,199,251,230,253,56,251,213,254,224,250,76,254,83,251,105,253,113,251,95,255,64,251,78,253,43,251,193,252,104,250,48,253,133,250,19,254,126,252,28,253,102,252,223,252,178,251,110,254,213,249,60,252,219,251,130,253,11,251,98,250,37,250,90,252,34,250,129,252,194,249,204,253,69,249,51,253,162,253,171,253,114,251,195,251,167,250,44,254,102,248,43,250,210,248,71,252,116,248,93,252,37,250,68,255,157,249,91,254,79,250,174,254,88,250,234,255,106,248,90,254,42,248,7,255,16,254,142,255,138,248,13,253,247,250,174,0,85,250,147,255,30,254,255,254,59,251,4,254,175,249,151,0,98,249,208,0,114,253,107,0,141,249,29,0,139,251,23,1,65,251,50,1,52,251,6,254,38,253,81,255,44,251,155,255,55,252,39,2,154,252,22,1,201,252,59,1,205,253,120,1,229,251,228,0,5,254,24,1,169,253,25,1,10,253,253,0,207,254,123,1,13,253,122,255,157,253,148,2,200,252,24,2,207,252,134,2,99,254,49,0,171,254,177,0,59,254,14,2,30,254,77,2,185,255,83,1,111,253,8,1,12,255,39,1,19,255,59,1,125,254,57,2,6,254,247,255,135,254,14,0,96,255,149,2,40,255,40,0,204,254,210,255,95,0,214,0,14,255,167,0,170,255,192,0,200,255,27,0,180,255,31,0,36,0,53,1,150,255,74,255,143,255,74,0,71,254,234,255,23,0,139,0,81,0,245,255,44,0,15,0,169,255,119,255,138,255,49,255,98,255,198,255,16,1,164,255,100,255,71,254,8,0,120,255,128,0,35,255,101,0,38,255,40,0,59,255,180,255,56,254,9,0,67,254,33,0,89,254,226,0,60,0,73,0,34,255,156,0,113,254,24,1,194,254,245,0,171,254,166,0,13,254,83,1,66,255,71,1,37,255,69,1,119,255,167,255,172,253,100,0,141,253,144,0,91,253,231,1,28,0,252,0,121,254,214,0,215,255,26,1,228,255,99,0,226,254,75,1,49,0,203,1,124,254,53,2,143,254,180,1,28,0,80,1,247,255,141,1,89,255,106,2,34,0,84,2,239,255,49,2,116,255,43,1,79,0,10,2,125,0,203,0,2,0,244,0,32,1,255,0,211,0,175,0,82,0,84,2,187,0,5,2,108,0,125,1,255,0,109,1,41,1,241,1,96,1,71,1,174,255,25,0,210,0,115,1,245,0,5,1,3,0,33,2,193,1,140,0,38,1,44,0,39,1,212,0,91,1,244,0,238,1,75,1,16,2,201,0,51,1,93,1,155,1,101,2,28,1,102,2,157,1,208,1,66,1,112,2,141,1,97,0,200,0,96,255,128,1,149,0,106,1,239,1,13,2,13,1,73,2,33,0,235,1,135,255,177,1,171,1,99,2,242,1,4,2,171,0,187,1,241,1,154,2,184,1,19,1,54,2,63,2,146,0,127,2,155,0,158,2,223,255,173,0,212,0,184,2,90,255,89,2,65,255,183,2,23,254,247,1,175,0,230,2,214,0,220,1,116,1,59,4,66,2,18,2,74,2,9,3,169,1,106,3,59,1,73,3,118,1,80,3,91,255,53,2,35,0,223,3,217,255,38,4,73,1,200,2,18,3,72,3,133,2,27,3,149,2,164,2,59,2,150,3,120,2,55,4,161,2,49,3,62,1,132,1,106,3,244,3,52,2,80,3,112,3,108,2,45,2,223,1,159,2,197,1,180,2,212,1,72,3,130,2,76,3,133,2,250,1,172,1,129,3,55,2,69,3,131,1,194,3,243,1,179,2,49,2,171,3,158,3,15,3,40,1,22,3,12,1,4,4,18,2,106,3,73,1,36,2,143,0,163,2,35,1,247,1,66,0,17,4,103,1,18,3,97,0,37,3,33,0,69,3,214,1,255,1,49,0,68,4,71,1,150,4,67,1,3,0,242,0,104,3,218,1,177,2,173,1,49,5,166,2,18,4,108,2,85,4,152,2,65,1,193,0,121,3,182,3,129,4,106,3,125,3,123,2,109,3,94,3,180,3,145,3,13,5,153,2,40,5,127,2,229,3,25,3,122,5,6,4,152,4,244,3,86,4,191,3,130,5,157,3,123,5,147,3,31,2,94,3,92,4,198,4,67,3,166,4,67,3,166,4,191,3,124,4,123,4,96,5,20,5,169,4,135,5,207,4,55,5,61,5,234,2,68,4,175,6,3,5,109,5,49,4,54,5,30,6,129,4,195,5,109,6,113,4,33,7,196,4,32,4,102,5,241,5,194,6,96,6,9,6,84,6,6,6,87,3,60,6,97,3,131,6,181,2,117,3,180,6,239,5,143,4,16,5,161,8,224,6,160,7,213,5,228,7,202,5,254,5,74,7,158,6,216,7,30,6,236,2,225,6,57,3,38,1,112,5,60,4,10,8,109,2,35,5,109,1,7,5,198,0,4,4,232,1,128,5,249,0,147,1,246,3,25,6,68,1,107,1,109,6,20,4,193,0,111,1,242,7,67,7,5,255,67,2,238,2,226,3,13,255,30,0,45,5,111,3,228,255,87,255,112,2,149,3,59,254,159,0,186,0,90,5,154,253,6,0,25,2,136,1,162,255,221,254,13,3,229,0,128,255,214,254,245,0,235,1,67,253,120,253,204,3,21,3,11,254,128,253,178,0,255,0,147,254,122,254,1,255,61,1,66,252,218,254,65,255,228,0,249,252,65,254,157,0,19,255,111,253,48,253,105,254,92,0,139,255,157,253,78,1,26,255,89,253,196,251,112,255,195,254,123,252,163,252,30,253,152,254,171,255,41,253,166,255,237,252,100,0,234,255,121,254,249,254,200,255,183,255,175,254,14,253,5,0,67,255,62,253,144,253,89,0,168,254,121,255,167,251,159,254,19,255,84,253,145,251,237,254,178,251,243,254,77,251,152,0,145,0,46,253,48,251,49,0,80,0,32,251,248,252,8,255,135,1,36,253,221,253,213,1,218,0,1,255,160,252,69,0,110,1,90,255,27,254,80,253,191,0,68,251,84,251,86,255,87,255,228,250,161,249,65,1,214,1,117,250,37,251,192,255,16,1,175,250,8,255,236,1,53,2,47,253,159,253,195,0,229,1,195,253,123,255,171,1,202,0,85,255,138,255,199,0,63,2,2,0,225,255,182,2,243,2,170,250,217,255,40,2,45,2,23,254,15,1,168,2,25,2,13,0,59,254,87,3,186,3,123,255,204,255,175,255,226,2,111,251,125,2,31,4,35,4,161,255,164,2,235,4,57,4,233,1,49,1,63,254,186,3,234,253,228,3,55,252,98,3,222,251,35,4,242,250,106,2,120,250,105,2,54,254,86,5,97,255,29,7,250,252,240,253,242,255,86,4,78,251,123,252,252,252,177,1,24,251,25,251,13,252,210,254,166,253,183,253,9,253,174,249,8,253,243,249,184,252,127,248,208,252,229,253,23,249,69,247,29,255,220,255,14,248,217,248,197,247,154,251,89,246,232,248,66,250,252,0,115,245,97,254,197,253,45,254,229,5,18,6,132,8,183,7,22,9,228,7,191,248,111,249,191,248,37,249,248,247,130,251,170,247,138,249,173,249,181,251,88,249,149,251,191,250,184,249,177,250,154,249,198,250,243,250,211,250,15,251,128,249,143,249,49,250,173,252,190,250,216,248,123,250,116,247,254,250,87,253,7,249,143,249,58,252,198,251,97,251,116,249,226,251,207,251,138,251,122,251,73,251,24,253,6,251,27,252,90,252,153,250,97,252,120,250,14,252,231,250,241,252,69,252,231,251,124,252,31,252,207,252,31,253,201,252,52,252,91,251,30,253,186,251,30,253,126,251,240,252,223,252,214,252,238,252,132,252,248,253,24,252,206,252,124,253,59,252,191,253,142,252,227,253,74,253,97,253,107,252,173,253,126,253,122,253,153,253,68,252,147,253,99,252,253,253,41,253,29,254,209,252,27,254,184,252,190,253,72,254,55,253,190,253,187,254,111,253,98,253,126,254,198,253,71,254,102,253,254,253,237,252,120,254,239,253,246,253,59,254,25,254,89,254,152,253,183,253,151,253,99,255,106,253,244,254,88,253,164,254,190,254,189,254,136,253,68,254,208,254,82,254,180,254,54,254,235,254,44,254,109,253,231,252,193,254,132,253,29,255,214,253,139,254,165,254,178,254,46,255,56,254,64,255,238,253,14,255,40,255,58,255,146,254,142,254,174,254,95,255,103,254,20,253,149,255,132,254,218,254,125,253,33,255,103,253,22,255,27,253,115,255,16,254,126,255,2,254,117,255,185,254,84,255,207,254,206,254,188,253,92,255,249,254,250,254,84,255,189,255,110,254,31,0,146,254,246,255,76,254,170,255,241,253,71,0,135,254,234,255,159,253,244,255,90,253,189,255,193,254,63,0,65,255,35,0,75,255,217,255,14,255,126,0,89,255,116,255,224,253,155,0,215,254,174,0,215,254,38,0,248,255,117,0,132,254,197,0,60,254,240,0,246,253,223,0,153,255,110,0,69,255,87,0,101,255,169,0,209,255,157,0,26,0,173,255,156,255,128,0,80,0,209,0,194,255,6,0,7,0,22,0,5,0,62,1,236,255,248,0,211,255,56,255,193,255,156,0,187,255,250,0,73,255,113,1,130,255,143,255,180,255,114,255,134,255,192,255,2,255,225,255,35,0,79,255,185,255,249,255,171,0,93,0,27,0,108,0,212,0,182,254,47,255,133,255,186,255,233,254,95,0,160,255,20,0,68,255,195,255,198,254,87,0,212,254,178,255,158,254,122,255,11,0,122,0,116,255,122,0,237,254,152,0,219,254,140,0,174,255,138,0,191,254,145,255,32,254,100,255,153,254,76,0,2,255,216,255,133,253,160,255,246,253,79,0,5,254,8,0,244,254,47,1,229,253,68,0,66,254,61,0,246,253,50,1,111,0,189,0,77,254,122,0,133,254,166,0,197,253,114,254,136,253,182,255,21,253,161,255,57,254,194,0,72,252,83,0,226,252,192,0,13,253,192,0,243,252,94,255,149,253,234,0,105,253,215,254,24,254,147,255,60,252,124,255,186,252,188,255,181,252,58,0,168,251,170,255,219,252,213,254,80,252,3,255,246,252,206,255,59,252,219,253,160,254,158,255,32,252,169,254,163,251,197,254,163,251,205,254,125,251,138,254,131,253,26,255,114,251,213,255,237,250,156,255,99,252,119,254,6,251,168,253,79,253,126,255,57,250,200,254,215,250,2,255,72,250,70,254,244,250,155,253,19,251,9,254,35,250,144,254,214,250,26,0,104,250,190,255,49,249,95,255,148,249,45,254,32,249,220,253,143,250,200,253,236,249,153,252,41,250,246,251,149,250,197,253,131,248,240,253,9,249,133,255,151,248,25,255,250,247,189,254,252,247,118,252,72,248,201,253,131,248,148,253,1,248,35,252,203,251,142,254,17,248,64,253,205,246,19,253,76,245,191,251,139,248,159,0,36,248,248,0,142,253,133,255,221,246,62,252,99,253,104,254,157,250,106,251,60,254,148,254,236,251,33,253,124,255,183,0,172,249,16,253,221,253,205,254,247,252,19,251,158,255,41,0,144,252,189,251,255,254,97,0,190,249,215,248,31,0,230,255,124,253,207,253,76,255,222,253,127,254,185,251,102,254,222,252,98,254,197,252,55,254,54,252,22,254,171,251,41,255,108,252,112,255,87,252,19,254,11,251,251,253,29,250,181,0,101,0,180,254,135,252,188,252,87,252,209,253,83,254,139,253,221,253,73,255,175,254,223,253,174,255,6,255,226,254,5,0,124,255,164,254,4,255,219,254,40,254,98,255,100,0,227,255,197,0,20,255,88,254,163,252,43,255,116,255,249,255,85,254,69,254,187,0,159,255,84,253,32,253,219,254,2,1,144,254,104,255,106,255,136,1,159,253,175,0,114,255,43,1,118,255,152,0,137,255,73,1,26,254,204,255,37,1,198,0,73,255,117,0,175,0,75,1,198,255,238,254,231,0,44,1,224,254,74,1,207,254,116,1,145,255,153,1,247,255,167,1,83,0,0,1,67,0,111,1,237,255,248,0,91,0,113,0,221,255,150,1,65,255,154,0,238,0,40,1,5,0,197,0,141,0,221,0,57,1,198,0,211,0,165,1,244,0,78,1,88,0,170,1,13,255,198,1,202,0,40,2,251,255,147,1,35,1,185,0,219,0,45,1,251,0,138,0,128,0,69,0,197,0,32,1,116,255,195,255,188,0,105,1,197,0,86,2,186,1,17,1,34,1,143,0,216,1,226,1,157,0,114,1,159,1,65,1,116,1,129,1,146,1,40,2,155,0,24,0,38,2,7,1,245,255,21,0,104,1,227,0,147,0,2,255,168,1,97,0,110,1,243,255,119,1,141,0,193,1,232,0,140,1,251,1,218,1,16,1,189,2,68,1,106,1,209,255,75,2,148,0,31,2,69,0,144,1,205,255,49,2,59,0,220,0,246,255,96,1,147,0,206,0,211,0,141,2,185,0,51,2,41,1,53,2,28,1,82,2,121,0,254,2,192,0,142,1,118,0,130,2,178,1,233,0,8,1,225,1,211,1,129,0,91,255,187,2,239,0,90,0,26,0,86,1,218,1,201,255,27,0,132,1,94,0,84,255,0,0,213,2,123,1,196,255,81,1,114,1,209,1,95,0,63,1,38,3,83,2,78,0,4,1,241,1,83,3,210,0,48,2,202,1,62,2,48,254,202,0,241,1,113,2,54,255,152,0,48,0,200,2,236,255,54,2,100,0,203,2,199,1,212,1,155,1,93,2,63,1,134,2,195,0,103,2,145,1,26,2,168,2,227,2,201,0,155,2,178,1,186,3,198,1,169,1,134,2,235,1,94,2,169,2,160,1,252,1,241,1,54,3,170,1,47,3,148,2,135,2,116,2,204,2,185,2,210,1,106,2,201,1,173,2,204,1,109,1,53,1,209,2,55,2,68,3,89,2,97,2,44,1,57,3,203,1,175,3,175,2,169,2,21,2,147,3,86,2,79,2,243,0,108,3,195,1,106,3,164,1,18,3,61,1,220,2,220,0,154,3,61,1,84,4,111,1,19,2,210,1,4,4,137,2,29,4,103,2,10,4,41,2,61,3,90,2,253,3,31,3,159,3,35,3,110,3,251,2,31,3,240,1,93,5,5,3,73,2,2,3,35,3,162,3,75,4,25,3,198,4,94,3,185,4,127,3,1,4,215,2,4,3,77,3,148,4,91,4,99,3,253,3,62,3,245,3,73,3,142,3,250,1,191,2,215,4,53,4,108,2,51,3,172,4,59,4,131,4,57,4,118,4,139,3,11,6,97,4,29,5,136,2,63,5,100,2,204,5,220,3,199,5,169,3,217,3,48,5,187,3,61,5,173,1,142,3,73,3,58,5,52,2,155,4,156,1,132,4,147,5,40,5,154,5,50,5,128,2,248,2,190,6,130,5,190,0,43,2,49,4,237,3,170,1,1,1,71,3,212,3,235,0,231,0,240,5,143,4,109,0,37,1,246,3,33,6,49,1,142,0,124,4,27,2,221,254,148,255,189,4,204,3,22,0,40,255,155,2,60,3,30,254,182,1,197,1,151,5,187,253,90,254,21,3,131,1,154,254,58,254,174,0,12,3,220,255,140,254,134,1,122,255,139,253,160,0,206,254,239,2,22,251,181,254,177,0,10,2,8,255,62,2,5,255,127,2,237,253,151,1,172,253,138,1,93,254,21,3,151,253,33,3,38,252,143,1,167,252,215,2,249,255,6,2,65,253,54,1,137,251,232,255,22,252,31,1,64,252,107,1,237,250,56,1,2,250,245,0,235,249,49,1,28,0,153,0,165,252,81,255,223,255,76,1,138,250,102,255,212,0,154,1,175,253,59,255,188,251,64,253,120,252,191,255,26,1,111,1,106,252,82,253,89,1,93,0,254,254,155,254,184,2,132,2,75,253,228,255,192,1,237,1,239,254,193,0,15,2,34,2,13,255,255,253,128,1,120,255,17,1,159,254,0,2,114,255,25,2,58,255,173,3,238,2,83,0,248,0,66,2,93,3,200,255,80,2,74,3,44,0,124,3,24,0,33,0,122,3,240,255,214,3,63,3,118,5,255,5,106,7,180,6,96,5,156,7,185,5,22,252,95,252,184,251,77,251,127,253,93,252,164,253,63,252,245,252,95,253,189,252,236,252,96,254,104,253,54,254,2,253,116,253,247,253,106,253,17,254,1,252,3,254,1,252,84,254,68,254,216,253,144,254,63,254,33,254,45,255,226,251,121,252,196,254,7,255,199,253,177,253,199,253,237,254,227,253,65,255,52,253,68,255,182,252,248,254,179,254,8,255,194,254,28,255,237,254,1,0,201,253,28,255,141,255,35,255,18,255,138,254,59,255,5,254,34,255,189,253,254,254,80,254,195,255,12,255,167,254,2,0,174,254,39,0,41,255,87,255,198,255,0,0,200,255,250,255,53,255,125,255,1,0,70,255,251,255,45,255,6,0,132,254,11,0,94,254,140,255,131,0,122,255,113,0,89,0,252,255,71,0,254,255,237,255,64,255,6,1,24,0,189,0,151,0,123,255,147,255,186,0,103,255,166,0,37,255,37,0,139,0,193,0,171,0,81,1,124,0,158,0,195,255,141,0,226,0,243,255,190,0,231,0,34,0,98,1,109,0,60,1,201,0,244,0,164,0,74,1,171,255,134,1,172,255,254,0,71,1,1,1,79,1,235,1,147,0,220,1,105,0,54,0,77,0,181,1,114,1,165,1,58,1,193,1,86,1,73,1,126,0,161,2,36,1,59,2,132,1,243,0,193,0,141,2,64,1,109,2,24,1,194,0,124,1,5,2,69,2,45,0,67,1,111,0,166,1,233,1,139,1,222,2,22,2,110,2,34,2,230,1,246,1,62,1,60,2,189,0,38,2,129,1,166,1,99,255,153,0,131,255,126,1,59,255,130,1,249,254,78,1,228,0,185,2,68,255,1,0,51,0,41,1,5,254,213,0,136,254,141,1,232,255,255,0,221,253,89,0,10,254,162,255,131,1,179,0,148,253,68,0,84,253,112,0,126,253,162,254,252,254,172,0,74,254,188,254,8,1,136,2,60,252,252,255,159,251,7,0,122,255,134,0,147,251,206,254,143,0,96,0,92,254,15,254,59,251,162,254,9,250,83,253,95,255,72,0,105,3,179,2,220,2,27,1,153,3,97,1,78,1,219,1,71,4,53,3,96,3,12,2,75,3,241,1,202,2,199,2,20,3,238,2,52,4,202,2,180,4,241,2,65,2,150,2,124,245,170,192,38,3,44,7,95,251,33,228,37,12,28,4,40,248,202,208,85,16,107,5,192,249,99,218,69,9,145,5,232,249,78,219,176,12,193,7,210,251,214,230,35,7,16,9,184,252,64,236,173,3,242,12,199,254,163,248,47,9,161,11,41,254,234,244,32,14,116,9,247,252,183,237,123,13,24,12,98,254,70,246,139,11,205,16,72,0,178,1,56,7,148,17,139,0,68,3,44,15,40,21,157,1,180,9,163,4,42,28,67,3,166,19,11,12,40,35,139,4,90,27,216,28,115,3,37,247,177,202,74,23,226,5,58,250,60,221,35,20,86,8,61,252,88,233,8,31,217,7,228,251,65,231,107,25,202,8,139,252,49,235,246,29,192,10,180,253,47,242,64,23,200,11,60,254,92,245,34,19,180,14,131,255,17,253,77,27,4,14,60,255,103,251,238,31,138,15,213,255,252,254,176,23,52,17,107,0,133,2,29,30,223,19,64,1,136,7,147,21,133,23,57,2,98,13,89,30,214,27,50,3,62,19,172,23,2,31,209,3,253,22,218,21,223,44,243,5,212,35,85,41,76,5,159,249,153,217,89,35,61,6,145,250,68,223,66,38,243,7,247,251,180,231,242,34,111,9,244,252,164,237,56,40,24,10,87,253,253,239,191,36,174,10,171,253,245,241,252,33,146,12,156,254,160,247,29,38,67,13,235,254,123,249,193,39,52,15,181,255,58,254,210,35,176,17,148,0,123,3,168,39,140,19,40,1,245,6,154,35,103,22,241,1,177,11,4,41,122,24,116,2,198,14,126,39,207,29,151,3,158,21,140,34,23,34,93,4,72,26,252,34,208,48,112,6,193,38,124,50,208,3,185,247,47,206,171,44,219,6,28,251,141,226,106,47,24,9,189,252,96,236,124,44,64,9,214,252,248,236,204,41,248,11,83,254,236,245,44,48,45,11,238,253,136,243,202,45,255,12,205,254,200,248,6,44,116,14,106,255,120,252,109,42,61,17,110,0,151,2,50,47,181,17,150,0,134,3,19,44,85,20,98,1,84,8,184,46,161,24,125,2,253,14,159,43,110,29,132,3,44,21,96,47,137,32,25,4,168,24,217,42,25,42,149,5,156,33,60,40,224,67,87,8,53,50,75,54,145,6,220,250,15,225,36,49,253,7,254,251,221,231,209,51,135,9,2,253,254,237,209,54,173,11,47,254,14,245,140,52,26,12,99,254,78,246,108,48,74,14,89,255,18,252,198,52,196,14,137,255,55,253,80,50,176,16,62,0,118,1,221,52,253,18,253,0,243,5,123,49,81,21,168,1,248,9,30,54,218,23,78,2,223,13,231,50,83,25,166,2,244,15,245,52,41,30,169,3,7,22,157,50,95,36,189,4,136,28,146,53,31,45,252,5,5,36,47,49,102,59,146,7,147,45,9,59,4,6,91,250,4,222,224,58,29,9,192,252,113,236,191,56,207,9,45,253,0,239,100,57,127,12,147,254,107,247,22,60,232,13,49,255,33,251,53,55,120,15,206,255,212,254,254,58,140,16,50,0,42,1,252,55,216,18,242,0,174,5,254,57,75,21,166,1,238,9,202,59,195,23,72,2,190,13,249,55,232,26,0,3,15,18,212,58,9,30,162,3,226,21,70,56,210,36,207,4,245,28,27,60,13,38,0,5,26,30,232,57,191,55,52,7,94,43,32,53,107,97,109,10,195,62,12,64,177,7,198,251,139,230,177,65,16,11,223,253,45,243,97,61,27,11,229,253,80,243,232,62,8,13,209,254,223,248,0,64,123,15,207,255,218,254,44,66,227,17,165,0,224,3,95,61,247,17,171,0,6,4,94,63,72,21,165,1,233,9,192,65,238,24,143,2,105,15,129,61,229,27,53,3,80,19,198,63,45,29,120,3,223,20,227,64,176,33,76,4,222,25,132,66,178,40,99,5,111,32,33,62,41,46,29,6,207,36,238,65,98,57,95,7,96,44,131,64,134,81,102,9,147,56,222,70,35,8,25,252,131,232,201,75,106,12,137,254,47,247,100,68,98,13,248,254,203,249,86,78,187,15,231,255,105,255,149,70,153,16,54,0,70,1,8,74,202,19,58,1,98,7,47,69,26,21,153,1,157,9,123,77,48,24,98,2,92,14,30,70,102,27,27,3,176,18,70,83,197,30,198,3,184,22,246,69,73,36,186,4,115,28,200,74,74,36,186,4,116,28,37,80,117,44,230,5,129,35,155,70,149,56,74,7,226,43,31,78,218,69,129,8,52,51,154,73,252,127,0,12,62,72,61,42,81,112,63,11,181,67,0,80,225,10,198,253,153,242,153,73,194,25,191,2,139,16,81,24,245,28,108,3,156,20,51,67,204,40,103,5,133,32,122,84,245,4,61,249,74,215,143,82,71,17,113,0,171,2,40,44,20,6,106,250,95,222,61,74,20,50,150,6,164,39,215,67,194,9,37,253,210,238,194,69,225,18,244,0,192,5,10,39,194,9,37,253,210,238,122,68,184,30,196,3,170,22,174,55,92,7,133,251,5,229,20,62,81,12,125,254,233,246,61,26,10,7,67,251,121,227,10,71,225,78,53,9,109,55,102,70,215,11,67,254,138,245,71,65,225,22,16,2,109,12,143,34,174,15,226,255,76,255,20,62,10,35,134,4,60,27,102,70,112,5,198,249,129,218,71,65,0,16,0,0,0,0,0,32,143,2,108,245,79,192,133,59,102,54,16,7,132,42,174,55,40,12,106,254,116,246,10,55,61,18,193,0,141,4,30,21,143,10,154,253,143,241,122,52,153,25,182,2,84,16,163,48,133,3,67,247,100,203,163,48,102,10,131,253,7,241,184,14,143,2,108,245,79,192,153,57,215,91,22,10,183,60,225,74,153,9,13,253,62,238,184,78,215,19,62,1,121,7,225,26,0,16,0,0,0,0,0,80,112,33,65,4,156,25,204,76,225,2,26,246,105,196,61,74,163,16,58,0,91,1,184,30,40,8,29,252,151,232,204,44,0,48,87,6,43,38,20,62,194,5,26,250,126,220,112,61,20,18,180,0,62,4,215,35,153,5,240,249,131,219,184,62,92,27,25,3,164,18,235,57,225,2,26,246,105,196,225,58,204,8,140,252,55,235,215,19,204,4,12,249,38,214,215,51,174,67,83,8,27,50,163,64,30,9,193,252,118,236,225,58,184,22,6,2,46,12,92,15,102,14,100,255,86,252,174,55,153,33,72,4,198,25,235,65,10,3,106,246,74,198,225,58,225,14,149,255,122,253,174,23,102,2,12,245,17,190,122,36,40,36,180,4,83,28,215,51,225,6,33,251,172,226,215,51,194,13,33,255,193,250,153,9,174,7,196,251,127,230,204,44,153,21,187,1,108,10,245,40,225,2,26,246,105,196,112,45,122,12,145,254,92,247,194,5,10,3,106,246,74,198,0,64,248,65,226,67,190,69,142,71,82,73,12,75,188,76,98,78,0,80,150,81,35,83,170,84,42,86,163,87,22,89,130,90,234,91,76,93,168,94,0,96,83,97,161,98,236,99,49,101,115,102,177,103,235,104,34,106,85,107,132,108,177,109,218,110,0,112,35,113,67,114,97,115,123,116,147,117,169,118,188,119,204,120,218,121,230,122,239,123,247,124,252,125,255,126,255,127,255,127,61,10,63,10,69,10,78,10,91,10,108,10,129,10,153,10,181,10,212,10,248,10,31,11,74,11,120,11,170,11,224,11,25,12,86,12,151,12,219,12,35,13,110,13,189,13,15,14,101,14,190,14,27,15,123,15,223,15,70,16,176,16,30,17,143,17,3,18,123,18,245,18,115,19,244,19,120,20,0,21,138,21,23,22,168,22,59,23,209,23,106,24,6,25,165,25,70,26,234,26,145,27,59,28,231,28,149,29,70,30,250,30,176,31,104,32,35,33,224,33,159,34,97,35,36,36,234,36,178,37,124,38,71,39,21,40,228,40,181,41,136,42,93,43,51,44,11,45,228,45,191,46,155,47,121,48,88,49,56,50,26,51,252,51,224,52,196,53,170,54,145,55,120,56,96,57,73,58,51,59,29,60,8,61,243,61,223,62,203,63,184,64,165,65,146,66,127,67,108,68,90,69,71,70,52,71,33,72,14,73,251,73,231,74,211,75,191,76,170,77,149,78,126,79,104,80,80,81,56,82,31,83,5,84,234,84,207,85,178,86,148,87,116,88,84,89,50,90,15,91,235,91,197,92,157,93,117,94,74,95,30,96,240,96,192,97,143,98,91,99,38,100,239,100,181,101,122,102,60,103,253,103,187,104,119,105,48,106,232,106,156,107,79,108,255,108,172,109,87,110,255,110,165,111,71,112,231,112,133,113,31,114,183,114,75,115,221,115,108,116,248,116,129,117,6,118,137,118,8,119,133,119,254,119,116,120,230,120,86,121,194,121,42,122,144,122,242,122,80,123,171,123,3,124,87,124,167,124,244,124,62,125,132,125,198,125,5,126,64,126,120,126,172,126,220,126,9,127,49,127,87,127,120,127,150,127,176,127,199,127,217,127,232,127,243,127,251,127,255,127,255,127,229,127,153,127,25,127,103,126,129,125],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE+20480);allocate([106,124,33,123,167,121,252,119,34,118,24,116,223,113,122,111,231,108,41,106,65,103,47,100,245,96,149,93,15,90,101,86,153,82,171,78,158,74,116,70,45,66,204,61,82,57,193,52,27,48,98,43,151,38,189,33,213,28,226,23,230,18,226,13,216,8,203,3,61,10,64,10,73,10,88,10,108,10,135,10,167,10,205,10,249,10,43,11,99,11,160,11,227,11,44,12,122,12,207,12,40,13,136,13,237,13,87,14,199,14,60,15,183,15,55,16,189,16,71,17,215,17,108,18,6,19,165,19,73,20,242,20,159,21,82,22,9,23,196,23,133,24,73,25,18,26,224,26,177,27,135,28,97,29,62,30,32,31,5,32,238,32,219,33,203,34,191,35,182,36,176,37,174,38,174,39,177,40,184,41,193,42,204,43,218,44,235,45,254,46,19,48,42,49,67,50,94,51,123,52,154,53,186,54,219,55,254,56,34,58,71,59,109,60,148,61,188,62,228,63,13,65,54,66,96,67,138,68,180,69,221,70,7,72,48,73,89,74,130,75,169,76,208,77,246,78,27,80,63,81,98,82,132,83,164,84,194,85,223,86,250,87,19,89,43,90,64,91,83,92,99,93,113,94,125,95,134,96,140,97,143,98,144,99,141,100,135,101,126,102,114,103,98,104,79,105,56,106,30,107,255,107,221,108,183,109,140,110,94,111,43,112,244,112,185,113,121,114,53,115,236,115,158,116,76,117,245,117,153,118,55,119,209,119,102,120,246,120,129,121,6,122,134,122,1,123,118,123,230,123,81,124,182,124,21,125,111,125,195,125,17,126,90,126,157,126,219,126,18,127,68,127,112,127,150,127,183,127,209,127,230,127,244,127,253,127,255,127,255,127,244,127,208,127,149,127,66,127,215,126,85,126,188,125,12,125,69,124,104,123,117,122,108,121,78,120,28,119,213,117,122,116,13,115,140,113,250,111,87,110,162,108,222,106,11,105,40,103,57,101,60,99,51,97,30,95,255,92,215,90,165,88,108,86,44,84,229,81,154,79,74,77,247,74,161,72,74,70,243,67,156,65,71,63,244,60,164,58,88,56,18,54,209,51,152,49,103,47,62,45,31,43,11,41,2,39,5,37,21,35,51,33,95,31,155,29,231,27,67,26,177,24,49,23,195,21,105,20,34,19,239,17,209,16,201,15,214,14,249,13,50,13,130,12,232,11,102,11,252,10,169,10,109,10,73,10,61,10,61,10,63,10,67,10,74,10,84,10,96,10,111,10,129,10,150,10,174,10,200,10,229,10,5,11,39,11,77,11,117,11,159,11,205,11,253,11,48,12,101,12,157,12,216,12,22,13,86,13,153,13,222,13,38,14,113,14,190,14,13,15,96,15,181,15,12,16,102,16,194,16,33,17,130,17,230,17,76,18,180,18,31,19,140,19,252,19,110,20,226,20,88,21,209,21,76,22,201,22,72,23,202,23,77,24,211,24,91,25,229,25,113,26,254,26,142,27,32,28,180,28,74,29,225,29,123,30,22,31,179,31,82,32,242,32,149,33,57,34,222,34,133,35,46,36,216,36,132,37,50,38,224,38,145,39,66,40,245,40,169,41,95,42,22,43,206,43,135,44,66,45,253,45,186,46,120,47,54,48,246,48,183,49,120,50,59,51,254,51,194,52,135,53,77,54,19,55,218,55,161,56,106,57,50,58,252,58,197,59,144,60,90,61,37,62,240,62,188,63,136,64,84,65,32,66,236,66,185,67,133,68,82,69,30,70,235,70,183,71,132,72,80,73,28,74,231,74,179,75,126,76,73,77,19,78,221,78,166,79,111,80,56,81,0,82,199,82,142,83,84,84,25,85,221,85,161,86,100,87,38,88,231,88,167,89,103,90,37,91,226,91,158,92,89,93,19,94,204,94,131,95,57,96,238,96,162,97,84,98,5,99,181,99,99,100,15,101,186,101,100,102,12,103,178,103,87,104,250,104,155,105,59,106,217,106,117,107,16,108,168,108,63,109,211,109,102,110,247,110,134,111,19,112,158,112,39,113,174,113,50,114,181,114,53,115,179,115,47,116,169,116,33,117,150,117,9,118,122,118,232,118,84,119,190,119,37,120,138,120,236,120,76,121,170,121,5,122,94,122,180,122,7,123,88,123,167,123,242,123,60,124,130,124,198,124,8,125,71,125,131,125,188,125,243,125,39,126,89,126,136,126,180,126,221,126,4,127,40,127,73,127,103,127,131,127,156,127,178,127,197,127,214,127,228,127,239,127,247,127,253,127,255,127,255,127,97,125,160,117,15,105,48,88,181,67,116,44,98,19,68,101,99,111,100,101,114,0,101,110,99,111,100,101,114,0],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE+30720);var tempDoublePtr=Runtime.alignMemory(allocate(12,"i8",ALLOC_STATIC),8);assert(tempDoublePtr%8==0);function _sbrk(bytes){var self=_sbrk;if(!self.called){DYNAMICTOP=alignMemoryPage(DYNAMICTOP);self.called=true;assert(Runtime.dynamicAlloc);self.alloc=Runtime.dynamicAlloc;Runtime.dynamicAlloc=function(){abort("cannot dynamically allocate, sbrk now has control");};}var ret=DYNAMICTOP;if(bytes!=0){var success=self.alloc(bytes);if(!success)return-1>>>0;}return ret;}function ___setErrNo(value){if(Module["___errno_location"])HEAP32[Module["___errno_location"]()>>2]=value;return value;}var ERRNO_CODES={EPERM:1,ENOENT:2,ESRCH:3,EINTR:4,EIO:5,ENXIO:6,E2BIG:7,ENOEXEC:8,EBADF:9,ECHILD:10,EAGAIN:11,EWOULDBLOCK:11,ENOMEM:12,EACCES:13,EFAULT:14,ENOTBLK:15,EBUSY:16,EEXIST:17,EXDEV:18,ENODEV:19,ENOTDIR:20,EISDIR:21,EINVAL:22,ENFILE:23,EMFILE:24,ENOTTY:25,ETXTBSY:26,EFBIG:27,ENOSPC:28,ESPIPE:29,EROFS:30,EMLINK:31,EPIPE:32,EDOM:33,ERANGE:34,ENOMSG:42,EIDRM:43,ECHRNG:44,EL2NSYNC:45,EL3HLT:46,EL3RST:47,ELNRNG:48,EUNATCH:49,ENOCSI:50,EL2HLT:51,EDEADLK:35,ENOLCK:37,EBADE:52,EBADR:53,EXFULL:54,ENOANO:55,EBADRQC:56,EBADSLT:57,EDEADLOCK:35,EBFONT:59,ENOSTR:60,ENODATA:61,ETIME:62,ENOSR:63,ENONET:64,ENOPKG:65,EREMOTE:66,ENOLINK:67,EADV:68,ESRMNT:69,ECOMM:70,EPROTO:71,EMULTIHOP:72,EDOTDOT:73,EBADMSG:74,ENOTUNIQ:76,EBADFD:77,EREMCHG:78,ELIBACC:79,ELIBBAD:80,ELIBSCN:81,ELIBMAX:82,ELIBEXEC:83,ENOSYS:38,ENOTEMPTY:39,ENAMETOOLONG:36,ELOOP:40,EOPNOTSUPP:95,EPFNOSUPPORT:96,ECONNRESET:104,ENOBUFS:105,EAFNOSUPPORT:97,EPROTOTYPE:91,ENOTSOCK:88,ENOPROTOOPT:92,ESHUTDOWN:108,ECONNREFUSED:111,EADDRINUSE:98,ECONNABORTED:103,ENETUNREACH:101,ENETDOWN:100,ETIMEDOUT:110,EHOSTDOWN:112,EHOSTUNREACH:113,EINPROGRESS:115,EALREADY:114,EDESTADDRREQ:89,EMSGSIZE:90,EPROTONOSUPPORT:93,ESOCKTNOSUPPORT:94,EADDRNOTAVAIL:99,ENETRESET:102,EISCONN:106,ENOTCONN:107,ETOOMANYREFS:109,EUSERS:87,EDQUOT:122,ESTALE:116,ENOTSUP:95,ENOMEDIUM:123,EILSEQ:84,EOVERFLOW:75,ECANCELED:125,ENOTRECOVERABLE:131,EOWNERDEAD:130,ESTRPIPE:86};function _sysconf(name){switch(name){case 30:return PAGE_SIZE;case 85:return totalMemory/PAGE_SIZE;case 132:case 133:case 12:case 137:case 138:case 15:case 235:case 16:case 17:case 18:case 19:case 20:case 149:case 13:case 10:case 236:case 153:case 9:case 21:case 22:case 159:case 154:case 14:case 77:case 78:case 139:case 80:case 81:case 82:case 68:case 67:case 164:case 11:case 29:case 47:case 48:case 95:case 52:case 51:case 46:return 200809;case 79:return 0;case 27:case 246:case 127:case 128:case 23:case 24:case 160:case 161:case 181:case 182:case 242:case 183:case 184:case 243:case 244:case 245:case 165:case 178:case 179:case 49:case 50:case 168:case 169:case 175:case 170:case 171:case 172:case 97:case 76:case 32:case 173:case 35:return-1;case 176:case 177:case 7:case 155:case 8:case 157:case 125:case 126:case 92:case 93:case 129:case 130:case 131:case 94:case 91:return 1;case 74:case 60:case 69:case 70:case 4:return 1024;case 31:case 42:case 72:return 32;case 87:case 26:case 33:return 2147483647;case 34:case 1:return 47839;case 38:case 36:return 99;case 43:case 37:return 2048;case 0:return 2097152;case 3:return 65536;case 28:return 32768;case 44:return 32767;case 75:return 16384;case 39:return 1e3;case 89:return 700;case 71:return 256;case 40:return 255;case 2:return 100;case 180:return 64;case 25:return 20;case 5:return 16;case 6:return 6;case 73:return 4;case 84:{if(typeof navigator==="object")return navigator["hardwareConcurrency"]||1;return 1;}}___setErrNo(ERRNO_CODES.EINVAL);return-1;}function _emscripten_memcpy_big(dest,src,num){HEAPU8.set(HEAPU8.subarray(src,src+num),dest);return dest;}Module["_memcpy"]=_memcpy;Module["_memmove"]=_memmove;Module["_memset"]=_memset;function _abort(){Module["abort"]();}var ERRNO_MESSAGES={0:"Success",1:"Not super-user",2:"No such file or directory",3:"No such process",4:"Interrupted system call",5:"I/O error",6:"No such device or address",7:"Arg list too long",8:"Exec format error",9:"Bad file number",10:"No children",11:"No more processes",12:"Not enough core",13:"Permission denied",14:"Bad address",15:"Block device required",16:"Mount device busy",17:"File exists",18:"Cross-device link",19:"No such device",20:"Not a directory",21:"Is a directory",22:"Invalid argument",23:"Too many open files in system",24:"Too many open files",25:"Not a typewriter",26:"Text file busy",27:"File too large",28:"No space left on device",29:"Illegal seek",30:"Read only file system",31:"Too many links",32:"Broken pipe",33:"Math arg out of domain of func",34:"Math result not representable",35:"File locking deadlock error",36:"File or path name too long",37:"No record locks available",38:"Function not implemented",39:"Directory not empty",40:"Too many symbolic links",42:"No message of desired type",43:"Identifier removed",44:"Channel number out of range",45:"Level 2 not synchronized",46:"Level 3 halted",47:"Level 3 reset",48:"Link number out of range",49:"Protocol driver not attached",50:"No CSI structure available",51:"Level 2 halted",52:"Invalid exchange",53:"Invalid request descriptor",54:"Exchange full",55:"No anode",56:"Invalid request code",57:"Invalid slot",59:"Bad font file fmt",60:"Device not a stream",61:"No data (for no delay io)",62:"Timer expired",63:"Out of streams resources",64:"Machine is not on the network",65:"Package not installed",66:"The object is remote",67:"The link has been severed",68:"Advertise error",69:"Srmount error",70:"Communication error on send",71:"Protocol error",72:"Multihop attempted",73:"Cross mount point (not really error)",74:"Trying to read unreadable message",75:"Value too large for defined data type",76:"Given log. name not unique",77:"f.d. invalid for this operation",78:"Remote address changed",79:"Can access a needed shared lib",80:"Accessing a corrupted shared lib",81:".lib section in a.out corrupted",82:"Attempting to link in too many libs",83:"Attempting to exec a shared library",84:"Illegal byte sequence",86:"Streams pipe error",87:"Too many users",88:"Socket operation on non-socket",89:"Destination address required",90:"Message too long",91:"Protocol wrong type for socket",92:"Protocol not available",93:"Unknown protocol",94:"Socket type not supported",95:"Not supported",96:"Protocol family not supported",97:"Address family not supported by protocol family",98:"Address already in use",99:"Address not available",100:"Network interface is not configured",101:"Network is unreachable",102:"Connection reset by network",103:"Connection aborted",104:"Connection reset by peer",105:"No buffer space available",106:"Socket is already connected",107:"Socket is not connected",108:"Can't send after socket shutdown",109:"Too many references",110:"Connection timed out",111:"Connection refused",112:"Host is down",113:"Host is unreachable",114:"Socket already connected",115:"Connection already in progress",116:"Stale file handle",122:"Quota exceeded",123:"No medium (in tape drive)",125:"Operation canceled",130:"Previous owner died",131:"State not recoverable"};var TTY={ttys:[],init:function init(){},shutdown:function shutdown(){},register:function register(dev,ops){TTY.ttys[dev]={input:[],output:[],ops:ops};FS.registerDevice(dev,TTY.stream_ops);},stream_ops:{open:function open(stream){var tty=TTY.ttys[stream.node.rdev];if(!tty){throw new FS.ErrnoError(ERRNO_CODES.ENODEV);}stream.tty=tty;stream.seekable=false;},close:function close(stream){stream.tty.ops.flush(stream.tty);},flush:function flush(stream){stream.tty.ops.flush(stream.tty);},read:function read(stream,buffer,offset,length,pos){if(!stream.tty||!stream.tty.ops.get_char){throw new FS.ErrnoError(ERRNO_CODES.ENXIO);}var bytesRead=0;for(var i=0;i0){Module["print"](UTF8ArrayToString(tty.output,0));tty.output=[];}}},default_tty1_ops:{put_char:function put_char(tty,val){if(val===null||val===10){Module["printErr"](UTF8ArrayToString(tty.output,0));tty.output=[];}else{if(val!=0)tty.output.push(val);}},flush:function flush(tty){if(tty.output&&tty.output.length>0){Module["printErr"](UTF8ArrayToString(tty.output,0));tty.output=[];}}}};var MEMFS={ops_table:null,mount:function mount(_mount){return MEMFS.createNode(null,"/",16384|511,0);},createNode:function createNode(parent,name,mode,dev){if(FS.isBlkdev(mode)||FS.isFIFO(mode)){throw new FS.ErrnoError(ERRNO_CODES.EPERM);}if(!MEMFS.ops_table){MEMFS.ops_table={dir:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,lookup:MEMFS.node_ops.lookup,mknod:MEMFS.node_ops.mknod,rename:MEMFS.node_ops.rename,unlink:MEMFS.node_ops.unlink,rmdir:MEMFS.node_ops.rmdir,readdir:MEMFS.node_ops.readdir,symlink:MEMFS.node_ops.symlink},stream:{llseek:MEMFS.stream_ops.llseek}},file:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:{llseek:MEMFS.stream_ops.llseek,read:MEMFS.stream_ops.read,write:MEMFS.stream_ops.write,allocate:MEMFS.stream_ops.allocate,mmap:MEMFS.stream_ops.mmap,msync:MEMFS.stream_ops.msync}},link:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,readlink:MEMFS.node_ops.readlink},stream:{}},chrdev:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:FS.chrdev_stream_ops}};}var node=FS.createNode(parent,name,mode,dev);if(FS.isDir(node.mode)){node.node_ops=MEMFS.ops_table.dir.node;node.stream_ops=MEMFS.ops_table.dir.stream;node.contents={};}else if(FS.isFile(node.mode)){node.node_ops=MEMFS.ops_table.file.node;node.stream_ops=MEMFS.ops_table.file.stream;node.usedBytes=0;node.contents=null;}else if(FS.isLink(node.mode)){node.node_ops=MEMFS.ops_table.link.node;node.stream_ops=MEMFS.ops_table.link.stream;}else if(FS.isChrdev(node.mode)){node.node_ops=MEMFS.ops_table.chrdev.node;node.stream_ops=MEMFS.ops_table.chrdev.stream;}node.timestamp=Date.now();if(parent){parent.contents[name]=node;}return node;},getFileDataAsRegularArray:function getFileDataAsRegularArray(node){if(node.contents&&node.contents.subarray){var arr=[];for(var i=0;inode.contents.length){node.contents=MEMFS.getFileDataAsRegularArray(node);node.usedBytes=node.contents.length;}if(!node.contents||node.contents.subarray){var prevCapacity=node.contents?node.contents.buffer.byteLength:0;if(prevCapacity>=newCapacity)return;var CAPACITY_DOUBLING_MAX=1024*1024;newCapacity=Math.max(newCapacity,prevCapacity*(prevCapacity0)node.contents.set(oldContents.subarray(0,node.usedBytes),0);return;}if(!node.contents&&newCapacity>0)node.contents=[];while(node.contents.lengthnewSize)node.contents.length=newSize;else while(node.contents.length=stream.node.usedBytes)return 0;var size=Math.min(stream.node.usedBytes-position,length);assert(size>=0);if(size>8&&contents.subarray){buffer.set(contents.subarray(position,position+size),offset);}else{for(var i=0;i0||position+lengthe2.timestamp){create.push(key);total++;}});var remove=[];Object.keys(dst.entries).forEach(function(key){var e=dst.entries[key];var e2=src.entries[key];if(!e2){remove.push(key);total++;}});if(!total){return callback(null);}var completed=0;var db=src.type==="remote"?src.db:dst.db;var transaction=db.transaction([IDBFS.DB_STORE_NAME],"readwrite");var store=transaction.objectStore(IDBFS.DB_STORE_NAME);function done(err){if(err){if(!done.errored){done.errored=true;return callback(err);}return;}if(++completed>=total){return callback(null);}}transaction.onerror=function(e){done(this.error);e.preventDefault();};create.sort().forEach(function(path){if(dst.type==="local"){IDBFS.loadRemoteEntry(store,path,function(err,entry){if(err)return done(err);IDBFS.storeLocalEntry(path,entry,done);});}else{IDBFS.loadLocalEntry(path,function(err,entry){if(err)return done(err);IDBFS.storeRemoteEntry(store,path,entry,done);});}});remove.sort().reverse().forEach(function(path){if(dst.type==="local"){IDBFS.removeLocalEntry(path,done);}else{IDBFS.removeRemoteEntry(store,path,done);}});}};var WORKERFS={DIR_MODE:16895,FILE_MODE:33279,reader:null,mount:function mount(_mount3){assert(ENVIRONMENT_IS_WORKER);if(!WORKERFS.reader)WORKERFS.reader=new FileReaderSync();var root=WORKERFS.createNode(null,"/",WORKERFS.DIR_MODE,0);var createdParents={};function ensureParent(path){var parts=path.split("/");var parent=root;for(var i=0;i=stream.node.size)return 0;var chunk=stream.node.contents.slice(position,position+length);var ab=WORKERFS.reader.readAsArrayBuffer(chunk);buffer.set(new Uint8Array(ab),offset);return chunk.size;},write:function write(stream,buffer,offset,length,position){throw new FS.ErrnoError(ERRNO_CODES.EIO);},llseek:function llseek(stream,offset,whence){var position=offset;if(whence===1){position+=stream.position;}else if(whence===2){if(FS.isFile(stream.node.mode)){position+=stream.node.size;}}if(position<0){throw new FS.ErrnoError(ERRNO_CODES.EINVAL);}return position;}}};var _stdin=allocate(1,"i32*",ALLOC_STATIC);var _stdout=allocate(1,"i32*",ALLOC_STATIC);var _stderr=allocate(1,"i32*",ALLOC_STATIC);var FS={root:null,mounts:[],devices:[null],streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:false,ignorePermissions:true,trackingDelegate:{},tracking:{openFlags:{READ:1,WRITE:2}},ErrnoError:null,genericErrors:{},filesystems:null,handleFSError:function handleFSError(e){if(!(e instanceof FS.ErrnoError))throw e+" : "+stackTrace();return ___setErrNo(e.errno);},lookupPath:function lookupPath(path,opts){path=PATH.resolve(FS.cwd(),path);opts=opts||{};if(!path)return{path:"",node:null};var defaults={follow_mount:true,recurse_count:0};for(var key in defaults){if(opts[key]===undefined){opts[key]=defaults[key];}}if(opts.recurse_count>8){throw new FS.ErrnoError(ERRNO_CODES.ELOOP);}var parts=PATH.normalizeArray(path.split("/").filter(function(p){return!!p;}),false);var current=FS.root;var current_path="/";for(var i=0;i40){throw new FS.ErrnoError(ERRNO_CODES.ELOOP);}}}}return{path:current_path,node:current};},getPath:function getPath(node){var path;while(true){if(FS.isRoot(node)){var mount=node.mount.mountpoint;if(!path)return mount;return mount[mount.length-1]!=="/"?mount+"/"+path:mount+path;}path=path?node.name+"/"+path:node.name;node=node.parent;}},hashName:function hashName(parentid,name){var hash=0;for(var i=0;i>>0)%FS.nameTable.length;},hashAddNode:function hashAddNode(node){var hash=FS.hashName(node.parent.id,node.name);node.name_next=FS.nameTable[hash];FS.nameTable[hash]=node;},hashRemoveNode:function hashRemoveNode(node){var hash=FS.hashName(node.parent.id,node.name);if(FS.nameTable[hash]===node){FS.nameTable[hash]=node.name_next;}else{var current=FS.nameTable[hash];while(current){if(current.name_next===node){current.name_next=node.name_next;break;}current=current.name_next;}}},lookupNode:function lookupNode(parent,name){var err=FS.mayLookup(parent);if(err){throw new FS.ErrnoError(err,parent);}var hash=FS.hashName(parent.id,name);for(var node=FS.nameTable[hash];node;node=node.name_next){var nodeName=node.name;if(node.parent.id===parent.id&&nodeName===name){return node;}}return FS.lookup(parent,name);},createNode:function createNode(parent,name,mode,rdev){if(!FS.FSNode){FS.FSNode=function(parent,name,mode,rdev){if(!parent){parent=this;}this.parent=parent;this.mount=parent.mount;this.mounted=null;this.id=FS.nextInode++;this.name=name;this.mode=mode;this.node_ops={};this.stream_ops={};this.rdev=rdev;};FS.FSNode.prototype={};var readMode=292|73;var writeMode=146;Object.defineProperties(FS.FSNode.prototype,{read:{get:function get(){return(this.mode&readMode)===readMode;},set:function set(val){val?this.mode|=readMode:this.mode&=~readMode;}},write:{get:function get(){return(this.mode&writeMode)===writeMode;},set:function set(val){val?this.mode|=writeMode:this.mode&=~writeMode;}},isFolder:{get:function get(){return FS.isDir(this.mode);}},isDevice:{get:function get(){return FS.isChrdev(this.mode);}}});}var node=new FS.FSNode(parent,name,mode,rdev);FS.hashAddNode(node);return node;},destroyNode:function destroyNode(node){FS.hashRemoveNode(node);},isRoot:function isRoot(node){return node===node.parent;},isMountpoint:function isMountpoint(node){return!!node.mounted;},isFile:function isFile(mode){return(mode&61440)===32768;},isDir:function isDir(mode){return(mode&61440)===16384;},isLink:function isLink(mode){return(mode&61440)===40960;},isChrdev:function isChrdev(mode){return(mode&61440)===8192;},isBlkdev:function isBlkdev(mode){return(mode&61440)===24576;},isFIFO:function isFIFO(mode){return(mode&61440)===4096;},isSocket:function isSocket(mode){return(mode&49152)===49152;},flagModes:{"r":0,"rs":1052672,"r+":2,"w":577,"wx":705,"xw":705,"w+":578,"wx+":706,"xw+":706,"a":1089,"ax":1217,"xa":1217,"a+":1090,"ax+":1218,"xa+":1218},modeStringToFlags:function modeStringToFlags(str){var flags=FS.flagModes[str];if(typeof flags==="undefined"){throw new Error("Unknown file open mode: "+str);}return flags;},flagsToPermissionString:function flagsToPermissionString(flag){var perms=["r","w","rw"][flag&3];if(flag&512){perms+="w";}return perms;},nodePermissions:function nodePermissions(node,perms){if(FS.ignorePermissions){return 0;}if(perms.indexOf("r")!==-1&&!(node.mode&292)){return ERRNO_CODES.EACCES;}else if(perms.indexOf("w")!==-1&&!(node.mode&146)){return ERRNO_CODES.EACCES;}else if(perms.indexOf("x")!==-1&&!(node.mode&73)){return ERRNO_CODES.EACCES;}return 0;},mayLookup:function mayLookup(dir){var err=FS.nodePermissions(dir,"x");if(err)return err;if(!dir.node_ops.lookup)return ERRNO_CODES.EACCES;return 0;},mayCreate:function mayCreate(dir,name){try{var node=FS.lookupNode(dir,name);return ERRNO_CODES.EEXIST;}catch(e){}return FS.nodePermissions(dir,"wx");},mayDelete:function mayDelete(dir,name,isdir){var node;try{node=FS.lookupNode(dir,name);}catch(e){return e.errno;}var err=FS.nodePermissions(dir,"wx");if(err){return err;}if(isdir){if(!FS.isDir(node.mode)){return ERRNO_CODES.ENOTDIR;}if(FS.isRoot(node)||FS.getPath(node)===FS.cwd()){return ERRNO_CODES.EBUSY;}}else{if(FS.isDir(node.mode)){return ERRNO_CODES.EISDIR;}}return 0;},mayOpen:function mayOpen(node,flags){if(!node){return ERRNO_CODES.ENOENT;}if(FS.isLink(node.mode)){return ERRNO_CODES.ELOOP;}else if(FS.isDir(node.mode)){if((flags&2097155)!==0||flags&512){return ERRNO_CODES.EISDIR;}}return FS.nodePermissions(node,FS.flagsToPermissionString(flags));},MAX_OPEN_FDS:4096,nextfd:function nextfd(fd_start,fd_end){fd_start=fd_start||0;fd_end=fd_end||FS.MAX_OPEN_FDS;for(var fd=fd_start;fd<=fd_end;fd++){if(!FS.streams[fd]){return fd;}}throw new FS.ErrnoError(ERRNO_CODES.EMFILE);},getStream:function getStream(fd){return FS.streams[fd];},createStream:function createStream(stream,fd_start,fd_end){if(!FS.FSStream){FS.FSStream=function(){};FS.FSStream.prototype={};Object.defineProperties(FS.FSStream.prototype,{object:{get:function get(){return this.node;},set:function set(val){this.node=val;}},isRead:{get:function get(){return(this.flags&2097155)!==1;}},isWrite:{get:function get(){return(this.flags&2097155)!==0;}},isAppend:{get:function get(){return this.flags&1024;}}});}var newStream=new FS.FSStream();for(var p in stream){newStream[p]=stream[p];}stream=newStream;var fd=FS.nextfd(fd_start,fd_end);stream.fd=fd;FS.streams[fd]=stream;return stream;},closeStream:function closeStream(fd){FS.streams[fd]=null;},chrdev_stream_ops:{open:function open(stream){var device=FS.getDevice(stream.node.rdev);stream.stream_ops=device.stream_ops;if(stream.stream_ops.open){stream.stream_ops.open(stream);}},llseek:function llseek(){throw new FS.ErrnoError(ERRNO_CODES.ESPIPE);}},major:function major(dev){return dev>>8;},minor:function minor(dev){return dev&255;},makedev:function makedev(ma,mi){return ma<<8|mi;},registerDevice:function registerDevice(dev,ops){FS.devices[dev]={stream_ops:ops};},getDevice:function getDevice(dev){return FS.devices[dev];},getMounts:function getMounts(mount){var mounts=[];var check=[mount];while(check.length){var m=check.pop();mounts.push(m);check.push.apply(check,m.mounts);}return mounts;},syncfs:function syncfs(populate,callback){if(typeof populate==="function"){callback=populate;populate=false;}var mounts=FS.getMounts(FS.root.mount);var completed=0;function done(err){if(err){if(!done.errored){done.errored=true;return callback(err);}return;}if(++completed>=mounts.length){callback(null);}}mounts.forEach(function(mount){if(!mount.type.syncfs){return done(null);}mount.type.syncfs(mount,populate,done);});},mount:function mount(type,opts,mountpoint){var root=mountpoint==="/";var pseudo=!mountpoint;var node;if(root&&FS.root){throw new FS.ErrnoError(ERRNO_CODES.EBUSY);}else if(!root&&!pseudo){var lookup=FS.lookupPath(mountpoint,{follow_mount:false});mountpoint=lookup.path;node=lookup.node;if(FS.isMountpoint(node)){throw new FS.ErrnoError(ERRNO_CODES.EBUSY);}if(!FS.isDir(node.mode)){throw new FS.ErrnoError(ERRNO_CODES.ENOTDIR);}}var mount={type:type,opts:opts,mountpoint:mountpoint,mounts:[]};var mountRoot=type.mount(mount);mountRoot.mount=mount;mount.root=mountRoot;if(root){FS.root=mountRoot;}else if(node){node.mounted=mount;if(node.mount){node.mount.mounts.push(mount);}}return mountRoot;},unmount:function unmount(mountpoint){var lookup=FS.lookupPath(mountpoint,{follow_mount:false});if(!FS.isMountpoint(lookup.node)){throw new FS.ErrnoError(ERRNO_CODES.EINVAL);}var node=lookup.node;var mount=node.mounted;var mounts=FS.getMounts(mount);Object.keys(FS.nameTable).forEach(function(hash){var current=FS.nameTable[hash];while(current){var next=current.name_next;if(mounts.indexOf(current.mount)!==-1){FS.destroyNode(current);}current=next;}});node.mounted=null;var idx=node.mount.mounts.indexOf(mount);assert(idx!==-1);node.mount.mounts.splice(idx,1);},lookup:function lookup(parent,name){return parent.node_ops.lookup(parent,name);},mknod:function mknod(path,mode,dev){var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);if(!name||name==="."||name===".."){throw new FS.ErrnoError(ERRNO_CODES.EINVAL);}var err=FS.mayCreate(parent,name);if(err){throw new FS.ErrnoError(err);}if(!parent.node_ops.mknod){throw new FS.ErrnoError(ERRNO_CODES.EPERM);}return parent.node_ops.mknod(parent,name,mode,dev);},create:function create(path,mode){mode=mode!==undefined?mode:438;mode&=4095;mode|=32768;return FS.mknod(path,mode,0);},mkdir:function mkdir(path,mode){mode=mode!==undefined?mode:511;mode&=511|512;mode|=16384;return FS.mknod(path,mode,0);},mkdev:function mkdev(path,mode,dev){if(typeof dev==="undefined"){dev=mode;mode=438;}mode|=8192;return FS.mknod(path,mode,dev);},symlink:function symlink(oldpath,newpath){if(!PATH.resolve(oldpath)){throw new FS.ErrnoError(ERRNO_CODES.ENOENT);}var lookup=FS.lookupPath(newpath,{parent:true});var parent=lookup.node;if(!parent){throw new FS.ErrnoError(ERRNO_CODES.ENOENT);}var newname=PATH.basename(newpath);var err=FS.mayCreate(parent,newname);if(err){throw new FS.ErrnoError(err);}if(!parent.node_ops.symlink){throw new FS.ErrnoError(ERRNO_CODES.EPERM);}return parent.node_ops.symlink(parent,newname,oldpath);},rename:function rename(old_path,new_path){var old_dirname=PATH.dirname(old_path);var new_dirname=PATH.dirname(new_path);var old_name=PATH.basename(old_path);var new_name=PATH.basename(new_path);var lookup,old_dir,new_dir;try{lookup=FS.lookupPath(old_path,{parent:true});old_dir=lookup.node;lookup=FS.lookupPath(new_path,{parent:true});new_dir=lookup.node;}catch(e){throw new FS.ErrnoError(ERRNO_CODES.EBUSY);}if(!old_dir||!new_dir)throw new FS.ErrnoError(ERRNO_CODES.ENOENT);if(old_dir.mount!==new_dir.mount){throw new FS.ErrnoError(ERRNO_CODES.EXDEV);}var old_node=FS.lookupNode(old_dir,old_name);var relative=PATH.relative(old_path,new_dirname);if(relative.charAt(0)!=="."){throw new FS.ErrnoError(ERRNO_CODES.EINVAL);}relative=PATH.relative(new_path,old_dirname);if(relative.charAt(0)!=="."){throw new FS.ErrnoError(ERRNO_CODES.ENOTEMPTY);}var new_node;try{new_node=FS.lookupNode(new_dir,new_name);}catch(e){}if(old_node===new_node){return;}var isdir=FS.isDir(old_node.mode);var err=FS.mayDelete(old_dir,old_name,isdir);if(err){throw new FS.ErrnoError(err);}err=new_node?FS.mayDelete(new_dir,new_name,isdir):FS.mayCreate(new_dir,new_name);if(err){throw new FS.ErrnoError(err);}if(!old_dir.node_ops.rename){throw new FS.ErrnoError(ERRNO_CODES.EPERM);}if(FS.isMountpoint(old_node)||new_node&&FS.isMountpoint(new_node)){throw new FS.ErrnoError(ERRNO_CODES.EBUSY);}if(new_dir!==old_dir){err=FS.nodePermissions(old_dir,"w");if(err){throw new FS.ErrnoError(err);}}try{}catch(e){console.log("FS.trackingDelegate['willMovePath']('"+old_path+"', '"+new_path+"') threw an exception: "+e.message);}FS.hashRemoveNode(old_node);try{old_dir.node_ops.rename(old_node,new_dir,new_name);}catch(e){throw e;}finally{FS.hashAddNode(old_node);}try{}catch(e){console.log("FS.trackingDelegate['onMovePath']('"+old_path+"', '"+new_path+"') threw an exception: "+e.message);}},rmdir:function rmdir(path){var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);var node=FS.lookupNode(parent,name);var err=FS.mayDelete(parent,name,true);if(err){throw new FS.ErrnoError(err);}if(!parent.node_ops.rmdir){throw new FS.ErrnoError(ERRNO_CODES.EPERM);}if(FS.isMountpoint(node)){throw new FS.ErrnoError(ERRNO_CODES.EBUSY);}try{}catch(e){console.log("FS.trackingDelegate['willDeletePath']('"+path+"') threw an exception: "+e.message);}parent.node_ops.rmdir(parent,name);FS.destroyNode(node);try{}catch(e){console.log("FS.trackingDelegate['onDeletePath']('"+path+"') threw an exception: "+e.message);}},readdir:function readdir(path){var lookup=FS.lookupPath(path,{follow:true});var node=lookup.node;if(!node.node_ops.readdir){throw new FS.ErrnoError(ERRNO_CODES.ENOTDIR);}return node.node_ops.readdir(node);},unlink:function unlink(path){var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);var node=FS.lookupNode(parent,name);var err=FS.mayDelete(parent,name,false);if(err){if(err===ERRNO_CODES.EISDIR)err=ERRNO_CODES.EPERM;throw new FS.ErrnoError(err);}if(!parent.node_ops.unlink){throw new FS.ErrnoError(ERRNO_CODES.EPERM);}if(FS.isMountpoint(node)){throw new FS.ErrnoError(ERRNO_CODES.EBUSY);}try{}catch(e){console.log("FS.trackingDelegate['willDeletePath']('"+path+"') threw an exception: "+e.message);}parent.node_ops.unlink(parent,name);FS.destroyNode(node);try{}catch(e){console.log("FS.trackingDelegate['onDeletePath']('"+path+"') threw an exception: "+e.message);}},readlink:function readlink(path){var lookup=FS.lookupPath(path);var link=lookup.node;if(!link){throw new FS.ErrnoError(ERRNO_CODES.ENOENT);}if(!link.node_ops.readlink){throw new FS.ErrnoError(ERRNO_CODES.EINVAL);}return PATH.resolve(FS.getPath(link.parent),link.node_ops.readlink(link));},stat:function stat(path,dontFollow){var lookup=FS.lookupPath(path,{follow:!dontFollow});var node=lookup.node;if(!node){throw new FS.ErrnoError(ERRNO_CODES.ENOENT);}if(!node.node_ops.getattr){throw new FS.ErrnoError(ERRNO_CODES.EPERM);}return node.node_ops.getattr(node);},lstat:function lstat(path){return FS.stat(path,true);},chmod:function chmod(path,mode,dontFollow){var node;if(typeof path==="string"){var lookup=FS.lookupPath(path,{follow:!dontFollow});node=lookup.node;}else{node=path;}if(!node.node_ops.setattr){throw new FS.ErrnoError(ERRNO_CODES.EPERM);}node.node_ops.setattr(node,{mode:mode&4095|node.mode&~4095,timestamp:Date.now()});},lchmod:function lchmod(path,mode){FS.chmod(path,mode,true);},fchmod:function fchmod(fd,mode){var stream=FS.getStream(fd);if(!stream){throw new FS.ErrnoError(ERRNO_CODES.EBADF);}FS.chmod(stream.node,mode);},chown:function chown(path,uid,gid,dontFollow){var node;if(typeof path==="string"){var lookup=FS.lookupPath(path,{follow:!dontFollow});node=lookup.node;}else{node=path;}if(!node.node_ops.setattr){throw new FS.ErrnoError(ERRNO_CODES.EPERM);}node.node_ops.setattr(node,{timestamp:Date.now()});},lchown:function lchown(path,uid,gid){FS.chown(path,uid,gid,true);},fchown:function fchown(fd,uid,gid){var stream=FS.getStream(fd);if(!stream){throw new FS.ErrnoError(ERRNO_CODES.EBADF);}FS.chown(stream.node,uid,gid);},truncate:function truncate(path,len){if(len<0){throw new FS.ErrnoError(ERRNO_CODES.EINVAL);}var node;if(typeof path==="string"){var lookup=FS.lookupPath(path,{follow:true});node=lookup.node;}else{node=path;}if(!node.node_ops.setattr){throw new FS.ErrnoError(ERRNO_CODES.EPERM);}if(FS.isDir(node.mode)){throw new FS.ErrnoError(ERRNO_CODES.EISDIR);}if(!FS.isFile(node.mode)){throw new FS.ErrnoError(ERRNO_CODES.EINVAL);}var err=FS.nodePermissions(node,"w");if(err){throw new FS.ErrnoError(err);}node.node_ops.setattr(node,{size:len,timestamp:Date.now()});},ftruncate:function ftruncate(fd,len){var stream=FS.getStream(fd);if(!stream){throw new FS.ErrnoError(ERRNO_CODES.EBADF);}if((stream.flags&2097155)===0){throw new FS.ErrnoError(ERRNO_CODES.EINVAL);}FS.truncate(stream.node,len);},utime:function utime(path,atime,mtime){var lookup=FS.lookupPath(path,{follow:true});var node=lookup.node;node.node_ops.setattr(node,{timestamp:Math.max(atime,mtime)});},open:function open(path,flags,mode,fd_start,fd_end){if(path===""){throw new FS.ErrnoError(ERRNO_CODES.ENOENT);}flags=typeof flags==="string"?FS.modeStringToFlags(flags):flags;mode=typeof mode==="undefined"?438:mode;if(flags&64){mode=mode&4095|32768;}else{mode=0;}var node;if(typeof path==="object"){node=path;}else{path=PATH.normalize(path);try{var lookup=FS.lookupPath(path,{follow:!(flags&131072)});node=lookup.node;}catch(e){}}var created=false;if(flags&64){if(node){if(flags&128){throw new FS.ErrnoError(ERRNO_CODES.EEXIST);}}else{node=FS.mknod(path,mode,0);created=true;}}if(!node){throw new FS.ErrnoError(ERRNO_CODES.ENOENT);}if(FS.isChrdev(node.mode)){flags&=~512;}if(flags&65536&&!FS.isDir(node.mode)){throw new FS.ErrnoError(ERRNO_CODES.ENOTDIR);}if(!created){var err=FS.mayOpen(node,flags);if(err){throw new FS.ErrnoError(err);}}if(flags&512){FS.truncate(node,0);}flags&=~(128|512);var stream=FS.createStream({node:node,path:FS.getPath(node),flags:flags,seekable:true,position:0,stream_ops:node.stream_ops,ungotten:[],error:false},fd_start,fd_end);if(stream.stream_ops.open){stream.stream_ops.open(stream);}if(Module["logReadFiles"]&&!(flags&1)){if(!FS.readFiles)FS.readFiles={};if(!(path in FS.readFiles)){FS.readFiles[path]=1;Module["printErr"]("read file: "+path);}}try{}catch(e){console.log("FS.trackingDelegate['onOpenFile']('"+path+"', flags) threw an exception: "+e.message);}return stream;},close:function close(stream){if(stream.getdents)stream.getdents=null;try{if(stream.stream_ops.close){stream.stream_ops.close(stream);}}catch(e){throw e;}finally{FS.closeStream(stream.fd);}},llseek:function llseek(stream,offset,whence){if(!stream.seekable||!stream.stream_ops.llseek){throw new FS.ErrnoError(ERRNO_CODES.ESPIPE);}stream.position=stream.stream_ops.llseek(stream,offset,whence);stream.ungotten=[];return stream.position;},read:function read(stream,buffer,offset,length,position){if(length<0||position<0){throw new FS.ErrnoError(ERRNO_CODES.EINVAL);}if((stream.flags&2097155)===1){throw new FS.ErrnoError(ERRNO_CODES.EBADF);}if(FS.isDir(stream.node.mode)){throw new FS.ErrnoError(ERRNO_CODES.EISDIR);}if(!stream.stream_ops.read){throw new FS.ErrnoError(ERRNO_CODES.EINVAL);}var seeking=true;if(typeof position==="undefined"){position=stream.position;seeking=false;}else if(!stream.seekable){throw new FS.ErrnoError(ERRNO_CODES.ESPIPE);}var bytesRead=stream.stream_ops.read(stream,buffer,offset,length,position);if(!seeking)stream.position+=bytesRead;return bytesRead;},write:function write(stream,buffer,offset,length,position,canOwn){if(length<0||position<0){throw new FS.ErrnoError(ERRNO_CODES.EINVAL);}if((stream.flags&2097155)===0){throw new FS.ErrnoError(ERRNO_CODES.EBADF);}if(FS.isDir(stream.node.mode)){throw new FS.ErrnoError(ERRNO_CODES.EISDIR);}if(!stream.stream_ops.write){throw new FS.ErrnoError(ERRNO_CODES.EINVAL);}if(stream.flags&1024){FS.llseek(stream,0,2);}var seeking=true;if(typeof position==="undefined"){position=stream.position;seeking=false;}else if(!stream.seekable){throw new FS.ErrnoError(ERRNO_CODES.ESPIPE);}var bytesWritten=stream.stream_ops.write(stream,buffer,offset,length,position,canOwn);if(!seeking)stream.position+=bytesWritten;try{if(stream.path&&FS.trackingDelegate["onWriteToFile"])FS.trackingDelegate["onWriteToFile"](stream.path);}catch(e){console.log("FS.trackingDelegate['onWriteToFile']('"+path+"') threw an exception: "+e.message);}return bytesWritten;},allocate:function allocate(stream,offset,length){if(offset<0||length<=0){throw new FS.ErrnoError(ERRNO_CODES.EINVAL);}if((stream.flags&2097155)===0){throw new FS.ErrnoError(ERRNO_CODES.EBADF);}if(!FS.isFile(stream.node.mode)&&!FS.isDir(node.mode)){throw new FS.ErrnoError(ERRNO_CODES.ENODEV);}if(!stream.stream_ops.allocate){throw new FS.ErrnoError(ERRNO_CODES.EOPNOTSUPP);}stream.stream_ops.allocate(stream,offset,length);},mmap:function mmap(stream,buffer,offset,length,position,prot,flags){if((stream.flags&2097155)===1){throw new FS.ErrnoError(ERRNO_CODES.EACCES);}if(!stream.stream_ops.mmap){throw new FS.ErrnoError(ERRNO_CODES.ENODEV);}return stream.stream_ops.mmap(stream,buffer,offset,length,position,prot,flags);},msync:function msync(stream,buffer,offset,length,mmapFlags){if(!stream||!stream.stream_ops.msync){return 0;}return stream.stream_ops.msync(stream,buffer,offset,length,mmapFlags);},munmap:function munmap(stream){return 0;},ioctl:function ioctl(stream,cmd,arg){if(!stream.stream_ops.ioctl){throw new FS.ErrnoError(ERRNO_CODES.ENOTTY);}return stream.stream_ops.ioctl(stream,cmd,arg);},readFile:function readFile(path,opts){opts=opts||{};opts.flags=opts.flags||"r";opts.encoding=opts.encoding||"binary";if(opts.encoding!=="utf8"&&opts.encoding!=="binary"){throw new Error('Invalid encoding type "'+opts.encoding+'"');}var ret;var stream=FS.open(path,opts.flags);var stat=FS.stat(path);var length=stat.size;var buf=new Uint8Array(length);FS.read(stream,buf,0,length,0);if(opts.encoding==="utf8"){ret=UTF8ArrayToString(buf,0);}else if(opts.encoding==="binary"){ret=buf;}FS.close(stream);return ret;},writeFile:function writeFile(path,data,opts){opts=opts||{};opts.flags=opts.flags||"w";opts.encoding=opts.encoding||"utf8";if(opts.encoding!=="utf8"&&opts.encoding!=="binary"){throw new Error('Invalid encoding type "'+opts.encoding+'"');}var stream=FS.open(path,opts.flags,opts.mode);if(opts.encoding==="utf8"){var buf=new Uint8Array(lengthBytesUTF8(data)+1);var actualNumBytes=stringToUTF8Array(data,buf,0,buf.length);FS.write(stream,buf,0,actualNumBytes,0,opts.canOwn);}else if(opts.encoding==="binary"){FS.write(stream,data,0,data.length,0,opts.canOwn);}FS.close(stream);},cwd:function cwd(){return FS.currentPath;},chdir:function chdir(path){var lookup=FS.lookupPath(path,{follow:true});if(!FS.isDir(lookup.node.mode)){throw new FS.ErrnoError(ERRNO_CODES.ENOTDIR);}var err=FS.nodePermissions(lookup.node,"x");if(err){throw new FS.ErrnoError(err);}FS.currentPath=lookup.path;},createDefaultDirectories:function createDefaultDirectories(){FS.mkdir("/tmp");FS.mkdir("/home");FS.mkdir("/home/web_user");},createDefaultDevices:function createDefaultDevices(){FS.mkdir("/dev");FS.registerDevice(FS.makedev(1,3),{read:function read(){return 0;},write:function write(stream,buffer,offset,length,pos){return length;}});FS.mkdev("/dev/null",FS.makedev(1,3));TTY.register(FS.makedev(5,0),TTY.default_tty_ops);TTY.register(FS.makedev(6,0),TTY.default_tty1_ops);FS.mkdev("/dev/tty",FS.makedev(5,0));FS.mkdev("/dev/tty1",FS.makedev(6,0));var random_device;if(typeof crypto!=="undefined"){var randomBuffer=new Uint8Array(1);random_device=function random_device(){crypto.getRandomValues(randomBuffer);return randomBuffer[0];};}else{random_device=function random_device(){return Math.random()*256|0;};}FS.createDevice("/dev","random",random_device);FS.createDevice("/dev","urandom",random_device);FS.mkdir("/dev/shm");FS.mkdir("/dev/shm/tmp");},createSpecialDirectories:function createSpecialDirectories(){FS.mkdir("/proc");FS.mkdir("/proc/self");FS.mkdir("/proc/self/fd");FS.mount({mount:function mount(){var node=FS.createNode("/proc/self","fd",16384|511,73);node.node_ops={lookup:function lookup(parent,name){var fd=+name;var stream=FS.getStream(fd);if(!stream)throw new FS.ErrnoError(ERRNO_CODES.EBADF);var ret={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:function readlink(){return stream.path;}}};ret.parent=ret;return ret;}};return node;}},{},"/proc/self/fd");},createStandardStreams:function createStandardStreams(){if(Module["stdin"]){FS.createDevice("/dev","stdin",Module["stdin"]);}else{FS.symlink("/dev/tty","/dev/stdin");}if(Module["stdout"]){FS.createDevice("/dev","stdout",null,Module["stdout"]);}else{FS.symlink("/dev/tty","/dev/stdout");}if(Module["stderr"]){FS.createDevice("/dev","stderr",null,Module["stderr"]);}else{FS.symlink("/dev/tty1","/dev/stderr");}var stdin=FS.open("/dev/stdin","r");assert(stdin.fd===0,"invalid handle for stdin ("+stdin.fd+")");var stdout=FS.open("/dev/stdout","w");assert(stdout.fd===1,"invalid handle for stdout ("+stdout.fd+")");var stderr=FS.open("/dev/stderr","w");assert(stderr.fd===2,"invalid handle for stderr ("+stderr.fd+")");},ensureErrnoError:function ensureErrnoError(){if(FS.ErrnoError)return;FS.ErrnoError=function ErrnoError(errno,node){this.node=node;this.setErrno=function(errno){this.errno=errno;for(var key in ERRNO_CODES){if(ERRNO_CODES[key]===errno){this.code=key;break;}}};this.setErrno(errno);this.message=ERRNO_MESSAGES[errno];};FS.ErrnoError.prototype=new Error();FS.ErrnoError.prototype.constructor=FS.ErrnoError;[ERRNO_CODES.ENOENT].forEach(function(code){FS.genericErrors[code]=new FS.ErrnoError(code);FS.genericErrors[code].stack="";});},staticInit:function staticInit(){FS.ensureErrnoError();FS.nameTable=new Array(4096);FS.mount(MEMFS,{},"/");FS.createDefaultDirectories();FS.createDefaultDevices();FS.createSpecialDirectories();FS.filesystems={"MEMFS":MEMFS,"IDBFS":IDBFS,"NODEFS":{},"WORKERFS":WORKERFS};},init:function init(input,output,error){assert(!FS.init.initialized,"FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)");FS.init.initialized=true;FS.ensureErrnoError();Module["stdin"]=input||Module["stdin"];Module["stdout"]=output||Module["stdout"];Module["stderr"]=error||Module["stderr"];FS.createStandardStreams();},quit:function quit(){FS.init.initialized=false;var fflush=Module["_fflush"];if(fflush)fflush(0);for(var i=0;ithis.length-1||idx<0){return undefined;}var chunkOffset=idx%this.chunkSize;var chunkNum=idx/this.chunkSize|0;return this.getter(chunkNum)[chunkOffset];};LazyUint8Array.prototype.setDataGetter=function LazyUint8Array_setDataGetter(getter){this.getter=getter;};LazyUint8Array.prototype.cacheLength=function LazyUint8Array_cacheLength(){var xhr=new XMLHttpRequest();xhr.open("HEAD",url,false);xhr.send(null);if(!(xhr.status>=200&&xhr.status<300||xhr.status===304))throw new Error("Couldn't load "+url+". Status: "+xhr.status);var datalength=Number(xhr.getResponseHeader("Content-length"));var header;var hasByteServing=(header=xhr.getResponseHeader("Accept-Ranges"))&&header==="bytes";var chunkSize=1024*1024;if(!hasByteServing)chunkSize=datalength;var doXHR=function doXHR(from,to){if(from>to)throw new Error("invalid range ("+from+", "+to+") or no bytes requested!");if(to>datalength-1)throw new Error("only "+datalength+" bytes available! programmer error!");var xhr=new XMLHttpRequest();xhr.open("GET",url,false);if(datalength!==chunkSize)xhr.setRequestHeader("Range","bytes="+from+"-"+to);if(typeof Uint8Array!="undefined")xhr.responseType="arraybuffer";if(xhr.overrideMimeType){xhr.overrideMimeType("text/plain; charset=x-user-defined");}xhr.send(null);if(!(xhr.status>=200&&xhr.status<300||xhr.status===304))throw new Error("Couldn't load "+url+". Status: "+xhr.status);if(xhr.response!==undefined){return new Uint8Array(xhr.response||[]);}else{return intArrayFromString(xhr.responseText||"",true);}};var lazyArray=this;lazyArray.setDataGetter(function(chunkNum){var start=chunkNum*chunkSize;var end=(chunkNum+1)*chunkSize-1;end=Math.min(end,datalength-1);if(typeof lazyArray.chunks[chunkNum]==="undefined"){lazyArray.chunks[chunkNum]=doXHR(start,end);}if(typeof lazyArray.chunks[chunkNum]==="undefined")throw new Error("doXHR failed!");return lazyArray.chunks[chunkNum];});this._length=datalength;this._chunkSize=chunkSize;this.lengthKnown=true;};if(typeof XMLHttpRequest!=="undefined"){if(!ENVIRONMENT_IS_WORKER)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var lazyArray=new LazyUint8Array();Object.defineProperty(lazyArray,"length",{get:function get(){if(!this.lengthKnown){this.cacheLength();}return this._length;}});Object.defineProperty(lazyArray,"chunkSize",{get:function get(){if(!this.lengthKnown){this.cacheLength();}return this._chunkSize;}});var properties={isDevice:false,contents:lazyArray};}else{var properties={isDevice:false,url:url};}var node=FS.createFile(parent,name,properties,canRead,canWrite);if(properties.contents){node.contents=properties.contents;}else if(properties.url){node.contents=null;node.url=properties.url;}Object.defineProperty(node,"usedBytes",{get:function get(){return this.contents.length;}});var stream_ops={};var keys=Object.keys(node.stream_ops);keys.forEach(function(key){var fn=node.stream_ops[key];stream_ops[key]=function forceLoadLazyFile(){if(!FS.forceLoadFile(node)){throw new FS.ErrnoError(ERRNO_CODES.EIO);}return fn.apply(null,arguments);};});stream_ops.read=function stream_ops_read(stream,buffer,offset,length,position){if(!FS.forceLoadFile(node)){throw new FS.ErrnoError(ERRNO_CODES.EIO);}var contents=stream.node.contents;if(position>=contents.length)return 0;var size=Math.min(contents.length-position,length);assert(size>=0);if(contents.slice){for(var i=0;i=0;i--){var last=parts[i];if(last==="."){parts.splice(i,1);}else if(last===".."){parts.splice(i,1);up++;}else if(up){parts.splice(i,1);up--;}}if(allowAboveRoot){for(;up--;up){parts.unshift("..");}}return parts;},normalize:function normalize(path){var isAbsolute=path.charAt(0)==="/",trailingSlash=path.substr(-1)==="/";path=PATH.normalizeArray(path.split("/").filter(function(p){return!!p;}),!isAbsolute).join("/");if(!path&&!isAbsolute){path=".";}if(path&&trailingSlash){path+="/";}return(isAbsolute?"/":"")+path;},dirname:function dirname(path){var result=PATH.splitPath(path),root=result[0],dir=result[1];if(!root&&!dir){return".";}if(dir){dir=dir.substr(0,dir.length-1);}return root+dir;},basename:function basename(path){if(path==="/")return"/";var lastSlash=path.lastIndexOf("/");if(lastSlash===-1)return path;return path.substr(lastSlash+1);},extname:function extname(path){return PATH.splitPath(path)[3];},join:function join(){var paths=Array.prototype.slice.call(arguments,0);return PATH.normalize(paths.join("/"));},join2:function join2(l,r){return PATH.normalize(l+"/"+r);},resolve:function resolve(){var resolvedPath="",resolvedAbsolute=false;for(var i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[i]:FS.cwd();if(typeof path!=="string"){throw new TypeError("Arguments to path.resolve must be strings");}else if(!path){return"";}resolvedPath=path+"/"+resolvedPath;resolvedAbsolute=path.charAt(0)==="/";}resolvedPath=PATH.normalizeArray(resolvedPath.split("/").filter(function(p){return!!p;}),!resolvedAbsolute).join("/");return(resolvedAbsolute?"/":"")+resolvedPath||".";},relative:function relative(from,to){from=PATH.resolve(from).substr(1);to=PATH.resolve(to).substr(1);function trim(arr){var start=0;for(;start=0;end--){if(arr[end]!=="")break;}if(start>end)return[];return arr.slice(start,end-start+1);}var fromParts=trim(from.split("/"));var toParts=trim(to.split("/"));var length=Math.min(fromParts.length,toParts.length);var samePartsLength=length;for(var i=0;i0){var start=Date.now();var blocker=Browser.mainLoop.queue.shift();blocker.func(blocker.arg);if(Browser.mainLoop.remainingBlockers){var remaining=Browser.mainLoop.remainingBlockers;var next=remaining%1==0?remaining-1:Math.floor(remaining);if(blocker.counted){Browser.mainLoop.remainingBlockers=next;}else{next=next+.5;Browser.mainLoop.remainingBlockers=(8*remaining+next)/9;}}console.log('main loop blocker "'+blocker.name+'" took '+(Date.now()-start)+" ms");Browser.mainLoop.updateStatus();setTimeout(Browser.mainLoop.runner,0);return;}if(thisMainLoopId1&&Browser.mainLoop.currentFrameNumber%Browser.mainLoop.timingValue!=0){Browser.mainLoop.scheduler();return;}if(Browser.mainLoop.method==="timeout"&&Module.ctx){Module.printErr("Looks like you are rendering without using requestAnimationFrame for the main loop. You should use 0 for the frame rate in emscripten_set_main_loop in order to use requestAnimationFrame, as that can greatly improve your frame rates!");Browser.mainLoop.method="";}Browser.mainLoop.runIter(function(){if(typeof arg!=="undefined"){Runtime.dynCall("vi",func,[arg]);}else{Runtime.dynCall("v",func);}});if(thisMainLoopId0)_emscripten_set_main_loop_timing(0,1e3/fps);else _emscripten_set_main_loop_timing(1,1);Browser.mainLoop.scheduler();}if(simulateInfiniteLoop){throw"SimulateInfiniteLoop";}}var Browser={mainLoop:{scheduler:null,method:"",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],pause:function pause(){Browser.mainLoop.scheduler=null;Browser.mainLoop.currentlyRunningMainloop++;},resume:function resume(){Browser.mainLoop.currentlyRunningMainloop++;var timingMode=Browser.mainLoop.timingMode;var timingValue=Browser.mainLoop.timingValue;var func=Browser.mainLoop.func;Browser.mainLoop.func=null;_emscripten_set_main_loop(func,0,false,Browser.mainLoop.arg,true);_emscripten_set_main_loop_timing(timingMode,timingValue);Browser.mainLoop.scheduler();},updateStatus:function updateStatus(){if(Module["setStatus"]){var message=Module["statusMessage"]||"Please wait...";var remaining=Browser.mainLoop.remainingBlockers;var expected=Browser.mainLoop.expectedBlockers;if(remaining){if(remaining=6){var curr=leftchar>>leftbits-6&63;leftbits-=6;ret+=BASE[curr];}}if(leftbits==2){ret+=BASE[(leftchar&3)<<4];ret+=PAD+PAD;}else if(leftbits==4){ret+=BASE[(leftchar&15)<<2];ret+=PAD;}return ret;}audio.src="data:audio/x-"+name.substr(-3)+";base64,"+encode64(byteArray);finish(audio);};audio.src=url;Browser.safeSetTimeout(function(){finish(audio);},1e4);}else{return fail();}};Module["preloadPlugins"].push(audioPlugin);var canvas=Module["canvas"];function pointerLockChange(){Browser.pointerLock=document["pointerLockElement"]===canvas||document["mozPointerLockElement"]===canvas||document["webkitPointerLockElement"]===canvas||document["msPointerLockElement"]===canvas;}if(canvas){canvas.requestPointerLock=canvas["requestPointerLock"]||canvas["mozRequestPointerLock"]||canvas["webkitRequestPointerLock"]||canvas["msRequestPointerLock"]||function(){};canvas.exitPointerLock=document["exitPointerLock"]||document["mozExitPointerLock"]||document["webkitExitPointerLock"]||document["msExitPointerLock"]||function(){};canvas.exitPointerLock=canvas.exitPointerLock.bind(document);document.addEventListener("pointerlockchange",pointerLockChange,false);document.addEventListener("mozpointerlockchange",pointerLockChange,false);document.addEventListener("webkitpointerlockchange",pointerLockChange,false);document.addEventListener("mspointerlockchange",pointerLockChange,false);if(Module["elementPointerLock"]){canvas.addEventListener("click",function(ev){if(!Browser.pointerLock&&canvas.requestPointerLock){canvas.requestPointerLock();ev.preventDefault();}},false);}}},createContext:function createContext(canvas,useWebGL,setInModule,webGLContextAttributes){if(useWebGL&&Module.ctx&&canvas==Module.canvas)return Module.ctx;var ctx;var contextHandle;if(useWebGL){var contextAttributes={antialias:false,alpha:false};if(webGLContextAttributes){for(var attribute in webGLContextAttributes){contextAttributes[attribute]=webGLContextAttributes[attribute];}}contextHandle=GL.createContext(canvas,contextAttributes);if(contextHandle){ctx=GL.getContext(contextHandle).GLctx;}canvas.style.backgroundColor="black";}else{ctx=canvas.getContext("2d");}if(!ctx)return null;if(setInModule){if(!useWebGL)assert(typeof GLctx==="undefined","cannot set in module if GLctx is used, but we are a non-GL context that would replace it");Module.ctx=ctx;if(useWebGL)GL.makeContextCurrent(contextHandle);Module.useWebGL=useWebGL;Browser.moduleContextCreatedCallbacks.forEach(function(callback){callback();});Browser.init();}return ctx;},destroyContext:function destroyContext(canvas,useWebGL,setInModule){},fullScreenHandlersInstalled:false,lockPointer:undefined,resizeCanvas:undefined,requestFullScreen:function requestFullScreen(lockPointer,resizeCanvas,vrDevice){Browser.lockPointer=lockPointer;Browser.resizeCanvas=resizeCanvas;Browser.vrDevice=vrDevice;if(typeof Browser.lockPointer==="undefined")Browser.lockPointer=true;if(typeof Browser.resizeCanvas==="undefined")Browser.resizeCanvas=false;if(typeof Browser.vrDevice==="undefined")Browser.vrDevice=null;var canvas=Module["canvas"];function fullScreenChange(){Browser.isFullScreen=false;var canvasContainer=canvas.parentNode;if((document["webkitFullScreenElement"]||document["webkitFullscreenElement"]||document["mozFullScreenElement"]||document["mozFullscreenElement"]||document["fullScreenElement"]||document["fullscreenElement"]||document["msFullScreenElement"]||document["msFullscreenElement"]||document["webkitCurrentFullScreenElement"])===canvasContainer){canvas.cancelFullScreen=document["cancelFullScreen"]||document["mozCancelFullScreen"]||document["webkitCancelFullScreen"]||document["msExitFullscreen"]||document["exitFullscreen"]||function(){};canvas.cancelFullScreen=canvas.cancelFullScreen.bind(document);if(Browser.lockPointer)canvas.requestPointerLock();Browser.isFullScreen=true;if(Browser.resizeCanvas)Browser.setFullScreenCanvasSize();}else{canvasContainer.parentNode.insertBefore(canvas,canvasContainer);canvasContainer.parentNode.removeChild(canvasContainer);if(Browser.resizeCanvas)Browser.setWindowedCanvasSize();}if(Module["onFullScreen"])Module["onFullScreen"](Browser.isFullScreen);Browser.updateCanvasDimensions(canvas);}if(!Browser.fullScreenHandlersInstalled){Browser.fullScreenHandlersInstalled=true;document.addEventListener("fullscreenchange",fullScreenChange,false);document.addEventListener("mozfullscreenchange",fullScreenChange,false);document.addEventListener("webkitfullscreenchange",fullScreenChange,false);document.addEventListener("MSFullscreenChange",fullScreenChange,false);}var canvasContainer=document.createElement("div");canvas.parentNode.insertBefore(canvasContainer,canvas);canvasContainer.appendChild(canvas);canvasContainer.requestFullScreen=canvasContainer["requestFullScreen"]||canvasContainer["mozRequestFullScreen"]||canvasContainer["msRequestFullscreen"]||(canvasContainer["webkitRequestFullScreen"]?function(){canvasContainer["webkitRequestFullScreen"](Element["ALLOW_KEYBOARD_INPUT"]);}:null);if(vrDevice){canvasContainer.requestFullScreen({vrDisplay:vrDevice});}else{canvasContainer.requestFullScreen();}},nextRAF:0,fakeRequestAnimationFrame:function fakeRequestAnimationFrame(func){var now=Date.now();if(Browser.nextRAF===0){Browser.nextRAF=now+1e3/60;}else{while(now+2>=Browser.nextRAF){Browser.nextRAF+=1e3/60;}}var delay=Math.max(Browser.nextRAF-now,0);setTimeout(func,delay);},requestAnimationFrame:function requestAnimationFrame(func){if(typeof window==="undefined"){Browser.fakeRequestAnimationFrame(func);}else{if(!window.requestAnimationFrame){window.requestAnimationFrame=window["requestAnimationFrame"]||window["mozRequestAnimationFrame"]||window["webkitRequestAnimationFrame"]||window["msRequestAnimationFrame"]||window["oRequestAnimationFrame"]||Browser.fakeRequestAnimationFrame;}window.requestAnimationFrame(func);}},safeCallback:function safeCallback(func){return function(){if(!ABORT)return func.apply(null,arguments);};},allowAsyncCallbacks:true,queuedAsyncCallbacks:[],pauseAsyncCallbacks:function pauseAsyncCallbacks(){Browser.allowAsyncCallbacks=false;},resumeAsyncCallbacks:function resumeAsyncCallbacks(){Browser.allowAsyncCallbacks=true;if(Browser.queuedAsyncCallbacks.length>0){var callbacks=Browser.queuedAsyncCallbacks;Browser.queuedAsyncCallbacks=[];callbacks.forEach(function(func){func();});}},safeRequestAnimationFrame:function safeRequestAnimationFrame(func){return Browser.requestAnimationFrame(function(){if(ABORT)return;if(Browser.allowAsyncCallbacks){func();}else{Browser.queuedAsyncCallbacks.push(func);}});},safeSetTimeout:function safeSetTimeout(func,timeout){Module["noExitRuntime"]=true;return setTimeout(function(){if(ABORT)return;if(Browser.allowAsyncCallbacks){func();}else{Browser.queuedAsyncCallbacks.push(func);}},timeout);},safeSetInterval:function safeSetInterval(func,timeout){Module["noExitRuntime"]=true;return setInterval(function(){if(ABORT)return;if(Browser.allowAsyncCallbacks){func();}},timeout);},getMimetype:function getMimetype(name){return{"jpg":"image/jpeg","jpeg":"image/jpeg","png":"image/png","bmp":"image/bmp","ogg":"audio/ogg","wav":"audio/wav","mp3":"audio/mpeg"}[name.substr(name.lastIndexOf(".")+1)];},getUserMedia:function getUserMedia(func){if(!window.getUserMedia){window.getUserMedia=navigator["getUserMedia"]||navigator["mozGetUserMedia"];}window.getUserMedia(func);},getMovementX:function getMovementX(event){return event["movementX"]||event["mozMovementX"]||event["webkitMovementX"]||0;},getMovementY:function getMovementY(event){return event["movementY"]||event["mozMovementY"]||event["webkitMovementY"]||0;},getMouseWheelDelta:function getMouseWheelDelta(event){var delta=0;switch(event.type){case"DOMMouseScroll":delta=event.detail;break;case"mousewheel":delta=event.wheelDelta;break;case"wheel":delta=event["deltaY"];break;default:throw"unrecognized mouse wheel event: "+event.type;}return delta;},mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,touches:{},lastTouches:{},calculateMouseEvent:function calculateMouseEvent(event){if(Browser.pointerLock){if(event.type!="mousemove"&&"mozMovementX"in event){Browser.mouseMovementX=Browser.mouseMovementY=0;}else{Browser.mouseMovementX=Browser.getMovementX(event);Browser.mouseMovementY=Browser.getMovementY(event);}if(typeof SDL!="undefined"){Browser.mouseX=SDL.mouseX+Browser.mouseMovementX;Browser.mouseY=SDL.mouseY+Browser.mouseMovementY;}else{Browser.mouseX+=Browser.mouseMovementX;Browser.mouseY+=Browser.mouseMovementY;}}else{var rect=Module["canvas"].getBoundingClientRect();var cw=Module["canvas"].width;var ch=Module["canvas"].height;var scrollX=typeof window.scrollX!=="undefined"?window.scrollX:window.pageXOffset;var scrollY=typeof window.scrollY!=="undefined"?window.scrollY:window.pageYOffset;if(event.type==="touchstart"||event.type==="touchend"||event.type==="touchmove"){var touch=event.touch;if(touch===undefined){return;}var adjustedX=touch.pageX-(scrollX+rect.left);var adjustedY=touch.pageY-(scrollY+rect.top);adjustedX=adjustedX*(cw/rect.width);adjustedY=adjustedY*(ch/rect.height);var coords={x:adjustedX,y:adjustedY};if(event.type==="touchstart"){Browser.lastTouches[touch.identifier]=coords;Browser.touches[touch.identifier]=coords;}else if(event.type==="touchend"||event.type==="touchmove"){var last=Browser.touches[touch.identifier];if(!last)last=coords;Browser.lastTouches[touch.identifier]=last;Browser.touches[touch.identifier]=coords;}return;}var x=event.pageX-(scrollX+rect.left);var y=event.pageY-(scrollY+rect.top);x=x*(cw/rect.width);y=y*(ch/rect.height);Browser.mouseMovementX=x-Browser.mouseX;Browser.mouseMovementY=y-Browser.mouseY;Browser.mouseX=x;Browser.mouseY=y;}},xhrLoad:function xhrLoad(url,onload,onerror){var xhr=new XMLHttpRequest();xhr.open("GET",url,true);xhr.responseType="arraybuffer";xhr.onload=function xhr_onload(){if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response);}else{onerror();}};xhr.onerror=onerror;xhr.send(null);},asyncLoad:function asyncLoad(url,onload,onerror,noRunDep){Browser.xhrLoad(url,function(arrayBuffer){assert(arrayBuffer,'Loading data file "'+url+'" failed (no arrayBuffer).');onload(new Uint8Array(arrayBuffer));if(!noRunDep)removeRunDependency("al "+url);},function(event){if(onerror){onerror();}else{throw'Loading data file "'+url+'" failed.';}});if(!noRunDep)addRunDependency("al "+url);},resizeListeners:[],updateResizeListeners:function updateResizeListeners(){var canvas=Module["canvas"];Browser.resizeListeners.forEach(function(listener){listener(canvas.width,canvas.height);});},setCanvasSize:function setCanvasSize(width,height,noUpdates){var canvas=Module["canvas"];Browser.updateCanvasDimensions(canvas,width,height);if(!noUpdates)Browser.updateResizeListeners();},windowedWidth:0,windowedHeight:0,setFullScreenCanvasSize:function setFullScreenCanvasSize(){if(typeof SDL!="undefined"){var flags=HEAPU32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2];flags=flags|8388608;HEAP32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2]=flags;}Browser.updateResizeListeners();},setWindowedCanvasSize:function setWindowedCanvasSize(){if(typeof SDL!="undefined"){var flags=HEAPU32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2];flags=flags&~8388608;HEAP32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2]=flags;}Browser.updateResizeListeners();},updateCanvasDimensions:function updateCanvasDimensions(canvas,wNative,hNative){if(wNative&&hNative){canvas.widthNative=wNative;canvas.heightNative=hNative;}else{wNative=canvas.widthNative;hNative=canvas.heightNative;}var w=wNative;var h=hNative;if(Module["forcedAspectRatio"]&&Module["forcedAspectRatio"]>0){if(w/h>2]=ret;}return ret;}function _pthread_self(){return 0;}Module["requestFullScreen"]=function Module_requestFullScreen(lockPointer,resizeCanvas,vrDevice){Browser.requestFullScreen(lockPointer,resizeCanvas,vrDevice);};Module["requestAnimationFrame"]=function Module_requestAnimationFrame(func){Browser.requestAnimationFrame(func);};Module["setCanvasSize"]=function Module_setCanvasSize(width,height,noUpdates){Browser.setCanvasSize(width,height,noUpdates);};Module["pauseMainLoop"]=function Module_pauseMainLoop(){Browser.mainLoop.pause();};Module["resumeMainLoop"]=function Module_resumeMainLoop(){Browser.mainLoop.resume();};Module["getUserMedia"]=function Module_getUserMedia(){Browser.getUserMedia();};Module["createContext"]=function Module_createContext(canvas,useWebGL,setInModule,webGLContextAttributes){return Browser.createContext(canvas,useWebGL,setInModule,webGLContextAttributes);};FS.staticInit();__ATINIT__.unshift(function(){if(!Module["noFSInit"]&&!FS.init.initialized)FS.init();});__ATMAIN__.push(function(){FS.ignorePermissions=false;});__ATEXIT__.push(function(){FS.quit();});Module["FS_createFolder"]=FS.createFolder;Module["FS_createPath"]=FS.createPath;Module["FS_createDataFile"]=FS.createDataFile;Module["FS_createPreloadedFile"]=FS.createPreloadedFile;Module["FS_createLazyFile"]=FS.createLazyFile;Module["FS_createLink"]=FS.createLink;Module["FS_createDevice"]=FS.createDevice;Module["FS_unlink"]=FS.unlink;__ATINIT__.unshift(function(){});__ATEXIT__.push(function(){});STACK_BASE=STACKTOP=Runtime.alignMemory(STATICTOP);staticSealed=true;STACK_MAX=STACK_BASE+TOTAL_STACK;DYNAMIC_BASE=DYNAMICTOP=Runtime.alignMemory(STACK_MAX);assert(DYNAMIC_BASE>2]=0;Db(a,31756)|0;i=b;return c[a>>2]|0;}function wa(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;Eb(d);i=b;return;}function xa(a,b,c,e){a=a|0;b=b|0;c=c|0;e=e|0;Ea(a,(e|0)==0?(d[b>>0]|0)>>>3&15:15,b+1|0,c,2)|0;return;}function ya(a){a=a|0;var b=0;b=Je(8)|0;Hb(b,b+4|0,a)|0;return b|0;}function za(a){a=a|0;Ib(a,a+4|0);Ke(a);return;}function Aa(b,e,f,g,h){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0;h=i;i=i+16|0;j=h;c[j>>2]=e;f=(Jb(c[b>>2]|0,c[b+4>>2]|0,e,f,g,j,3)|0)<<16>>16;a[g>>0]=d[g>>0]|0|4;i=h;return f|0;}function Ba(a){a=a|0;if(!a)a=-1;else{b[a>>1]=4096;a=0;}return a|0;}function Ca(a,d,e,f,g,h){a=a|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;m=c[h>>2]|0;q=g<<16>>16>0;if(q){i=0;j=0;do{l=b[e+(i<<1)>>1]|0;l=Z(l,l)|0;if((l|0)!=1073741824){k=(l<<1)+j|0;if((l^j|0)>0&(k^j|0)<0){c[h>>2]=1;j=(j>>>31)+2147483647|0;}else j=k;}else{c[h>>2]=1;j=2147483647;}i=i+1|0;}while((i&65535)<<16>>16!=g<<16>>16);if((j|0)==2147483647){c[h>>2]=m;l=0;k=0;do{j=b[e+(l<<1)>>1]>>2;j=Z(j,j)|0;if((j|0)!=1073741824){i=(j<<1)+k|0;if((j^k|0)>0&(i^k|0)<0){c[h>>2]=1;k=(k>>>31)+2147483647|0;}else k=i;}else{c[h>>2]=1;k=2147483647;}l=l+1|0;}while((l&65535)<<16>>16!=g<<16>>16);}else p=8;}else{j=0;p=8;}if((p|0)==8)k=j>>4;if(!k){b[a>>1]=0;return;}o=((pe(k)|0)&65535)+65535|0;j=o<<16>>16;if((o&65535)<<16>>16>0){i=k<>j|0)==(k|0))k=i;else k=k>>31^2147483647;}else{j=0-j<<16;if((j|0)<2031616)k=k>>(j>>16);else k=0;}n=Ce(k,h)|0;i=c[h>>2]|0;if(q){j=0;k=0;do{m=b[d+(j<<1)>>1]|0;m=Z(m,m)|0;if((m|0)!=1073741824){l=(m<<1)+k|0;if((m^k|0)>0&(l^k|0)<0){c[h>>2]=1;k=(k>>>31)+2147483647|0;}else k=l;}else{c[h>>2]=1;k=2147483647;}j=j+1|0;}while((j&65535)<<16>>16!=g<<16>>16);if((k|0)==2147483647){c[h>>2]=i;m=0;k=0;do{l=b[d+(m<<1)>>1]>>2;l=Z(l,l)|0;if((l|0)!=1073741824){j=(l<<1)+k|0;if((l^k|0)>0&(j^k|0)<0){c[h>>2]=1;k=(k>>>31)+2147483647|0;}else k=j;}else{c[h>>2]=1;k=2147483647;}m=m+1|0;}while((m&65535)<<16>>16!=g<<16>>16);}else p=29;}else{k=0;p=29;}if((p|0)==29)k=k>>4;if(!k)l=0;else{j=(pe(k)|0)<<16>>16;i=o-j|0;l=i&65535;k=(Td(n,Ce(k<>16;j=k<<7;i=i<<16>>16;if(l<<16>>16>0)i=l<<16>>16<31?j>>i:0;else{p=0-i<<16>>16;i=j<>p|0)==(j|0)?i:k>>24^2147483647;}l=(Z(((ce(i,h)|0)<<9)+32768>>16,32767-(f&65535)<<16>>16)|0)>>>15<<16>>16;}i=b[a>>1]|0;if(q){k=f<<16>>16;j=0;while(1){f=((Z(i<<16>>16,k)|0)>>>15&65535)+l|0;i=f&65535;b[e>>1]=(Z(b[e>>1]|0,f<<16>>16)|0)>>>12;j=j+1<<16>>16;if(j<<16>>16>=g<<16>>16)break;else e=e+2|0;}}b[a>>1]=i;return;}function Da(a,d,e,f){a=a|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;i=c[f>>2]|0;g=e<<16>>16>0;if(g){j=0;h=0;do{l=b[d+(j<<1)>>1]|0;l=Z(l,l)|0;if((l|0)!=1073741824){k=(l<<1)+h|0;if((l^h|0)>0&(k^h|0)<0){c[f>>2]=1;h=(h>>>31)+2147483647|0;}else h=k;}else{c[f>>2]=1;h=2147483647;}j=j+1|0;}while((j&65535)<<16>>16!=e<<16>>16);if((h|0)==2147483647){c[f>>2]=i;l=0;i=0;do{k=b[d+(l<<1)>>1]>>2;k=Z(k,k)|0;if((k|0)!=1073741824){j=(k<<1)+i|0;if((k^i|0)>0&(j^i|0)<0){c[f>>2]=1;i=(i>>>31)+2147483647|0;}else i=j;}else{c[f>>2]=1;i=2147483647;}l=l+1|0;}while((l&65535)<<16>>16!=e<<16>>16);}else o=8;}else{h=0;o=8;}if((o|0)==8)i=h>>4;if(!i)return;n=((pe(i)|0)&65535)+65535|0;k=n<<16>>16;if((n&65535)<<16>>16>0){j=i<>k|0)==(i|0))i=j;else i=i>>31^2147483647;}else{k=0-k<<16;if((k|0)<2031616)i=i>>(k>>16);else i=0;}m=Ce(i,f)|0;i=c[f>>2]|0;if(g){j=0;h=0;do{l=b[a+(j<<1)>>1]|0;l=Z(l,l)|0;if((l|0)!=1073741824){k=(l<<1)+h|0;if((l^h|0)>0&(k^h|0)<0){c[f>>2]=1;h=(h>>>31)+2147483647|0;}else h=k;}else{c[f>>2]=1;h=2147483647;}j=j+1|0;}while((j&65535)<<16>>16!=e<<16>>16);if((h|0)==2147483647){c[f>>2]=i;i=0;j=0;do{l=b[a+(i<<1)>>1]>>2;l=Z(l,l)|0;if((l|0)!=1073741824){k=(l<<1)+j|0;if((l^j|0)>0&(k^j|0)<0){c[f>>2]=1;j=(j>>>31)+2147483647|0;}else j=k;}else{c[f>>2]=1;j=2147483647;}i=i+1|0;}while((i&65535)<<16>>16!=e<<16>>16);}else o=28;}else{h=0;o=28;}if((o|0)==28)j=h>>4;if(!j)g=0;else{l=pe(j)|0;k=l<<16>>16;if(l<<16>>16>0){i=j<>k|0)==(j|0))j=i;else j=j>>31^2147483647;}else{k=0-k<<16;if((k|0)<2031616)j=j>>(k>>16);else j=0;}i=n-(l&65535)|0;k=i&65535;h=(Td(m,Ce(j,f)|0)|0)<<16>>16;g=h<<7;i=i<<16>>16;if(k<<16>>16>0)g=k<<16>>16<31?g>>i:0;else{n=0-i<<16>>16;a=g<>n|0)==(g|0)?a:h>>24^2147483647;}g=ce(g,f)|0;if((g|0)>4194303)g=2147483647;else g=(g|0)<-4194304?-2147483648:g<<9;g=Ce(g,f)|0;}h=(e&65535)+65535&65535;if(h<<16>>16<=-1)return;l=g<<16>>16;k=e+-1<<16>>16<<16>>16;while(1){i=d+(k<<1)|0;g=Z(b[i>>1]|0,l)|0;do if((g|0)!=1073741824){j=g<<1;if((j|0)<=268435455){if((j|0)<-268435456){b[i>>1]=-32768;break;}else{b[i>>1]=g>>>12;break;}}else o=52;}else{c[f>>2]=1;o=52;}while(0);if((o|0)==52){o=0;b[i>>1]=32767;}h=h+-1<<16>>16;if(h<<16>>16<=-1)break;else k=k+-1|0;}return;}function Ea(a,d,e,f,g){a=a|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,k=0,l=0;l=i;i=i+496|0;k=l;j=(g|0)==2;do if(!(j&1|(g|0)==4)){if(g){a=-1;i=l;return a|0;}j=b[e>>1]|0;d=e+490|0;g=e+2|0;h=0;while(1){b[k+(h<<1)>>1]=b[g>>1]|0;h=h+1|0;if((h|0)==244)break;else g=g+2|0;}h=j<<16>>16;if(j<<16>>16==7){g=492;d=c[a+1760>>2]|0;break;}else{g=492;d=b[d>>1]|0;break;}}else{h=a+1168|0;if(j){Gb(d,e,k,h);h=604;}else{pb(d,e,k,h);h=3436;}g=b[h+(d<<1)>>1]|0;do if(d>>>0>=8){if((d|0)==8){d=b[k+76>>1]<<2|(b[k+74>>1]<<1|b[k+72>>1]);h=(b[k+70>>1]|0)==0?4:5;break;}if(d>>>0<15){a=-1;i=l;return a|0;}else{d=c[a+1760>>2]|0;h=7;break;}}else h=0;while(0);if(g<<16>>16==-1){a=-1;i=l;return a|0;}}while(0);Fb(a,d,k,h,f);c[a+1760>>2]=d;a=g;i=l;return a|0;}function Fa(a,d,f){a=a|0;d=d|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;t=i;i=i+48|0;r=t+20|0;s=t;h=r;g=h+20|0;do{b[h>>1]=b[a>>1]|0;h=h+2|0;a=a+2|0;}while((h|0)<(g|0));a=b[r+18>>1]|0;q=(a&65535)-((a&65535)>>>15&65535)|0;a:do if(((q<<16>>31^q)&65535)<<16>>16<=4095){g=9;q=9;while(1){a=a<<16>>16;a=(a<<19>>19|0)==(a|0)?a<<3:a>>>15^32767;p=d+(g<<1)|0;b[p>>1]=a;a=a<<16>>16;a=Z(a,a)|0;if((a|0)==1073741824){c[f>>2]=1;h=2147483647;}else h=a<<1;a=2147483647-h|0;if((a&h|0)<0){c[f>>2]=1;a=2147483647;}n=pe(a)|0;o=15-(n&65535)&65535;j=n<<16>>16;if(n<<16>>16>0){h=a<>j|0)!=(a|0))h=a>>31^2147483647;}else{h=0-j<<16;if((h|0)<2031616)h=a>>(h>>16);else h=0;}h=Td(16384,Ce(h,f)|0)|0;do if(q<<16>>16>0){n=g+-1|0;k=h<<16>>16;l=q<<16>>16;m=0;while(1){g=e[r+(m<<1)>>1]|0;a=g<<16;j=Z(b[r+(n-m<<1)>>1]|0,b[p>>1]|0)|0;if((j|0)==1073741824){c[f>>2]=1;h=2147483647;}else h=j<<1;j=a-h|0;if(((j^a)&(h^a)|0)<0){c[f>>2]=1;j=(g>>>15)+2147483647|0;}j=Z((Ce(j,f)|0)<<16>>16,k)|0;if((j|0)==1073741824){c[f>>2]=1;j=2147483647;}else j=j<<1;j=ge(j,o,f)|0;h=j-(j>>>31)|0;if((h>>31^h|0)>32767){j=24;break;}b[s+(m<<1)>>1]=j;m=m+1|0;if((l|0)<=(m|0)){j=26;break;}}if((j|0)==24){j=0;h=d;g=h+20|0;do{b[h>>1]=0;h=h+2|0;}while((h|0)<(g|0));a=10;}else if((j|0)==26){j=0;if(q<<16>>16>0)a=q;else{j=28;break;}}h=a+-1<<16>>16;Oe(r|0,s|0,((h&65535)<<1)+2|0)|0;g=h<<16>>16;}else j=28;while(0);if((j|0)==28){a=q+-1<<16>>16;if(a<<16>>16>-1){g=a<<16>>16;h=32767;}else break;}a=b[r+(g<<1)>>1]|0;q=(a&65535)-((a&65535)>>>15&65535)|0;if(((q<<16>>31^q)&65535)<<16>>16>4095)break a;else q=h;}i=t;return;}while(0);h=d;g=h+20|0;do{b[h>>1]=0;h=h+2|0;}while((h|0)<(g|0));i=t;return;}function Ga(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;if(b<<16>>16<=0){a=0;return a|0;}e=c[a>>2]|0;f=0;d=0;do{h=e&1;d=h|d<<1&131070;g=e>>1;e=(h|0)==(e>>>28&1|0)?g:g|1073741824;f=f+1<<16>>16;}while(f<<16>>16>16);c[a>>2]=e;h=d&65535;return h|0;}function Ha(a,d,e){a=a|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0;g=d;f=g+80|0;do{b[g>>1]=0;g=g+2|0;}while((g|0)<(f|0));f=0;g=c[a>>2]|0;do{k=g&1;j=g>>1;j=(k|0)==(g>>>28&1|0)?j:j|1073741824;h=j&1;i=j>>1;c[a>>2]=(h|0)==(j>>>28&1|0)?i:i|1073741824;h=Rd((Z(k<<1|h,1310720)|0)>>>17&65535,f,e)|0;k=c[a>>2]|0;i=k&1;j=k>>1;g=(i|0)==(k>>>28&1|0)?j:j|1073741824;c[a>>2]=g;b[d+(h<<16>>16<<1)>>1]=((i&65535)<<13&65535)+-4096<<16>>16;f=f+1<<16>>16;}while(f<<16>>16<10);return;}function Ia(a,d,f,g,h,i){a=a|0;d=d|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0;j=b[a>>1]|0;if((j*31821|0)==1073741824){c[i>>2]=1;k=1073741823;}else k=j*63642>>1;j=k+13849|0;if((k|0)>-1&(j^k|0)<0){c[i>>2]=1;j=(k>>>31)+2147483647|0;}b[a>>1]=j;if(d<<16>>16<=0)return;k=0;j=h+((j&127)<<1)|0;while(1){b[g+(k<<1)>>1]=(-65536<>1]>>>16^65535)&e[j>>1];k=k+1|0;if((k&65535)<<16>>16==d<<16>>16)break;else j=j+2|0;}return;}function Ja(a){a=a|0;var c=0;if(!a){c=-1;return c|0;}c=a+122|0;do{b[a>>1]=0;a=a+2|0;}while((a|0)<(c|0));c=0;return c|0;}function Ka(a,d,f,g,h){a=a|0;d=d|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0,m=0,n=0,o=0;k=159;j=0;while(1){m=b[f+(k<<1)>>1]|0;m=Z(m,m)|0;m=(m|0)==1073741824?2147483647:m<<1;i=m+j|0;if((m^j|0)>-1&(i^j|0)<0){c[h>>2]=1;j=(j>>>31)+2147483647|0;}else j=i;if((k|0)>0)k=k+-1|0;else{k=j;break;}}h=k>>>14&65535;j=32767;i=59;while(1){m=b[a+(i<<1)>>1]|0;j=m<<16>>16>16?m:j;if((i|0)>0)i=i+-1|0;else break;}m=(k|0)>536870911?32767:h;h=j<<16>>16;i=h<<20>>16;k=j<<16>>16>0?32767:-32768;f=55;j=b[a>>1]|0;while(1){l=b[a+(f<<1)>>1]|0;j=j<<16>>16>16?l:j;if((f|0)>1)f=f+-1|0;else break;}f=b[a+80>>1]|0;l=b[a+82>>1]|0;f=f<<16>>16>16?l:f;l=b[a+84>>1]|0;f=f<<16>>16>16?l:f;l=b[a+86>>1]|0;f=f<<16>>16>16?l:f;l=b[a+88>>1]|0;f=f<<16>>16>16?l:f;l=b[a+90>>1]|0;f=f<<16>>16>16?l:f;l=b[a+92>>1]|0;f=f<<16>>16>16?l:f;l=b[a+94>>1]|0;f=f<<16>>16>16?l:f;l=b[a+96>>1]|0;f=f<<16>>16>16?l:f;l=b[a+98>>1]|0;f=f<<16>>16>16?l:f;l=b[a+100>>1]|0;f=f<<16>>16>16?l:f;l=b[a+102>>1]|0;f=f<<16>>16>16?l:f;l=b[a+104>>1]|0;f=f<<16>>16>16?l:f;l=b[a+106>>1]|0;f=f<<16>>16>16?l:f;l=b[a+108>>1]|0;f=f<<16>>16>16?l:f;l=b[a+110>>1]|0;f=f<<16>>16>16?l:f;l=b[a+112>>1]|0;f=f<<16>>16>16?l:f;l=b[a+114>>1]|0;f=f<<16>>16>16?l:f;l=b[a+116>>1]|0;f=f<<16>>16>16?l:f;l=a+118|0;o=b[l>>1]|0;do if((m+-21&65535)<17557&j<<16>>16>20?(m<<16>>16|0)<(((h<<4|0)==(i|0)?i:k)|0)?1:(f<<16>>16>16?o:f)<<16>>16<1953:0){j=a+120|0;i=b[j>>1]|0;if(i<<16>>16>29){b[j>>1]=30;f=j;k=1;break;}else{k=(i&65535)+1&65535;b[j>>1]=k;f=j;k=k<<16>>16>1&1;break;}}else n=14;while(0);if((n|0)==14){f=a+120|0;b[f>>1]=0;k=0;}j=0;do{o=j;j=j+1|0;b[a+(o<<1)>>1]=b[a+(j<<1)>>1]|0;}while((j|0)!=59);b[l>>1]=m;j=b[f>>1]|0;j=j<<16>>16>15?16383:j<<16>>16>8?15565:13926;i=Zd(d+8|0,5)|0;if((b[f>>1]|0)>20){if(((Zd(d,9)|0)<<16>>16|0)>(j|0))n=20;}else if((i<<16>>16|0)>(j|0))n=20;if((n|0)==20){b[g>>1]=0;return k|0;}i=(e[g>>1]|0)+1&65535;if(i<<16>>16>10){b[g>>1]=10;return k|0;}else{b[g>>1]=i;return k|0;}return 0;}function La(a){a=a|0;var c=0;if(!a){c=-1;return c|0;}c=a+18|0;do{b[a>>1]=0;a=a+2|0;}while((a|0)<(c|0));c=0;return c|0;}function Ma(a,d,f,g,h,i,j,k,l,m,n,o){a=a|0;d=d|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;var p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;y=a+2|0;b[a>>1]=b[y>>1]|0;z=a+4|0;b[y>>1]=b[z>>1]|0;A=a+6|0;b[z>>1]=b[A>>1]|0;B=a+8|0;b[A>>1]=b[B>>1]|0;C=a+10|0;b[B>>1]=b[C>>1]|0;D=a+12|0;b[C>>1]=b[D>>1]|0;b[D>>1]=f;t=0;x=0;do{p=h+(x<<1)|0;r=Ge(b[p>>1]|0,b[g+(x<<1)>>1]|0,o)|0;r=(r&65535)-((r&65535)>>>15&65535)|0;r=r<<16>>31^r;w=((qe(r&65535)|0)&65535)+65535|0;q=w<<16>>16;if((w&65535)<<16>>16<0){s=0-q<<16;if((s|0)<983040)u=r<<16>>16>>(s>>16)&65535;else u=0;}else{s=r<<16>>16;r=s<>16>>q|0)==(s|0))u=r&65535;else u=(s>>>15^32767)&65535;}v=qe(b[p>>1]|0)|0;r=b[p>>1]|0;q=v<<16>>16;if(v<<16>>16<0){s=0-q<<16;if((s|0)<983040)s=r<<16>>16>>(s>>16)&65535;else s=0;}else{s=r<<16>>16;r=s<>16>>q|0)==(s|0))s=r&65535;else s=(s>>>15^32767)&65535;}q=Td(u,s)|0;s=(w&65535)+2-(v&65535)|0;r=s&65535;do if(s&32768){if(r<<16>>16!=-32768){w=0-s|0;s=w<<16>>16;if((w&65535)<<16>>16<0){s=0-s<<16;if((s|0)>=983040){s=0;break;}s=q<<16>>16>>(s>>16)&65535;break;}}else s=32767;r=q<<16>>16;q=r<>16>>s|0)==(r|0))s=q&65535;else s=(r>>>15^32767)&65535;}else s=De(q,r,o)|0;while(0);t=Rd(t,s,o)|0;x=x+1|0;}while((x|0)!=10);s=t&65535;r=t<<16>>16>5325;t=a+14|0;if(r){h=(e[t>>1]|0)+1&65535;b[t>>1]=h;if(h<<16>>16>10)b[a+16>>1]=0;}else b[t>>1]=0;switch(d|0){case 0:case 1:case 2:case 3:case 6:break;default:{D=a+16|0;o=f;f=b[D>>1]|0;f=f&65535;f=f+1|0;f=f&65535;b[D>>1]=f;return o|0;}}u=(j|i)<<16>>16==0;v=m<<16>>16==0;w=d>>>0<3;t=s+(w&((v|(u&(k<<16>>16==0|l<<16>>16==0)|n<<16>>16<2))^1)?61030:62259)&65535;t=t<<16>>16>0?t:0;if(t<<16>>16<=2048){t=t<<16>>16;if((t<<18>>18|0)==(t|0))l=t<<2;else l=t>>>15^32767;}else l=8192;k=a+16|0;n=r|(b[k>>1]|0)<40;t=b[z>>1]|0;if((t*6554|0)==1073741824){c[o>>2]=1;r=2147483647;}else r=t*13108|0;t=b[A>>1]|0;s=t*6554|0;if((s|0)!=1073741824){t=(t*13108|0)+r|0;if((s^r|0)>0&(t^r|0)<0){c[o>>2]=1;t=(r>>>31)+2147483647|0;}}else{c[o>>2]=1;t=2147483647;}s=b[B>>1]|0;r=s*6554|0;if((r|0)!=1073741824){s=(s*13108|0)+t|0;if((r^t|0)>0&(s^t|0)<0){c[o>>2]=1;s=(t>>>31)+2147483647|0;}}else{c[o>>2]=1;s=2147483647;}t=b[C>>1]|0;r=t*6554|0;if((r|0)!=1073741824){t=(t*13108|0)+s|0;if((r^s|0)>0&(t^s|0)<0){c[o>>2]=1;r=(s>>>31)+2147483647|0;}else r=t;}else{c[o>>2]=1;r=2147483647;}t=b[D>>1]|0;s=t*6554|0;if((s|0)!=1073741824){t=(t*13108|0)+r|0;if((s^r|0)>0&(t^r|0)<0){c[o>>2]=1;t=(r>>>31)+2147483647|0;}}else{c[o>>2]=1;t=2147483647;}r=Ce(t,o)|0;if(w&((u|v)^1)){t=b[a>>1]|0;if((t*4681|0)==1073741824){c[o>>2]=1;r=2147483647;}else r=t*9362|0;t=b[y>>1]|0;s=t*4681|0;if((s|0)!=1073741824){t=(t*9362|0)+r|0;if((s^r|0)>0&(t^r|0)<0){c[o>>2]=1;r=(r>>>31)+2147483647|0;}else r=t;}else{c[o>>2]=1;r=2147483647;}t=b[z>>1]|0;s=t*4681|0;if((s|0)!=1073741824){t=(t*9362|0)+r|0;if((s^r|0)>0&(t^r|0)<0){c[o>>2]=1;r=(r>>>31)+2147483647|0;}else r=t;}else{c[o>>2]=1;r=2147483647;}t=b[A>>1]|0;s=t*4681|0;if((s|0)!=1073741824){t=(t*9362|0)+r|0;if((s^r|0)>0&(t^r|0)<0){c[o>>2]=1;t=(r>>>31)+2147483647|0;}}else{c[o>>2]=1;t=2147483647;}s=b[B>>1]|0;r=s*4681|0;if((r|0)!=1073741824){s=(s*9362|0)+t|0;if((r^t|0)>0&(s^t|0)<0){c[o>>2]=1;t=(t>>>31)+2147483647|0;}else t=s;}else{c[o>>2]=1;t=2147483647;}s=b[C>>1]|0;r=s*4681|0;if((r|0)!=1073741824){s=(s*9362|0)+t|0;if((r^t|0)>0&(s^t|0)<0){c[o>>2]=1;s=(t>>>31)+2147483647|0;}}else{c[o>>2]=1;s=2147483647;}r=b[D>>1]|0;p=r*4681|0;if((p|0)!=1073741824){q=(r*9362|0)+s|0;if((p^s|0)>0&(q^s|0)<0){c[o>>2]=1;q=(s>>>31)+2147483647|0;}}else{c[o>>2]=1;q=2147483647;}r=Ce(q,o)|0;}t=n?8192:l<<16>>16;p=Z(t,f<<16>>16)|0;if((p|0)==1073741824){c[o>>2]=1;s=2147483647;}else s=p<<1;r=r<<16>>16;q=r<<13;if((q|0)!=1073741824){p=s+(r<<14)|0;if((s^q|0)>0&(p^s|0)<0){c[o>>2]=1;s=(s>>>31)+2147483647|0;}else s=p;}else{c[o>>2]=1;s=2147483647;}p=Z(r,t)|0;if((p|0)==1073741824){c[o>>2]=1;q=2147483647;}else q=p<<1;p=s-q|0;if(((p^s)&(q^s)|0)<0){c[o>>2]=1;p=(s>>>31)+2147483647|0;}D=p<<2;f=k;o=Ce((D>>2|0)==(p|0)?D:p>>31^2147483647,o)|0;D=b[f>>1]|0;D=D&65535;D=D+1|0;D=D&65535;b[f>>1]=D;return o|0;}function Na(a,c,d){a=a|0;c=c|0;d=d|0;var f=0,g=0,h=0,i=0;f=c;g=f+80|0;do{b[f>>1]=0;f=f+2|0;}while((f|0)<(g|0));f=0;do{i=b[a+(f<<1)>>1]|0;g=((i&8)<<10&65535^8192)+-4096<<16>>16;h=f<<16;i=((b[d+((i&7)<<1)>>1]|0)*327680|0)+h>>16;b[c+(i<<1)>>1]=g;h=((b[d+((e[a+(f+5<<1)>>1]&7)<<1)>>1]|0)*327680|0)+h>>16;if((h|0)<(i|0))g=0-(g&65535)&65535;i=c+(h<<1)|0;b[i>>1]=(e[i>>1]|0)+(g&65535);f=f+1|0;}while((f|0)!=5);return;}function Oa(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,f=0,g=0;f=c<<16>>16;e=(f<<1&2|1)+((f>>>1&7)*5|0)|0;c=f>>>4&3;c=((f>>>6&7)*5|0)+((c|0)==3?4:c)|0;f=d;g=f+80|0;do{b[f>>1]=0;f=f+2|0;}while((f|0)<(g|0));a=a<<16>>16;b[d+(e<<1)>>1]=(0-(a&1)&16383)+57344;b[d+(c<<1)>>1]=(0-(a>>>1&1)&16383)+57344;return;}function Pa(a,c,d,f,g,h){a=a|0;c=c|0;d=d|0;f=f|0;g=g|0;h=h|0;var i=0,j=0;h=d<<16>>16;j=h>>>3;a=a<<16>>16;a=((a<<17>>17|0)==(a|0)?a<<1:a>>>15^32767)+(j&8)<<16;j=(e[f+(a+65536>>16<<1)>>1]|0)+((j&7)*5|0)|0;d=c<<16>>16;i=(0-(d&1)&16383)+57344&65535;a=g+((e[f+(a>>16<<1)>>1]|0)+((h&7)*5|0)<<16>>16<<1)|0;c=g;h=c+80|0;do{b[c>>1]=0;c=c+2|0;}while((c|0)<(h|0));b[a>>1]=i;b[g+(j<<16>>16<<1)>>1]=(0-(d>>>1&1)&16383)+57344;return;}function Qa(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0;c=c<<16>>16;e=(c&7)*5|0;f=(c>>>2&2|1)+((c>>>4&7)*5|0)|0;c=(c>>>6&2)+2+((c>>>8&7)*5|0)|0;g=d;h=g+80|0;do{b[g>>1]=0;g=g+2|0;}while((g|0)<(h|0));a=a<<16>>16;b[d+(e<<1)>>1]=(0-(a&1)&16383)+57344;b[d+(f<<1)>>1]=(0-(a>>>1&1)&16383)+57344;b[d+(c<<1)>>1]=(0-(a>>>2&1)&16383)+57344;return;}function Ra(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0;c=c<<16>>16;h=b[d+((c&7)<<1)>>1]|0;i=b[d+((c>>>3&7)<<1)>>1]|0;g=b[d+((c>>>6&7)<<1)>>1]|0;d=(c>>>9&1)+3+((b[d+((c>>>10&7)<<1)>>1]|0)*5|0)|0;c=e;f=c+80|0;do{b[c>>1]=0;c=c+2|0;}while((c|0)<(f|0));a=a<<16>>16;b[e+(h*327680>>16<<1)>>1]=(0-(a&1)&16383)+57344;b[e+((i*327680|0)+65536>>16<<1)>>1]=(0-(a>>>1&1)&16383)+57344;b[e+((g*327680|0)+131072>>16<<1)>>1]=(0-(a>>>2&1)&16383)+57344;b[e+(d<<16>>16<<1)>>1]=(0-(a>>>3&1)&16383)+57344;return;}function Sa(a,d,f){a=a|0;d=d|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;q=i;i=i+32|0;p=q+16|0;o=q;j=d;h=j+80|0;do{b[j>>1]=0;j=j+2|0;}while((j|0)<(h|0));h=b[a>>1]|0;b[p>>1]=h;b[p+2>>1]=b[a+2>>1]|0;b[p+4>>1]=b[a+4>>1]|0;b[p+6>>1]=b[a+6>>1]|0;m=b[a+8>>1]|0;Ta(m>>>3&65535,m&7,0,4,1,o,f);m=b[a+10>>1]|0;Ta(m>>>3&65535,m&7,2,6,5,o,f);m=b[a+12>>1]|0;g=m>>2;do if((g*25|0)!=1073741824){j=(Z(g,1638400)|0)+786432>>21;g=j*6554>>15;if((g|0)>32767){c[f>>2]=1;k=1;l=1;a=163835;n=6;break;}a=(g<<16>>16)*5|0;k=g&1;if((a|0)==1073741824){c[f>>2]=1;l=0;a=65535;}else{l=0;n=6;}}else{c[f>>2]=1;k=0;g=0;l=0;j=0;a=0;n=6;}while(0);if((n|0)==6)a=a&65535;n=j-a|0;k=k<<16>>16==0?n:4-n|0;n=k<<16>>16;b[o+6>>1]=Rd(((k<<17>>17|0)==(n|0)?k<<1:n>>>15^32767)&65535,m&1,f)|0;if(l){c[f>>2]=1;g=32767;}n=g<<16>>16;b[o+14>>1]=((g<<17>>17|0)==(n|0)?g<<1:n>>>15^32767)+(m>>>1&1);g=0;while(1){h=h<<16>>16==0?8191:-8191;n=(b[o+(g<<1)>>1]<<2)+g<<16;j=n>>16;if((n|0)<2621440)b[d+(j<<1)>>1]=h;k=(b[o+(g+4<<1)>>1]<<2)+g<<16;a=k>>16;if((a|0)<(j|0))h=0-(h&65535)&65535;if((k|0)<2621440){n=d+(a<<1)|0;b[n>>1]=(e[n>>1]|0)+(h&65535);}g=g+1|0;if((g|0)==4)break;h=b[p+(g<<1)>>1]|0;}i=q;return;}function Ta(a,d,e,f,g,h,i){a=a|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0;k=a<<16>>16>124?124:a;a=(k<<16>>16)*1311>>15;p=(a|0)>32767;if(!p){j=a<<16>>16;if((j*25|0)==1073741824){c[i>>2]=1;j=1073741823;}else o=4;}else{c[i>>2]=1;j=32767;o=4;}if((o|0)==4)j=(j*50|0)>>>1;m=(k&65535)-j|0;j=(m<<16>>16)*6554>>15;n=(j|0)>32767;if(!n){k=j<<16>>16;if((k*5|0)==1073741824){c[i>>2]=1;l=1073741823;}else o=9;}else{c[i>>2]=1;k=32767;o=9;}if((o|0)==9)l=(k*10|0)>>>1;m=m-l|0;o=m<<16>>16;k=d<<16>>16;l=k>>2;k=k-(l<<2)|0;b[h+(e<<16>>16<<1)>>1]=((m<<17>>17|0)==(o|0)?m<<1:o>>>15^32767)+(k&1);if(n){c[i>>2]=1;j=32767;}e=j<<16>>16;b[h+(f<<16>>16<<1)>>1]=((j<<17>>17|0)==(e|0)?j<<1:e>>>15^32767)+(k<<16>>17);if(p){c[i>>2]=1;a=32767;}f=a<<16>>16;b[h+(g<<16>>16<<1)>>1]=Rd(l&65535,((a<<17>>17|0)==(f|0)?a<<1:f>>>15^32767)&65535,i)|0;return;}function Ua(a){a=a|0;var d=0,e=0,f=0,g=0;if(!a){g=-1;return g|0;}Yd(a+1168|0);b[a+460>>1]=40;c[a+1164>>2]=0;d=a+646|0;e=a+1216|0;f=a+462|0;g=f+22|0;do{b[f>>1]=0;f=f+2|0;}while((f|0)<(g|0));db(d,c[e>>2]|0)|0;mb(a+686|0)|0;ib(a+700|0)|0;La(a+608|0)|0;rb(a+626|0,c[e>>2]|0)|0;Ja(a+484|0)|0;tb(a+730|0)|0;eb(a+748|0)|0;Ud(a+714|0)|0;Va(a,0)|0;g=0;return g|0;}function Va(a,d){a=a|0;d=d|0;var e=0,f=0;if(!a){a=-1;return a|0;}c[a+388>>2]=a+308;Qe(a|0,0,308)|0;d=(d|0)!=8;if(d){e=a+412|0;f=e+20|0;do{b[e>>1]=0;e=e+2|0;}while((e|0)<(f|0));b[a+392>>1]=3e4;b[a+394>>1]=26e3;b[a+396>>1]=21e3;b[a+398>>1]=15e3;b[a+400>>1]=8e3;b[a+402>>1]=0;b[a+404>>1]=-8e3;b[a+406>>1]=-15e3;b[a+408>>1]=-21e3;b[a+410>>1]=-26e3;}b[a+432>>1]=0;b[a+434>>1]=40;c[a+1164>>2]=0;b[a+436>>1]=0;b[a+438>>1]=0;b[a+440>>1]=0;b[a+460>>1]=40;b[a+462>>1]=0;b[a+464>>1]=0;if(d){e=a+442|0;f=e+18|0;do{b[e>>1]=0;e=e+2|0;}while((e|0)<(f|0));e=a+466|0;f=e+18|0;do{b[e>>1]=0;e=e+2|0;}while((e|0)<(f|0));La(a+608|0)|0;f=a+1216|0;rb(a+626|0,c[f>>2]|0)|0;db(a+646|0,c[f>>2]|0)|0;mb(a+686|0)|0;ib(a+700|0)|0;Ud(a+714|0)|0;}else{e=a+466|0;f=e+18|0;do{b[e>>1]=0;e=e+2|0;}while((e|0)<(f|0));La(a+608|0)|0;db(a+646|0,c[a+1216>>2]|0)|0;mb(a+686|0)|0;ib(a+700|0)|0;}Ja(a+484|0)|0;b[a+606>>1]=21845;tb(a+730|0)|0;if(!d){a=0;return a|0;}eb(a+748|0)|0;a=0;return a|0;}function Wa(d,f,g,h,j,k){d=d|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;var l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Ea=0,Fa=0,Ga=0,Ha=0,Ja=0,La=0,Ta=0,Ua=0,Wa=0,bb=0,db=0,eb=0,ib=0,mb=0,pb=0,rb=0,tb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0;Bb=i;i=i+336|0;r=Bb+236|0;q=Bb+216|0;zb=Bb+112|0;yb=Bb+12|0;mb=Bb+256|0;rb=Bb+136|0;pb=Bb+32|0;eb=Bb+8|0;ib=Bb+6|0;xb=Bb+4|0;tb=Bb+2|0;Ab=Bb;Ta=d+1164|0;Ua=d+748|0;Wa=hb(Ua,h,Ta)|0;if(Wa){Va(d,8)|0;fb(Ua,d+412|0,d+646|0,d+714|0,d+608|0,Wa,f,g,d+1168|0,j,k,Ta);Ab=d+666|0;me(Ab,d+392|0,10,Ta);sb(d+626|0,Ab,Ta);Ab=d+1156|0;c[Ab>>2]=Wa;i=Bb;return;}switch(h|0){case 1:{l=1;x=6;break;}case 2:case 7:{Ia(d+606|0,b[(c[d+1256>>2]|0)+(f<<1)>>1]|0,c[(c[d+1260>>2]|0)+(f<<2)>>2]|0,g,c[d+1276>>2]|0,Ta);x=9;break;}case 3:{x=9;break;}default:{l=0;x=6;}}do if((x|0)==6){h=d+440|0;if((b[h>>1]|0)==6){b[h>>1]=5;Ja=0;La=0;break;}else{b[h>>1]=0;Ja=0;La=0;break;}}else if((x|0)==9){h=d+440|0;Ja=(e[h>>1]|0)+1&65535;b[h>>1]=Ja<<16>>16>6?6:Ja;Ja=1;La=1;l=0;}while(0);Ea=d+1156|0;switch(c[Ea>>2]|0){case 1:{b[h>>1]=5;b[d+436>>1]=0;break;}case 2:{b[h>>1]=5;b[d+436>>1]=1;break;}default:}n=d+646|0;Fa=d+666|0;m=zb;o=Fa;p=m+20|0;do{a[m>>0]=a[o>>0]|0;m=m+1|0;o=o+1|0;}while((m|0)<(p|0));Ga=(f|0)!=7;Ha=d+1168|0;if(Ga){ab(n,f,La,g,Ha,r,Ta);m=d+392|0;ae(m,r,k,Ta);g=g+6|0;}else{cb(n,La,g,Ha,q,r,Ta);m=d+392|0;_d(m,q,r,k,Ta);g=g+10|0;}o=r;p=m+20|0;do{b[m>>1]=b[o>>1]|0;m=m+2|0;o=o+2|0;}while((m|0)<(p|0));Ca=f>>>0>1;B=f>>>0<4&1;Ba=(f|0)==5;Aa=Ba?10:5;Ba=Ba?19:9;E=d+434|0;F=143-Ba&65535;G=d+460|0;H=d+462|0;I=d+464|0;C=f>>>0>2;J=d+388|0;K=(f|0)==0;L=f>>>0<2;M=d+1244|0;N=d+432|0;O=f>>>0<6;P=d+1168|0;Q=(f|0)==6;R=La<<16>>16==0;S=d+714|0;T=d+686|0;U=d+436|0;V=d+700|0;W=(f|0)==7;X=d+482|0;Y=f>>>0<3;_=d+608|0;$=d+626|0;aa=d+438|0;ba=f>>>0<7;ca=d+730|0;D=Ja^1;da=l<<16>>16!=0;za=da?La^1:0;ea=d+442|0;fa=d+458|0;ga=d+412|0;ha=d+80|0;ia=d+1236|0;ja=d+1240|0;ka=d+468|0;la=d+466|0;ma=d+470|0;na=d+472|0;oa=d+474|0;pa=d+476|0;qa=d+478|0;ra=d+480|0;sa=d+444|0;ta=d+446|0;ua=d+448|0;va=d+450|0;wa=d+452|0;xa=d+454|0;ya=d+456|0;y=0;z=0;s=0;t=0;A=-1;while(1){A=(A<<16>>16)+1|0;p=A&65535;z=1-(z<<16>>16)|0;v=z&65535;q=Ca&s<<16>>16==80?0:s;u=g+2|0;r=b[g>>1]|0;a:do if(Ga){w=b[E>>1]|0;m=(w&65535)-Aa&65535;m=m<<16>>16<20?20:m;o=(m&65535)+Ba&65535;n=o<<16>>16>143;Ya(r,n?F:m,n?143:o,q,w,eb,ib,B,Ta);q=b[eb>>1]|0;b[G>>1]=q;if(Ja){r=b[E>>1]|0;if(r<<16>>16<143){r=(r&65535)+1&65535;b[E>>1]=r;}b[eb>>1]=r;b[ib>>1]=0;if((b[H>>1]|0)!=0?!(C|(b[I>>1]|0)<5):0){b[eb>>1]=q;r=q;q=0;}else q=0;}else{r=q;q=b[ib>>1]|0;}se(c[J>>2]|0,r,q,40,1,Ta);if(L){q=g+6|0;Pa(p,b[g+4>>1]|0,b[u>>1]|0,c[M>>2]|0,mb,Ta);g=b[N>>1]|0;w=g<<16>>16;r=w<<1;if((r|0)==(w<<17>>16|0)){o=K;break;}o=K;r=g<<16>>16>0?32767:-32768;break;}switch(f|0){case 2:{q=g+6|0;Oa(b[g+4>>1]|0,b[u>>1]|0,mb);g=b[N>>1]|0;w=g<<16>>16;r=w<<1;if((r|0)==(w<<17>>16|0)){o=K;break a;}o=K;r=g<<16>>16>0?32767:-32768;break a;}case 3:{q=g+6|0;Qa(b[g+4>>1]|0,b[u>>1]|0,mb);g=b[N>>1]|0;w=g<<16>>16;r=w<<1;if((r|0)==(w<<17>>16|0)){o=K;break a;}o=K;r=g<<16>>16>0?32767:-32768;break a;}default:{if(O){q=g+6|0;Ra(b[g+4>>1]|0,b[u>>1]|0,c[P>>2]|0,mb);g=b[N>>1]|0;w=g<<16>>16;r=w<<1;if((r|0)==(w<<17>>16|0)){o=K;break a;}o=K;r=g<<16>>16>0?32767:-32768;break a;}if(!Q){o=K;x=44;break a;}Sa(u,mb,Ta);r=g+16|0;g=b[N>>1]|0;w=g<<16>>16;p=w<<1;if((p|0)==(w<<17>>16|0)){q=r;o=K;r=p;break a;}q=r;o=K;r=g<<16>>16>0?32767:-32768;break a;}}}else{Za(r,18,143,q,eb,ib,Ta);if(R?q<<16>>16==0|r<<16>>16<61:0){r=b[eb>>1]|0;q=b[ib>>1]|0;}else{b[G>>1]=b[eb>>1]|0;r=b[E>>1]|0;b[eb>>1]=r;b[ib>>1]=0;q=0;}se(c[J>>2]|0,r,q,40,0,Ta);o=0;x=44;}while(0);if((x|0)==44){x=0;if(Ja)lb(T,b[h>>1]|0,xb,Ta);else b[xb>>1]=$a(f,b[u>>1]|0,c[ja>>2]|0)|0;nb(T,La,b[U>>1]|0,xb,Ta);Na(g+4|0,mb,c[P>>2]|0);r=g+24|0;g=b[xb>>1]|0;w=g<<16>>16;p=w<<1;if((p|0)==(w<<17>>16|0)){q=r;r=p;}else{q=r;r=g<<16>>16>0?32767:-32768;}}g=b[eb>>1]|0;b:do if(g<<16>>16<40){m=r<<16>>16;n=g;r=g<<16>>16;while(1){p=mb+(r<<1)|0;g=(Z(b[mb+(r-(n<<16>>16)<<1)>>1]|0,m)|0)>>15;if((g|0)>32767){c[Ta>>2]=1;g=32767;}w=g&65535;b[Ab>>1]=w;b[p>>1]=Rd(b[p>>1]|0,w,Ta)|0;r=r+1|0;if((r&65535)<<16>>16==40)break b;n=b[eb>>1]|0;}}while(0);c:do if(o){o=(z&65535|0)==0;if(o){g=q;p=t;}else{g=q+2|0;p=b[q>>1]|0;}if(R)Xa(S,f,p,mb,v,xb,tb,Ha,Ta);else{lb(T,b[h>>1]|0,xb,Ta);jb(V,S,b[h>>1]|0,tb,Ta);}nb(T,La,b[U>>1]|0,xb,Ta);kb(V,La,b[U>>1]|0,tb,Ta);q=b[xb>>1]|0;r=q<<16>>16>13017?13017:q;if(o)x=80;else w=p;}else{g=q+2|0;r=b[q>>1]|0;switch(f|0){case 1:case 2:case 3:case 4:case 6:{if(R)Xa(S,f,r,mb,v,xb,tb,Ha,Ta);else{lb(T,b[h>>1]|0,xb,Ta);jb(V,S,b[h>>1]|0,tb,Ta);}nb(T,La,b[U>>1]|0,xb,Ta);kb(V,La,b[U>>1]|0,tb,Ta);q=b[xb>>1]|0;r=q<<16>>16>13017?13017:q;if(!Q){p=t;x=80;break c;}if((b[E>>1]|0)<=45){p=t;x=80;break c;}p=t;r=r<<16>>16>>>2&65535;x=80;break c;}case 5:{if(Ja)lb(T,b[h>>1]|0,xb,Ta);else b[xb>>1]=$a(5,r,c[ja>>2]|0)|0;nb(T,La,b[U>>1]|0,xb,Ta);if(R)_a(S,5,b[g>>1]|0,mb,c[ia>>2]|0,tb,Ta);else jb(V,S,b[h>>1]|0,tb,Ta);kb(V,La,b[U>>1]|0,tb,Ta);r=b[xb>>1]|0;g=q+4|0;q=r;p=t;r=r<<16>>16>13017?13017:r;x=80;break c;}default:{if(R)_a(S,f,r,mb,c[ia>>2]|0,tb,Ta);else jb(V,S,b[h>>1]|0,tb,Ta);kb(V,La,b[U>>1]|0,tb,Ta);r=b[xb>>1]|0;q=r;p=t;x=80;break c;}}}while(0);if((x|0)==80){x=0;b[N>>1]=q<<16>>16>13017?13017:q;w=p;}r=r<<16>>16;r=(r<<17>>17|0)==(r|0)?r<<1:r>>>15^32767;v=(r&65535)<<16>>16>16384;d:do if(v){u=r<<16>>16;if(W)q=0;else{q=0;while(1){r=(Z(b[(c[J>>2]|0)+(q<<1)>>1]|0,u)|0)>>15;if((r|0)>32767){c[Ta>>2]=1;r=32767;}b[Ab>>1]=r;r=Z(b[xb>>1]|0,r<<16>>16)|0;if((r|0)==1073741824){c[Ta>>2]=1;r=2147483647;}else r=r<<1;b[rb+(q<<1)>>1]=Ce(r,Ta)|0;q=q+1|0;if((q|0)==40)break d;}}do{r=(Z(b[(c[J>>2]|0)+(q<<1)>>1]|0,u)|0)>>15;if((r|0)>32767){c[Ta>>2]=1;r=32767;}b[Ab>>1]=r;r=Z(b[xb>>1]|0,r<<16>>16)|0;if((r|0)!=1073741824){r=r<<1;if((r|0)<0)r=~((r^-2)>>1);else x=88;}else{c[Ta>>2]=1;r=2147483647;x=88;}if((x|0)==88){x=0;r=r>>1;}b[rb+(q<<1)>>1]=Ce(r,Ta)|0;q=q+1|0;}while((q|0)!=40);}while(0);if(R){b[la>>1]=b[ka>>1]|0;b[ka>>1]=b[ma>>1]|0;b[ma>>1]=b[na>>1]|0;b[na>>1]=b[oa>>1]|0;b[oa>>1]=b[pa>>1]|0;b[pa>>1]=b[qa>>1]|0;b[qa>>1]=b[ra>>1]|0;b[ra>>1]=b[X>>1]|0;b[X>>1]=b[xb>>1]|0;}if((Ja|(b[U>>1]|0)!=0?Y&(b[H>>1]|0)!=0:0)?(bb=b[xb>>1]|0,bb<<16>>16>12288):0){x=(((bb<<16>>16)+118784|0)>>>1)+12288&65535;b[xb>>1]=x<<16>>16>14745?14745:x;}qb(zb,Fa,s,yb,Ta);r=Ma(_,f,b[tb>>1]|0,yb,$,La,b[U>>1]|0,l,b[aa>>1]|0,b[H>>1]|0,b[I>>1]|0,Ta)|0;switch(f|0){case 0:case 1:case 2:case 3:case 6:{p=b[xb>>1]|0;u=1;break;}default:{r=b[tb>>1]|0;p=b[xb>>1]|0;if(ba)u=1;else{q=p<<16>>16;if(p<<16>>16<0)q=~((q^-2)>>1);else q=q>>>1;p=q&65535;u=2;}}}m=p<<16>>16;s=u&65535;q=c[J>>2]|0;t=0;do{q=q+(t<<1)|0;b[pb+(t<<1)>>1]=b[q>>1]|0;q=Z(b[q>>1]|0,m)|0;if((q|0)==1073741824){c[Ta>>2]=1;n=2147483647;}else n=q<<1;o=Z(b[tb>>1]|0,b[mb+(t<<1)>>1]|0)|0;if((o|0)!=1073741824){q=(o<<1)+n|0;if((o^n|0)>0&(q^n|0)<0){c[Ta>>2]=1;q=(n>>>31)+2147483647|0;}}else{c[Ta>>2]=1;q=2147483647;}x=q<>s|0)==(q|0)?x:q>>31^2147483647,Ta)|0;q=c[J>>2]|0;b[q+(t<<1)>>1]=x;t=t+1|0;}while((t|0)!=40);vb(ca);if((Y?(b[I>>1]|0)>3:0)?!((b[H>>1]|0)==0|D):0)ub(ca);wb(ca,f,pb,r,b[xb>>1]|0,mb,p,u,Ha,Ta);r=0;o=0;do{q=b[pb+(o<<1)>>1]|0;q=Z(q,q)|0;if((q|0)!=1073741824){p=(q<<1)+r|0;if((q^r|0)>0&(p^r|0)<0){c[Ta>>2]=1;r=(r>>>31)+2147483647|0;}else r=p;}else{c[Ta>>2]=1;r=2147483647;}o=o+1|0;}while((o|0)!=40);if((r|0)<0)r=~((r^-2)>>1);else r=r>>1;r=Fe(r,Ab,Ta)|0;p=((b[Ab>>1]|0)>>>1)+15|0;q=p&65535;p=p<<16>>16;if(q<<16>>16>0){if(q<<16>>16<31){r=r>>p;x=135;}else{r=0;x=137;}}else{u=0-p<<16>>16;x=r<>u|0)==(r|0)?x:r>>31^2147483647;x=135;}if((x|0)==135){x=0;if((r|0)<0)r=~((r^-4)>>2);else x=137;}if((x|0)==137){x=0;r=r>>>2;}r=r&65535;do if(Y?(db=b[I>>1]|0,db<<16>>16>5):0){if(b[H>>1]|0){if((b[h>>1]|0)<4){if(da){if(!(Ja|(b[aa>>1]|0)!=0))x=145;}else if(!Ja)x=145;if((x|0)==145?(b[U>>1]|0)==0:0){x=147;break;}ob(pb,r,ea,db,b[U>>1]|0,za,Ta)|0;x=147;}else x=147;}else x=151;}else x=147;while(0);do if((x|0)==147){x=0;if(b[H>>1]|0){if(!Ja?(b[U>>1]|0)==0:0){x=151;break;}if((b[h>>1]|0)>=4)x=151;}else x=151;}while(0);if((x|0)==151){x=0;b[ea>>1]=b[sa>>1]|0;b[sa>>1]=b[ta>>1]|0;b[ta>>1]=b[ua>>1]|0;b[ua>>1]=b[va>>1]|0;b[va>>1]=b[wa>>1]|0;b[wa>>1]=b[xa>>1]|0;b[xa>>1]=b[ya>>1]|0;b[ya>>1]=b[fa>>1]|0;b[fa>>1]=r;}if(v){r=0;do{v=rb+(r<<1)|0;b[v>>1]=Rd(b[v>>1]|0,b[pb+(r<<1)>>1]|0,Ta)|0;r=r+1|0;}while((r|0)!=40);Da(pb,rb,40,Ta);c[Ta>>2]=0;He(k,rb,j+(y<<1)|0,40,ga,0);}else{c[Ta>>2]=0;He(k,pb,j+(y<<1)|0,40,ga,0);}if(!(c[Ta>>2]|0))Pe(ga|0,j+(y+30<<1)|0,20)|0;else{p=193;while(1){q=d+(p<<1)|0;v=b[q>>1]|0;r=v<<16>>16;if(v<<16>>16<0)r=~((r^-4)>>2);else r=r>>>2;b[q>>1]=r;if((p|0)>0)p=p+-1|0;else{p=39;break;}}while(1){q=pb+(p<<1)|0;v=b[q>>1]|0;r=v<<16>>16;if(v<<16>>16<0)r=~((r^-4)>>2);else r=r>>>2;b[q>>1]=r;if((p|0)>0)p=p+-1|0;else break;}He(k,pb,j+(y<<1)|0,40,ga,1);}Pe(d|0,ha|0,308)|0;b[E>>1]=b[eb>>1]|0;r=y+40|0;s=r&65535;if(s<<16>>16>=160)break;else{y=r<<16>>16;k=k+22|0;t=w;}}b[H>>1]=Ka(d+484|0,d+466|0,j,I,Ta)|0;gb(Ua,Fa,j,Ta);b[U>>1]=La;b[aa>>1]=l;sb(d+626|0,Fa,Ta);Ab=Ea;c[Ab>>2]=Wa;i=Bb;return;}function Xa(a,d,f,g,h,j,k,l,m){a=a|0;d=d|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;l=l|0;m=m|0;var n=0,o=0,p=0,q=0,r=0;r=i;i=i+16|0;p=r+2|0;q=r;f=f<<16>>16;f=(f<<18>>18|0)==(f|0)?f<<2:f>>>15^32767;switch(d|0){case 3:case 4:case 6:{o=f<<16>>16;f=c[l+84>>2]|0;b[j>>1]=b[f+(o<<1)>>1]|0;l=b[f+(o+1<<1)>>1]|0;n=b[f+(o+3<<1)>>1]|0;j=b[f+(o+2<<1)>>1]|0;break;}case 0:{l=(f&65535)+(h<<16>>16<<1^2)|0;l=(l&65535)<<16>>16>1022?1022:l<<16>>16;b[j>>1]=b[782+(l<<1)>>1]|0;j=b[782+(l+1<<1)>>1]|0;de(j<<16>>16,q,p,m);b[q>>1]=(e[q>>1]|0)+65524;l=Ee(b[p>>1]|0,5,m)|0;o=b[q>>1]|0;o=Rd(l,((o<<26>>26|0)==(o|0)?o<<10:o>>>15^32767)&65535,m)|0;l=b[p>>1]|0;f=b[q>>1]|0;if((f*24660|0)==1073741824){c[m>>2]=1;h=2147483647;}else h=f*49320|0;n=(l<<16>>16)*24660>>15;f=h+(n<<1)|0;if((h^n|0)>0&(f^h|0)<0){c[m>>2]=1;f=(h>>>31)+2147483647|0;}n=f<<13;l=j;n=Ce((n>>13|0)==(f|0)?n:f>>31^2147483647,m)|0;j=o;break;}default:{o=f<<16>>16;f=c[l+80>>2]|0;b[j>>1]=b[f+(o<<1)>>1]|0;l=b[f+(o+1<<1)>>1]|0;n=b[f+(o+3<<1)>>1]|0;j=b[f+(o+2<<1)>>1]|0;}}Vd(a,d,g,q,p,0,0,m);h=Z((re(14,b[p>>1]|0,m)|0)<<16>>16,l<<16>>16)|0;if((h|0)==1073741824){c[m>>2]=1;f=2147483647;}else f=h<<1;l=10-(e[q>>1]|0)|0;h=l&65535;l=l<<16>>16;if(h<<16>>16>0){q=h<<16>>16<31?f>>l:0;q=q>>>16;q=q&65535;b[k>>1]=q;Wd(a,j,n);i=r;return;}else{m=0-l<<16>>16;q=f<>m|0)==(f|0)?q:f>>31^2147483647;q=q>>>16;q=q&65535;b[k>>1]=q;Wd(a,j,n);i=r;return;}}function Ya(a,d,e,f,g,h,i,j,k){a=a|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;if(!(f<<16>>16)){j=a<<16>>16;if(a<<16>>16>=197){b[h>>1]=j+65424;b[i>>1]=0;return;}g=((j<<16)+131072>>16)*10923>>15;if((g|0)>32767){c[k>>2]=1;g=32767;}a=(g&65535)+19|0;b[h>>1]=a;b[i>>1]=j+58-((a*196608|0)>>>16);return;}if(!(j<<16>>16)){k=a<<16>>16<<16;a=((k+131072>>16)*21846|0)+-65536>>16;b[h>>1]=a+(d&65535);b[i>>1]=((k+-131072|0)>>>16)-((a*196608|0)>>>16);return;}if((Ge(g,d,k)|0)<<16>>16>5)g=(d&65535)+5&65535;j=e<<16>>16;j=(j-(g&65535)&65535)<<16>>16>4?j+65532&65535:g;g=a<<16>>16;if(a<<16>>16<4){b[h>>1]=((((j&65535)<<16)+-327680|0)>>>16)+g;b[i>>1]=0;return;}g=g<<16;if(a<<16>>16<12){k=(((g+-327680>>16)*10923|0)>>>15<<16)+-65536|0;a=k>>16;b[h>>1]=(j&65535)+a;b[i>>1]=((g+-589824|0)>>>16)-(k>>>15)-a;return;}else{b[h>>1]=((g+-786432+((j&65535)<<16)|0)>>>16)+1;b[i>>1]=0;return;}}function Za(a,c,d,f,g,h,i){a=a|0;c=c|0;d=d|0;f=f|0;g=g|0;h=h|0;i=i|0;if(f<<16>>16){i=(e[g>>1]|0)+65531|0;i=(i<<16>>16|0)<(c<<16>>16|0)?c:i&65535;d=d<<16>>16;c=a<<16>>16<<16;a=((c+327680>>16)*10924|0)+-65536>>16;b[g>>1]=(((((i&65535)<<16)+589824>>16|0)>(d|0)?d+65527&65535:i)&65535)+a;b[h>>1]=((c+-196608|0)>>>16)-((a*393216|0)>>>16);return;}f=a<<16>>16;if(a<<16>>16<463){a=((((f<<16)+327680>>16)*10924|0)>>>16)+17|0;b[g>>1]=a;b[h>>1]=f+105-((a*393216|0)>>>16);return;}else{b[g>>1]=f+65168;b[h>>1]=0;return;}}function _a(a,d,e,f,g,h,j){a=a|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;var k=0,l=0,m=0,n=0;n=i;i=i+16|0;l=n+6|0;k=n+4|0;Vd(a,d,f,l,k,n+2|0,n,j);m=(e&31)*3|0;f=g+(m<<1)|0;if(!((Ge(d&65535,7,j)|0)<<16>>16)){l=re(b[l>>1]|0,b[k>>1]|0,j)|0;k=l<<16>>16;k=(Z(((l<<20>>20|0)==(k|0)?l<<4:k>>>15^32767)<<16>>16,b[f>>1]|0)|0)>>15;if((k|0)>32767){c[j>>2]=1;k=32767;}f=k<<16;e=f>>16;if((k<<17>>17|0)==(e|0))k=f>>15;else k=e>>>15^32767;}else{e=re(14,b[k>>1]|0,j)|0;e=Z(e<<16>>16,b[f>>1]|0)|0;if((e|0)==1073741824){c[j>>2]=1;f=2147483647;}else f=e<<1;e=Ge(9,b[l>>1]|0,j)|0;k=e<<16>>16;if(e<<16>>16>0)k=e<<16>>16<31?f>>k:0;else{j=0-k<<16>>16;k=f<>j|0)==(f|0)?k:f>>31^2147483647;}k=k>>>16;}b[h>>1]=k;Wd(a,b[g+(m+1<<1)>>1]|0,b[g+(m+2<<1)>>1]|0);i=n;return;}function $a(a,c,d){a=a|0;c=c|0;d=d|0;c=b[d+(c<<16>>16<<1)>>1]|0;if((a|0)!=7){a=c;return a|0;}a=c&65532;return a|0;}function ab(d,e,f,g,h,j,k){d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;var l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;v=i;i=i+48|0;r=v+20|0;u=v;t=c[h+44>>2]|0;s=c[h+64>>2]|0;l=c[h+4>>2]|0;q=c[h+12>>2]|0;n=c[h+20>>2]|0;m=c[h+56>>2]|0;if(!(f<<16>>16)){o=e>>>0<2;if(o){f=765;p=508;n=c[h+52>>2]|0;}else{h=(e|0)==5;f=h?1533:765;p=2044;l=h?m:l;}m=b[g>>1]|0;f=((m*196608>>16|0)>(f&65535|0)?f:m*3&65535)<<16>>16;m=b[l+(f<<1)>>1]|0;b[r>>1]=m;b[r+2>>1]=b[l+(f+1<<1)>>1]|0;b[r+4>>1]=b[l+(f+2<<1)>>1]|0;f=b[g+2>>1]|0;if(o)f=f<<16>>16<<1&65535;o=(f<<16>>16)*196608|0;o=(o|0)>100466688?1533:o>>16;b[r+6>>1]=b[q+(o<<1)>>1]|0;b[r+8>>1]=b[q+(o+1<<1)>>1]|0;b[r+10>>1]=b[q+(o+2<<1)>>1]|0;g=b[g+4>>1]|0;g=((g<<18>>16|0)>(p&65535|0)?p:g<<2&65535)<<16>>16;b[r+12>>1]=b[n+(g<<1)>>1]|0;b[r+14>>1]=b[n+((g|1)<<1)>>1]|0;b[r+16>>1]=b[n+((g|2)<<1)>>1]|0;b[r+18>>1]=b[n+((g|3)<<1)>>1]|0;if((e|0)==8){f=0;while(1){s=d+(f<<1)|0;b[u+(f<<1)>>1]=Rd(m,Rd(b[t+(f<<1)>>1]|0,b[s>>1]|0,k)|0,k)|0;b[s>>1]=m;f=f+1|0;if((f|0)==10)break;m=b[r+(f<<1)>>1]|0;}Ae(u,205,10,k);l=d+20|0;m=u;f=l+20|0;do{a[l>>0]=a[m>>0]|0;l=l+1|0;m=m+1|0;}while((l|0)<(f|0));me(u,j,10,k);i=v;return;}else l=0;do{m=d+(l<<1)|0;f=(Z(b[s+(l<<1)>>1]|0,b[m>>1]|0)|0)>>15;if((f|0)>32767){c[k>>2]=1;f=32767;}g=Rd(b[t+(l<<1)>>1]|0,f&65535,k)|0;e=b[r+(l<<1)>>1]|0;b[u+(l<<1)>>1]=Rd(e,g,k)|0;b[m>>1]=e;l=l+1|0;}while((l|0)!=10);Ae(u,205,10,k);l=d+20|0;m=u;f=l+20|0;do{a[l>>0]=a[m>>0]|0;l=l+1|0;m=m+1|0;}while((l|0)<(f|0));me(u,j,10,k);i=v;return;}else{l=0;do{f=(b[d+20+(l<<1)>>1]|0)*29491>>15;if((f|0)>32767){c[k>>2]=1;f=32767;}m=(b[t+(l<<1)>>1]|0)*3277>>15;if((m|0)>32767){c[k>>2]=1;m=32767;}b[u+(l<<1)>>1]=Rd(m&65535,f&65535,k)|0;l=l+1|0;}while((l|0)!=10);if((e|0)==8){l=0;do{s=d+(l<<1)|0;r=Rd(b[t+(l<<1)>>1]|0,b[s>>1]|0,k)|0;b[s>>1]=Ge(b[u+(l<<1)>>1]|0,r,k)|0;l=l+1|0;}while((l|0)!=10);Ae(u,205,10,k);l=d+20|0;m=u;f=l+20|0;do{a[l>>0]=a[m>>0]|0;l=l+1|0;m=m+1|0;}while((l|0)<(f|0));me(u,j,10,k);i=v;return;}else l=0;do{m=d+(l<<1)|0;f=(Z(b[s+(l<<1)>>1]|0,b[m>>1]|0)|0)>>15;if((f|0)>32767){c[k>>2]=1;f=32767;}r=Rd(b[t+(l<<1)>>1]|0,f&65535,k)|0;b[m>>1]=Ge(b[u+(l<<1)>>1]|0,r,k)|0;l=l+1|0;}while((l|0)!=10);Ae(u,205,10,k);l=d+20|0;m=u;f=l+20|0;do{a[l>>0]=a[m>>0]|0;l=l+1|0;m=m+1|0;}while((l|0)<(f|0));me(u,j,10,k);i=v;return;}}function bb(a,b,c){a=a|0;b=b|0;c=c|0;Pe(a|0,c+((b<<16>>16)*10<<1)|0,20)|0;return;}function cb(d,e,f,g,h,j,k){d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;var l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;v=i;i=i+80|0;q=v+60|0;r=v+40|0;t=v+20|0;u=v;s=c[g+48>>2]|0;n=c[g+24>>2]|0;o=c[g+28>>2]|0;p=c[g+32>>2]|0;if(e<<16>>16){l=0;do{q=s+(l<<1)|0;f=Rd(((b[q>>1]|0)*1639|0)>>>15&65535,((b[d+20+(l<<1)>>1]|0)*31128|0)>>>15&65535,k)|0;b[t+(l<<1)>>1]=f;b[u+(l<<1)>>1]=f;r=d+(l<<1)|0;b[r>>1]=Ge(f,Rd(b[q>>1]|0,((b[r>>1]|0)*21299|0)>>>15&65535,k)|0,k)|0;l=l+1|0;}while((l|0)!=10);Ae(t,205,10,k);Ae(u,205,10,k);l=d+20|0;g=u;e=l+20|0;do{a[l>>0]=a[g>>0]|0;l=l+1|0;g=g+1|0;}while((l|0)<(e|0));me(t,h,10,k);me(u,j,10,k);i=v;return;}e=c[g+16>>2]|0;g=c[g+8>>2]|0;m=b[f>>1]|0;m=((m<<18>>18|0)==(m|0)?m<<2:m>>>15^32767)<<16>>16;b[q>>1]=b[g+(m<<1)>>1]|0;b[q+2>>1]=b[g+(m+1<<1)>>1]|0;b[r>>1]=b[g+(m+2<<1)>>1]|0;b[r+2>>1]=b[g+(m+3<<1)>>1]|0;m=b[f+2>>1]|0;m=((m<<18>>18|0)==(m|0)?m<<2:m>>>15^32767)<<16>>16;b[q+4>>1]=b[e+(m<<1)>>1]|0;b[q+6>>1]=b[e+(m+1<<1)>>1]|0;b[r+4>>1]=b[e+(m+2<<1)>>1]|0;b[r+6>>1]=b[e+(m+3<<1)>>1]|0;m=b[f+4>>1]|0;g=m<<16>>16;if(m<<16>>16<0)e=~((g^-2)>>1);else e=g>>>1;m=e<<16>>16;m=((e<<18>>18|0)==(m|0)?e<<2:m>>>15^32767)<<16>>16;l=n+(m+1<<1)|0;e=b[n+(m<<1)>>1]|0;if(!(g&1)){b[q+8>>1]=e;b[q+10>>1]=b[l>>1]|0;b[r+8>>1]=b[n+(m+2<<1)>>1]|0;b[r+10>>1]=b[n+(m+3<<1)>>1]|0;}else{if(e<<16>>16==-32768)e=32767;else e=0-(e&65535)&65535;b[q+8>>1]=e;e=b[l>>1]|0;if(e<<16>>16==-32768)e=32767;else e=0-(e&65535)&65535;b[q+10>>1]=e;e=b[n+(m+2<<1)>>1]|0;if(e<<16>>16==-32768)e=32767;else e=0-(e&65535)&65535;b[r+8>>1]=e;e=b[n+(m+3<<1)>>1]|0;if(e<<16>>16==-32768)e=32767;else e=0-(e&65535)&65535;b[r+10>>1]=e;}l=b[f+6>>1]|0;l=((l<<18>>18|0)==(l|0)?l<<2:l>>>15^32767)<<16>>16;b[q+12>>1]=b[o+(l<<1)>>1]|0;b[q+14>>1]=b[o+(l+1<<1)>>1]|0;b[r+12>>1]=b[o+(l+2<<1)>>1]|0;b[r+14>>1]=b[o+(l+3<<1)>>1]|0;l=b[f+8>>1]|0;l=((l<<18>>18|0)==(l|0)?l<<2:l>>>15^32767)<<16>>16;b[q+16>>1]=b[p+(l<<1)>>1]|0;b[q+18>>1]=b[p+(l+1<<1)>>1]|0;b[r+16>>1]=b[p+(l+2<<1)>>1]|0;b[r+18>>1]=b[p+(l+3<<1)>>1]|0;l=0;do{g=d+(l<<1)|0;e=(b[g>>1]|0)*21299>>15;if((e|0)>32767){c[k>>2]=1;e=32767;}p=Rd(b[s+(l<<1)>>1]|0,e&65535,k)|0;b[t+(l<<1)>>1]=Rd(b[q+(l<<1)>>1]|0,p,k)|0;f=b[r+(l<<1)>>1]|0;b[u+(l<<1)>>1]=Rd(f,p,k)|0;b[g>>1]=f;l=l+1|0;}while((l|0)!=10);Ae(t,205,10,k);Ae(u,205,10,k);l=d+20|0;g=u;e=l+20|0;do{a[l>>0]=a[g>>0]|0;l=l+1|0;g=g+1|0;}while((l|0)<(e|0));me(t,h,10,k);me(u,j,10,k);i=v;return;}function db(a,c){a=a|0;c=c|0;var d=0,e=0;if(!a){e=-1;return e|0;}d=a;e=d+20|0;do{b[d>>1]=0;d=d+2|0;}while((d|0)<(e|0));Pe(a+20|0,c|0,20)|0;e=0;return e|0;}function eb(d){d=d|0;var e=0,f=0,g=0,h=0,i=0;if(!d){i=-1;return i|0;}b[d>>1]=0;b[d+2>>1]=8192;e=d+4|0;b[e>>1]=3500;b[d+6>>1]=3500;c[d+8>>2]=1887529304;b[d+12>>1]=3e4;b[d+14>>1]=26e3;b[d+16>>1]=21e3;b[d+18>>1]=15e3;b[d+20>>1]=8e3;b[d+22>>1]=0;b[d+24>>1]=-8e3;b[d+26>>1]=-15e3;b[d+28>>1]=-21e3;b[d+30>>1]=-26e3;b[d+32>>1]=3e4;b[d+34>>1]=26e3;b[d+36>>1]=21e3;b[d+38>>1]=15e3;b[d+40>>1]=8e3;b[d+42>>1]=0;b[d+44>>1]=-8e3;b[d+46>>1]=-15e3;b[d+48>>1]=-21e3;b[d+50>>1]=-26e3;b[d+212>>1]=0;b[d+374>>1]=0;b[d+392>>1]=0;f=d+52|0;b[f>>1]=1384;b[d+54>>1]=2077;b[d+56>>1]=3420;b[d+58>>1]=5108;b[d+60>>1]=6742;b[d+62>>1]=8122;b[d+64>>1]=9863;b[d+66>>1]=11092;b[d+68>>1]=12714;b[d+70>>1]=13701;g=d+72|0;h=f;i=g+20|0;do{a[g>>0]=a[h>>0]|0;g=g+1|0;h=h+1|0;}while((g|0)<(i|0));g=d+92|0;h=f;i=g+20|0;do{a[g>>0]=a[h>>0]|0;g=g+1|0;h=h+1|0;}while((g|0)<(i|0));g=d+112|0;h=f;i=g+20|0;do{a[g>>0]=a[h>>0]|0;g=g+1|0;h=h+1|0;}while((g|0)<(i|0));g=d+132|0;h=f;i=g+20|0;do{a[g>>0]=a[h>>0]|0;g=g+1|0;h=h+1|0;}while((g|0)<(i|0));g=d+152|0;h=f;i=g+20|0;do{a[g>>0]=a[h>>0]|0;g=g+1|0;h=h+1|0;}while((g|0)<(i|0));g=d+172|0;h=f;i=g+20|0;do{a[g>>0]=a[h>>0]|0;g=g+1|0;h=h+1|0;}while((g|0)<(i|0));g=d+192|0;h=f;i=g+20|0;do{a[g>>0]=a[h>>0]|0;g=g+1|0;h=h+1|0;}while((g|0)<(i|0));Qe(d+214|0,0,160)|0;b[d+376>>1]=3500;b[d+378>>1]=3500;i=b[e>>1]|0;b[d+380>>1]=i;b[d+382>>1]=i;b[d+384>>1]=i;b[d+386>>1]=i;b[d+388>>1]=i;b[d+390>>1]=i;b[d+394>>1]=0;b[d+396>>1]=7;b[d+398>>1]=32767;b[d+400>>1]=0;b[d+402>>1]=0;b[d+404>>1]=0;c[d+408>>2]=1;b[d+412>>1]=0;i=0;return i|0;}function fb(d,f,g,h,j,k,l,m,n,o,p,q){d=d|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;p=p|0;q=q|0;var r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,_=0;_=i;i=i+304|0;Q=_+192|0;N=_+168|0;S=_+148|0;W=_+216|0;T=_+146|0;U=_+144|0;O=_+124|0;P=_+104|0;R=_+84|0;V=_+60|0;L=_+40|0;K=_;Y=d+404|0;X=d+400|0;if((b[Y>>1]|0)!=0?(b[X>>1]|0)!=0:0){J=d+394|0;b[J>>1]=b[636+(l<<1)>>1]|0;z=b[d+212>>1]|0;y=z+10|0;Pe(d+52+(((y&65535|0)==80?0:y<<16>>16)<<1)|0,d+52+(z<<1)|0,20)|0;z=b[d+392>>1]|0;y=z+1|0;b[d+376+(((y&65535|0)==8?0:y<<16>>16)<<1)>>1]=b[d+376+(z<<1)>>1]|0;y=d+4|0;b[y>>1]=0;z=K+36|0;A=K+32|0;B=K+28|0;C=K+24|0;D=K+20|0;E=K+16|0;F=K+12|0;G=K+8|0;H=K+4|0;I=d+52|0;t=K;M=t+40|0;do{c[t>>2]=0;t=t+4|0;}while((t|0)<(M|0));s=0;r=7;while(1){M=b[d+376+(r<<1)>>1]|0;x=M<<16>>16;if(M<<16>>16<0)x=~((x^-8)>>3);else x=x>>>3;s=Rd(s,x&65535,q)|0;b[y>>1]=s;v=r*10|0;t=9;while(1){u=K+(t<<2)|0;w=c[u>>2]|0;M=b[d+52+(t+v<<1)>>1]|0;x=M+w|0;if((M^w|0)>-1&(x^w|0)<0){c[q>>2]=1;x=(w>>>31)+2147483647|0;}c[u>>2]=x;if((t|0)>0)t=t+-1|0;else break;}if((r|0)<=0)break;else r=r+-1|0;}b[L+18>>1]=(c[z>>2]|0)>>>3;b[L+16>>1]=(c[A>>2]|0)>>>3;b[L+14>>1]=(c[B>>2]|0)>>>3;b[L+12>>1]=(c[C>>2]|0)>>>3;b[L+10>>1]=(c[D>>2]|0)>>>3;b[L+8>>1]=(c[E>>2]|0)>>>3;b[L+6>>1]=(c[F>>2]|0)>>>3;b[L+4>>1]=(c[G>>2]|0)>>>3;b[L+2>>1]=(c[H>>2]|0)>>>3;b[L>>1]=(c[K>>2]|0)>>>3;me(L,d+12|0,10,q);b[y>>1]=Ge(b[y>>1]|0,b[J>>1]|0,q)|0;Oe(d+214|0,I|0,160)|0;L=9;while(1){M=b[d+214+(L+70<<1)>>1]|0;u=M<<16>>16;K=b[d+214+(L+60<<1)>>1]|0;t=(K<<16>>16)+u|0;if((K^M)<<16>>16>-1&(t^u|0)<0){c[q>>2]=1;t=(u>>>31)+2147483647|0;}M=b[d+214+(L+50<<1)>>1]|0;u=M+t|0;if((M^t|0)>-1&(u^t|0)<0){c[q>>2]=1;u=(t>>>31)+2147483647|0;}M=b[d+214+(L+40<<1)>>1]|0;t=M+u|0;if((M^u|0)>-1&(t^u|0)<0){c[q>>2]=1;t=(u>>>31)+2147483647|0;}M=b[d+214+(L+30<<1)>>1]|0;u=M+t|0;if((M^t|0)>-1&(u^t|0)<0){c[q>>2]=1;u=(t>>>31)+2147483647|0;}M=b[d+214+(L+20<<1)>>1]|0;t=M+u|0;if((M^u|0)>-1&(t^u|0)<0){c[q>>2]=1;t=(u>>>31)+2147483647|0;}M=b[d+214+(L+10<<1)>>1]|0;u=M+t|0;if((M^t|0)>-1&(u^t|0)<0){c[q>>2]=1;t=(t>>>31)+2147483647|0;}else t=u;M=b[d+214+(L<<1)>>1]|0;u=M+t|0;if((M^t|0)>-1&(u^t|0)<0){c[q>>2]=1;u=(t>>>31)+2147483647|0;}if((u|0)<0)u=~((u^-8)>>3);else u=u>>>3;x=u&65535;v=b[654+(L<<1)>>1]|0;w=7;while(1){r=d+214+((w*10|0)+L<<1)|0;u=Ge(b[r>>1]|0,x,q)|0;b[r>>1]=u;u=(Z(v,u<<16>>16)|0)>>15;if((u|0)>32767){c[q>>2]=1;u=32767;}b[r>>1]=u;s=(u&65535)-(u>>>15&1)|0;s=s<<16>>31^s;t=s&65535;if(t<<16>>16>655)t=(((s<<16>>16)+261489|0)>>>2)+655&65535;t=t<<16>>16>1310?1310:t;if(!(u&32768))u=t;else u=0-(t&65535)&65535;b[r>>1]=u;if((w|0)>0)w=w+-1|0;else break;}if((L|0)>0)L=L+-1|0;else break;}}if(b[X>>1]|0){x=d+32|0;w=d+12|0;t=x;v=w;M=t+20|0;do{a[t>>0]=a[v>>0]|0;t=t+1|0;v=v+1|0;}while((t|0)<(M|0));v=d+4|0;s=b[v>>1]|0;r=d+6|0;b[r>>1]=s;do if(b[d+402>>1]|0){t=b[d>>1]|0;b[d>>1]=0;t=t<<16>>16<32?t:32;M=t<<16>>16;u=M<<10;if((u|0)!=(M<<26>>16|0)){c[q>>2]=1;u=t<<16>>16>0?32767:-32768;}if(t<<16>>16>1)u=Td(1024,u&65535)|0;else u=16384;b[d+2>>1]=u;bb(g,b[m>>1]|0,c[n+60>>2]|0);ab(g,8,0,m+2|0,n,w,q);t=g;M=t+20|0;do{a[t>>0]=0;t=t+1|0;}while((t|0)<(M|0));s=b[m+8>>1]|0;s=s<<16>>16==0?-32768:((s+64&65535)>127?s<<16>>16>0?32767:32768:s<<16>>16<<9)+60416&65535;b[v>>1]=s;if((b[d+412>>1]|0)!=0?(c[d+408>>2]|0)!=0:0)break;t=x;v=w;M=t+20|0;do{a[t>>0]=a[v>>0]|0;t=t+1|0;v=v+1|0;}while((t|0)<(M|0));b[r>>1]=s;}while(0);t=s<<16>>16;if(s<<16>>16<0)t=~((t^-2)>>1);else t=t>>>1;t=t+56536|0;u=t<<16;if((u|0)>0)t=0;else t=(u|0)<-946077696?-14436:t&65535;b[h>>1]=t;b[h+2>>1]=t;b[h+4>>1]=t;b[h+6>>1]=t;m=((t<<16>>16)*5443|0)>>>15&65535;b[h+8>>1]=m;b[h+10>>1]=m;b[h+12>>1]=m;b[h+14>>1]=m;}t=((b[636+(l<<1)>>1]|0)*104864|0)>>>15<<16;if((t|0)<0)t=~((t>>16^-32)>>5);else t=t>>21;l=d+394|0;b[l>>1]=Rd(((b[l>>1]|0)*29491|0)>>>15&65535,t&65535,q)|0;h=(e[d>>1]<<16)+65536|0;t=h>>16;n=d+2|0;t=(Z(((h<<10>>26|0)==(t|0)?h>>>6:t>>>15^32767)<<16>>16,b[n>>1]|0)|0)>>15;if((t|0)>32767){c[q>>2]=1;t=32767;}s=t&65535;if(s<<16>>16<=1024){if(s<<16>>16<-2048)w=-32768;else w=t<<4&65535;}else w=16384;m=d+4|0;x=w<<16>>16;u=Z(b[m>>1]|0,x)|0;if((u|0)==1073741824){c[q>>2]=1;L=2147483647;}else L=u<<1;u=(Z(b[d+30>>1]|0,x)|0)>>15;if((u|0)>32767){c[q>>2]=1;u=32767;}y=u&65535;b[Q+18>>1]=y;u=(Z(b[d+28>>1]|0,x)|0)>>15;if((u|0)>32767){c[q>>2]=1;u=32767;}b[Q+16>>1]=u;u=(Z(b[d+26>>1]|0,x)|0)>>15;if((u|0)>32767){c[q>>2]=1;u=32767;}b[Q+14>>1]=u;u=(Z(b[d+24>>1]|0,x)|0)>>15;if((u|0)>32767){c[q>>2]=1;u=32767;}b[Q+12>>1]=u;u=(Z(b[d+22>>1]|0,x)|0)>>15;if((u|0)>32767){c[q>>2]=1;u=32767;}b[Q+10>>1]=u;u=(Z(b[d+20>>1]|0,x)|0)>>15;if((u|0)>32767){c[q>>2]=1;u=32767;}b[Q+8>>1]=u;u=(Z(b[d+18>>1]|0,x)|0)>>15;if((u|0)>32767){c[q>>2]=1;u=32767;}b[Q+6>>1]=u;u=(Z(b[d+16>>1]|0,x)|0)>>15;if((u|0)>32767){c[q>>2]=1;u=32767;}b[Q+4>>1]=u;u=(Z(b[d+14>>1]|0,x)|0)>>15;if((u|0)>32767){c[q>>2]=1;u=32767;}b[Q+2>>1]=u;u=(Z(b[d+12>>1]|0,x)|0)>>15;if((u|0)>32767){c[q>>2]=1;u=32767;}b[Q>>1]=u;h=d+6|0;x=16384-(w&65535)<<16>>16;u=Z(b[h>>1]|0,x)|0;if((u|0)!=1073741824){t=(u<<1)+L|0;if((u^L|0)>0&(t^L|0)<0){c[q>>2]=1;K=(L>>>31)+2147483647|0;}else K=t;}else{c[q>>2]=1;K=2147483647;}t=y;v=9;while(1){s=Q+(v<<1)|0;u=(Z(b[d+32+(v<<1)>>1]|0,x)|0)>>15;if((u|0)>32767){c[q>>2]=1;u=32767;}t=Rd(t,u&65535,q)|0;b[s>>1]=t;M=t<<16>>16;u=M<<1;if((u|0)!=(M<<17>>16|0)){c[q>>2]=1;u=t<<16>>16>0?32767:-32768;}b[s>>1]=u;u=v+-1|0;if((v|0)<=0)break;t=b[Q+(u<<1)>>1]|0;v=u;}L=d+374|0;u=((e[L>>1]<<16)+-161021952>>16)*9830>>15;if((u|0)>32767){c[q>>2]=1;u=32767;}u=4096-(u&65535)|0;t=u<<16;if((t|0)>268369920)x=32767;else x=(t|0)<0?0:u<<19>>16;J=d+8|0;u=Ga(J,3)|0;ne(Q,O,10,q);t=P;v=O;M=t+20|0;do{b[t>>1]=b[v>>1]|0;t=t+2|0;v=v+2|0;}while((t|0)<(M|0));t=(u<<16>>16)*10|0;v=9;while(1){s=P+(v<<1)|0;r=b[s>>1]|0;u=(Z(b[d+214+(v+t<<1)>>1]|0,x)|0)>>15;if((u|0)>32767){c[q>>2]=1;u=32767;}b[s>>1]=Rd(r,u&65535,q)|0;if((v|0)>0)v=v+-1|0;else break;}Ae(O,205,10,q);Ae(P,205,10,q);t=g+20|0;v=O;M=t+20|0;do{a[t>>0]=a[v>>0]|0;t=t+1|0;v=v+1|0;}while((t|0)<(M|0));me(O,Q,10,q);me(P,R,10,q);he(Q,N,q);he(R,V,q);t=p;v=N;M=t+22|0;do{a[t>>0]=a[v>>0]|0;t=t+1|0;v=v+1|0;}while((t|0)<(M|0));t=p+22|0;v=N;M=t+22|0;do{a[t>>0]=a[v>>0]|0;t=t+1|0;v=v+1|0;}while((t|0)<(M|0));t=p+44|0;v=N;M=t+22|0;do{a[t>>0]=a[v>>0]|0;t=t+1|0;v=v+1|0;}while((t|0)<(M|0));t=p+66|0;v=N;M=t+22|0;do{a[t>>0]=a[v>>0]|0;t=t+1|0;v=v+1|0;}while((t|0)<(M|0));Fa(N+2|0,S,q);u=0;t=32767;do{s=b[S+(u<<1)>>1]|0;s=Z(s,s)|0;if(s>>>0<1073741824)s=32767-(s>>>15)|0;else{c[q>>2]=1;s=0;}t=(Z(s<<16>>16,t<<16>>16)|0)>>15;if((t|0)>32767){c[q>>2]=1;t=32767;}u=u+1|0;}while((u|0)!=10);de(t<<16>>16,T,U,q);t=(e[T>>1]<<16)+-983040|0;s=t>>16;s=De(Ge(0,Rd(((t<<12>>28|0)==(s|0)?t>>>4:s>>>15^32767)&65535,De(b[U>>1]|0,3,q)|0,q)|0,q)|0,1,q)|0;t=(b[L>>1]|0)*29491>>15;if((t|0)>32767){c[q>>2]=1;t=32767;}u=s<<16>>16;s=u*3277>>15;if((s|0)>32767){c[q>>2]=1;s=32767;}b[L>>1]=Rd(t&65535,s&65535,q)|0;s=K>>10;r=s+262144|0;if((s|0)>-1&(r^s|0)<0){c[q>>2]=1;r=(s>>>31)+2147483647|0;}U=u<<4;s=r-U|0;if(((s^r)&(r^U)|0)<0){c[q>>2]=1;r=(r>>>31)+2147483647|0;}else r=s;U=b[l>>1]<<5;s=U+r|0;if((U^r|0)>-1&(s^r|0)<0){c[q>>2]=1;s=(r>>>31)+2147483647|0;}u=(re(s>>>16&65535,s>>>1&32767,q)|0)<<16>>16;Ha(J,W,q);r=39;while(1){t=W+(r<<1)|0;s=(Z(b[t>>1]|0,u)|0)>>15;if((s|0)>32767){c[q>>2]=1;s=32767;}b[t>>1]=s;if((r|0)>0)r=r+-1|0;else break;}He(V,W,o,40,f,1);Ha(J,W,q);r=39;while(1){t=W+(r<<1)|0;s=(Z(b[t>>1]|0,u)|0)>>15;if((s|0)>32767){c[q>>2]=1;s=32767;}b[t>>1]=s;if((r|0)>0)r=r+-1|0;else break;}He(V,W,o+80|0,40,f,1);Ha(J,W,q);r=39;while(1){t=W+(r<<1)|0;s=(Z(b[t>>1]|0,u)|0)>>15;if((s|0)>32767){c[q>>2]=1;s=32767;}b[t>>1]=s;if((r|0)>0)r=r+-1|0;else break;}He(V,W,o+160|0,40,f,1);Ha(J,W,q);t=39;while(1){r=W+(t<<1)|0;s=(Z(b[r>>1]|0,u)|0)>>15;if((s|0)>32767){c[q>>2]=1;s=32767;}b[r>>1]=s;if((t|0)>0)t=t+-1|0;else break;}He(V,W,o+240|0,40,f,1);b[j+14>>1]=20;b[j+16>>1]=0;if((k|0)==2){s=b[d>>1]|0;s=s<<16>>16>32?32:s<<16>>16<1?8:s;o=s<<16>>16;r=o<<10;if((r|0)!=(o<<26>>16|0)){c[q>>2]=1;r=s<<16>>16>0?32767:-32768;}b[n>>1]=Td(1024,r&65535)|0;b[d>>1]=0;t=d+32|0;v=d+12|0;M=t+20|0;do{a[t>>0]=a[v>>0]|0;t=t+1|0;v=v+1|0;}while((t|0)<(M|0));q=b[m>>1]|0;b[h>>1]=q;b[m>>1]=(q&65535)+65280;}if(!(b[X>>1]|0)){i=_;return;}do if(!(b[d+402>>1]|0)){if(b[Y>>1]|0)break;i=_;return;}while(0);b[d>>1]=0;b[d+412>>1]=1;i=_;return;}function gb(a,d,f,g){a=a|0;d=d|0;f=f|0;g=g|0;var h=0,j=0,k=0,l=0,m=0,n=0;m=i;i=i+16|0;k=m+2|0;l=m;b[l>>1]=0;j=a+212|0;h=(e[j>>1]|0)+10|0;h=(h&65535|0)==80?0:h&65535;b[j>>1]=h;Pe(a+52+(h<<16>>16<<1)|0,d|0,20)|0;h=0;j=159;while(1){n=b[f+(j<<1)>>1]|0;n=Z(n,n)|0;n=(n|0)==1073741824?2147483647:n<<1;d=n+h|0;if((n^h|0)>-1&(d^h|0)<0){c[g>>2]=1;h=(h>>>31)+2147483647|0;}else h=d;if((j|0)>0)j=j+-1|0;else break;}de(h,k,l,g);h=b[k>>1]|0;n=h<<16>>16;d=n<<10;if((d|0)!=(n<<26>>16|0)){c[g>>2]=1;d=h<<16>>16>0?32767:-32768;}b[k>>1]=d;n=b[l>>1]|0;h=n<<16>>16;if(n<<16>>16<0)h=~((h^-32)>>5);else h=h>>>5;l=a+392|0;n=(e[l>>1]|0)+1|0;n=(n&65535|0)==8?0:n&65535;b[l>>1]=n;b[a+376+(n<<16>>16<<1)>>1]=h+57015+d;i=m;return;}function hb(a,d,f){a=a|0;d=d|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;l=(d|0)==4;m=(d|0)==5;n=(d|0)==6;g=c[a+408>>2]|0;a:do if((d+-4|0)>>>0<3)k=4;else{if((g+-1|0)>>>0<2)switch(d|0){case 2:case 3:case 7:{k=4;break a;}default:}b[a>>1]=0;j=0;}while(0);if((k|0)==4){b:do if((g|0)==2){switch(d|0){case 2:case 4:case 6:case 7:break;default:{h=1;break b;}}h=2;}else h=1;while(0);j=(e[a>>1]|0)+1&65535;b[a>>1]=j;j=(d|0)!=5&j<<16>>16>50?2:h;}i=a+398|0;if(m&(b[a+412>>1]|0)==0){b[i>>1]=0;h=0;}else h=b[i>>1]|0;h=Rd(h,1,f)|0;b[i>>1]=h;f=a+404|0;b[f>>1]=0;c:do switch(d|0){case 2:case 4:case 5:case 6:case 7:{if(!((d|0)==7&(j|0)==0)){if(h<<16>>16>30){b[f>>1]=1;b[i>>1]=0;b[a+396>>1]=0;break c;}h=a+396|0;g=b[h>>1]|0;if(!(g<<16>>16)){b[i>>1]=0;break c;}else{b[h>>1]=(g&65535)+65535;break c;}}else k=14;break;}default:k=14;}while(0);if((k|0)==14)b[a+396>>1]=7;if(!j)return j|0;h=a+400|0;b[h>>1]=0;g=a+402|0;b[g>>1]=0;if(l){b[h>>1]=1;return j|0;}if(m){b[h>>1]=1;b[g>>1]=1;return j|0;}if(!n)return j|0;b[h>>1]=1;b[f>>1]=0;return j|0;}function ib(a){a=a|0;if(!a){a=-1;return a|0;}b[a>>1]=1;b[a+2>>1]=1;b[a+4>>1]=1;b[a+6>>1]=1;b[a+8>>1]=1;b[a+10>>1]=0;b[a+12>>1]=1;a=0;return a|0;}function jb(a,d,e,f,g){a=a|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,k=0,l=0;l=i;i=i+16|0;k=l+2|0;j=l;h=Zd(a,5)|0;a=a+10|0;if((Ge(h,b[a>>1]|0,g)|0)<<16>>16>0)h=b[a>>1]|0;h=(Z(b[674+(e<<16>>16<<1)>>1]|0,h<<16>>16)|0)>>15;if((h|0)>32767){c[g>>2]=1;h=32767;}b[f>>1]=h;Xd(d,k,j,g);Wd(d,b[k>>1]|0,b[j>>1]|0);i=l;return;}function kb(a,c,d,e,f){a=a|0;c=c|0;d=d|0;e=e|0;f=f|0;if(!(c<<16>>16)){if(d<<16>>16){c=a+12|0;if((Ge(b[e>>1]|0,b[c>>1]|0,f)|0)<<16>>16>0)b[e>>1]=b[c>>1]|0;}else c=a+12|0;b[c>>1]=b[e>>1]|0;}b[a+10>>1]=b[e>>1]|0;f=a+2|0;b[a>>1]=b[f>>1]|0;d=a+4|0;b[f>>1]=b[d>>1]|0;f=a+6|0;b[d>>1]=b[f>>1]|0;a=a+8|0;b[f>>1]=b[a>>1]|0;b[a>>1]=b[e>>1]|0;return;}function lb(a,d,e,f){a=a|0;d=d|0;e=e|0;f=f|0;var g=0;g=Zd(a,5)|0;a=a+10|0;if((Ge(g,b[a>>1]|0,f)|0)<<16>>16>0)g=b[a>>1]|0;g=(Z(b[688+(d<<16>>16<<1)>>1]|0,g<<16>>16)|0)>>15;if((g|0)<=32767){f=g;f=f&65535;b[e>>1]=f;return;}c[f>>2]=1;f=32767;f=f&65535;b[e>>1]=f;return;}function mb(a){a=a|0;if(!a){a=-1;return a|0;}b[a>>1]=1640;b[a+2>>1]=1640;b[a+4>>1]=1640;b[a+6>>1]=1640;b[a+8>>1]=1640;b[a+10>>1]=0;b[a+12>>1]=16384;a=0;return a|0;}function nb(a,c,d,e,f){a=a|0;c=c|0;d=d|0;e=e|0;f=f|0;if(!(c<<16>>16)){if(d<<16>>16){c=a+12|0;if((Ge(b[e>>1]|0,b[c>>1]|0,f)|0)<<16>>16>0)b[e>>1]=b[c>>1]|0;}else c=a+12|0;b[c>>1]=b[e>>1]|0;}e=b[e>>1]|0;c=a+10|0;b[c>>1]=e;if((Ge(e,16384,f)|0)<<16>>16>0){b[c>>1]=16384;c=16384;}else c=b[c>>1]|0;f=a+2|0;b[a>>1]=b[f>>1]|0;e=a+4|0;b[f>>1]=b[e>>1]|0;f=a+6|0;b[e>>1]=b[f>>1]|0;a=a+8|0;b[f>>1]=b[a>>1]|0;b[a>>1]=c;return;}function ob(a,d,e,f,g,h,i){a=a|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,l=0;k=Zd(e,9)|0;l=b[e+16>>1]|0;j=l<<16>>16;e=(j+(b[e+14>>1]|0)|0)>>>1;e=(j|0)<(e<<16>>16|0)?l:e&65535;if(!(d<<16>>16>5?k<<16>>16>d<<16>>16:0))return 0;j=e<<16>>16;j=((j<<18>>18|0)==(j|0)?j<<2:j>>>15^32767)&65535;if(!(f<<16>>16>6&g<<16>>16==0))j=Ge(j,e,i)|0;k=k<<16>>16>j<<16>>16?j:k;l=qe(d)|0;j=l<<16>>16;if(l<<16>>16<0){e=0-j<<16;if((e|0)<983040)j=d<<16>>16>>(e>>16)&65535;else j=0;}else{e=d<<16>>16;g=e<>16>>j|0)==(e|0))j=g&65535;else j=(e>>>15^32767)&65535;}f=Z((Td(16383,j)|0)<<16>>16,k<<16>>16)|0;if((f|0)==1073741824){c[i>>2]=1;g=2147483647;}else g=f<<1;f=Ge(20,l,i)|0;j=f<<16>>16;if(f<<16>>16>0)f=f<<16>>16<31?g>>j:0;else{d=0-j<<16>>16;f=g<>d|0)==(g|0)?f:g>>31^2147483647;}f=(f|0)>32767?32767:f&65535;f=h<<16>>16!=0&f<<16>>16>3072?3072:f<<16>>16;e=0;do{g=a+(e<<1)|0;j=Z(b[g>>1]|0,f)|0;if((j|0)==1073741824){c[i>>2]=1;j=2147483647;}else j=j<<1;b[g>>1]=j>>>11;e=e+1|0;}while((e|0)!=40);return 0;}function pb(a,e,f,g){a=a|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0;h=c[g+104>>2]|0;i=c[g+96>>2]|0;if(a>>>0>=8){b[f>>1]=(d[e>>0]|0)>>>4&1;b[f+2>>1]=(d[e>>0]|0)>>>5&1;b[f+4>>1]=(d[e>>0]|0)>>>6&1;b[f+6>>1]=(d[e>>0]|0)>>>7&255;h=h+(a<<1)|0;if((b[h>>1]|0)>1){a=1;g=1;i=4;}else return;while(1){j=e+a|0;a=i|1;b[f+(i<<16>>16<<1)>>1]=d[j>>0]&1;b[f+(a<<16>>16<<1)>>1]=(d[j>>0]|0)>>>1&1;k=i|3;b[f+(a+1<<16>>16<<16>>16<<1)>>1]=(d[j>>0]|0)>>>2&1;b[f+(k<<16>>16<<1)>>1]=(d[j>>0]|0)>>>3&1;b[f+(k+1<<16>>16<<16>>16<<1)>>1]=(d[j>>0]|0)>>>4&1;b[f+(k+2<<16>>16<<16>>16<<1)>>1]=(d[j>>0]|0)>>>5&1;b[f+(k+3<<16>>16<<16>>16<<1)>>1]=(d[j>>0]|0)>>>6&1;b[f+(k+4<<16>>16<<16>>16<<1)>>1]=(d[j>>0]|0)>>>7&255;g=g+1<<16>>16;if(g<<16>>16<(b[h>>1]|0)){a=g<<16>>16;i=i+8<<16>>16;}else break;}return;}k=c[(c[g+100>>2]|0)+(a<<2)>>2]|0;b[f+(b[k>>1]<<1)>>1]=(d[e>>0]|0)>>>4&1;b[f+(b[k+2>>1]<<1)>>1]=(d[e>>0]|0)>>>5&1;b[f+(b[k+4>>1]<<1)>>1]=(d[e>>0]|0)>>>6&1;b[f+(b[k+6>>1]<<1)>>1]=(d[e>>0]|0)>>>7&255;j=h+(a<<1)|0;if((b[j>>1]|0)<=1)return;g=i+(a<<1)|0;h=1;a=1;i=4;while(1){h=e+h|0;i=i<<16>>16;if((i|0)<(b[g>>1]|0)){b[f+(b[k+(i<<1)>>1]<<1)>>1]=d[h>>0]&1;i=i+1|0;if((i|0)<(b[g>>1]|0)){b[f+(b[k+(i<<1)>>1]<<1)>>1]=(d[h>>0]|0)>>>1&1;i=i+1|0;if((i|0)<(b[g>>1]|0)){b[f+(b[k+(i<<1)>>1]<<1)>>1]=(d[h>>0]|0)>>>2&1;i=i+1|0;if((i|0)<(b[g>>1]|0)){b[f+(b[k+(i<<1)>>1]<<1)>>1]=(d[h>>0]|0)>>>3&1;i=i+1|0;if((i|0)<(b[g>>1]|0)){b[f+(b[k+(i<<1)>>1]<<1)>>1]=(d[h>>0]|0)>>>4&1;i=i+1|0;if((i|0)<(b[g>>1]|0)){b[f+(b[k+(i<<1)>>1]<<1)>>1]=(d[h>>0]|0)>>>5&1;i=i+1|0;if((i|0)<(b[g>>1]|0)){b[f+(b[k+(i<<1)>>1]<<1)>>1]=(d[h>>0]|0)>>>6&1;i=i+1|0;if((i|0)<(b[g>>1]|0)){b[f+(b[k+(i<<1)>>1]<<1)>>1]=(d[h>>0]|0)>>>7&1;i=i+1|0;}}}}}}}}a=a+1<<16>>16;if(a<<16>>16<(b[j>>1]|0))h=a<<16>>16;else break;}return;}function qb(a,c,d,e,f){a=a|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0;switch(d<<16>>16){case 0:{j=9;while(1){i=b[a+(j<<1)>>1]|0;d=i<<16>>16;if(i<<16>>16<0)d=~((d^-4)>>2);else d=d>>>2;h=b[c+(j<<1)>>1]|0;g=h<<16>>16;if(h<<16>>16<0)h=~((g^-4)>>2);else h=g>>>2;b[e+(j<<1)>>1]=Rd((i&65535)-d&65535,h&65535,f)|0;if((j|0)>0)j=j+-1|0;else break;}return;}case 40:{h=9;while(1){f=b[a+(h<<1)>>1]|0;d=f<<16>>16;if(f<<16>>16<0)g=~((d^-2)>>1);else g=d>>>1;f=b[c+(h<<1)>>1]|0;d=f<<16>>16;if(f<<16>>16<0)d=~((d^-2)>>1);else d=d>>>1;b[e+(h<<1)>>1]=d+g;if((h|0)>0)h=h+-1|0;else break;}return;}case 80:{j=9;while(1){i=b[a+(j<<1)>>1]|0;d=i<<16>>16;if(i<<16>>16<0)i=~((d^-4)>>2);else i=d>>>2;d=b[c+(j<<1)>>1]|0;g=d<<16>>16;if(d<<16>>16<0)h=~((g^-4)>>2);else h=g>>>2;b[e+(j<<1)>>1]=Rd(i&65535,(d&65535)-h&65535,f)|0;if((j|0)>0)j=j+-1|0;else break;}return;}case 120:{b[e+18>>1]=b[c+18>>1]|0;b[e+16>>1]=b[c+16>>1]|0;b[e+14>>1]=b[c+14>>1]|0;b[e+12>>1]=b[c+12>>1]|0;b[e+10>>1]=b[c+10>>1]|0;b[e+8>>1]=b[c+8>>1]|0;b[e+6>>1]=b[c+6>>1]|0;b[e+4>>1]=b[c+4>>1]|0;b[e+2>>1]=b[c+2>>1]|0;b[e>>1]=b[c>>1]|0;return;}default:return;}}function rb(a,b){a=a|0;b=b|0;if(!a){a=-1;return a|0;}Pe(a|0,b|0,20)|0;a=0;return a|0;}function sb(a,d,e){a=a|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0;l=0;do{k=a+(l<<1)|0;f=b[k>>1]|0;i=f&65535;j=i<<16;f=f<<16>>16;if((f*5243|0)==1073741824){c[e>>2]=1;h=2147483647;}else h=f*10486|0;g=j-h|0;if(((g^j)&(h^j)|0)<0){c[e>>2]=1;h=(i>>>15)+2147483647|0;}else h=g;f=b[d+(l<<1)>>1]|0;g=f*5243|0;if((g|0)!=1073741824){f=(f*10486|0)+h|0;if((g^h|0)>0&(f^h|0)<0){c[e>>2]=1;f=(h>>>31)+2147483647|0;}}else{c[e>>2]=1;f=2147483647;}b[k>>1]=Ce(f,e)|0;l=l+1|0;}while((l|0)!=10);return;}function tb(a){a=a|0;var c=0;if(!a){c=-1;return c|0;}c=a+18|0;do{b[a>>1]=0;a=a+2|0;}while((a|0)<(c|0));c=0;return c|0;}function ub(a){a=a|0;b[a+14>>1]=1;return;}function vb(a){a=a|0;b[a+14>>1]=0;return;}function wb(a,d,e,f,g,h,j,k,l,m){a=a|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;l=l|0;m=m|0;var n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0;C=i;i=i+160|0;z=C+80|0;A=C;v=c[l+120>>2]|0;w=c[l+124>>2]|0;x=c[l+128>>2]|0;u=c[l+132>>2]|0;o=a+6|0;t=a+8|0;b[t>>1]=b[o>>1]|0;r=a+4|0;b[o>>1]=b[r>>1]|0;s=a+2|0;b[r>>1]=b[s>>1]|0;b[s>>1]=b[a>>1]|0;b[a>>1]=g;l=g<<16>>16<14746?g<<16>>16>9830&1:2;n=a+12|0;g=b[n>>1]|0;p=g<<15;do if((p|0)<=536870911){if((p|0)<-536870912){c[m>>2]=1;g=-2147483648;break;}else{g=g<<17;break;}}else{c[m>>2]=1;g=2147483647;}while(0);y=f<<16>>16;q=a+16|0;if((Ce(g,m)|0)<<16>>16>=f<<16>>16){p=b[q>>1]|0;if(p<<16>>16>0){p=(p&65535)+65535&65535;b[q>>1]=p;}if(!(p<<16>>16)){g=(b[a>>1]|0)<9830;g=(b[s>>1]|0)<9830?g?2:1:g&1;if((b[r>>1]|0)<9830)g=(g&65535)+1&65535;if((b[o>>1]|0)<9830)g=(g&65535)+1&65535;if((b[t>>1]|0)<9830)g=(g&65535)+1&65535;p=0;l=g<<16>>16>2?0:l;}}else{b[q>>1]=2;p=2;}s=l<<16>>16;t=a+10|0;s=(p<<16>>16==0?(s|0)>((b[t>>1]|0)+1|0):0)?s+65535&65535:l;a=(b[a+14>>1]|0)==1?0:f<<16>>16<10?2:s<<16>>16<2&p<<16>>16>0?(s&65535)+1&65535:s;b[t>>1]=a;b[n>>1]=f;switch(d|0){case 4:case 6:case 7:break;default:if(a<<16>>16<2){p=0;l=0;o=h;n=z;while(1){if(!(b[o>>1]|0))g=0;else{l=l<<16>>16;b[A+(l<<1)>>1]=p;g=b[o>>1]|0;l=l+1&65535;}b[n>>1]=g;b[o>>1]=0;p=p+1<<16>>16;if(p<<16>>16>=40){t=l;break;}else{o=o+2|0;n=n+2|0;}}s=a<<16>>16==0;s=(d|0)==5?s?v:w:s?x:u;if(t<<16>>16>0){r=0;do{q=b[A+(r<<1)>>1]|0;l=q<<16>>16;a=b[z+(l<<1)>>1]|0;if(q<<16>>16<40){p=a<<16>>16;o=39-q&65535;n=q;l=h+(l<<1)|0;g=s;while(1){d=(Z(b[g>>1]|0,p)|0)>>>15&65535;b[l>>1]=Rd(b[l>>1]|0,d,m)|0;n=n+1<<16>>16;if(n<<16>>16>=40)break;else{l=l+2|0;g=g+2|0;}}if(q<<16>>16>0){l=s+(o+1<<1)|0;B=36;}}else{l=s;B=36;}if((B|0)==36){B=0;g=a<<16>>16;p=0;o=h;while(1){d=(Z(b[l>>1]|0,g)|0)>>>15&65535;b[o>>1]=Rd(b[o>>1]|0,d,m)|0;p=p+1<<16>>16;if(p<<16>>16>=q<<16>>16)break;else{o=o+2|0;l=l+2|0;}}}r=r+1|0;}while((r&65535)<<16>>16!=t<<16>>16);}}}r=j<<16>>16;s=y<<1;g=k<<16>>16;n=0-g<<16;l=n>>16;if(k<<16>>16>0){p=0;o=e;while(1){a=Z(b[e+(p<<1)>>1]|0,r)|0;if((a|0)==1073741824){c[m>>2]=1;n=2147483647;}else n=a<<1;k=Z(s,b[h>>1]|0)|0;a=k+n|0;if((k^n|0)>-1&(a^n|0)<0){c[m>>2]=1;a=(n>>>31)+2147483647|0;}k=a<>1]=Ce((k>>g|0)==(a|0)?k:a>>31^2147483647,m)|0;p=p+1|0;if((p|0)==40)break;else{h=h+2|0;o=o+2|0;}}i=C;return;}if((n|0)<2031616){p=0;o=e;while(1){a=Z(b[e+(p<<1)>>1]|0,r)|0;if((a|0)==1073741824){c[m>>2]=1;n=2147483647;}else n=a<<1;k=Z(s,b[h>>1]|0)|0;a=k+n|0;if((k^n|0)>-1&(a^n|0)<0){c[m>>2]=1;a=(n>>>31)+2147483647|0;}b[o>>1]=Ce(a>>l,m)|0;p=p+1|0;if((p|0)==40)break;else{h=h+2|0;o=o+2|0;}}i=C;return;}else{o=0;n=e;while(1){a=Z(b[e+(o<<1)>>1]|0,r)|0;if((a|0)==1073741824){c[m>>2]=1;a=2147483647;}else a=a<<1;k=Z(s,b[h>>1]|0)|0;if((k^a|0)>-1&(k+a^a|0)<0)c[m>>2]=1;b[n>>1]=Ce(0,m)|0;o=o+1|0;if((o|0)==40)break;else{h=h+2|0;n=n+2|0;}}i=C;return;}}function xb(a){a=a|0;if(!a){a=-1;return a|0;}b[a>>1]=0;b[a+2>>1]=0;b[a+4>>1]=0;b[a+6>>1]=0;b[a+8>>1]=0;b[a+10>>1]=0;a=0;return a|0;}function yb(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;if(d<<16>>16<=0)return;f=a+10|0;j=a+8|0;l=a+4|0;m=a+6|0;n=a+2|0;g=b[l>>1]|0;h=b[m>>1]|0;i=b[a>>1]|0;k=b[n>>1]|0;o=0;while(1){p=b[f>>1]|0;q=b[j>>1]|0;b[f>>1]=q;r=b[c>>1]|0;b[j>>1]=r;p=((r<<16>>16)*7699|0)+((Z(i<<16>>16,-7667)|0)+(((g<<16>>16)*15836|0)+((h<<16>>16)*15836>>15))+((Z(k<<16>>16,-7667)|0)>>15))+(Z(q<<16>>16,-15398)|0)+((p<<16>>16)*7699|0)|0;q=p<<3;p=(q>>3|0)==(p|0)?q:p>>31^2147483647;q=p<<1;b[c>>1]=Ce((q>>1|0)==(p|0)?q:p>>31^2147483647,e)|0;i=b[l>>1]|0;b[a>>1]=i;k=b[m>>1]|0;b[n>>1]=k;g=p>>>16&65535;b[l>>1]=g;h=(p>>>1)-(p>>16<<15)&65535;b[m>>1]=h;o=o+1<<16>>16;if(o<<16>>16>=d<<16>>16)break;else c=c+2|0;}return;}function zb(a){a=a|0;if(!a)a=-1;else{b[a>>1]=0;a=0;}return a|0;}function Ab(a,d,e,f,g){a=a|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0;j=f<<16>>16;h=d+(j+-1<<1)|0;j=j+-2|0;k=b[h>>1]|0;if(f<<16>>16<2)f=e<<16>>16;else{f=e<<16>>16;i=0;d=d+(j<<1)|0;while(1){e=(Z(b[d>>1]|0,f)|0)>>15;if((e|0)>32767){c[g>>2]=1;e=32767;}b[h>>1]=Ge(b[h>>1]|0,e&65535,g)|0;h=h+-2|0;i=i+1<<16>>16;if((i<<16>>16|0)>(j|0))break;else d=d+-2|0;}}f=(Z(b[a>>1]|0,f)|0)>>15;if((f|0)<=32767){j=f;j=j&65535;i=b[h>>1]|0;g=Ge(i,j,g)|0;b[h>>1]=g;b[a>>1]=k;return;}c[g>>2]=1;j=32767;j=j&65535;i=b[h>>1]|0;g=Ge(i,j,g)|0;b[h>>1]=g;b[a>>1]=k;return;}function Bb(a){a=a|0;var c=0,d=0,e=0;if(!a){e=-1;return e|0;}Qe(a+104|0,0,340)|0;c=a+102|0;d=a;e=d+100|0;do{b[d>>1]=0;d=d+2|0;}while((d|0)<(e|0));Ba(c)|0;zb(a+100|0)|0;e=0;return e|0;}function Cb(d,e,f,g,h){d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;w=i;i=i+96|0;s=w+22|0;t=w;u=w+44|0;Pe(d+124|0,f|0,320)|0;o=u+22|0;p=d+100|0;q=d+80|0;r=d+102|0;if((e&-2|0)==6){n=0;while(1){Ie(g,702,s);Ie(g,722,t);m=d+104+(n+10<<1)|0;Be(s,m,d,40);k=u;j=s;e=k+22|0;do{b[k>>1]=b[j>>1]|0;k=k+2|0;j=j+2|0;}while((k|0)<(e|0));k=o;e=k+22|0;do{b[k>>1]=0;k=k+2|0;}while((k|0)<(e|0));He(t,u,u,22,o,0);e=0;k=21;do{j=b[u+(k<<16>>16<<1)>>1]|0;j=Z(j,j)|0;if((j|0)==1073741824){v=7;break;}l=j<<1;j=l+e|0;if((l^e|0)>-1&(j^e|0)<0){c[h>>2]=1;e=(e>>>31)+2147483647|0;}else e=j;k=k+-1<<16>>16;}while(k<<16>>16>-1);if((v|0)==7){v=0;c[h>>2]=1;}l=e>>>16&65535;j=20;e=0;k=20;while(1){j=Z(b[u+(j+1<<1)>>1]|0,b[u+(j<<1)>>1]|0)|0;if((j|0)==1073741824){v=13;break;}x=j<<1;j=x+e|0;if((x^e|0)>-1&(j^e|0)<0){c[h>>2]=1;e=(e>>>31)+2147483647|0;}else e=j;j=(k&65535)+-1<<16>>16;if(j<<16>>16>-1){j=j<<16>>16;k=k+-1|0;}else break;}if((v|0)==13){v=0;c[h>>2]=1;}e=e>>16;if((e|0)<1)e=0;else e=Td((e*26214|0)>>>15&65535,l)|0;Ab(p,d,e,40,h);e=f+(n<<1)|0;He(t,d,e,40,q,1);Ca(r,m,e,29491,40,h);e=(n<<16)+2621440|0;if((e|0)<10485760){n=e>>16;g=g+22|0;}else break;}k=d+104|0;j=d+424|0;e=k+20|0;do{a[k>>0]=a[j>>0]|0;k=k+1|0;j=j+1|0;}while((k|0)<(e|0));i=w;return;}else{n=0;while(1){Ie(g,742,s);Ie(g,762,t);m=d+104+(n+10<<1)|0;Be(s,m,d,40);k=u;j=s;e=k+22|0;do{b[k>>1]=b[j>>1]|0;k=k+2|0;j=j+2|0;}while((k|0)<(e|0));k=o;e=k+22|0;do{b[k>>1]=0;k=k+2|0;}while((k|0)<(e|0));He(t,u,u,22,o,0);e=0;k=21;do{j=b[u+(k<<16>>16<<1)>>1]|0;j=Z(j,j)|0;if((j|0)==1073741824){v=22;break;}x=j<<1;j=x+e|0;if((x^e|0)>-1&(j^e|0)<0){c[h>>2]=1;e=(e>>>31)+2147483647|0;}else e=j;k=k+-1<<16>>16;}while(k<<16>>16>-1);if((v|0)==22){v=0;c[h>>2]=1;}l=e>>>16&65535;j=20;e=0;k=20;while(1){j=Z(b[u+(j+1<<1)>>1]|0,b[u+(j<<1)>>1]|0)|0;if((j|0)==1073741824){v=28;break;}x=j<<1;j=x+e|0;if((x^e|0)>-1&(j^e|0)<0){c[h>>2]=1;e=(e>>>31)+2147483647|0;}else e=j;j=(k&65535)+-1<<16>>16;if(j<<16>>16>-1){j=j<<16>>16;k=k+-1|0;}else break;}if((v|0)==28){v=0;c[h>>2]=1;}e=e>>16;if((e|0)<1)e=0;else e=Td((e*26214|0)>>>15&65535,l)|0;Ab(p,d,e,40,h);e=f+(n<<1)|0;He(t,d,e,40,q,1);Ca(r,m,e,29491,40,h);e=(n<<16)+2621440|0;if((e|0)<10485760){n=e>>16;g=g+22|0;}else break;}k=d+104|0;j=d+424|0;e=k+20|0;do{a[k>>0]=a[j>>0]|0;k=k+1|0;j=j+1|0;}while((k|0)<(e|0));i=w;return;}}function Db(a,b){a=a|0;b=b|0;var d=0,e=0;if(!a){a=-1;return a|0;}c[a>>2]=0;d=Je(1764)|0;if(!d){a=-1;return a|0;}if((Ua(d)|0)<<16>>16==0?(e=d+1748|0,(xb(e)|0)<<16>>16==0):0){Va(d,0)|0;Bb(d+1304|0)|0;xb(e)|0;c[d+1760>>2]=0;c[a>>2]=d;a=0;return a|0;}b=c[d>>2]|0;if(!b){a=-1;return a|0;}Ke(b);c[d>>2]=0;a=-1;return a|0;}function Eb(a){a=a|0;var b=0;if(!a)return;b=c[a>>2]|0;if(!b)return;Ke(b);c[a>>2]=0;return;}function Fb(a,d,f,g,h){a=a|0;d=d|0;f=f|0;g=g|0;h=h|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;v=i;i=i+208|0;u=v+88|0;t=v;s=a+1164|0;j=c[a+1256>>2]|0;if((g+-5|0)>>>0<2){r=j+16|0;if((b[r>>1]|0)>0){q=c[(c[a+1260>>2]|0)+32>>2]|0;p=0;j=0;while(1){o=q+(p<<1)|0;m=b[o>>1]|0;if(m<<16>>16>0){l=f;n=0;k=0;while(1){k=e[l>>1]|k<<1&131070;n=n+1<<16>>16;if(n<<16>>16>=m<<16>>16)break;else l=l+2|0;}k=k&65535;}else k=0;b[u+(p<<1)>>1]=k;j=j+1<<16>>16;if(j<<16>>16<(b[r>>1]|0)){f=f+(b[o>>1]<<1)|0;p=j<<16>>16;}else break;}}}else{q=j+(d<<1)|0;if((b[q>>1]|0)>0){r=c[(c[a+1260>>2]|0)+(d<<2)>>2]|0;o=0;j=0;while(1){p=r+(o<<1)|0;m=b[p>>1]|0;if(m<<16>>16>0){l=f;n=0;k=0;while(1){k=e[l>>1]|k<<1&131070;n=n+1<<16>>16;if(n<<16>>16>=m<<16>>16)break;else l=l+2|0;}k=k&65535;}else k=0;b[u+(o<<1)>>1]=k;j=j+1<<16>>16;if(j<<16>>16<(b[q>>1]|0)){f=f+(b[p>>1]<<1)|0;o=j<<16>>16;}else break;}}}Wa(a,d,u,g,h,t);Cb(a+1304|0,d,h,t,s);yb(a+1748|0,h,160,s);j=0;do{a=h+(j<<1)|0;b[a>>1]=e[a>>1]&65528;j=j+1|0;}while((j|0)!=160);i=v;return;}function Gb(a,f,g,h){a=a|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0;j=c[h+100>>2]|0;k=(e[(c[h+96>>2]|0)+(a<<1)>>1]|0)+65535|0;h=k&65535;i=h<<16>>16>-1;if(a>>>0<8){if(!i)return;j=c[j+(a<<2)>>2]|0;i=k<<16>>16;while(1){b[g+(b[j+(i<<1)>>1]<<1)>>1]=(d[f+(i>>3)>>0]|0)>>>(i&7^7)&1;h=h+-1<<16>>16;if(h<<16>>16>-1)i=h<<16>>16;else break;}return;}else{if(!i)return;i=k<<16>>16;while(1){b[g+(i<<1)>>1]=(d[f+(i>>3)>>0]|0)>>>(i&7^7)&1;h=h+-1<<16>>16;if(h<<16>>16>-1)i=h<<16>>16;else break;}return;}}function Hb(a,b,c){a=a|0;b=b|0;c=c|0;a=vd(a,c,31764)|0;return((sd(b)|0|a)<<16>>16!=0)<<31>>31|0;}function Ib(a,b){a=a|0;b=b|0;wd(a);td(b);return;}function Jb(d,f,g,h,j,k,l){d=d|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;l=l|0;var m=0,n=0,o=0,p=0,q=0;q=i;i=i+512|0;m=q+8|0;n=q+4|0;o=q;c[o>>2]=0;p=l<<16>>16==3;if(!((l&65535)<2|p&1)){if(l<<16>>16!=2){j=-1;i=q;return j|0;}xd(d,g,h,m+2|0,o);d=c[o>>2]|0;c[k>>2]=d;ud(f,d,n);f=c[n>>2]|0;b[m>>1]=f;b[m+490>>1]=(f|0)==3?-1:g&65535;a[j>>0]=f;f=1;do{m=m+1|0;a[j+f>>0]=a[m>>0]|0;f=f+1|0;}while((f|0)!=492);m=492;i=q;return m|0;}xd(d,g,h,m,o);ud(f,c[o>>2]|0,n);h=c[n>>2]|0;if((h|0)!=3){f=c[o>>2]|0;c[k>>2]=f;if((f|0)==8){switch(h|0){case 1:{b[m+70>>1]=0;break;}case 2:{o=m+70|0;b[o>>1]=e[o>>1]|0|1;break;}default:}b[m+72>>1]=g&1;b[m+74>>1]=g>>>1&1;b[m+76>>1]=g>>>2&1;f=8;}}else{c[k>>2]=15;f=15;}if(p){tc(f,m,j,(c[d+4>>2]|0)+2392|0);j=b[3404+(c[k>>2]<<16>>16<<1)>>1]|0;i=q;return j|0;}switch(l<<16>>16){case 0:{sc(f,m,j,(c[d+4>>2]|0)+2392|0);j=b[3404+(c[k>>2]<<16>>16<<1)>>1]|0;i=q;return j|0;}case 1:{rc(f,m,j,(c[d+4>>2]|0)+2392|0);j=b[3436+(c[k>>2]<<16>>16<<1)>>1]|0;i=q;return j|0;}default:{j=-1;i=q;return j|0;}}return 0;}function Kb(a,c,d,e,f,g){a=a|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;y=i;i=i+480|0;x=y;g=240;l=f;k=a;j=x;h=0;while(1){w=((Z(b[l>>1]|0,b[k>>1]|0)|0)+16384|0)>>>15;b[j>>1]=w;w=w<<16;h=(Z(w>>15,w>>16)|0)+h|0;if((h|0)<0){m=4;break;}g=g+-1|0;if(!((g&65535)<<16>>16)){g=0;break;}else{l=l+2|0;k=k+2|0;j=j+2|0;}}if((m|0)==4){h=g&65535;j=240-g|0;if(!(h<<16>>16))g=0;else{l=h;k=f+(j<<1)|0;g=a+(j<<1)|0;h=x+(j<<1)|0;while(1){b[h>>1]=((Z(b[k>>1]|0,b[g>>1]|0)|0)+16384|0)>>>15;l=l+-1<<16>>16;if(!(l<<16>>16)){g=0;break;}else{k=k+2|0;g=g+2|0;h=h+2|0;}}}do{k=g&65535;g=120;j=x;h=0;while(1){w=(b[j>>1]|0)>>>2;u=j+2|0;b[j>>1]=w;w=w<<16>>16;w=Z(w,w)|0;v=(b[u>>1]|0)>>>2;b[u>>1]=v;v=v<<16>>16;h=((Z(v,v)|0)+w<<1)+h|0;g=g+-1<<16>>16;if(!(g<<16>>16))break;else j=j+4|0;}g=k+4|0;}while((h|0)<1);}w=h+1|0;v=(pe(w)|0)<<16>>16;w=w<>1]=w>>>16;b[e>>1]=(w>>>1)-(w>>16<<15);w=x+478|0;l=c<<16>>16;if(c<<16>>16<=0){x=v-g|0;x=x&65535;i=y;return x|0;}r=x+476|0;s=v+1|0;t=239-l|0;u=x+(236-l<<1)|0;c=l;d=d+(l<<1)|0;e=e+(l<<1)|0;while(1){m=Z((t>>>1)+65535&65535,-2)|0;k=x+(m+236<<1)|0;m=u+(m<<1)|0;f=240-c|0;q=f+-1|0;j=x+(q<<1)|0;a=q>>>1&65535;f=x+(f+-2<<1)|0;l=Z(b[w>>1]|0,b[j>>1]|0)|0;if(!(a<<16>>16)){m=f;k=r;}else{p=r;o=w;while(1){h=j+-4|0;n=o+-4|0;l=(Z(b[p>>1]|0,b[f>>1]|0)|0)+l|0;a=a+-1<<16>>16;l=(Z(b[n>>1]|0,b[h>>1]|0)|0)+l|0;if(!(a<<16>>16))break;else{f=j+-6|0;p=o+-6|0;j=h;o=n;}}}if(q&1)l=(Z(b[k>>1]|0,b[m>>1]|0)|0)+l|0;q=l<>1]=q>>>16;b[e>>1]=(q>>>1)-(q>>16<<15);if((c&65535)+-1<<16>>16<<16>>16>0){t=t+1|0;u=u+2|0;c=c+-1|0;d=d+-2|0;e=e+-2|0;}else break;}x=v-g|0;x=x&65535;i=y;return x|0;}function Lb(a,c,d,f,g,h,j,k){a=a|0;c=c|0;d=d|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;var l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0;E=i;i=i+3440|0;D=E+3420|0;z=E+3400|0;A=E+3224|0;C=E;x=E+3320|0;B=E+3240|0;y=E+24|0;hc(d,a,x,2,k);rd(x,c,B,A,5,z,5,k);fc(d,B,y,k);pd(10,5,5,x,y,z,A,C,k);c=f;k=c+80|0;do{b[c>>1]=0;c=c+2|0;}while((c|0)<(k|0));b[h>>1]=65535;b[h+2>>1]=65535;b[h+4>>1]=65535;b[h+6>>1]=65535;b[h+8>>1]=65535;p=0;q=C;r=D;do{a=b[q>>1]|0;q=q+2|0;l=(a*6554|0)>>>15;m=l<<16>>16;c=f+(a<<1)|0;k=b[c>>1]|0;if((b[B+(a<<1)>>1]|0)>0){b[c>>1]=k+4096;b[r>>1]=8192;n=l;}else{b[c>>1]=k+61440;b[r>>1]=-8192;n=m+8|0;}r=r+2|0;o=n&65535;c=a-(l<<2)-m<<16>>16;l=h+(c<<1)|0;k=b[l>>1]|0;a=k<<16>>16;do if(k<<16>>16>=0){m=n<<16>>16;if(!((m^a)&8)){c=h+(c+5<<1)|0;if((a|0)>(m|0)){b[c>>1]=k;b[l>>1]=o;break;}else{b[c>>1]=o;break;}}else{c=h+(c+5<<1)|0;if((a&7)>>>0>(m&7)>>>0){b[c>>1]=o;break;}else{b[c>>1]=k;b[l>>1]=o;break;}}}else b[l>>1]=o;while(0);p=p+1<<16>>16;}while(p<<16>>16<10);r=D+2|0;p=D+4|0;n=D+6|0;m=D+8|0;l=D+10|0;c=D+12|0;k=D+14|0;a=D+16|0;s=D+18|0;t=40;u=d+(0-(b[C>>1]|0)<<1)|0;v=d+(0-(b[C+2>>1]|0)<<1)|0;w=d+(0-(b[C+4>>1]|0)<<1)|0;x=d+(0-(b[C+6>>1]|0)<<1)|0;y=d+(0-(b[C+8>>1]|0)<<1)|0;z=d+(0-(b[C+10>>1]|0)<<1)|0;A=d+(0-(b[C+12>>1]|0)<<1)|0;B=d+(0-(b[C+14>>1]|0)<<1)|0;f=d+(0-(b[C+16>>1]|0)<<1)|0;q=d+(0-(b[C+18>>1]|0)<<1)|0;o=g;while(1){K=(Z(b[D>>1]|0,b[u>>1]|0)|0)>>7;J=(Z(b[r>>1]|0,b[v>>1]|0)|0)>>7;I=(Z(b[p>>1]|0,b[w>>1]|0)|0)>>7;H=(Z(b[n>>1]|0,b[x>>1]|0)|0)>>7;G=(Z(b[m>>1]|0,b[y>>1]|0)|0)>>7;F=(Z(b[l>>1]|0,b[z>>1]|0)|0)>>7;C=(Z(b[c>>1]|0,b[A>>1]|0)|0)>>7;d=(Z(b[k>>1]|0,b[B>>1]|0)|0)>>>7;g=(Z(b[a>>1]|0,b[f>>1]|0)|0)>>>7;b[o>>1]=(K+128+J+I+H+G+F+C+d+g+((Z(b[s>>1]|0,b[q>>1]|0)|0)>>>7)|0)>>>8;t=t+-1<<16>>16;if(!(t<<16>>16))break;else{u=u+2|0;v=v+2|0;w=w+2|0;x=x+2|0;y=y+2|0;z=z+2|0;A=A+2|0;B=B+2|0;f=f+2|0;q=q+2|0;o=o+2|0;}}c=0;do{k=h+(c<<1)|0;a=b[k>>1]|0;if((c|0)<5)a=(e[j+((a&7)<<1)>>1]|a&8)&65535;else a=b[j+((a&7)<<1)>>1]|0;b[k>>1]=a;c=c+1|0;}while((c|0)!=10);i=E;return;}function Mb(a,d,e,f,g,h,j,k){a=a|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;var l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0;N=i;i=i+3456|0;I=N+3448|0;G=N+3360|0;E=N+3368|0;p=N+3280|0;H=N+3200|0;F=N;K=(f&65535)<<17;M=e<<16>>16;J=e<<16>>16<40;if(J){f=K>>16;e=M;do{m=(Z(b[d+(e-M<<1)>>1]|0,f)|0)>>15;if((m|0)>32767){c[k>>2]=1;m=32767;}D=d+(e<<1)|0;b[D>>1]=Rd(b[D>>1]|0,m&65535,k)|0;e=e+1|0;}while((e&65535)<<16>>16!=40);}hc(d,a,E,1,k);qd(E,H,p,8);fc(d,H,F,k);D=G+2|0;b[G>>1]=0;b[D>>1]=1;a=1;m=0;o=1;p=0;n=-1;do{B=b[2830+(p<<1)>>1]|0;C=B<<16>>16;A=0;do{y=b[2834+(A<<1)>>1]|0;z=y<<16>>16;x=a;v=C;u=o;w=B;t=n;while(1){l=b[E+(v<<1)>>1]|0;r=b[F+(v*80|0)+(v<<1)>>1]|0;e=z;o=1;s=y;a=y;n=-1;while(1){f=Rd(l,b[E+(e<<1)>>1]|0,k)|0;f=f<<16>>16;f=(Z(f,f)|0)>>>15;q=(b[F+(v*80|0)+(e<<1)>>1]<<15)+32768+((b[F+(e*80|0)+(e<<1)>>1]|0)+r<<14)|0;if(((Z(f<<16>>16,o<<16>>16)|0)-(Z(q>>16,n<<16>>16)|0)<<1|0)>0){o=q>>>16&65535;a=s;n=f&65535;}q=e+5|0;s=q&65535;if(s<<16>>16>=40)break;else e=q<<16>>16;}if(((Z(n<<16>>16,u<<16>>16)|0)-(Z(o<<16>>16,t<<16>>16)|0)<<1|0)>0){b[G>>1]=w;b[D>>1]=a;m=w;}else{a=x;o=u;n=t;}q=v+5|0;w=q&65535;if(w<<16>>16>=40)break;else{x=a;v=q<<16>>16;u=o;t=n;}}A=A+1|0;}while((A|0)!=4);p=p+1|0;}while((p|0)!=2);r=a;s=m;f=g;e=f+80|0;do{b[f>>1]=0;f=f+2|0;}while((f|0)<(e|0));o=s;e=0;q=0;f=0;while(1){m=o<<16>>16;l=b[H+(m<<1)>>1]|0;a=(m*6554|0)>>>15;o=a<<16;p=o>>15;n=m-(p+(a<<3)<<16>>17)|0;switch(n<<16>>16|0){case 0:{p=o>>10;a=1;break;}case 1:{if(!((e&65535)<<16>>16))a=0;else{p=a<<22>>16|16;a=1;}break;}case 2:{p=a<<22>>16|32;a=1;break;}case 3:{p=a<<17>>16|1;a=0;break;}case 4:{p=a<<22>>16|48;a=1;break;}default:{p=a;a=n&65535;}}p=p&65535;n=g+(m<<1)|0;if(l<<16>>16>0){b[n>>1]=8191;b[I+(e<<1)>>1]=32767;m=a<<16>>16;if(a<<16>>16<0){m=0-m<<16;if((m|0)<983040)m=1>>>(m>>16)&65535;else m=0;}else{F=1<>16>>m|0)==1?F&65535:32767;}f=Rd(f,m,k)|0;}else{b[n>>1]=-8192;b[I+(e<<1)>>1]=-32768;}m=Rd(q,p,k)|0;e=e+1|0;if((e|0)==2){q=m;break;}o=b[G+(e<<1)>>1]|0;q=m;}b[j>>1]=f;p=I+2|0;o=b[I>>1]|0;a=0;n=d+(0-(s<<16>>16)<<1)|0;m=d+(0-(r<<16>>16)<<1)|0;do{f=Z(b[n>>1]|0,o)|0;n=n+2|0;if((f|0)!=1073741824?(L=f<<1,!((f|0)>0&(L|0)<0)):0)l=L;else{c[k>>2]=1;l=2147483647;}e=Z(b[p>>1]|0,b[m>>1]|0)|0;m=m+2|0;if((e|0)!=1073741824){f=(e<<1)+l|0;if((e^l|0)>0&(f^l|0)<0){c[k>>2]=1;f=(l>>>31)+2147483647|0;}}else{c[k>>2]=1;f=2147483647;}b[h+(a<<1)>>1]=Ce(f,k)|0;a=a+1|0;}while((a|0)!=40);if(!J){i=N;return q|0;}e=K>>16;f=M;do{l=(Z(b[g+(f-M<<1)>>1]|0,e)|0)>>15;if((l|0)>32767){c[k>>2]=1;l=32767;}h=g+(f<<1)|0;b[h>>1]=Rd(b[h>>1]|0,l&65535,k)|0;f=f+1|0;}while((f&65535)<<16>>16!=40);i=N;return q|0;}function Nb(a,d,e,f,g,h,j,k,l,m){a=a|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;l=l|0;m=m|0;var n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;x=i;i=i+3456|0;r=x+3360|0;s=x+3368|0;t=x+3280|0;u=x+3200|0;v=x;w=g<<16>>16;p=w<<1;if((p|0)==(w<<17>>16|0))q=p;else{c[m>>2]=1;q=g<<16>>16>0?32767:-32768;}w=f<<16>>16;n=f<<16>>16<40;if(n){g=q<<16>>16;o=w;do{f=e+(o<<1)|0;p=(Z(b[e+(o-w<<1)>>1]|0,g)|0)>>15;if((p|0)>32767){c[m>>2]=1;p=32767;}b[f>>1]=Rd(b[f>>1]|0,p&65535,m)|0;o=o+1|0;}while((o&65535)<<16>>16!=40);}hc(e,d,s,1,m);qd(s,u,t,8);fc(e,u,v,m);Ob(a,s,v,l,r);p=Pb(a,r,u,h,e,j,k,m)|0;if(!n){i=x;return p|0;}o=q<<16>>16;g=w;do{f=h+(g<<1)|0;n=(Z(b[h+(g-w<<1)>>1]|0,o)|0)>>15;if((n|0)>32767){c[m>>2]=1;n=32767;}b[f>>1]=Rd(b[f>>1]|0,n&65535,m)|0;g=g+1|0;}while((g&65535)<<16>>16!=40);i=x;return p|0;}function Ob(a,c,d,f,g){a=a|0;c=c|0;d=d|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;x=g+2|0;b[g>>1]=0;b[x>>1]=1;v=a<<16>>16<<1;h=1;w=0;a=-1;do{u=(w<<3)+v<<16>>16;k=b[f+(u<<1)>>1]|0;u=b[f+((u|1)<<1)>>1]|0;i=k<<16>>16;a:do if(k<<16>>16<40){t=u<<16>>16;if(u<<16>>16<40)s=h;else while(1){if((a<<16>>16|0)<(0-(h<<16>>16)|0)){b[g>>1]=k;b[x>>1]=u;j=1;a=-1;}else j=h;h=i+5|0;k=h&65535;if(k<<16>>16>=40){h=j;break a;}else{i=h<<16>>16;h=j;}}while(1){q=b[d+(i*80|0)+(i<<1)>>1]|0;p=e[c+(i<<1)>>1]|0;o=t;h=1;r=u;j=u;l=-1;while(1){n=(e[c+(o<<1)>>1]|0)+p<<16>>16;n=(Z(n,n)|0)>>>15;m=(b[d+(i*80|0)+(o<<1)>>1]<<15)+32768+((b[d+(o*80|0)+(o<<1)>>1]|0)+q<<14)|0;if(((Z(n<<16>>16,h<<16>>16)|0)-(Z(m>>16,l<<16>>16)|0)<<1|0)>0){h=m>>>16&65535;j=r;l=n&65535;}m=o+5|0;r=m&65535;if(r<<16>>16>=40)break;else o=m<<16>>16;}if(((Z(l<<16>>16,s<<16>>16)|0)-(Z(h<<16>>16,a<<16>>16)|0)<<1|0)>0){b[g>>1]=k;b[x>>1]=j;a=l;}else h=s;i=i+5|0;k=i&65535;if(k<<16>>16>=40)break;else{i=i<<16>>16;s=h;}}}while(0);w=w+1|0;}while((w|0)!=2);return;}function Pb(a,d,e,f,g,h,i,j){a=a|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0;k=f;l=k+80|0;do{b[k>>1]=0;k=k+2|0;}while((k|0)<(l|0));k=b[d>>1]|0;o=(k*6554|0)>>>15;l=o<<16>>16;n=(748250>>>((k+(Z(l,-5)|0)<<16>>16)+((a<<16>>16)*5|0)|0)&1|0)==0;m=(b[e+(k<<1)>>1]|0)>0;p=m?32767:-32768;b[f+(k<<1)>>1]=m?8191:-8192;k=d+2|0;a=b[k>>1]|0;f=f+(a<<1)|0;if((b[e+(a<<1)>>1]|0)>0){b[f>>1]=8191;e=32767;f=(m&1|2)&65535;}else{b[f>>1]=-8192;e=-32768;f=m&1;}o=((a*6554|0)>>>15<<3)+(n?o:l+64|0)&65535;b[i>>1]=f;n=0;m=g+(0-(b[d>>1]|0)<<1)|0;f=g+(0-(b[k>>1]|0)<<1)|0;do{k=Z(p,b[m>>1]|0)|0;m=m+2|0;if((k|0)==1073741824){c[j>>2]=1;a=2147483647;}else a=k<<1;l=Z(e,b[f>>1]|0)|0;f=f+2|0;if((l|0)!=1073741824){k=(l<<1)+a|0;if((l^a|0)>0&(k^a|0)<0){c[j>>2]=1;k=(a>>>31)+2147483647|0;}}else{c[j>>2]=1;k=2147483647;}b[h+(n<<1)>>1]=Ce(k,j)|0;n=n+1|0;}while((n|0)!=40);return o|0;}function Qb(a,d,f,g,h,j,k,l){a=a|0;d=d|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;l=l|0;var m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0;U=i;i=i+3440|0;M=U+3360|0;N=U+3280|0;P=U+3200|0;O=U;R=(g&65535)<<17;T=f<<16>>16;Q=f<<16>>16<40;if(Q){f=R>>16;m=T;do{g=(Z(b[d+(m-T<<1)>>1]|0,f)|0)>>15;if((g|0)>32767){c[l>>2]=1;g=32767;}L=d+(m<<1)|0;b[L>>1]=Rd(b[L>>1]|0,g&65535,l)|0;m=m+1|0;}while((m&65535)<<16>>16!=40);}hc(d,a,M,1,l);qd(M,P,N,6);fc(d,P,O,l);L=1;n=2;o=1;g=0;m=1;a=-1;p=1;while(1){K=2;s=2;while(1){H=0;I=0;J=p;G=s;while(1){if(I<<16>>16<40){C=J<<16>>16;D=J<<16>>16<40;E=G<<16>>16;F=G<<16>>16<40;A=I<<16>>16;B=I;while(1){if((b[N+(A<<1)>>1]|0)>-1){x=b[O+(A*80|0)+(A<<1)>>1]|0;if(D){y=e[M+(A<<1)>>1]|0;w=C;r=1;z=J;f=J;s=0;q=-1;while(1){u=(e[M+(w<<1)>>1]|0)+y|0;v=u<<16>>16;v=(Z(v,v)|0)>>>15;t=(b[O+(A*80|0)+(w<<1)>>1]<<15)+32768+((b[O+(w*80|0)+(w<<1)>>1]|0)+x<<14)|0;if(((Z(v<<16>>16,r<<16>>16)|0)-(Z(t>>16,q<<16>>16)|0)<<1|0)>0){r=t>>>16&65535;f=z;s=u&65535;q=v&65535;}t=w+5|0;z=t&65535;if(z<<16>>16>=40)break;else w=t<<16>>16;}}else{r=1;f=J;s=0;}if(F){y=s&65535;z=f<<16>>16;w=(r<<16>>16<<14)+32768|0;v=E;s=1;x=G;q=G;r=-1;while(1){u=(e[M+(v<<1)>>1]|0)+y<<16>>16;u=(Z(u,u)|0)>>>15;t=w+(b[O+(v*80|0)+(v<<1)>>1]<<12)+((b[O+(A*80|0)+(v<<1)>>1]|0)+(b[O+(z*80|0)+(v<<1)>>1]|0)<<13)|0;if(((Z(u<<16>>16,s<<16>>16)|0)-(Z(t>>16,r<<16>>16)|0)<<1|0)>0){s=t>>>16&65535;q=x;r=u&65535;}t=v+5|0;x=t&65535;if(x<<16>>16>=40){w=s;v=r;break;}else v=t<<16>>16;}}else{w=1;q=G;v=-1;}s=Z(v<<16>>16,m<<16>>16)|0;if((s|0)==1073741824){c[l>>2]=1;t=2147483647;}else t=s<<1;s=Z(w<<16>>16,a<<16>>16)|0;if((s|0)==1073741824){c[l>>2]=1;r=2147483647;}else r=s<<1;s=t-r|0;if(((s^t)&(r^t)|0)<0){c[l>>2]=1;s=(t>>>31)+2147483647|0;}z=(s|0)>0;n=z?q:n;o=z?f:o;g=z?B:g;m=z?w:m;a=z?v:a;}s=A+5|0;B=s&65535;if(B<<16>>16>=40)break;else A=s<<16>>16;}}H=H+1<<16>>16;if(H<<16>>16>=3)break;else{F=G;G=J;J=I;I=F;}}f=K+2|0;s=f&65535;if(s<<16>>16>=5)break;else K=f&65535;}f=L+2|0;p=f&65535;if(p<<16>>16<4)L=f&65535;else{s=n;n=o;break;}}f=h;m=f+80|0;do{b[f>>1]=0;f=f+2|0;}while((f|0)<(m|0));v=g<<16>>16;a=b[P+(v<<1)>>1]|0;g=(v*6554|0)>>>15;f=g<<16;m=v-(((f>>16)*327680|0)>>>16)|0;switch(m<<16>>16|0){case 1:{g=f>>12;break;}case 2:{g=f>>8;m=2;break;}case 3:{g=g<<20>>16|8;m=1;break;}case 4:{g=g<<24>>16|128;m=2;break;}default:}f=h+(v<<1)|0;if(a<<16>>16>0){b[f>>1]=8191;z=32767;o=65536<<(m<<16>>16)>>>16&65535;}else{b[f>>1]=-8192;z=-32768;o=0;}t=n<<16>>16;n=b[P+(t<<1)>>1]|0;f=(t*6554|0)>>>15;m=f<<16;a=t-(((m>>16)*327680|0)>>>16)|0;switch(a<<16>>16|0){case 1:{f=m>>12;break;}case 2:{f=m>>8;a=2;break;}case 3:{f=f<<20>>16|8;a=1;break;}case 4:{f=f<<24>>16|128;a=2;break;}default:}m=h+(t<<1)|0;if(n<<16>>16>0){b[m>>1]=8191;u=32767;o=(65536<<(a<<16>>16)>>>16)+(o&65535)&65535;}else{b[m>>1]=-8192;u=-32768;}p=f+g|0;r=s<<16>>16;n=b[P+(r<<1)>>1]|0;g=(r*6554|0)>>>15;f=g<<16;m=r-(((f>>16)*327680|0)>>>16)|0;switch(m<<16>>16|0){case 1:{f=f>>12;break;}case 2:{f=f>>8;m=2;break;}case 3:{f=g<<20>>16|8;m=1;break;}case 4:{f=g<<24>>16|128;m=2;break;}default:f=g;}g=h+(r<<1)|0;if(n<<16>>16>0){b[g>>1]=8191;s=32767;g=(65536<<(m<<16>>16)>>>16)+(o&65535)&65535;}else{b[g>>1]=-8192;s=-32768;g=o;}q=p+f|0;b[k>>1]=g;o=0;p=d+(0-v<<1)|0;a=d+(0-t<<1)|0;n=d+(0-r<<1)|0;do{g=Z(b[p>>1]|0,z)|0;p=p+2|0;if((g|0)!=1073741824?(S=g<<1,!((g|0)>0&(S|0)<0)):0)m=S;else{c[l>>2]=1;m=2147483647;}g=Z(b[a>>1]|0,u)|0;a=a+2|0;if((g|0)!=1073741824){f=(g<<1)+m|0;if((g^m|0)>0&(f^m|0)<0){c[l>>2]=1;f=(m>>>31)+2147483647|0;}}else{c[l>>2]=1;f=2147483647;}m=Z(b[n>>1]|0,s)|0;n=n+2|0;if((m|0)!=1073741824){g=(m<<1)+f|0;if((m^f|0)>0&(g^f|0)<0){c[l>>2]=1;g=(f>>>31)+2147483647|0;}}else{c[l>>2]=1;g=2147483647;}b[j+(o<<1)>>1]=Ce(g,l)|0;o=o+1|0;}while((o|0)!=40);g=q&65535;if(!Q){i=U;return g|0;}m=R>>16;f=T;do{a=(Z(b[h+(f-T<<1)>>1]|0,m)|0)>>15;if((a|0)>32767){c[l>>2]=1;a=32767;}j=h+(f<<1)|0;b[j>>1]=Rd(b[j>>1]|0,a&65535,l)|0;f=f+1|0;}while((f&65535)<<16>>16!=40);i=U;return g|0;}function Rb(a,d,f,g,h,j,k,l,m){a=a|0;d=d|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;l=l|0;m=m|0;var n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,_=0,$=0,aa=0,ba=0,ca=0,da=0;da=i;i=i+3456|0;_=da+3448|0;X=da+3360|0;U=da+3368|0;V=da+3280|0;Y=da+3200|0;W=da;aa=(g&65535)<<17;ca=f<<16>>16;$=f<<16>>16<40;if($){f=aa>>16;n=ca;do{g=(Z(b[d+(n-ca<<1)>>1]|0,f)|0)>>15;if((g|0)>32767){c[m>>2]=1;g=32767;}T=d+(n<<1)|0;b[T>>1]=Rd(b[T>>1]|0,g&65535,m)|0;n=n+1|0;}while((n&65535)<<16>>16!=40);}hc(d,a,U,1,m);qd(U,Y,V,4);fc(d,Y,W,m);R=X+2|0;b[X>>1]=0;S=X+4|0;b[R>>1]=1;T=X+6|0;b[S>>1]=2;b[T>>1]=3;r=3;p=2;o=1;g=0;f=1;n=-1;q=3;do{M=0;N=0;O=q;P=1;Q=2;while(1){if(N<<16>>16<40){G=P<<16>>16;H=P<<16>>16<40;I=Q<<16>>16;J=Q<<16>>16<40;K=O<<16>>16;L=O<<16>>16<40;F=N<<16>>16;E=p;C=o;B=f;D=N;while(1){if((b[V+(F<<1)>>1]|0)>-1){t=b[W+(F*80|0)+(F<<1)>>1]|0;if(H){s=e[U+(F<<1)>>1]|0;u=G;z=1;p=P;o=P;x=0;y=-1;while(1){w=(e[U+(u<<1)>>1]|0)+s|0;v=w<<16>>16;v=(Z(v,v)|0)>>>15;A=(b[W+(F*80|0)+(u<<1)>>1]<<15)+32768+((b[W+(u*80|0)+(u<<1)>>1]|0)+t<<14)|0;if(((Z(v<<16>>16,z<<16>>16)|0)-(Z(A>>16,y<<16>>16)|0)<<1|0)>0){z=A>>>16&65535;o=p;x=w&65535;y=v&65535;}A=u+5|0;p=A&65535;if(p<<16>>16>=40)break;else u=A<<16>>16;}}else{z=1;o=P;x=0;}if(J){f=x&65535;a=o<<16>>16;t=(z<<16>>16<<14)+32768|0;u=I;A=1;s=Q;p=Q;y=0;x=-1;while(1){w=(e[U+(u<<1)>>1]|0)+f|0;v=w<<16>>16;v=(Z(v,v)|0)>>>15;z=t+(b[W+(u*80|0)+(u<<1)>>1]<<12)+((b[W+(F*80|0)+(u<<1)>>1]|0)+(b[W+(a*80|0)+(u<<1)>>1]|0)<<13)|0;if(((Z(v<<16>>16,A<<16>>16)|0)-(Z(z>>16,x<<16>>16)|0)<<1|0)>0){A=z>>>16&65535;p=s;y=w&65535;x=v&65535;}z=u+5|0;s=z&65535;if(s<<16>>16>=40)break;else u=z<<16>>16;}}else{A=1;p=Q;y=0;}if(L){t=y&65535;s=p<<16>>16;a=o<<16>>16;v=(A&65535)<<16|32768;w=K;f=1;u=O;z=O;A=-1;while(1){x=(e[U+(w<<1)>>1]|0)+t<<16>>16;x=(Z(x,x)|0)>>>15;y=(b[W+(w*80|0)+(w<<1)>>1]<<12)+v+((b[W+(a*80|0)+(w<<1)>>1]|0)+(b[W+(s*80|0)+(w<<1)>>1]|0)+(b[W+(F*80|0)+(w<<1)>>1]|0)<<13)|0;if(((Z(x<<16>>16,f<<16>>16)|0)-(Z(y>>16,A<<16>>16)|0)<<1|0)>0){f=y>>>16&65535;z=u;A=x&65535;}y=w+5|0;u=y&65535;if(u<<16>>16>=40)break;else w=y<<16>>16;}}else{f=1;z=O;A=-1;}if(((Z(A<<16>>16,B<<16>>16)|0)-(Z(f<<16>>16,n<<16>>16)|0)<<1|0)>0){b[X>>1]=D;b[R>>1]=o;b[S>>1]=p;b[T>>1]=z;r=z;g=D;n=A;}else{p=E;o=C;f=B;}}else{p=E;o=C;f=B;}w=F+5|0;D=w&65535;if(D<<16>>16>=40)break;else{F=w<<16>>16;E=p;C=o;B=f;}}}M=M+1<<16>>16;if(M<<16>>16>=4)break;else{K=Q;L=O;Q=P;P=N;O=K;N=L;}}q=q+1<<16>>16;}while(q<<16>>16<5);A=r;z=p;y=o;x=g;g=h;f=g+80|0;do{b[g>>1]=0;g=g+2|0;}while((g|0)<(f|0));a=x;f=0;n=0;g=0;while(1){p=a<<16>>16;q=b[Y+(p<<1)>>1]|0;a=p*13108>>16;o=p-((a*327680|0)>>>16)|0;a=b[l+(a<<1)>>1]|0;switch(o<<16>>16|0){case 1:{r=a<<16>>16<<3&65535;break;}case 2:{r=a<<16>>16<<6&65535;break;}case 3:{r=a<<16>>16<<10&65535;break;}case 4:{r=((a&65535)<<10|512)&65535;o=3;break;}default:r=a;}a=h+(p<<1)|0;if(q<<16>>16>0){b[a>>1]=8191;a=32767;g=(65536<<(o<<16>>16)>>>16)+(g&65535)&65535;}else{b[a>>1]=-8192;a=-32768;}b[_+(f<<1)>>1]=a;n=(r&65535)+(n&65535)|0;f=f+1|0;if((f|0)==4){w=n;break;}a=b[X+(f<<1)>>1]|0;}b[k>>1]=g;t=_+2|0;u=_+4|0;v=_+6|0;a=b[_>>1]|0;s=0;o=d+(0-(x<<16>>16)<<1)|0;p=d+(0-(y<<16>>16)<<1)|0;q=d+(0-(z<<16>>16)<<1)|0;r=d+(0-(A<<16>>16)<<1)|0;do{g=Z(b[o>>1]|0,a)|0;o=o+2|0;if((g|0)!=1073741824?(ba=g<<1,!((g|0)>0&(ba|0)<0)):0)n=ba;else{c[m>>2]=1;n=2147483647;}g=Z(b[t>>1]|0,b[p>>1]|0)|0;p=p+2|0;if((g|0)!=1073741824){f=(g<<1)+n|0;if((g^n|0)>0&(f^n|0)<0){c[m>>2]=1;f=(n>>>31)+2147483647|0;}}else{c[m>>2]=1;f=2147483647;}g=Z(b[u>>1]|0,b[q>>1]|0)|0;q=q+2|0;if((g|0)!=1073741824){n=(g<<1)+f|0;if((g^f|0)>0&(n^f|0)<0){c[m>>2]=1;n=(f>>>31)+2147483647|0;}}else{c[m>>2]=1;n=2147483647;}f=Z(b[v>>1]|0,b[r>>1]|0)|0;r=r+2|0;if((f|0)!=1073741824){g=(f<<1)+n|0;if((f^n|0)>0&(g^n|0)<0){c[m>>2]=1;g=(n>>>31)+2147483647|0;}}else{c[m>>2]=1;g=2147483647;}b[j+(s<<1)>>1]=Ce(g,m)|0;s=s+1|0;}while((s|0)!=40);g=w&65535;if(((ca<<16)+-2621440|0)>-1|$^1){i=da;return g|0;}n=aa>>16;f=ca;do{a=(Z(b[h+(f-ca<<1)>>1]|0,n)|0)>>15;if((a|0)>32767){c[m>>2]=1;a=32767;}j=h+(f<<1)|0;b[j>>1]=Rd(b[j>>1]|0,a&65535,m)|0;f=f+1|0;}while((f&65535)<<16>>16!=40);i=da;return g|0;}function Sb(a,d,f,g,h,j,k){a=a|0;d=d|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;var l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0;L=i;i=i+3440|0;t=L+3424|0;G=L+3408|0;H=L+3240|0;u=L+3224|0;E=L+3328|0;s=L+3248|0;F=L+24|0;K=L+16|0;J=L;gc(f,a,E,2,4,4,k);rd(E,d,s,H,4,G,4,k);fc(f,s,F,k);pd(8,4,4,E,F,G,H,u,k);d=g;a=d+80|0;do{b[d>>1]=0;d=d+2|0;}while((d|0)<(a|0));b[J>>1]=-1;b[K>>1]=-1;C=J+2|0;b[C>>1]=-1;D=K+2|0;b[D>>1]=-1;E=J+4|0;b[E>>1]=-1;F=K+4|0;b[F>>1]=-1;H=J+6|0;b[H>>1]=-1;G=K+6|0;b[G>>1]=-1;q=0;do{o=b[u+(q<<1)>>1]|0;d=o>>>2;m=d&65535;a=o&3;n=(b[s+(o<<1)>>1]|0)>0;o=g+(o<<1)|0;r=n&1^1;b[o>>1]=(e[o>>1]|0)+(n?8191:57345);b[t+(q<<1)>>1]=n?32767:-32768;n=J+(a<<1)|0;o=b[n>>1]|0;do if(o<<16>>16>=0){p=K+(a<<1)|0;l=(o<<16>>16|0)<=(d<<16>>16|0);d=J+((a|4)<<1)|0;if((r&65535|0)==(e[p>>1]&1|0)){if(l){b[d>>1]=m;break;}else{b[d>>1]=o;b[n>>1]=m;b[p>>1]=r;break;}}else if(l){b[d>>1]=o;b[n>>1]=m;b[p>>1]=r;break;}else{b[d>>1]=m;break;}}else{b[n>>1]=m;b[K+(a<<1)>>1]=r;}while(0);q=q+1|0;}while((q|0)!=8);v=t+2|0;w=t+4|0;x=t+6|0;y=t+8|0;z=t+10|0;A=t+12|0;B=t+14|0;t=b[t>>1]|0;q=0;p=f+(0-(b[u>>1]|0)<<1)|0;o=f+(0-(b[u+2>>1]|0)<<1)|0;n=f+(0-(b[u+4>>1]|0)<<1)|0;m=f+(0-(b[u+6>>1]|0)<<1)|0;d=f+(0-(b[u+8>>1]|0)<<1)|0;a=f+(0-(b[u+10>>1]|0)<<1)|0;l=f+(0-(b[u+12>>1]|0)<<1)|0;f=f+(0-(b[u+14>>1]|0)<<1)|0;do{r=Z(b[p>>1]|0,t)|0;p=p+2|0;if((r|0)!=1073741824?(I=r<<1,!((r|0)>0&(I|0)<0)):0)r=I;else{c[k>>2]=1;r=2147483647;}s=Z(b[v>>1]|0,b[o>>1]|0)|0;o=o+2|0;if((s|0)!=1073741824){g=(s<<1)+r|0;if((s^r|0)>0&(g^r|0)<0){c[k>>2]=1;r=(r>>>31)+2147483647|0;}else r=g;}else{c[k>>2]=1;r=2147483647;}s=Z(b[w>>1]|0,b[n>>1]|0)|0;n=n+2|0;if((s|0)!=1073741824){g=(s<<1)+r|0;if((s^r|0)>0&(g^r|0)<0){c[k>>2]=1;g=(r>>>31)+2147483647|0;}}else{c[k>>2]=1;g=2147483647;}s=Z(b[x>>1]|0,b[m>>1]|0)|0;m=m+2|0;if((s|0)!=1073741824){r=(s<<1)+g|0;if((s^g|0)>0&(r^g|0)<0){c[k>>2]=1;r=(g>>>31)+2147483647|0;}}else{c[k>>2]=1;r=2147483647;}s=Z(b[y>>1]|0,b[d>>1]|0)|0;d=d+2|0;if((s|0)!=1073741824){g=(s<<1)+r|0;if((s^r|0)>0&(g^r|0)<0){c[k>>2]=1;g=(r>>>31)+2147483647|0;}}else{c[k>>2]=1;g=2147483647;}s=Z(b[z>>1]|0,b[a>>1]|0)|0;a=a+2|0;if((s|0)!=1073741824){r=(s<<1)+g|0;if((s^g|0)>0&(r^g|0)<0){c[k>>2]=1;r=(g>>>31)+2147483647|0;}}else{c[k>>2]=1;r=2147483647;}s=Z(b[A>>1]|0,b[l>>1]|0)|0;l=l+2|0;if((s|0)!=1073741824){g=(s<<1)+r|0;if((s^r|0)>0&(g^r|0)<0){c[k>>2]=1;g=(r>>>31)+2147483647|0;}}else{c[k>>2]=1;g=2147483647;}s=Z(b[B>>1]|0,b[f>>1]|0)|0;f=f+2|0;if((s|0)!=1073741824){r=(s<<1)+g|0;if((s^g|0)>0&(r^g|0)<0){c[k>>2]=1;r=(g>>>31)+2147483647|0;}}else{c[k>>2]=1;r=2147483647;}b[h+(q<<1)>>1]=Ce(r,k)|0;q=q+1|0;}while((q|0)!=40);b[j>>1]=b[K>>1]|0;b[j+2>>1]=b[D>>1]|0;b[j+4>>1]=b[F>>1]|0;b[j+6>>1]=b[G>>1]|0;a=b[J>>1]|0;d=b[J+8>>1]|0;l=b[C>>1]|0;b[j+8>>1]=d<<1&2|a&1|l<<2&4|(((d>>1)*327680|0)+(a>>>1<<16)+(Z(l>>1,1638400)|0)|0)>>>13&65528;l=b[E>>1]|0;a=b[J+12>>1]|0;d=b[J+10>>1]|0;b[j+10>>1]=a<<1&2|l&1|d<<2&4|(((a>>1)*327680|0)+(l>>>1<<16)+(Z(d>>1,1638400)|0)|0)>>>13&65528;d=b[J+14>>1]|0;l=b[H>>1]|0;a=l<<16>>16>>>1;if(!(d&2)){h=a;k=d<<16>>16;K=k>>1;K=K*327680|0;h=h<<16;K=h+K|0;K=K<<5;K=K>>16;K=K|12;K=K*2622|0;K=K>>>16;h=l&65535;h=h&1;k=k<<17;k=k&131072;K=K<<18;k=K|k;k=k>>>16;h=k|h;h=h&65535;j=j+12|0;b[j>>1]=h;i=L;return;}h=4-(a<<16>>16)|0;k=d<<16>>16;K=k>>1;K=K*327680|0;h=h<<16;K=h+K|0;K=K<<5;K=K>>16;K=K|12;K=K*2622|0;K=K>>>16;h=l&65535;h=h&1;k=k<<17;k=k&131072;K=K<<18;k=K|k;k=k>>>16;h=k|h;h=h&65535;j=j+12|0;b[j>>1]=h;i=L;return;}function Tb(a,d,e,f,g){a=a|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;r=e<<16>>16;h=0-r|0;e=g+(h<<2)|0;g=((r-(f<<16>>16)|0)>>>2)+1&65535;if(g<<16>>16<=0)return;r=d<<16>>16>>>1&65535;if(!(r<<16>>16)){while(1){c[e>>2]=0;c[e+4>>2]=0;c[e+8>>2]=0;c[e+12>>2]=0;if(g<<16>>16>1){e=e+16|0;g=g+-1<<16>>16;}else break;}return;}q=a+(h<<1)|0;while(1){l=q+4|0;n=b[l>>1]|0;j=b[q>>1]|0;m=n;k=r;o=a;p=q;q=q+8|0;i=0;h=0;f=0;d=0;while(1){t=b[o>>1]|0;s=(Z(j<<16>>16,t)|0)+i|0;i=b[p+2>>1]|0;h=(Z(i,t)|0)+h|0;j=(Z(m<<16>>16,t)|0)+f|0;f=b[p+6>>1]|0;m=(Z(f,t)|0)+d|0;d=b[o+2>>1]|0;i=s+(Z(d,i)|0)|0;h=h+(Z(n<<16>>16,d)|0)|0;l=l+4|0;f=j+(Z(d,f)|0)|0;j=b[l>>1]|0;d=m+(Z(j<<16>>16,d)|0)|0;k=k+-1<<16>>16;if(!(k<<16>>16))break;t=n;m=j;n=b[p+8>>1]|0;o=o+4|0;p=p+4|0;j=t;}c[e>>2]=i<<1;c[e+4>>2]=h<<1;c[e+8>>2]=f<<1;c[e+12>>2]=d<<1;if(g<<16>>16<=1)break;else{e=e+16|0;g=g+-1<<16>>16;}}return;}function Ub(a,d,f,g,h,j,k,l,m){a=a|0;d=d|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;l=l|0;m=m|0;var n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;y=i;i=i+16|0;w=y+2|0;x=y;do if(h<<16>>16>0){s=g<<16>>16;u=0;p=0;g=0;o=0;t=0;while(1){n=b[a+(u<<1)>>1]|0;q=n<<16>>16;p=(Z(q,q)|0)+p|0;q=b[d+(u<<1)>>1]|0;g=(Z(q,q)|0)+g|0;o=(Z(b[f+(u<<1)>>1]|0,q)|0)+o|0;q=Z(q,s)|0;if((q|0)==1073741824){c[m>>2]=1;r=2147483647;}else r=q<<1;q=r<<1;q=(Ge(n,Ce((q>>1|0)==(r|0)?q:r>>31^2147483647,m)|0,m)|0)<<16>>16;q=Z(q,q)|0;if((q|0)!=1073741824){n=(q<<1)+t|0;if((q^t|0)>0&(n^t|0)<0){c[m>>2]=1;n=(t>>>31)+2147483647|0;}}else{c[m>>2]=1;n=2147483647;}u=u+1|0;if((u&65535)<<16>>16==h<<16>>16){t=n;break;}else t=n;}p=p<<1;g=g<<1;o=o<<1;if((p|0)>=0){if((p|0)<400){n=t;v=14;break;}}else{c[m>>2]=1;p=2147483647;}r=pe(p)|0;q=r<<16>>16;if(r<<16>>16>0){n=p<>q|0)!=(p|0))n=p>>31^2147483647;}else{n=0-q<<16;if((n|0)<2031616)n=p>>(n>>16);else n=0;}b[j>>1]=n>>>16;p=g;s=o;n=t;g=15-(r&65535)&65535;}else{g=0;o=0;n=0;v=14;}while(0);if((v|0)==14){b[j>>1]=0;p=g;s=o;g=-15;}b[k>>1]=g;if((p|0)<0){c[m>>2]=1;p=2147483647;}q=pe(p)|0;o=q<<16>>16;if(q<<16>>16>0){g=p<>o|0)!=(p|0))g=p>>31^2147483647;}else{g=0-o<<16;if((g|0)<2031616)g=p>>(g>>16);else g=0;}b[j+2>>1]=g>>>16;b[k+2>>1]=15-(q&65535);p=pe(s)|0;o=p<<16>>16;if(p<<16>>16>0){g=s<>o|0)!=(s|0))g=s>>31^2147483647;}else{g=0-o<<16;if((g|0)<2031616)g=s>>(g>>16);else g=0;}b[j+4>>1]=g>>>16;b[k+4>>1]=2-(p&65535);p=pe(n)|0;g=p<<16>>16;if(p<<16>>16>0){o=n<>g|0)!=(n|0))o=n>>31^2147483647;}else{g=0-g<<16;if((g|0)<2031616)o=n>>(g>>16);else o=0;}g=o>>>16&65535;n=15-(p&65535)&65535;b[j+6>>1]=g;b[k+6>>1]=n;if((o>>16|0)<=0){m=0;b[l>>1]=m;i=y;return;}o=b[j>>1]|0;if(!(o<<16>>16)){m=0;b[l>>1]=m;i=y;return;}g=Td(De(o,1,m)|0,g)|0;g=(g&65535)<<16;o=((Ge(n,b[k>>1]|0,m)|0)&65535)+3|0;n=o&65535;o=o<<16>>16;if(n<<16>>16>0)n=n<<16>>16<31?g>>o:0;else{k=0-o<<16>>16;n=g<>k|0)==(g|0)?n:g>>31^2147483647;}de(n,w,x,m);x=Ic((e[w>>1]|0)+65509&65535,b[x>>1]|0,m)|0;w=x<<13;m=Ce((w>>13|0)==(x|0)?w:x>>31^2147483647,m)|0;b[l>>1]=m;i=y;return;}function Vb(a,d,f,g,h,j,k,l,m,n,o){a=a|0;d=d|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;var p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;y=i;i=i+80|0;v=y;b[k>>1]=b[j>>1]|0;b[l>>1]=b[j+2>>1]|0;r=b[j+4>>1]|0;if(r<<16>>16==-32768)r=32767;else r=0-(r&65535)&65535;b[k+2>>1]=r;b[l+2>>1]=(e[j+6>>1]|0)+1;switch(a|0){case 0:case 5:{u=0;q=0;p=0;t=0;break;}default:{u=0;q=1;p=1;t=1;}}while(1){s=(b[h+(u<<1)>>1]|0)>>>3;b[v+(u<<1)>>1]=s;s=s<<16>>16;r=Z(s,s)|0;if((r|0)!=1073741824){j=(r<<1)+q|0;if((r^q|0)>0&(j^q|0)<0){c[o>>2]=1;q=(q>>>31)+2147483647|0;}else q=j;}else{c[o>>2]=1;q=2147483647;}r=Z(b[d+(u<<1)>>1]|0,s)|0;if((r|0)!=1073741824){j=(r<<1)+p|0;if((r^p|0)>0&(j^p|0)<0){c[o>>2]=1;p=(p>>>31)+2147483647|0;}else p=j;}else{c[o>>2]=1;p=2147483647;}r=Z(b[g+(u<<1)>>1]|0,s)|0;if((r|0)!=1073741824){j=(r<<1)+t|0;if((r^t|0)>0&(j^t|0)<0){c[o>>2]=1;j=(t>>>31)+2147483647|0;}}else{c[o>>2]=1;j=2147483647;}u=u+1|0;if((u|0)==40){g=j;s=p;break;}else t=j;}p=pe(q)|0;j=p<<16>>16;if(p<<16>>16>0){r=q<>j|0)!=(q|0))r=q>>31^2147483647;}else{r=0-j<<16;if((r|0)<2031616)r=q>>(r>>16);else r=0;}h=k+4|0;b[h>>1]=r>>>16;d=l+4|0;b[d>>1]=-3-(p&65535);q=pe(s)|0;j=q<<16>>16;if(q<<16>>16>0){r=s<>j|0)!=(s|0))r=s>>31^2147483647;}else{r=0-j<<16;if((r|0)<2031616)r=s>>(r>>16);else r=0;}j=r>>>16;b[k+6>>1]=(j|0)==32768?32767:0-j&65535;b[l+6>>1]=7-(q&65535);q=pe(g)|0;j=q<<16>>16;if(q<<16>>16>0){r=g<>j|0)!=(g|0))r=g>>31^2147483647;}else{r=0-j<<16;if((r|0)<2031616)r=g>>(r>>16);else r=0;}b[k+8>>1]=r>>>16;b[l+8>>1]=7-(q&65535);switch(a|0){case 0:case 5:{r=0;p=0;break;}default:{i=y;return;}}do{p=(Z(b[v+(r<<1)>>1]|0,b[f+(r<<1)>>1]|0)|0)+p|0;r=r+1|0;}while((r|0)!=40);j=p<<1;r=pe(j)|0;q=r<<16>>16;if(r<<16>>16>0){p=j<>q|0)==(j|0)){w=p;x=40;}else{w=j>>31^2147483647;x=40;}}else{p=0-q<<16;if((p|0)<2031616){w=j>>(p>>16);x=40;}}if((x|0)==40?(w>>16|0)>=1:0){o=De(w>>>16&65535,1,o)|0;b[m>>1]=Td(o,b[h>>1]|0)|0;b[n>>1]=65528-(r&65535)-(e[d>>1]|0);i=y;return;}b[m>>1]=0;b[n>>1]=0;i=y;return;}function Wb(a,d,e,f){a=a|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0;h=0;g=0;do{i=b[a+(h<<1)>>1]|0;g=(Z(i,i)|0)+g|0;h=h+1|0;}while((h|0)!=40);if((g|0)<0){c[f>>2]=1;g=2147483647;}f=pe(g)|0;a=f<<16>>16;if(f<<16>>16>0){h=g<>a|0)==(g|0))g=h;else g=g>>31^2147483647;}else{a=0-a<<16;if((a|0)<2031616)g=g>>(a>>16);else g=0;}b[e>>1]=g>>>16;b[d>>1]=16-(f&65535);return;}function Xb(a,d,e,f,g,h,j,k,l,m,n,o,p){a=a|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;p=p|0;var q=0,r=0,s=0,t=0;r=i;i=i+16|0;q=r;if(m>>>0<2){j=Nb(n,a,d,e,f,j,k,q,c[o+76>>2]|0,p)|0;p=c[l>>2]|0;b[p>>1]=j;j=b[q>>1]|0;c[l>>2]=p+4;b[p+2>>1]=j;i=r;return;}switch(m|0){case 2:{j=Mb(a,d,e,f,j,k,q,p)|0;p=c[l>>2]|0;b[p>>1]=j;j=b[q>>1]|0;c[l>>2]=p+4;b[p+2>>1]=j;i=r;return;}case 3:{j=Qb(a,d,e,f,j,k,q,p)|0;p=c[l>>2]|0;b[p>>1]=j;j=b[q>>1]|0;c[l>>2]=p+4;b[p+2>>1]=j;i=r;return;}default:{if((m&-2|0)==4){j=Rb(a,d,e,f,j,k,q,c[o+36>>2]|0,p)|0;p=c[l>>2]|0;b[p>>1]=j;j=b[q>>1]|0;c[l>>2]=p+4;b[p+2>>1]=j;i=r;return;}if((m|0)!=6){n=g<<16>>16;n=(n<<17>>17|0)==(n|0)?n<<1:n>>>15^32767;g=e<<16>>16<40;if(!g){Lb(a,h,d,j,k,c[l>>2]|0,c[o+36>>2]|0,p);c[l>>2]=(c[l>>2]|0)+20;i=r;return;}q=e<<16>>16;m=n<<16>>16;f=q;do{t=(Z(b[d+(f-q<<1)>>1]|0,m)|0)>>>15&65535;s=d+(f<<1)|0;b[s>>1]=Rd(b[s>>1]|0,t,p)|0;f=f+1|0;}while((f&65535)<<16>>16!=40);Lb(a,h,d,j,k,c[l>>2]|0,c[o+36>>2]|0,p);c[l>>2]=(c[l>>2]|0)+20;if(!g){i=r;return;}g=e<<16>>16;m=n<<16>>16;q=g;do{f=(Z(b[j+(q-g<<1)>>1]|0,m)|0)>>15;if((f|0)>32767){c[p>>2]=1;f=32767;}t=j+(q<<1)|0;b[t>>1]=Rd(b[t>>1]|0,f&65535,p)|0;q=q+1|0;}while((q&65535)<<16>>16!=40);i=r;return;}o=f<<16>>16;o=(o<<17>>17|0)==(o|0)?o<<1:o>>>15^32767;n=e<<16>>16<40;if(!n){Sb(a,h,d,j,k,c[l>>2]|0,p);c[l>>2]=(c[l>>2]|0)+14;i=r;return;}q=e<<16>>16;m=o<<16>>16;f=q;do{g=(Z(b[d+(f-q<<1)>>1]|0,m)|0)>>15;if((g|0)>32767){c[p>>2]=1;g=32767;}t=d+(f<<1)|0;b[t>>1]=Rd(b[t>>1]|0,g&65535,p)|0;f=f+1|0;}while((f&65535)<<16>>16!=40);Sb(a,h,d,j,k,c[l>>2]|0,p);c[l>>2]=(c[l>>2]|0)+14;if(!n){i=r;return;}g=e<<16>>16;m=o<<16>>16;q=g;do{f=(Z(b[j+(q-g<<1)>>1]|0,m)|0)>>15;if((f|0)>32767){c[p>>2]=1;f=32767;}t=j+(q<<1)|0;b[t>>1]=Rd(b[t>>1]|0,f&65535,p)|0;q=q+1|0;}while((q&65535)<<16>>16!=40);i=r;return;}}}function Yb(a){a=a|0;var b=0;if(!a){a=-1;return a|0;}c[a>>2]=0;b=Je(4)|0;if(!b){a=-1;return a|0;}if(!((Uc(b)|0)<<16>>16)){Vc(c[b>>2]|0)|0;c[a>>2]=b;a=0;return a|0;}else{Wc(b);Ke(b);a=-1;return a|0;}return 0;}function Zb(a){a=a|0;var b=0;if(!a)return;b=c[a>>2]|0;if(!b)return;Wc(b);Ke(c[a>>2]|0);c[a>>2]=0;return;}function _b(a){a=a|0;if(!a){a=-1;return a|0;}Vc(c[a>>2]|0)|0;a=0;return a|0;}function $b(a,d,f,g,h,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x){a=a|0;d=d|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;p=p|0;q=q|0;r=r|0;s=s|0;t=t|0;u=u|0;v=v|0;w=w|0;x=x|0;var y=0,z=0,A=0,B=0;z=i;i=i+16|0;B=z+2|0;A=z;b[q>>1]=Xc(c[a>>2]|0,f,h,k,m,j,40,g,r,A,B,x)|0;a=b[B>>1]|0;g=c[u>>2]|0;c[u>>2]=g+2;b[g>>1]=a;se(k,b[q>>1]|0,b[r>>1]|0,40,b[A>>1]|0,x);ec(k,j,p,40);b[s>>1]=Dc(f,m,p,t,40,x)|0;b[v>>1]=32767;if(n<<16>>16!=0?(y=b[s>>1]|0,y<<16>>16>15565):0)y=Ed(d,y,x)|0;else y=0;if(f>>>0<2){B=b[s>>1]|0;b[s>>1]=B<<16>>16>13926?13926:B;if(y<<16>>16)b[v>>1]=15565;}else{if(y<<16>>16){b[v>>1]=15565;b[s>>1]=15565;}if((f|0)==7){A=nd(7,b[v>>1]|0,s,0,0,w,x)|0;B=c[u>>2]|0;c[u>>2]=B+2;b[B>>1]=A;}}q=b[s>>1]|0;y=0;while(1){A=Z(b[p>>1]|0,q)|0;b[o>>1]=(e[m>>1]|0)-(A>>>14);A=(Z(b[k>>1]|0,q)|0)>>>14;B=l+(y<<1)|0;b[B>>1]=(e[B>>1]|0)-A;y=y+1|0;if((y|0)==40)break;else{k=k+2|0;m=m+2|0;o=o+2|0;p=p+2|0;}}i=z;return;}function ac(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;g=i;i=i+16|0;f=g;if(!a){a=-1;i=g;return a|0;}c[a>>2]=0;d=Je(2532)|0;c[f>>2]=d;if(!d){a=-1;i=g;return a|0;}Yd(d+2392|0);c[d+2188>>2]=0;c[(c[f>>2]|0)+2192>>2]=0;c[(c[f>>2]|0)+2196>>2]=0;c[(c[f>>2]|0)+2200>>2]=0;c[(c[f>>2]|0)+2204>>2]=0;c[(c[f>>2]|0)+2208>>2]=0;c[(c[f>>2]|0)+2212>>2]=0;c[(c[f>>2]|0)+2220>>2]=0;e=c[f>>2]|0;c[e+2216>>2]=b;c[e+2528>>2]=0;d=e;if((((((((Yb(e+2196|0)|0)<<16>>16==0?(ie(e+2192|0)|0)<<16>>16==0:0)?(yc(e+2200|0)|0)<<16>>16==0:0)?(_c(e+2204|0)|0)<<16>>16==0:0)?(Ad(e+2208|0)|0)<<16>>16==0:0)?(Gd(e+2212|0)|0)<<16>>16==0:0)?(jc(e+2220|0,c[e+2432>>2]|0)|0)<<16>>16==0:0)?(Pc(e+2188|0)|0)<<16>>16==0:0){cc(e)|0;c[a>>2]=d;a=0;i=g;return a|0;}bc(f);a=-1;i=g;return a|0;}function bc(a){a=a|0;var b=0;if(!a)return;b=c[a>>2]|0;if(!b)return;Qc(b+2188|0);ke((c[a>>2]|0)+2192|0);zc((c[a>>2]|0)+2200|0);Zb((c[a>>2]|0)+2196|0);ad((c[a>>2]|0)+2204|0);Cd((c[a>>2]|0)+2208|0);Id((c[a>>2]|0)+2212|0);lc((c[a>>2]|0)+2220|0);Ke(c[a>>2]|0);c[a>>2]=0;return;}function cc(a){a=a|0;var d=0,e=0,f=0,g=0;if(!a){g=-1;return g|0;}c[a+652>>2]=a+320;c[a+640>>2]=a+240;c[a+644>>2]=a+160;c[a+648>>2]=a+80;c[a+1264>>2]=a+942;c[a+1912>>2]=a+1590;f=a+1938|0;c[a+2020>>2]=f;c[a+2384>>2]=a+2304;d=a+2028|0;c[a+2024>>2]=a+2108;c[a+2528>>2]=0;Qe(a|0,0,640)|0;Qe(a+1282|0,0,308)|0;Qe(a+656|0,0,286)|0;e=a+2224|0;g=f+80|0;do{b[f>>1]=0;f=f+2|0;}while((f|0)<(g|0));f=d;g=f+80|0;do{b[f>>1]=0;f=f+2|0;}while((f|0)<(g|0));d=a+1268|0;f=e;g=f+80|0;do{b[f>>1]=0;f=f+2|0;}while((f|0)<(g|0));b[d>>1]=40;b[a+1270>>1]=40;b[a+1272>>1]=40;b[a+1274>>1]=40;b[a+1276>>1]=40;Rc(c[a+2188>>2]|0)|0;je(c[a+2192>>2]|0)|0;_b(c[a+2196>>2]|0)|0;Ac(c[a+2200>>2]|0)|0;$c(c[a+2204>>2]|0)|0;Bd(c[a+2208>>2]|0)|0;Hd(c[a+2212>>2]|0)|0;kc(c[a+2220>>2]|0,c[a+2432>>2]|0)|0;b[a+2388>>1]=0;g=0;return g|0;}function dc(a,d,e,f,g,h){a=a|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0;qa=i;i=i+1184|0;T=qa;n=qa+1096|0;o=qa+1008|0;l=qa+904|0;ka=qa+928|0;la=qa+824|0;X=qa+744|0;na=qa+664|0;oa=qa+584|0;Z=qa+328|0;ha=qa+504|0;ia=qa+424|0;ma=qa+344|0;pa=qa+248|0;Y=qa+168|0;da=qa+88|0;fa=qa+68|0;ga=qa+48|0;ea=qa+28|0;ja=qa+24|0;ba=qa+22|0;$=qa+20|0;W=qa+16|0;U=qa+12|0;V=qa+10|0;aa=qa+8|0;_=qa+6|0;ca=qa+4|0;c[T>>2]=f;S=a+2528|0;j=a+652|0;Oe(c[j>>2]|0,e|0,320)|0;c[g>>2]=d;m=a+2216|0;if(!(c[m>>2]|0)){e=a+2220|0;f=0;}else{f=Nd(c[a+2212>>2]|0,c[j>>2]|0,S)|0;R=a+2220|0;e=R;f=oc(c[R>>2]|0,f,g,S)|0;}R=a+2392|0;Sc(c[a+2188>>2]|0,d,c[a+644>>2]|0,c[a+648>>2]|0,n,R,S);k=a+2192|0;le(c[k>>2]|0,d,c[g>>2]|0,n,o,l,T,S);nc(c[e>>2]|0,l,c[j>>2]|0,S);if((c[g>>2]|0)==8){mc(c[e>>2]|0,f,c[(c[k>>2]|0)+40>>2]|0,(c[a+2200>>2]|0)+32|0,T,S);Qe(a+1282|0,0,308)|0;j=a+2244|0;q=j+20|0;do{b[j>>1]=0;j=j+2|0;}while((j|0)<(q|0));j=a+2284|0;q=j+20|0;do{b[j>>1]=0;j=j+2|0;}while((j|0)<(q|0));j=c[a+2020>>2]|0;q=j+80|0;do{b[j>>1]=0;j=j+2|0;}while((j|0)<(q|0));j=a+2028|0;q=j+80|0;do{b[j>>1]=0;j=j+2|0;}while((j|0)<(q|0));je(c[k>>2]|0)|0;j=c[k>>2]|0;e=l;q=j+20|0;do{b[j>>1]=b[e>>1]|0;j=j+2|0;e=e+2|0;}while((j|0)<(q|0));j=(c[k>>2]|0)+20|0;e=l;q=j+20|0;do{b[j>>1]=b[e>>1]|0;j=j+2|0;e=e+2|0;}while((j|0)<(q|0));_b(c[a+2196>>2]|0)|0;b[a+2388>>1]=0;Q=0;}else Q=Dd(c[a+2208>>2]|0,c[k>>2]|0,S)|0;N=a+640|0;k=a+2264|0;j=a+1264|0;e=a+2204|0;f=a+2212|0;O=a+1268|0;P=a+1278|0;cd(d,2842,2862,2882,n,0,c[N>>2]|0,k,c[j>>2]|0,S);if(d>>>0>1){Tc(c[e>>2]|0,c[f>>2]|0,d,c[j>>2]|0,W,O,P,0,c[m>>2]|0,S);cd(d,2842,2862,2882,n,80,c[N>>2]|0,k,c[j>>2]|0,S);Tc(c[e>>2]|0,c[f>>2]|0,d,(c[j>>2]|0)+160|0,W+2|0,O,P,1,c[m>>2]|0,S);}else{cd(d,2842,2862,2882,n,80,c[N>>2]|0,k,c[j>>2]|0,S);Tc(c[e>>2]|0,c[f>>2]|0,d,c[j>>2]|0,W,O,P,1,c[m>>2]|0,S);b[W+2>>1]=b[W>>1]|0;}if(c[m>>2]|0)Md(c[f>>2]|0,W,S);if((c[g>>2]|0)==8){oa=a+656|0;pa=a+976|0;Oe(oa|0,pa|0,286)|0;pa=a+320|0;Oe(a|0,pa|0,320)|0;i=qa;return 0;}z=a+2224|0;A=a+2244|0;B=a+2284|0;C=a+2388|0;D=a+2020|0;E=a+1916|0;F=a+1912|0;G=a+2024|0;H=a+2384|0;I=a+2196|0;J=a+2208|0;K=a+2464|0;L=a+2200|0;M=a+2224|0;w=a+2244|0;x=a+1270|0;y=a+1280|0;v=0;m=0;l=0;s=0;t=0;k=0;u=-1;while(1){p=u;u=u+1<<16>>16;s=1-(s<<16>>16)|0;f=s&65535;r=(s&65535|0)!=0;e=c[g>>2]|0;j=(e|0)==0;do if(r){if(j){j=fa;e=z;q=j+20|0;do{b[j>>1]=b[e>>1]|0;j=j+2|0;e=e+2|0;}while((j|0)<(q|0));j=ga;e=A;q=j+20|0;do{b[j>>1]=b[e>>1]|0;j=j+2|0;e=e+2|0;}while((j|0)<(q|0));j=ea;e=B;q=j+20|0;do{b[j>>1]=b[e>>1]|0;j=j+2|0;e=e+2|0;}while((j|0)<(q|0));b[ja>>1]=b[C>>1]|0;d=(c[N>>2]|0)+(v<<1)|0;j=20;break;}else{d=(c[N>>2]|0)+(v<<1)|0;j=19;break;}}else{d=(c[N>>2]|0)+(v<<1)|0;if(j)j=20;else j=19;}while(0);if((j|0)==19)yd(e,2842,2862,2882,n,o,d,B,w,c[D>>2]|0,E,(c[F>>2]|0)+(v<<1)|0,c[G>>2]|0,ka,ha,c[H>>2]|0);else if((j|0)==20?(yd(0,2842,2862,2882,n,o,d,B,ga,c[D>>2]|0,E,(c[F>>2]|0)+(v<<1)|0,c[G>>2]|0,ka,ha,c[H>>2]|0),r):0){j=da;e=c[G>>2]|0;q=j+80|0;do{b[j>>1]=b[e>>1]|0;j=j+2|0;e=e+2|0;}while((j|0)<(q|0));}j=ia;e=ha;q=j+80|0;do{b[j>>1]=b[e>>1]|0;j=j+2|0;e=e+2|0;}while((j|0)<(q|0));$b(c[I>>2]|0,c[J>>2]|0,c[g>>2]|0,t,W,c[G>>2]|0,(c[F>>2]|0)+(v<<1)|0,ia,ka,Q,la,na,U,V,aa,Z,T,ca,c[K>>2]|0,S);switch(p<<16>>16){case-1:{if((b[P>>1]|0)>0)b[x>>1]=b[U>>1]|0;break;}case 2:{if((b[y>>1]|0)>0)b[O>>1]=b[U>>1]|0;break;}default:}Xb(la,c[G>>2]|0,b[U>>1]|0,b[C>>1]|0,b[aa>>1]|0,ia,X,oa,T,c[g>>2]|0,u,R,S);Bc(c[L>>2]|0,c[g>>2]|0,ha,(c[F>>2]|0)+(v<<1)|0,X,ka,la,na,oa,Z,f,b[ca>>1]|0,ba,$,aa,_,T,R,S);Fd(c[J>>2]|0,b[aa>>1]|0,S);d=c[g>>2]|0;do if(!d){if(r){j=ma;e=ka;q=j+80|0;do{b[j>>1]=b[e>>1]|0;j=j+2|0;e=e+2|0;}while((j|0)<(q|0));j=pa;e=oa;q=j+80|0;do{b[j>>1]=b[e>>1]|0;j=j+2|0;e=e+2|0;}while((j|0)<(q|0));j=Y;e=X;q=j+80|0;do{b[j>>1]=b[e>>1]|0;j=j+2|0;e=e+2|0;}while((j|0)<(q|0));l=b[U>>1]|0;m=b[V>>1]|0;zd(c[N>>2]|0,0,t,b[aa>>1]|0,b[_>>1]|0,o,h,ka,X,na,oa,fa,B,ga,c[F>>2]|0,C,S);b[C>>1]=b[ja>>1]|0;k=t;break;}else{j=B;e=ea;q=j+20|0;do{b[j>>1]=b[e>>1]|0;j=j+2|0;e=e+2|0;}while((j|0)<(q|0));r=k<<16>>16;se((c[F>>2]|0)+(r<<1)|0,l,m,40,1,S);ec((c[F>>2]|0)+(r<<1)|0,da,na,40);zd(c[N>>2]|0,c[g>>2]|0,k,b[ba>>1]|0,b[$>>1]|0,o+-22|0,h,ma,Y,na,pa,M,B,w,c[F>>2]|0,ja,S);yd(c[g>>2]|0,2842,2862,2882,n,o,(c[N>>2]|0)+(v<<1)|0,B,w,c[D>>2]|0,E,(c[F>>2]|0)+(v<<1)|0,c[G>>2]|0,ka,ha,c[H>>2]|0);se((c[F>>2]|0)+(v<<1)|0,b[U>>1]|0,b[V>>1]|0,40,1,S);ec((c[F>>2]|0)+(v<<1)|0,c[G>>2]|0,na,40);zd(c[N>>2]|0,c[g>>2]|0,t,b[aa>>1]|0,b[_>>1]|0,o,h,ka,X,na,oa,M,B,w,c[F>>2]|0,C,S);break;}}else zd(c[N>>2]|0,d,t,b[aa>>1]|0,b[_>>1]|0,o,h,ka,X,na,oa,M,B,w,c[F>>2]|0,C,S);while(0);d=v+40|0;t=d&65535;if(t<<16>>16>=160)break;else{v=d<<16>>16;n=n+22|0;o=o+22|0;}}Oe(a+1282|0,a+1602|0,308)|0;oa=a+656|0;pa=a+976|0;Oe(oa|0,pa|0,286)|0;pa=a+320|0;Oe(a|0,pa|0,320)|0;i=qa;return 0;}function ec(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;o=e<<16>>16;if(e<<16>>16>1)n=1;else return;while(1){f=b[a>>1]|0;i=c+(n+-1<<1)|0;e=Z(b[c+(n<<1)>>1]|0,f)|0;k=b[i>>1]|0;f=Z(k<<16>>16,f)|0;h=(n+131071|0)>>>1;j=h&65535;g=b[a+2>>1]|0;if(!(j<<16>>16)){c=i;h=k;}else{l=(h<<1)+131070&131070;m=n-l|0;h=a;do{q=(Z(k<<16>>16,g)|0)+e|0;p=h;h=h+4|0;e=b[i+-2>>1]|0;g=(Z(e,g)|0)+f|0;f=b[h>>1]|0;i=i+-4|0;e=q+(Z(f,e)|0)|0;k=b[i>>1]|0;f=g+(Z(k<<16>>16,f)|0)|0;j=j+-1<<16>>16;g=b[p+6>>1]|0;}while(j<<16>>16!=0);h=c+(m+-3<<1)|0;a=a+(l+2<<1)|0;c=h;h=b[h>>1]|0;}e=(Z(h<<16>>16,g)|0)+e|0;b[d>>1]=f>>>12;b[d+2>>1]=e>>>12;e=(n<<16)+131072>>16;if((e|0)<(o|0)){d=d+4|0;a=a+(1-n<<1)|0;n=e;}else break;}return;}function fc(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0;z=i;i=i+80|0;y=z;h=20;g=a;f=1;while(1){x=b[g>>1]|0;x=(Z(x,x)|0)+f|0;f=b[g+2>>1]|0;f=x+(Z(f,f)|0)|0;h=h+-1<<16>>16;if(!(h<<16>>16))break;else g=g+4|0;}f=f<<1;if((f|0)<0){g=20;f=a;e=y;while(1){b[e>>1]=(b[f>>1]|0)>>>1;b[e+2>>1]=(b[f+2>>1]|0)>>>1;g=g+-1<<16>>16;if(!(g<<16>>16)){x=y;break;}else{f=f+4|0;e=e+4|0;}}}else{f=ce(f>>1,e)|0;if((f|0)<16777215)f=((f>>9)*32440|0)>>>15<<16>>16;else f=32440;h=20;g=a;e=y;while(1){b[e>>1]=((Z(b[g>>1]|0,f)|0)+32|0)>>>6;b[e+2>>1]=((Z(b[g+2>>1]|0,f)|0)+32|0)>>>6;h=h+-1<<16>>16;if(!(h<<16>>16)){x=y;break;}else{g=g+4|0;e=e+4|0;}}}h=20;g=x;e=d+3198|0;f=0;while(1){w=b[g>>1]|0;w=(Z(w,w)|0)+f|0;b[e>>1]=(w+16384|0)>>>15;v=b[g+2>>1]|0;f=(Z(v,v)|0)+w|0;b[e+-82>>1]=(f+16384|0)>>>15;h=h+-1<<16>>16;if(!(h<<16>>16))break;else{g=g+4|0;e=e+-164|0;}}w=c+78|0;v=1;while(1){f=39-v|0;a=d+3120+(f<<1)|0;e=d+(f*80|0)+78|0;f=c+(f<<1)|0;k=y+(v<<1)|0;g=65575-v|0;j=g&65535;h=b[x>>1]|0;if(!(j<<16>>16)){j=w;g=0;}else{r=g+65535&65535;t=r*41|0;u=(Z(v,-40)|0)-t|0;s=0-v|0;t=s-t|0;s=s-r|0;q=v+r|0;p=b[k>>1]|0;n=x;o=w;l=d+((38-v|0)*80|0)+78|0;g=0;m=0;while(1){k=k+2|0;g=(Z(p<<16>>16,h)|0)+g|0;n=n+2|0;p=b[k>>1]|0;m=(Z(p<<16>>16,h)|0)+m|0;B=f;f=f+-2|0;h=b[f>>1]|0;A=b[o>>1]<<1;B=(Z((Z(A,b[B>>1]|0)|0)>>16,(g<<1)+32768>>16)|0)>>>15&65535;b[e>>1]=B;b[a>>1]=B;h=(Z((Z(A,h)|0)>>16,(m<<1)+32768>>16)|0)>>>15&65535;b[a+-2>>1]=h;b[l>>1]=h;j=j+-1<<16>>16;h=b[n>>1]|0;if(!(j<<16>>16))break;else{o=o+-2|0;a=a+-82|0;e=e+-82|0;l=l+-82|0;}}k=y+(q+1<<1)|0;j=c+(38-r<<1)|0;f=c+(s+38<<1)|0;a=d+3040+(t+38<<1)|0;e=d+3040+(u+38<<1)|0;}B=(Z(b[k>>1]|0,h)|0)+g|0;B=(Z((B<<1)+32768>>16,(Z(b[j>>1]<<1,b[f>>1]|0)|0)>>16)|0)>>>15&65535;b[a>>1]=B;b[e>>1]=B;e=(v<<16)+131072|0;if((e|0)<2621440)v=e>>16;else break;}i=z;return;}function gc(a,d,e,f,g,h,j){a=a|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;r=i;i=i+160|0;q=r;if(g<<16>>16>0){o=h&65535;p=0;k=5;do{if((p|0)<40){n=p;m=p&65535;h=0;while(1){if(m<<16>>16<40){m=m<<16>>16;l=0;do{l=(Z(b[a+(m-n<<1)>>1]|0,b[d+(m<<1)>>1]|0)|0)+l|0;m=m+1|0;}while((m&65535)<<16>>16!=40);}else l=0;l=l<<1;c[q+(n<<2)>>2]=l;l=Gc(l)|0;h=(l|0)>(h|0)?l:h;l=n+o|0;m=l&65535;if(m<<16>>16>=40)break;else n=l<<16>>16;}}else h=0;k=(h>>1)+k|0;p=p+1|0;}while((p&65535)<<16>>16!=g<<16>>16);}else k=5;f=((pe(k)|0)&65535)-(f&65535)|0;h=f<<16>>16;l=0-h<<16;k=(l|0)<2031616;l=l>>16;if((f&65535)<<16>>16>0){if(k){k=0;do{f=c[q+(k<<2)>>2]|0;d=f<>1]=Ce((d>>h|0)==(f|0)?d:f>>31^2147483647,j)|0;k=k+1|0;}while((k|0)!=40);i=r;return;}else{k=0;do{f=c[q+(k<<2)>>2]|0;d=f<>1]=Ce((d>>h|0)==(f|0)?d:f>>31^2147483647,j)|0;k=k+1|0;}while((k|0)!=40);i=r;return;}}else if(k){k=0;do{b[e+(k<<1)>>1]=Ce(c[q+(k<<2)>>2]>>l,j)|0;k=k+1|0;}while((k|0)!=40);i=r;return;}else{k=0;do{b[e+(k<<1)>>1]=Ce(0,j)|0;k=k+1|0;}while((k|0)!=40);i=r;return;}}function hc(a,d,e,f,g){a=a|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;z=i;i=i+160|0;y=z;v=a+2|0;w=b[a>>1]|0;x=0;g=5;do{u=x;k=0;while(1){n=d+(u<<1)|0;t=40-u|0;h=(t+131071|0)>>>1&65535;l=d+(u+1<<1)|0;j=Z(b[n>>1]<<1,w)|0;if(!(h<<16>>16))h=v;else{s=131111-u+131070&131070;r=u+s|0;q=v;p=a;o=n;while(1){m=o+4|0;n=p+4|0;j=(Z(b[l>>1]<<1,b[q>>1]|0)|0)+j|0;h=h+-1<<16>>16;j=(Z(b[m>>1]<<1,b[n>>1]|0)|0)+j|0;if(!(h<<16>>16))break;else{l=o+6|0;q=p+6|0;p=n;o=m;}}l=d+(r+3<<1)|0;h=a+(s+3<<1)|0;}if(!(t&1))j=(Z(b[l>>1]<<1,b[h>>1]|0)|0)+j|0;c[y+(u<<2)>>2]=j;j=(j|0)<0?0-j|0:j;k=(j|0)>(k|0)?j:k;j=u+5|0;if((j&65535)<<16>>16<40)u=j<<16>>16;else break;}g=(k>>1)+g|0;x=x+1|0;}while((x|0)!=5);f=((pe(g)|0)&65535)-(f&65535)|0;j=f<<16>>16;g=0-j<<16;k=g>>16;if((f&65535)<<16>>16>0){h=20;g=y;while(1){y=c[g>>2]|0;f=y<>1]=(((f>>j|0)==(y|0)?f:y>>31^2147483647)+32768|0)>>>16;y=c[g+4>>2]|0;f=y<>1]=(((f>>j|0)==(y|0)?f:y>>31^2147483647)+32768|0)>>>16;h=h+-1<<16>>16;if(!(h<<16>>16))break;else{e=e+4|0;g=g+8|0;}}i=z;return;}if((g|0)<2031616){h=20;g=y;while(1){b[e>>1]=((c[g>>2]>>k)+32768|0)>>>16;b[e+2>>1]=((c[g+4>>2]>>k)+32768|0)>>>16;h=h+-1<<16>>16;if(!(h<<16>>16))break;else{e=e+4|0;g=g+8|0;}}i=z;return;}else{b[e>>1]=0;y=e+4|0;b[e+2>>1]=0;b[y>>1]=0;f=y+4|0;b[y+2>>1]=0;b[f>>1]=0;y=f+4|0;b[f+2>>1]=0;b[y>>1]=0;f=y+4|0;b[y+2>>1]=0;b[f>>1]=0;y=f+4|0;b[f+2>>1]=0;b[y>>1]=0;f=y+4|0;b[y+2>>1]=0;b[f>>1]=0;y=f+4|0;b[f+2>>1]=0;b[y>>1]=0;f=y+4|0;b[y+2>>1]=0;b[f>>1]=0;y=f+4|0;b[f+2>>1]=0;b[y>>1]=0;f=y+4|0;b[y+2>>1]=0;b[f>>1]=0;y=f+4|0;b[f+2>>1]=0;b[y>>1]=0;f=y+4|0;b[y+2>>1]=0;b[f>>1]=0;y=f+4|0;b[f+2>>1]=0;b[y>>1]=0;f=y+4|0;b[y+2>>1]=0;b[f>>1]=0;y=f+4|0;b[f+2>>1]=0;b[y>>1]=0;f=y+4|0;b[y+2>>1]=0;b[f>>1]=0;y=f+4|0;b[f+2>>1]=0;b[y>>1]=0;f=y+4|0;b[y+2>>1]=0;b[f>>1]=0;y=f+4|0;b[f+2>>1]=0;b[y>>1]=0;b[y+2>>1]=0;i=z;return;}}function ic(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0;h=(Td(16383,b)|0)<<16>>16;b=Z(h,b<<16>>16)|0;if((b|0)==1073741824){c[e>>2]=1;f=2147483647;}else f=b<<1;g=(Z(h,d<<16>>16)|0)>>15;b=f+(g<<1)|0;if((f^g|0)>0&(b^f|0)<0){c[e>>2]=1;b=(f>>>31)+2147483647|0;}f=2147483647-b|0;d=f>>16;b=Z(d,h)|0;if((b|0)==1073741824){c[e>>2]=1;g=2147483647;}else g=b<<1;h=(Z((f>>>1)-(d<<15)<<16>>16,h)|0)>>15;b=g+(h<<1)|0;if((g^h|0)>0&(b^g|0)<0){c[e>>2]=1;b=(g>>>31)+2147483647|0;}g=b>>16;h=a>>16;d=Z(g,h)|0;d=(d|0)==1073741824?2147483647:d<<1;f=(Z((b>>>1)-(g<<15)<<16>>16,h)|0)>>15;e=(f<<1)+d|0;e=(f^d|0)>0&(e^d|0)<0?(d>>>31)+2147483647|0:e;h=(Z(g,(a>>>1)-(h<<15)<<16>>16)|0)>>15;a=e+(h<<1)|0;a=(e^h|0)>0&(a^e|0)<0?(e>>>31)+2147483647|0:a;e=a<<2;return((e>>2|0)==(a|0)?e:a>>31^2147483647)|0;}function jc(a,d){a=a|0;d=d|0;var e=0,f=0,g=0,h=0;if(!a){h=-1;return h|0;}c[a>>2]=0;e=Je(192)|0;if(!e){h=-1;return h|0;}f=e+176|0;b[f>>1]=0;b[f+2>>1]=0;b[f+4>>1]=0;b[f+6>>1]=0;b[f+8>>1]=0;b[f+10>>1]=0;f=e;g=d;h=f+20|0;do{b[f>>1]=b[g>>1]|0;f=f+2|0;g=g+2|0;}while((f|0)<(h|0));f=e+20|0;g=d;h=f+20|0;do{b[f>>1]=b[g>>1]|0;f=f+2|0;g=g+2|0;}while((f|0)<(h|0));f=e+40|0;g=d;h=f+20|0;do{b[f>>1]=b[g>>1]|0;f=f+2|0;g=g+2|0;}while((f|0)<(h|0));f=e+60|0;g=d;h=f+20|0;do{b[f>>1]=b[g>>1]|0;f=f+2|0;g=g+2|0;}while((f|0)<(h|0));f=e+80|0;g=d;h=f+20|0;do{b[f>>1]=b[g>>1]|0;f=f+2|0;g=g+2|0;}while((f|0)<(h|0));f=e+100|0;g=d;h=f+20|0;do{b[f>>1]=b[g>>1]|0;f=f+2|0;g=g+2|0;}while((f|0)<(h|0));f=e+120|0;g=d;h=f+20|0;do{b[f>>1]=b[g>>1]|0;f=f+2|0;g=g+2|0;}while((f|0)<(h|0));f=e+140|0;g=d;h=f+20|0;do{b[f>>1]=b[g>>1]|0;f=f+2|0;g=g+2|0;}while((f|0)<(h|0));f=e+160|0;h=f+20|0;do{b[f>>1]=0;f=f+2|0;}while((f|0)<(h|0));b[e+188>>1]=7;b[e+190>>1]=32767;c[a>>2]=e;h=0;return h|0;}function kc(a,c){a=a|0;c=c|0;var d=0,e=0,f=0;if(!a){f=-1;return f|0;}d=a+176|0;b[d>>1]=0;b[d+2>>1]=0;b[d+4>>1]=0;b[d+6>>1]=0;b[d+8>>1]=0;b[d+10>>1]=0;d=a;e=c;f=d+20|0;do{b[d>>1]=b[e>>1]|0;d=d+2|0;e=e+2|0;}while((d|0)<(f|0));d=a+20|0;e=c;f=d+20|0;do{b[d>>1]=b[e>>1]|0;d=d+2|0;e=e+2|0;}while((d|0)<(f|0));d=a+40|0;e=c;f=d+20|0;do{b[d>>1]=b[e>>1]|0;d=d+2|0;e=e+2|0;}while((d|0)<(f|0));d=a+60|0;e=c;f=d+20|0;do{b[d>>1]=b[e>>1]|0;d=d+2|0;e=e+2|0;}while((d|0)<(f|0));d=a+80|0;e=c;f=d+20|0;do{b[d>>1]=b[e>>1]|0;d=d+2|0;e=e+2|0;}while((d|0)<(f|0));d=a+100|0;e=c;f=d+20|0;do{b[d>>1]=b[e>>1]|0;d=d+2|0;e=e+2|0;}while((d|0)<(f|0));d=a+120|0;e=c;f=d+20|0;do{b[d>>1]=b[e>>1]|0;d=d+2|0;e=e+2|0;}while((d|0)<(f|0));d=a+140|0;e=c;f=d+20|0;do{b[d>>1]=b[e>>1]|0;d=d+2|0;e=e+2|0;}while((d|0)<(f|0));d=a+160|0;f=d+20|0;do{b[d>>1]=0;d=d+2|0;}while((d|0)<(f|0));b[a+188>>1]=7;b[a+190>>1]=32767;f=1;return f|0;}function lc(a){a=a|0;var b=0;if(!a)return;b=c[a>>2]|0;if(!b)return;Ke(b);c[a>>2]=0;return;}function mc(a,d,e,f,g,h){a=a|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;C=i;i=i+112|0;z=C+80|0;A=C+60|0;B=C+40|0;y=C;if(d<<16>>16==0?(j=a+178|0,(b[j>>1]|0)!=0):0){B=a+180|0;h=a+182|0;e=j;B=b[B>>1]|0;f=c[g>>2]|0;A=f+2|0;b[f>>1]=B;h=b[h>>1]|0;B=f+4|0;b[A>>1]=h;A=a+184|0;A=b[A>>1]|0;h=f+6|0;b[B>>1]=A;B=a+186|0;B=b[B>>1]|0;a=f+8|0;b[h>>1]=B;e=b[e>>1]|0;f=f+10|0;c[g>>2]=f;b[a>>1]=e;i=C;return;}s=y+36|0;t=y+32|0;u=y+28|0;v=y+24|0;w=y+20|0;x=y+16|0;p=y+12|0;q=y+8|0;r=y+4|0;d=y;j=d+40|0;do{c[d>>2]=0;d=d+4|0;}while((d|0)<(j|0));o=7;d=0;while(1){n=b[a+160+(o<<1)>>1]|0;j=n<<16>>16;if(n<<16>>16<0)j=~((j^-4)>>2);else j=j>>>2;d=Rd(d,j&65535,h)|0;l=o*10|0;n=9;while(1){m=y+(n<<2)|0;k=c[m>>2]|0;D=b[a+(n+l<<1)>>1]|0;j=D+k|0;if((D^k|0)>-1&(j^k|0)<0){c[h>>2]=1;j=(k>>>31)+2147483647|0;}c[m>>2]=j;if((n|0)>0)n=n+-1|0;else break;}if((o|0)>0)o=o+-1|0;else break;}j=d<<16>>16;if(d<<16>>16<0)j=~((j^-2)>>1);else j=j>>>1;b[A+18>>1]=(c[s>>2]|0)>>>3;b[A+16>>1]=(c[t>>2]|0)>>>3;b[A+14>>1]=(c[u>>2]|0)>>>3;b[A+12>>1]=(c[v>>2]|0)>>>3;b[A+10>>1]=(c[w>>2]|0)>>>3;b[A+8>>1]=(c[x>>2]|0)>>>3;b[A+6>>1]=(c[p>>2]|0)>>>3;b[A+4>>1]=(c[q>>2]|0)>>>3;b[A+2>>1]=(c[r>>2]|0)>>>3;b[A>>1]=(c[y>>2]|0)>>>3;d=a+178|0;j=(((j<<16)+167772160|0)>>>16)+128|0;b[d>>1]=j;j=j<<16;if((j|0)<0)j=~((j>>16^-256)>>8);else j=j>>24;b[d>>1]=j;if((j|0)<=63){if((j|0)<0){b[d>>1]=0;j=0;}}else{b[d>>1]=63;j=63;}D=Ge(j<<8&65535,11560,h)|0;D=D<<16>>16>0?0:D<<16>>16<-14436?-14436:D;b[f>>1]=D;b[f+2>>1]=D;b[f+4>>1]=D;b[f+6>>1]=D;D=((D<<16>>16)*5443|0)>>>15&65535;b[f+8>>1]=D;b[f+10>>1]=D;b[f+12>>1]=D;b[f+14>>1]=D;ne(A,z,10,h);Ae(z,205,10,h);me(z,A,10,h);f=a+182|0;D=a+180|0;te(e,8,A,B,f,D,h);h=f;f=d;D=b[D>>1]|0;e=c[g>>2]|0;B=e+2|0;b[e>>1]=D;h=b[h>>1]|0;D=e+4|0;b[B>>1]=h;B=a+184|0;B=b[B>>1]|0;h=e+6|0;b[D>>1]=B;a=a+186|0;a=b[a>>1]|0;D=e+8|0;b[h>>1]=a;a=b[f>>1]|0;e=e+10|0;c[g>>2]=e;b[D>>1]=a;i=C;return;}function nc(a,d,f,g){a=a|0;d=d|0;f=f|0;g=g|0;var h=0,j=0,k=0,l=0,m=0,n=0;n=i;i=i+16|0;k=n+2|0;m=n;l=a+176|0;j=(e[l>>1]|0)+1|0;j=(j&65535|0)==8?0:j&65535;b[l>>1]=j;j=a+((j<<16>>16)*10<<1)|0;h=j+20|0;do{b[j>>1]=b[d>>1]|0;j=j+2|0;d=d+2|0;}while((j|0)<(h|0));d=0;h=160;while(1){j=b[f>>1]|0;d=(Z(j<<1,j)|0)+d|0;if((d|0)<0){d=2147483647;break;}h=h+-1<<16>>16;if(!(h<<16>>16))break;else f=f+2|0;}de(d,k,m,g);d=b[k>>1]|0;k=d<<16>>16;f=k<<10;if((f|0)!=(k<<26>>16|0)){c[g>>2]=1;f=d<<16>>16>0?32767:-32768;}b[a+160+(b[l>>1]<<1)>>1]=(((b[m>>1]|0)>>>5)+f<<16)+-558432256>>17;i=n;return;}function oc(a,d,e,f){a=a|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0;h=a+190|0;i=Rd(b[h>>1]|0,1,f)|0;b[h>>1]=i;g=a+188|0;do if(!(d<<16>>16)){a=b[g>>1]|0;if(!(a<<16>>16)){b[h>>1]=0;c[e>>2]=8;a=1;break;}h=(a&65535)+65535&65535;b[g>>1]=h;if((Rd(i,h,f)|0)<<16>>16<30){c[e>>2]=8;a=0;}else a=0;}else{b[g>>1]=7;a=0;}while(0);return a|0;}function pc(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;if(!(f<<16>>16)){f=a<<16>>16;if(((f<<16)+-5570560|0)<65536){b=(f*3|0)+-58+(b<<16>>16)|0;b=b&65535;return b|0;}else{b=f+112|0;b=b&65535;return b|0;}}if(!(g<<16>>16)){h=(a&65535)-(d&65535)<<16;b=(b<<16>>16)+2+(h>>15)+(h>>16)|0;b=b&65535;return b|0;}d=d<<16>>16;d=(((c&65535)-d<<16)+-327680|0)>0?d+5&65535:c;e=e<<16>>16;c=a<<16>>16;d=(((e-(d&65535)<<16)+-262144|0)>0?e+65532&65535:d)<<16>>16;e=d*196608|0;a=e+-393216>>16;f=((b&65535)<<16)+(c*196608|0)>>16;if(!(a-f&32768)){b=c+5-d|0;b=b&65535;return b|0;}if((e+196608>>16|0)>(f|0)){b=f+3-a|0;b=b&65535;return b|0;}else{b=c+11-d|0;b=b&65535;return b|0;}return 0;}function qc(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;e=a<<16>>16;do if(!(d<<16>>16)){if(a<<16>>16<95){e=((e*393216|0)+-6881280>>16)+(b<<16>>16)|0;break;}else{e=e+368|0;break;}}else e=((((e-(c&65535)|0)*393216|0)+196608|0)>>>16)+(b&65535)|0;while(0);return e&65535|0;}function rc(d,f,g,h){d=d|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0,m=0,n=0;i=c[h+96>>2]|0;if(d>>>0<8){m=(c[h+100>>2]|0)+(d<<2)|0;l=c[m>>2]|0;a[g>>0]=b[f+(b[l>>1]<<1)>>1]<<4|d|b[f+(b[l+2>>1]<<1)>>1]<<5|b[f+(b[l+4>>1]<<1)>>1]<<6|b[f+(b[l+6>>1]<<1)>>1]<<7;l=i+(d<<1)|0;h=b[l>>1]|0;if((h+-7|0)>4){i=4;k=4;d=1;while(1){n=b[f+(b[(c[m>>2]|0)+(i<<1)>>1]<<1)>>1]|0;h=g+(d<<16>>16)|0;a[h>>0]=n;n=e[f+(b[(c[m>>2]|0)+((k|1)<<16>>16<<1)>>1]<<1)>>1]<<1|n&65535;a[h>>0]=n;n=e[f+(b[(c[m>>2]|0)+((k|2)<<16>>16<<1)>>1]<<1)>>1]<<2|n;a[h>>0]=n;n=e[f+(b[(c[m>>2]|0)+((k|3)<<16>>16<<1)>>1]<<1)>>1]<<3|n;a[h>>0]=n;n=e[f+(b[(c[m>>2]|0)+(k+4<<16>>16<<16>>16<<1)>>1]<<1)>>1]<<4|n;a[h>>0]=n;n=e[f+(b[(c[m>>2]|0)+(k+5<<16>>16<<16>>16<<1)>>1]<<1)>>1]<<5|n;a[h>>0]=n;n=e[f+(b[(c[m>>2]|0)+(k+6<<16>>16<<16>>16<<1)>>1]<<1)>>1]<<6|n;a[h>>0]=n;j=k+8<<16>>16;d=d+1<<16>>16;a[h>>0]=e[f+(b[(c[m>>2]|0)+(k+7<<16>>16<<16>>16<<1)>>1]<<1)>>1]<<7|n;i=j<<16>>16;h=b[l>>1]|0;if((i|0)>=(h+-7|0))break;else k=j;}}else{j=4;d=1;}l=h+4&7;if(!l)return;i=g+(d<<16>>16)|0;a[i>>0]=0;h=0;k=0;d=0;while(1){k=(e[f+(b[(c[m>>2]|0)+(j<<16>>16<<1)>>1]<<1)>>1]&255)<>0]=k;d=d+1<<16>>16;h=d<<16>>16;if((h|0)>=(l|0))break;else j=j+1<<16>>16;}return;}if((d|0)==15){a[g>>0]=15;return;}a[g>>0]=b[f>>1]<<4|d|b[f+2>>1]<<5|b[f+4>>1]<<6|b[f+6>>1]<<7;h=i+(d<<1)|0;d=b[h>>1]|0;i=((d&65535)<<16)+262144>>16;m=i&-8;k=(m+524281|0)>>>3&65535;if(k<<16>>16>0){i=((i&-8)+524281|0)>>>3;l=((i<<3)+524280&524280)+12|0;j=1;d=f+8|0;while(1){a[g+(j<<16>>16)>>0]=e[d+2>>1]<<1|e[d>>1]|e[d+4>>1]<<2|e[d+6>>1]<<3|e[d+8>>1]<<4|e[d+10>>1]<<5|e[d+12>>1]<<6|e[d+14>>1]<<7;if(k<<16>>16>1){k=k+-1<<16>>16;j=j+1<<16>>16;d=d+16|0;}else break;}d=b[h>>1]|0;j=(i<<16)+65536>>16;}else{l=4;j=1;}d=(0-m|4)+(d&65535)<<16;k=d>>16;if(!k)return;j=g+j|0;a[j>>0]=0;if((d|0)>0){d=0;i=0;h=0;}else return;do{i=i&255|b[f+(l+d<<1)>>1]<>0]=i;h=h+1<<16>>16;d=h<<16>>16;}while((d|0)<(k|0));return;}function sc(d,f,g,h){d=d|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;o=c[h+100>>2]|0;n=c[h+96>>2]|0;a[g>>0]=d&15;n=n+(d<<1)|0;i=b[n>>1]|0;if(d>>>0>=8){l=((i&65535)<<16)+-458752|0;if((l|0)>0){m=1;k=f;while(1){f=k+16|0;h=m+1<<16>>16;a[g+(m<<16>>16)>>0]=e[k+14>>1]|e[k+12>>1]<<1|((e[k+2>>1]<<6|e[k>>1]<<7|e[k+4>>1]<<5|e[k+6>>1]<<4)&240|e[k+8>>1]<<3|e[k+10>>1]<<2)&252;l=l+-524288&-65536;if((l|0)<=0)break;else{m=h;k=f;}}i=b[n>>1]|0;}else h=1;m=i&7;i=g+(h<<16>>16)|0;a[i>>0]=0;if(!m)return;else{j=0;k=0;l=0;h=f;}while(1){k=k&255|b[h>>1]<<7-j;a[i>>0]=k;l=l+1<<16>>16;j=l<<16>>16;if((j|0)>=(m|0))break;else h=h+2|0;}return;}k=i<<16>>16;if(i<<16>>16>7){i=o+(d<<2)|0;h=0;m=0;j=1;while(1){p=e[f+(b[(c[i>>2]|0)+(h<<1)>>1]<<1)>>1]<<7;k=g+(j<<16>>16)|0;a[k>>0]=p;p=e[f+(b[(c[i>>2]|0)+((m|1)<<16>>16<<1)>>1]<<1)>>1]<<6|p;a[k>>0]=p;p=e[f+(b[(c[i>>2]|0)+((m|2)<<16>>16<<1)>>1]<<1)>>1]<<5|p;a[k>>0]=p;p=e[f+(b[(c[i>>2]|0)+((m|3)<<16>>16<<1)>>1]<<1)>>1]<<4|p;a[k>>0]=p;p=e[f+(b[(c[i>>2]|0)+((m|4)<<16>>16<<1)>>1]<<1)>>1]<<3|p&240;a[k>>0]=p;p=e[f+(b[(c[i>>2]|0)+((m|5)<<16>>16<<1)>>1]<<1)>>1]<<2|p;a[k>>0]=p;p=e[f+(b[(c[i>>2]|0)+((m|6)<<16>>16<<1)>>1]<<1)>>1]<<1|p;a[k>>0]=p;l=m+8<<16>>16;j=j+1<<16>>16;a[k>>0]=p&254|e[f+(b[(c[i>>2]|0)+((m|7)<<16>>16<<1)>>1]<<1)>>1];h=l<<16>>16;k=b[n>>1]|0;if((h|0)>=(k+-7|0))break;else m=l;}}else{l=0;j=1;}n=k&7;m=g+(j<<16>>16)|0;a[m>>0]=0;if(!n)return;j=o+(d<<2)|0;i=0;h=0;k=0;while(1){h=(e[f+(b[(c[j>>2]|0)+(l<<16>>16<<1)>>1]<<1)>>1]&255)<<7-i|h&255;a[m>>0]=h;k=k+1<<16>>16;i=k<<16>>16;if((i|0)>=(n|0))break;else l=l+1<<16>>16;}return;}function tc(d,f,g,h){d=d|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;o=c[h+100>>2]|0;n=c[h+96>>2]|0;a[g>>0]=d<<3;n=n+(d<<1)|0;i=b[n>>1]|0;if(d>>>0>=8){l=((i&65535)<<16)+-458752|0;if((l|0)>0){m=1;k=f;while(1){f=k+16|0;h=m+1<<16>>16;a[g+(m<<16>>16)>>0]=e[k+14>>1]|e[k+12>>1]<<1|((e[k+2>>1]<<6|e[k>>1]<<7|e[k+4>>1]<<5|e[k+6>>1]<<4)&240|e[k+8>>1]<<3|e[k+10>>1]<<2)&252;l=l+-524288&-65536;if((l|0)<=0)break;else{m=h;k=f;}}i=b[n>>1]|0;}else h=1;m=i&7;i=g+(h<<16>>16)|0;a[i>>0]=0;if(!m)return;else{j=0;k=0;l=0;h=f;}while(1){k=k&255|b[h>>1]<<7-j;a[i>>0]=k;l=l+1<<16>>16;j=l<<16>>16;if((j|0)>=(m|0))break;else h=h+2|0;}return;}k=i<<16>>16;if(i<<16>>16>7){i=o+(d<<2)|0;h=0;m=0;j=1;while(1){p=e[f+(b[(c[i>>2]|0)+(h<<1)>>1]<<1)>>1]<<7;k=g+(j<<16>>16)|0;a[k>>0]=p;p=e[f+(b[(c[i>>2]|0)+((m|1)<<16>>16<<1)>>1]<<1)>>1]<<6|p;a[k>>0]=p;p=e[f+(b[(c[i>>2]|0)+((m|2)<<16>>16<<1)>>1]<<1)>>1]<<5|p;a[k>>0]=p;p=e[f+(b[(c[i>>2]|0)+((m|3)<<16>>16<<1)>>1]<<1)>>1]<<4|p;a[k>>0]=p;p=e[f+(b[(c[i>>2]|0)+((m|4)<<16>>16<<1)>>1]<<1)>>1]<<3|p&240;a[k>>0]=p;p=e[f+(b[(c[i>>2]|0)+((m|5)<<16>>16<<1)>>1]<<1)>>1]<<2|p;a[k>>0]=p;p=e[f+(b[(c[i>>2]|0)+((m|6)<<16>>16<<1)>>1]<<1)>>1]<<1|p;a[k>>0]=p;l=m+8<<16>>16;j=j+1<<16>>16;a[k>>0]=p&254|e[f+(b[(c[i>>2]|0)+((m|7)<<16>>16<<1)>>1]<<1)>>1];h=l<<16>>16;k=b[n>>1]|0;if((h|0)>=(k+-7|0))break;else m=l;}}else{l=0;j=1;}n=k&7;m=g+(j<<16>>16)|0;a[m>>0]=0;if(!n)return;j=o+(d<<2)|0;i=0;h=0;k=0;while(1){h=(e[f+(b[(c[j>>2]|0)+(l<<16>>16<<1)>>1]<<1)>>1]&255)<<7-i|h&255;a[m>>0]=h;k=k+1<<16>>16;i=k<<16>>16;if((i|0)>=(n|0))break;else l=l+1<<16>>16;}return;}function uc(a){a=a|0;var d=0;if(!a){a=-1;return a|0;}c[a>>2]=0;d=Je(16)|0;if(!d){a=-1;return a|0;}b[d>>1]=0;b[d+2>>1]=0;b[d+4>>1]=0;b[d+6>>1]=0;b[d+8>>1]=0;b[d+10>>1]=0;b[d+12>>1]=0;b[d+14>>1]=0;c[a>>2]=d;a=0;return a|0;}function vc(a){a=a|0;if(!a){a=-1;return a|0;}b[a>>1]=0;b[a+2>>1]=0;b[a+4>>1]=0;b[a+6>>1]=0;b[a+8>>1]=0;b[a+10>>1]=0;b[a+12>>1]=0;b[a+14>>1]=0;a=0;return a|0;}function wc(a){a=a|0;var b=0;if(!a)return;b=c[a>>2]|0;if(!b)return;Ke(b);c[a>>2]=0;return;}function xc(a,d,e,f,g){a=a|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0;j=d<<16>>16<2722?0:d<<16>>16<5444?1:2;i=Ee(e,1,g)|0;l=a+4|0;if(!(e<<16>>16>200?i<<16>>16>(b[l>>1]|0):0)){i=b[a>>1]|0;if(i<<16>>16){h=i+-1<<16>>16;b[a>>1]=h;h=h<<16>>16!=0;k=5;}}else{b[a>>1]=8;h=1;k=5;}if((k|0)==5)if((j&65535)<2&h)j=(j&65535)+1&65535;k=a+6|0;b[k>>1]=d;h=Zd(k,5)|0;if(!(j<<16>>16!=0|h<<16>>16>5443)){if(h<<16>>16<0)h=16384;else{h=h<<16>>16;h=(((h<<18>>18|0)==(h|0)?h<<2:h>>>15^32767)<<16>>16)*24660>>15;if((h|0)>32767){c[g>>2]=1;h=32767;}h=16384-h&65535;}}else h=0;i=a+2|0;if(!(b[i>>1]|0))h=De(h,1,g)|0;b[f>>1]=h;b[i>>1]=h;b[l>>1]=e;f=a+12|0;b[a+14>>1]=b[f>>1]|0;e=a+10|0;b[f>>1]=b[e>>1]|0;a=a+8|0;b[e>>1]=b[a>>1]|0;b[a>>1]=b[k>>1]|0;return;}function yc(a){a=a|0;var d=0,e=0,f=0,g=0,h=0,i=0;if(!a){a=-1;return a|0;}c[a>>2]=0;d=Je(68)|0;f=d;if(!d){a=-1;return a|0;}c[d+28>>2]=0;g=d+64|0;c[g>>2]=0;h=d+32|0;if(((Ud(h)|0)<<16>>16==0?(i=d+48|0,(Ud(i)|0)<<16>>16==0):0)?(uc(g)|0)<<16>>16==0:0){e=d+32|0;do{b[d>>1]=0;d=d+2|0;}while((d|0)<(e|0));Ud(h)|0;Ud(i)|0;vc(c[g>>2]|0)|0;c[a>>2]=f;a=0;return a|0;}wc(g);Ke(d);a=-1;return a|0;}function zc(a){a=a|0;var b=0;if(!a)return;b=c[a>>2]|0;if(!b)return;wc(b+64|0);Ke(c[a>>2]|0);c[a>>2]=0;return;}function Ac(a){a=a|0;var d=0,e=0,f=0;if(!a){f=-1;return f|0;}d=a+32|0;e=a;f=e+32|0;do{b[e>>1]=0;e=e+2|0;}while((e|0)<(f|0));Ud(d)|0;Ud(a+48|0)|0;vc(c[a+64>>2]|0)|0;f=0;return f|0;}function Bc(a,d,f,g,h,j,k,l,m,n,o,p,q,r,s,t,u,v,w){a=a|0;d=d|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;p=p|0;q=q|0;r=r|0;s=s|0;t=t|0;u=u|0;v=v|0;w=w|0;var x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0;H=i;i=i+48|0;y=H+34|0;A=H+32|0;C=H+30|0;B=H+28|0;z=H+18|0;x=H+8|0;D=H+6|0;E=H+4|0;F=H+2|0;G=H;if(d){o=a+32|0;Vd(o,d,h,y,A,D,E,w);do if((d|0)!=7){Vb(d,j,k,l,m,n,z,x,G,F,w);if((d|0)==5){ld(c[a+64>>2]|0,f,g,h,z,x,b[D>>1]|0,b[E>>1]|0,b[y>>1]|0,b[A>>1]|0,40,b[G>>1]|0,b[F>>1]|0,p,s,t,C,B,u,v,w);break;}else{a=od(d,b[y>>1]|0,b[A>>1]|0,z,x,p,s,t,C,B,v,w)|0;j=c[u>>2]|0;c[u>>2]=j+2;b[j>>1]=a;break;}}else{b[t>>1]=Cc(k,m,w)|0;a=md(7,b[y>>1]|0,b[A>>1]|0,t,C,B,c[v+68>>2]|0,w)|0;j=c[u>>2]|0;c[u>>2]=j+2;b[j>>1]=a;}while(0);Wd(o,b[C>>1]|0,b[B>>1]|0);i=H;return;}if(!(o<<16>>16)){Vd(a+48|0,0,h,y,A,D,E,w);Vb(0,j,k,l,m,n,z,x,G,F,w);Wb(j,D,E,w);j=jd(a+32|0,b[a>>1]|0,b[a+2>>1]|0,a+8|0,a+18|0,b[a+4>>1]|0,b[a+6>>1]|0,h,b[y>>1]|0,b[A>>1]|0,x,z,b[D>>1]|0,b[E>>1]|0,p,q,r,s,t,w)|0;b[c[a+28>>2]>>1]=j;i=H;return;}o=c[u>>2]|0;c[u>>2]=o+2;c[a+28>>2]=o;o=a+48|0;f=a+32|0;q=f;q=e[q>>1]|e[q+2>>1]<<16;f=f+4|0;f=e[f>>1]|e[f+2>>1]<<16;u=o;r=u;b[r>>1]=q;b[r+2>>1]=q>>>16;u=u+4|0;b[u>>1]=f;b[u+2>>1]=f>>>16;u=a+40|0;f=u;f=e[f>>1]|e[f+2>>1]<<16;u=u+4|0;u=e[u>>1]|e[u+2>>1]<<16;r=a+56|0;q=r;b[q>>1]=f;b[q+2>>1]=f>>>16;r=r+4|0;b[r>>1]=u;b[r+2>>1]=u>>>16;r=a+2|0;Vd(o,0,h,a,r,D,E,w);Vb(0,j,k,l,m,n,a+18|0,a+8|0,G,F,w);l=(e[F>>1]|0)+1|0;u=b[G>>1]|0;q=l<<16>>16;if((l&65535)<<16>>16<0){v=0-q<<16;if((v|0)<983040)v=u<<16>>16>>(v>>16)&65535;else v=0;}else{u=u<<16>>16;v=u<>16>>q|0)==(u|0))v=v&65535;else v=(u>>>15^32767)&65535;}b[t>>1]=v;Wb(j,a+4|0,a+6|0,w);id(o,b[a>>1]|0,b[r>>1]|0,b[F>>1]|0,b[G>>1]|0,w);i=H;return;}function Cc(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,f=0,g=0;f=10;d=a;e=c;a=0;while(1){a=(Z(b[e>>1]>>1,b[d>>1]|0)|0)+a|0;a=a+(Z(b[e+2>>1]>>1,b[d+2>>1]|0)|0)|0;a=a+(Z(b[e+4>>1]>>1,b[d+4>>1]|0)|0)|0;a=a+(Z(b[e+6>>1]>>1,b[d+6>>1]|0)|0)|0;f=f+-1<<16>>16;if(!(f<<16>>16))break;else{d=d+8|0;e=e+8|0;}}d=a<<1;f=pe(d|1)|0;g=f<<16>>16;d=(f<<16>>16<17?d>>17-g:d<>16<1){c=0;return c|0;}else{f=20;e=c;a=0;}while(1){c=b[e>>1]>>1;c=((Z(c,c)|0)>>>2)+a|0;a=b[e+2>>1]>>1;a=c+((Z(a,a)|0)>>>2)|0;f=f+-1<<16>>16;if(!(f<<16>>16))break;else e=e+4|0;}a=a<<3;f=pe(a)|0;c=f<<16>>16;d=Td(d,(f<<16>>16<16?a>>16-c:a<>16;if((c|0)>65536)a=d<<16>>16>>a+-1;else a=d<<16>>16<<1-a;c=a&65535;return c|0;}function Dc(a,d,e,f,g,h){a=a|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;c[h>>2]=0;m=g<<16>>16;k=m>>>2&65535;o=k<<16>>16==0;if(o)j=0;else{l=k;i=e;j=0;while(1){p=b[i>>1]|0;p=(Z(p,p)|0)+j|0;j=b[i+2>>1]|0;j=p+(Z(j,j)|0)|0;p=b[i+4>>1]|0;p=j+(Z(p,p)|0)|0;j=b[i+6>>1]|0;j=p+(Z(j,j)|0)|0;l=l+-1<<16>>16;if(!(l<<16>>16))break;else i=i+8|0;}}if(!((j>>>31^1)&(j|0)<1073741824)){j=m>>>1&65535;if(!(j<<16>>16))j=1;else{i=j;l=e;j=0;while(1){p=b[l>>1]>>2;p=(Z(p,p)|0)+j|0;j=b[l+2>>1]>>2;j=p+(Z(j,j)|0)|0;i=i+-1<<16>>16;if(!(i<<16>>16))break;else l=l+4|0;}j=j<<1|1;}p=(pe(j)|0)<<16>>16;n=p+65532&65535;p=Ce(j<>16),h)|0;}c[h>>2]=0;do if(!(g<<16>>16)){j=1;q=14;}else{m=g;l=d;j=e;g=0;while(1){r=Z(b[j>>1]|0,b[l>>1]|0)|0;i=r+g|0;if((r^g|0)>0&(i^g|0)<0)break;m=m+-1<<16>>16;if(!(m<<16>>16)){q=13;break;}else{l=l+2|0;j=j+2|0;g=i;}}if((q|0)==13){j=i<<1|1;q=14;break;}c[h>>2]=1;if(o)j=1;else{j=d;i=0;while(1){i=(Z(b[e>>1]>>2,b[j>>1]|0)|0)+i|0;i=i+(Z(b[e+2>>1]>>2,b[j+2>>1]|0)|0)|0;i=i+(Z(b[e+4>>1]>>2,b[j+4>>1]|0)|0)|0;i=i+(Z(b[e+6>>1]>>2,b[j+6>>1]|0)|0)|0;k=k+-1<<16>>16;if(!(k<<16>>16))break;else{j=j+8|0;e=e+8|0;}}j=i<<1|1;}e=(pe(j)|0)<<16>>16;i=e+65532&65535;e=Ce(j<>16),h)|0;}b[f>>1]=p;j=n<<16>>16;b[f+2>>1]=15-j;b[f+4>>1]=e;i=i<<16>>16;b[f+6>>1]=15-i;if(e<<16>>16<4){r=0;return r|0;}i=De(Td(e<<16>>16>>>1&65535,p)|0,i-j&65535,h)|0;i=i<<16>>16>19661?19661:i;if((a|0)!=7){r=i;return r|0;}r=i&65532;return r|0;}function Ec(a,d,e,f,g,h,i){a=a|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,l=0,m=0,n=0,o=0;k=(f&65535)+65535&65535;if(k<<16>>16>g<<16>>16){n=f+-1<<16>>16<<16>>16;f=-2147483648;while(1){l=c[a+(0-n<<2)>>2]|0;j=l<<1;l=(j>>1|0)==(l|0)?j:l>>31^2147483647;j=c[a+(~n<<2)>>2]|0;m=l-j|0;if(((m^l)&(l^j)|0)<0){c[i>>2]=1;m=(l>>>31)+2147483647|0;}l=c[a+(1-n<<2)>>2]|0;j=m-l|0;if(((j^m)&(l^m)|0)<0){c[i>>2]=1;j=(m>>>31)+2147483647|0;}m=Gc(j)|0;f=(m|0)<(f|0)?f:m;k=k+-1<<16>>16;if(k<<16>>16<=g<<16>>16){g=f;break;}else n=n+-1|0;}}else g=-2147483648;a=e<<16>>16>0;if(a){f=0;j=d;k=0;while(1){m=b[j>>1]|0;m=Z(m,m)|0;if((m|0)!=1073741824){l=(m<<1)+k|0;if((m^k|0)>0&(l^k|0)<0){c[i>>2]=1;k=(k>>>31)+2147483647|0;}else k=l;}else{c[i>>2]=1;k=2147483647;}f=f+1<<16>>16;if(f<<16>>16>=e<<16>>16)break;else j=j+2|0;}if(a){a=0;n=d;f=d+-2|0;j=0;while(1){m=Z(b[f>>1]|0,b[n>>1]|0)|0;if((m|0)!=1073741824){l=(m<<1)+j|0;if((m^j|0)>0&(l^j|0)<0){c[i>>2]=1;j=(j>>>31)+2147483647|0;}else j=l;}else{c[i>>2]=1;j=2147483647;}a=a+1<<16>>16;if(a<<16>>16>=e<<16>>16)break;else{n=n+2|0;f=f+2|0;}}}else j=0;}else{k=0;j=0;}f=k<<1;f=(f>>1|0)==(k|0)?f:k>>31^2147483647;e=j<<1;e=(e>>1|0)==(j|0)?e:j>>31^2147483647;k=f-e|0;if(((k^f)&(e^f)|0)<0){c[i>>2]=1;k=(f>>>31)+2147483647|0;}a=Gc(k)|0;n=((pe(g)|0)&65535)+65535|0;k=n<<16>>16;if((n&65535)<<16>>16>0){f=g<>k|0)!=(g|0))f=g>>31^2147483647;}else{k=0-k<<16;if((k|0)<2031616)f=g>>(k>>16);else f=0;}m=pe(a)|0;j=m<<16>>16;if(m<<16>>16>0){k=a<>j|0)==(a|0))o=33;else{k=a>>31^2147483647;o=33;}}else{k=0-j<<16;if((k|0)<2031616){k=a>>(k>>16);o=33;}else l=0;}if((o|0)==33)if(k>>>0>65535)l=Td(f>>>16&65535,k>>>16&65535)|0;else l=0;k=m&65535;o=(n&65535)-k|0;f=o&65535;if(!(o&32768)){i=De(l,f,i)|0;b[h>>1]=i;return 0;}if(f<<16>>16!=-32768){i=k-n|0;j=i<<16>>16;if((i&65535)<<16>>16<0){j=0-j<<16;if((j|0)>=983040){i=0;b[h>>1]=i;return 0;}i=l<<16>>16>>(j>>16)&65535;b[h>>1]=i;return 0;}}else j=32767;f=l<<16>>16;k=f<>16>>j|0)==(f|0)){i=k&65535;b[h>>1]=i;return 0;}i=(f>>>15^32767)&65535;b[h>>1]=i;return 0;}function Fc(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;if(d<<16>>16)c=c<<16>>16<<1&65535;if(c<<16>>16<0){a=a+-2|0;c=(c&65535)+6&65535;}d=c<<16>>16;e=6-d<<16>>16;c=(Z(b[3468+(d<<1)>>1]|0,b[a>>1]|0)|0)+16384|0;c=c+(Z(b[3468+(e<<1)>>1]|0,b[a+2>>1]|0)|0)|0;c=c+(Z(b[3468+(d+6<<1)>>1]|0,b[a+-2>>1]|0)|0)|0;c=c+(Z(b[3468+(e+6<<1)>>1]|0,b[a+4>>1]|0)|0)|0;c=(Z(b[3468+(d+12<<1)>>1]|0,b[a+-4>>1]|0)|0)+c|0;c=c+(Z(b[3468+(e+12<<1)>>1]|0,b[a+6>>1]|0)|0)|0;d=c+(Z(b[3468+(d+18<<1)>>1]|0,b[a+-6>>1]|0)|0)|0;return(d+(Z(b[3468+(e+18<<1)>>1]|0,b[a+8>>1]|0)|0)|0)>>>15&65535|0;}function Gc(a){a=a|0;a=a-(a>>>31)|0;return a>>31^a|0;}function Hc(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;if(!(a<<16>>16))return;else{f=3518;g=3538;e=d;}while(1){e=e+2|0;c=c+2|0;j=b[c>>1]|0;i=b[f>>1]|0;d=Z(i,j)|0;d=(d|0)==1073741824?2147483647:d<<1;j=(Z(b[g>>1]|0,j)|0)>>15;h=(j<<1)+d|0;h=(d^j|0)>0&(h^d|0)<0?(d>>>31)+2147483647|0:h;i=(Z(i,b[e>>1]|0)|0)>>15;d=h+(i<<1)|0;d=(h^i|0)>0&(d^h|0)<0?(h>>>31)+2147483647|0:d;b[c>>1]=d>>>16;b[e>>1]=(d>>>1)-(d>>16<<15);a=a+-1<<16>>16;if(!(a<<16>>16))break;else{f=f+2|0;g=g+2|0;}}return;}function Ic(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;e=a&65535;f=e<<16;b=b<<16>>16;a=(b<<1)+f|0;if(!((b^f|0)>0&(a^f|0)<0)){f=a;return f|0;}c[d>>2]=1;f=(e>>>15)+2147483647|0;return f|0;}function Jc(a){a=a|0;var d=0,e=0,f=0;if(!a){f=-1;return f|0;}c[a>>2]=0;d=Je(22)|0;if(!d){f=-1;return f|0;}b[d>>1]=4096;e=d+2|0;f=e+20|0;do{b[e>>1]=0;e=e+2|0;}while((e|0)<(f|0));c[a>>2]=d;f=0;return f|0;}function Kc(a){a=a|0;var c=0;if(!a){c=-1;return c|0;}b[a>>1]=4096;a=a+2|0;c=a+20|0;do{b[a>>1]=0;a=a+2|0;}while((a|0)<(c|0));c=0;return c|0;}function Lc(a){a=a|0;var b=0;if(!a)return;b=c[a>>2]|0;if(!b)return;Ke(b);c[a>>2]=0;return;}function Mc(a,c,d,f,g,h){a=a|0;c=c|0;d=d|0;f=f|0;g=g|0;h=h|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0;K=i;i=i+96|0;I=K+66|0;J=K+44|0;H=K+22|0;k=K;D=c+2|0;G=d+2|0;F=(b[G>>1]<<1)+(e[D>>1]<<16)|0;j=Gc(F)|0;j=ic(j,b[c>>1]|0,b[d>>1]|0,h)|0;if((F|0)>0)j=Oc(j)|0;B=j>>16;b[g>>1]=Ce(j,h)|0;v=j>>20;E=I+2|0;b[E>>1]=v;F=J+2|0;b[F>>1]=(j>>>5)-(v<<15);v=Z(B,B)|0;v=(v|0)==1073741824?2147483647:v<<1;B=(Z((j>>>1)-(B<<15)<<16>>16,B)|0)>>15;C=B<<1;A=C+v|0;A=(B^v|0)>0&(A^v|0)<0?(v>>>31)+2147483647|0:A;C=A+C|0;C=2147483647-(Gc((A^B|0)>0&(C^A|0)<0?(A>>>31)+2147483647|0:C)|0)|0;A=C>>16;B=b[c>>1]|0;v=Z(A,B)|0;v=(v|0)==1073741824?2147483647:v<<1;B=(Z((C>>>1)-(A<<15)<<16>>16,B)|0)>>15;C=(B<<1)+v|0;C=(B^v|0)>0&(C^v|0)<0?(v>>>31)+2147483647|0:C;A=(Z(b[d>>1]|0,A)|0)>>15;v=C+(A<<1)|0;v=(C^A|0)>0&(v^C|0)<0?(C>>>31)+2147483647|0:v;C=pe(v)|0;v=v<<(C<<16>>16);A=H+2|0;B=k+2|0;l=v;v=(v>>>1)-(v>>16<<15)|0;w=k+4|0;x=H+4|0;y=2;z=2;while(1){u=l>>>16;j=u&65535;r=v&65535;s=z+-1|0;n=I+(s<<1)|0;t=J+(s<<1)|0;q=1;p=n;o=t;m=D;k=G;l=0;while(1){L=b[m>>1]|0;M=((Z(b[o>>1]|0,L)|0)>>15)+l|0;l=b[p>>1]|0;l=M+(Z(l,L)|0)+((Z(l,b[k>>1]|0)|0)>>15)|0;q=q+1<<16>>16;if((q<<16>>16|0)>=(z|0))break;else{p=p+-2|0;o=o+-2|0;m=m+2|0;k=k+2|0;}}M=(e[c+(z<<1)>>1]<<16)+(l<<5)+(b[d+(z<<1)>>1]<<1)|0;l=ic(Gc(M)|0,j,r,h)|0;if((M|0)>0)l=Oc(l)|0;k=C<<16>>16;if(C<<16>>16>0){j=l<>k|0)!=(l|0))j=l>>31^2147483647;}else{k=0-k<<16;if((k|0)<2031616)j=l>>(k>>16);else j=0;}q=j>>16;if((z|0)<5)b[g+(s<<1)>>1]=(j+32768|0)>>>16;M=(j>>>16)-(j>>>31)|0;if(((M<<16>>31^M)&65535)<<16>>16>32750){j=16;break;}o=(j>>>1)-(q<<15)<<16>>16;p=1;l=t;k=A;m=B;while(1){L=(Z(b[l>>1]|0,q)|0)>>15;t=b[n>>1]|0;M=(Z(t,o)|0)>>15;t=Z(t,q)|0;M=t+L+(b[J+(p<<1)>>1]|0)+(b[I+(p<<1)>>1]<<15)+M|0;b[k>>1]=M>>>15;b[m>>1]=M&32767;p=p+1|0;if((p&65535)<<16>>16==y<<16>>16)break;else{n=n+-2|0;l=l+-2|0;k=k+2|0;m=m+2|0;}}b[x>>1]=j>>20;b[w>>1]=(j>>>5)-(b[H+(z<<1)>>1]<<15);L=Z(q,q)|0;L=(L|0)==1073741824?2147483647:L<<1;j=(Z(o,q)|0)>>15;M=j<<1;k=M+L|0;k=(j^L|0)>0&(k^L|0)<0?(L>>>31)+2147483647|0:k;M=k+M|0;M=2147483647-(Gc((k^j|0)>0&(M^k|0)<0?(k>>>31)+2147483647|0:M)|0)|0;k=M>>16;j=u<<16>>16;j=((Z(k,v<<16>>16)|0)>>15)+(Z(k,j)|0)+((Z((M>>>1)-(k<<15)<<16>>16,j)|0)>>15)<<1;k=(pe(j)|0)<<16>>16;j=j<=11){j=20;break;}else{C=k+(C&65535)&65535;l=j;v=(j>>1)-(j>>16<<15)|0;w=w+2|0;x=x+2|0;y=y+1<<16>>16;}}if((j|0)==16){j=f+22|0;do{b[f>>1]=b[a>>1]|0;f=f+2|0;a=a+2|0;}while((f|0)<(j|0));M=g;L=M;b[L>>1]=0;b[L+2>>1]=0>>>16;M=M+4|0;b[M>>1]=0;b[M+2>>1]=0>>>16;i=K;return 0;}else if((j|0)==20){b[f>>1]=4096;M=((b[F>>1]|0)+8192+(b[E>>1]<<15)|0)>>>14&65535;b[f+2>>1]=M;b[a+2>>1]=M;M=((b[J+4>>1]|0)+8192+(b[I+4>>1]<<15)|0)>>>14&65535;b[f+4>>1]=M;b[a+4>>1]=M;M=((b[J+6>>1]|0)+8192+(b[I+6>>1]<<15)|0)>>>14&65535;b[f+6>>1]=M;b[a+6>>1]=M;M=((b[J+8>>1]|0)+8192+(b[I+8>>1]<<15)|0)>>>14&65535;b[f+8>>1]=M;b[a+8>>1]=M;M=((b[J+10>>1]|0)+8192+(b[I+10>>1]<<15)|0)>>>14&65535;b[f+10>>1]=M;b[a+10>>1]=M;M=((b[J+12>>1]|0)+8192+(b[I+12>>1]<<15)|0)>>>14&65535;b[f+12>>1]=M;b[a+12>>1]=M;M=((b[J+14>>1]|0)+8192+(b[I+14>>1]<<15)|0)>>>14&65535;b[f+14>>1]=M;b[a+14>>1]=M;M=((b[J+16>>1]|0)+8192+(b[I+16>>1]<<15)|0)>>>14&65535;b[f+16>>1]=M;b[a+16>>1]=M;M=((b[J+18>>1]|0)+8192+(b[I+18>>1]<<15)|0)>>>14&65535;b[f+18>>1]=M;b[a+18>>1]=M;M=((b[J+20>>1]|0)+8192+(b[I+20>>1]<<15)|0)>>>14&65535;b[f+20>>1]=M;b[a+20>>1]=M;i=K;return 0;}return 0;}function Nc(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;e=a>>16;b[c>>1]=e;b[d>>1]=(a>>>1)-(e<<15);return;}function Oc(a){a=a|0;return((a|0)==-2147483648?2147483647:0-a|0)|0;}function Pc(a){a=a|0;var b=0;if(!a){a=-1;return a|0;}c[a>>2]=0;b=Je(4)|0;if(!b){a=-1;return a|0;}c[b>>2]=0;if(!((Jc(b)|0)<<16>>16)){Kc(c[b>>2]|0)|0;c[a>>2]=b;a=0;return a|0;}else{Lc(b);Ke(b);a=-1;return a|0;}return 0;}function Qc(a){a=a|0;var b=0;if(!a)return;b=c[a>>2]|0;if(!b)return;Lc(b);Ke(c[a>>2]|0);c[a>>2]=0;return;}function Rc(a){a=a|0;if(!a){a=-1;return a|0;}Kc(c[a>>2]|0)|0;a=0;return a|0;}function Sc(a,b,d,e,f,g,h){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0,l=0,m=0;m=i;i=i+64|0;l=m+48|0;k=m+22|0;j=m;if((b|0)==7){d=c[g+116>>2]|0;Kb(e,10,j,k,c[g+112>>2]|0,h)|0;Hc(10,j,k,h);Mc(c[a>>2]|0,j,k,f+22|0,l,h)|0;Kb(e,10,j,k,d,h)|0;Hc(10,j,k,h);Mc(c[a>>2]|0,j,k,f+66|0,l,h)|0;i=m;return;}else{Kb(d,10,j,k,c[g+108>>2]|0,h)|0;Hc(10,j,k,h);Mc(c[a>>2]|0,j,k,f+66|0,l,h)|0;i=m;return;}}function Tc(a,c,d,e,f,g,h,i,j,k){a=a|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;if((d|0)==6){b[f>>1]=bd(a,c,e,20,143,80,g,h,i,j,k)|0;return;}b[h>>1]=0;b[h+2>>1]=0;if(d>>>0<2){b[f>>1]=Yc(c,d,e,20,143,160,i,j,k)|0;return;}if(d>>>0<6){b[f>>1]=Yc(c,d,e,20,143,80,i,j,k)|0;return;}else{b[f>>1]=Yc(c,d,e,18,143,80,i,j,k)|0;return;}}function Uc(a){a=a|0;var d=0;if((a|0)!=0?(c[a>>2]=0,d=Je(2)|0,(d|0)!=0):0){b[d>>1]=0;c[a>>2]=d;d=0;}else d=-1;return d|0;}function Vc(a){a=a|0;if(!a)a=-1;else{b[a>>1]=0;a=0;}return a|0;}function Wc(a){a=a|0;var b=0;if(!a)return;b=c[a>>2]|0;if(!b)return;Ke(b);c[a>>2]=0;return;}function Xc(a,c,d,f,g,h,j,k,l,m,n,o){a=a|0;c=c|0;d=d|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;var p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0;U=i;i=i+240|0;u=U+160|0;v=U+80|0;O=U;N=b[3558+(c*18|0)>>1]|0;T=b[3558+(c*18|0)+2>>1]|0;p=b[3558+(c*18|0)+4>>1]|0;P=b[3558+(c*18|0)+6>>1]|0;s=b[3558+(c*18|0)+12>>1]|0;r=b[3558+(c*18|0)+14>>1]|0;q=b[3558+(c*18|0)+16>>1]|0;a:do switch(k<<16>>16){case 0:case 80:if(c>>>0<2&k<<16>>16==80){Q=(e[a>>1]|0)-(s&65535)|0;Q=(Q<<16>>16|0)<(q<<16>>16|0)?q:Q&65535;M=r<<16>>16;R=(Q&65535)+M&65535;S=R<<16>>16>143;Q=S?143-M&65535:Q;R=S?143:R;S=1;break a;}else{Q=(e[d+((k<<16>>16!=0&1)<<1)>>1]|0)-(e[3558+(c*18|0)+8>>1]|0)|0;Q=(Q<<16>>16|0)<(q<<16>>16|0)?q:Q&65535;M=b[3558+(c*18|0)+10>>1]|0;R=(Q&65535)+M&65535;S=R<<16>>16>143;Q=S?143-M&65535:Q;R=S?143:R;S=0;break a;}default:{Q=(e[a>>1]|0)-(s&65535)|0;Q=(Q<<16>>16|0)<(q<<16>>16|0)?q:Q&65535;M=r<<16>>16;R=(Q&65535)+M&65535;S=R<<16>>16>143;Q=S?143-M&65535:Q;R=S?143:R;S=1;}}while(0);L=Q&65535;k=L+65532|0;t=k&65535;K=(R&65535)+4&65535;M=k<<16>>16;k=0-(k&65535)|0;s=k&65535;ec(f+(k<<16>>16<<1)|0,h,u,j);k=j<<16>>16;B=k>>>1&65535;w=B<<16>>16==0;if(w)j=1;else{j=B;q=u;d=v;r=0;while(1){J=b[q>>1]|0;b[d>>1]=J>>>2;J=(Z(J,J)|0)+r|0;r=b[q+2>>1]|0;b[d+2>>1]=r>>>2;r=J+(Z(r,r)|0)|0;j=j+-1<<16>>16;if(!(j<<16>>16))break;else{q=q+4|0;d=d+4|0;}}j=(r|0)<33554433;}J=j?0:2;A=j?u:v;x=j?u:v;b:do if(t<<16>>16<=K<<16>>16){y=k+-1|0;G=A+(y<<1)|0;H=h+(y<<1)|0;I=A+(k+-2<<1)|0;D=y>>>1;E=D&65535;z=E<<16>>16==0;F=j?12:14;D=(D<<1)+131070&131070;d=k+-3-D|0;C=A+(d<<1)|0;D=A+(k+-4-D<<1)|0;h=h+(d<<1)|0;if(!w){w=M;while(1){v=B;u=x;q=g;r=0;j=0;while(1){v=v+-1<<16>>16;k=b[u>>1]|0;r=(Z(k,b[q>>1]|0)|0)+r|0;k=(Z(k,k)|0)+j|0;j=b[u+2>>1]|0;r=r+(Z(j,b[q+2>>1]|0)|0)|0;j=k+(Z(j,j)|0)|0;if(!(v<<16>>16))break;else{u=u+4|0;q=q+4|0;}}u=ce(j<<1,o)|0;j=u>>16;q=r<<1>>16;v=Z(j,q)|0;v=(v|0)==1073741824?2147483647:v<<1;q=(Z((u>>>1)-(j<<15)<<16>>16,q)|0)>>15;u=(q<<1)+v|0;u=(q^v|0)>0&(u^v|0)<0?(v>>>31)+2147483647|0:u;j=(Z(j,r&32767)|0)>>15;v=u+(j<<1)|0;b[O+(w-M<<1)>>1]=(u^j|0)>0&(v^u|0)<0?(u>>>31)+65535|0:v;if(t<<16>>16!=K<<16>>16){s=s+-1<<16>>16;v=b[f+(s<<16>>16<<1)>>1]|0;if(z){u=y;j=I;r=H;q=G;}else{u=E;j=I;r=H;q=G;while(1){w=(Z(b[r>>1]|0,v)|0)>>F;b[q>>1]=w+(e[j>>1]|0);w=(Z(b[r+-2>>1]|0,v)|0)>>F;b[q+-2>>1]=w+(e[j+-2>>1]|0);u=u+-1<<16>>16;if(!(u<<16>>16)){u=d;j=D;r=h;q=C;break;}else{j=j+-4|0;r=r+-4|0;q=q+-4|0;}}}w=(Z(b[r>>1]|0,v)|0)>>F;b[q>>1]=w+(e[j>>1]|0);b[A+(u+-1<<1)>>1]=v>>J;}t=t+1<<16>>16;if(t<<16>>16>K<<16>>16)break b;else w=t<<16>>16;}}if(z){j=A+(k+-2<<1)|0;r=M;while(1){ce(0,o)|0;b[O+(r-M<<1)>>1]=0;if(t<<16>>16!=K<<16>>16){s=s+-1<<16>>16;g=b[f+(s<<16>>16<<1)>>1]|0;E=(Z(b[H>>1]|0,g)|0)>>F;b[G>>1]=E+(e[I>>1]|0);b[j>>1]=g>>J;}t=t+1<<16>>16;if(t<<16>>16>K<<16>>16)break b;else r=t<<16>>16;}}u=A+(d+-1<<1)|0;j=M;while(1){ce(0,o)|0;b[O+(j-M<<1)>>1]=0;if(t<<16>>16!=K<<16>>16){s=s+-1<<16>>16;j=b[f+(s<<16>>16<<1)>>1]|0;r=E;q=I;d=H;k=G;while(1){g=(Z(b[d>>1]|0,j)|0)>>F;b[k>>1]=g+(e[q>>1]|0);g=(Z(b[d+-2>>1]|0,j)|0)>>F;b[k+-2>>1]=g+(e[q+-2>>1]|0);r=r+-1<<16>>16;if(!(r<<16>>16))break;else{q=q+-4|0;d=d+-4|0;k=k+-4|0;}}g=(Z(b[h>>1]|0,j)|0)>>F;b[C>>1]=g+(e[D>>1]|0);b[u>>1]=j>>J;}t=t+1<<16>>16;if(t<<16>>16>K<<16>>16)break;else j=t<<16>>16;}}while(0);t=Q<<16>>16;d=L+1&65535;if(d<<16>>16>R<<16>>16)h=Q;else{s=Q;k=b[O+(t-M<<1)>>1]|0;while(1){r=b[O+((d<<16>>16)-M<<1)>>1]|0;q=r<<16>>16>16;s=q?s:d;d=d+1<<16>>16;if(d<<16>>16>R<<16>>16){h=s;break;}else k=q?k:r;}}c:do if(!(S<<16>>16==0?h<<16>>16>N<<16>>16:0)){if(!(c>>>0<4&S<<16>>16!=0)){s=O+((h<<16>>16)-M<<1)|0;r=Fc(s,p,T,o)|0;d=(p&65535)+1&65535;if(d<<16>>16<=P<<16>>16)while(1){q=Fc(s,d,T,o)|0;k=q<<16>>16>r<<16>>16;p=k?d:p;d=d+1<<16>>16;if(d<<16>>16>P<<16>>16)break;else r=k?q:r;}if((c+-7|0)>>>0<2){P=p<<16>>16==-3;d=(P<<31>>31)+h<<16>>16;p=P?3:p;break;}switch(p<<16>>16){case-2:{d=h+-1<<16>>16;p=1;break c;}case 2:{d=h+1<<16>>16;p=-1;break c;}default:{d=h;break c;}}}N=b[a>>1]|0;N=((N<<16>>16)-t|0)>5?t+5&65535:N;k=R<<16>>16;N=(k-(N<<16>>16)|0)>4?k+65532&65535:N;k=h<<16>>16;d=N<<16>>16;if((k|0)==(d+-1|0)?1:h<<16>>16==N<<16>>16){s=O+(k-M<<1)|0;k=Fc(s,p,T,o)|0;d=(p&65535)+1&65535;if(d<<16>>16<=P<<16>>16)while(1){r=Fc(s,d,T,o)|0;q=r<<16>>16>k<<16>>16;p=q?d:p;d=d+1<<16>>16;if(d<<16>>16>P<<16>>16)break;else k=q?r:k;}if((c+-7|0)>>>0<2){P=p<<16>>16==-3;d=(P<<31>>31)+h<<16>>16;p=P?3:p;break;}switch(p<<16>>16){case-2:{d=h+-1<<16>>16;p=1;break c;}case 2:{d=h+1<<16>>16;p=-1;break c;}default:{d=h;break c;}}}if((k|0)==(d+-2|0)){d=O+(k-M<<1)|0;k=Fc(d,0,T,o)|0;if((c|0)!=8){p=0;s=1;while(1){r=Fc(d,s,T,o)|0;q=r<<16>>16>k<<16>>16;p=q?s:p;s=s+1<<16>>16;if(s<<16>>16>P<<16>>16)break;else k=q?r:k;}if((c+-7|0)>>>0>=2)switch(p<<16>>16){case-2:{d=h+-1<<16>>16;p=1;break c;}case 2:{d=h+1<<16>>16;p=-1;break c;}default:{d=h;break c;}}}else p=0;P=p<<16>>16==-3;d=(P<<31>>31)+h<<16>>16;p=P?3:p;break;}if((k|0)==(d+1|0)){s=O+(k-M<<1)|0;d=Fc(s,p,T,o)|0;k=(p&65535)+1&65535;if(k<<16>>16<=0)while(1){q=Fc(s,k,T,o)|0;r=q<<16>>16>d<<16>>16;p=r?k:p;k=k+1<<16>>16;if(k<<16>>16>0)break;else d=r?q:d;}if((c+-7|0)>>>0<2){P=p<<16>>16==-3;d=(P<<31>>31)+h<<16>>16;p=P?3:p;break;}switch(p<<16>>16){case-2:{d=h+-1<<16>>16;p=1;break c;}case 2:{d=h+1<<16>>16;p=-1;break c;}default:{d=h;break c;}}}else{d=h;p=0;}}else{d=h;p=0;}while(0);if((c+-7|0)>>>0>1){P=a;a=pc(d,p,b[a>>1]|0,Q,R,S,c>>>0<4&1,o)|0;b[n>>1]=a;b[P>>1]=d;b[m>>1]=T;b[l>>1]=p;i=U;return d|0;}else{o=qc(d,p,Q,S,o)|0;b[n>>1]=o;b[a>>1]=d;b[m>>1]=T;b[l>>1]=p;i=U;return d|0;}return 0;}function Yc(a,d,e,f,g,h,j,k,l){a=a|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;l=l|0;var m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;D=i;i=i+1200|0;B=D+1188|0;A=D+580|0;C=D+578|0;z=D+576|0;v=D;x=D+582|0;y=(k|0)!=0;do if(y)if(d>>>0<2){Ld(a,1,l);break;}else{Ld(a,0,l);break;}while(0);w=g<<16>>16;o=0-w|0;n=e+(o<<1)|0;o=o&65535;s=h<<16>>16;do if(o<<16>>16>16){r=o;q=n;o=0;while(1){t=b[q>>1]|0;o=(Z(t<<1,t)|0)+o|0;if((o|0)<0)break;r=r+1<<16>>16;if(r<<16>>16>=h<<16>>16){u=14;break;}else q=q+2|0;}if((u|0)==14){if((o|0)<1048576){u=15;break;}Oe(x|0,n|0,s+w<<1|0)|0;t=0;break;}m=s+w|0;p=m>>>1;r=p&65535;if(!(r<<16>>16))o=x;else{t=((p<<1)+131070&131070)+2|0;s=t-w|0;q=x;while(1){b[q>>1]=(b[n>>1]|0)>>>3;b[q+2>>1]=(b[n+2>>1]|0)>>>3;r=r+-1<<16>>16;if(!(r<<16>>16))break;else{n=n+4|0;q=q+4|0;}}n=e+(s<<1)|0;o=x+(t<<1)|0;}if(!(m&1))t=3;else{b[o>>1]=(b[n>>1]|0)>>>3;t=3;}}else u=15;while(0);if((u|0)==15){t=s+w|0;o=t>>>1;p=o&65535;if(!(p<<16>>16))o=x;else{s=((o<<1)+131070&131070)+2|0;q=s-w|0;r=x;while(1){b[r>>1]=b[n>>1]<<3;b[r+2>>1]=b[n+2>>1]<<3;p=p+-1<<16>>16;if(!(p<<16>>16))break;else{n=n+4|0;r=r+4|0;}}n=e+(q<<1)|0;o=x+(s<<1)|0;}if(!(t&1))t=-3;else{b[o>>1]=b[n>>1]<<3;t=-3;}}s=v+(w<<2)|0;q=x+(w<<1)|0;Tb(q,h,g,f,s);m=(d|0)==7&1;o=f<<16>>16;n=o<<2;if((n|0)!=(o<<18>>16|0)){c[l>>2]=1;n=f<<16>>16>0?32767:-32768;}r=Zc(a,s,q,t,m,h,g,n&65535,B,k,l)|0;o=o<<1;p=Zc(a,s,q,t,m,h,n+65535&65535,o&65535,A,k,l)|0;o=Zc(a,s,q,t,m,h,o+65535&65535,f,C,k,l)|0;if(j<<16>>16==1&y){Ec(s,q,h,g,f,z,l)|0;Jd(a,b[z>>1]|0);}n=b[B>>1]|0;m=b[A>>1]|0;if(((n<<16>>16)*55706>>16|0)>=(m<<16>>16|0)){A=n;B=r;A=A<<16>>16;A=A*55706|0;A=A>>16;C=b[C>>1]|0;C=C<<16>>16;C=(A|0)<(C|0);C=C?o:B;i=D;return C|0;}b[B>>1]=m;A=m;B=p;A=A<<16>>16;A=A*55706|0;A=A>>16;C=b[C>>1]|0;C=C<<16>>16;C=(A|0)<(C|0);C=C?o:B;i=D;return C|0;}function Zc(a,d,e,f,g,h,i,j,k,l,m){a=a|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;m=m|0;var n=0,o=0,p=0,q=0,r=0;if(i<<16>>16>16){j=-2147483648;p=i;}else{p=i;n=-2147483648;o=d+(0-(i<<16>>16)<<2)|0;d=i;while(1){i=c[o>>2]|0;r=(i|0)<(n|0);d=r?d:p;n=r?n:i;p=p+-1<<16>>16;if(p<<16>>16>16){j=n;p=d;break;}else o=o+4|0;}}d=h<<16>>16>>>2&65535;if(!(d<<16>>16))d=0;else{n=d;i=e+(0-(p<<16>>16)<<1)|0;d=0;while(1){r=b[i>>1]|0;r=(Z(r,r)|0)+d|0;d=b[i+2>>1]|0;d=r+(Z(d,d)|0)|0;r=b[i+4>>1]|0;r=d+(Z(r,r)|0)|0;d=b[i+6>>1]|0;d=r+(Z(d,d)|0)|0;n=n+-1<<16>>16;if(!(n<<16>>16))break;else i=i+8|0;}d=d<<1;}if(l)Kd(a,j,d,m);d=ce(d,m)|0;i=g<<16>>16!=0;if(i)d=(d|0)>1073741823?2147483647:d<<1;g=j>>16;a=d>>16;m=Z(a,g)|0;m=(m|0)==1073741824?2147483647:m<<1;d=(Z((d>>>1)-(a<<15)<<16>>16,g)|0)>>15;r=(d<<1)+m|0;r=(d^m|0)>0&(r^m|0)<0?(m>>>31)+2147483647|0:r;g=(Z(a,(j>>>1)-(g<<15)<<16>>16)|0)>>15;d=r+(g<<1)|0;d=(r^g|0)>0&(d^r|0)<0?(r>>>31)+2147483647|0:d;if(!i){b[k>>1]=d;return p|0;}i=f<<16>>16;if(f<<16>>16>0){if(f<<16>>16<31){i=d>>i;q=16;}else i=0;}else{q=0-i<<16>>16;i=d<>q|0)==(d|0)?i:d>>31^2147483647;q=16;}if((q|0)==16){if((i|0)>65535){b[k>>1]=32767;return p|0;}if((i|0)<-65536){b[k>>1]=-32768;return p|0;}}b[k>>1]=i>>>1;return p|0;}function _c(a){a=a|0;var d=0;if(!a){a=-1;return a|0;}c[a>>2]=0;d=Je(6)|0;if(!d){a=-1;return a|0;}b[d>>1]=40;b[d+2>>1]=0;b[d+4>>1]=0;c[a>>2]=d;a=0;return a|0;}function $c(a){a=a|0;if(!a){a=-1;return a|0;}b[a>>1]=40;b[a+2>>1]=0;b[a+4>>1]=0;a=0;return a|0;}function ad(a){a=a|0;var b=0;if(!a)return;b=c[a>>2]|0;if(!b)return;Ke(b);c[a>>2]=0;return;}function bd(a,d,e,f,g,h,j,k,l,m,n){a=a|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;var o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0;F=i;i=i+1200|0;w=F+1186|0;x=F+1184|0;E=F+1182|0;v=F;z=F+576|0;y=g<<16>>16;D=z+(y<<1)|0;o=(0-y&65535)<<16>>16>16;if(o){s=0-g<<16>>16<<16>>16;p=0;do{r=b[e+(s<<1)>>1]|0;r=Z(r,r)|0;if((r|0)!=1073741824){q=(r<<1)+p|0;if((r^p|0)>0&(q^p|0)<0){c[n>>2]=1;p=(p>>>31)+2147483647|0;}else p=q;}else{c[n>>2]=1;p=2147483647;}s=s+1|0;}while((s&65535)<<16>>16!=h<<16>>16);}else p=0;if((2147483646-p&p|0)>=0){if((p|0)==2147483647){if(o){p=0-g<<16>>16<<16>>16;do{b[z+(p+y<<1)>>1]=De(b[e+(p<<1)>>1]|0,3,n)|0;p=p+1|0;}while((p&65535)<<16>>16!=h<<16>>16);}}else t=14;}else{c[n>>2]=1;t=14;}do if((t|0)==14){if((1048575-p&p|0)<0){c[n>>2]=1;p=(p>>>31)+2147483647|0;}else p=p+-1048576|0;if((p|0)>=0){if(!o)break;C=0-g<<16>>16<<16>>16;Oe(z+(y+C<<1)|0,e+(C<<1)|0,(((h+g<<16>>16)+-1&65535)<<1)+2|0)|0;break;}if(o){p=0-g<<16>>16<<16>>16;do{C=b[e+(p<<1)>>1]|0;b[z+(p+y<<1)>>1]=(C<<19>>19|0)==(C|0)?C<<3:C>>>15^32767;p=p+1|0;}while((p&65535)<<16>>16!=h<<16>>16);}}while(0);B=v+(y<<2)|0;Tb(D,h,g,f,B);s=b[a>>1]|0;C=a+4|0;A=k+(l<<16>>16<<1)|0;a:do if(g<<16>>16>16)u=g;else{if((b[C>>1]|0)<=0){e=g;k=-2147483648;r=g;t=3402;while(1){Nc(c[v+(y-(e<<16>>16)<<2)>>2]|0,w,x,n);q=b[x>>1]|0;p=b[t>>1]|0;s=Z(p,b[w>>1]|0)|0;if((s|0)==1073741824){c[n>>2]=1;o=2147483647;}else o=s<<1;u=(Z(p,q<<16>>16)|0)>>15;s=o+(u<<1)|0;if((o^u|0)>0&(s^o|0)<0){c[n>>2]=1;s=(o>>>31)+2147483647|0;}q=(s|0)<(k|0);r=q?r:e;e=e+-1<<16>>16;if(e<<16>>16>16){u=r;break a;}else{k=q?k:s;t=t+-2|0;}}}k=g;o=-2147483648;r=g;u=2902+(y+123-(s<<16>>16)<<1)|0;e=3402;while(1){Nc(c[v+(y-(k<<16>>16)<<2)>>2]|0,w,x,n);t=b[x>>1]|0;q=b[e>>1]|0;s=Z(q,b[w>>1]|0)|0;if((s|0)==1073741824){c[n>>2]=1;p=2147483647;}else p=s<<1;t=(Z(q,t<<16>>16)|0)>>15;s=p+(t<<1)|0;if((p^t|0)>0&(s^p|0)<0){c[n>>2]=1;s=(p>>>31)+2147483647|0;}Nc(s,w,x,n);t=b[x>>1]|0;q=b[u>>1]|0;s=Z(q,b[w>>1]|0)|0;if((s|0)==1073741824){c[n>>2]=1;p=2147483647;}else p=s<<1;t=(Z(q,t<<16>>16)|0)>>15;s=p+(t<<1)|0;if((p^t|0)>0&(s^p|0)<0){c[n>>2]=1;s=(p>>>31)+2147483647|0;}q=(s|0)<(o|0);r=q?r:k;k=k+-1<<16>>16;if(k<<16>>16>16){u=r;break;}else{o=q?o:s;u=u+-2|0;e=e+-2|0;}}}while(0);if(h<<16>>16>0){k=0;e=D;t=z+(y-(u<<16>>16)<<1)|0;r=0;p=0;while(1){s=b[t>>1]|0;q=Z(s,b[e>>1]|0)|0;if((q|0)!=1073741824){o=(q<<1)+r|0;if((q^r|0)>0&(o^r|0)<0){c[n>>2]=1;r=(r>>>31)+2147483647|0;}else r=o;}else{c[n>>2]=1;r=2147483647;}o=Z(s,s)|0;if((o|0)!=1073741824){q=(o<<1)+p|0;if((o^p|0)>0&(q^p|0)<0){c[n>>2]=1;p=(p>>>31)+2147483647|0;}else p=q;}else{c[n>>2]=1;p=2147483647;}k=k+1<<16>>16;if(k<<16>>16>=h<<16>>16)break;else{e=e+2|0;t=t+2|0;}}}else{r=0;p=0;}q=(m|0)==0;if(!q){Ld(d,0,n);Kd(d,r,p,n);}o=(Ce(p,n)|0)<<16>>16;if((o*13107|0)==1073741824){c[n>>2]=1;p=2147483647;}else p=o*26214|0;o=r-p|0;if(((o^r)&(p^r)|0)<0){c[n>>2]=1;o=(r>>>31)+2147483647|0;}m=Ce(o,n)|0;b[A>>1]=m;if(m<<16>>16>0){o=j+6|0;b[j+8>>1]=b[o>>1]|0;m=j+4|0;b[o>>1]=b[m>>1]|0;o=j+2|0;b[m>>1]=b[o>>1]|0;b[o>>1]=b[j>>1]|0;b[j>>1]=u;b[a>>1]=Zd(j,5)|0;b[a+2>>1]=32767;o=32767;}else{b[a>>1]=u;a=a+2|0;o=((b[a>>1]|0)*29491|0)>>>15&65535;b[a>>1]=o;}b[C>>1]=((Ge(o,9830,n)|0)&65535)>>>15^1;if(q){i=F;return u|0;}if((Ge(l,1,n)|0)<<16>>16){i=F;return u|0;}Ec(B,D,h,g,f,E,n)|0;Jd(d,b[E>>1]|0);i=F;return u|0;}function cd(a,b,c,d,e,f,g,h,j,k){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;var l=0,m=0;k=i;i=i+48|0;m=k+22|0;l=k;b=a>>>0<6?b:c;c=f<<16>>16>0?22:0;a=e+(c<<1)|0;Ie(a,b,m);Ie(a,d,l);a=f<<16>>16;f=j+(a<<1)|0;Be(m,g+(a<<1)|0,f,40);He(l,f,f,40,h,1);c=e+(((c<<16)+720896|0)>>>16<<1)|0;Ie(c,b,m);Ie(c,d,l);a=(a<<16)+2621440>>16;j=j+(a<<1)|0;Be(m,g+(a<<1)|0,j,40);He(l,j,j,40,h,1);i=k;return;}function dd(a){a=a|0;var d=0;if(!a){a=-1;return a|0;}c[a>>2]=0;d=Je(12)|0;if(!d){a=-1;return a|0;}b[d>>1]=0;b[d+2>>1]=0;b[d+4>>1]=0;b[d+6>>1]=0;b[d+8>>1]=0;b[d+10>>1]=0;c[a>>2]=d;a=0;return a|0;}function ed(a){a=a|0;if(!a){a=-1;return a|0;}b[a>>1]=0;b[a+2>>1]=0;b[a+4>>1]=0;b[a+6>>1]=0;b[a+8>>1]=0;b[a+10>>1]=0;a=0;return a|0;}function fd(a){a=a|0;var b=0;if(!a)return;b=c[a>>2]|0;if(!b)return;Ke(b);c[a>>2]=0;return;}function gd(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;m=a+10|0;f=b[m>>1]|0;n=a+8|0;e=b[n>>1]|0;if(!(d<<16>>16)){a=e;l=f;b[m>>1]=l;b[n>>1]=a;return;}i=a+4|0;j=a+6|0;k=a+2|0;h=b[j>>1]|0;l=b[i>>1]|0;g=d;d=f;while(1){o=(Z(b[a>>1]|0,-3733)|0)+(((l<<16>>16)*7807|0)+((h<<16>>16)*7807>>15))|0;b[a>>1]=l;o=o+((Z(b[k>>1]|0,-3733)|0)>>15)|0;b[k>>1]=h;o=((d<<16>>16)*1899|0)+o+(Z(e<<16>>16,-3798)|0)|0;d=b[c>>1]|0;o=o+((d<<16>>16)*1899|0)|0;b[c>>1]=(o+2048|0)>>>12;f=o>>>12;l=f&65535;b[i>>1]=l;h=(o<<3)-(f<<15)&65535;b[j>>1]=h;g=g+-1<<16>>16;if(!(g<<16>>16))break;else{o=e;c=c+2|0;e=d;d=o;}}b[m>>1]=e;b[n>>1]=d;return;}function hd(a,d,e,f){a=a|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0;g=b[(c[f+88>>2]|0)+(a<<1)>>1]|0;if(!(g<<16>>16))return;j=e;i=c[(c[f+92>>2]|0)+(a<<2)>>2]|0;while(1){e=b[i>>1]|0;if(!(e<<16>>16))e=0;else{a=b[d>>1]|0;h=e;f=j+((e<<16>>16)+-1<<1)|0;while(1){e=a<<16>>16;b[f>>1]=e&1;h=h+-1<<16>>16;if(!(h<<16>>16))break;else{a=e>>>1&65535;f=f+-2|0;}}e=b[i>>1]|0;}d=d+2|0;g=g+-1<<16>>16;if(!(g<<16>>16))break;else{j=j+(e<<16>>16<<1)|0;i=i+2|0;}}return;}function id(a,d,f,g,h,j){a=a|0;d=d|0;f=f|0;g=g|0;h=h|0;j=j|0;var k=0,l=0,m=0,n=0,o=0;o=i;i=i+16|0;m=o+2|0;n=o;k=h<<16>>16;if(h<<16>>16<1){j=-5443;n=-32768;Wd(a,n,j);i=o;return;}l=re(14,f,j)|0;if((k|0)<(l<<16>>16|0))f=g;else{f=(g&65535)+1&65535;h=k>>>1&65535;}g=Td(h,l&65535)|0;b[n>>1]=g;de(g<<16>>16,m,n,j);b[m>>1]=((((f&65535)-(d&65535)<<16)+-65536|0)>>>16)+(e[m>>1]|0);g=Ee(b[n>>1]|0,5,j)|0;k=b[m>>1]|0;g=((k&65535)<<10)+(g&65535)&65535;if(g<<16>>16>18284){j=3037;n=18284;Wd(a,n,j);i=o;return;}h=b[n>>1]|0;k=k<<16>>16;if((k*24660|0)==1073741824){c[j>>2]=1;f=2147483647;}else f=k*49320|0;n=(h<<16>>16)*24660>>15;k=f+(n<<1)|0;if((f^n|0)>0&(k^f|0)<0){c[j>>2]=1;k=(f>>>31)+2147483647|0;}n=k<<13;j=Ce((n>>13|0)==(k|0)?n:k>>31^2147483647,j)|0;n=g;Wd(a,n,j);i=o;return;}function jd(a,d,f,g,h,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x){a=a|0;d=d|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;p=p|0;q=q|0;r=r|0;s=s|0;t=t|0;u=u|0;v=v|0;w=w|0;x=x|0;var y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0;ha=i;i=i+80|0;da=ha+66|0;ea=ha+64|0;fa=ha+62|0;ga=ha+60|0;O=ha+40|0;P=ha+20|0;M=ha;b[da>>1]=d;b[ea>>1]=m;b[fa>>1]=n;L=re(14,f,x)|0;ca=L&65535;b[ga>>1]=ca;N=re(14,n,x)|0;K=(e[g>>1]|0)+65523|0;b[M>>1]=K;E=(e[g+2>>1]|0)+65522|0;F=M+2|0;b[F>>1]=E;G=((d&65535)<<16)+-720896|0;B=G>>16;G=(G>>>15)+15+(e[g+4>>1]|0)|0;H=M+4|0;b[H>>1]=G;I=(e[g+6>>1]|0)+B|0;J=M+6|0;b[J>>1]=I;B=B+1+(e[g+8>>1]|0)|0;C=M+8|0;b[C>>1]=B;y=(e[o>>1]|0)+65523&65535;b[M+10>>1]=y;D=(e[o+2>>1]|0)+65522&65535;b[M+12>>1]=D;z=((m&65535)<<16)+-720896|0;g=z>>16;z=(z>>>15)+15+(e[o+4>>1]|0)&65535;b[M+14>>1]=z;A=(e[o+6>>1]|0)+g&65535;b[M+16>>1]=A;g=g+1+(e[o+8>>1]|0)&65535;b[M+18>>1]=g;aa=(j&65535)-(q&65535)<<16;m=aa>>16;if((aa|0)>0){n=k;f=r<<16>>16>>m&65535;}else{n=k<<16>>16>>0-m&65535;f=r;}if((Ee(f,1,x)|0)<<16>>16>n<<16>>16)f=1;else f=(((n<<16>>16)+3>>2|0)>(f<<16>>16|0))<<31>>31;o=K+f&65535;b[M>>1]=o;aa=E+f&65535;b[F>>1]=aa;$=G+f&65535;b[H>>1]=$;_=I+f&65535;b[J>>1]=_;Y=B+f&65535;b[C>>1]=Y;m=g<<16>>16>o<<16>>16?g:o;m=A<<16>>16>m<<16>>16?A:m;m=z<<16>>16>m<<16>>16?z:m;m=D<<16>>16>m<<16>>16?D:m;m=y<<16>>16>m<<16>>16?y:m;m=Y<<16>>16>m<<16>>16?Y:m;m=_<<16>>16>m<<16>>16?_:m;m=$<<16>>16>m<<16>>16?$:m;m=(aa<<16>>16>m<<16>>16?aa:m)+1&65535;g=0;while(1){f=m-(o&65535)|0;o=f&65535;n=e[h>>1]<<16;f=f<<16>>16;if(o<<16>>16>0)o=o<<16>>16<31?n>>f:0;else{aa=0-f<<16>>16;o=n<>aa|0)==(n|0)?o:n>>31^2147483647;}aa=o>>16;b[O+(g<<1)>>1]=aa;b[P+(g<<1)>>1]=(o>>>1)-(aa<<15);g=g+1|0;if((g|0)==5){f=5;n=p;break;}o=b[M+(g<<1)>>1]|0;h=h+2|0;}while(1){g=m-(y&65535)|0;y=g&65535;o=e[n>>1]<<16;g=g<<16>>16;if(y<<16>>16>0)o=y<<16>>16<31?o>>g:0;else{$=0-g<<16>>16;aa=o<<$;o=(aa>>$|0)==(o|0)?aa:o>>31^2147483647;}aa=o>>16;b[O+(f<<1)>>1]=aa;b[P+(f<<1)>>1]=(o>>>1)-(aa<<15);o=f+1|0;if((o&65535)<<16>>16==10)break;y=b[M+(o<<1)>>1]|0;f=o;n=n+2|0;}Q=L<<16>>16;R=b[O>>1]|0;S=b[P>>1]|0;T=b[O+2>>1]|0;U=b[P+2>>1]|0;V=b[O+4>>1]|0;W=b[P+4>>1]|0;X=b[O+6>>1]|0;Y=b[P+6>>1]|0;_=b[O+8>>1]|0;$=b[P+8>>1]|0;aa=s&65535;q=N<<16>>16;j=b[O+10>>1]|0;A=b[P+10>>1]|0;z=b[O+12>>1]|0;h=b[P+12>>1]|0;f=b[O+14>>1]|0;n=b[P+14>>1]|0;g=b[O+16>>1]|0;y=b[P+16>>1]|0;B=b[O+18>>1]|0;P=b[P+18>>1]|0;m=2147483647;O=0;o=0;C=782;do{M=b[C>>1]|0;I=(Z(Q,b[C+2>>1]|0)|0)>>>15<<16;p=I>>16;G=M<<1;K=(Z(G,M)|0)>>16;r=Z(K,R)|0;if((r|0)==1073741824){c[x>>2]=1;J=2147483647;}else J=r<<1;N=(Z(S,K)|0)>>15;r=J+(N<<1)|0;if((J^N|0)>0&(r^J|0)<0){c[x>>2]=1;r=(J>>>31)+2147483647|0;}K=Z(T,M)|0;if((K|0)==1073741824){c[x>>2]=1;J=2147483647;}else J=K<<1;N=(Z(U,M)|0)>>15;K=J+(N<<1)|0;if((J^N|0)>0&(K^J|0)<0){c[x>>2]=1;K=(J>>>31)+2147483647|0;}I=(Z(I>>15,p)|0)>>16;J=Z(V,I)|0;if((J|0)==1073741824){c[x>>2]=1;H=2147483647;}else H=J<<1;N=(Z(W,I)|0)>>15;J=H+(N<<1)|0;if((H^N|0)>0&(J^H|0)<0){c[x>>2]=1;J=(H>>>31)+2147483647|0;}I=Z(X,p)|0;if((I|0)==1073741824){c[x>>2]=1;H=2147483647;}else H=I<<1;N=(Z(Y,p)|0)>>15;I=H+(N<<1)|0;if((H^N|0)>0&(I^H|0)<0){c[x>>2]=1;N=(H>>>31)+2147483647|0;}else N=I;H=(Z(G,p)|0)>>16;I=Z(_,H)|0;if((I|0)==1073741824){c[x>>2]=1;G=2147483647;}else G=I<<1;L=(Z($,H)|0)>>15;I=G+(L<<1)|0;if((G^L|0)>0&(I^G|0)<0){c[x>>2]=1;I=(G>>>31)+2147483647|0;}H=b[C+4>>1]|0;G=b[C+6>>1]|0;C=C+8|0;if((M-aa&65535)<<16>>16<1?(ba=H<<16>>16,H<<16>>16<=s<<16>>16):0){E=(Z(G<<16>>16,q)|0)>>>15<<16;M=E>>16;D=ba<<1;G=(Z(D,ba)|0)>>16;H=Z(j,G)|0;if((H|0)==1073741824){c[x>>2]=1;F=2147483647;}else F=H<<1;L=(Z(A,G)|0)>>15;H=F+(L<<1)|0;if((F^L|0)>0&(H^F|0)<0){c[x>>2]=1;H=(F>>>31)+2147483647|0;}G=Z(z,ba)|0;if((G|0)==1073741824){c[x>>2]=1;F=2147483647;}else F=G<<1;L=(Z(h,ba)|0)>>15;G=F+(L<<1)|0;if((F^L|0)>0&(G^F|0)<0){c[x>>2]=1;L=(F>>>31)+2147483647|0;}else L=G;F=(Z(E>>15,M)|0)>>16;G=Z(f,F)|0;if((G|0)==1073741824){c[x>>2]=1;E=2147483647;}else E=G<<1;p=(Z(n,F)|0)>>15;G=E+(p<<1)|0;if((E^p|0)>0&(G^E|0)<0){c[x>>2]=1;p=(E>>>31)+2147483647|0;}else p=G;G=Z(g,M)|0;if((G|0)==1073741824){c[x>>2]=1;F=2147483647;}else F=G<<1;E=(Z(y,M)|0)>>15;G=F+(E<<1)|0;if((F^E|0)>0&(G^F|0)<0){c[x>>2]=1;k=(F>>>31)+2147483647|0;}else k=G;F=(Z(D,M)|0)>>16;G=Z(B,F)|0;if((G|0)==1073741824){c[x>>2]=1;E=2147483647;}else E=G<<1;M=(Z(P,F)|0)>>15;G=E+(M<<1)|0;if((E^M|0)>0&(G^E|0)<0){c[x>>2]=1;G=(E>>>31)+2147483647|0;}M=K+r+J+N+I+H+L+p+k+G|0;N=(M|0)<(m|0);m=N?M:m;o=N?O:o;}O=O+1<<16>>16;}while(O<<16>>16<256);s=(o&65535)<<18>>16;kd(a,782+(s<<1)|0,ca,d,t,u,x);Vd(a,0,l,ea,fa,da,ga,x);l=(re(14,b[fa>>1]|0,x)|0)&65535;kd(a,782+((s|2)<<1)|0,l,b[ea>>1]|0,v,w,x);i=ha;return o|0;}function kd(a,d,f,g,h,j,k){a=a|0;d=d|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;var l=0,m=0,n=0,o=0;o=i;i=i+16|0;m=o+2|0;n=o;b[h>>1]=b[d>>1]|0;l=b[d+2>>1]|0;f=Z(f<<16>>16<<1,l)|0;h=10-(g&65535)|0;d=h&65535;h=h<<16>>16;if(d<<16>>16>0)d=d<<16>>16<31?f>>h:0;else{h=0-h<<16>>16;d=f<>h|0)==(f|0)?d:f>>31^2147483647;}b[j>>1]=d>>>16;de(l,m,n,k);b[m>>1]=(e[m>>1]|0)+65524;h=Ee(b[n>>1]|0,5,k)|0;g=b[m>>1]|0;h=((g&65535)<<10)+(h&65535)&65535;f=b[n>>1]|0;g=g<<16>>16;if((g*24660|0)==1073741824){c[k>>2]=1;d=2147483647;}else d=g*49320|0;n=(f<<16>>16)*24660>>15;g=d+(n<<1)|0;if(!((d^n|0)>0&(g^d|0)<0)){k=g;k=k<<13;k=k+32768|0;k=k>>>16;k=k&65535;Wd(a,h,k);i=o;return;}c[k>>2]=1;k=(d>>>31)+2147483647|0;k=k<<13;k=k+32768|0;k=k>>>16;k=k&65535;Wd(a,h,k);i=o;return;}function ld(a,d,f,g,h,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y){a=a|0;d=d|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;p=p|0;q=q|0;r=r|0;s=s|0;t=t|0;u=u|0;v=v|0;w=w|0;x=x|0;y=y|0;var z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0;la=i;i=i+80|0;ia=la+72|0;ja=la+70|0;ka=la+68|0;ga=la+66|0;ha=la+56|0;_=la+24|0;Y=la+12|0;W=la+48|0;X=la+40|0;R=la+34|0;T=la+22|0;P=la+6|0;Q=la;nd(5,r,s,P,Q,c[x+72>>2]|0,y)|0;B=re(14,n,y)|0;S=x+68|0;O=c[S>>2]|0;V=m<<16>>16;U=V+65526|0;r=(e[j>>1]|0)+65523&65535;b[ha>>1]=r;x=(e[j+2>>1]|0)+65522&65535;b[ha+2>>1]=x;da=U<<16>>16;ea=((U<<17>>17|0)==(da|0)?U<<1:da>>>15^32767)+15+(e[j+4>>1]|0)&65535;b[ha+4>>1]=ea;fa=(e[j+6>>1]|0)+da&65535;b[ha+6>>1]=fa;j=da+1+(e[j+8>>1]|0)&65535;b[ha+8>>1]=j;x=x<<16>>16>r<<16>>16?x:r;x=ea<<16>>16>x<<16>>16?ea:x;x=fa<<16>>16>x<<16>>16?fa:x;x=(Rd(j<<16>>16>x<<16>>16?j:x,1,y)|0)&65535;j=r;r=0;while(1){n=x-(j&65535)|0;j=n&65535;A=e[h+(r<<1)>>1]<<16;n=n<<16>>16;if(j<<16>>16>0)n=j<<16>>16<31?A>>n:0;else{fa=0-n<<16>>16;n=A<>fa|0)==(A|0)?n:A>>31^2147483647;}Nc(n,_+(r<<1)|0,Y+(r<<1)|0,y);n=r+1|0;if((n|0)==5)break;j=b[ha+(n<<1)>>1]|0;r=n;}M=_+2|0;N=Y+2|0;fa=B<<16>>16;$=_+4|0;aa=Y+4|0;ba=_+6|0;ca=Y+6|0;da=_+8|0;ea=Y+8|0;E=0;j=2147483647;h=0;n=0;while(1){L=b[P+(h<<1)>>1]|0;B=Z(L,L)|0;if(B>>>0>1073741823){c[y>>2]=1;B=32767;}else B=B>>>15;x=b[Y>>1]|0;A=B<<16>>16;B=Z(A,b[_>>1]|0)|0;if((B|0)==1073741824){c[y>>2]=1;r=2147483647;}else r=B<<1;K=(Z(x<<16>>16,A)|0)>>15;B=r+(K<<1)|0;if((r^K|0)>0&(B^r|0)<0){c[y>>2]=1;B=(r>>>31)+2147483647|0;}x=b[N>>1]|0;A=Z(b[M>>1]|0,L)|0;if((A|0)!=1073741824){r=(A<<1)+B|0;if((A^B|0)>0&(r^B|0)<0){c[y>>2]=1;r=(B>>>31)+2147483647|0;}}else{c[y>>2]=1;r=2147483647;}B=(Z(x<<16>>16,L)|0)>>15;if((B|0)>32767){c[y>>2]=1;B=32767;}K=B<<16;B=(K>>15)+r|0;if((K>>16^r|0)>0&(B^r|0)<0){c[y>>2]=1;K=(r>>>31)+2147483647|0;}else K=B;I=(K>>>31)+2147483647|0;J=h&65535;B=E;G=0;H=O;do{A=(Z(b[H>>1]|0,fa)|0)>>15;H=H+6|0;if((A|0)>32767){c[y>>2]=1;A=32767;}F=A<<16>>16;A=Z(F,F)|0;if((A|0)==1073741824){c[y>>2]=1;D=2147483647;}else D=A<<1;Nc(D,ia,ja,y);A=Z(F,L)|0;if((A|0)==1073741824){c[y>>2]=1;D=2147483647;}else D=A<<1;Nc(D,ka,ga,y);r=b[aa>>1]|0;C=b[ja>>1]|0;A=b[$>>1]|0;x=b[ia>>1]|0;E=Z(x,A)|0;if((E|0)!=1073741824){D=(E<<1)+K|0;if((E^K|0)>0&(D^K|0)<0){c[y>>2]=1;D=I;}}else{c[y>>2]=1;D=2147483647;}E=(Z(C<<16>>16,A)|0)>>15;if((E|0)>32767){c[y>>2]=1;E=32767;}C=E<<16;E=(C>>15)+D|0;if((C>>16^D|0)>0&(E^D|0)<0){c[y>>2]=1;E=(D>>>31)+2147483647|0;}D=(Z(x,r<<16>>16)|0)>>15;if((D|0)>32767){c[y>>2]=1;D=32767;}C=D<<16;D=(C>>15)+E|0;if((C>>16^E|0)>0&(D^E|0)<0){c[y>>2]=1;D=(E>>>31)+2147483647|0;}A=b[ca>>1]|0;E=Z(b[ba>>1]|0,F)|0;if((E|0)!=1073741824){C=(E<<1)+D|0;if((E^D|0)>0&(C^D|0)<0){c[y>>2]=1;C=(D>>>31)+2147483647|0;}}else{c[y>>2]=1;C=2147483647;}A=(Z(A<<16>>16,F)|0)>>15;if((A|0)>32767){c[y>>2]=1;A=32767;}F=A<<16;A=(F>>15)+C|0;if((F>>16^C|0)>0&(A^C|0)<0){c[y>>2]=1;A=(C>>>31)+2147483647|0;}x=b[ea>>1]|0;C=b[ga>>1]|0;r=b[da>>1]|0;z=b[ka>>1]|0;E=Z(z,r)|0;do if((E|0)==1073741824){c[y>>2]=1;E=2147483647;}else{D=(E<<1)+A|0;if(!((E^A|0)>0&(D^A|0)<0)){E=D;break;}c[y>>2]=1;E=(A>>>31)+2147483647|0;}while(0);D=(Z(C<<16>>16,r)|0)>>15;if((D|0)>32767){c[y>>2]=1;D=32767;}F=D<<16;D=(F>>15)+E|0;if((F>>16^E|0)>0&(D^E|0)<0){c[y>>2]=1;D=(E>>>31)+2147483647|0;}A=(Z(z,x<<16>>16)|0)>>15;if((A|0)>32767){c[y>>2]=1;A=32767;}F=A<<16;A=(F>>15)+D|0;if((F>>16^D|0)>0&(A^D|0)<0){c[y>>2]=1;A=(D>>>31)+2147483647|0;}F=(A|0)<(j|0);B=F?G:B;n=F?J:n;j=F?A:j;G=G+1<<16>>16;}while(G<<16>>16<32);h=h+1|0;if((h|0)==3){A=B;h=n;break;}else E=B;}N=(A<<16>>16)*3|0;j=b[O+(N<<1)>>1]|0;b[u>>1]=b[O+(N+1<<1)>>1]|0;b[v>>1]=b[O+(N+2<<1)>>1]|0;j=Z(j<<16>>16,fa)|0;if((j|0)==1073741824){c[y>>2]=1;B=2147483647;}else B=j<<1;N=9-V|0;O=N&65535;N=N<<16>>16;M=O<<16>>16>0;if(M)B=O<<16>>16<31?B>>N:0;else{K=0-N<<16>>16;L=B<>K|0)==(B|0)?L:B>>31^2147483647;}b[t>>1]=B>>>16;L=h<<16>>16;P=b[P+(L<<1)>>1]|0;b[s>>1]=P;Q=b[Q+(L<<1)>>1]|0;Ub(d,f,g,P,o,W,X,R,y);xc(a,b[R>>1]|0,b[t>>1]|0,T,y);if(!((b[W>>1]|0)!=0&(b[T>>1]|0)>0)){y=A;u=c[w>>2]|0;t=u+2|0;b[u>>1]=Q;u=u+4|0;c[w>>2]=u;b[t>>1]=y;i=la;return;}F=W+6|0;b[F>>1]=l;D=X+6|0;b[D>>1]=k;m=((Ge(q,m,y)|0)&65535)+10|0;x=m<<16>>16;if((m&65535)<<16>>16<0){n=0-x<<16;if((n|0)<983040)p=p<<16>>16>>(n>>16)&65535;else p=0;}else{n=p<<16>>16;r=n<>16>>x|0)==(n|0))p=r&65535;else p=(n>>>15^32767)&65535;}j=b[s>>1]|0;B=b[T>>1]|0;S=c[S>>2]|0;r=b[t>>1]|0;T=10-V|0;x=T<<16>>16;if((T&65535)<<16>>16<0){n=0-x<<16;if((n|0)<983040)l=r<<16>>16>>(n>>16)&65535;else l=0;}else{n=r<<16>>16;r=n<>16>>x|0)==(n|0))l=r&65535;else l=(n>>>15^32767)&65535;}h=j<<16>>16;n=Z(h,h)|0;if(n>>>0>1073741823){c[y>>2]=1;j=32767;}else j=n>>>15;A=Rd(32767-(B&65535)&65535,1,y)|0;B=B<<16>>16;n=Z(b[W+2>>1]|0,B)|0;if((n|0)==1073741824){c[y>>2]=1;n=2147483647;}else n=n<<1;T=n<<1;n=Z(((T>>1|0)==(n|0)?T:n>>31^2147418112)>>16,j<<16>>16)|0;if((n|0)==1073741824){c[y>>2]=1;E=2147483647;}else E=n<<1;C=(e[X+2>>1]|0)+65521|0;x=C&65535;n=Z(b[W+4>>1]|0,B)|0;if((n|0)==1073741824){c[y>>2]=1;j=2147483647;}else j=n<<1;n=j<<1;n=(Z(((n>>1|0)==(j|0)?n:j>>31^2147418112)>>16,h)|0)>>15;if((n|0)>32767){c[y>>2]=1;n=32767;}b[$>>1]=n;j=U&65535;b[ia>>1]=j;j=Rd(b[X+4>>1]|0,j,y)|0;n=Z(b[F>>1]|0,B)|0;if((n|0)==1073741824){c[y>>2]=1;n=2147483647;}else n=n<<1;z=n<<1;b[ba>>1]=((z>>1|0)==(n|0)?z:n>>31^2147418112)>>>16;z=((V<<17>>17|0)==(V|0)?V<<1:V>>>15^32767)+65529&65535;b[ia>>1]=z;z=Rd(b[D>>1]|0,z,y)|0;n=(Z(b[F>>1]|0,A<<16>>16)|0)>>15;if((n|0)>32767){c[y>>2]=1;n=32767;}b[da>>1]=n;A=Rd(z,1,y)|0;r=Z(b[W>>1]|0,B)|0;if((r|0)==1073741824){c[y>>2]=1;n=2147483647;}else n=r<<1;D=Fe(n,ia,y)|0;h=(e[ia>>1]|0)+47|0;b[ia>>1]=h;h=(e[X>>1]|0)-(h&65535)|0;B=h+31&65535;B=x<<16>>16>B<<16>>16?x:B;B=j<<16>>16>B<<16>>16?j:B;B=z<<16>>16>B<<16>>16?z:B;B=(A<<16>>16>B<<16>>16?A:B)<<16>>16;r=B-(C&65535)|0;n=r&65535;r=r<<16>>16;if(n<<16>>16>0)K=n<<16>>16<31?E>>r:0;else{X=0-r<<16>>16;K=E<>X|0)==(E|0)?K:E>>31^2147483647;}x=B-(j&65535)|0;n=x&65535;r=e[$>>1]<<16;x=x<<16>>16;if(n<<16>>16>0)r=n<<16>>16<31?r>>x:0;else{W=0-x<<16>>16;X=r<>W|0)==(r|0)?X:r>>31^2147483647;}Nc(r,$,aa,y);z=B-(z&65535)|0;r=z&65535;x=e[ba>>1]<<16;z=z<<16>>16;if(r<<16>>16>0)r=r<<16>>16<31?x>>z:0;else{X=0-z<<16>>16;r=x<>X|0)==(x|0)?r:x>>31^2147483647;}Nc(r,ba,ca,y);z=B-(A&65535)|0;r=z&65535;x=e[da>>1]<<16;z=z<<16>>16;if(r<<16>>16>0)r=r<<16>>16<31?x>>z:0;else{X=0-z<<16>>16;r=x<>X|0)==(x|0)?r:x>>31^2147483647;}Nc(r,da,ea,y);z=B+65505|0;b[ia>>1]=z;z=z-(h&65535)|0;r=De(z&65535,1,y)|0;x=r<<16>>16;if(r<<16>>16>0)x=r<<16>>16<31?D>>x:0;else{X=0-x<<16>>16;x=D<>X|0)==(D|0)?x:D>>31^2147483647;}do if(!(z&1))E=x;else{Nc(x,_,Y,y);r=b[Y>>1]|0;x=b[_>>1]|0;if((x*23170|0)==1073741824){c[y>>2]=1;z=2147483647;}else z=x*46340|0;_=(r<<16>>16)*23170>>15;x=z+(_<<1)|0;if(!((z^_|0)>0&(x^z|0)<0)){E=x;break;}c[y>>2]=1;E=(z>>>31)+2147483647|0;}while(0);F=(K>>>31)+2147483647|0;D=2147483647;C=0;x=0;G=S;while(1){r=(Z(b[G>>1]|0,fa)|0)>>15;G=G+6|0;if((r|0)>32767){c[y>>2]=1;r=32767;}z=r&65535;if(z<<16>>16>=l<<16>>16)break;j=r<<16>>16;r=Z(j,j)|0;if((r|0)==1073741824){c[y>>2]=1;n=2147483647;}else n=r<<1;Nc(n,ja,ka,y);r=(Ge(z,p,y)|0)<<16>>16;r=Z(r,r)|0;if((r|0)==1073741824){c[y>>2]=1;r=2147483647;}else r=r<<1;Nc(r,ga,ha,y);z=b[aa>>1]|0;n=Z(b[$>>1]|0,j)|0;do if((n|0)==1073741824){c[y>>2]=1;n=2147483647;}else{r=(n<<1)+K|0;if(!((n^K|0)>0&(r^K|0)<0)){n=r;break;}c[y>>2]=1;n=F;}while(0);r=(Z(z<<16>>16,j)|0)>>15;if((r|0)>32767){c[y>>2]=1;r=32767;}_=r<<16;r=(_>>15)+n|0;if((_>>16^n|0)>0&(r^n|0)<0){c[y>>2]=1;r=(n>>>31)+2147483647|0;}h=b[ca>>1]|0;A=b[ka>>1]|0;j=b[ba>>1]|0;B=b[ja>>1]|0;n=Z(B,j)|0;do if((n|0)==1073741824){c[y>>2]=1;z=2147483647;}else{z=(n<<1)+r|0;if(!((n^r|0)>0&(z^r|0)<0))break;c[y>>2]=1;z=(r>>>31)+2147483647|0;}while(0);n=(Z(A<<16>>16,j)|0)>>15;if((n|0)>32767){c[y>>2]=1;n=32767;}_=n<<16;n=(_>>15)+z|0;if((_>>16^z|0)>0&(n^z|0)<0){c[y>>2]=1;n=(z>>>31)+2147483647|0;}r=(Z(B,h<<16>>16)|0)>>15;if((r|0)>32767){c[y>>2]=1;r=32767;}_=r<<16;r=(_>>15)+n|0;if((_>>16^n|0)>0&(r^n|0)<0){c[y>>2]=1;r=(n>>>31)+2147483647|0;}r=Fe(r,ia,y)|0;z=De(b[ia>>1]|0,1,y)|0;n=z<<16>>16;if(z<<16>>16>0)z=z<<16>>16<31?r>>n:0;else{_=0-n<<16>>16;z=r<<_;z=(z>>_|0)==(r|0)?z:r>>31^2147483647;}r=z-E|0;if(((r^z)&(z^E)|0)<0){c[y>>2]=1;r=(z>>>31)+2147483647|0;}r=(Ce(r,y)|0)<<16>>16;r=Z(r,r)|0;if((r|0)==1073741824){c[y>>2]=1;z=2147483647;}else z=r<<1;B=b[ea>>1]|0;j=b[ha>>1]|0;A=b[da>>1]|0;h=b[ga>>1]|0;n=Z(h,A)|0;do if((n|0)==1073741824){c[y>>2]=1;r=2147483647;}else{r=(n<<1)+z|0;if(!((n^z|0)>0&(r^z|0)<0))break;c[y>>2]=1;r=(z>>>31)+2147483647|0;}while(0);n=(Z(j<<16>>16,A)|0)>>15;if((n|0)>32767){c[y>>2]=1;n=32767;}_=n<<16;n=(_>>15)+r|0;if((_>>16^r|0)>0&(n^r|0)<0){c[y>>2]=1;n=(r>>>31)+2147483647|0;}r=(Z(h,B<<16>>16)|0)>>15;if((r|0)>32767){c[y>>2]=1;r=32767;}_=r<<16;r=(_>>15)+n|0;if((_>>16^n|0)>0&(r^n|0)<0){c[y>>2]=1;r=(n>>>31)+2147483647|0;}n=(r|0)<(D|0);x=n?C:x;C=C+1<<16>>16;if(C<<16>>16>=32)break;else D=n?r:D;}ka=(x<<16>>16)*3|0;z=b[S+(ka<<1)>>1]|0;b[u>>1]=b[S+(ka+1<<1)>>1]|0;b[v>>1]=b[S+(ka+2<<1)>>1]|0;z=Z(z<<16>>16,fa)|0;if((z|0)==1073741824){c[y>>2]=1;z=2147483647;}else z=z<<1;if(M)z=O<<16>>16<31?z>>N:0;else{u=0-N<<16>>16;y=z<>u|0)==(z|0)?y:z>>31^2147483647;}b[t>>1]=z>>>16;y=x;u=c[w>>2]|0;t=u+2|0;b[u>>1]=Q;u=u+4|0;c[w>>2]=u;b[t>>1]=y;i=la;return;}function md(a,c,d,e,f,g,h,i){a=a|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,l=0,m=0,n=0;n=(a|0)==7;j=b[e>>1]|0;if(n){j=j<<16>>16>>>1&65535;m=re(c,d,i)|0;c=m<<16;a=c>>16;if((m<<20>>20|0)==(a|0))a=c>>12;else a=a>>>15^32767;}else{m=re(c,d,i)|0;c=m<<16;a=c>>16;if((m<<21>>21|0)==(a|0))a=c>>11;else a=a>>>15^32767;}m=a<<16>>16;i=j<<16>>16;c=i-((Z(m,b[h>>1]|0)|0)>>>15&65535)|0;c=((c&32768|0)!=0?0-c|0:c)&65535;k=1;a=0;l=h;while(1){l=l+6|0;j=i-((Z(b[l>>1]|0,m)|0)>>>15&65535)|0;d=j<<16;j=(d|0)<0?0-(d>>16)|0:j;d=(j<<16>>16|0)<(c<<16>>16|0);a=d?k:a;k=k+1<<16>>16;if(k<<16>>16>=32)break;else c=d?j&65535:c;}l=(a<<16>>16)*196608>>16;b[e>>1]=(Z(b[h+(l<<1)>>1]|0,m)|0)>>>15<<(n&1);b[f>>1]=b[h+(l+1<<1)>>1]|0;b[g>>1]=b[h+(l+2<<1)>>1]|0;return a|0;}function nd(a,c,d,e,f,g,h){a=a|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0,m=0,n=0;i=Ge(b[d>>1]|0,b[g>>1]|0,h)|0;i=(i&65535)-((i&65535)>>>15&65535)|0;i=(i<<16>>31^i)&65535;k=0;l=1;while(1){j=b[g+(l<<1)>>1]|0;if(j<<16>>16>c<<16>>16)j=i;else{j=Ge(b[d>>1]|0,j,h)|0;j=(j&65535)-((j&65535)>>>15&65535)|0;j=(j<<16>>31^j)&65535;n=j<<16>>16>16;j=n?j:i;k=n?l&65535:k;}l=l+1|0;if((l|0)==16)break;else i=j;}if((a|0)!=5){i=b[g+(k<<16>>16<<1)>>1]|0;if((a|0)==7){b[d>>1]=i&65532;return k|0;}else{b[d>>1]=i;return k|0;}}j=k<<16>>16;switch(k<<16>>16){case 0:{i=0;break;}case 15:{m=8;break;}default:if((b[g+(j+1<<1)>>1]|0)>c<<16>>16)m=8;else i=j+65535&65535;}if((m|0)==8)i=j+65534&65535;b[f>>1]=i;n=i<<16>>16;b[e>>1]=b[g+(n<<1)>>1]|0;n=n+1|0;b[f+2>>1]=n;n=n<<16>>16;b[e+2>>1]=b[g+(n<<1)>>1]|0;n=n+1|0;b[f+4>>1]=n;b[e+4>>1]=b[g+(n<<16>>16<<1)>>1]|0;b[d>>1]=b[g+(j<<1)>>1]|0;return k|0;}function od(a,d,f,g,h,j,k,l,m,n,o,p){a=a|0;d=d|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;p=p|0;var q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0;K=i;i=i+32|0;s=K+20|0;t=K+10|0;r=K;switch(a|0){case 3:case 4:case 6:{o=o+84|0;J=128;break;}default:{o=o+80|0;J=64;}}I=c[o>>2]|0;q=re(14,f,p)|0;H=d<<16>>16;G=H+65525|0;a=(e[h>>1]|0)+65523&65535;b[r>>1]=a;d=(e[h+2>>1]|0)+65522&65535;b[r+2>>1]=d;F=G<<16>>16;F=Rd(b[h+4>>1]|0,((G<<17>>17|0)==(F|0)?G<<1:F>>>15^32767)+15&65535,p)|0;b[r+4>>1]=F;G=Rd(b[h+6>>1]|0,G&65535,p)|0;b[r+6>>1]=G;h=Rd(b[h+8>>1]|0,H+65526&65535,p)|0;b[r+8>>1]=h;d=d<<16>>16>a<<16>>16?d:a;d=F<<16>>16>d<<16>>16?F:d;d=G<<16>>16>d<<16>>16?G:d;d=(h<<16>>16>d<<16>>16?h:d)+1&65535;h=0;while(1){f=d-(a&65535)|0;o=f&65535;a=e[g+(h<<1)>>1]<<16;f=f<<16>>16;if(o<<16>>16>0)o=o<<16>>16<31?a>>f:0;else{G=0-f<<16>>16;o=a<>G|0)==(a|0)?o:a>>31^2147483647;}Nc(o,s+(h<<1)|0,t+(h<<1)|0,p);o=h+1|0;if((o|0)==5)break;a=b[r+(o<<1)>>1]|0;h=o;}G=q<<16>>16;y=b[s>>1]|0;z=b[t>>1]|0;A=b[s+2>>1]|0;B=b[t+2>>1]|0;C=b[s+4>>1]|0;D=b[t+4>>1]|0;E=b[s+6>>1]|0;F=b[t+6>>1]|0;x=b[s+8>>1]|0;u=b[t+8>>1]|0;d=2147483647;v=0;o=0;w=I;while(1){h=b[w>>1]|0;if(h<<16>>16>j<<16>>16)q=d;else{q=(Z(b[w+2>>1]|0,G)|0)>>15;if((q|0)>32767){c[p>>2]=1;q=32767;}t=h<<16>>16;h=Z(t,t)|0;if(h>>>0>1073741823){c[p>>2]=1;r=32767;}else r=h>>>15;f=q<<16>>16;q=Z(f,f)|0;if(q>>>0>1073741823){c[p>>2]=1;s=32767;}else s=q>>>15;g=(Z(f,t)|0)>>15;if((g|0)>32767){c[p>>2]=1;g=32767;}q=r<<16>>16;r=Z(y,q)|0;if((r|0)==1073741824){c[p>>2]=1;h=2147483647;}else h=r<<1;q=(Z(z,q)|0)>>15;r=h+(q<<1)|0;if((h^q|0)>0&(r^h|0)<0){c[p>>2]=1;r=(h>>>31)+2147483647|0;}q=Z(A,t)|0;if((q|0)==1073741824){c[p>>2]=1;h=2147483647;}else h=q<<1;t=(Z(B,t)|0)>>15;q=h+(t<<1)|0;if((h^t|0)>0&(q^h|0)<0){c[p>>2]=1;q=(h>>>31)+2147483647|0;}h=q+r|0;if((q^r|0)>-1&(h^r|0)<0){c[p>>2]=1;h=(r>>>31)+2147483647|0;}q=s<<16>>16;r=Z(C,q)|0;if((r|0)==1073741824){c[p>>2]=1;a=2147483647;}else a=r<<1;t=(Z(D,q)|0)>>15;r=a+(t<<1)|0;if((a^t|0)>0&(r^a|0)<0){c[p>>2]=1;r=(a>>>31)+2147483647|0;}q=r+h|0;if((r^h|0)>-1&(q^h|0)<0){c[p>>2]=1;a=(h>>>31)+2147483647|0;}else a=q;q=Z(E,f)|0;if((q|0)==1073741824){c[p>>2]=1;r=2147483647;}else r=q<<1;t=(Z(F,f)|0)>>15;q=r+(t<<1)|0;if((r^t|0)>0&(q^r|0)<0){c[p>>2]=1;q=(r>>>31)+2147483647|0;}h=q+a|0;if((q^a|0)>-1&(h^a|0)<0){c[p>>2]=1;r=(a>>>31)+2147483647|0;}else r=h;h=g<<16>>16;q=Z(x,h)|0;if((q|0)==1073741824){c[p>>2]=1;a=2147483647;}else a=q<<1;t=(Z(u,h)|0)>>15;q=a+(t<<1)|0;if((a^t|0)>0&(q^a|0)<0){c[p>>2]=1;h=(a>>>31)+2147483647|0;}else h=q;q=h+r|0;if((h^r|0)>-1&(q^r|0)<0){c[p>>2]=1;q=(r>>>31)+2147483647|0;}t=(q|0)<(d|0);q=t?q:d;o=t?v:o;}w=w+8|0;v=v+1<<16>>16;if((v<<16>>16|0)>=(J|0))break;else d=q;}j=o<<16>>16;j=((j<<18>>18|0)==(j|0)?j<<2:j>>>15^32767)<<16>>16;b[k>>1]=b[I+(j<<1)>>1]|0;d=b[I+(j+1<<1)>>1]|0;b[m>>1]=b[I+(j+2<<1)>>1]|0;b[n>>1]=b[I+(j+3<<1)>>1]|0;d=Z(d<<16>>16,G)|0;if((d|0)==1073741824){c[p>>2]=1;a=2147483647;}else a=d<<1;f=10-H|0;d=f&65535;f=f<<16>>16;if(d<<16>>16>0){p=d<<16>>16<31?a>>f:0;p=p>>>16;p=p&65535;b[l>>1]=p;i=K;return o|0;}else{m=0-f<<16>>16;p=a<>m|0)==(a|0)?p:a>>31^2147483647;p=p>>>16;p=p&65535;b[l>>1]=p;i=K;return o|0;}return 0;}function pd(a,c,d,f,g,h,j,k,l){a=a|0;c=c|0;d=d|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;l=l|0;var m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0;wa=i;i=i+160|0;va=wa;n=a<<16>>16;ta=a<<16>>16==10;ua=b[j+(b[h>>1]<<1)>>1]|0;if(a<<16>>16>0){l=0;m=k;while(1){b[m>>1]=l;l=l+1<<16>>16;if(l<<16>>16>=a<<16>>16)break;else m=m+2|0;}}if(d<<16>>16<=1){i=wa;return;}ra=h+2|0;sa=ua<<16>>16;oa=f+(sa<<1)|0;pa=g+(sa*80|0)+(sa<<1)|0;qa=h+6|0;X=c&65535;Y=h+4|0;_=h+10|0;$=h+8|0;aa=h+14|0;ba=h+12|0;ca=h+18|0;da=h+16|0;ea=k+2|0;fa=k+4|0;ga=k+6|0;ha=k+8|0;ia=k+10|0;ja=k+12|0;ka=k+14|0;la=k+16|0;ma=k+18|0;na=a<<16>>16>2;V=h+(n+-1<<1)|0;T=1;W=1;N=0;O=0;U=-1;while(1){S=b[j+(b[ra>>1]<<1)>>1]|0;R=S<<16>>16;c=(e[f+(R<<1)>>1]|0)+(e[oa>>1]|0)|0;m=(b[g+(sa*80|0)+(R<<1)>>1]<<13)+32768+((b[g+(R*80|0)+(R<<1)>>1]|0)+(b[pa>>1]|0)<<12)|0;n=b[qa>>1]|0;if(n<<16>>16<40){n=n<<16>>16;o=va;while(1){P=(b[g+(n*80|0)+(n<<1)>>1]|0)>>>1;M=b[g+(n*80|0)+(sa<<1)>>1]|0;Q=b[g+(n*80|0)+(R<<1)>>1]|0;b[o>>1]=c+(e[f+(n<<1)>>1]|0);b[o+2>>1]=(M+2+P+Q|0)>>>2;n=n+X|0;if((n&65535)<<16>>16<40){n=n<<16>>16;o=o+4|0;}else break;}B=b[qa>>1]|0;}else B=n;c=b[Y>>1]|0;A=m>>12;n=c<<16>>16;a:do if(c<<16>>16<40){z=B<<16>>16;if(B<<16>>16<40){o=1;q=c;s=B;r=0;p=-1;}else while(1){n=n+X|0;if((n&65535)<<16>>16<40)n=n<<16>>16;else{o=1;Q=c;P=B;n=0;break a;}}while(1){y=((b[g+(n*80|0)+(n<<1)>>1]|0)+A>>1)+(b[g+(n*80|0)+(sa<<1)>>1]|0)+(b[g+(n*80|0)+(R<<1)>>1]|0)|0;x=e[f+(n<<1)>>1]|0;v=z;w=B;u=va;t=r;while(1){m=(e[u>>1]|0)+x|0;l=m<<16>>16;l=(Z(l,l)|0)>>>15;r=(y+(b[g+(n*80|0)+(v<<1)>>1]|0)>>2)+(b[u+2>>1]|0)>>1;if((Z(l<<16>>16,o<<16>>16)|0)>(Z(r,p<<16>>16)|0)){o=r&65535;q=c;s=w;r=m&65535;p=l&65535;}else r=t;m=v+X|0;w=m&65535;if(w<<16>>16>=40)break;else{v=m<<16>>16;u=u+4|0;t=r;}}n=n+X|0;c=n&65535;if(c<<16>>16<40)n=n<<16>>16;else{Q=q;P=s;n=r;break;}}}else{o=1;Q=c;P=B;n=0;}while(0);q=o<<16>>16<<15;o=b[_>>1]|0;if(o<<16>>16<40){m=Q<<16>>16;l=P<<16>>16;c=n&65535;o=o<<16>>16;n=va;while(1){J=b[g+(o*80|0)+(o<<1)>>1]>>1;I=b[g+(o*80|0)+(sa<<1)>>1]|0;K=b[g+(o*80|0)+(R<<1)>>1]|0;L=b[g+(o*80|0)+(m<<1)>>1]|0;M=b[g+(o*80|0)+(l<<1)>>1]|0;b[n>>1]=(e[f+(o<<1)>>1]|0)+c;b[n+2>>1]=(I+2+J+K+L+M|0)>>>2;o=o+X|0;if((o&65535)<<16>>16<40){o=o<<16>>16;n=n+4|0;}else break;}J=b[_>>1]|0;}else J=o;p=b[$>>1]|0;o=p<<16>>16;b:do if(p<<16>>16<40){C=Q<<16>>16;D=P<<16>>16;E=J<<16>>16;B=q+32768|0;if(J<<16>>16<40){r=1;q=p;c=J;s=p;n=0;p=-1;}else while(1){o=o+X|0;if((o&65535)<<16>>16<40)o=o<<16>>16;else{o=1;M=p;L=J;n=0;break b;}}while(1){l=e[f+(o<<1)>>1]|0;A=(b[g+(o*80|0)+(R<<1)>>1]|0)+(b[g+(o*80|0)+(sa<<1)>>1]|0)+(b[g+(o*80|0)+(C<<1)>>1]|0)+(b[g+(o*80|0)+(D<<1)>>1]|0)|0;z=B+(b[g+(o*80|0)+(o<<1)>>1]<<11)|0;x=E;v=J;y=va;while(1){t=(e[y>>1]|0)+l|0;m=z+(b[y+2>>1]<<14)+(A+(b[g+(o*80|0)+(x<<1)>>1]|0)<<12)|0;u=t<<16>>16;u=(Z(u,u)|0)>>>15;if((Z(u<<16>>16,r<<16>>16)|0)>(Z(m>>16,p<<16>>16)|0)){r=m>>>16&65535;w=s;c=v;n=t&65535;p=u&65535;}else w=q;q=x+X|0;v=q&65535;if(v<<16>>16>=40){q=w;break;}else{x=q<<16>>16;q=w;y=y+4|0;}}o=o+X|0;s=o&65535;if(s<<16>>16<40)o=o<<16>>16;else{o=r;M=q;L=c;break;}}}else{o=1;M=p;L=J;n=0;}while(0);r=o<<16>>16<<15;o=b[aa>>1]|0;if(o<<16>>16<40){m=Q<<16>>16;l=P<<16>>16;p=M<<16>>16;q=L<<16>>16;c=n&65535;o=o<<16>>16;n=va;while(1){F=b[g+(o*80|0)+(o<<1)>>1]>>1;E=b[g+(sa*80|0)+(o<<1)>>1]|0;G=b[g+(R*80|0)+(o<<1)>>1]|0;H=b[g+(m*80|0)+(o<<1)>>1]|0;I=b[g+(l*80|0)+(o<<1)>>1]|0;J=b[g+(p*80|0)+(o<<1)>>1]|0;K=b[g+(q*80|0)+(o<<1)>>1]|0;b[n>>1]=(e[f+(o<<1)>>1]|0)+c;b[n+2>>1]=(E+4+F+G+H+I+J+K|0)>>>3;o=o+X|0;if((o&65535)<<16>>16<40){o=o<<16>>16;n=n+4|0;}else break;}c=b[aa>>1]|0;}else c=o;s=b[ba>>1]|0;if(s<<16>>16<40){J=Q<<16>>16;F=P<<16>>16;E=M<<16>>16;D=L<<16>>16;C=c<<16>>16;B=c<<16>>16<40;G=r+32768|0;I=s<<16>>16;l=1;w=s;v=c;H=s;q=0;o=-1;while(1){if(B){r=e[f+(I<<1)>>1]|0;n=(b[g+(I*80|0)+(R<<1)>>1]|0)+(b[g+(I*80|0)+(sa<<1)>>1]|0)+(b[g+(I*80|0)+(J<<1)>>1]|0)+(b[g+(I*80|0)+(F<<1)>>1]|0)+(b[g+(I*80|0)+(E<<1)>>1]|0)+(b[g+(I*80|0)+(D<<1)>>1]|0)|0;p=G+(b[g+(I*80|0)+(I<<1)>>1]<<10)|0;u=C;s=c;z=v;A=va;while(1){y=(e[A>>1]|0)+r|0;v=p+(b[A+2>>1]<<14)+(n+(b[g+(I*80|0)+(u<<1)>>1]|0)<<11)|0;x=y<<16>>16;x=(Z(x,x)|0)>>>15;if((Z(x<<16>>16,l<<16>>16)|0)>(Z(v>>16,o<<16>>16)|0)){l=v>>>16&65535;w=H;v=s;q=y&65535;o=x&65535;}else v=z;t=u+X|0;s=t&65535;if(s<<16>>16>=40)break;else{u=t<<16>>16;z=v;A=A+4|0;}}}s=I+X|0;H=s&65535;if(H<<16>>16>=40){K=v;break;}else I=s<<16>>16;}}else{l=1;w=s;K=c;q=0;o=-1;}if(ta){u=l<<16>>16<<15;o=b[ca>>1]|0;if(o<<16>>16<40){n=Q<<16>>16;c=P<<16>>16;m=M<<16>>16;l=L<<16>>16;r=w<<16>>16;s=K<<16>>16;p=q&65535;o=o<<16>>16;q=va;while(1){E=b[g+(o*80|0)+(o<<1)>>1]>>1;D=b[g+(sa*80|0)+(o<<1)>>1]|0;F=b[g+(R*80|0)+(o<<1)>>1]|0;G=b[g+(n*80|0)+(o<<1)>>1]|0;H=b[g+(c*80|0)+(o<<1)>>1]|0;I=b[g+(m*80|0)+(o<<1)>>1]|0;J=b[g+(l*80|0)+(o<<1)>>1]|0;N=b[g+(r*80|0)+(o<<1)>>1]|0;O=b[g+(s*80|0)+(o<<1)>>1]|0;b[q>>1]=(e[f+(o<<1)>>1]|0)+p;b[q+2>>1]=(D+4+E+F+G+H+I+J+N+O|0)>>>3;o=o+X|0;if((o&65535)<<16>>16<40){o=o<<16>>16;q=q+4|0;}else break;}J=b[ca>>1]|0;}else J=o;r=b[da>>1]|0;if(r<<16>>16<40){E=Q<<16>>16;D=P<<16>>16;C=M<<16>>16;m=L<<16>>16;F=w<<16>>16;G=K<<16>>16;H=J<<16>>16;I=J<<16>>16<40;B=u+32768|0;n=r<<16>>16;l=1;s=r;q=J;c=r;o=-1;while(1){if(I){u=e[f+(n<<1)>>1]|0;p=(b[g+(R*80|0)+(n<<1)>>1]|0)+(b[g+(sa*80|0)+(n<<1)>>1]|0)+(b[g+(E*80|0)+(n<<1)>>1]|0)+(b[g+(D*80|0)+(n<<1)>>1]|0)+(b[g+(C*80|0)+(n<<1)>>1]|0)+(b[g+(m*80|0)+(n<<1)>>1]|0)+(b[g+(F*80|0)+(n<<1)>>1]|0)+(b[g+(G*80|0)+(n<<1)>>1]|0)|0;r=B+(b[g+(n*80|0)+(n<<1)>>1]<<9)|0;A=H;x=J;z=va;while(1){y=(e[z>>1]|0)+u<<16>>16;y=(Z(y,y)|0)>>>15;v=r+(b[z+2>>1]<<13)+(p+(b[g+(n*80|0)+(A<<1)>>1]|0)<<10)|0;if((Z(y<<16>>16,l<<16>>16)|0)>(Z(v>>16,o<<16>>16)|0)){l=v>>>16&65535;s=c;q=x;o=y&65535;}t=A+X|0;x=t&65535;if(x<<16>>16>=40)break;else{A=t<<16>>16;z=z+4|0;}}}r=n+X|0;c=r&65535;if(c<<16>>16>=40)break;else n=r<<16>>16;}}else{l=1;s=r;q=J;o=-1;}}else{s=N;q=O;}if((Z(o<<16>>16,T<<16>>16)|0)>(Z(l<<16>>16,U<<16>>16)|0)){b[k>>1]=ua;b[ea>>1]=S;b[fa>>1]=Q;b[ga>>1]=P;b[ha>>1]=M;b[ia>>1]=L;b[ja>>1]=w;b[ka>>1]=K;if(ta){b[la>>1]=s;b[ma>>1]=q;}}else{l=T;o=U;}n=b[ra>>1]|0;if(na){c=1;m=2;while(1){b[h+(c<<1)>>1]=b[h+(m<<1)>>1]|0;m=m+1|0;if((m&65535)<<16>>16==a<<16>>16)break;else c=c+1|0;}}b[V>>1]=n;W=W+1<<16>>16;if(W<<16>>16>=d<<16>>16)break;else{T=l;N=s;O=q;U=o;}}i=wa;return;}function qd(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0;i=39;while(1){h=a+(i<<1)|0;g=b[h>>1]|0;f=c+(i<<1)|0;if(g<<16>>16>-1)b[f>>1]=32767;else{b[f>>1]=-32767;if(g<<16>>16==-32768)g=32767;else g=0-(g&65535)&65535;b[h>>1]=g;}b[d+(i<<1)>>1]=g;if((i|0)>0)i=i+-1|0;else break;}k=8-(e<<16>>16)|0;if((k|0)>0){j=0;f=0;}else return;do{e=0;a=0;h=32767;while(1){c=b[d+(e<<1)>>1]|0;i=c<<16>>16>-1?c<<16>>16>16:0;f=i?a:f;g=e+5|0;a=g&65535;if(a<<16>>16>=40)break;else{e=g<<16>>16;h=i?c:h;}}b[d+(f<<16>>16<<1)>>1]=-1;j=j+1<<16>>16;}while((j<<16>>16|0)<(k|0));j=0;do{c=1;a=1;g=32767;while(1){e=b[d+(c<<1)>>1]|0;i=e<<16>>16>-1?e<<16>>16>16:0;f=i?a:f;h=c+5|0;a=h&65535;if(a<<16>>16>=40)break;else{c=h<<16>>16;g=i?e:g;}}b[d+(f<<16>>16<<1)>>1]=-1;j=j+1<<16>>16;}while((j<<16>>16|0)<(k|0));j=0;do{c=2;a=2;g=32767;while(1){e=b[d+(c<<1)>>1]|0;i=e<<16>>16>-1?e<<16>>16>16:0;f=i?a:f;h=c+5|0;a=h&65535;if(a<<16>>16>=40)break;else{c=h<<16>>16;g=i?e:g;}}b[d+(f<<16>>16<<1)>>1]=-1;j=j+1<<16>>16;}while((j<<16>>16|0)<(k|0));j=0;while(1){c=3;a=3;g=32767;while(1){e=b[d+(c<<1)>>1]|0;i=e<<16>>16>-1?e<<16>>16>16:0;f=i?a:f;h=c+5|0;a=h&65535;if(a<<16>>16>=40){g=f;break;}else{c=h<<16>>16;g=i?e:g;}}b[d+(g<<16>>16<<1)>>1]=-1;j=j+1<<16>>16;if((j<<16>>16|0)>=(k|0)){f=0;break;}else f=g;}do{c=4;a=4;j=32767;while(1){e=b[d+(c<<1)>>1]|0;i=e<<16>>16>-1?e<<16>>16>16:0;g=i?a:g;h=c+5|0;a=h&65535;if(a<<16>>16>=40)break;else{c=h<<16>>16;j=i?e:j;}}b[d+(g<<16>>16<<1)>>1]=-1;f=f+1<<16>>16;}while((f<<16>>16|0)<(k|0));return;}function rd(a,d,e,f,g,h,j,k){a=a|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;var l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;y=i;i=i+80|0;x=y;p=40;q=d;r=a;m=256;n=256;while(1){l=b[q>>1]|0;q=q+2|0;l=Z(l,l)|0;if((l|0)!=1073741824){o=(l<<1)+m|0;if((l^m|0)>0&(o^m|0)<0){c[k>>2]=1;m=(m>>>31)+2147483647|0;}else m=o;}else{c[k>>2]=1;m=2147483647;}w=b[r>>1]|0;n=(Z(w<<1,w)|0)+n|0;p=p+-1<<16>>16;if(!(p<<16>>16))break;else r=r+2|0;}w=ce(m,k)|0;u=w<<5;w=((u>>5|0)==(w|0)?u:w>>31^2147418112)>>16;u=(ce(n,k)|0)<<5>>16;v=39;s=d+78|0;t=x+78|0;l=e+78|0;while(1){r=Z(b[s>>1]|0,w)|0;s=s+-2|0;q=r<<1;d=a+(v<<1)|0;m=b[d>>1]|0;p=Z(m<<16>>16,u)|0;if((p|0)!=1073741824){o=(p<<1)+q|0;if((p^q|0)>0&(o^q|0)<0){c[k>>2]=1;o=(r>>>30&1)+2147483647|0;}}else{c[k>>2]=1;o=2147483647;}n=o<<10;n=Ce((n>>10|0)==(o|0)?n:o>>31^2147483647,k)|0;if(n<<16>>16>-1)b[l>>1]=32767;else{b[l>>1]=-32767;if(n<<16>>16==-32768)n=32767;else n=0-(n&65535)&65535;if(m<<16>>16==-32768)o=32767;else o=0-(m&65535)&65535;b[d>>1]=o;}l=l+-2|0;b[t>>1]=n;if((v|0)<=0)break;else{v=v+-1|0;t=t+-2|0;}}d=g<<16>>16;if(g<<16>>16<=0){b[h+(d<<1)>>1]=b[h>>1]|0;i=y;return;}r=j&65535;q=0;p=-1;l=0;while(1){if((q|0)<40){n=q;o=q&65535;m=-1;while(1){k=b[x+(n<<1)>>1]|0;j=k<<16>>16>m<<16>>16;m=j?k:m;l=j?o:l;n=n+r|0;o=n&65535;if(o<<16>>16>=40)break;else n=n<<16>>16;}}else m=-1;b[f+(q<<1)>>1]=l;if(m<<16>>16>p<<16>>16)b[h>>1]=q;else m=p;q=q+1|0;if((q&65535)<<16>>16==g<<16>>16)break;else p=m;}l=b[h>>1]|0;b[h+(d<<1)>>1]=l;if(g<<16>>16>1)m=1;else{i=y;return;}do{f=l+1<<16>>16;l=f<<16>>16>=g<<16>>16?0:f;b[h+(m<<1)>>1]=l;b[h+(m+d<<1)>>1]=l;m=m+1|0;}while((m&65535)<<16>>16!=g<<16>>16);i=y;return;}function sd(a){a=a|0;var d=0;if(!a){a=-1;return a|0;}c[a>>2]=0;d=Je(12)|0;if(!d){a=-1;return a|0;}b[d>>1]=8;c[a>>2]=d;b[d+2>>1]=3;b[d+4>>1]=0;c[d+8>>2]=0;a=0;return a|0;}function td(a){a=a|0;var b=0;if(!a)return;b=c[a>>2]|0;if(!b)return;Ke(b);c[a>>2]=0;return;}function ud(a,d,e){a=a|0;d=d|0;e=e|0;var f=0,g=0,h=0;do if((d|0)==8){f=a+2|0;g=(b[f>>1]|0)+-1<<16>>16;b[f>>1]=g;d=a+8|0;if(!(c[d>>2]|0)){c[e>>2]=1;b[f>>1]=3;break;}h=a+4|0;if(g<<16>>16>2&(b[h>>1]|0)>0){c[e>>2]=2;b[h>>1]=(b[h>>1]|0)+-1<<16>>16;break;}if(!(g<<16>>16)){c[e>>2]=2;b[f>>1]=b[a>>1]|0;break;}else{c[e>>2]=3;break;}}else{b[a+2>>1]=b[a>>1]|0;c[e>>2]=0;d=a+8|0;}while(0);c[d>>2]=c[e>>2];return;}function vd(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0;if(!a){a=-1;return a|0;}c[a>>2]=0;d=Je(12)|0;e=d;if(!d){a=-1;return a|0;}c[d>>2]=0;f=d+4|0;c[f>>2]=0;g=d+8|0;c[g>>2]=b;if((dd(d)|0)<<16>>16==0?(ac(f,c[g>>2]|0)|0)<<16>>16==0:0){ed(c[d>>2]|0)|0;cc(c[f>>2]|0)|0;c[a>>2]=e;a=0;return a|0;}fd(d);bc(f);Ke(d);a=-1;return a|0;}function wd(a){a=a|0;var b=0;if(!a)return;b=c[a>>2]|0;if(!b)return;fd(b);bc((c[a>>2]|0)+4|0);Ke(c[a>>2]|0);c[a>>2]=0;return;}function xd(a,d,f,g,h){a=a|0;d=d|0;f=f|0;g=g|0;h=h|0;var j=0,k=0,l=0,m=0,n=0;m=i;i=i+448|0;k=m+320|0;l=m;Qe(g|0,0,488)|0;j=0;do{n=f+(j<<1)|0;b[n>>1]=(e[n>>1]|0)&65528;j=j+1|0;}while((j|0)!=160);gd(c[a>>2]|0,f,160);n=a+4|0;dc(c[n>>2]|0,d,f,k,h,l)|0;hd(c[h>>2]|0,k,g,(c[n>>2]|0)+2392|0);i=m;return;}function yd(a,c,d,e,f,g,h,j,k,l,m,n,o,p,q,r){a=a|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;p=p|0;q=q|0;r=r|0;var s=0,t=0,u=0;u=i;i=i+48|0;s=u+22|0;t=u;Ie(f,(a&-2|0)==6?d:c,s);Ie(f,e,t);d=m;c=s;f=d+22|0;do{b[d>>1]=b[c>>1]|0;d=d+2|0;c=c+2|0;}while((d|0)<(f|0));He(g,m,o,40,l,0);He(t,o,o,40,l,0);Be(g,h,q,40);d=n;c=q;f=d+80|0;do{b[d>>1]=b[c>>1]|0;d=d+2|0;c=c+2|0;}while((d|0)<(f|0));He(g,n,r,40,j,0);Be(s,r,p,40);He(t,p,p,40,k,0);i=u;return;}function zd(a,c,d,f,g,h,i,j,k,l,m,n,o,p,q,r,s){a=a|0;c=c|0;d=d|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;p=p|0;q=q|0;r=r|0;s=s|0;var t=0,u=0,v=0,w=0,x=0;if((c|0)==7){v=11;c=f<<16>>16>>>1&65535;t=2;}else{v=13;c=f;t=1;}b[r>>1]=f<<16>>16<13017?f:13017;u=d<<16>>16;q=q+(u<<1)|0;r=c<<16>>16;g=g<<16>>16;d=20;c=k;s=q;while(1){k=s+2|0;x=Z(b[s>>1]|0,r)|0;w=Z(b[k>>1]|0,r)|0;x=(Z(b[c>>1]|0,g)|0)+x<<1;w=(Z(b[c+2>>1]|0,g)|0)+w<<1<>1]=((x<>>16;b[k>>1]=(w+32768|0)>>>16;d=d+-1<<16>>16;if(!(d<<16>>16))break;else{c=c+4|0;s=s+4|0;}}c=f<<16>>16;He(h,q,i+(u<<1)|0,40,n,1);d=30;s=0;while(1){w=d+u|0;b[o+(s<<1)>>1]=(e[a+(w<<1)>>1]|0)-(e[i+(w<<1)>>1]|0);w=Z(b[l+(d<<1)>>1]|0,c)|0;x=(Z(b[m+(d<<1)>>1]|0,g)|0)>>v;b[p+(s<<1)>>1]=(e[j+(d<<1)>>1]|0)-(w>>>14)-x;s=s+1|0;if((s|0)==10)break;else d=d+1|0;}return;}function Ad(a){a=a|0;var d=0;if(!a){a=-1;return a|0;}c[a>>2]=0;d=Je(16)|0;if(!d){a=-1;return a|0;}b[d>>1]=0;b[d+2>>1]=0;b[d+4>>1]=0;b[d+6>>1]=0;b[d+8>>1]=0;b[d+10>>1]=0;b[d+12>>1]=0;b[d+14>>1]=0;c[a>>2]=d;a=0;return a|0;}function Bd(a){a=a|0;if(!a){a=-1;return a|0;}b[a>>1]=0;b[a+2>>1]=0;b[a+4>>1]=0;b[a+6>>1]=0;b[a+8>>1]=0;b[a+10>>1]=0;b[a+12>>1]=0;b[a+14>>1]=0;a=0;return a|0;}function Cd(a){a=a|0;var b=0;if(!a)return;b=c[a>>2]|0;if(!b)return;Ke(b);c[a>>2]=0;return;}function Dd(a,c,d){a=a|0;c=c|0;d=d|0;var f=0,g=0,h=0,i=0;f=e[c+6>>1]|0;d=e[c+8>>1]|0;g=f-d|0;g=(g&65535|0)!=32767?g&65535:32767;h=e[c+10>>1]|0;d=d-h|0;g=(d<<16>>16|0)<(g<<16>>16|0)?d&65535:g;d=e[c+12>>1]|0;h=h-d|0;g=(h<<16>>16|0)<(g<<16>>16|0)?h&65535:g;h=e[c+14>>1]|0;d=d-h|0;g=(d<<16>>16|0)<(g<<16>>16|0)?d&65535:g;h=h-(e[c+16>>1]|0)|0;d=b[c+2>>1]|0;i=e[c+4>>1]|0;c=(d&65535)-i|0;c=(c&65535|0)!=32767?c&65535:32767;f=i-f|0;if(((h<<16>>16|0)<(g<<16>>16|0)?h&65535:g)<<16>>16<1500?1:(((f<<16>>16|0)<(c<<16>>16|0)?f&65535:c)<<16>>16|0)<((d<<16>>16>32e3?600:d<<16>>16>30500?800:1100)|0)){h=(b[a>>1]|0)+1<<16>>16;i=h<<16>>16>11;b[a>>1]=i?12:h;return i&1|0;}else{b[a>>1]=0;return 0;}return 0;}function Ed(a,c,d){a=a|0;c=c|0;d=d|0;c=De(c,3,d)|0;c=Rd(c,b[a+2>>1]|0,d)|0;c=Rd(c,b[a+4>>1]|0,d)|0;c=Rd(c,b[a+6>>1]|0,d)|0;c=Rd(c,b[a+8>>1]|0,d)|0;c=Rd(c,b[a+10>>1]|0,d)|0;c=Rd(c,b[a+12>>1]|0,d)|0;return(Rd(c,b[a+14>>1]|0,d)|0)<<16>>16>15565|0;}function Fd(a,c,d){a=a|0;c=c|0;d=d|0;var e=0;d=a+4|0;b[a+2>>1]=b[d>>1]|0;e=a+6|0;b[d>>1]=b[e>>1]|0;d=a+8|0;b[e>>1]=b[d>>1]|0;e=a+10|0;b[d>>1]=b[e>>1]|0;d=a+12|0;b[e>>1]=b[d>>1]|0;a=a+14|0;b[d>>1]=b[a>>1]|0;b[a>>1]=c<<16>>16>>>3;return;}function Gd(a){a=a|0;var d=0,e=0,f=0;if(!a){f=-1;return f|0;}c[a>>2]=0;d=Je(128)|0;if(!d){f=-1;return f|0;}e=d+72|0;f=e+46|0;do{b[e>>1]=0;e=e+2|0;}while((e|0)<(f|0));b[d>>1]=150;b[d+36>>1]=150;b[d+18>>1]=150;b[d+54>>1]=0;b[d+2>>1]=150;b[d+38>>1]=150;b[d+20>>1]=150;b[d+56>>1]=0;b[d+4>>1]=150;b[d+40>>1]=150;b[d+22>>1]=150;b[d+58>>1]=0;b[d+6>>1]=150;b[d+42>>1]=150;b[d+24>>1]=150;b[d+60>>1]=0;b[d+8>>1]=150;b[d+44>>1]=150;b[d+26>>1]=150;b[d+62>>1]=0;b[d+10>>1]=150;b[d+46>>1]=150;b[d+28>>1]=150;b[d+64>>1]=0;b[d+12>>1]=150;b[d+48>>1]=150;b[d+30>>1]=150;b[d+66>>1]=0;b[d+14>>1]=150;b[d+50>>1]=150;b[d+32>>1]=150;b[d+68>>1]=0;b[d+16>>1]=150;b[d+52>>1]=150;b[d+34>>1]=150;b[d+70>>1]=0;b[d+118>>1]=13106;b[d+120>>1]=0;b[d+122>>1]=0;b[d+124>>1]=0;b[d+126>>1]=13106;c[a>>2]=d;f=0;return f|0;}function Hd(a){a=a|0;var c=0,d=0;if(!a){d=-1;return d|0;}c=a+72|0;d=c+46|0;do{b[c>>1]=0;c=c+2|0;}while((c|0)<(d|0));b[a>>1]=150;b[a+36>>1]=150;b[a+18>>1]=150;b[a+54>>1]=0;b[a+2>>1]=150;b[a+38>>1]=150;b[a+20>>1]=150;b[a+56>>1]=0;b[a+4>>1]=150;b[a+40>>1]=150;b[a+22>>1]=150;b[a+58>>1]=0;b[a+6>>1]=150;b[a+42>>1]=150;b[a+24>>1]=150;b[a+60>>1]=0;b[a+8>>1]=150;b[a+44>>1]=150;b[a+26>>1]=150;b[a+62>>1]=0;b[a+10>>1]=150;b[a+46>>1]=150;b[a+28>>1]=150;b[a+64>>1]=0;b[a+12>>1]=150;b[a+48>>1]=150;b[a+30>>1]=150;b[a+66>>1]=0;b[a+14>>1]=150;b[a+50>>1]=150;b[a+32>>1]=150;b[a+68>>1]=0;b[a+16>>1]=150;b[a+52>>1]=150;b[a+34>>1]=150;b[a+70>>1]=0;b[a+118>>1]=13106;b[a+120>>1]=0;b[a+122>>1]=0;b[a+124>>1]=0;b[a+126>>1]=13106;d=0;return d|0;}function Id(a){a=a|0;var b=0;if(!a)return;b=c[a>>2]|0;if(!b)return;Ke(b);c[a>>2]=0;return;}function Jd(a,c){a=a|0;c=c|0;b[a+118>>1]=c;return;}function Kd(a,d,f,g){a=a|0;d=d|0;f=f|0;g=g|0;var h=0;f=Ce(f,g)|0;if(f<<16>>16<=0)return;f=f<<16>>16;if((f*21298|0)==1073741824){c[g>>2]=1;h=2147483647;}else h=f*42596|0;f=d-h|0;if(((f^d)&(h^d)|0)<0){c[g>>2]=1;f=(d>>>31)+2147483647|0;}if((f|0)<=0)return;a=a+104|0;b[a>>1]=e[a>>1]|0|16384;return;}function Ld(a,c,d){a=a|0;c=c|0;d=d|0;var e=0;a=a+104|0;e=De(b[a>>1]|0,1,d)|0;b[a>>1]=e;if(!(c<<16>>16))return;b[a>>1]=(De(e,1,d)|0)&65535|8192;return;}function Md(a,c,d){a=a|0;c=c|0;d=d|0;var f=0,g=0,h=0;g=a+112|0;f=Ge(b[g>>1]|0,b[c>>1]|0,d)|0;f=(f&65535)-((f&65535)>>>15&65535)|0;f=((f<<16>>31^f)&65535)<<16>>16<4;h=b[c>>1]|0;b[g>>1]=h;c=c+2|0;h=Ge(h,b[c>>1]|0,d)|0;h=(h&65535)-((h&65535)>>>15&65535)|0;f=((h<<16>>31^h)&65535)<<16>>16<4?f?2:1:f&1;b[g>>1]=b[c>>1]|0;g=a+102|0;b[g>>1]=De(b[g>>1]|0,1,d)|0;c=a+110|0;if((Rd(b[c>>1]|0,f,d)|0)<<16>>16<=3){b[c>>1]=f;return;}b[g>>1]=e[g>>1]|0|16384;b[c>>1]=f;return;}function Nd(a,d,f){a=a|0;d=d|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;D=i;i=i+352|0;n=D+24|0;B=D;k=0;h=0;do{g=b[d+(k+-40<<1)>>1]|0;g=Z(g,g)|0;if((g|0)!=1073741824){j=(g<<1)+h|0;if((g^h|0)>0&(j^h|0)<0){c[f>>2]=1;h=(h>>>31)+2147483647|0;}else h=j;}else{c[f>>2]=1;h=2147483647;}k=k+1|0;}while((k|0)!=160);o=h;if((343039-o&o|0)<0){c[f>>2]=1;h=(o>>>31)+2147483647|0;}else h=o+-343040|0;if((h|0)<0){A=a+102|0;b[A>>1]=e[A>>1]&16383;}m=o+-15e3|0;p=(14999-o&o|0)<0;if(p){c[f>>2]=1;j=(o>>>31)+2147483647|0;}else j=m;if((j|0)<0){A=a+108|0;b[A>>1]=e[A>>1]&16383;}g=a+72|0;l=a+74|0;j=b[g>>1]|0;k=b[l>>1]|0;h=0;do{A=h<<2;y=Ge((b[d+(A<<1)>>1]|0)>>>2&65535,((j<<16>>16)*21955|0)>>>15&65535,f)|0;v=((y<<16>>16)*21955|0)>>>15&65535;u=Rd(j,v,f)|0;x=A|1;z=Ge((b[d+(x<<1)>>1]|0)>>>2&65535,((k<<16>>16)*6390|0)>>>15&65535,f)|0;w=((z<<16>>16)*6390|0)>>>15&65535;j=Rd(k,w,f)|0;b[n+(A<<1)>>1]=Rd(u,j,f)|0;b[n+(x<<1)>>1]=Ge(u,j,f)|0;x=A|2;j=Ge((b[d+(x<<1)>>1]|0)>>>2&65535,v,f)|0;y=Rd(y,((j<<16>>16)*21955|0)>>>15&65535,f)|0;A=A|3;k=Ge((b[d+(A<<1)>>1]|0)>>>2&65535,w,f)|0;z=Rd(z,((k<<16>>16)*6390|0)>>>15&65535,f)|0;b[n+(x<<1)>>1]=Rd(y,z,f)|0;b[n+(A<<1)>>1]=Ge(y,z,f)|0;h=h+1|0;}while((h|0)!=40);b[g>>1]=j;b[l>>1]=k;k=a+76|0;j=a+80|0;h=0;do{A=h<<2;Od(n+(A<<1)|0,n+((A|2)<<1)|0,k,f);Od(n+((A|1)<<1)|0,n+((A|3)<<1)|0,j,f);h=h+1|0;}while((h|0)!=40);k=a+84|0;j=a+86|0;h=a+92|0;g=0;do{A=g<<3;Pd(n+(A<<1)|0,n+((A|4)<<1)|0,k,f);Pd(n+((A|2)<<1)|0,n+((A|6)<<1)|0,j,f);Pd(n+((A|3)<<1)|0,n+((A|7)<<1)|0,h,f);g=g+1|0;}while((g|0)!=20);k=a+88|0;j=a+90|0;h=0;do{A=h<<4;Pd(n+(A<<1)|0,n+((A|8)<<1)|0,k,f);Pd(n+((A|4)<<1)|0,n+((A|12)<<1)|0,j,f);h=h+1|0;}while((h|0)!=10);t=Qd(n,a+70|0,32,40,4,1,15,f)|0;b[B+16>>1]=t;u=Qd(n,a+68|0,16,20,8,7,16,f)|0;b[B+14>>1]=u;v=Qd(n,a+66|0,16,20,8,3,16,f)|0;b[B+12>>1]=v;w=Qd(n,a+64|0,16,20,8,2,16,f)|0;b[B+10>>1]=w;x=Qd(n,a+62|0,16,20,8,6,16,f)|0;b[B+8>>1]=x;y=Qd(n,a+60|0,8,10,16,4,16,f)|0;b[B+6>>1]=y;z=Qd(n,a+58|0,8,10,16,12,16,f)|0;b[B+4>>1]=z;A=Qd(n,a+56|0,8,10,16,8,16,f)|0;b[B+2>>1]=A;s=Qd(n,a+54|0,8,10,16,0,16,f)|0;b[B>>1]=s;k=0;g=0;do{j=a+(g<<1)|0;d=qe(b[j>>1]|0)|0;j=b[j>>1]|0;h=d<<16>>16;if(d<<16>>16<0){l=0-h<<16;if((l|0)<983040)l=j<<16>>16>>(l>>16)&65535;else l=0;}else{l=j<<16>>16;j=l<>16>>h|0)==(l|0))l=j&65535;else l=(l>>>15^32767)&65535;}j=Td(De(b[B+(g<<1)>>1]|0,1,f)|0,l)|0;r=Ge(d,5,f)|0;h=r<<16>>16;if(r<<16>>16<0){l=0-h<<16;if((l|0)<983040)l=j<<16>>16>>(l>>16);else l=0;}else{j=j<<16>>16;l=j<>16>>h|0)!=(j|0))l=j>>>15^32767;}l=l<<16>>16;l=Z(l,l)|0;if((l|0)!=1073741824){j=(l<<1)+k|0;if((l^k|0)>0&(j^k|0)<0){c[f>>2]=1;k=(k>>>31)+2147483647|0;}else k=j;}else{c[f>>2]=1;k=2147483647;}g=g+1|0;}while((g|0)!=9);r=k<<6;k=(((r>>6|0)==(k|0)?r:k>>31^2147418112)>>16)*3641>>15;if((k|0)>32767){c[f>>2]=1;k=32767;}r=b[a>>1]|0;l=r<<16>>16;q=b[a+2>>1]|0;j=(q<<16>>16)+l|0;if((q^r)<<16>>16>-1&(j^l|0)<0){c[f>>2]=1;j=(l>>>31)+2147483647|0;}r=b[a+4>>1]|0;l=r+j|0;if((r^j|0)>-1&(l^j|0)<0){c[f>>2]=1;l=(j>>>31)+2147483647|0;}r=b[a+6>>1]|0;j=r+l|0;if((r^l|0)>-1&(j^l|0)<0){c[f>>2]=1;j=(l>>>31)+2147483647|0;}r=b[a+8>>1]|0;l=r+j|0;if((r^j|0)>-1&(l^j|0)<0){c[f>>2]=1;l=(j>>>31)+2147483647|0;}r=b[a+10>>1]|0;j=r+l|0;if((r^l|0)>-1&(j^l|0)<0){c[f>>2]=1;j=(l>>>31)+2147483647|0;}r=b[a+12>>1]|0;l=r+j|0;if((r^j|0)>-1&(l^j|0)<0){c[f>>2]=1;l=(j>>>31)+2147483647|0;}r=b[a+14>>1]|0;j=r+l|0;if((r^l|0)>-1&(j^l|0)<0){c[f>>2]=1;j=(l>>>31)+2147483647|0;}r=b[a+16>>1]|0;l=r+j|0;if((r^j|0)>-1&(l^j|0)<0){c[f>>2]=1;l=(j>>>31)+2147483647|0;}q=l<<13;q=((q>>13|0)==(l|0)?q:l>>31^2147418112)>>>16&65535;l=(Z((Ge(q,0,f)|0)<<16>>16,-2808)|0)>>15;if((l|0)>32767){c[f>>2]=1;l=32767;}n=Rd(l&65535,1260,f)|0;r=a+100|0;l=De(b[r>>1]|0,1,f)|0;if((k<<16>>16|0)>((n<<16>>16<720?720:n<<16>>16)|0))l=(l&65535|16384)&65535;b[r>>1]=l;if(p){c[f>>2]=1;m=(o>>>31)+2147483647|0;}h=b[a+118>>1]|0;p=a+126|0;l=b[p>>1]|0;g=l<<16>>16<19660;g=h<<16>>16>16?g?2621:6553:g?2621:655;d=l&65535;k=d<<16;l=Z(g,l<<16>>16)|0;if((l|0)==1073741824){c[f>>2]=1;l=2147483647;}else l=l<<1;j=k-l|0;if(((j^k)&(l^k)|0)<0){c[f>>2]=1;j=(d>>>15)+2147483647|0;}k=Z(g,h<<16>>16)|0;do if((k|0)==1073741824){c[f>>2]=1;l=2147483647;}else{l=j+(k<<1)|0;if(!((j^k|0)>0&(l^j|0)<0))break;c[f>>2]=1;l=(j>>>31)+2147483647|0;}while(0);d=Ce(l,f)|0;o=(m|0)>-1;b[p>>1]=o?d<<16>>16<13106?13106:d:13106;d=a+106|0;b[d>>1]=De(b[d>>1]|0,1,f)|0;j=a+108|0;l=De(b[j>>1]|0,1,f)|0;b[j>>1]=l;k=b[p>>1]|0;a:do if(o){do if(k<<16>>16>19660)b[d>>1]=e[d>>1]|16384;else{if(k<<16>>16>16383)break;k=a+116|0;l=0;break a;}while(0);b[j>>1]=l&65535|16384;C=62;}else C=62;while(0);do if((C|0)==62){l=a+116|0;if(k<<16>>16<=22936){k=l;l=0;break;}k=l;l=Rd(b[l>>1]|0,1,f)|0;}while(0);b[k>>1]=l;if((b[d>>1]&32640)!=32640){n=(b[j>>1]&32767)==32767;b[a+122>>1]=n&1;if(n)C=67;}else{b[a+122>>1]=1;C=67;}do if((C|0)==67){k=a+98|0;if((b[k>>1]|0)>=5)break;b[k>>1]=5;}while(0);n=a+102|0;do if((b[n>>1]&24576)==24576)C=71;else{if((b[a+104>>1]&31744)==31744){C=71;break;}if(!(b[r>>1]&32640)){b[a+98>>1]=20;j=32767;break;}else{j=s;k=0;l=0;}while(1){g=b[a+18+(k<<1)>>1]|0;h=j<<16>>16>g<<16>>16;m=h?j:g;j=h?g:j;m=m<<16>>16<184?184:m;j=j<<16>>16<184?184:j;g=qe(j)|0;h=g<<16>>16;do if(g<<16>>16<0){d=0-h<<16;if((d|0)>=983040){d=0;break;}d=j<<16>>16>>(d>>16)&65535;}else{d=j<<16>>16;j=d<>16>>h|0)==(d|0)){d=j&65535;break;}d=(d>>>15^32767)&65535;}while(0);m=Td(De(m,1,f)|0,d)|0;l=Rd(l,De(m,Ge(8,g,f)|0,f)|0,f)|0;k=k+1|0;if((k|0)==9)break;j=b[B+(k<<1)>>1]|0;}if(l<<16>>16>1e3){b[a+98>>1]=20;j=32767;break;}j=b[r>>1]|0;k=a+98|0;l=b[k>>1]|0;do if(!(j&16384))C=86;else{if(!(l<<16>>16)){l=j;break;}l=Ge(l,1,f)|0;b[k>>1]=l;C=86;}while(0);if((C|0)==86){if(l<<16>>16==20){j=32767;break;}l=b[r>>1]|0;}j=(l&16384)==0?16383:3276;}while(0);if((C|0)==71){b[a+98>>1]=20;j=32767;}k=s;l=0;while(1){m=a+18+(l<<1)|0;d=oe(j,Ge(k,b[m>>1]|0,f)|0,f)|0;b[m>>1]=Rd(b[m>>1]|0,d,f)|0;l=l+1|0;if((l|0)==9)break;k=b[B+(l<<1)>>1]|0;}do if(!(b[r>>1]&30720)){if(b[n>>1]&30720){C=95;break;}if(!(b[a+114>>1]|0)){h=2097;g=1638;d=2;}else C=95;}else C=95;while(0);do if((C|0)==95){if((b[a+98>>1]|0)==0?(b[a+114>>1]|0)==0:0){h=1867;g=491;d=2;break;}h=1638;g=0;d=0;}while(0);j=0;do{k=a+(j<<1)|0;l=Ge(b[a+36+(j<<1)>>1]|0,b[k>>1]|0,f)|0;if(l<<16>>16<0){l=oe(h,l,f)|0;l=Rd(-2,Rd(b[k>>1]|0,l,f)|0,f)|0;l=l<<16>>16<40?40:l;}else{l=oe(g,l,f)|0;l=Rd(d,Rd(b[k>>1]|0,l,f)|0,f)|0;l=l<<16>>16>16e3?16e3:l;}b[k>>1]=l;j=j+1|0;}while((j|0)!=9);b[a+36>>1]=s;b[a+38>>1]=A;b[a+40>>1]=z;b[a+42>>1]=y;b[a+44>>1]=x;b[a+46>>1]=w;b[a+48>>1]=v;b[a+50>>1]=u;b[a+52>>1]=t;k=q<<16>>16>100;j=k?7:4;k=k?4:5;if(!o){b[a+94>>1]=0;b[a+96>>1]=0;b[a+114>>1]=0;b[a+116>>1]=0;f=0;a=a+120|0;b[a>>1]=f;i=D;return f|0;}h=a+114|0;g=b[h>>1]|0;do if((b[a+116>>1]|0)<=100){if(g<<16>>16)break;g=b[r>>1]|0;do if(!(g&16368)){if((b[p>>1]|0)>21298)g=1;else break;a=a+120|0;b[a>>1]=g;i=D;return g|0;}while(0);h=a+94|0;if(!(g&16384)){b[h>>1]=0;g=a+96|0;h=b[g>>1]|0;if(h<<16>>16<=0){f=0;a=a+120|0;b[a>>1]=f;i=D;return f|0;}b[g>>1]=Ge(h,1,f)|0;f=1;a=a+120|0;b[a>>1]=f;i=D;return f|0;}else{f=Rd(b[h>>1]|0,1,f)|0;b[h>>1]=f;if((f<<16>>16|0)<(k|0)){f=1;a=a+120|0;b[a>>1]=f;i=D;return f|0;}b[a+96>>1]=j;f=1;a=a+120|0;b[a>>1]=f;i=D;return f|0;}}else{if(g<<16>>16>=250)break;b[h>>1]=250;g=250;}while(0);b[a+94>>1]=4;b[h>>1]=Ge(g,1,f)|0;f=1;a=a+120|0;b[a>>1]=f;i=D;return f|0;}function Od(a,d,e,f){a=a|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0;g=(b[e>>1]|0)*21955>>15;if((g|0)>32767){c[f>>2]=1;g=32767;}h=Ge(b[a>>1]|0,g&65535,f)|0;g=(h<<16>>16)*21955>>15;if((g|0)>32767){c[f>>2]=1;g=32767;}i=Rd(b[e>>1]|0,g&65535,f)|0;b[e>>1]=h;e=e+2|0;g=(b[e>>1]|0)*6390>>15;if((g|0)>32767){c[f>>2]=1;g=32767;}h=Ge(b[d>>1]|0,g&65535,f)|0;g=(h<<16>>16)*6390>>15;if((g|0)>32767){c[f>>2]=1;g=32767;}g=Rd(b[e>>1]|0,g&65535,f)|0;b[e>>1]=h;b[a>>1]=De(Rd(i,g,f)|0,1,f)|0;b[d>>1]=De(Ge(i,g,f)|0,1,f)|0;return;}function Pd(a,d,e,f){a=a|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;g=(b[e>>1]|0)*13363>>15;if((g|0)>32767){c[f>>2]=1;g=32767;}h=Ge(b[d>>1]|0,g&65535,f)|0;g=(h<<16>>16)*13363>>15;if((g|0)>32767){c[f>>2]=1;g=32767;}g=Rd(b[e>>1]|0,g&65535,f)|0;b[e>>1]=h;b[d>>1]=De(Ge(b[a>>1]|0,g,f)|0,1,f)|0;b[a>>1]=De(Rd(b[a>>1]|0,g,f)|0,1,f)|0;return;}function Qd(a,d,e,f,g,h,i,j){a=a|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0;if(e<<16>>16>16){n=g<<16>>16;k=h<<16>>16;o=e<<16>>16;l=0;do{p=b[a+((Z(o,n)|0)+k<<1)>>1]|0;p=(p&65535)-((p&65535)>>>15&65535)|0;p=(p<<16>>31^p)<<16;m=(p>>15)+l|0;if((p>>16^l|0)>0&(m^l|0)<0){c[j>>2]=1;l=(l>>>31)+2147483647|0;}else l=m;o=o+1|0;}while((o&65535)<<16>>16!=f<<16>>16);o=l;}else o=0;l=b[d>>1]|0;p=Ge(16,i,j)|0;k=p<<16>>16;if(p<<16>>16>0){f=l<>k|0)!=(l|0))f=l>>31^2147483647;}else{k=0-k<<16;if((k|0)<2031616)f=l>>(k>>16);else f=0;}k=f+o|0;if((f^o|0)>-1&(k^o|0)<0){c[j>>2]=1;k=(o>>>31)+2147483647|0;}p=i<<16>>16;i=i<<16>>16>0;if(i){f=o<>p|0)!=(o|0))f=o>>31^2147483647;}else{f=0-p<<16;if((f|0)<2031616)f=o>>(f>>16);else f=0;}b[d>>1]=f>>>16;if(e<<16>>16>0){n=g<<16>>16;l=h<<16>>16;m=0;do{h=b[a+((Z(m,n)|0)+l<<1)>>1]|0;h=(h&65535)-((h&65535)>>>15&65535)|0;h=(h<<16>>31^h)<<16;f=(h>>15)+k|0;if((h>>16^k|0)>0&(f^k|0)<0){c[j>>2]=1;k=(k>>>31)+2147483647|0;}else k=f;m=m+1|0;}while((m&65535)<<16>>16!=e<<16>>16);}if(i){f=k<>p|0)==(k|0)){j=f;j=j>>>16;j=j&65535;return j|0;}j=k>>31^2147483647;j=j>>>16;j=j&65535;return j|0;}else{f=0-p<<16;if((f|0)>=2031616){j=0;j=j>>>16;j=j&65535;return j|0;}j=k>>(f>>16);j=j>>>16;j=j&65535;return j|0;}return 0;}function Rd(a,b,d){a=a|0;b=b|0;d=d|0;a=(b<<16>>16)+(a<<16>>16)|0;if((a|0)<=32767){if((a|0)<-32768){c[d>>2]=1;a=-32768;}}else{c[d>>2]=1;a=32767;}return a&65535|0;}function Sd(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0;y=i;i=i+32|0;w=y+12|0;x=y;b[w>>1]=1024;b[x>>1]=1024;k=b[a+2>>1]|0;h=b[a+20>>1]|0;e=((h+k|0)>>>2)+64512|0;b[w+2>>1]=e;h=((k-h|0)>>>2)+1024|0;b[x+2>>1]=h;k=b[a+4>>1]|0;f=b[a+18>>1]|0;e=((f+k|0)>>>2)-e|0;b[w+4>>1]=e;h=((k-f|0)>>>2)+h|0;b[x+4>>1]=h;f=b[a+6>>1]|0;k=b[a+16>>1]|0;e=((k+f|0)>>>2)-e|0;b[w+6>>1]=e;h=((f-k|0)>>>2)+h|0;b[x+6>>1]=h;k=b[a+8>>1]|0;f=b[a+14>>1]|0;e=((f+k|0)>>>2)-e|0;b[w+8>>1]=e;h=((k-f|0)>>>2)+h|0;b[x+8>>1]=h;f=b[a+10>>1]|0;k=b[a+12>>1]|0;e=((k+f|0)>>>2)-e|0;b[w+10>>1]=e;b[x+10>>1]=((f-k|0)>>>2)+h;h=b[3454]|0;k=h<<16>>16;a=b[w+2>>1]|0;f=(a<<16>>16<<14)+(k<<10)|0;s=f&-65536;f=(f>>>1)-(f>>16<<15)<<16;v=(((Z(f>>16,k)|0)>>15)+(Z(s>>16,k)|0)<<2)+-16777216|0;v=(b[w+4>>1]<<14)+v|0;j=v>>16;v=(v>>>1)-(j<<15)<<16;s=(((Z(v>>16,k)|0)>>15)+(Z(j,k)|0)<<2)-((f>>15)+s)|0;s=(b[w+6>>1]<<14)+s|0;f=s>>16;s=(s>>>1)-(f<<15)<<16;j=(((Z(s>>16,k)|0)>>15)+(Z(f,k)|0)<<2)-((v>>15)+(j<<16))|0;j=(b[w+8>>1]<<14)+j|0;v=j>>16;f=(e<<16>>3)+((((Z((j>>>1)-(v<<15)<<16>>16,k)|0)>>15)+(Z(v,k)|0)<<1)-((s>>15)+(f<<16)))|0;s=w+4|0;k=w;v=0;j=0;e=0;r=w+10|0;f=(f+33554432|0)>>>0<67108863?f>>>10&65535:(f|0)>33554431?32767:-32768;a:while(1){t=a<<16>>16<<14;q=k+6|0;p=k+8|0;o=j<<16>>16;while(1){if((o|0)>=60)break a;k=(o&65535)+1<<16>>16;l=b[6908+(k<<16>>16<<1)>>1]|0;u=l<<16>>16;j=t+(u<<10)|0;g=j&-65536;j=(j>>>1)-(j>>16<<15)<<16;m=(((Z(j>>16,u)|0)>>15)+(Z(g>>16,u)|0)<<2)+-16777216|0;n=b[s>>1]|0;m=(n<<16>>16<<14)+m|0;B=m>>16;m=(m>>>1)-(B<<15)<<16;g=(((Z(m>>16,u)|0)>>15)+(Z(B,u)|0)<<2)-((j>>15)+g)|0;j=b[q>>1]|0;g=(j<<16>>16<<14)+g|0;a=g>>16;g=(g>>>1)-(a<<15)<<16;B=(((Z(g>>16,u)|0)>>15)+(Z(a,u)|0)<<2)-((m>>15)+(B<<16))|0;m=b[p>>1]|0;B=(m<<16>>16<<14)+B|0;A=B>>16;a=(((Z((B>>>1)-(A<<15)<<16>>16,u)|0)>>15)+(Z(A,u)|0)<<1)-((g>>15)+(a<<16))|0;g=b[r>>1]|0;a=(g<<16>>16<<13)+a|0;a=(a+33554432|0)>>>0<67108863?a>>>10&65535:(a|0)>33554431?32767:-32768;if((Z(a<<16>>16,f<<16>>16)|0)<1){u=k;k=n;break;}else{o=o+1|0;h=l;f=a;}}s=g<<16>>16<<13;r=k<<16>>16<<14;n=j<<16>>16<<14;p=m<<16>>16<<14;g=l<<16>>16;o=4;while(1){A=(h<<16>>16>>>1)+(g>>>1)|0;g=A<<16;q=g>>16;g=t+(g>>6)|0;B=g&-65536;g=(g>>>1)-(g>>16<<15)<<16;m=r+((((Z(g>>16,q)|0)>>15)+(Z(B>>16,q)|0)<<2)+-16777216)|0;k=m>>16;m=(m>>>1)-(k<<15)<<16;B=n+((((Z(m>>16,q)|0)>>15)+(Z(k,q)|0)<<2)-((g>>15)+B))|0;g=B>>16;B=(B>>>1)-(g<<15)<<16;k=p+((((Z(B>>16,q)|0)>>15)+(Z(g,q)|0)<<2)-((m>>15)+(k<<16)))|0;m=k>>16;A=A&65535;g=s+((((Z((k>>>1)-(m<<15)<<16>>16,q)|0)>>15)+(Z(m,q)|0)<<1)-((B>>15)+(g<<16)))|0;g=(g+33554432|0)>>>0<67108863?g>>>10&65535:(g|0)>33554431?32767:-32768;B=(Z(g<<16>>16,a<<16>>16)|0)<1;q=B?l:A;a=B?a:g;h=B?A:h;f=B?g:f;o=o+-1<<16>>16;g=q<<16>>16;if(!(o<<16>>16)){l=g;j=h;h=q;break;}else l=q;}k=e<<16>>16;g=a<<16>>16;a=(f&65535)-g|0;f=a<<16;if(f){B=(a&65535)-(a>>>15&1)|0;B=B<<16>>31^B;a=(qe(B&65535)|0)<<16>>16;a=(Z((Td(16383,B<<16>>16<>16,(j&65535)-l<<16>>16)|0)>>19-a;if((f|0)<0)a=0-(a<<16>>16)|0;h=l-((Z(a<<16>>16,g)|0)>>>10)&65535;}b[c+(k<<1)>>1]=h;f=v<<16>>16==0?x:w;A=h<<16>>16;a=b[f+2>>1]|0;g=(a<<16>>16<<14)+(A<<10)|0;B=g&-65536;g=(g>>>1)-(g>>16<<15)<<16;t=(((Z(g>>16,A)|0)>>15)+(Z(B>>16,A)|0)<<2)+-16777216|0;t=(b[f+4>>1]<<14)+t|0;s=t>>16;t=(t>>>1)-(s<<15)<<16;B=(((Z(t>>16,A)|0)>>15)+(Z(s,A)|0)<<2)-((g>>15)+B)|0;B=(b[f+6>>1]<<14)+B|0;g=B>>16;B=(B>>>1)-(g<<15)<<16;s=(((Z(B>>16,A)|0)>>15)+(Z(g,A)|0)<<2)-((t>>15)+(s<<16))|0;s=(b[f+8>>1]<<14)+s|0;t=s>>16;e=e+1<<16>>16;g=(((Z((s>>>1)-(t<<15)<<16>>16,A)|0)>>15)+(Z(t,A)|0)<<1)-((B>>15)+(g<<16))|0;g=(b[f+10>>1]<<13)+g|0;if(e<<16>>16<10){s=f+4|0;k=f;v=v^1;j=u;r=f+10|0;f=(g+33554432|0)>>>0<67108863?g>>>10&65535:(g|0)>33554431?32767:-32768;}else{z=13;break;}}if((z|0)==13){i=y;return;}b[c>>1]=b[d>>1]|0;b[c+2>>1]=b[d+2>>1]|0;b[c+4>>1]=b[d+4>>1]|0;b[c+6>>1]=b[d+6>>1]|0;b[c+8>>1]=b[d+8>>1]|0;b[c+10>>1]=b[d+10>>1]|0;b[c+12>>1]=b[d+12>>1]|0;b[c+14>>1]=b[d+14>>1]|0;b[c+16>>1]=b[d+16>>1]|0;b[c+18>>1]=b[d+18>>1]|0;i=y;return;}function Td(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0;e=b<<16>>16;if(a<<16>>16<1?1:a<<16>>16>b<<16>>16){e=0;return e|0;}if(a<<16>>16==b<<16>>16){e=32767;return e|0;}d=e<<1;c=e<<2;f=a<<16>>16<<3;a=(f|0)<(c|0);f=f-(a?0:c)|0;a=a?0:4;g=(f|0)<(d|0);f=f-(g?0:d)|0;b=(f|0)<(e|0);a=(b&1|(g?a:a|2))<<3^8;b=f-(b?0:e)<<3;if((b|0)>=(c|0)){b=b-c|0;a=a&65528|4;}f=(b|0)<(d|0);g=b-(f?0:d)|0;b=(g|0)<(e|0);a=(b&1^1|(f?a:a|2))<<16>>13;b=g-(b?0:e)<<3;if((b|0)>=(c|0)){b=b-c|0;a=a&65528|4;}f=(b|0)<(d|0);g=b-(f?0:d)|0;b=(g|0)<(e|0);a=(b&1^1|(f?a:a|2))<<16>>13;b=g-(b?0:e)<<3;if((b|0)>=(c|0)){b=b-c|0;a=a&65528|4;}h=(b|0)<(d|0);f=b-(h?0:d)|0;g=(f|0)<(e|0);b=(g&1^1|(h?a:a|2))<<16>>13;a=f-(g?0:e)<<3;if((a|0)>=(c|0)){a=a-c|0;b=b&65528|4;}h=(a|0)<(d|0);h=((a-(h?0:d)|0)>=(e|0)|(h?b:b|2))&65535;return h|0;}function Ud(a){a=a|0;if(!a){a=-1;return a|0;}b[a>>1]=-14336;b[a+8>>1]=-2381;b[a+2>>1]=-14336;b[a+10>>1]=-2381;b[a+4>>1]=-14336;b[a+12>>1]=-2381;b[a+6>>1]=-14336;b[a+14>>1]=-2381;a=0;return a|0;}function Vd(a,d,f,g,h,j,k,l){a=a|0;d=d|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;l=l|0;var m=0,n=0,o=0,p=0,q=0,r=0;r=i;i=i+16|0;p=r+2|0;q=r;m=0;n=10;while(1){o=b[f>>1]|0;o=((Z(o,o)|0)>>>3)+m|0;m=b[f+2>>1]|0;m=o+((Z(m,m)|0)>>>3)|0;o=b[f+4>>1]|0;o=m+((Z(o,o)|0)>>>3)|0;m=b[f+6>>1]|0;m=o+((Z(m,m)|0)>>>3)|0;n=n+-1<<16>>16;if(!(n<<16>>16))break;else f=f+8|0;}n=m<<4;n=(n|0)<0?2147483647:n;if((d|0)==7){de(((Ce(n,l)|0)<<16>>16)*52428|0,p,q,l);o=e[p>>1]<<16;n=b[q>>1]<<1;d=b[a+8>>1]|0;m=(d<<16>>16)*88|0;if(d<<16>>16>-1&(m|0)<-783741){c[l>>2]=1;f=2147483647;}else f=m+783741|0;d=(b[a+10>>1]|0)*74|0;m=d+f|0;if((d^f|0)>-1&(m^f|0)<0){c[l>>2]=1;f=(f>>>31)+2147483647|0;}else f=m;d=(b[a+12>>1]|0)*44|0;m=d+f|0;if((d^f|0)>-1&(m^f|0)<0){c[l>>2]=1;f=(f>>>31)+2147483647|0;}else f=m;a=(b[a+14>>1]|0)*24|0;m=a+f|0;if((a^f|0)>-1&(m^f|0)<0){c[l>>2]=1;m=(f>>>31)+2147483647|0;}a=o+-1966080+n|0;f=m-a|0;if(((f^m)&(m^a)|0)<0){c[l>>2]=1;f=(m>>>31)+2147483647|0;}l=f>>17;b[g>>1]=l;l=(f>>2)-(l<<15)|0;l=l&65535;b[h>>1]=l;i=r;return;}o=pe(n)|0;m=o<<16>>16;if(o<<16>>16>0){f=n<>m|0)==(n|0))n=f;else n=n>>31^2147483647;}else{m=0-m<<16;if((m|0)<2031616)n=n>>(m>>16);else n=0;}ee(n,o,p,q);p=Z(b[p>>1]|0,-49320)|0;m=(Z(b[q>>1]|0,-24660)|0)>>15;m=(m&65536|0)==0?m:m|-65536;q=m<<1;f=q+p|0;if((q^p|0)>-1&(f^q|0)<0){c[l>>2]=1;f=(m>>>30&1)+2147483647|0;}switch(d|0){case 6:{m=f+2134784|0;if((f|0)>-1&(m^f|0)<0){c[l>>2]=1;m=(f>>>31)+2147483647|0;}break;}case 5:{b[k>>1]=n>>>16;b[j>>1]=-11-(o&65535);m=f+2183936|0;if((f|0)>-1&(m^f|0)<0){c[l>>2]=1;m=(f>>>31)+2147483647|0;}break;}case 4:{m=f+2085632|0;if((f|0)>-1&(m^f|0)<0){c[l>>2]=1;m=(f>>>31)+2147483647|0;}break;}case 3:{m=f+2065152|0;if((f|0)>-1&(m^f|0)<0){c[l>>2]=1;m=(f>>>31)+2147483647|0;}break;}default:{m=f+2134784|0;if((f|0)>-1&(m^f|0)<0){c[l>>2]=1;m=(f>>>31)+2147483647|0;}}}do if((m|0)<=2097151){if((m|0)<-2097152){c[l>>2]=1;f=-2147483648;break;}else{f=m<<10;break;}}else{c[l>>2]=1;f=2147483647;}while(0);k=(b[a>>1]|0)*11142|0;m=k+f|0;if((k^f|0)>-1&(m^f|0)<0){c[l>>2]=1;m=(f>>>31)+2147483647|0;}k=(b[a+2>>1]|0)*9502|0;f=k+m|0;if((k^m|0)>-1&(f^m|0)<0){c[l>>2]=1;f=(m>>>31)+2147483647|0;}k=(b[a+4>>1]|0)*5570|0;m=k+f|0;if((k^f|0)>-1&(m^f|0)<0){c[l>>2]=1;m=(f>>>31)+2147483647|0;}a=(b[a+6>>1]|0)*3112|0;f=a+m|0;if((a^m|0)>-1&(f^m|0)<0){c[l>>2]=1;f=(m>>>31)+2147483647|0;}f=Z(f>>16,(d|0)==4?10878:10886)|0;if((f|0)<0)f=~((f^-256)>>8);else f=f>>8;b[g>>1]=f>>>16;if((f|0)<0)m=~((f^-2)>>1);else m=f>>1;g=f>>16<<15;f=m-g|0;if(((f^m)&(g^m)|0)>=0){l=f;l=l&65535;b[h>>1]=l;i=r;return;}c[l>>2]=1;l=(m>>>31)+2147483647|0;l=l&65535;b[h>>1]=l;i=r;return;}function Wd(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,f=0,g=0;f=a+4|0;b[a+6>>1]=b[f>>1]|0;g=a+12|0;b[a+14>>1]=b[g>>1]|0;e=a+2|0;b[f>>1]=b[e>>1]|0;f=a+10|0;b[g>>1]=b[f>>1]|0;b[e>>1]=b[a>>1]|0;e=a+8|0;b[f>>1]=b[e>>1]|0;b[e>>1]=c;b[a>>1]=d;return;}function Xd(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var f=0,g=0;g=Rd(0,b[a+8>>1]|0,e)|0;g=Rd(g,b[a+10>>1]|0,e)|0;g=Rd(g,b[a+12>>1]|0,e)|0;g=Rd(g,b[a+14>>1]|0,e)|0;f=g<<16>>16>>2;f=(g<<16>>16<0?f|49152:f)&65535;b[c>>1]=f<<16>>16<-2381?-2381:f;c=Rd(0,b[a>>1]|0,e)|0;c=Rd(c,b[a+2>>1]|0,e)|0;c=Rd(c,b[a+4>>1]|0,e)|0;e=Rd(c,b[a+6>>1]|0,e)|0;a=e<<16>>16>>2;a=(e<<16>>16<0?a|49152:a)&65535;b[d>>1]=a<<16>>16<-14336?-14336:a;return;}function Yd(a){a=a|0;c[a>>2]=6892;c[a+4>>2]=8180;c[a+8>>2]=21e3;c[a+12>>2]=9716;c[a+16>>2]=22024;c[a+20>>2]=12788;c[a+24>>2]=24072;c[a+28>>2]=26120;c[a+32>>2]=28168;c[a+36>>2]=6876;c[a+40>>2]=7452;c[a+44>>2]=8140;c[a+48>>2]=20980;c[a+52>>2]=16884;c[a+56>>2]=17908;c[a+60>>2]=7980;c[a+64>>2]=8160;c[a+68>>2]=6678;c[a+72>>2]=6646;c[a+76>>2]=6614;c[a+80>>2]=29704;c[a+84>>2]=28680;c[a+88>>2]=3720;c[a+92>>2]=8;c[a+96>>2]=4172;c[a+100>>2]=44;c[a+104>>2]=3436;c[a+108>>2]=30316;c[a+112>>2]=30796;c[a+116>>2]=31276;c[a+120>>2]=7472;c[a+124>>2]=7552;c[a+128>>2]=7632;c[a+132>>2]=7712;return;}function Zd(a,c){a=a|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0;n=i;i=i+48|0;l=n+18|0;m=n;k=c<<16>>16;Oe(m|0,a|0,k<<1|0)|0;if(c<<16>>16>0){d=0;e=0;}else{m=k>>1;m=l+(m<<1)|0;m=b[m>>1]|0;m=m<<16>>16;m=a+(m<<1)|0;m=b[m>>1]|0;i=n;return m|0;}do{j=0;h=-32767;while(1){f=b[m+(j<<1)>>1]|0;g=f<<16>>16>16;e=g?e:j&65535;j=j+1|0;if((j&65535)<<16>>16==c<<16>>16)break;else h=g?h:f;}b[m+(e<<16>>16<<1)>>1]=-32768;b[l+(d<<1)>>1]=e;d=d+1|0;}while((d&65535)<<16>>16!=c<<16>>16);m=k>>1;m=l+(m<<1)|0;m=b[m>>1]|0;m=m<<16>>16;m=a+(m<<1)|0;m=b[m>>1]|0;i=n;return m|0;}function _d(a,c,d,e,f){a=a|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0;g=i;i=i+32|0;h=g;A=c+2|0;z=h+2|0;b[h>>1]=((b[c>>1]|0)>>>1)+((b[a>>1]|0)>>>1);y=c+4|0;x=h+4|0;b[z>>1]=((b[A>>1]|0)>>>1)+((b[a+2>>1]|0)>>>1);w=c+6|0;v=h+6|0;b[x>>1]=((b[y>>1]|0)>>>1)+((b[a+4>>1]|0)>>>1);u=c+8|0;t=h+8|0;b[v>>1]=((b[w>>1]|0)>>>1)+((b[a+6>>1]|0)>>>1);s=c+10|0;r=h+10|0;b[t>>1]=((b[u>>1]|0)>>>1)+((b[a+8>>1]|0)>>>1);q=c+12|0;p=h+12|0;b[r>>1]=((b[s>>1]|0)>>>1)+((b[a+10>>1]|0)>>>1);o=c+14|0;n=h+14|0;b[p>>1]=((b[q>>1]|0)>>>1)+((b[a+12>>1]|0)>>>1);m=c+16|0;l=h+16|0;b[n>>1]=((b[o>>1]|0)>>>1)+((b[a+14>>1]|0)>>>1);k=c+18|0;j=h+18|0;b[l>>1]=((b[m>>1]|0)>>>1)+((b[a+16>>1]|0)>>>1);b[j>>1]=((b[k>>1]|0)>>>1)+((b[a+18>>1]|0)>>>1);he(h,e,f);he(c,e+22|0,f);b[h>>1]=((b[d>>1]|0)>>>1)+((b[c>>1]|0)>>>1);b[z>>1]=((b[d+2>>1]|0)>>>1)+((b[A>>1]|0)>>>1);b[x>>1]=((b[d+4>>1]|0)>>>1)+((b[y>>1]|0)>>>1);b[v>>1]=((b[d+6>>1]|0)>>>1)+((b[w>>1]|0)>>>1);b[t>>1]=((b[d+8>>1]|0)>>>1)+((b[u>>1]|0)>>>1);b[r>>1]=((b[d+10>>1]|0)>>>1)+((b[s>>1]|0)>>>1);b[p>>1]=((b[d+12>>1]|0)>>>1)+((b[q>>1]|0)>>>1);b[n>>1]=((b[d+14>>1]|0)>>>1)+((b[o>>1]|0)>>>1);b[l>>1]=((b[d+16>>1]|0)>>>1)+((b[m>>1]|0)>>>1);b[j>>1]=((b[d+18>>1]|0)>>>1)+((b[k>>1]|0)>>>1);he(h,e+44|0,f);he(d,e+66|0,f);i=g;return;}function $d(a,c,d,e,f){a=a|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0;g=i;i=i+32|0;h=g;A=c+2|0;z=h+2|0;b[h>>1]=((b[c>>1]|0)>>>1)+((b[a>>1]|0)>>>1);y=c+4|0;x=h+4|0;b[z>>1]=((b[A>>1]|0)>>>1)+((b[a+2>>1]|0)>>>1);w=c+6|0;v=h+6|0;b[x>>1]=((b[y>>1]|0)>>>1)+((b[a+4>>1]|0)>>>1);u=c+8|0;t=h+8|0;b[v>>1]=((b[w>>1]|0)>>>1)+((b[a+6>>1]|0)>>>1);s=c+10|0;r=h+10|0;b[t>>1]=((b[u>>1]|0)>>>1)+((b[a+8>>1]|0)>>>1);q=c+12|0;p=h+12|0;b[r>>1]=((b[s>>1]|0)>>>1)+((b[a+10>>1]|0)>>>1);o=c+14|0;n=h+14|0;b[p>>1]=((b[q>>1]|0)>>>1)+((b[a+12>>1]|0)>>>1);m=c+16|0;l=h+16|0;b[n>>1]=((b[o>>1]|0)>>>1)+((b[a+14>>1]|0)>>>1);k=c+18|0;j=h+18|0;b[l>>1]=((b[m>>1]|0)>>>1)+((b[a+16>>1]|0)>>>1);b[j>>1]=((b[k>>1]|0)>>>1)+((b[a+18>>1]|0)>>>1);he(h,e,f);b[h>>1]=((b[d>>1]|0)>>>1)+((b[c>>1]|0)>>>1);b[z>>1]=((b[d+2>>1]|0)>>>1)+((b[A>>1]|0)>>>1);b[x>>1]=((b[d+4>>1]|0)>>>1)+((b[y>>1]|0)>>>1);b[v>>1]=((b[d+6>>1]|0)>>>1)+((b[w>>1]|0)>>>1);b[t>>1]=((b[d+8>>1]|0)>>>1)+((b[u>>1]|0)>>>1);b[r>>1]=((b[d+10>>1]|0)>>>1)+((b[s>>1]|0)>>>1);b[p>>1]=((b[d+12>>1]|0)>>>1)+((b[q>>1]|0)>>>1);b[n>>1]=((b[d+14>>1]|0)>>>1)+((b[o>>1]|0)>>>1);b[l>>1]=((b[d+16>>1]|0)>>>1)+((b[m>>1]|0)>>>1);b[j>>1]=((b[d+18>>1]|0)>>>1)+((b[k>>1]|0)>>>1);he(h,e+44|0,f);i=g;return;}function ae(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0;f=i;i=i+32|0;g=f;H=b[a>>1]|0;b[g>>1]=H-(H>>>2)+((b[c>>1]|0)>>>2);H=a+2|0;E=b[H>>1]|0;I=c+2|0;G=g+2|0;b[G>>1]=E-(E>>>2)+((b[I>>1]|0)>>>2);E=a+4|0;B=b[E>>1]|0;F=c+4|0;D=g+4|0;b[D>>1]=B-(B>>>2)+((b[F>>1]|0)>>>2);B=a+6|0;y=b[B>>1]|0;C=c+6|0;A=g+6|0;b[A>>1]=y-(y>>>2)+((b[C>>1]|0)>>>2);y=a+8|0;v=b[y>>1]|0;z=c+8|0;x=g+8|0;b[x>>1]=v-(v>>>2)+((b[z>>1]|0)>>>2);v=a+10|0;s=b[v>>1]|0;w=c+10|0;u=g+10|0;b[u>>1]=s-(s>>>2)+((b[w>>1]|0)>>>2);s=a+12|0;p=b[s>>1]|0;t=c+12|0;r=g+12|0;b[r>>1]=p-(p>>>2)+((b[t>>1]|0)>>>2);p=a+14|0;m=b[p>>1]|0;q=c+14|0;o=g+14|0;b[o>>1]=m-(m>>>2)+((b[q>>1]|0)>>>2);m=a+16|0;j=b[m>>1]|0;n=c+16|0;l=g+16|0;b[l>>1]=j-(j>>>2)+((b[n>>1]|0)>>>2);j=a+18|0;J=b[j>>1]|0;k=c+18|0;h=g+18|0;b[h>>1]=J-(J>>>2)+((b[k>>1]|0)>>>2);he(g,d,e);b[g>>1]=((b[a>>1]|0)>>>1)+((b[c>>1]|0)>>>1);b[G>>1]=((b[H>>1]|0)>>>1)+((b[I>>1]|0)>>>1);b[D>>1]=((b[E>>1]|0)>>>1)+((b[F>>1]|0)>>>1);b[A>>1]=((b[B>>1]|0)>>>1)+((b[C>>1]|0)>>>1);b[x>>1]=((b[y>>1]|0)>>>1)+((b[z>>1]|0)>>>1);b[u>>1]=((b[v>>1]|0)>>>1)+((b[w>>1]|0)>>>1);b[r>>1]=((b[s>>1]|0)>>>1)+((b[t>>1]|0)>>>1);b[o>>1]=((b[p>>1]|0)>>>1)+((b[q>>1]|0)>>>1);b[l>>1]=((b[m>>1]|0)>>>1)+((b[n>>1]|0)>>>1);b[h>>1]=((b[j>>1]|0)>>>1)+((b[k>>1]|0)>>>1);he(g,d+22|0,e);J=b[c>>1]|0;b[g>>1]=J-(J>>>2)+((b[a>>1]|0)>>>2);a=b[I>>1]|0;b[G>>1]=a-(a>>>2)+((b[H>>1]|0)>>>2);a=b[F>>1]|0;b[D>>1]=a-(a>>>2)+((b[E>>1]|0)>>>2);a=b[C>>1]|0;b[A>>1]=a-(a>>>2)+((b[B>>1]|0)>>>2);a=b[z>>1]|0;b[x>>1]=a-(a>>>2)+((b[y>>1]|0)>>>2);a=b[w>>1]|0;b[u>>1]=a-(a>>>2)+((b[v>>1]|0)>>>2);a=b[t>>1]|0;b[r>>1]=a-(a>>>2)+((b[s>>1]|0)>>>2);a=b[q>>1]|0;b[o>>1]=a-(a>>>2)+((b[p>>1]|0)>>>2);a=b[n>>1]|0;b[l>>1]=a-(a>>>2)+((b[m>>1]|0)>>>2);a=b[k>>1]|0;b[h>>1]=a-(a>>>2)+((b[j>>1]|0)>>>2);he(g,d+44|0,e);he(c,d+66|0,e);i=f;return;}function be(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0;f=i;i=i+32|0;g=f;H=b[a>>1]|0;b[g>>1]=H-(H>>>2)+((b[c>>1]|0)>>>2);H=a+2|0;E=b[H>>1]|0;I=c+2|0;G=g+2|0;b[G>>1]=E-(E>>>2)+((b[I>>1]|0)>>>2);E=a+4|0;B=b[E>>1]|0;F=c+4|0;D=g+4|0;b[D>>1]=B-(B>>>2)+((b[F>>1]|0)>>>2);B=a+6|0;y=b[B>>1]|0;C=c+6|0;A=g+6|0;b[A>>1]=y-(y>>>2)+((b[C>>1]|0)>>>2);y=a+8|0;v=b[y>>1]|0;z=c+8|0;x=g+8|0;b[x>>1]=v-(v>>>2)+((b[z>>1]|0)>>>2);v=a+10|0;s=b[v>>1]|0;w=c+10|0;u=g+10|0;b[u>>1]=s-(s>>>2)+((b[w>>1]|0)>>>2);s=a+12|0;p=b[s>>1]|0;t=c+12|0;r=g+12|0;b[r>>1]=p-(p>>>2)+((b[t>>1]|0)>>>2);p=a+14|0;m=b[p>>1]|0;q=c+14|0;o=g+14|0;b[o>>1]=m-(m>>>2)+((b[q>>1]|0)>>>2);m=a+16|0;j=b[m>>1]|0;n=c+16|0;l=g+16|0;b[l>>1]=j-(j>>>2)+((b[n>>1]|0)>>>2);j=a+18|0;J=b[j>>1]|0;k=c+18|0;h=g+18|0;b[h>>1]=J-(J>>>2)+((b[k>>1]|0)>>>2);he(g,d,e);b[g>>1]=((b[a>>1]|0)>>>1)+((b[c>>1]|0)>>>1);b[G>>1]=((b[H>>1]|0)>>>1)+((b[I>>1]|0)>>>1);b[D>>1]=((b[E>>1]|0)>>>1)+((b[F>>1]|0)>>>1);b[A>>1]=((b[B>>1]|0)>>>1)+((b[C>>1]|0)>>>1);b[x>>1]=((b[y>>1]|0)>>>1)+((b[z>>1]|0)>>>1);b[u>>1]=((b[v>>1]|0)>>>1)+((b[w>>1]|0)>>>1);b[r>>1]=((b[s>>1]|0)>>>1)+((b[t>>1]|0)>>>1);b[o>>1]=((b[p>>1]|0)>>>1)+((b[q>>1]|0)>>>1);b[l>>1]=((b[m>>1]|0)>>>1)+((b[n>>1]|0)>>>1);b[h>>1]=((b[j>>1]|0)>>>1)+((b[k>>1]|0)>>>1);he(g,d+22|0,e);c=b[c>>1]|0;b[g>>1]=c-(c>>>2)+((b[a>>1]|0)>>>2);a=b[I>>1]|0;b[G>>1]=a-(a>>>2)+((b[H>>1]|0)>>>2);a=b[F>>1]|0;b[D>>1]=a-(a>>>2)+((b[E>>1]|0)>>>2);a=b[C>>1]|0;b[A>>1]=a-(a>>>2)+((b[B>>1]|0)>>>2);a=b[z>>1]|0;b[x>>1]=a-(a>>>2)+((b[y>>1]|0)>>>2);a=b[w>>1]|0;b[u>>1]=a-(a>>>2)+((b[v>>1]|0)>>>2);a=b[t>>1]|0;b[r>>1]=a-(a>>>2)+((b[s>>1]|0)>>>2);a=b[q>>1]|0;b[o>>1]=a-(a>>>2)+((b[p>>1]|0)>>>2);a=b[n>>1]|0;b[l>>1]=a-(a>>>2)+((b[m>>1]|0)>>>2);a=b[k>>1]|0;b[h>>1]=a-(a>>>2)+((b[j>>1]|0)>>>2);he(g,d+44|0,e);i=f;return;}function ce(a,c){a=a|0;c=c|0;var d=0,f=0;if((a|0)<1){c=1073741823;return c|0;}d=(pe(a)|0)<<16>>16;c=30-d|0;a=a<>(c&1^1);d=(a>>25<<16)+-1048576>>16;f=b[7030+(d<<1)>>1]|0;c=(f<<16)-(Z(f-(e[7030+(d+1<<1)>>1]|0)<<16>>15,a>>>10&32767)|0)>>(c<<16>>17)+1;return c|0;}function de(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;d=pe(a)|0;ee(a<<(d<<16>>16),d,b,c);return;}function ee(a,c,d,f){a=a|0;c=c|0;d=d|0;f=f|0;if((a|0)<1){b[d>>1]=0;d=0;b[f>>1]=d;return;}else{b[d>>1]=30-(c&65535);d=(a>>25<<16)+-2097152>>16;c=b[7128+(d<<1)>>1]|0;d=((c<<16)-(Z(a>>>9&65534,c-(e[7128+(d+1<<1)>>1]|0)<<16>>16)|0)|0)>>>16&65535;b[f>>1]=d;return;}}function fe(a,c,d){a=a|0;c=c|0;d=d|0;var f=0,g=0;f=a+2|0;d=b[f>>1]|0;b[c>>1]=d;g=a+4|0;b[c+2>>1]=(e[g>>1]|0)-(e[a>>1]|0);b[c+4>>1]=(e[a+6>>1]|0)-(e[f>>1]|0);f=a+8|0;b[c+6>>1]=(e[f>>1]|0)-(e[g>>1]|0);b[c+8>>1]=(e[a+10>>1]|0)-(e[a+6>>1]|0);g=a+12|0;b[c+10>>1]=(e[g>>1]|0)-(e[f>>1]|0);b[c+12>>1]=(e[a+14>>1]|0)-(e[a+10>>1]|0);b[c+14>>1]=(e[a+16>>1]|0)-(e[g>>1]|0);b[c+16>>1]=(e[a+18>>1]|0)-(e[a+14>>1]|0);b[c+18>>1]=16384-(e[a+16>>1]|0);a=10;g=c;while(1){d=d<<16>>16;c=(d<<16)+-120782848|0;if((c|0)>0)c=1843-((c>>16)*12484>>16)|0;else c=3427-((d*56320|0)>>>16)|0;f=g+2|0;b[g>>1]=c<<3;a=a+-1<<16>>16;if(!(a<<16>>16))break;d=b[f>>1]|0;g=f;}return;}function ge(a,b,c){a=a|0;b=b|0;c=c|0;c=b<<16>>16;if(b<<16>>16>31){b=0;return b|0;}if(b<<16>>16>0)return((1<>16<31?a>>c:0)|0;c=0-c<<16>>16;b=a<>c|0)==(a|0)?b:a>>31^2147483647;return b|0;}function he(a,d,e){a=a|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;s=i;i=i+48|0;q=s+24|0;r=s;o=q+4|0;c[q>>2]=16777216;f=0-(b[a>>1]|0)|0;p=q+8|0;c[o>>2]=f<<10;g=b[a+4>>1]|0;l=f>>6;c[p>>2]=33554432-(((Z((f<<9)-(l<<15)<<16>>16,g)|0)>>15)+(Z(l,g)|0)<<2);l=q+4|0;g=(c[l>>2]|0)-(g<<10)|0;c[l>>2]=g;l=q+12|0;f=q+4|0;c[l>>2]=g;e=b[a+8>>1]|0;h=g;m=1;while(1){k=l+-4|0;j=c[k>>2]|0;n=j>>16;c[l>>2]=h+g-(((Z((j>>>1)-(n<<15)<<16>>16,e)|0)>>15)+(Z(n,e)|0)<<2);if((m|0)==2)break;h=c[l+-12>>2]|0;l=k;g=j;m=m+1|0;}c[f>>2]=(c[f>>2]|0)-(e<<10);e=q+16|0;f=c[q+8>>2]|0;c[e>>2]=f;k=b[a+12>>1]|0;g=f;l=1;while(1){j=e+-4|0;h=c[j>>2]|0;n=h>>16;c[e>>2]=g+f-(((Z((h>>>1)-(n<<15)<<16>>16,k)|0)>>15)+(Z(n,k)|0)<<2);if((l|0)==3)break;g=c[e+-12>>2]|0;e=j;f=h;l=l+1|0;}e=q+4|0;c[e>>2]=(c[e>>2]|0)-(k<<10);e=q+20|0;g=c[q+12>>2]|0;c[e>>2]=g;f=b[a+16>>1]|0;h=g;l=1;while(1){k=e+-4|0;j=c[k>>2]|0;n=j>>16;c[e>>2]=h+g-(((Z((j>>>1)-(n<<15)<<16>>16,f)|0)>>15)+(Z(n,f)|0)<<2);if((l|0)==4)break;h=c[e+-12>>2]|0;e=k;g=j;l=l+1|0;}l=q+4|0;c[l>>2]=(c[l>>2]|0)-(f<<10);c[r>>2]=16777216;l=0-(b[a+2>>1]|0)|0;n=r+8|0;c[r+4>>2]=l<<10;f=b[a+6>>1]|0;m=l>>6;c[n>>2]=33554432-(((Z((l<<9)-(m<<15)<<16>>16,f)|0)>>15)+(Z(m,f)|0)<<2);m=r+4|0;f=(c[m>>2]|0)-(f<<10)|0;c[m>>2]=f;m=r+12|0;l=r+4|0;c[m>>2]=f;k=b[a+10>>1]|0;g=f;e=1;while(1){j=m+-4|0;h=c[j>>2]|0;t=h>>16;c[m>>2]=g+f-(((Z((h>>>1)-(t<<15)<<16>>16,k)|0)>>15)+(Z(t,k)|0)<<2);if((e|0)==2)break;g=c[m+-12>>2]|0;m=j;f=h;e=e+1|0;}c[l>>2]=(c[l>>2]|0)-(k<<10);l=r+16|0;f=c[r+8>>2]|0;c[l>>2]=f;k=b[a+14>>1]|0;g=f;e=1;while(1){j=l+-4|0;h=c[j>>2]|0;t=h>>16;c[l>>2]=g+f-(((Z((h>>>1)-(t<<15)<<16>>16,k)|0)>>15)+(Z(t,k)|0)<<2);if((e|0)==3)break;g=c[l+-12>>2]|0;l=j;f=h;e=e+1|0;}e=r+4|0;c[e>>2]=(c[e>>2]|0)-(k<<10);e=r+20|0;k=c[r+12>>2]|0;c[e>>2]=k;f=b[a+18>>1]|0;j=k;l=1;while(1){g=e+-4|0;h=c[g>>2]|0;t=h>>16;c[e>>2]=j+k-(((Z((h>>>1)-(t<<15)<<16>>16,f)|0)>>15)+(Z(t,f)|0)<<2);if((l|0)==4)break;j=c[e+-12>>2]|0;e=g;k=h;l=l+1|0;}j=(c[r+4>>2]|0)-(f<<10)|0;m=q+20|0;k=r+20|0;l=c[q+16>>2]|0;a=(c[m>>2]|0)+l|0;c[m>>2]=a;m=c[r+16>>2]|0;t=(c[k>>2]|0)-m|0;c[k>>2]=t;k=c[q+12>>2]|0;l=l+k|0;c[q+16>>2]=l;h=c[r+12>>2]|0;m=m-h|0;c[r+16>>2]=m;f=c[p>>2]|0;k=k+f|0;c[q+12>>2]=k;g=c[n>>2]|0;p=h-g|0;c[r+12>>2]=p;h=c[o>>2]|0;n=f+h|0;c[q+8>>2]=n;o=g-j|0;c[r+8>>2]=o;q=h+(c[q>>2]|0)|0;r=j-(c[r>>2]|0)|0;b[d>>1]=4096;q=q+4096|0;b[d+2>>1]=(q+r|0)>>>13;b[d+20>>1]=(q-r|0)>>>13;r=n+4096|0;b[d+4>>1]=(r+o|0)>>>13;b[d+18>>1]=(r-o|0)>>>13;r=k+4096|0;b[d+6>>1]=(r+p|0)>>>13;b[d+16>>1]=(r-p|0)>>>13;r=l+4096|0;b[d+8>>1]=(r+m|0)>>>13;b[d+14>>1]=(r-m|0)>>>13;r=a+4096|0;b[d+10>>1]=(r+t|0)>>>13;b[d+12>>1]=(r-t|0)>>>13;i=s;return;}function ie(a){a=a|0;var d=0,e=0,f=0,g=0,h=0;if(!a){h=-1;return h|0;}c[a>>2]=0;d=Je(44)|0;if(!d){h=-1;return h|0;}e=d+40|0;if((xe(e)|0)<<16>>16){h=-1;return h|0;}f=d;g=7452;h=f+20|0;do{b[f>>1]=b[g>>1]|0;f=f+2|0;g=g+2|0;}while((f|0)<(h|0));f=d+20|0;g=7452;h=f+20|0;do{b[f>>1]=b[g>>1]|0;f=f+2|0;g=g+2|0;}while((f|0)<(h|0));ye(c[e>>2]|0)|0;c[a>>2]=d;h=0;return h|0;}function je(a){a=a|0;var d=0,e=0,f=0;if(!a){f=-1;return f|0;}d=a;e=7452;f=d+20|0;do{b[d>>1]=b[e>>1]|0;d=d+2|0;e=e+2|0;}while((d|0)<(f|0));d=a+20|0;e=7452;f=d+20|0;do{b[d>>1]=b[e>>1]|0;d=d+2|0;e=e+2|0;}while((d|0)<(f|0));ye(c[a+40>>2]|0)|0;f=0;return f|0;}function ke(a){a=a|0;var b=0;if(!a)return;b=c[a>>2]|0;if(!b)return;ze(b+40|0);Ke(c[a>>2]|0);c[a>>2]=0;return;}function le(a,d,e,f,g,h,j,k){a=a|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;var l=0,m=0,n=0,o=0,p=0;p=i;i=i+64|0;o=p+44|0;l=p+24|0;m=p+4|0;n=p;if((d|0)==7){Sd(f+22|0,l,a,k);Sd(f+66|0,h,l,k);$d(a,l,h,f,k);if((e|0)==8)f=6;else{ve(c[a+40>>2]|0,l,h,m,o,c[j>>2]|0,k);_d(a+20|0,m,o,g,k);g=(c[j>>2]|0)+10|0;f=7;}}else{Sd(f+66|0,h,a,k);be(a,h,f,k);if((e|0)==8)f=6;else{te(c[a+40>>2]|0,d,h,o,c[j>>2]|0,n,k);ae(a+20|0,o,g,k);g=(c[j>>2]|0)+6|0;f=7;}}if((f|0)==6){f=a;g=f+20|0;do{b[f>>1]=b[h>>1]|0;f=f+2|0;h=h+2|0;}while((f|0)<(g|0));i=p;return;}else if((f|0)==7){c[j>>2]=g;f=a;g=f+20|0;do{b[f>>1]=b[h>>1]|0;f=f+2|0;h=h+2|0;}while((f|0)<(g|0));f=a+20|0;h=o;g=f+20|0;do{b[f>>1]=b[h>>1]|0;f=f+2|0;h=h+2|0;}while((f|0)<(g|0));i=p;return;}}function me(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0;if(d<<16>>16>0)e=0;else return;do{g=b[a+(e<<1)>>1]|0;h=g>>8;f=b[7194+(h<<1)>>1]|0;b[c+(e<<1)>>1]=((Z((b[7194+(h+1<<1)>>1]|0)-f|0,g&255)|0)>>>8)+f;e=e+1|0;}while((e&65535)<<16>>16!=d<<16>>16);return;}function ne(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0;e=(d<<16>>16)+-1|0;d=e&65535;if(d<<16>>16<=-1)return;f=63;h=c+(e<<1)|0;g=a+(e<<1)|0;while(1){a=b[g>>1]|0;c=f;while(1){e=c<<16>>16;f=b[7194+(e<<1)>>1]|0;if(a<<16>>16>f<<16>>16)c=c+-1<<16>>16;else break;}b[h>>1]=(((Z(b[7324+(e<<1)>>1]|0,(a<<16>>16)-(f<<16>>16)|0)|0)+2048|0)>>>12)+(e<<8);d=d+-1<<16>>16;if(d<<16>>16>-1){f=c;h=h+-2|0;g=g+-2|0;}else break;}return;}function oe(a,b,d){a=a|0;b=b|0;d=d|0;a=(Z(b<<16>>16,a<<16>>16)|0)+16384>>15;a=a|0-(a&65536);if((a|0)<=32767){if((a|0)<-32768){c[d>>2]=1;a=-32768;}}else{c[d>>2]=1;a=32767;}return a&65535|0;}function pe(a){a=a|0;var b=0;a:do if((a|0)!=0?(b=a-(a>>>31)|0,b=b>>31^b,(b&1073741824|0)==0):0){a=b;b=0;while(1){if(a&536870912){a=7;break;}if(a&268435456){a=8;break;}if(a&134217728){a=9;break;}b=b+4<<16>>16;a=a<<4;if(a&1073741824)break a;}if((a|0)==7){b=b|1;break;}else if((a|0)==8){b=b|2;break;}else if((a|0)==9){b=b|3;break;}}else b=0;while(0);return b|0;}function qe(a){a=a|0;var b=0,c=0;if(!(a<<16>>16)){c=0;return c|0;}b=(a&65535)-((a&65535)>>>15&65535)|0;b=(b<<16>>31^b)<<16;a=b>>16;if(!(a&16384)){c=b;b=0;}else{c=0;return c|0;}while(1){if(a&8192){a=b;c=7;break;}if(a&4096){a=b;c=8;break;}if(a&2048){a=b;c=9;break;}b=b+4<<16>>16;c=c<<4;a=c>>16;if(a&16384){a=b;c=10;break;}}if((c|0)==7){c=a|1;return c|0;}else if((c|0)==8){c=a|2;return c|0;}else if((c|0)==9){c=a|3;return c|0;}else if((c|0)==10)return a|0;return 0;}function re(a,d,f){a=a|0;d=d|0;f=f|0;var g=0,h=0,i=0;d=d<<16>>16;if((d&134217727|0)==33554432){c[f>>2]=1;d=2147483647;}else d=d<<6;g=d>>>16&31;i=b[7792+(g<<1)>>1]|0;h=i<<16;d=Z(i-(e[7792+(g+1<<1)>>1]|0)<<16>>16,d>>>1&32767)|0;if((d|0)==1073741824){c[f>>2]=1;g=2147483647;}else g=d<<1;d=h-g|0;if(((d^h)&(g^h)|0)>=0){i=d;a=a&65535;a=30-a|0;a=a&65535;f=ge(i,a,f)|0;return f|0;}c[f>>2]=1;i=(i>>>15&1)+2147483647|0;a=a&65535;a=30-a|0;a=a&65535;f=ge(i,a,f)|0;return f|0;}function se(a,c,d,e,f,g){a=a|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;o=i;i=i+48|0;n=o;m=0-(d&65535)|0;m=f<<16>>16==0?m:m<<1&131070;d=m&65535;m=(d<<16>>16<0?m+6|0:m)<<16>>16;g=6-m|0;b[n>>1]=b[7858+(m<<1)>>1]|0;b[n+2>>1]=b[7858+(g<<1)>>1]|0;b[n+4>>1]=b[7858+(m+6<<1)>>1]|0;b[n+6>>1]=b[7858+(g+6<<1)>>1]|0;b[n+8>>1]=b[7858+(m+12<<1)>>1]|0;b[n+10>>1]=b[7858+(g+12<<1)>>1]|0;b[n+12>>1]=b[7858+(m+18<<1)>>1]|0;b[n+14>>1]=b[7858+(g+18<<1)>>1]|0;b[n+16>>1]=b[7858+(m+24<<1)>>1]|0;b[n+18>>1]=b[7858+(g+24<<1)>>1]|0;b[n+20>>1]=b[7858+(m+30<<1)>>1]|0;b[n+22>>1]=b[7858+(g+30<<1)>>1]|0;b[n+24>>1]=b[7858+(m+36<<1)>>1]|0;b[n+26>>1]=b[7858+(g+36<<1)>>1]|0;b[n+28>>1]=b[7858+(m+42<<1)>>1]|0;b[n+30>>1]=b[7858+(g+42<<1)>>1]|0;b[n+32>>1]=b[7858+(m+48<<1)>>1]|0;b[n+34>>1]=b[7858+(g+48<<1)>>1]|0;b[n+36>>1]=b[7858+(m+54<<1)>>1]|0;b[n+38>>1]=b[7858+(g+54<<1)>>1]|0;g=e<<16>>16>>>1&65535;if(!(g<<16>>16)){i=o;return;}m=a+((d<<16>>16>>15<<16>>16)-(c<<16>>16)<<1)|0;while(1){l=m+2|0;h=b[l>>1]|0;c=h;e=m;j=5;k=n;f=16384;d=16384;while(1){q=b[k>>1]|0;r=(Z(q,c<<16>>16)|0)+d|0;p=b[l+-2>>1]|0;d=(Z(p,q)|0)+f|0;q=e;e=e+4|0;s=b[k+2>>1]|0;d=d+(Z(s,h<<16>>16)|0)|0;f=b[e>>1]|0;s=r+(Z(f,s)|0)|0;l=l+-4|0;r=b[k+4>>1]|0;p=s+(Z(r,p)|0)|0;c=b[l>>1]|0;r=d+(Z(c<<16>>16,r)|0)|0;d=b[k+6>>1]|0;f=r+(Z(d,f)|0)|0;h=b[q+6>>1]|0;d=p+(Z(h<<16>>16,d)|0)|0;if(j<<16>>16<=1)break;else{j=j+-1<<16>>16;k=k+8|0;}}b[a>>1]=f>>>15;b[a+2>>1]=d>>>15;g=g+-1<<16>>16;if(!(g<<16>>16))break;else{m=m+4|0;a=a+4|0;}}i=o;return;}function te(a,c,d,f,g,h,j){a=a|0;c=c|0;d=d|0;f=f|0;g=g|0;h=h|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0;C=i;i=i+144|0;t=C+120|0;y=C+100|0;A=C+80|0;B=C+60|0;z=C+40|0;q=C+20|0;r=C;ne(d,t,10,j);fe(t,y,j);if((c|0)==8){b[h>>1]=0;l=2147483647;s=0;while(1){n=s*10|0;d=0;m=0;do{x=(e[7980+(m+n<<1)>>1]|0)+(e[8140+(m<<1)>>1]|0)|0;b[r+(m<<1)>>1]=x;x=(e[t+(m<<1)>>1]|0)-(x&65535)|0;b[q+(m<<1)>>1]=x;x=x<<16;d=(Z(x>>15,x>>16)|0)+d|0;m=m+1|0;}while((m|0)!=10);if((d|0)<(l|0)){u=B;p=q;o=u+20|0;do{b[u>>1]=b[p>>1]|0;u=u+2|0;p=p+2|0;}while((u|0)<(o|0));u=A;p=r;o=u+20|0;do{b[u>>1]=b[p>>1]|0;u=u+2|0;p=p+2|0;}while((u|0)<(o|0));u=a;p=7980+(n<<1)|0;o=u+20|0;do{b[u>>1]=b[p>>1]|0;u=u+2|0;p=p+2|0;}while((u|0)<(o|0));b[h>>1]=s;}else d=l;s=s+1|0;if((s|0)==8)break;else l=d;}}else{d=0;do{x=Z(b[8160+(d<<1)>>1]|0,b[a+(d<<1)>>1]|0)|0;x=(x>>>15)+(e[8140+(d<<1)>>1]|0)|0;b[A+(d<<1)>>1]=x;b[B+(d<<1)>>1]=(e[t+(d<<1)>>1]|0)-x;d=d+1|0;}while((d|0)!=10);}do if(c>>>0>=2){x=B+2|0;w=B+4|0;v=e[B>>1]|0;u=b[y>>1]<<1;t=e[x>>1]|0;q=b[y+2>>1]<<1;p=e[w>>1]|0;o=b[y+4>>1]<<1;if((c|0)==5){r=2147483647;h=0;d=0;s=17908;while(1){m=(Z(v-(e[s>>1]|0)<<16>>16,u)|0)>>16;m=Z(m,m)|0;n=(Z(t-(e[s+2>>1]|0)<<16>>16,q)|0)>>16;m=(Z(n,n)|0)+m|0;n=(Z(p-(e[s+4>>1]|0)<<16>>16,o)|0)>>16;n=m+(Z(n,n)|0)|0;m=(n|0)<(r|0);d=m?h:d;h=h+1<<16>>16;if(h<<16>>16>=512)break;else{r=m?n:r;s=s+6|0;}}n=(d<<16>>16)*3|0;b[B>>1]=b[17908+(n<<1)>>1]|0;b[x>>1]=b[17908+(n+1<<1)>>1]|0;b[w>>1]=b[17908+(n+2<<1)>>1]|0;b[g>>1]=d;n=B+6|0;m=B+8|0;v=B+10|0;s=e[n>>1]|0;h=b[y+6>>1]<<1;r=e[m>>1]|0;q=b[y+8>>1]<<1;p=e[v>>1]|0;o=b[y+10>>1]<<1;k=2147483647;t=0;d=0;u=9716;while(1){l=(Z(h,s-(e[u>>1]|0)<<16>>16)|0)>>16;l=Z(l,l)|0;c=(Z(q,r-(e[u+2>>1]|0)<<16>>16)|0)>>16;l=(Z(c,c)|0)+l|0;c=(Z(o,p-(e[u+4>>1]|0)<<16>>16)|0)>>16;c=l+(Z(c,c)|0)|0;l=(c|0)<(k|0);d=l?t:d;t=t+1<<16>>16;if(t<<16>>16>=512)break;else{k=l?c:k;u=u+6|0;}}k=(d<<16>>16)*3|0;b[n>>1]=b[9716+(k<<1)>>1]|0;b[m>>1]=b[9716+(k+1<<1)>>1]|0;b[v>>1]=b[9716+(k+2<<1)>>1]|0;b[g+2>>1]=d;k=B+12|0;b[g+4>>1]=ue(k,12788,y+12|0,512)|0;t=x;s=w;d=v;l=B;break;}else{r=2147483647;h=0;d=0;s=8180;while(1){m=(Z(v-(e[s>>1]|0)<<16>>16,u)|0)>>16;m=Z(m,m)|0;n=(Z(t-(e[s+2>>1]|0)<<16>>16,q)|0)>>16;m=(Z(n,n)|0)+m|0;n=(Z(p-(e[s+4>>1]|0)<<16>>16,o)|0)>>16;n=m+(Z(n,n)|0)|0;m=(n|0)<(r|0);d=m?h:d;h=h+1<<16>>16;if(h<<16>>16>=256)break;else{r=m?n:r;s=s+6|0;}}n=(d<<16>>16)*3|0;b[B>>1]=b[8180+(n<<1)>>1]|0;b[x>>1]=b[8180+(n+1<<1)>>1]|0;b[w>>1]=b[8180+(n+2<<1)>>1]|0;b[g>>1]=d;n=B+6|0;m=B+8|0;v=B+10|0;s=e[n>>1]|0;h=b[y+6>>1]<<1;r=e[m>>1]|0;q=b[y+8>>1]<<1;p=e[v>>1]|0;o=b[y+10>>1]<<1;k=2147483647;t=0;d=0;u=9716;while(1){l=(Z(h,s-(e[u>>1]|0)<<16>>16)|0)>>16;l=Z(l,l)|0;c=(Z(q,r-(e[u+2>>1]|0)<<16>>16)|0)>>16;l=(Z(c,c)|0)+l|0;c=(Z(o,p-(e[u+4>>1]|0)<<16>>16)|0)>>16;c=l+(Z(c,c)|0)|0;l=(c|0)<(k|0);d=l?t:d;t=t+1<<16>>16;if(t<<16>>16>=512)break;else{k=l?c:k;u=u+6|0;}}k=(d<<16>>16)*3|0;b[n>>1]=b[9716+(k<<1)>>1]|0;b[m>>1]=b[9716+(k+1<<1)>>1]|0;b[v>>1]=b[9716+(k+2<<1)>>1]|0;b[g+2>>1]=d;k=B+12|0;b[g+4>>1]=ue(k,12788,y+12|0,512)|0;t=x;s=w;d=v;l=B;break;}}else{w=B+2|0;x=B+4|0;n=e[B>>1]|0;m=b[y>>1]<<1;l=e[w>>1]|0;k=b[y+2>>1]<<1;c=e[x>>1]|0;o=b[y+4>>1]<<1;r=2147483647;h=0;d=0;s=8180;while(1){q=(Z(m,n-(e[s>>1]|0)<<16>>16)|0)>>16;q=Z(q,q)|0;p=(Z(k,l-(e[s+2>>1]|0)<<16>>16)|0)>>16;q=(Z(p,p)|0)+q|0;p=(Z(o,c-(e[s+4>>1]|0)<<16>>16)|0)>>16;p=q+(Z(p,p)|0)|0;q=(p|0)<(r|0);d=q?h:d;h=h+1<<16>>16;if(h<<16>>16>=256)break;else{r=q?p:r;s=s+6|0;}}n=(d<<16>>16)*3|0;b[B>>1]=b[8180+(n<<1)>>1]|0;b[w>>1]=b[8180+(n+1<<1)>>1]|0;b[x>>1]=b[8180+(n+2<<1)>>1]|0;b[g>>1]=d;n=B+6|0;m=B+8|0;v=B+10|0;s=e[n>>1]|0;h=b[y+6>>1]<<1;r=e[m>>1]|0;q=b[y+8>>1]<<1;p=e[v>>1]|0;o=b[y+10>>1]<<1;k=2147483647;t=0;d=0;u=9716;while(1){l=(Z(h,s-(e[u>>1]|0)<<16>>16)|0)>>16;l=Z(l,l)|0;c=(Z(q,r-(e[u+2>>1]|0)<<16>>16)|0)>>16;l=(Z(c,c)|0)+l|0;c=(Z(o,p-(e[u+4>>1]|0)<<16>>16)|0)>>16;c=l+(Z(c,c)|0)|0;l=(c|0)<(k|0);d=l?t:d;t=t+1<<16>>16;if(t<<16>>16>=256)break;else{k=l?c:k;u=u+12|0;}}k=(d<<16>>16)*6|0;b[n>>1]=b[9716+(k<<1)>>1]|0;b[m>>1]=b[9716+((k|1)<<1)>>1]|0;b[v>>1]=b[9716+(k+2<<1)>>1]|0;b[g+2>>1]=d;k=B+12|0;b[g+4>>1]=ue(k,16884,y+12|0,128)|0;t=w;s=x;d=v;l=B;}while(0);u=a;p=B;o=u+20|0;do{b[u>>1]=b[p>>1]|0;u=u+2|0;p=p+2|0;}while((u|0)<(o|0));b[z>>1]=(e[A>>1]|0)+(e[l>>1]|0);b[z+2>>1]=(e[A+2>>1]|0)+(e[t>>1]|0);b[z+4>>1]=(e[A+4>>1]|0)+(e[s>>1]|0);b[z+6>>1]=(e[A+6>>1]|0)+(e[n>>1]|0);b[z+8>>1]=(e[A+8>>1]|0)+(e[m>>1]|0);b[z+10>>1]=(e[A+10>>1]|0)+(e[d>>1]|0);b[z+12>>1]=(e[A+12>>1]|0)+(e[k>>1]|0);b[z+14>>1]=(e[A+14>>1]|0)+(e[B+14>>1]|0);b[z+16>>1]=(e[A+16>>1]|0)+(e[B+16>>1]|0);b[z+18>>1]=(e[A+18>>1]|0)+(e[B+18>>1]|0);Ae(z,205,10,j);me(z,f,10,j);i=C;return;}function ue(a,c,d,f){a=a|0;c=c|0;d=d|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;t=a+2|0;u=a+4|0;v=a+6|0;if(f<<16>>16>0){m=e[a>>1]|0;n=b[d>>1]<<1;o=e[t>>1]|0;p=b[d+2>>1]<<1;q=e[u>>1]|0;r=b[d+4>>1]<<1;s=e[v>>1]|0;g=b[d+6>>1]<<1;j=2147483647;k=0;d=0;l=c;while(1){h=(Z(n,m-(e[l>>1]|0)<<16>>16)|0)>>16;h=Z(h,h)|0;i=(Z(p,o-(e[l+2>>1]|0)<<16>>16)|0)>>16;h=(Z(i,i)|0)+h|0;i=(Z(r,q-(e[l+4>>1]|0)<<16>>16)|0)>>16;i=h+(Z(i,i)|0)|0;h=(Z(g,s-(e[l+6>>1]|0)<<16>>16)|0)>>16;h=i+(Z(h,h)|0)|0;i=(h|0)<(j|0);d=i?k:d;k=k+1<<16>>16;if(k<<16>>16>=f<<16>>16)break;else{j=i?h:j;l=l+8|0;}}}else d=0;f=d<<16>>16<<2;s=f|1;b[a>>1]=b[c+(f<<1)>>1]|0;b[t>>1]=b[c+(s<<1)>>1]|0;b[u>>1]=b[c+(s+1<<1)>>1]|0;b[v>>1]=b[c+((f|3)<<1)>>1]|0;return d|0;}function ve(a,c,d,f,g,h,j){a=a|0;c=c|0;d=d|0;f=f|0;g=g|0;h=h|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0;I=i;i=i+192|0;m=I+160|0;l=I+140|0;C=I+120|0;D=I+100|0;E=I+80|0;F=I+60|0;k=I+40|0;G=I+20|0;H=I;ne(c,m,10,j);ne(d,l,10,j);fe(m,C,j);fe(l,D,j);n=0;d=E;c=F;o=k;while(1){B=(((b[a+(n<<1)>>1]|0)*21299|0)>>>15)+(e[20980+(n<<1)>>1]|0)|0;b[d>>1]=B;b[c>>1]=(e[m>>1]|0)-B;b[o>>1]=(e[l>>1]|0)-B;n=n+1|0;if((n|0)==10)break;else{m=m+2|0;l=l+2|0;d=d+2|0;c=c+2|0;o=o+2|0;}}b[h>>1]=we(F,k,21e3,b[C>>1]|0,b[C+2>>1]|0,b[D>>1]|0,b[D+2>>1]|0,128)|0;b[h+2>>1]=we(F+4|0,k+4|0,22024,b[C+4>>1]|0,b[C+6>>1]|0,b[D+4>>1]|0,b[D+6>>1]|0,256)|0;y=F+8|0;z=k+8|0;A=F+10|0;B=k+10|0;d=b[y>>1]|0;p=b[C+8>>1]<<1;q=b[A>>1]|0;r=b[C+10>>1]<<1;s=b[z>>1]|0;t=b[D+8>>1]<<1;u=b[B>>1]|0;v=b[D+10>>1]<<1;l=2147483647;w=0;o=0;x=24072;c=0;while(1){m=b[x>>1]|0;n=(Z(d-m<<16>>16,p)|0)>>16;n=Z(n,n)|0;m=(Z(m+d<<16>>16,p)|0)>>16;m=Z(m,m)|0;J=b[x+2>>1]|0;K=(Z(q-J<<16>>16,r)|0)>>16;n=(Z(K,K)|0)+n|0;J=(Z(J+q<<16>>16,r)|0)>>16;m=(Z(J,J)|0)+m|0;if((n|0)<(l|0)|(m|0)<(l|0)){K=b[x+4>>1]|0;J=(Z(s-K<<16>>16,t)|0)>>16;J=(Z(J,J)|0)+n|0;K=(Z(K+s<<16>>16,t)|0)>>16;K=(Z(K,K)|0)+m|0;m=b[x+6>>1]|0;n=(Z(u-m<<16>>16,v)|0)>>16;n=J+(Z(n,n)|0)|0;m=(Z(m+u<<16>>16,v)|0)>>16;m=K+(Z(m,m)|0)|0;K=(n|0)<(l|0);n=K?n:l;J=(m|0)<(n|0);n=J?m:n;o=K|J?w:o;c=J?1:K?0:c;}else n=l;w=w+1<<16>>16;if(w<<16>>16>=256)break;else{l=n;x=x+8|0;}}n=o<<16>>16;m=n<<2;o=m|1;l=24072+(o<<1)|0;d=b[24072+(m<<1)>>1]|0;if(!(c<<16>>16)){b[y>>1]=d;b[A>>1]=b[l>>1]|0;b[z>>1]=b[24072+(o+1<<1)>>1]|0;b[B>>1]=b[24072+((m|3)<<1)>>1]|0;c=n<<1;}else{b[y>>1]=0-(d&65535);b[A>>1]=0-(e[l>>1]|0);b[z>>1]=0-(e[24072+(o+1<<1)>>1]|0);b[B>>1]=0-(e[24072+((m|3)<<1)>>1]|0);c=n<<1&65534|1;}b[h+4>>1]=c;b[h+6>>1]=we(F+12|0,k+12|0,26120,b[C+12>>1]|0,b[C+14>>1]|0,b[D+12>>1]|0,b[D+14>>1]|0,256)|0;b[h+8>>1]=we(F+16|0,k+16|0,28168,b[C+16>>1]|0,b[C+18>>1]|0,b[D+16>>1]|0,b[D+18>>1]|0,64)|0;l=0;m=G;n=H;d=E;c=F;while(1){J=e[d>>1]|0;b[m>>1]=J+(e[c>>1]|0);K=b[k>>1]|0;b[n>>1]=J+(K&65535);b[a+(l<<1)>>1]=K;l=l+1|0;if((l|0)==10)break;else{m=m+2|0;n=n+2|0;d=d+2|0;c=c+2|0;k=k+2|0;}}Ae(G,205,10,j);Ae(H,205,10,j);me(G,f,10,j);me(H,g,10,j);i=I;return;}function we(a,c,d,e,f,g,h,i){a=a|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;o=b[a>>1]|0;u=a+2|0;q=b[u>>1]|0;s=b[c>>1]|0;v=c+2|0;t=b[v>>1]|0;if(i<<16>>16>0){n=e<<16>>16<<1;m=f<<16>>16<<1;l=g<<16>>16<<1;f=h<<16>>16<<1;g=2147483647;j=0;e=0;k=d;while(1){h=(Z(n,o-(b[k>>1]|0)|0)|0)>>16;h=Z(h,h)|0;if(((h|0)<(g|0)?(p=(Z(m,q-(b[k+2>>1]|0)|0)|0)>>16,p=(Z(p,p)|0)+h|0,(p|0)<(g|0)):0)?(r=(Z(l,s-(b[k+4>>1]|0)|0)|0)>>16,r=(Z(r,r)|0)+p|0,(r|0)<(g|0)):0){h=(Z(f,t-(b[k+6>>1]|0)|0)|0)>>16;h=(Z(h,h)|0)+r|0;w=(h|0)<(g|0);h=w?h:g;e=w?j:e;}else h=g;j=j+1<<16>>16;if(j<<16>>16>=i<<16>>16)break;else{g=h;k=k+8|0;}}}else e=0;w=e<<16>>16<<2;i=w|1;b[a>>1]=b[d+(w<<1)>>1]|0;b[u>>1]=b[d+(i<<1)>>1]|0;b[c>>1]=b[d+(i+1<<1)>>1]|0;b[v>>1]=b[d+((w|3)<<1)>>1]|0;return e|0;}function xe(a){a=a|0;var d=0,e=0,f=0;if(!a){f=-1;return f|0;}c[a>>2]=0;d=Je(20)|0;if(!d){f=-1;return f|0;}e=d;f=e+20|0;do{b[e>>1]=0;e=e+2|0;}while((e|0)<(f|0));c[a>>2]=d;f=0;return f|0;}function ye(a){a=a|0;var c=0;if(!a){c=-1;return c|0;}c=a+20|0;do{b[a>>1]=0;a=a+2|0;}while((a|0)<(c|0));c=0;return c|0;}function ze(a){a=a|0;var b=0;if(!a)return;b=c[a>>2]|0;if(!b)return;Ke(b);c[a>>2]=0;return;}function Ae(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0;if(d<<16>>16<=0)return;f=c<<16>>16;g=c&65535;h=0;while(1){e=b[a>>1]|0;if(e<<16>>16>16){b[a>>1]=c;e=(c<<16>>16)+f|0;}else e=(e&65535)+g|0;h=h+1<<16>>16;if(h<<16>>16>=d<<16>>16)break;else{c=e&65535;a=a+2|0;}}return;}function Be(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;f=e<<16>>16;e=f>>>2&65535;if(!(e<<16>>16))return;n=f+-1|0;t=a+20|0;p=c+(f+-4<<1)|0;q=c+(f+-3<<1)|0;r=c+(f+-2<<1)|0;s=c+(n<<1)|0;o=c+(f+-11<<1)|0;n=d+(n<<1)|0;while(1){c=b[t>>1]|0;h=5;i=t;j=o;k=o+-2|0;l=o+-4|0;m=o+-6|0;g=2048;a=2048;f=2048;d=2048;while(1){g=(Z(b[j>>1]|0,c)|0)+g|0;a=(Z(b[k>>1]|0,c)|0)+a|0;f=(Z(b[l>>1]|0,c)|0)+f|0;c=(Z(b[m>>1]|0,c)|0)+d|0;d=b[i+-2>>1]|0;g=g+(Z(b[j+2>>1]|0,d)|0)|0;a=a+(Z(b[k+2>>1]|0,d)|0)|0;f=f+(Z(b[l+2>>1]|0,d)|0)|0;i=i+-4|0;d=c+(Z(b[m+2>>1]|0,d)|0)|0;h=h+-1<<16>>16;c=b[i>>1]|0;if(!(h<<16>>16))break;else{j=j+4|0;k=k+4|0;l=l+4|0;m=m+4|0;}}j=(Z(b[s>>1]|0,c)|0)+g|0;k=(Z(b[r>>1]|0,c)|0)+a|0;l=(Z(b[q>>1]|0,c)|0)+f|0;m=(Z(b[p>>1]|0,c)|0)+d|0;b[n>>1]=j>>>12;b[n+-2>>1]=k>>>12;b[n+-4>>1]=l>>>12;b[n+-6>>1]=m>>>12;e=e+-1<<16>>16;if(!(e<<16>>16))break;else{p=p+-8|0;q=q+-8|0;r=r+-8|0;s=s+-8|0;o=o+-8|0;n=n+-8|0;}}return;}function Ce(a,b){a=a|0;b=b|0;var d=0;d=a+32768|0;if((a|0)>-1&(d^a|0)<0){c[b>>2]=1;d=(a>>>31)+2147483647|0;}return d>>>16&65535|0;}function De(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;e=b<<16>>16;if(!(b<<16>>16))return a|0;if(b<<16>>16>0){a=a<<16>>16>>(b<<16>>16>15?15:e)&65535;return a|0;}f=0-e|0;b=a<<16>>16;f=(f&65535)<<16>>16>15?15:f<<16>>16;e=b<>16>>f|0)==(b|0)){f=e&65535;return f|0;}c[d>>2]=1;f=a<<16>>16>0?32767:-32768;return f|0;}function Ee(a,b,c){a=a|0;b=b|0;c=c|0;if(b<<16>>16>15){b=0;return b|0;}c=De(a,b,c)|0;if(b<<16>>16>0)return c+((1<<(b<<16>>16)+-1&a<<16>>16|0)!=0&1)<<16>>16|0;else{b=c;return b|0;}return 0;}function Fe(a,d,f){a=a|0;d=d|0;f=f|0;var g=0,h=0,i=0;if((a|0)<1){b[d>>1]=0;f=0;return f|0;}h=(pe(a)|0)&65534;i=h&65535;h=h<<16>>16;if(i<<16>>16>0){g=a<>h|0)!=(a|0))g=a>>31^2147483647;}else{h=0-h<<16;if((h|0)<2031616)g=a>>(h>>16);else g=0;}b[d>>1]=i;d=g>>>25&63;d=d>>>0>15?d+-16|0:d;i=b[30216+(d<<1)>>1]|0;a=i<<16;g=Z(i-(e[30216+(d+1<<1)>>1]|0)<<16>>16,g>>>10&32767)|0;if((g|0)==1073741824){c[f>>2]=1;h=2147483647;}else h=g<<1;g=a-h|0;if(((g^a)&(h^a)|0)>=0){f=g;return f|0;}c[f>>2]=1;f=(i>>>15&1)+2147483647|0;return f|0;}function Ge(a,b,d){a=a|0;b=b|0;d=d|0;a=(a<<16>>16)-(b<<16>>16)|0;if((a+32768|0)>>>0<=65535){d=a;d=d&65535;return d|0;}c[d>>2]=1;d=(a|0)>32767?32767:-32768;d=d&65535;return d|0;}function He(a,c,d,e,f,g){a=a|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;A=i;i=i+48|0;o=A;k=o;h=f;j=k+20|0;do{b[k>>1]=b[h>>1]|0;k=k+2|0;h=h+2|0;}while((k|0)<(j|0));n=o+18|0;s=a+2|0;t=a+4|0;p=c+20|0;u=a+6|0;v=a+8|0;w=a+10|0;x=a+12|0;y=a+14|0;z=a+16|0;q=a+18|0;r=a+20|0;j=b[n>>1]|0;h=5;l=c;m=d;k=o+20|0;while(1){D=b[a>>1]|0;C=(Z(D,b[l>>1]|0)|0)+2048|0;D=(Z(b[l+2>>1]|0,D)|0)+2048|0;o=j<<16>>16;C=C-(Z(o,b[s>>1]|0)|0)|0;B=b[t>>1]|0;o=D-(Z(o,B)|0)|0;D=b[n+-2>>1]|0;B=C-(Z(D,B)|0)|0;C=b[u>>1]|0;D=o-(Z(C,D)|0)|0;o=b[n+-4>>1]|0;C=B-(Z(o,C)|0)|0;B=b[v>>1]|0;o=D-(Z(B,o)|0)|0;D=b[n+-6>>1]|0;B=C-(Z(D,B)|0)|0;C=b[w>>1]|0;D=o-(Z(D,C)|0)|0;o=b[n+-8>>1]|0;C=B-(Z(o,C)|0)|0;B=b[x>>1]|0;o=D-(Z(B,o)|0)|0;D=b[n+-10>>1]|0;B=C-(Z(D,B)|0)|0;C=b[y>>1]|0;D=o-(Z(C,D)|0)|0;o=b[n+-12>>1]|0;C=B-(Z(o,C)|0)|0;B=b[z>>1]|0;o=D-(Z(o,B)|0)|0;D=b[n+-14>>1]|0;B=C-(Z(D,B)|0)|0;C=b[q>>1]|0;D=o-(Z(C,D)|0)|0;o=b[n+-16>>1]|0;C=B-(Z(o,C)|0)|0;B=b[r>>1]|0;o=D-(Z(B,o)|0)|0;B=C-(Z(b[n+-18>>1]|0,B)|0)|0;B=(B+134217728|0)>>>0<268435455?B>>>12&65535:(B|0)>134217727?32767:-32768;o=o-(Z(b[s>>1]|0,B<<16>>16)|0)|0;n=k+2|0;b[k>>1]=B;b[m>>1]=B;j=(o+134217728|0)>>>0<268435455?o>>>12&65535:(o|0)>134217727?32767:-32768;b[n>>1]=j;b[m+2>>1]=j;h=h+-1<<16>>16;if(!(h<<16>>16))break;else{l=l+4|0;m=m+4|0;k=k+4|0;}}e=(e<<16>>16)+-10|0;k=e>>>1&65535;if(k<<16>>16){o=d+18|0;j=c+16|0;n=b[o>>1]|0;l=p;h=d+20|0;while(1){B=b[a>>1]|0;m=(Z(B,b[l>>1]|0)|0)+2048|0;B=(Z(b[j+6>>1]|0,B)|0)+2048|0;j=b[s>>1]|0;C=n<<16>>16;m=m-(Z(C,j)|0)|0;D=b[t>>1]|0;C=B-(Z(C,D)|0)|0;B=b[o+-2>>1]|0;D=m-(Z(B,D)|0)|0;m=b[u>>1]|0;B=C-(Z(m,B)|0)|0;C=b[o+-4>>1]|0;m=D-(Z(C,m)|0)|0;D=b[v>>1]|0;C=B-(Z(D,C)|0)|0;B=b[o+-6>>1]|0;D=m-(Z(B,D)|0)|0;m=b[w>>1]|0;B=C-(Z(B,m)|0)|0;C=b[o+-8>>1]|0;m=D-(Z(C,m)|0)|0;D=b[x>>1]|0;C=B-(Z(D,C)|0)|0;B=b[o+-10>>1]|0;D=m-(Z(B,D)|0)|0;m=b[y>>1]|0;B=C-(Z(m,B)|0)|0;C=b[o+-12>>1]|0;m=D-(Z(C,m)|0)|0;D=b[z>>1]|0;C=B-(Z(C,D)|0)|0;B=b[o+-14>>1]|0;D=m-(Z(B,D)|0)|0;m=b[q>>1]|0;B=C-(Z(m,B)|0)|0;C=b[o+-16>>1]|0;m=D-(Z(C,m)|0)|0;D=b[r>>1]|0;C=B-(Z(D,C)|0)|0;D=m-(Z(b[o+-18>>1]|0,D)|0)|0;m=l+4|0;D=(D+134217728|0)>>>0<268435455?D>>>12&65535:(D|0)>134217727?32767:-32768;j=C-(Z(j,D<<16>>16)|0)|0;o=h+2|0;b[h>>1]=D;do if((j+134217728|0)>>>0>=268435455){h=h+4|0;if((j|0)>134217727){b[o>>1]=32767;j=32767;break;}else{b[o>>1]=-32768;j=-32768;break;}}else{j=j>>>12&65535;b[o>>1]=j;h=h+4|0;}while(0);k=k+-1<<16>>16;if(!(k<<16>>16))break;else{D=l;n=j;l=m;j=D;}}}if(!(g<<16>>16)){i=A;return;}k=f;h=d+(e<<1)|0;j=k+20|0;do{b[k>>1]=b[h>>1]|0;k=k+2|0;h=h+2|0;}while((k|0)<(j|0));i=A;return;}function Ie(a,c,d){a=a|0;c=c|0;d=d|0;b[d>>1]=b[a>>1]|0;b[d+2>>1]=((Z(b[c>>1]|0,b[a+2>>1]|0)|0)+16384|0)>>>15;b[d+4>>1]=((Z(b[c+2>>1]|0,b[a+4>>1]|0)|0)+16384|0)>>>15;b[d+6>>1]=((Z(b[c+4>>1]|0,b[a+6>>1]|0)|0)+16384|0)>>>15;b[d+8>>1]=((Z(b[c+6>>1]|0,b[a+8>>1]|0)|0)+16384|0)>>>15;b[d+10>>1]=((Z(b[c+8>>1]|0,b[a+10>>1]|0)|0)+16384|0)>>>15;b[d+12>>1]=((Z(b[c+10>>1]|0,b[a+12>>1]|0)|0)+16384|0)>>>15;b[d+14>>1]=((Z(b[c+12>>1]|0,b[a+14>>1]|0)|0)+16384|0)>>>15;b[d+16>>1]=((Z(b[c+14>>1]|0,b[a+16>>1]|0)|0)+16384|0)>>>15;b[d+18>>1]=((Z(b[c+16>>1]|0,b[a+18>>1]|0)|0)+16384|0)>>>15;b[d+20>>1]=((Z(b[c+18>>1]|0,b[a+20>>1]|0)|0)+16384|0)>>>15;return;}function Je(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0;do if(a>>>0<245){s=a>>>0<11?16:a+11&-8;a=s>>>3;m=c[26]|0;j=m>>>a;if(j&3){e=(j&1^1)+a|0;b=e<<1;d=144+(b<<2)|0;b=144+(b+2<<2)|0;f=c[b>>2]|0;g=f+8|0;h=c[g>>2]|0;do if((d|0)==(h|0))c[26]=m&~(1<>>0>=(c[30]|0)>>>0?(l=h+12|0,(c[l>>2]|0)==(f|0)):0){c[l>>2]=d;c[b>>2]=h;break;}ea();}while(0);U=e<<3;c[f+4>>2]=U|3;U=f+(U|4)|0;c[U>>2]=c[U>>2]|1;break;}b=c[28]|0;if(s>>>0>b>>>0){if(j){f=2<>>12&16;f=f>>>g;e=f>>>5&8;f=f>>>e;d=f>>>2&4;f=f>>>d;h=f>>>1&2;f=f>>>h;i=f>>>1&1;i=(e|g|d|h|i)+(f>>>i)|0;f=i<<1;h=144+(f<<2)|0;f=144+(f+2<<2)|0;d=c[f>>2]|0;g=d+8|0;e=c[g>>2]|0;do if((h|0)==(e|0)){c[26]=m&~(1<>>0>=(c[30]|0)>>>0?(k=e+12|0,(c[k>>2]|0)==(d|0)):0){c[k>>2]=h;c[f>>2]=e;n=c[28]|0;break;}ea();}while(0);U=i<<3;b=U-s|0;c[d+4>>2]=s|3;j=d+s|0;c[d+(s|4)>>2]=b|1;c[d+U>>2]=b;if(n){d=c[31]|0;e=n>>>3;h=e<<1;i=144+(h<<2)|0;f=c[26]|0;e=1<>2]|0;if(h>>>0<(c[30]|0)>>>0)ea();else{p=f;q=h;}}else{c[26]=f|e;p=144+(h+2<<2)|0;q=i;}c[p>>2]=d;c[q+12>>2]=d;c[d+8>>2]=q;c[d+12>>2]=i;}c[28]=b;c[31]=j;break;}a=c[27]|0;if(a){f=(a&0-a)+-1|0;T=f>>>12&16;f=f>>>T;S=f>>>5&8;f=f>>>S;U=f>>>2&4;f=f>>>U;h=f>>>1&2;f=f>>>h;j=f>>>1&1;j=c[408+((S|T|U|h|j)+(f>>>j)<<2)>>2]|0;f=(c[j+4>>2]&-8)-s|0;h=j;while(1){i=c[h+16>>2]|0;if(!i){i=c[h+20>>2]|0;if(!i){b=f;break;}}h=(c[i+4>>2]&-8)-s|0;U=h>>>0>>0;f=U?h:f;h=i;j=U?i:j;}a=c[30]|0;if(j>>>0>=a>>>0?(v=j+s|0,j>>>0>>0):0){e=c[j+24>>2]|0;i=c[j+12>>2]|0;do if((i|0)==(j|0)){h=j+20|0;i=c[h>>2]|0;if(!i){h=j+16|0;i=c[h>>2]|0;if(!i){t=0;break;}}while(1){g=i+20|0;f=c[g>>2]|0;if(f){i=f;h=g;continue;}g=i+16|0;f=c[g>>2]|0;if(!f)break;else{i=f;h=g;}}if(h>>>0>>0)ea();else{c[h>>2]=0;t=i;break;}}else{h=c[j+8>>2]|0;if((h>>>0>=a>>>0?(d=h+12|0,(c[d>>2]|0)==(j|0)):0)?(o=i+8|0,(c[o>>2]|0)==(j|0)):0){c[d>>2]=i;c[o>>2]=h;t=i;break;}ea();}while(0);do if(e){h=c[j+28>>2]|0;g=408+(h<<2)|0;if((j|0)==(c[g>>2]|0)){c[g>>2]=t;if(!t){c[27]=c[27]&~(1<>>0<(c[30]|0)>>>0)ea();h=e+16|0;if((c[h>>2]|0)==(j|0))c[h>>2]=t;else c[e+20>>2]=t;if(!t)break;}g=c[30]|0;if(t>>>0>>0)ea();c[t+24>>2]=e;h=c[j+16>>2]|0;do if(h)if(h>>>0>>0)ea();else{c[t+16>>2]=h;c[h+24>>2]=t;break;}while(0);h=c[j+20>>2]|0;if(h)if(h>>>0<(c[30]|0)>>>0)ea();else{c[t+20>>2]=h;c[h+24>>2]=t;break;}}while(0);if(b>>>0<16){U=b+s|0;c[j+4>>2]=U|3;U=j+(U+4)|0;c[U>>2]=c[U>>2]|1;}else{c[j+4>>2]=s|3;c[j+(s|4)>>2]=b|1;c[j+(b+s)>>2]=b;e=c[28]|0;if(e){d=c[31]|0;f=e>>>3;h=f<<1;i=144+(h<<2)|0;g=c[26]|0;f=1<>2]|0;if(g>>>0<(c[30]|0)>>>0)ea();else{u=h;w=g;}}else{c[26]=g|f;u=144+(h+2<<2)|0;w=i;}c[u>>2]=d;c[w+12>>2]=d;c[d+8>>2]=w;c[d+12>>2]=i;}c[28]=b;c[31]=v;}g=j+8|0;break;}ea();}else V=154;}else V=154;}else if(a>>>0<=4294967231){a=a+11|0;w=a&-8;m=c[27]|0;if(m){j=0-w|0;a=a>>>8;if(a){if(w>>>0>16777215)l=31;else{v=(a+1048320|0)>>>16&8;V=a<>>16&4;V=V<>>16&2;l=14-(u|v|l)+(V<>>15)|0;l=w>>>(l+7|0)&1|l<<1;}}else l=0;a=c[408+(l<<2)>>2]|0;a:do if(!a){i=0;a=0;V=86;}else{d=j;i=0;b=w<<((l|0)==31?0:25-(l>>>1)|0);k=a;a=0;while(1){e=c[k+4>>2]&-8;j=e-w|0;if(j>>>0>>0){if((e|0)==(w|0)){e=k;a=k;V=90;break a;}else a=k;}else j=d;V=c[k+20>>2]|0;k=c[k+16+(b>>>31<<2)>>2]|0;i=(V|0)==0|(V|0)==(k|0)?i:V;if(!k){V=86;break;}else{d=j;b=b<<1;}}}while(0);if((V|0)==86){if((i|0)==0&(a|0)==0){a=2<>>12&16;a=a>>>t;q=a>>>5&8;a=a>>>q;u=a>>>2&4;a=a>>>u;v=a>>>1&2;a=a>>>v;i=a>>>1&1;i=c[408+((q|t|u|v|i)+(a>>>i)<<2)>>2]|0;a=0;}if(!i){q=j;p=a;}else{e=i;V=90;}}if((V|0)==90)while(1){V=0;v=(c[e+4>>2]&-8)-w|0;i=v>>>0>>0;j=i?v:j;a=i?e:a;i=c[e+16>>2]|0;if(i){e=i;V=90;continue;}e=c[e+20>>2]|0;if(!e){q=j;p=a;break;}else V=90;}if((p|0)!=0?q>>>0<((c[28]|0)-w|0)>>>0:0){a=c[30]|0;if(p>>>0>=a>>>0?(H=p+w|0,p>>>0>>0):0){j=c[p+24>>2]|0;i=c[p+12>>2]|0;do if((i|0)==(p|0)){h=p+20|0;i=c[h>>2]|0;if(!i){h=p+16|0;i=c[h>>2]|0;if(!i){y=0;break;}}while(1){g=i+20|0;f=c[g>>2]|0;if(f){i=f;h=g;continue;}g=i+16|0;f=c[g>>2]|0;if(!f)break;else{i=f;h=g;}}if(h>>>0>>0)ea();else{c[h>>2]=0;y=i;break;}}else{h=c[p+8>>2]|0;if((h>>>0>=a>>>0?(r=h+12|0,(c[r>>2]|0)==(p|0)):0)?(s=i+8|0,(c[s>>2]|0)==(p|0)):0){c[r>>2]=i;c[s>>2]=h;y=i;break;}ea();}while(0);do if(j){i=c[p+28>>2]|0;h=408+(i<<2)|0;if((p|0)==(c[h>>2]|0)){c[h>>2]=y;if(!y){c[27]=c[27]&~(1<>>0<(c[30]|0)>>>0)ea();h=j+16|0;if((c[h>>2]|0)==(p|0))c[h>>2]=y;else c[j+20>>2]=y;if(!y)break;}i=c[30]|0;if(y>>>0>>0)ea();c[y+24>>2]=j;h=c[p+16>>2]|0;do if(h)if(h>>>0>>0)ea();else{c[y+16>>2]=h;c[h+24>>2]=y;break;}while(0);h=c[p+20>>2]|0;if(h)if(h>>>0<(c[30]|0)>>>0)ea();else{c[y+20>>2]=h;c[h+24>>2]=y;break;}}while(0);b:do if(q>>>0>=16){c[p+4>>2]=w|3;c[p+(w|4)>>2]=q|1;c[p+(q+w)>>2]=q;i=q>>>3;if(q>>>0<256){g=i<<1;e=144+(g<<2)|0;f=c[26]|0;h=1<>2]|0;if(g>>>0<(c[30]|0)>>>0)ea();else{z=h;A=g;}}else{c[26]=f|h;z=144+(g+2<<2)|0;A=e;}c[z>>2]=H;c[A+12>>2]=H;c[p+(w+8)>>2]=A;c[p+(w+12)>>2]=e;break;}d=q>>>8;if(d){if(q>>>0>16777215)i=31;else{T=(d+1048320|0)>>>16&8;U=d<>>16&4;U=U<>>16&2;i=14-(S|T|i)+(U<>>15)|0;i=q>>>(i+7|0)&1|i<<1;}}else i=0;h=408+(i<<2)|0;c[p+(w+28)>>2]=i;c[p+(w+20)>>2]=0;c[p+(w+16)>>2]=0;g=c[27]|0;f=1<>2]=H;c[p+(w+24)>>2]=h;c[p+(w+12)>>2]=H;c[p+(w+8)>>2]=H;break;}d=c[h>>2]|0;c:do if((c[d+4>>2]&-8|0)!=(q|0)){i=q<<((i|0)==31?0:25-(i>>>1)|0);while(1){b=d+16+(i>>>31<<2)|0;h=c[b>>2]|0;if(!h)break;if((c[h+4>>2]&-8|0)==(q|0)){C=h;break c;}else{i=i<<1;d=h;}}if(b>>>0<(c[30]|0)>>>0)ea();else{c[b>>2]=H;c[p+(w+24)>>2]=d;c[p+(w+12)>>2]=H;c[p+(w+8)>>2]=H;break b;}}else C=d;while(0);d=C+8|0;b=c[d>>2]|0;U=c[30]|0;if(b>>>0>=U>>>0&C>>>0>=U>>>0){c[b+12>>2]=H;c[d>>2]=H;c[p+(w+8)>>2]=b;c[p+(w+12)>>2]=C;c[p+(w+24)>>2]=0;break;}else ea();}else{U=q+w|0;c[p+4>>2]=U|3;U=p+(U+4)|0;c[U>>2]=c[U>>2]|1;}while(0);g=p+8|0;break;}ea();}else{s=w;V=154;}}else{s=w;V=154;}}else{s=-1;V=154;}while(0);d:do if((V|0)==154){a=c[28]|0;if(a>>>0>=s>>>0){b=a-s|0;d=c[31]|0;if(b>>>0>15){c[31]=d+s;c[28]=b;c[d+(s+4)>>2]=b|1;c[d+a>>2]=b;c[d+4>>2]=s|3;}else{c[28]=0;c[31]=0;c[d+4>>2]=a|3;V=d+(a+4)|0;c[V>>2]=c[V>>2]|1;}g=d+8|0;break;}a=c[29]|0;if(a>>>0>s>>>0){V=a-s|0;c[29]=V;g=c[32]|0;c[32]=g+s;c[g+(s+4)>>2]=V|1;c[g+4>>2]=s|3;g=g+8|0;break;}if(!(c[144]|0))Me();m=s+48|0;d=c[146]|0;l=s+47|0;e=d+l|0;d=0-d|0;k=e&d;if(k>>>0>s>>>0){a=c[136]|0;if((a|0)!=0?(C=c[134]|0,H=C+k|0,H>>>0<=C>>>0|H>>>0>a>>>0):0){g=0;break;}e:do if(!(c[137]&4)){a=c[32]|0;f:do if(a){i=552;while(1){j=c[i>>2]|0;if(j>>>0<=a>>>0?(x=i+4|0,(j+(c[x>>2]|0)|0)>>>0>a>>>0):0){g=i;a=x;break;}i=c[i+8>>2]|0;if(!i){V=172;break f;}}j=e-(c[29]|0)&d;if(j>>>0<2147483647){i=ga(j|0)|0;H=(i|0)==((c[g>>2]|0)+(c[a>>2]|0)|0);a=H?j:0;if(H){if((i|0)!=(-1|0)){A=i;t=a;V=192;break e;}}else V=182;}else a=0;}else V=172;while(0);do if((V|0)==172){g=ga(0)|0;if((g|0)!=(-1|0)){a=g;j=c[145]|0;i=j+-1|0;if(!(i&a))j=k;else j=k-a+(i+a&0-j)|0;a=c[134]|0;i=a+j|0;if(j>>>0>s>>>0&j>>>0<2147483647){H=c[136]|0;if((H|0)!=0?i>>>0<=a>>>0|i>>>0>H>>>0:0){a=0;break;}i=ga(j|0)|0;V=(i|0)==(g|0);a=V?j:0;if(V){A=g;t=a;V=192;break e;}else V=182;}else a=0;}else a=0;}while(0);g:do if((V|0)==182){g=0-j|0;do if(m>>>0>j>>>0&(j>>>0<2147483647&(i|0)!=(-1|0))?(B=c[146]|0,B=l-j+B&0-B,B>>>0<2147483647):0)if((ga(B|0)|0)==(-1|0)){ga(g|0)|0;break g;}else{j=B+j|0;break;}while(0);if((i|0)!=(-1|0)){A=i;t=j;V=192;break e;}}while(0);c[137]=c[137]|4;V=189;}else{a=0;V=189;}while(0);if((((V|0)==189?k>>>0<2147483647:0)?(D=ga(k|0)|0,E=ga(0)|0,D>>>0>>0&((D|0)!=(-1|0)&(E|0)!=(-1|0))):0)?(F=E-D|0,G=F>>>0>(s+40|0)>>>0,G):0){A=D;t=G?F:a;V=192;}if((V|0)==192){j=(c[134]|0)+t|0;c[134]=j;if(j>>>0>(c[135]|0)>>>0)c[135]=j;q=c[32]|0;h:do if(q){g=552;do{a=c[g>>2]|0;j=g+4|0;i=c[j>>2]|0;if((A|0)==(a+i|0)){I=a;J=j;K=i;L=g;V=202;break;}g=c[g+8>>2]|0;}while((g|0)!=0);if(((V|0)==202?(c[L+12>>2]&8|0)==0:0)?q>>>0>>0&q>>>0>=I>>>0:0){c[J>>2]=K+t;V=(c[29]|0)+t|0;U=q+8|0;U=(U&7|0)==0?0:0-U&7;T=V-U|0;c[32]=q+U;c[29]=T;c[q+(U+4)>>2]=T|1;c[q+(V+4)>>2]=40;c[33]=c[148];break;}j=c[30]|0;if(A>>>0>>0){c[30]=A;j=A;}i=A+t|0;a=552;while(1){if((c[a>>2]|0)==(i|0)){g=a;i=a;V=210;break;}a=c[a+8>>2]|0;if(!a){i=552;break;}}if((V|0)==210)if(!(c[i+12>>2]&8)){c[g>>2]=A;o=i+4|0;c[o>>2]=(c[o>>2]|0)+t;o=A+8|0;o=(o&7|0)==0?0:0-o&7;l=A+(t+8)|0;l=(l&7|0)==0?0:0-l&7;i=A+(l+t)|0;p=o+s|0;n=A+p|0;a=i-(A+o)-s|0;c[A+(o+4)>>2]=s|3;i:do if((i|0)!=(q|0)){if((i|0)==(c[31]|0)){V=(c[28]|0)+a|0;c[28]=V;c[31]=n;c[A+(p+4)>>2]=V|1;c[A+(V+p)>>2]=V;break;}b=t+4|0;h=c[A+(b+l)>>2]|0;if((h&3|0)==1){k=h&-8;e=h>>>3;j:do if(h>>>0>=256){d=c[A+((l|24)+t)>>2]|0;g=c[A+(t+12+l)>>2]|0;k:do if((g|0)==(i|0)){f=l|16;g=A+(b+f)|0;h=c[g>>2]|0;if(!h){g=A+(f+t)|0;h=c[g>>2]|0;if(!h){R=0;break;}}while(1){f=h+20|0;e=c[f>>2]|0;if(e){h=e;g=f;continue;}f=h+16|0;e=c[f>>2]|0;if(!e)break;else{h=e;g=f;}}if(g>>>0>>0)ea();else{c[g>>2]=0;R=h;break;}}else{f=c[A+((l|8)+t)>>2]|0;do if(f>>>0>=j>>>0){j=f+12|0;if((c[j>>2]|0)!=(i|0))break;h=g+8|0;if((c[h>>2]|0)!=(i|0))break;c[j>>2]=g;c[h>>2]=f;R=g;break k;}while(0);ea();}while(0);if(!d)break;j=c[A+(t+28+l)>>2]|0;h=408+(j<<2)|0;do if((i|0)!=(c[h>>2]|0)){if(d>>>0<(c[30]|0)>>>0)ea();h=d+16|0;if((c[h>>2]|0)==(i|0))c[h>>2]=R;else c[d+20>>2]=R;if(!R)break j;}else{c[h>>2]=R;if(R)break;c[27]=c[27]&~(1<>>0>>0)ea();c[R+24>>2]=d;i=l|16;h=c[A+(i+t)>>2]|0;do if(h)if(h>>>0>>0)ea();else{c[R+16>>2]=h;c[h+24>>2]=R;break;}while(0);i=c[A+(b+i)>>2]|0;if(!i)break;if(i>>>0<(c[30]|0)>>>0)ea();else{c[R+20>>2]=i;c[i+24>>2]=R;break;}}else{h=c[A+((l|8)+t)>>2]|0;g=c[A+(t+12+l)>>2]|0;f=144+(e<<1<<2)|0;do if((h|0)!=(f|0)){if(h>>>0>=j>>>0?(c[h+12>>2]|0)==(i|0):0)break;ea();}while(0);if((g|0)==(h|0)){c[26]=c[26]&~(1<>>0>=j>>>0?(N=g+8|0,(c[N>>2]|0)==(i|0)):0){M=N;break;}ea();}while(0);c[h+12>>2]=g;c[M>>2]=h;}while(0);i=A+((k|l)+t)|0;a=k+a|0;}i=i+4|0;c[i>>2]=c[i>>2]&-2;c[A+(p+4)>>2]=a|1;c[A+(a+p)>>2]=a;i=a>>>3;if(a>>>0<256){g=i<<1;e=144+(g<<2)|0;f=c[26]|0;h=1<>2]|0;if(g>>>0>=(c[30]|0)>>>0){S=h;T=g;break;}ea();}while(0);c[S>>2]=n;c[T+12>>2]=n;c[A+(p+8)>>2]=T;c[A+(p+12)>>2]=e;break;}d=a>>>8;do if(!d)i=0;else{if(a>>>0>16777215){i=31;break;}T=(d+1048320|0)>>>16&8;V=d<>>16&4;V=V<>>16&2;i=14-(S|T|i)+(V<>>15)|0;i=a>>>(i+7|0)&1|i<<1;}while(0);h=408+(i<<2)|0;c[A+(p+28)>>2]=i;c[A+(p+20)>>2]=0;c[A+(p+16)>>2]=0;g=c[27]|0;f=1<>2]=n;c[A+(p+24)>>2]=h;c[A+(p+12)>>2]=n;c[A+(p+8)>>2]=n;break;}d=c[h>>2]|0;l:do if((c[d+4>>2]&-8|0)!=(a|0)){i=a<<((i|0)==31?0:25-(i>>>1)|0);while(1){b=d+16+(i>>>31<<2)|0;h=c[b>>2]|0;if(!h)break;if((c[h+4>>2]&-8|0)==(a|0)){U=h;break l;}else{i=i<<1;d=h;}}if(b>>>0<(c[30]|0)>>>0)ea();else{c[b>>2]=n;c[A+(p+24)>>2]=d;c[A+(p+12)>>2]=n;c[A+(p+8)>>2]=n;break i;}}else U=d;while(0);d=U+8|0;b=c[d>>2]|0;V=c[30]|0;if(b>>>0>=V>>>0&U>>>0>=V>>>0){c[b+12>>2]=n;c[d>>2]=n;c[A+(p+8)>>2]=b;c[A+(p+12)>>2]=U;c[A+(p+24)>>2]=0;break;}else ea();}else{V=(c[29]|0)+a|0;c[29]=V;c[32]=n;c[A+(p+4)>>2]=V|1;}while(0);g=A+(o|8)|0;break d;}else i=552;while(1){g=c[i>>2]|0;if(g>>>0<=q>>>0?(h=c[i+4>>2]|0,f=g+h|0,f>>>0>q>>>0):0)break;i=c[i+8>>2]|0;}i=g+(h+-39)|0;i=g+(h+-47+((i&7|0)==0?0:0-i&7))|0;j=q+16|0;i=i>>>0>>0?q:i;h=i+8|0;g=A+8|0;g=(g&7|0)==0?0:0-g&7;V=t+-40-g|0;c[32]=A+g;c[29]=V;c[A+(g+4)>>2]=V|1;c[A+(t+-36)>>2]=40;c[33]=c[148];g=i+4|0;c[g>>2]=27;c[h>>2]=c[138];c[h+4>>2]=c[139];c[h+8>>2]=c[140];c[h+12>>2]=c[141];c[138]=A;c[139]=t;c[141]=0;c[140]=h;h=i+28|0;c[h>>2]=7;if((i+32|0)>>>0>>0)do{V=h;h=h+4|0;c[h>>2]=7;}while((V+8|0)>>>0>>0);if((i|0)!=(q|0)){a=i-q|0;c[g>>2]=c[g>>2]&-2;c[q+4>>2]=a|1;c[i>>2]=a;f=a>>>3;if(a>>>0<256){h=f<<1;i=144+(h<<2)|0;g=c[26]|0;e=1<>2]|0;if(b>>>0<(c[30]|0)>>>0)ea();else{O=d;P=b;}}else{c[26]=g|e;O=144+(h+2<<2)|0;P=i;}c[O>>2]=q;c[P+12>>2]=q;c[q+8>>2]=P;c[q+12>>2]=i;break;}d=a>>>8;if(d){if(a>>>0>16777215)h=31;else{U=(d+1048320|0)>>>16&8;V=d<>>16&4;V=V<>>16&2;h=14-(T|U|h)+(V<>>15)|0;h=a>>>(h+7|0)&1|h<<1;}}else h=0;e=408+(h<<2)|0;c[q+28>>2]=h;c[q+20>>2]=0;c[j>>2]=0;d=c[27]|0;b=1<>2]=q;c[q+24>>2]=e;c[q+12>>2]=q;c[q+8>>2]=q;break;}d=c[e>>2]|0;m:do if((c[d+4>>2]&-8|0)!=(a|0)){h=a<<((h|0)==31?0:25-(h>>>1)|0);while(1){b=d+16+(h>>>31<<2)|0;e=c[b>>2]|0;if(!e)break;if((c[e+4>>2]&-8|0)==(a|0)){Q=e;break m;}else{h=h<<1;d=e;}}if(b>>>0<(c[30]|0)>>>0)ea();else{c[b>>2]=q;c[q+24>>2]=d;c[q+12>>2]=q;c[q+8>>2]=q;break h;}}else Q=d;while(0);d=Q+8|0;b=c[d>>2]|0;V=c[30]|0;if(b>>>0>=V>>>0&Q>>>0>=V>>>0){c[b+12>>2]=q;c[d>>2]=q;c[q+8>>2]=b;c[q+12>>2]=Q;c[q+24>>2]=0;break;}else ea();}}else{V=c[30]|0;if((V|0)==0|A>>>0>>0)c[30]=A;c[138]=A;c[139]=t;c[141]=0;c[35]=c[144];c[34]=-1;d=0;do{V=d<<1;U=144+(V<<2)|0;c[144+(V+3<<2)>>2]=U;c[144+(V+2<<2)>>2]=U;d=d+1|0;}while((d|0)!=32);V=A+8|0;V=(V&7|0)==0?0:0-V&7;U=t+-40-V|0;c[32]=A+V;c[29]=U;c[A+(V+4)>>2]=U|1;c[A+(t+-36)>>2]=40;c[33]=c[148];}while(0);b=c[29]|0;if(b>>>0>s>>>0){V=b-s|0;c[29]=V;g=c[32]|0;c[32]=g+s;c[g+(s+4)>>2]=V|1;c[g+4>>2]=s|3;g=g+8|0;break;}}c[(Le()|0)>>2]=12;g=0;}else g=0;}while(0);return g|0;}function Ke(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0;a:do if(a){f=a+-8|0;k=c[30]|0;b:do if(f>>>0>=k>>>0?(e=c[a+-4>>2]|0,d=e&3,(d|0)!=1):0){v=e&-8;w=a+(v+-8)|0;do if(!(e&1)){f=c[f>>2]|0;if(!d)break a;l=-8-f|0;n=a+l|0;o=f+v|0;if(n>>>0>>0)break b;if((n|0)==(c[31]|0)){g=a+(v+-4)|0;f=c[g>>2]|0;if((f&3|0)!=3){B=n;g=o;break;}c[28]=o;c[g>>2]=f&-2;c[a+(l+4)>>2]=o|1;c[w>>2]=o;break a;}d=f>>>3;if(f>>>0<256){e=c[a+(l+8)>>2]|0;g=c[a+(l+12)>>2]|0;f=144+(d<<1<<2)|0;do if((e|0)!=(f|0)){if(e>>>0>=k>>>0?(c[e+12>>2]|0)==(n|0):0)break;ea();}while(0);if((g|0)==(e|0)){c[26]=c[26]&~(1<>>0>=k>>>0?(h=g+8|0,(c[h>>2]|0)==(n|0)):0){b=h;break;}ea();}while(0);c[e+12>>2]=g;c[b>>2]=e;B=n;g=o;break;}h=c[a+(l+24)>>2]|0;f=c[a+(l+12)>>2]|0;do if((f|0)==(n|0)){e=a+(l+20)|0;f=c[e>>2]|0;if(!f){e=a+(l+16)|0;f=c[e>>2]|0;if(!f){m=0;break;}}while(1){d=f+20|0;b=c[d>>2]|0;if(b){f=b;e=d;continue;}d=f+16|0;b=c[d>>2]|0;if(!b)break;else{f=b;e=d;}}if(e>>>0>>0)ea();else{c[e>>2]=0;m=f;break;}}else{e=c[a+(l+8)>>2]|0;if((e>>>0>=k>>>0?(i=e+12|0,(c[i>>2]|0)==(n|0)):0)?(j=f+8|0,(c[j>>2]|0)==(n|0)):0){c[i>>2]=f;c[j>>2]=e;m=f;break;}ea();}while(0);if(h){f=c[a+(l+28)>>2]|0;e=408+(f<<2)|0;if((n|0)==(c[e>>2]|0)){c[e>>2]=m;if(!m){c[27]=c[27]&~(1<>>0<(c[30]|0)>>>0)ea();f=h+16|0;if((c[f>>2]|0)==(n|0))c[f>>2]=m;else c[h+20>>2]=m;if(!m){B=n;g=o;break;}}e=c[30]|0;if(m>>>0>>0)ea();c[m+24>>2]=h;f=c[a+(l+16)>>2]|0;do if(f)if(f>>>0>>0)ea();else{c[m+16>>2]=f;c[f+24>>2]=m;break;}while(0);f=c[a+(l+20)>>2]|0;if(f){if(f>>>0<(c[30]|0)>>>0)ea();else{c[m+20>>2]=f;c[f+24>>2]=m;B=n;g=o;break;}}else{B=n;g=o;}}else{B=n;g=o;}}else{B=f;g=v;}while(0);if(B>>>0>>0?(p=a+(v+-4)|0,q=c[p>>2]|0,(q&1|0)!=0):0){if(!(q&2)){if((w|0)==(c[32]|0)){A=(c[29]|0)+g|0;c[29]=A;c[32]=B;c[B+4>>2]=A|1;if((B|0)!=(c[31]|0))break a;c[31]=0;c[28]=0;break a;}if((w|0)==(c[31]|0)){A=(c[28]|0)+g|0;c[28]=A;c[31]=B;c[B+4>>2]=A|1;c[B+A>>2]=A;break a;}j=(q&-8)+g|0;d=q>>>3;do if(q>>>0>=256){b=c[a+(v+16)>>2]|0;g=c[a+(v|4)>>2]|0;do if((g|0)==(w|0)){f=a+(v+12)|0;g=c[f>>2]|0;if(!g){f=a+(v+8)|0;g=c[f>>2]|0;if(!g){x=0;break;}}while(1){e=g+20|0;d=c[e>>2]|0;if(d){g=d;f=e;continue;}e=g+16|0;d=c[e>>2]|0;if(!d)break;else{g=d;f=e;}}if(f>>>0<(c[30]|0)>>>0)ea();else{c[f>>2]=0;x=g;break;}}else{f=c[a+v>>2]|0;if((f>>>0>=(c[30]|0)>>>0?(t=f+12|0,(c[t>>2]|0)==(w|0)):0)?(u=g+8|0,(c[u>>2]|0)==(w|0)):0){c[t>>2]=g;c[u>>2]=f;x=g;break;}ea();}while(0);if(b){g=c[a+(v+20)>>2]|0;f=408+(g<<2)|0;if((w|0)==(c[f>>2]|0)){c[f>>2]=x;if(!x){c[27]=c[27]&~(1<>>0<(c[30]|0)>>>0)ea();g=b+16|0;if((c[g>>2]|0)==(w|0))c[g>>2]=x;else c[b+20>>2]=x;if(!x)break;}g=c[30]|0;if(x>>>0>>0)ea();c[x+24>>2]=b;f=c[a+(v+8)>>2]|0;do if(f)if(f>>>0>>0)ea();else{c[x+16>>2]=f;c[f+24>>2]=x;break;}while(0);d=c[a+(v+12)>>2]|0;if(d)if(d>>>0<(c[30]|0)>>>0)ea();else{c[x+20>>2]=d;c[d+24>>2]=x;break;}}}else{e=c[a+v>>2]|0;g=c[a+(v|4)>>2]|0;f=144+(d<<1<<2)|0;do if((e|0)!=(f|0)){if(e>>>0>=(c[30]|0)>>>0?(c[e+12>>2]|0)==(w|0):0)break;ea();}while(0);if((g|0)==(e|0)){c[26]=c[26]&~(1<>>0>=(c[30]|0)>>>0?(s=g+8|0,(c[s>>2]|0)==(w|0)):0){r=s;break;}ea();}while(0);c[e+12>>2]=g;c[r>>2]=e;}while(0);c[B+4>>2]=j|1;c[B+j>>2]=j;if((B|0)==(c[31]|0)){c[28]=j;break a;}else g=j;}else{c[p>>2]=q&-2;c[B+4>>2]=g|1;c[B+g>>2]=g;}f=g>>>3;if(g>>>0<256){e=f<<1;g=144+(e<<2)|0;b=c[26]|0;d=1<>2]|0;if(b>>>0<(c[30]|0)>>>0)ea();else{y=d;z=b;}}else{c[26]=b|d;y=144+(e+2<<2)|0;z=g;}c[y>>2]=B;c[z+12>>2]=B;c[B+8>>2]=z;c[B+12>>2]=g;break a;}b=g>>>8;if(b){if(g>>>0>16777215)f=31;else{y=(b+1048320|0)>>>16&8;z=b<>>16&4;z=z<>>16&2;f=14-(a|y|f)+(z<>>15)|0;f=g>>>(f+7|0)&1|f<<1;}}else f=0;d=408+(f<<2)|0;c[B+28>>2]=f;c[B+20>>2]=0;c[B+16>>2]=0;b=c[27]|0;e=1<>2]|0;d:do if((c[d+4>>2]&-8|0)!=(g|0)){f=g<<((f|0)==31?0:25-(f>>>1)|0);while(1){b=d+16+(f>>>31<<2)|0;e=c[b>>2]|0;if(!e)break;if((c[e+4>>2]&-8|0)==(g|0)){A=e;break d;}else{f=f<<1;d=e;}}if(b>>>0<(c[30]|0)>>>0)ea();else{c[b>>2]=B;c[B+24>>2]=d;c[B+12>>2]=B;c[B+8>>2]=B;break c;}}else A=d;while(0);b=A+8|0;d=c[b>>2]|0;z=c[30]|0;if(d>>>0>=z>>>0&A>>>0>=z>>>0){c[d+12>>2]=B;c[b>>2]=B;c[B+8>>2]=d;c[B+12>>2]=A;c[B+24>>2]=0;break;}else ea();}else{c[27]=b|e;c[d>>2]=B;c[B+24>>2]=d;c[B+12>>2]=B;c[B+8>>2]=B;}while(0);B=(c[34]|0)+-1|0;c[34]=B;if(!B)b=560;else break a;while(1){b=c[b>>2]|0;if(!b)break;else b=b+8|0;}c[34]=-1;break a;}}while(0);ea();}while(0);return;}function Le(){var a=0;a=600;return a|0;}function Me(){var a=0;do if(!(c[144]|0)){a=ca(30)|0;if(!(a+-1&a)){c[146]=a;c[145]=a;c[147]=-1;c[148]=-1;c[149]=0;c[137]=0;c[144]=(ha(0)|0)&-16^1431655768;break;}else ea();}while(0);return;}function Ne(){}function Oe(b,d,e){b=b|0;d=d|0;e=e|0;var f=0;if((e|0)>=4096)return ja(b|0,d|0,e|0)|0;f=b|0;if((b&3)==(d&3)){while(b&3){if(!e)return f|0;a[b>>0]=a[d>>0]|0;b=b+1|0;d=d+1|0;e=e-1|0;}while((e|0)>=4){c[b>>2]=c[d>>2];b=b+4|0;d=d+4|0;e=e-4|0;}}while((e|0)>0){a[b>>0]=a[d>>0]|0;b=b+1|0;d=d+1|0;e=e-1|0;}return f|0;}function Pe(b,c,d){b=b|0;c=c|0;d=d|0;var e=0;if((c|0)<(b|0)&(b|0)<(c+d|0)){e=b;c=c+d|0;b=b+d|0;while((d|0)>0){b=b-1|0;c=c-1|0;d=d-1|0;a[b>>0]=a[c>>0]|0;}b=e;}else Oe(b,c,d)|0;return b|0;}function Qe(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0;f=b+e|0;if((e|0)>=20){d=d&255;h=b&3;i=d|d<<8|d<<16|d<<24;g=f&~3;if(h){h=b+4-h|0;while((b|0)<(h|0)){a[b>>0]=d;b=b+1|0;}}while((b|0)<(g|0)){c[b>>2]=i;b=b+4|0;}}while((b|0)<(f|0)){a[b>>0]=d;b=b+1|0;}return b-e|0;}// EMSCRIPTEN_END_FUNCS return{_free:Ke,___errno_location:Le,_memmove:Pe,_Decoder_Interface_Decode:xa,_Decoder_Interface_exit:wa,_Encoder_Interface_init:ya,_memset:Qe,_malloc:Je,_memcpy:Oe,_Encoder_Interface_exit:za,_Decoder_Interface_init:va,_Encoder_Interface_Encode:Aa,runPostSets:Ne,stackAlloc:ma,stackSave:na,stackRestore:oa,establishStackSpace:pa,setThrew:qa,setTempRet0:ta,getTempRet0:ua};}// EMSCRIPTEN_END_ASM (Module.asmGlobalArg,Module.asmLibraryArg,buffer);var _Encoder_Interface_Encode=Module["_Encoder_Interface_Encode"]=asm["_Encoder_Interface_Encode"];var _free=Module["_free"]=asm["_free"];var runPostSets=Module["runPostSets"]=asm["runPostSets"];var _memmove=Module["_memmove"]=asm["_memmove"];var _Decoder_Interface_exit=Module["_Decoder_Interface_exit"]=asm["_Decoder_Interface_exit"];var _Encoder_Interface_init=Module["_Encoder_Interface_init"]=asm["_Encoder_Interface_init"];var _memset=Module["_memset"]=asm["_memset"];var _malloc=Module["_malloc"]=asm["_malloc"];var _memcpy=Module["_memcpy"]=asm["_memcpy"];var _Decoder_Interface_Decode=Module["_Decoder_Interface_Decode"]=asm["_Decoder_Interface_Decode"];var _Decoder_Interface_init=Module["_Decoder_Interface_init"]=asm["_Decoder_Interface_init"];var _Encoder_Interface_exit=Module["_Encoder_Interface_exit"]=asm["_Encoder_Interface_exit"];var ___errno_location=Module["___errno_location"]=asm["___errno_location"];Runtime.stackAlloc=asm["stackAlloc"];Runtime.stackSave=asm["stackSave"];Runtime.stackRestore=asm["stackRestore"];Runtime.establishStackSpace=asm["establishStackSpace"];Runtime.setTempRet0=asm["setTempRet0"];Runtime.getTempRet0=asm["getTempRet0"];function ExitStatus(status){this.name="ExitStatus";this.message="Program terminated with exit("+status+")";this.status=status;}ExitStatus.prototype=new Error();ExitStatus.prototype.constructor=ExitStatus;var initialStackTop;dependenciesFulfilled=function runCaller(){if(!Module["calledRun"])run();if(!Module["calledRun"])dependenciesFulfilled=runCaller;};Module["callMain"]=Module.callMain=function callMain(args){assert(runDependencies==0,"cannot call main when async dependencies remain! (listen on __ATMAIN__)");assert(__ATPRERUN__.length==0,"cannot call main when preRun functions remain to be called");args=args||[];ensureInitRuntime();var argc=args.length+1;function pad(){for(var i=0;i<4-1;i++){argv.push(0);}}var argv=[allocate(intArrayFromString(Module["thisProgram"]),"i8",ALLOC_NORMAL)];pad();for(var i=0;i0){return;}preRun();if(runDependencies>0)return;if(Module["calledRun"])return;function doRun(){if(Module["calledRun"])return;Module["calledRun"]=true;if(ABORT)return;ensureInitRuntime();preMain();if(Module["onRuntimeInitialized"])Module["onRuntimeInitialized"]();if(Module["_main"]&&shouldRunNow)Module["callMain"](args);postRun();}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout(function(){setTimeout(function(){Module["setStatus"]("");},1);doRun();},1);}else{doRun();}}Module["run"]=Module.run=run;function exit(status,implicit){if(implicit&&Module["noExitRuntime"]){return;}if(Module["noExitRuntime"]);else{ABORT=true;STACKTOP=initialStackTop;exitRuntime();if(Module["onExit"])Module["onExit"](status);}if(ENVIRONMENT_IS_SHELL&&typeof quit==="function"){quit(status);}throw new ExitStatus(status);}Module["exit"]=Module.exit=exit;var abortDecorators=[];function abort(what){if(what!==undefined){Module.print(what);Module.printErr(what);what=JSON.stringify(what);}else{what="";}ABORT=true;var extra="\nIf this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.";var output="abort("+what+") at "+stackTrace()+extra;if(abortDecorators){abortDecorators.forEach(function(decorator){output=decorator(output,what);});}throw output;}Module["abort"]=Module.abort=abort;if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].pop()();}}var shouldRunNow=true;if(Module["noInitialRun"]){shouldRunNow=false;}Module["noExitRuntime"]=true;run();return AMR;}();self.onmessage=function(e){switch(e.data.command){case'encode':encode(e.data.samples,e.data.sampleRate);break;case'decode':decode(e.data.buffer);break;}};function encode(samples,sampleRate){sampleRate=sampleRate||8000;self.postMessage({command:'encode',amr:AMR.encode(samples,sampleRate,7)});}function decode(u8Array){self.postMessage({command:'decode',amr:AMR.decode(u8Array)});}};/** * @file AMR 录音、转换、播放器 * @author BenzLeung(https://github.com/BenzLeung) * @date 2017/11/12 * Created by JetBrains PhpStorm. * * 每位工程师都有保持代码优雅的义务 * each engineer has a duty to keep the code elegant */var amrWorkerStr=amrnb.toString().replace(/^\s*function.*?\(\)\s*{/,'').replace(/}\s*$/,'');var amrWorkerURLObj=(window.URL||window.webkitURL).createObjectURL(new Blob([amrWorkerStr],{type:"text/javascript"}));var BenzAMRRecorder=/*#__PURE__*/function(){function BenzAMRRecorder(){var _this3=this;(0,_classCallCheck2.default)(this,BenzAMRRecorder);this._isInit=false;this._isInitRecorder=false;this._recorderControl=new RecorderControl();this._samples=new Float32Array(0);this._rawData=new Uint8Array(0);this._blob=null;this._onEnded=null;this._onAutoEnded=null;this._onPlay=null;this._onPause=null;this._onResume=null;this._onStop=null;this._onStartRecord=null;this._onCancelRecord=null;this._onFinishRecord=null;this._isPlaying=false;this._isPaused=false;this._startCtxTime=0.0;this._pauseTime=0.0;this._playEmpty=function(){_this3._recorderControl.playPcm(new Float32Array(10),24000);};this._onEndCallback=function(){if(_this3._isPlaying){_this3._isPlaying=false;if(_this3._onStop){_this3._onStop();}if(_this3._onAutoEnded){_this3._onAutoEnded();}}if(!_this3._isPaused){if(_this3._onEnded){_this3._onEnded();}}};this._runAMRWorker=function(msg,resolve){var amrWorker=new Worker(amrWorkerURLObj);amrWorker.postMessage(msg);amrWorker.onmessage=function(e){resolve(e.data.amr);amrWorker.terminate();};};}/** * 是否已经初始化 * @return {boolean} */return(0,_createClass2.default)(BenzAMRRecorder,[{key:"isInit",value:function isInit(){return this._isInit;}/** * 使用浮点数据初始化 * @param {Float32Array} array * @return {Promise} */},{key:"initWithArrayBuffer",value:function initWithArrayBuffer(array){var _this4=this;if(this._isInit||this._isInitRecorder){BenzAMRRecorder.throwAlreadyInitialized();}this._playEmpty();return new Promise(function(resolve,reject){var u8Array=new Uint8Array(array);_this4.decodeAMRAsync(u8Array).then(function(samples){_this4._samples=samples;_this4._isInit=true;if(!_this4._samples){RecorderControl.decodeAudioArrayBufferByContext(array).then(function(data){_this4._isInit=true;return _this4.encodeAMRAsync(data,RecorderControl.getCtxSampleRate());}).then(function(rawData){_this4._rawData=rawData;_this4._blob=BenzAMRRecorder.rawAMRData2Blob(rawData);return _this4.decodeAMRAsync(rawData);}).then(function(sample){_this4._samples=sample;resolve();}).catch(function(){reject(new Error('Failed to decode.'));});}else{_this4._rawData=u8Array;resolve();}});});}/** * 使用 Blob 对象初始化( ) * @param {Blob} blob * @return {Promise} */},{key:"initWithBlob",value:function initWithBlob(blob){var _this5=this;if(this._isInit||this._isInitRecorder){BenzAMRRecorder.throwAlreadyInitialized();}this._playEmpty();this._blob=blob;var p=new Promise(function(resolve){var reader=new FileReader();reader.onload=function(e){resolve(e.target.result);};reader.readAsArrayBuffer(blob);});return p.then(function(data){return _this5.initWithArrayBuffer(data);});}/** * 使用 url 初始化 * @param {string} url * @return {Promise} */},{key:"initWithUrl",value:function initWithUrl(url){var _this6=this;if(this._isInit||this._isInitRecorder){BenzAMRRecorder.throwAlreadyInitialized();}this._playEmpty();var p=new Promise(function(resolve,reject){var xhr=new XMLHttpRequest();xhr.open('GET',url,true);xhr.responseType='arraybuffer';xhr.onload=function(){resolve(this.response);};xhr.onerror=function(){reject(new Error('Failed to fetch '+url));};xhr.send();});return p.then(function(array){return _this6.initWithArrayBuffer(array);});}/** * 初始化录音 * @return {Promise} */},{key:"initWithRecord",value:function initWithRecord(){var _this7=this;if(this._isInit||this._isInitRecorder){BenzAMRRecorder.throwAlreadyInitialized();}this._playEmpty();return new Promise(function(resolve,reject){_this7._recorderControl.initRecorder().then(function(){_this7._isInitRecorder=true;resolve();}).catch(function(e){reject(e);});});}/** * init 之前先播放一个空音频。 * 因为有些环境(如iOS)播放首个音频时禁止自动、异步播放, * 播放空音频防止加载后立即播放的功能失效。 * 但即使如此,init* 仍然须放入一个用户事件中 * @private */},{key:"on",value:function on(action,fn){if(typeof fn==='function'){switch(action){case'play':this._onPlay=fn;break;case'stop':this._onStop=fn;break;case'pause':this._onPause=fn;break;case'resume':this._onResume=fn;break;case'ended':this._onEnded=fn;break;case'autoEnded':this._onAutoEnded=fn;break;case'startRecord':this._onStartRecord=fn;break;case'cancelRecord':this._onCancelRecord=fn;break;case'finishRecord':this._onFinishRecord=fn;break;default:}}}/** * 播放事件 * @param {Function} fn */},{key:"onPlay",value:function onPlay(fn){this.on('play',fn);}/** * 停止事件(包括播放结束) * @param {Function} fn */},{key:"onStop",value:function onStop(fn){this.on('stop',fn);}/** * 暂停事件 * @param {Function} fn */},{key:"onPause",value:function onPause(fn){this.on('pause',fn);}/** * 继续播放事件 * @param {Function} fn */},{key:"onResume",value:function onResume(fn){this.on('resume',fn);}/** * 播放结束事件 * @param {Function} fn */},{key:"onEnded",value:function onEnded(fn){this.on('ended',fn);}/** * 播放完毕自动结束事件 * @param {Function} fn */},{key:"onAutoEnded",value:function onAutoEnded(fn){this.on('autoEnded',fn);}/** * 开始录音事件 * @param {Function} fn */},{key:"onStartRecord",value:function onStartRecord(fn){this.on('startRecord',fn);}/** * 结束录音事件 * @param {Function} fn */},{key:"onFinishRecord",value:function onFinishRecord(fn){this.on('finishRecord',fn);}/** * 放弃录音事件 * @param {Function} fn */},{key:"onCancelRecord",value:function onCancelRecord(fn){this.on('cancelRecord',fn);}/** * 播放(重新开始,无视暂停状态) * @param {number|string?} startTime 可指定开始位置 */},{key:"play",value:function play(startTime){var _startTime=startTime&&startTimethis.getDuration()){this.stop();}else if(this._isPaused){this._pauseTime=_time;}else if(this._isPlaying){this._recorderControl.stopPcmSilently();this._startCtxTime=RecorderControl.getCtxTime()-_time;this._recorderControl.playPcm(this._samples,this._isInitRecorder?RecorderControl.getCtxSampleRate():8000,this._onEndCallback.bind(this),_time);}else{this.play(_time);}}/** * 获取当前播放位置(秒) * @return {Number} 位置,秒,浮点数 */},{key:"getCurrentPosition",value:function getCurrentPosition(){if(this._isPaused){return this._pauseTime;}else if(this._isPlaying){return RecorderControl.getCtxTime()-this._startCtxTime;}return 0;}/** * 是否正在播放 * @return {boolean} */},{key:"isPlaying",value:function isPlaying(){return this._isPlaying;}/** * 是否暂停中 * @return {boolean} */},{key:"isPaused",value:function isPaused(){return this._isPaused;}/** * 开始录音 */},{key:"startRecord",value:function startRecord(){this._recorderControl.startRecord();if(this._onStartRecord){this._onStartRecord();}}/** * 结束录音,并把录制的音频转换成 AMR * @return {Promise} */},{key:"finishRecord",value:function finishRecord(){var _this8=this;return new Promise(function(resolve){_this8._recorderControl.stopRecord();_this8._recorderControl.generateRecordSamples().then(function(samples){_this8._samples=samples;return _this8.encodeAMRAsync(samples,RecorderControl.getCtxSampleRate());}).then(function(rawData){_this8._rawData=rawData;_this8._blob=BenzAMRRecorder.rawAMRData2Blob(_this8._rawData);_this8._isInit=true;if(_this8._onFinishRecord){_this8._onFinishRecord();}_this8._recorderControl.releaseRecord();resolve();});});}/** * 放弃录音 */},{key:"cancelRecord",value:function cancelRecord(){this._recorderControl.stopRecord();this._recorderControl.releaseRecord();if(this._onCancelRecord){this._onCancelRecord();}}/** * 是否正在录音 * @return {boolean} */},{key:"isRecording",value:function isRecording(){return this._recorderControl.isRecording();}/** * 获取音频的时间长度(单位:秒) * @return {Number} */},{key:"getDuration",value:function getDuration(){var rate=this._isInitRecorder?RecorderControl.getCtxSampleRate():8000;return this._samples.length/rate;}},{key:"getBlob",value:function getBlob(){return this._blob;}/* static encodeAMR(samples, sampleRate) { sampleRate = sampleRate || 8000; return AMR.encode(samples, sampleRate, 7); } */},{key:"encodeAMRAsync",value:function encodeAMRAsync(samples,sampleRate){var _this9=this;return new Promise(function(resolve){_this9._runAMRWorker({command:'encode',samples:samples,sampleRate:sampleRate},resolve);});}},{key:"decodeAMRAsync",value:function decodeAMRAsync(u8Array){var _this0=this;return new Promise(function(resolve){_this0._runAMRWorker({command:'decode',buffer:u8Array},resolve);});}}],[{key:"rawAMRData2Blob",value:function rawAMRData2Blob(data){return new Blob([data.buffer],{type:'audio/amr'});}},{key:"throwAlreadyInitialized",value:function throwAlreadyInitialized(){throw new Error('AMR has been initialized. For a new AMR, please generate a new BenzAMRRecorder().');}/** * 判断浏览器是否支持播放 * @return {boolean} */},{key:"isPlaySupported",value:function isPlaySupported(){return RecorderControl.isPlaySupported();}/** * 判断浏览器是否支持录音 * @return {boolean} */},{key:"isRecordSupported",value:function isRecordSupported(){return RecorderControl.isRecordSupported();}}]);}();window.BenzAMRRecorder=BenzAMRRecorder;return BenzAMRRecorder;}); /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__("DuR2"))) /***/ }), /***/ "LHBr": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__style_index_less__ = __webpack_require__("vtiu"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__style_index_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__style_index_less__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__index_less__ = __webpack_require__("JjPw"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__index_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__index_less__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__button_style__ = __webpack_require__("crfj"); // style dependencies /***/ }), /***/ "LK1H": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAADgklEQVRYR+2XWahXZRTFf6sMJDWElHAiyYewVHy4D4mGI0WRSmhkhQOIegnHpBfBAXxQRJxATA3FKaJCrZeCRhQfjJwH8CGcRRBBBVOz65Yl37mcjudv957r8NJ++nO+8317fWvvtfb5KyKeBZYBowD/fhRxDtgALJEU+QSKiM+BiY8ia8mZ9ZLWFgFcA9o9JgBrJdUXATQATz0mAGskffw/gCID/wBPP8kSlAG4BewH3B9VoiPwcsnG0h4oA9BH0pEqmbM9EWG5TS6c0WQAr0o63kIAK4HpVQFcBX5qQQleAPoDNwoe02QGqlz+CvAl8D2wF7gk6U5EtAFeAt4Crkta/bBV4IZdDCyXZOaaFZ4FLZGhh8woSb/ns0bE80BPwLc/C5yU5HLcF7UAfAKYqjv/cZ2G/HSLiGHA/FR/5fbeBnYAqyTtKZbAi60Kido3h85U56+At3PnuDQXgE5A6/Tco3gpMEeSmccMlAGYBXhM12LgphvMB0RE+9R4rwE+ayNgCZ6Q1BARZqIfMBN4LwHZDow2e7UAPIh517KzJHe9AXwBfAB4rL8jaXd6/gzQS9KBnDmNSxfzmllYVAXAZknjU5LBwC/GAQyStCuXzFTPBsZJ2pJ7biaWAzeBblUATJC0KQHYBnwINILKJbInvJ/dtKCSw0Dve2s1euAEsK+GE86XdDIi3LiXgeeAIZJ+LSQxSFM+W5K/ORsjIqZZEcCuMgCngB5Zk9VqhojoAtgHHK0luevzSdYBk4CpRfeLiNedHDhfBuAvwNPwzwd1YkS8AhwDbknKZJYH4Bv6ppMkWVH5tV6Ap+2NWiUwCE/DMhlOlHQ0IjrY79Op3SWdLiTxJLQcB0v6rbA2HPjOFzCAvwHLoqkxRZLptQRdrhfLaE7rlqvN6F8RESuAGcD2KgC2ShqbEiwBPgWOAnX5PoiIAcAi4CNJZzIEaU4YeFvg3SoArN+uki5HRGfAkvLwWS1pai7RSOAzYGj2cZOU84Of2Sk9sKoAcI55khYmFkYA36bEW1M57hvLSTX+e/ZGMiEb194qRuRcZqGvJN/CvTAXWJD+4FwEdgI/Wmbp4/RN23TyDM8Ll+Vr7zWAzJWa2oTZe38k+72eQAwEbD5uylpxCLCTHsxeMIA6YD3QvbkIgJ+BMdlojQg31hjAMrPV2iUtVQ+kbyy97N1GABWSPtQtdwGDJaoPteV1GAAAAABJRU5ErkJggg==" /***/ }), /***/ "LMBH": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAARCAYAAADUryzEAAAAAXNSR0IArs4c6QAAAYlJREFUOE+dk7FrFEEUxn9fskGM3l2QaGEKrbTxD9Be6xQiWgQxveCuip0pTBfQXcHCSiJYREIgvfbaW6WLhSmMktxFT/E298mcp2TXveN0YIqZ981v3nvfjBgypmJPhfBupt1BMg0KHE48M9HlHUIdce5bqg9V2oGAeuwUiPuHslamZGRA7Y6ntc8mcKR/6KvHOb33UJ/KkMoM6rEfAPdL4sVWpoVKQKj3kDhjczZM4AbQa+CBERq5LLER5o+IjfaStlRPvI6ZHebGEAfWA2AbM/0/AOCzaolnMauCiX+BGDqIK70mNm77srusANGIkFxjXGs+0tofFxq3fNXixQiQXGau+Vgvw2UFG+uJ32DOD81CvG2luvBbUwTE3qmwr8zbaWU69hdg8qZPRhGV771MyHNm2k+0VSihkfiizauSeLu/Pn5wX+JSM9XrAqCWeF7mWU9o2og02mcpLPNx7mESxOSvMPN7mZYLgKN3fWKsw3OL97lYLH/f8NwjsyA41f3O9S9P9TEAfgJ0woJ0Oi3O3QAAAABJRU5ErkJggg==" /***/ }), /***/ "LPk8": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _objectSpread2 = _interopRequireDefault(__webpack_require__("+TWC")); var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); var _dva = __webpack_require__("S6G3"); __webpack_require__("PK9/"); var _MouseMovement = _interopRequireDefault(__webpack_require__("06MX")); var _utils = __webpack_require__("oAV5"); var _dec, _class; /** * 录制中倒计时 */ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } // import { initRecordRTC, stopRecord, startRecord, playRecord, downloadRecord } from '../Video/recordRTC'; var _SIZE = ['minimize', 'float', 'magnify']; var RecordMini = exports.default = (_dec = (0, _dva.connect)(function (state) { return { ownCid: state.im.v5Data.ownCid, videoMember: state.command.videoMember }; }), _dec(_class = /*#__PURE__*/function (_Component) { function RecordMini(props) { var _this; (0, _classCallCheck2.default)(this, RecordMini); _this = _callSuper(this, RecordMini, [props]); _this.onChange = function (index) { var onChange = _this.props.onChange; onChange && onChange(index); }; _this.state = { videoSize: 2, // 0:只显示标题; 1:只显示当前发言人视频;2:最大化 videoMember: [], miniLocal: { isDown: false, offsetLeft: 0, offsetTop: 0 } }; _this.timeInterval = null; return _this; } (0, _inherits2.default)(RecordMini, _Component); return (0, _createClass2.default)(RecordMini, [{ key: "componentWillReceiveProps", value: function componentWillReceiveProps(nextProps) { if (nextProps.videoSize != this.state.videoSize) { this.setState({ videoSize: nextProps.videoSize }); } if (JSON.stringify(nextProps.videoMember) != JSON.stringify(this.state.videoMember)) { this.setState({ videoMember: nextProps.videoMember }); } } }, { key: "shouldComponentUpdate", value: function shouldComponentUpdate(nextProps, nextState) { if (JSON.stringify(nextProps.videoMember) != JSON.stringify(this.state.videoMember) || nextProps.videoSize != this.state.videoSize) { return true; } return false; } }, { key: "componentDidMount", value: function componentDidMount() {} }, { key: "render", value: function render() { var _this2 = this; // const { videoSize, videoMember } = this.props; var _this$state = this.state, miniLocal = _this$state.miniLocal, videoMember = _this$state.videoMember, videoSize = _this$state.videoSize; var checkedVideos = videoMember.filter(function (item, index) { return item.checked; }); var checkedVideo = checkedVideos.length > 0 ? checkedVideos[0] : {}; var checkedStream = window.recordStream.trtcStream && window.recordStream.trtcStream.filter(function (item, index) { return item.getId() == checkedVideo.videoId; }); var statusText = checkedVideo.status == "no" ? "正在调度" : "摄像头未打开"; var videoID = !(0, _utils.isEmpty)(checkedVideo.id) ? checkedVideo.id : 'main'; var userName = !(0, _utils.isEmpty)(checkedVideo.id) ? checkedVideo.userName : '我'; var Steam = videoID == 'main' ? window.recordStream.localStream : checkedStream[0]; console.log('Steam', Steam); var hasVideo = Steam && Steam.hasVideo(); var that = this; console.log('checkedVideo', checkedVideo.id); if (videoSize == 1) { setTimeout(function () { that.timeInterval = setInterval(function () { var frame = Steam && Steam.getVideoFrame(); if (frame) { document.querySelector('img#mini-img').src = frame; } console.log('getVideoFrame'); }, 2000); }, 700); } else { if (this.timeInterval) clearInterval(this.timeInterval); } return /*#__PURE__*/_react.default.createElement(_MouseMovement.default, { isDown: miniLocal.isDown, offsetLeft: miniLocal.offsetLeft, offsetTop: miniLocal.offsetTop }, function (_ref) { var x = _ref.x, y = _ref.y, _ref$cursor = _ref.cursor, cursor = _ref$cursor === void 0 ? 'move' : _ref$cursor; return /*#__PURE__*/_react.default.createElement("div", { id: "record-mini-content", className: "record-mini-content", style: { top: y == 0 ? '40%' : y, left: x == 0 ? 'auto' : x, right: x == 0 ? 0 : 'auto' }, onMouseDown: function onMouseDown(e) { _this2.setState({ miniLocal: { isDown: true, offsetLeft: document.getElementsByClassName('record-mini-content')[0].offsetLeft, offsetTop: document.getElementsByClassName('record-mini-content')[0].offsetTop } }); }, onMouseUp: function onMouseUp(e) { _this2.setState({ miniLocal: (0, _objectSpread2.default)({}, miniLocal, { isDown: false }) }); } }, /*#__PURE__*/_react.default.createElement("div", { className: "mini-icon" }, _SIZE.map(function (e, i) { if (i == videoSize) { return /*#__PURE__*/_react.default.createElement("img", { src: __webpack_require__("tiui")("./".concat(e, "-check.png")) }); } return /*#__PURE__*/_react.default.createElement("img", { src: __webpack_require__("IXBG")("./".concat(e, ".png")), onClick: _this2.onChange.bind(_this2, i) }); })), /*#__PURE__*/_react.default.createElement("div", { className: "mini-title", style: { display: videoSize != 2 ? 'flex' : 'none' } }, "\u89C6\u9891\u8C03\u5EA6"), /*#__PURE__*/_react.default.createElement("div", { className: "mini-video", id: "mini_" + videoID, style: { display: videoSize == 1 ? 'block' : 'none' } }, /*#__PURE__*/_react.default.createElement("div", { id: "mini_mask_" + videoID, className: "mask col-div", style: { display: !hasVideo ? 'flex' : 'none' } }, /*#__PURE__*/_react.default.createElement("img", { style: { width: "63px", height: "69px", zIndex: 10 }, src: __webpack_require__("K+uK"), alt: "" }), /*#__PURE__*/_react.default.createElement("div", { style: { height: "10px" } }), /*#__PURE__*/_react.default.createElement("div", { style: { zIndex: 10 } }, statusText)), /*#__PURE__*/_react.default.createElement("img", { id: "mini-img", style: { display: hasVideo ? 'block' : 'none', width: '100%', height: '100px' } }), /*#__PURE__*/_react.default.createElement("div", { className: "video-name" }, hasVideo ? /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("img", { src: __webpack_require__("8ZKn") })) : /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("img", { src: __webpack_require__("acLb") })), userName))); }); } }]); }(_react.Component)) || _class); /***/ }), /***/ "LX8r": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; __webpack_require__("/m1I"); var _tooltip = _interopRequireDefault(__webpack_require__("O6j2")); __webpack_require__("tIHZ"); var _popover = _interopRequireDefault(__webpack_require__("tjvM")); var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); var _IM = _interopRequireDefault(__webpack_require__("iF7L")); var _dva = __webpack_require__("S6G3"); var _echarts = __webpack_require__("XLwt"); __webpack_require__("d4VB"); var _events = _interopRequireDefault(__webpack_require__("TLe5")); var _dec, _class; /** * 切换聊天 */ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } // 引入 EventEmitter' var SwitchChat = exports.default = (_dec = (0, _dva.connect)(function (state) { return { mapStyle: state.command.mapStyle }; }), _dec(_class = /*#__PURE__*/function (_Component) { function SwitchChat(props) { var _this; (0, _classCallCheck2.default)(this, SwitchChat); _this = _callSuper(this, SwitchChat, [props]); _this.handleVisibleChange = function (imStatus) { _this.setState({ imStatus: imStatus }); _this.props.onClick(); }; _this.changeSwitchStatus = function () { _this.setState({ imStatus: !_this.state.imStatus }); }; _this._onClose = function () { var _this$state = _this.state, imStatus = _this$state.imStatus, conversationID = _this$state.conversationID; _this.setState({ imStatus: !imStatus }); }; _this.state = { //im数据 clicked: false, imStatus: false, conversationID: props.conversationID }; return _this; } (0, _inherits2.default)(SwitchChat, _Component); return (0, _createClass2.default)(SwitchChat, [{ key: "componentDidMount", value: function componentDidMount() { var that = this; _events.default.addListener('changeImStatus', function (result) { if (result = "change") { that.setState({ imStatus: !that.state.imStatus }); } else { that.setState({ imStatus: result }); } }); } }, { key: "componentWillReceiveProps", value: function componentWillReceiveProps(nextProps) { console.log('SwitchChat-render', JSON.stringify(nextProps)); if (this.state.imStatus != nextProps.imStatus || this.state.conversationID != nextProps.conversationID) { this.setState({ imStatus: nextProps.imStatus || false, conversationID: nextProps.conversationID }); } } }, { key: "render", value: function render() { console.log('SwitchChat-render'); var mapStyle = this.props.mapStyle; var _this$state2 = this.state, imStatus = _this$state2.imStatus, conversationID = _this$state2.conversationID; var content = /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_IM.default, { visible: imStatus, closeClick: function closeClick() { // this.setState({ imStatus: !imStatus }); }, conversationID: conversationID })); return /*#__PURE__*/_react.default.createElement("div", { className: "switch chat" }, /*#__PURE__*/_react.default.createElement(_tooltip.default, { title: "\u6D88\u606F\u6846" }, /*#__PURE__*/_react.default.createElement("div", { className: "layer-btn", onClick: this.changeSwitchStatus }, /*#__PURE__*/_react.default.createElement(_popover.default, { placement: "bottom", content: content, title: "", trigger: "click", visible: imStatus, onVisibleChange: this.handleVisibleChange, overlayClassName: mapStyle + '-im-popover' }, /*#__PURE__*/_react.default.createElement("img", { className: "layer-img", src: imStatus ? __webpack_require__("qsn8") : mapStyle == 'dark' ? __webpack_require__("0P2q") : __webpack_require__("Skvt") })))), /*#__PURE__*/_react.default.createElement("div", { style: { display: 'none' } }, /*#__PURE__*/_react.default.createElement(_IM.default, { visible: imStatus, closeClick: this._onClose, conversationID: conversationID }))); } }]); }(_react.Component)) || _class); /***/ }), /***/ "Lak1": /***/ (function(module, exports, __webpack_require__) { var map = { "./3d-click.png": "z9Xj", "./aPicture/event-list-click.png": "hwng", "./aPicture/event-module-click.png": "nxuO", "./aPicture/setting-click.png": "CF3O", "./all-click.png": "yKxl", "./area-click.png": "bXbu", "./cancel-click.png": "EgTV", "./chat-click.png": "qsn8", "./circle-click.png": "BDM4", "./down-click.png": "g5CG", "./left-click.png": "Aw/o", "./map1-click.png": "Ap9u", "./polygon-click.png": "LMBH", "./rectangle-click.png": "AgMr", "./right-click.png": "Pfdv", "./style-click.png": "5bNU" }; function webpackContext(req) { return __webpack_require__(webpackContextResolve(req)); }; function webpackContextResolve(req) { var id = map[req]; if(!(id + 1)) // check for number or string throw new Error("Cannot find module '" + req + "'."); return id; }; webpackContext.keys = function webpackContextKeys() { return Object.keys(map); }; webpackContext.resolve = webpackContextResolve; module.exports = webpackContext; webpackContext.id = "Lak1"; /***/ }), /***/ "LhfW": /***/ (function(module, exports) { function _readOnlyError(name) { throw new Error("\"" + name + "\" is read-only"); } module.exports = _readOnlyError; /***/ }), /***/ "Lmu9": /***/ (function(module, exports, __webpack_require__) { "use strict"; function shallowEqualArrays(arrA, arrB) { if (arrA === arrB) { return true; } if (!arrA || !arrB) { return false; } var len = arrA.length; if (arrB.length !== len) { return false; } for (var i = 0; i < len; i++) { if (arrA[i] !== arrB[i]) { return false; } } return true; } module.exports = shallowEqualArrays; /***/ }), /***/ "LpuX": /***/ (function(module, exports, __webpack_require__) { "use strict"; /** @license React v16.13.1 * react-is.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var b="function"===typeof Symbol&&Symbol.for,c=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e=b?Symbol.for("react.fragment"):60107,f=b?Symbol.for("react.strict_mode"):60108,g=b?Symbol.for("react.profiler"):60114,h=b?Symbol.for("react.provider"):60109,k=b?Symbol.for("react.context"):60110,l=b?Symbol.for("react.async_mode"):60111,m=b?Symbol.for("react.concurrent_mode"):60111,n=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b? Symbol.for("react.suspense_list"):60120,r=b?Symbol.for("react.memo"):60115,t=b?Symbol.for("react.lazy"):60116,v=b?Symbol.for("react.block"):60121,w=b?Symbol.for("react.fundamental"):60117,x=b?Symbol.for("react.responder"):60118,y=b?Symbol.for("react.scope"):60119; function z(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d; exports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return"object"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t}; exports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p}; exports.isValidElementType=function(a){return"string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||"object"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z; /***/ }), /***/ "LtD3": /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__.p + "static/beijing-2.9412a963.jpg"; /***/ }), /***/ "LvxY": /***/ (function(module, exports) { module.exports = "data:image/png;base64,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" /***/ }), /***/ "M4IF": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); // EXTERNAL MODULE: ./node_modules/react/index.js var react = __webpack_require__("GiK3"); var react_default = /*#__PURE__*/__webpack_require__.n(react); // EXTERNAL MODULE: ./node_modules/prop-types/index.js var prop_types = __webpack_require__("KSGD"); var prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types); // EXTERNAL MODULE: ./node_modules/rc-animate/es/Animate.js + 4 modules var Animate = __webpack_require__("8aSS"); // EXTERNAL MODULE: ./node_modules/omit.js/es/index.js var es = __webpack_require__("JkBm"); // EXTERNAL MODULE: ./node_modules/antd/node_modules/classnames/index.js var classnames = __webpack_require__("kTQ8"); var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); // EXTERNAL MODULE: ./node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js var react_lifecycles_compat_es = __webpack_require__("R8mX"); // EXTERNAL MODULE: ./node_modules/antd/es/config-provider/index.js + 1 modules var config_provider = __webpack_require__("PmSq"); // CONCATENATED MODULE: ./node_modules/antd/es/badge/ScrollNumber.js function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _extends() { _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; }; return _extends.apply(this, arguments); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function getNumberArray(num) { return num ? num.toString().split('').reverse().map(function (i) { var current = Number(i); return isNaN(current) ? i : current; }) : []; } function renderNumberList(position, className) { var childrenToReturn = []; for (var i = 0; i < 30; i++) { childrenToReturn.push( /*#__PURE__*/react["createElement"]("p", { key: i.toString(), className: classnames_default()(className, { current: position === i }) }, i % 10)); } return childrenToReturn; } var ScrollNumber_ScrollNumber = /*#__PURE__*/function (_React$Component) { _inherits(ScrollNumber, _React$Component); var _super = _createSuper(ScrollNumber); function ScrollNumber(props) { var _this; _classCallCheck(this, ScrollNumber); _this = _super.call(this, props); _this.onAnimated = function () { var onAnimated = _this.props.onAnimated; if (onAnimated) { onAnimated(); } }; _this.renderScrollNumber = function (_ref) { var getPrefixCls = _ref.getPrefixCls; var _this$props = _this.props, customizePrefixCls = _this$props.prefixCls, className = _this$props.className, style = _this$props.style, title = _this$props.title, _this$props$component = _this$props.component, component = _this$props$component === void 0 ? 'sup' : _this$props$component, displayComponent = _this$props.displayComponent; // fix https://fb.me/react-unknown-prop var restProps = Object(es["a" /* default */])(_this.props, ['count', 'onAnimated', 'component', 'prefixCls', 'displayComponent']); var prefixCls = getPrefixCls('scroll-number', customizePrefixCls); var newProps = _extends(_extends({}, restProps), { className: classnames_default()(prefixCls, className), title: title }); // allow specify the border // mock border-color by box-shadow for compatible with old usage: // if (style && style.borderColor) { newProps.style = _extends(_extends({}, style), { boxShadow: "0 0 0 1px ".concat(style.borderColor, " inset") }); } if (displayComponent) { return /*#__PURE__*/react["cloneElement"](displayComponent, { className: classnames_default()("".concat(prefixCls, "-custom-component"), displayComponent.props && displayComponent.props.className) }); } return /*#__PURE__*/react["createElement"](component, newProps, _this.renderNumberElement(prefixCls)); }; _this.state = { animateStarted: true, count: props.count }; return _this; } _createClass(ScrollNumber, [{ key: "componentDidUpdate", value: function componentDidUpdate(_, prevState) { var _this2 = this; this.lastCount = prevState.count; var animateStarted = this.state.animateStarted; if (animateStarted) { this.clearTimeout(); // Let browser has time to reset the scroller before actually // performing the transition. this.timeout = setTimeout(function () { // eslint-disable-next-line react/no-did-update-set-state _this2.setState(function (__, props) { return { animateStarted: false, count: props.count }; }, _this2.onAnimated); }); } } }, { key: "componentWillUnmount", value: function componentWillUnmount() { this.clearTimeout(); } }, { key: "getPositionByNum", value: function getPositionByNum(num, i) { var count = this.state.count; var currentCount = Math.abs(Number(count)); var lastCount = Math.abs(Number(this.lastCount)); var currentDigit = Math.abs(getNumberArray(this.state.count)[i]); var lastDigit = Math.abs(getNumberArray(this.lastCount)[i]); if (this.state.animateStarted) { return 10 + num; } // 同方向则在同一侧切换数字 if (currentCount > lastCount) { if (currentDigit >= lastDigit) { return 10 + num; } return 20 + num; } if (currentDigit <= lastDigit) { return 10 + num; } return num; } }, { key: "renderCurrentNumber", value: function renderCurrentNumber(prefixCls, num, i) { if (typeof num === 'number') { var position = this.getPositionByNum(num, i); var removeTransition = this.state.animateStarted || getNumberArray(this.lastCount)[i] === undefined; return /*#__PURE__*/react["createElement"]('span', { className: "".concat(prefixCls, "-only"), style: { transition: removeTransition ? 'none' : undefined, msTransform: "translateY(".concat(-position * 100, "%)"), WebkitTransform: "translateY(".concat(-position * 100, "%)"), transform: "translateY(".concat(-position * 100, "%)") }, key: i }, renderNumberList(position, "".concat(prefixCls, "-only-unit"))); } return /*#__PURE__*/react["createElement"]("span", { key: "symbol", className: "".concat(prefixCls, "-symbol") }, num); } }, { key: "renderNumberElement", value: function renderNumberElement(prefixCls) { var _this3 = this; var count = this.state.count; if (count && Number(count) % 1 === 0) { return getNumberArray(count).map(function (num, i) { return _this3.renderCurrentNumber(prefixCls, num, i); }).reverse(); } return count; } }, { key: "render", value: function render() { return /*#__PURE__*/react["createElement"](config_provider["ConfigConsumer"], null, this.renderScrollNumber); } }, { key: "clearTimeout", value: function (_clearTimeout) { function clearTimeout() { return _clearTimeout.apply(this, arguments); } clearTimeout.toString = function () { return _clearTimeout.toString(); }; return clearTimeout; }(function () { if (this.timeout) { clearTimeout(this.timeout); this.timeout = undefined; } }) }], [{ key: "getDerivedStateFromProps", value: function getDerivedStateFromProps(nextProps, nextState) { if ('count' in nextProps) { if (nextState.count === nextProps.count) { return null; } return { animateStarted: true }; } return null; } }]); return ScrollNumber; }(react["Component"]); ScrollNumber_ScrollNumber.defaultProps = { count: null, onAnimated: function onAnimated() {} }; Object(react_lifecycles_compat_es["polyfill"])(ScrollNumber_ScrollNumber); /* harmony default export */ var badge_ScrollNumber = (ScrollNumber_ScrollNumber); // EXTERNAL MODULE: ./node_modules/antd/es/_util/colors.js var colors = __webpack_require__("IUGU"); // CONCATENATED MODULE: ./node_modules/antd/es/badge/index.js /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return badge_Badge; }); function badge__typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { badge__typeof = function _typeof(obj) { return typeof obj; }; } else { badge__typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return badge__typeof(obj); } function badge__extends() { badge__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; }; return badge__extends.apply(this, arguments); } 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; } function badge__classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function badge__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); } } function badge__createClass(Constructor, protoProps, staticProps) { if (protoProps) badge__defineProperties(Constructor.prototype, protoProps); if (staticProps) badge__defineProperties(Constructor, staticProps); return Constructor; } function badge__inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) badge__setPrototypeOf(subClass, superClass); } function badge__setPrototypeOf(o, p) { badge__setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return badge__setPrototypeOf(o, p); } function badge__createSuper(Derived) { var hasNativeReflectConstruct = badge__isNativeReflectConstruct(); return function _createSuperInternal() { var Super = badge__getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = badge__getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return badge__possibleConstructorReturn(this, result); }; } function badge__possibleConstructorReturn(self, call) { if (call && (badge__typeof(call) === "object" || typeof call === "function")) { return call; } return badge__assertThisInitialized(self); } function badge__assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function badge__isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } function badge__getPrototypeOf(o) { badge__getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return badge__getPrototypeOf(o); } var __rest = this && this.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; function isPresetColor(color) { return colors["a" /* PresetColorTypes */].indexOf(color) !== -1; } var badge_Badge = /*#__PURE__*/function (_React$Component) { badge__inherits(Badge, _React$Component); var _super = badge__createSuper(Badge); function Badge() { var _this; badge__classCallCheck(this, Badge); _this = _super.apply(this, arguments); _this.renderBadge = function (_ref) { var _classNames; var getPrefixCls = _ref.getPrefixCls; var _a = _this.props, customizePrefixCls = _a.prefixCls, customizeScrollNumberPrefixCls = _a.scrollNumberPrefixCls, children = _a.children, status = _a.status, text = _a.text, color = _a.color, restProps = __rest(_a, ["prefixCls", "scrollNumberPrefixCls", "children", "status", "text", "color"]); var omitArr = ['count', 'showZero', 'overflowCount', 'className', 'style', 'dot', 'offset', 'title']; var prefixCls = getPrefixCls('badge', customizePrefixCls); var scrollNumberPrefixCls = getPrefixCls('scroll-number', customizeScrollNumberPrefixCls); var scrollNumber = _this.renderBadgeNumber(prefixCls, scrollNumberPrefixCls); var statusText = _this.renderStatusText(prefixCls); var statusCls = classnames_default()((_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-status-dot"), _this.hasStatus()), _defineProperty(_classNames, "".concat(prefixCls, "-status-").concat(status), !!status), _defineProperty(_classNames, "".concat(prefixCls, "-status-").concat(color), isPresetColor(color)), _classNames)); var statusStyle = {}; if (color && !isPresetColor(color)) { statusStyle.background = color; } // if (!children && _this.hasStatus()) { var styleWithOffset = _this.getStyleWithOffset(); var statusTextColor = styleWithOffset && styleWithOffset.color; return /*#__PURE__*/react["createElement"]("span", badge__extends({}, Object(es["a" /* default */])(restProps, omitArr), { className: _this.getBadgeClassName(prefixCls), style: styleWithOffset }), /*#__PURE__*/react["createElement"]("span", { className: statusCls, style: statusStyle }), /*#__PURE__*/react["createElement"]("span", { style: { color: statusTextColor }, className: "".concat(prefixCls, "-status-text") }, text)); } return /*#__PURE__*/react["createElement"]("span", badge__extends({}, Object(es["a" /* default */])(restProps, omitArr), { className: _this.getBadgeClassName(prefixCls) }), children, /*#__PURE__*/react["createElement"](Animate["a" /* default */], { component: "", showProp: "data-show", transitionName: children ? "".concat(prefixCls, "-zoom") : '', transitionAppear: true }, scrollNumber), statusText); }; return _this; } badge__createClass(Badge, [{ key: "getNumberedDispayCount", value: function getNumberedDispayCount() { var _this$props = this.props, count = _this$props.count, overflowCount = _this$props.overflowCount; var displayCount = count > overflowCount ? "".concat(overflowCount, "+") : count; return displayCount; } }, { key: "getDispayCount", value: function getDispayCount() { var isDot = this.isDot(); // dot mode don't need count if (isDot) { return ''; } return this.getNumberedDispayCount(); } }, { key: "getScrollNumberTitle", value: function getScrollNumberTitle() { var _this$props2 = this.props, title = _this$props2.title, count = _this$props2.count; if (title) { return title; } return typeof count === 'string' || typeof count === 'number' ? count : undefined; } }, { key: "getStyleWithOffset", value: function getStyleWithOffset() { var _this$props3 = this.props, offset = _this$props3.offset, style = _this$props3.style; return offset ? badge__extends({ right: -parseInt(offset[0], 10), marginTop: offset[1] }, style) : style; } }, { key: "getBadgeClassName", value: function getBadgeClassName(prefixCls) { var _classNames2; var _this$props4 = this.props, className = _this$props4.className, children = _this$props4.children; return classnames_default()(className, prefixCls, (_classNames2 = {}, _defineProperty(_classNames2, "".concat(prefixCls, "-status"), this.hasStatus()), _defineProperty(_classNames2, "".concat(prefixCls, "-not-a-wrapper"), !children), _classNames2)); } }, { key: "hasStatus", value: function hasStatus() { var _this$props5 = this.props, status = _this$props5.status, color = _this$props5.color; return !!status || !!color; } }, { key: "isZero", value: function isZero() { var numberedDispayCount = this.getNumberedDispayCount(); return numberedDispayCount === '0' || numberedDispayCount === 0; } }, { key: "isDot", value: function isDot() { var dot = this.props.dot; var isZero = this.isZero(); return dot && !isZero || this.hasStatus(); } }, { key: "isHidden", value: function isHidden() { var showZero = this.props.showZero; var displayCount = this.getDispayCount(); var isZero = this.isZero(); var isDot = this.isDot(); var isEmpty = displayCount === null || displayCount === undefined || displayCount === ''; return (isEmpty || isZero && !showZero) && !isDot; } }, { key: "renderStatusText", value: function renderStatusText(prefixCls) { var text = this.props.text; var hidden = this.isHidden(); return hidden || !text ? null : /*#__PURE__*/react["createElement"]("span", { className: "".concat(prefixCls, "-status-text") }, text); } }, { key: "renderDispayComponent", value: function renderDispayComponent() { var count = this.props.count; var customNode = count; if (!customNode || badge__typeof(customNode) !== 'object') { return undefined; } return /*#__PURE__*/react["cloneElement"](customNode, { style: badge__extends(badge__extends({}, this.getStyleWithOffset()), customNode.props && customNode.props.style) }); } }, { key: "renderBadgeNumber", value: function renderBadgeNumber(prefixCls, scrollNumberPrefixCls) { var _classNames3; var _this$props6 = this.props, status = _this$props6.status, count = _this$props6.count, color = _this$props6.color; var displayCount = this.getDispayCount(); var isDot = this.isDot(); var hidden = this.isHidden(); var scrollNumberCls = classnames_default()((_classNames3 = {}, _defineProperty(_classNames3, "".concat(prefixCls, "-dot"), isDot), _defineProperty(_classNames3, "".concat(prefixCls, "-count"), !isDot), _defineProperty(_classNames3, "".concat(prefixCls, "-multiple-words"), !isDot && count && count.toString && count.toString().length > 1), _defineProperty(_classNames3, "".concat(prefixCls, "-status-").concat(status), !!status), _defineProperty(_classNames3, "".concat(prefixCls, "-status-").concat(color), isPresetColor(color)), _classNames3)); var statusStyle = this.getStyleWithOffset(); if (color && !isPresetColor(color)) { statusStyle = statusStyle || {}; statusStyle.background = color; } return hidden ? null : /*#__PURE__*/react["createElement"](badge_ScrollNumber, { prefixCls: scrollNumberPrefixCls, "data-show": !hidden, className: scrollNumberCls, count: displayCount, displayComponent: this.renderDispayComponent() // }> , title: this.getScrollNumberTitle(), style: statusStyle, key: "scrollNumber" }); } }, { key: "render", value: function render() { return /*#__PURE__*/react["createElement"](config_provider["ConfigConsumer"], null, this.renderBadge); } }]); return Badge; }(react["Component"]); badge_Badge.defaultProps = { count: null, showZero: false, dot: false, overflowCount: 99 }; badge_Badge.propTypes = { count: prop_types["node"], showZero: prop_types["bool"], dot: prop_types["bool"], overflowCount: prop_types["number"] }; /***/ }), /***/ "MIZS": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAhCAYAAADdy1suAAAAAXNSR0IArs4c6QAABOZJREFUSEuNlmtsFFUUx3/nznZ3dttuKY9KSOgLiDEgsaAf1OgXBRQBARM+CB+MltDEV6I8hFjctCiCNkqIggESH/GDihJC5FErNCRAqgSJUROhIGAQw6Olhe12d2fmmpl92O12S8+nmf+593//c86554xQwPRGyvssnkUzC6jTUAEkgX+ADi3sK6lgr6zwsDyTwYiOEOpTrAVe0xAqdHAav2wo1gbf5IvB63KI+zcy2UqwB2HaHQhz3AK7Q0Gek1VEM44s8c1mJvk0R4EJWWfFvRTdV49R+zhSVglao3suYp07hPXLDvSNPwce0N7dzdyJHxBzQY9YRzCjipPAVG+lEcA/Zwu+GcsRUUOK146F9dNWEj+uBsdKrRF2lTRSnyWONvG2hnUpUhNzWStG5SMjiobVeZD4V/Oz5D5hltlIm/S+wxjD4oKGEpfJP28nRXUvjIg0syh5ooVE28q0aE4Ur+chiTbRoGGbi6rxMzDrf875fKfnErGPJoOdrioxCL16CSnNpgJtJ4ltn4ruOuuROw73yO0m9gHzPLVzt1M0c0WOWuuPb4h/uySL+WY2EJjr6cixxLFNJA+/4WEKXpdoMxe0psoFgi+dQ5XX5m44vJbksXdTnxmeSLDhNyQQziO2r5yif+fMFK75zFXc53K6KQ2t60cMf86m/i9nY5//IYUFypDQGAILPs1LrtN3nVjLuEyc97vEbt2ZhYj73h+Ljt3IHibltQQbfkd8Zo4Ap+8asRb31nt2QG410SkwyQvFi52o0d5j1pInP8a53IH16+ceZi75DuPuRcOGQmCnS7xb4Bl3pf/JbRTd35C3KXnqExLfN2DUPIa5rC3P7wIDk6fhZbfcntewy3Wq8XWY9SfzblviyDqSxzcTXH4aVZHfRlLlNg3ddcZLnU+YInolxdEwfwPlnuqndlA0w7uVWYvvWYoER+N/YuvQak+0kExfEKC1ZD1zvF5xu5lVaDZ7u4wA5tJWjKpHsyRuVagJDyDmqDxi6+wB4l8v8K60CLZoHg6tpyPThHx9iqMaHsyQ+2d/mGpCyhhSpdeEOraQcC9Fugkp4b1QI6vdDdm2eStChVIc1+kK8ZzjplFUl26bYbdtOjg9F7Hdtnl6V07b1LC3xGGxRHByiN2X2FtU2gbtQM2QMguD+69cY/GUrcQzS/JGU/cGqvwOR/QIyQUOhEaxSF75nzRPcea02AaqHId2DdXDKRfhYKiMhYNJCxJ7YYlQbSsvLF6DGmwCh0IOCyVCfwF/YU2xZmpsh3aEyoGrRGgN2TxdiHRYxRmi/gi1tvJiniFv6+5mQWZoFpKVl7yhFqYn+BHgTHE38yU9iYeN/0jLKraRajPOVYl4/fuONqRiHUERZlR/lDJLE1Lgx8FAobWDrQ3iPouoGaJb1nBrRMnTmyiNxqgRm4BWlCtFqdubxBtl3j+LraFfCT2O0Gs7REvhvERI5CR44IurNArTRWE4DlU+cUeWR3aXKEyl0Rb0Krjp4jZcF+G6IfSajaRGdNpyQqE17nCdLuDDYaISitOlM1aEoK3RCno19Kbxq7bQZTn0lEXoLEjsOv5dSXFxmGrlEFRCmaMpFfA77mHiEVtuKByDHuUQtYTesM1fEiH9n5WiL1huXWsoM0sJK03IsgmkfhegyCU2iNs20RDcLFQl/wFQIs6zlVW3RQAAAABJRU5ErkJggg==" /***/ }), /***/ "MIrP": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__style_index_less__ = __webpack_require__("vtiu"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__style_index_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__style_index_less__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__index_less__ = __webpack_require__("s/bD"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__index_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__index_less__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__tooltip_style__ = __webpack_require__("/m1I"); // style dependencies /***/ }), /***/ "MKdg": /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _rule = __webpack_require__("hGxU"); var _rule2 = _interopRequireDefault(_rule); var _util = __webpack_require__("eCjd"); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } /** * Validates an array. * * @param rule The validation rule. * @param value The value of the field on the source object. * @param callback The callback function. * @param source The source object being validated. * @param options The validation options. * @param options.messages The validation messages. */ function array(rule, value, callback, source, options) { var errors = []; var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate) { if ((0, _util.isEmptyValue)(value, 'array') && !rule.required) { return callback(); } _rule2['default'].required(rule, value, source, errors, options, 'array'); if (!(0, _util.isEmptyValue)(value, 'array')) { _rule2['default'].type(rule, value, source, errors, options); _rule2['default'].range(rule, value, source, errors, options); } } callback(errors); } exports['default'] = array; /***/ }), /***/ "MRHW": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAAAXNSR0IArs4c6QAAA+NJREFUWEe9mF3o3mMYxz9fCYmEnQzLpNWUiAMzK4bChj/LATZvzWyJdjKx4pBCnMiSecnrZgfyEoYyJjZzQKSsJJPMiZdEYsmlL9f9dO+35/k/v2fP//+76jl47vt339fnd73d1/0TY0pE3AOsBh6SdOeY26FxN4iIv4CDgD2SDh53v1ZAETEf+EPSZ02FERFlTFLf/SLiVOBQSduHAU8KFBFHA+uAK4G/gUskvVVvOgwoIi4AXgcOBDYBt0j6aRDYQKCIOC03mlktvkHS0yMCXQ88Va3ZnS/2aT+oQSY+H3gZOKxa9CSwQlLPRZ5rYSHreBxYXu31O3C5pHeaUPsApWXer2ActKslre/3RsOAypqIWOlMBErgG+psSXtZai+giJgBfA4UN32Xb/LJIJ+3BUprnp6Wn5X7/QCcIunHXmI04uGFDGAP/wkskDQQpo3L+mSloT4EDsm5TZKu2gcos6HOoJWSHhuWpqNYqHLfTUAdAhdKetvzPZdFxDbA9cbynKRrh8Hsj4UqqGeBa/L/dkln9YAiYgHwQU46i+ZI+nqagU4EvqqM4vDY9p+FIuJhF6wE2CxpcRuYXLvfR0dEvAEsSl3rJN1agL4HjskJV2NX1lYyzuEaERcDr6Wi3ZKOVUQcBzi9Lb8CR0n6pxXNmA9FxAHAz8ARudUsA10KvJoDWyS5SncmEbEFODcVThjIFfTRHFgvaVVnNP/Hr3WbwbLKQHcA9+bAfZLWdgxk3WawrDXQGuCBHHhQ0m0dA1m3GSxrDHQ1sCEHNkpa2jGQdZvBstRA5wDv5cBWSQs7BrJuM1gWGuh4YFcO/AbMkLSnC6iIcC/uk/7w1De7FMYvgbk5uEjSmx0BXQRsTl07JZ1UgOpIf0LSio6A3EneWGd4AZoHfJQTdtdcSd9MJ1REnADszCuUVZ0paUfdftTBtUHSsmkGet5Z1UymGugMYEc+4BbETXg5UqaULSImspUt+udJ+thKmj113cK6CZ8v6YuppImIkwFfGMuNpn8La6URcWRaaU5CuAtYPFVQCeMeqDT5btBsnV/KS/e7Bjn9HeClJbCllo3rvnST46ZYxq2OA9mB3ZNBF0W3Ay9VUI6pjcBdo2ZfZtPdeTwUfYZZIundZjhMdpW2pRzUxX1e65LwDPAi4N6pb0XPCnwecAVwXZXa3sNummhaZqDLauKMqUequ1o97WPGdzbf1f2zuA32z3evchzUa/yx4eY6ZlpbqAHmknB/dQiOmnhbgdtLak+2uNX3obJBRLiiLwEuq86+Qfs7WF9xLLoCt32DkYAaVnOXMLtyk6eL+3ZJ+rYtRP3cv6M1mouz2UyAAAAAAElFTkSuQmCC" /***/ }), /***/ "MtKN": /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.fillRef = fillRef; exports.composeRef = composeRef; exports.supportRef = supportRef; function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function fillRef(ref, node) { if (typeof ref === 'function') { ref(node); } else if (_typeof(ref) === 'object' && ref && 'current' in ref) { ref.current = node; } } /** * Merge refs into one ref function to support ref passing. */ function composeRef() { for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) { refs[_key] = arguments[_key]; } return function (node) { refs.forEach(function (ref) { fillRef(ref, node); }); }; } function supportRef(nodeOrComponent) { // Function component node if (nodeOrComponent.type && nodeOrComponent.type.prototype && !nodeOrComponent.type.prototype.render) { return false; } // Class component if (typeof nodeOrComponent === 'function' && nodeOrComponent.prototype && !nodeOrComponent.prototype.render) { return false; } return true; } /* eslint-enable */ /***/ }), /***/ "N0tX": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); // EXTERNAL MODULE: ./node_modules/react/index.js var react = __webpack_require__("GiK3"); var react_default = /*#__PURE__*/__webpack_require__.n(react); // EXTERNAL MODULE: ./node_modules/rc-tree/es/index.js + 1 modules var es = __webpack_require__("F022"); // EXTERNAL MODULE: ./node_modules/antd/node_modules/classnames/index.js var classnames = __webpack_require__("kTQ8"); var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); // EXTERNAL MODULE: ./node_modules/omit.js/es/index.js var omit_js_es = __webpack_require__("JkBm"); // EXTERNAL MODULE: ./node_modules/lodash/debounce.js var debounce = __webpack_require__("O4Lo"); var debounce_default = /*#__PURE__*/__webpack_require__.n(debounce); // EXTERNAL MODULE: ./node_modules/rc-tree/es/util.js var util = __webpack_require__("z//q"); // EXTERNAL MODULE: ./node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js var react_lifecycles_compat_es = __webpack_require__("R8mX"); // EXTERNAL MODULE: ./node_modules/antd/es/config-provider/index.js + 1 modules var config_provider = __webpack_require__("PmSq"); // CONCATENATED MODULE: ./node_modules/antd/es/tree/util.js function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); } function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } var Record; (function (Record) { Record[Record["None"] = 0] = "None"; Record[Record["Start"] = 1] = "Start"; Record[Record["End"] = 2] = "End"; })(Record || (Record = {})); // TODO: Move this logic into `rc-tree` function traverseNodesKey(rootChildren, callback) { var nodeList = Object(util["k" /* getNodeChildren */])(rootChildren) || []; function processNode(node) { var key = node.key, children = node.props.children; if (callback(key, node) !== false) { traverseNodesKey(children, callback); } } nodeList.forEach(processNode); } function getFullKeyList(children) { var _convertTreeToEntitie = Object(util["h" /* convertTreeToEntities */])(children), keyEntities = _convertTreeToEntitie.keyEntities; return Object.keys(keyEntities); } /** 计算选中范围,只考虑expanded情况以优化性能 */ function calcRangeKeys(rootChildren, expandedKeys, startKey, endKey) { var keys = []; var record = Record.None; if (startKey && startKey === endKey) { return [startKey]; } if (!startKey || !endKey) { return []; } function matchKey(key) { return key === startKey || key === endKey; } traverseNodesKey(rootChildren, function (key) { if (record === Record.End) { return false; } if (matchKey(key)) { // Match test keys.push(key); if (record === Record.None) { record = Record.Start; } else if (record === Record.Start) { record = Record.End; return false; } } else if (record === Record.Start) { // Append selection keys.push(key); } if (expandedKeys.indexOf(key) === -1) { return false; } return true; }); return keys; } function convertDirectoryKeysToNodes(rootChildren, keys) { var restKeys = _toConsumableArray(keys); var nodes = []; traverseNodesKey(rootChildren, function (key, node) { var index = restKeys.indexOf(key); if (index !== -1) { nodes.push(node); restKeys.splice(index, 1); } return !!restKeys.length; }); return nodes; } function getFullKeyListByTreeData(treeData) { var keys = []; (treeData || []).forEach(function (item) { keys.push(item.key); if (item.children) { keys = [].concat(_toConsumableArray(keys), _toConsumableArray(getFullKeyListByTreeData(item.children))); } }); return keys; } // EXTERNAL MODULE: ./node_modules/antd/es/icon/index.js + 5 modules var icon = __webpack_require__("FC3+"); // CONCATENATED MODULE: ./node_modules/antd/es/tree/DirectoryTree.js function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function DirectoryTree__toConsumableArray(arr) { return DirectoryTree__arrayWithoutHoles(arr) || DirectoryTree__iterableToArray(arr) || DirectoryTree__unsupportedIterableToArray(arr) || DirectoryTree__nonIterableSpread(); } function DirectoryTree__nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function DirectoryTree__unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return DirectoryTree__arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return DirectoryTree__arrayLikeToArray(o, minLen); } function DirectoryTree__iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); } function DirectoryTree__arrayWithoutHoles(arr) { if (Array.isArray(arr)) return DirectoryTree__arrayLikeToArray(arr); } function DirectoryTree__arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } function _extends() { _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; }; return _extends.apply(this, arguments); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } var __rest = this && this.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; function getIcon(props) { var isLeaf = props.isLeaf, expanded = props.expanded; if (isLeaf) { return /*#__PURE__*/react["createElement"](icon["default"], { type: "file" }); } return /*#__PURE__*/react["createElement"](icon["default"], { type: expanded ? 'folder-open' : 'folder' }); } var DirectoryTree_DirectoryTree = /*#__PURE__*/function (_React$Component) { _inherits(DirectoryTree, _React$Component); var _super = _createSuper(DirectoryTree); function DirectoryTree(props) { var _this; _classCallCheck(this, DirectoryTree); _this = _super.call(this, props); _this.onExpand = function (expandedKeys, info) { var onExpand = _this.props.onExpand; _this.setUncontrolledState({ expandedKeys: expandedKeys }); // Call origin function if (onExpand) { return onExpand(expandedKeys, info); } return undefined; }; _this.onClick = function (event, node) { var _this$props = _this.props, onClick = _this$props.onClick, expandAction = _this$props.expandAction; // Expand the tree if (expandAction === 'click') { _this.onDebounceExpand(event, node); } if (onClick) { onClick(event, node); } }; _this.onDoubleClick = function (event, node) { var _this$props2 = _this.props, onDoubleClick = _this$props2.onDoubleClick, expandAction = _this$props2.expandAction; // Expand the tree if (expandAction === 'doubleClick') { _this.onDebounceExpand(event, node); } if (onDoubleClick) { onDoubleClick(event, node); } }; _this.onSelect = function (keys, event) { var _this$props3 = _this.props, onSelect = _this$props3.onSelect, multiple = _this$props3.multiple, children = _this$props3.children; var _this$state$expandedK = _this.state.expandedKeys, expandedKeys = _this$state$expandedK === void 0 ? [] : _this$state$expandedK; var node = event.node, nativeEvent = event.nativeEvent; var _node$props$eventKey = node.props.eventKey, eventKey = _node$props$eventKey === void 0 ? '' : _node$props$eventKey; var newState = {}; // We need wrap this event since some value is not same var newEvent = _extends(_extends({}, event), { selected: true }); // Windows / Mac single pick var ctrlPick = nativeEvent.ctrlKey || nativeEvent.metaKey; var shiftPick = nativeEvent.shiftKey; // Generate new selected keys var newSelectedKeys; if (multiple && ctrlPick) { // Control click newSelectedKeys = keys; _this.lastSelectedKey = eventKey; _this.cachedSelectedKeys = newSelectedKeys; newEvent.selectedNodes = convertDirectoryKeysToNodes(children, newSelectedKeys); } else if (multiple && shiftPick) { // Shift click newSelectedKeys = Array.from(new Set([].concat(DirectoryTree__toConsumableArray(_this.cachedSelectedKeys || []), DirectoryTree__toConsumableArray(calcRangeKeys(children, expandedKeys, eventKey, _this.lastSelectedKey))))); newEvent.selectedNodes = convertDirectoryKeysToNodes(children, newSelectedKeys); } else { // Single click newSelectedKeys = [eventKey]; _this.lastSelectedKey = eventKey; _this.cachedSelectedKeys = newSelectedKeys; newEvent.selectedNodes = [event.node]; } newState.selectedKeys = newSelectedKeys; if (onSelect) { onSelect(newSelectedKeys, newEvent); } _this.setUncontrolledState(newState); }; _this.setTreeRef = function (node) { _this.tree = node; }; _this.expandFolderNode = function (event, node) { var isLeaf = node.props.isLeaf; if (isLeaf || event.shiftKey || event.metaKey || event.ctrlKey) { return; } // Get internal rc-tree var internalTree = _this.tree.tree; // Call internal rc-tree expand function // https://github.com/ant-design/ant-design/issues/12567 internalTree.onNodeExpand(event, node); }; _this.setUncontrolledState = function (state) { var newState = Object(omit_js_es["a" /* default */])(state, Object.keys(_this.props)); if (Object.keys(newState).length) { _this.setState(newState); } }; _this.renderDirectoryTree = function (_ref) { var getPrefixCls = _ref.getPrefixCls; var _a = _this.props, customizePrefixCls = _a.prefixCls, className = _a.className, props = __rest(_a, ["prefixCls", "className"]); var _this$state = _this.state, expandedKeys = _this$state.expandedKeys, selectedKeys = _this$state.selectedKeys; var prefixCls = getPrefixCls('tree', customizePrefixCls); var connectClassName = classnames_default()("".concat(prefixCls, "-directory"), className); return /*#__PURE__*/react["createElement"](Tree_Tree, _extends({ icon: getIcon, ref: _this.setTreeRef }, props, { prefixCls: prefixCls, className: connectClassName, expandedKeys: expandedKeys, selectedKeys: selectedKeys, onSelect: _this.onSelect, onClick: _this.onClick, onDoubleClick: _this.onDoubleClick, onExpand: _this.onExpand })); }; var defaultExpandAll = props.defaultExpandAll, defaultExpandParent = props.defaultExpandParent, expandedKeys = props.expandedKeys, defaultExpandedKeys = props.defaultExpandedKeys, children = props.children; var _convertTreeToEntitie = Object(util["h" /* convertTreeToEntities */])(children), keyEntities = _convertTreeToEntitie.keyEntities; // Selected keys _this.state = { selectedKeys: props.selectedKeys || props.defaultSelectedKeys || [] }; // Expanded keys if (defaultExpandAll) { if (props.treeData) { _this.state.expandedKeys = getFullKeyListByTreeData(props.treeData); } else { _this.state.expandedKeys = getFullKeyList(props.children); } } else if (defaultExpandParent) { _this.state.expandedKeys = Object(util["f" /* conductExpandParent */])(expandedKeys || defaultExpandedKeys, keyEntities); } else { _this.state.expandedKeys = expandedKeys || defaultExpandedKeys; } _this.onDebounceExpand = debounce_default()(_this.expandFolderNode, 200, { leading: true }); return _this; } _createClass(DirectoryTree, [{ key: "render", value: function render() { return /*#__PURE__*/react["createElement"](config_provider["ConfigConsumer"], null, this.renderDirectoryTree); } }], [{ key: "getDerivedStateFromProps", value: function getDerivedStateFromProps(nextProps) { var newState = {}; if ('expandedKeys' in nextProps) { newState.expandedKeys = nextProps.expandedKeys; } if ('selectedKeys' in nextProps) { newState.selectedKeys = nextProps.selectedKeys; } return newState; } }]); return DirectoryTree; }(react["Component"]); DirectoryTree_DirectoryTree.defaultProps = { showIcon: true, expandAction: 'click' }; Object(react_lifecycles_compat_es["polyfill"])(DirectoryTree_DirectoryTree); /* harmony default export */ var tree_DirectoryTree = (DirectoryTree_DirectoryTree); // EXTERNAL MODULE: ./node_modules/antd/es/_util/motion.js var motion = __webpack_require__("JUD+"); // CONCATENATED MODULE: ./node_modules/antd/es/tree/Tree.js function Tree__typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { Tree__typeof = function _typeof(obj) { return typeof obj; }; } else { Tree__typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return Tree__typeof(obj); } function Tree__extends() { Tree__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; }; return Tree__extends.apply(this, arguments); } 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; } function Tree__classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function Tree__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); } } function Tree__createClass(Constructor, protoProps, staticProps) { if (protoProps) Tree__defineProperties(Constructor.prototype, protoProps); if (staticProps) Tree__defineProperties(Constructor, staticProps); return Constructor; } function Tree__inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) Tree__setPrototypeOf(subClass, superClass); } function Tree__setPrototypeOf(o, p) { Tree__setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return Tree__setPrototypeOf(o, p); } function Tree__createSuper(Derived) { var hasNativeReflectConstruct = Tree__isNativeReflectConstruct(); return function _createSuperInternal() { var Super = Tree__getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = Tree__getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return Tree__possibleConstructorReturn(this, result); }; } function Tree__possibleConstructorReturn(self, call) { if (call && (Tree__typeof(call) === "object" || typeof call === "function")) { return call; } return Tree__assertThisInitialized(self); } function Tree__assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function Tree__isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } function Tree__getPrototypeOf(o) { Tree__getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return Tree__getPrototypeOf(o); } var Tree_Tree = /*#__PURE__*/function (_React$Component) { Tree__inherits(Tree, _React$Component); var _super = Tree__createSuper(Tree); function Tree() { var _this; Tree__classCallCheck(this, Tree); _this = _super.apply(this, arguments); _this.renderSwitcherIcon = function (prefixCls, switcherIcon, _ref) { var isLeaf = _ref.isLeaf, expanded = _ref.expanded, loading = _ref.loading; var showLine = _this.props.showLine; if (loading) { return /*#__PURE__*/react["createElement"](icon["default"], { type: "loading", className: "".concat(prefixCls, "-switcher-loading-icon") }); } if (isLeaf) { return showLine ? /*#__PURE__*/react["createElement"](icon["default"], { type: "file", className: "".concat(prefixCls, "-switcher-line-icon") }) : null; } var switcherCls = "".concat(prefixCls, "-switcher-icon"); if (switcherIcon) { return /*#__PURE__*/react["cloneElement"](switcherIcon, { className: classnames_default()(switcherIcon.props.className || '', switcherCls) }); } return showLine ? /*#__PURE__*/react["createElement"](icon["default"], { type: expanded ? 'minus-square' : 'plus-square', className: "".concat(prefixCls, "-switcher-line-icon"), theme: "outlined" }) : /*#__PURE__*/react["createElement"](icon["default"], { type: "caret-down", className: switcherCls, theme: "filled" }); }; _this.setTreeRef = function (node) { _this.tree = node; }; _this.renderTree = function (_ref2) { var _classNames; var getPrefixCls = _ref2.getPrefixCls; var _assertThisInitialize = Tree__assertThisInitialized(_this), props = _assertThisInitialize.props; var customizePrefixCls = props.prefixCls, className = props.className, showIcon = props.showIcon, _switcherIcon = props.switcherIcon, blockNode = props.blockNode, children = props.children; var checkable = props.checkable; var prefixCls = getPrefixCls('tree', customizePrefixCls); return /*#__PURE__*/react["createElement"](es["b" /* default */], Tree__extends({ ref: _this.setTreeRef }, props, { prefixCls: prefixCls, className: classnames_default()(className, (_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-icon-hide"), !showIcon), _defineProperty(_classNames, "".concat(prefixCls, "-block-node"), blockNode), _classNames)), checkable: checkable ? /*#__PURE__*/react["createElement"]("span", { className: "".concat(prefixCls, "-checkbox-inner") }) : checkable, switcherIcon: function switcherIcon(nodeProps) { return _this.renderSwitcherIcon(prefixCls, _switcherIcon, nodeProps); } }), children); }; return _this; } Tree__createClass(Tree, [{ key: "render", value: function render() { return /*#__PURE__*/react["createElement"](config_provider["ConfigConsumer"], null, this.renderTree); } }]); return Tree; }(react["Component"]); Tree_Tree.TreeNode = es["a" /* TreeNode */]; Tree_Tree.DirectoryTree = tree_DirectoryTree; Tree_Tree.defaultProps = { checkable: false, showIcon: false, motion: Tree__extends(Tree__extends({}, motion["a" /* default */]), { motionAppear: false }), blockNode: false }; // CONCATENATED MODULE: ./node_modules/antd/es/tree/index.js /* harmony default export */ var tree = __webpack_exports__["default"] = (Tree_Tree); /***/ }), /***/ "NCSo": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAAAXNSR0IArs4c6QAAA9pJREFUWEfFmFvIpWMUx39/FEqOk3JhkpQQhWYStxiaHHLhlMa5ycVkSiiNC6cLmnJIGuMU04iEEpkUF0LRUCSUC6OUlBFyPv31/6z36/2+2Xu/z/6+b7Ju9t7vu571/N71rvWstbb4n8W2gLML49X8WJTY3gM4AzgF+B14Q9J7LUYL5hHg6tJfvSgg2ycDDwP57MsTwDWS/hkHNgImqgsHsn0FsAnYe8ymGyXdOOreGJjHgGun9pDtPYGNwPreZj8CDwHHAufW9T+AIyR93YeaCCPNBFSz2D4IeLZiplv3EXCepB212TsVT7m/TtKDneIQTPSagWwfA7wEHNV7gueByyX93Nv0euC++r1Z0tp8b4FpBrK9Gnga2L82MnAbcLukfJ+V0n25LrwmaVUrzC5Ati8F1gAnAPv19sn3zpvxxhpJL4wJ2Kz9sO59ChwH9FM7t/4L4HkPMwfIdjxwyUBA7ah4SdyMFNvx4g9189fybHfOTISZBbK9DnhgAkzOk1eAqyR9O5QFtn8B9h2hN9Yzne7Ma7D9RVK0LuagS3z81DP4l6Q8bZPY3gkcPE95EGbGQ5U9n9TinCeHS8rngqQCOHHW91ATTAeUDOqyYpukrtBNDTQmmx6vMjInG8cZj4dSAlJ7IlskJcumljEwzwEXjcqmSUApAfeWwv2S+iWhCWyac2bIYDx0E3B3Kd4j6eahRf37SwnTxdAG4I7a5E5Jt7YCLTXMooB2B0wHNPUr210wHVC/Og8GdQtMtbXpjT6XlLa2WRLUSfMna8VWSZeNW90Ck7W2Yy92t0ta0UxTJ/UqYFstel3S6aMMtMIU0DfAoWXnEEnftULFQ8uBL2tBFh4mKe3nrEwDU0DfAweUgQMlddV/kKsrrp8BR5f2U9XxzXaBdSxc2LM2sTbZ/q3X/O8zTRx1QFcCqTktMgSzF/BnGfpbUn43y2xPbTsjzUz/O0G2VA89tlDaTuwkhiI7JS1rppnf5NtOpb8YOB44shcHsbkdWDlUKG2fCHxQEB9Liq1m2WXqqAB+NN1hz8qcFsL2WQX74ogEOKemkyyfup2ZA9QIcyrwdsFmBrtAUveKcgbdUINkVDZJuq7ZPf1X1gITw7ZXAu/2NvkKOF/S+zXV5nVl8oislbR5aqBWmM6w7fRMGaczVkdybm0FMkzmX5BIGv3lktJfN0uX9omZ/qgy2HbaPhN4Bsh4PUo2SLqrmaQUc1KfBrw1LoAnGbSdTMyfDCk/neQMyj8ft0wLE/0A5YTOhBlvNU8H/c1snwSkiOaEflNSxqoFSffKArVMUpc9CzK2FIv+BZ3ty76M2IUNAAAAAElFTkSuQmCC" /***/ }), /***/ "NH7q": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.downloadRecord = downloadRecord; exports.hasError = hasError; exports.initRecordRTC = initRecordRTC; exports.playRecord = playRecord; exports.recordAudioInsert = recordAudioInsert; exports.startRecord = startRecord; exports.stopRecord = stopRecord; var _recordrtc = _interopRequireDefault(__webpack_require__("mbvs")); // getDisplayMedia 提示用户去选择和授权捕获展示的内容或部分内容(如一个窗口) // getUserMedia 会提示用户给予使用媒体输入的许可,媒体输入会产生一个MediaStream,里面包含了请求的媒体类型的轨道。此流可以包含一个视频轨道(来自硬件或者虚拟视频源,比如相机、视频采集设备和屏幕共享服务等等)、一个音频轨道(同样来自硬件或虚拟音频源,比如麦克风、A/D转换器等等),也可能是其它轨道类型。 var _videoFormat = 'mp4'; var _videoType = "video/".concat(_videoFormat); // 录制相关 Stream 流 window.recordStream = { desktopStream: null, // 屏幕画面&系统声音 由 getDisplayMedia 提供 voiceStream: null, // 当前主播麦克风声音 由 getUserMedia 提供 localStream: null, // trtc 初始化本地音视频流对象 trtcStream: [] // TRTC 音轨道 }; // 录制 RecordRTC 对象 window.recordVideo = null; // 保存录制时的 blob 对象 var binaryData = []; // 检查用户浏览器录制情况 var hasGetUserMedia = !!(navigator.getUserMedia || navigator.getDisplayMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia); // 初始化录制器 function initRecordRTC() { if (!hasGetUserMedia) { alert("Your browser cannot stream from your webcam. Please switch to Chrome or Firefox."); return; } window.recordVideo = null; window.recordStream = { desktopStream: null, // 屏幕画面&系统声音 由 getDisplayMedia 提供 voiceStream: null, // 当前主播麦克风声音 由 getUserMedia 提供 localStream: null, // trtc 初始化本地音视频流对象 trtcStream: [] // TRTC 音轨道 }; requestUserMedia(); } // 开始录制 function startRecord() { var success = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; var error = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; console.log('window.recordVideo', window.recordVideo); captureDisplayMedia(function (stream) { console.log('captureDisplayMedia', stream); window.recordStream.desktopStream = new MediaStream(stream); // 添加主播麦克风音轨道 var mainTrack = null; if (window.recordStream.voiceStream) { console.log('window.recordStream.voiceStream.getAudioTracks()', window.recordStream.voiceStream.getAudioTracks()); mainTrack = window.recordStream.voiceStream.getAudioTracks()[0]; } else if (window.recordStream.localStream) { console.log('window.recordStream.localStream.getAudioTrack()', window.recordStream.localStream.getAudioTrack()); mainTrack = window.recordStream.localStream.getAudioTrack(); } if (mainTrack) { window.recordStream.desktopStream.addTrack(mainTrack); } // 初始化 RecordRTC window.recordVideo = (0, _recordrtc.default)(window.recordStream.desktopStream, { type: 'video' }); // 初始化 binaryData binaryData.splice(-1, binaryData.length); binaryData.push(stream); // 开始录制 window.recordVideo.startRecording(); // 录制视频渲染 document.querySelector('video#record_rtc_video').srcObject = stream; var url = (URL || webkitURL).createObjectURL(new Blob(binaryData, { type: _videoType })); document.querySelector('video#record_rtc_video').src = url; success && success('ok'); }, function (err) { console.error('captureDisplayMedia', err); error && error(err); }); } // 停止录制 function stopRecord() { console.log('window.recordVideo', window.recordVideo); // 停止录制 window.recordVideo && window.recordVideo.stopRecording(function () { // 初始化视频渲染 document.querySelector('video#record_rtc_video').srcObject = null; document.querySelector('video#record_rtc_video').src = null; // 初始化 binaryData binaryData.splice(-1, binaryData.length); binaryData.push(window.recordVideo.blob); var url = (URL || webkitURL).createObjectURL(new Blob(binaryData, { type: _videoType })); document.querySelector('video#record_rtc_video').src = url; }); } // 检测是否存在异常 function hasError() { return !window.recordVideo ? true : false; } // 下载录制视频 function downloadRecord() { console.log('window.recordVideo', window.recordVideo); // 初始化 binaryData binaryData.splice(-1, binaryData.length); binaryData.push(window.recordVideo.blob); var url = (URL || webkitURL).createObjectURL(new Blob(binaryData, { type: _videoType })); var fileName = new Date().getTime() + "." + _videoFormat; var aLink = document.createElement('a'); document.body.appendChild(aLink); aLink.style.display = 'none'; aLink.href = url; aLink.download = fileName; aLink.click(); document.body.removeChild(aLink); window.URL.revokeObjectURL(url); } // 播放录制视频 function playRecord() { console.log('window.recordVideo', window.recordVideo); var recVideo = document.querySelector('video#record_rtc_video'); // 初始化 binaryData binaryData.splice(-1, binaryData.length); binaryData.push(window.recordVideo.blob); var url = (URL || webkitURL).createObjectURL(new Blob(binaryData, { type: _videoType })); recVideo.src = url; recVideo.srcObject = null; recVideo.controls = true; recVideo.volume = 1; recVideo.play(); } // 当录制过程,有音频插入时 function recordAudioInsert(trtcStream) { // trtcStream 记录音轨道 window.recordStream.trtcStream.push(trtcStream); // 停止录制 window.recordVideo && window.recordVideo.stopRecording(function () { // binaryData 追加录制视频 binaryData.push(window.recordVideo.blob); // 整合 stream 流 var stream = mixerTRTC(window.recordStream.desktopStream, trtcStream); // 初始化 RecordRTC window.recordVideo = null; window.recordVideo = (0, _recordrtc.default)(stream, { type: 'video' }); // 开始录制 window.recordVideo.startRecording(); }); } // 混音 TRTC function mixerTRTC(stream1, stream2) { var ctx = new AudioContext(); var dest = ctx.createMediaStreamDestination(); if (stream1 && stream1.getAudioTracks().length > 0) ctx.createMediaStreamSource(stream1).connect(dest); if (stream2 && stream2.getAudioTrack()) ctx.createMediaStreamSource(stream2).connect(dest); var tracks = dest.stream && dest.stream.getTracks(); tracks = tracks.concat(stream1.getVideoTracks()).concat([stream2.getAudioTrack()]); return new MediaStream(tracks); } // 混音 function mixer(stream1, stream2) { var ctx = new AudioContext(); var dest = ctx.createMediaStreamDestination(); if (stream1.getAudioTracks().length > 0) ctx.createMediaStreamSource(stream1).connect(dest); if (stream2.getAudioTracks().length > 0) ctx.createMediaStreamSource(stream2).connect(dest); var tracks = dest.stream.getTracks(); tracks = tracks.concat(stream1.getVideoTracks()).concat(stream2.getVideoTracks()); return new MediaStream(tracks); } // 捕捉屏幕媒体 function captureDisplayMedia(callback, error) { var params = { video: true, audio: true }; if (navigator.mediaDevices && navigator.mediaDevices.getDisplayMedia) { navigator.mediaDevices.getDisplayMedia(params).then(callback).catch(function (err) { console.error(err.name + ": " + err.message); if (err.name == 'NotFoundError' || err.name == 'NotAllowedError') { // alert("用户拒绝了使用权限"); } error && error(err); }); } else { navigator.getDisplayMedia(params).then(callback).catch(function (err) { console.error(err.name + ": " + err.message); error && error(err); }); } } // 请求用户媒体 function requestUserMedia() { getUserMedia(function (stream) { window.recordStream.voiceStream = stream; console.log('checkUserMedia', stream); // document.getElementById("record_rtc_audio").srcObject = stream; }, function (err) { console.error("getUserMedia", err.name + ": " + err.message); }); } // 获取用户媒体 function getUserMedia(callback, error) { var params = { audio: true }; navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia; if (typeof navigator.mediaDevices.getUserMedia === 'undefined') { navigator.getUserMedia(params).then(callback).catch(function (err) { console.error("getUserMedia", err.name + ": " + err.message); error && error(err); }); } else { navigator.mediaDevices.getUserMedia(params).then(callback).catch(function (err) { console.error("getUserMedia", err.name + ": " + err.message); if (err.name == "NotFoundError" || err.name == "DevicesNotFoundError") { //required track is missing alert("没有找到合适的媒体"); console.error("没有找到合适的媒体"); } else if (err.name == "NotReadableError" || err.name == "TrackStartError") { //webcam or mic are already in use alert("网络摄像头或麦克风已经投入使用"); console.error("网络摄像头或麦克风已经投入使用"); } else if (err.name == "OverconstrainedError" || err.name == "ConstraintNotSatisfiedError") { //constraints can not be satisfied by avb. devices } else if (err.name == "NotAllowedError" || err.name == "PermissionDeniedError") { //permission denied in browser alert("浏览器拒绝权限"); console.error("浏览器拒绝权限"); } else if (err.name == "TypeError" || err.name == "TypeError") { //empty constraints object } else { //other errors } error && error(err); }); } } /***/ }), /***/ "NPce": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAiCAYAAAC0nUK+AAAAAXNSR0IArs4c6QAABRlJREFUSA2dVn1sU1UUP+e9vhYKG/QVpg5cNJiQETITIChEN7cpfkSJJDJdsn/4BzZDMKDCVjTBhLk1GkQxfkAUDZApi4AukTC2GWCKH2waFNQIIoILdaPdVihd2/eu57z6ym3p6OAkr/eer98999xzzy3CdWhRc6g0YZpPAIhyFFAIgF6BIkjz86DgIRWVLw6sm3wEkSRZCLPIoLIxVA5gNgsQ87PpZRki/ABCXde53vOVLOd5GvgGIZTDTRcbQUA9K6fmKVA52wn33uWEQo8K+eMRhq8I6AsZ8O2pGHT+EoP+sMmmBISv3e/T6zcgJgWWzFLRxoXAB5uCu2l8SlMBlpW5Ycm8ceB0pK3/v3VyiCUE7D0Whe2HIhA3GA33lDboS+0FCCZJ3a5VrxBw3WQ3gr86H8pnuUBVRgdmL9bPnq7BnDs1OPpHDKJxUXzuyIjjzy5/F+st70XNFxcmTOjWFIGbavJh1jSNdWQM0P07bf/ECASGTFhR6YZ7ZiR1loH0c/KfOKzZOQxxEwWlqKzTpx9xsN4wBecZORUM/P3pOHQQ4NcETNHAx7Ue+PFsHA7+PAKf90Th1ao8CTY5ZT/239oV4dLZSNIy5SH/4Dwh4AE+PM4xU8Onw3RYIxYw8y4K9pZ8BV56ciJcigrr20eLrPhgCHy7w3B2gBMOlj/j0AmWVvgH5iumYVAdg1UV8uG1rPTAjjoPq+CZLSFr5J85d2iw9K0QbDlwGc70G/DY3S4KJgwDl0zr8Lm6mDCBjyu0hUpmuNxkqn47BC+2DFui1uf0lGpHdwS4SnY+m1z4vplOKJ7mgEQy+BQO4yqUoCL25DqWad8aHS4MJj1c1skktcWU28aqfKh55+puZL8UDkKRAigKWMkXRCa3E6G93muJxmlXdVydfA/2rr66G49bgd6/qLSIbBwEMVUBgZdZyDdPJipP4I/JHnl+4nwc1lK6lrwRZNaiZWXjoeWbK9Y8hUO4fLQBlvKVvlma4MJUxDYOFXsfp6WXQblXjIVKijTYVDMplbJMHxuHrlIvgSv72YCbEFdBLjr+N9/EobRU2T7szzgWoWhTnBNEGzWcEHc3bkK56HavCvY3XU+vMPa3uiRCv6rp+60yqGgaWA8mbOQqkHtLroVkfaq38NEhru7yeTfzgYLD4d1MzeZXbpsvt4aBDW+E2J792J+i7XVN1N9l/1QBP+IfnhkzYvSqQN7N9nN6lf5VXTiv/XnvuTRwZiqag4+iKdqor1vJvLGXCCIqQkW7b8p3jMWUijzJAtBrtNw0zfdtfmwjJkDFxV31ulV5to+Vc5vhsaNB30oH8rosyzWnlrA8E5h9rgFnYekCvYH+LhzleU5C3Nbh827PZpcVfEM5JlxOpZqyNpjNyZZRAMeLbtNX2XzmmBWcjb58wXMWFVyZ6WDzVBkjKmhPf7QMR715o4IzSGeDvouiO2gDpo2Ije2+/N/SZBnMdcHZ1ulQ62hIi44vnD5D92dgXcPmBN+/dvJp+l/YLHuqqlLbWoU52+g1dS6DzJ071x2Px3WYVFww5eE32wEdXhEbPtz/2eJaRVHCmqYFe3p6IrKPPE9va5KmpKSkIBqNzjAMY6IRCaBr+sKYw12wIHzyk/po37Ewy2nhqYWFhUYgELBeM8ndmo6aFrqlt8rGwY61e2KDZz4M/7TtlCzPtJN1o4LTti/IhmZsMNHfVvOeLON5pp2sH1POKbo8amZOGlUCM6g8Y2PJ+X/6VhM55Wt0ygAAAABJRU5ErkJggg==" /***/ }), /***/ "NV+Z": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAKFJREFUOE9jZKAQMFKon2G4G1DdMkWe9c+bpw0NDX9whRXOMKhpnuzA8J9pCwMj03aWvy8jcRmC1QCIZuaVTP+ZYv4z/sv9z8j4E5chGAbUNk2z/8/AsIqRgSGsuS7rYENDA9tfJrE1uAxBMQCkmYGBYRUDVDPM3/gMQTGgpnHaeUZGhgKQzeiBBjFEdAUDA+Oa5rqsZTD54Z6QiMloFIcBAEpoSBEKxzlaAAAAAElFTkSuQmCC" /***/ }), /***/ "Ngpj": /***/ (function(module, exports) { // module.exports = function shallowEqual(objA, objB, compare, compareContext) { var ret = compare ? compare.call(compareContext, objA, objB) : void 0; if (ret !== void 0) { return !!ret; } if (objA === objB) { return true; } if (typeof objA !== "object" || !objA || typeof objB !== "object" || !objB) { return false; } var keysA = Object.keys(objA); var keysB = Object.keys(objB); if (keysA.length !== keysB.length) { return false; } var bHasOwnProperty = Object.prototype.hasOwnProperty.bind(objB); // Test for A's keys different from B. for (var idx = 0; idx < keysA.length; idx++) { var key = keysA[idx]; if (!bHasOwnProperty(key)) { return false; } var valueA = objA[key]; var valueB = objB[key]; ret = compare ? compare.call(compareContext, valueA, valueB, key) : void 0; if (ret === false || (ret === void 0 && valueA !== valueB)) { return false; } } return true; }; /***/ }), /***/ "Nl98": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // EXTERNAL MODULE: ./node_modules/react/index.js var react = __webpack_require__("GiK3"); var react_default = /*#__PURE__*/__webpack_require__.n(react); // EXTERNAL MODULE: ./node_modules/prop-types/index.js var prop_types = __webpack_require__("KSGD"); var prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types); // EXTERNAL MODULE: ./node_modules/moment/moment.js var moment = __webpack_require__("PJh5"); var moment_default = /*#__PURE__*/__webpack_require__.n(moment); // EXTERNAL MODULE: ./node_modules/classnames/index.js var classnames = __webpack_require__("HW6M"); var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); // EXTERNAL MODULE: ./node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js var react_lifecycles_compat_es = __webpack_require__("R8mX"); // CONCATENATED MODULE: ./node_modules/rc-time-picker/es/Header.js function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } 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 Header_Header = /*#__PURE__*/ function (_Component) { _inherits(Header, _Component); function Header(props) { var _this; _classCallCheck(this, Header); _this = _possibleConstructorReturn(this, _getPrototypeOf(Header).call(this, props)); _defineProperty(_assertThisInitialized(_this), "onInputChange", function (event) { var str = event.target.value; _this.setState({ str: str }); var _this$props = _this.props, format = _this$props.format, hourOptions = _this$props.hourOptions, minuteOptions = _this$props.minuteOptions, secondOptions = _this$props.secondOptions, disabledHours = _this$props.disabledHours, disabledMinutes = _this$props.disabledMinutes, disabledSeconds = _this$props.disabledSeconds, onChange = _this$props.onChange; if (str) { var originalValue = _this.props.value; var value = _this.getProtoValue().clone(); var parsed = moment_default()(str, format, true); if (!parsed.isValid()) { _this.setState({ invalid: true }); return; } value.hour(parsed.hour()).minute(parsed.minute()).second(parsed.second()); // if time value not allowed, response warning. if (hourOptions.indexOf(value.hour()) < 0 || minuteOptions.indexOf(value.minute()) < 0 || secondOptions.indexOf(value.second()) < 0) { _this.setState({ invalid: true }); return; } // if time value is disabled, response warning. var disabledHourOptions = disabledHours(); var disabledMinuteOptions = disabledMinutes(value.hour()); var disabledSecondOptions = disabledSeconds(value.hour(), value.minute()); if (disabledHourOptions && disabledHourOptions.indexOf(value.hour()) >= 0 || disabledMinuteOptions && disabledMinuteOptions.indexOf(value.minute()) >= 0 || disabledSecondOptions && disabledSecondOptions.indexOf(value.second()) >= 0) { _this.setState({ invalid: true }); return; } if (originalValue) { if (originalValue.hour() !== value.hour() || originalValue.minute() !== value.minute() || originalValue.second() !== value.second()) { // keep other fields for rc-calendar var changedValue = originalValue.clone(); changedValue.hour(value.hour()); changedValue.minute(value.minute()); changedValue.second(value.second()); onChange(changedValue); } } else if (originalValue !== value) { onChange(value); } } else { onChange(null); } _this.setState({ invalid: false }); }); _defineProperty(_assertThisInitialized(_this), "onKeyDown", function (e) { var _this$props2 = _this.props, onEsc = _this$props2.onEsc, onKeyDown = _this$props2.onKeyDown; if (e.keyCode === 27) { onEsc(); } onKeyDown(e); }); var _value = props.value, _format = props.format; _this.state = { str: _value && _value.format(_format) || '', invalid: false }; return _this; } _createClass(Header, [{ key: "componentDidMount", value: function componentDidMount() { var _this2 = this; var focusOnOpen = this.props.focusOnOpen; if (focusOnOpen) { // Wait one frame for the panel to be positioned before focusing var requestAnimationFrame = window.requestAnimationFrame || window.setTimeout; requestAnimationFrame(function () { _this2.refInput.focus(); _this2.refInput.select(); }); } } }, { key: "componentDidUpdate", value: function componentDidUpdate(prevProps) { var _this$props3 = this.props, value = _this$props3.value, format = _this$props3.format; if (value !== prevProps.value) { // eslint-disable-next-line react/no-did-update-set-state this.setState({ str: value && value.format(format) || '', invalid: false }); } } }, { key: "getProtoValue", value: function getProtoValue() { var _this$props4 = this.props, value = _this$props4.value, defaultOpenValue = _this$props4.defaultOpenValue; return value || defaultOpenValue; } }, { key: "getInput", value: function getInput() { var _this3 = this; var _this$props5 = this.props, prefixCls = _this$props5.prefixCls, placeholder = _this$props5.placeholder, inputReadOnly = _this$props5.inputReadOnly; var _this$state = this.state, invalid = _this$state.invalid, str = _this$state.str; var invalidClass = invalid ? "".concat(prefixCls, "-input-invalid") : ''; return react_default.a.createElement("input", { className: classnames_default()("".concat(prefixCls, "-input"), invalidClass), ref: function ref(_ref) { _this3.refInput = _ref; }, onKeyDown: this.onKeyDown, value: str, placeholder: placeholder, onChange: this.onInputChange, readOnly: !!inputReadOnly }); } }, { key: "render", value: function render() { var prefixCls = this.props.prefixCls; return react_default.a.createElement("div", { className: "".concat(prefixCls, "-input-wrap") }, this.getInput()); } }]); return Header; }(react["Component"]); _defineProperty(Header_Header, "propTypes", { format: prop_types_default.a.string, prefixCls: prop_types_default.a.string, disabledDate: prop_types_default.a.func, placeholder: prop_types_default.a.string, clearText: prop_types_default.a.string, value: prop_types_default.a.object, inputReadOnly: prop_types_default.a.bool, hourOptions: prop_types_default.a.array, minuteOptions: prop_types_default.a.array, secondOptions: prop_types_default.a.array, disabledHours: prop_types_default.a.func, disabledMinutes: prop_types_default.a.func, disabledSeconds: prop_types_default.a.func, onChange: prop_types_default.a.func, onEsc: prop_types_default.a.func, defaultOpenValue: prop_types_default.a.object, currentSelectPanel: prop_types_default.a.string, focusOnOpen: prop_types_default.a.bool, onKeyDown: prop_types_default.a.func, clearIcon: prop_types_default.a.node }); _defineProperty(Header_Header, "defaultProps", { inputReadOnly: false }); /* harmony default export */ var es_Header = (Header_Header); // EXTERNAL MODULE: ./node_modules/react-dom/index.js var react_dom = __webpack_require__("O27J"); var react_dom_default = /*#__PURE__*/__webpack_require__.n(react_dom); // EXTERNAL MODULE: ./node_modules/raf/index.js var raf = __webpack_require__("ommR"); var raf_default = /*#__PURE__*/__webpack_require__.n(raf); // CONCATENATED MODULE: ./node_modules/rc-time-picker/es/Select.js function Select__classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function Select__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); } } function Select__createClass(Constructor, protoProps, staticProps) { if (protoProps) Select__defineProperties(Constructor.prototype, protoProps); if (staticProps) Select__defineProperties(Constructor, staticProps); return Constructor; } function Select__possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return Select__assertThisInitialized(self); } function Select__getPrototypeOf(o) { Select__getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return Select__getPrototypeOf(o); } function Select__assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function Select__inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) Select__setPrototypeOf(subClass, superClass); } function Select__setPrototypeOf(o, p) { Select__setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return Select__setPrototypeOf(o, p); } function Select__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; } /* eslint jsx-a11y/no-noninteractive-element-to-interactive-role: 0 */ var Select_scrollTo = function scrollTo(element, to, duration) { // jump to target if duration zero if (duration <= 0) { raf_default()(function () { element.scrollTop = to; }); return; } var difference = to - element.scrollTop; var perTick = difference / duration * 10; raf_default()(function () { element.scrollTop += perTick; if (element.scrollTop === to) return; scrollTo(element, to, duration - 10); }); }; var Select_Select = /*#__PURE__*/ function (_Component) { Select__inherits(Select, _Component); function Select() { var _getPrototypeOf2; var _this; Select__classCallCheck(this, Select); for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } _this = Select__possibleConstructorReturn(this, (_getPrototypeOf2 = Select__getPrototypeOf(Select)).call.apply(_getPrototypeOf2, [this].concat(args))); Select__defineProperty(Select__assertThisInitialized(_this), "state", { active: false }); Select__defineProperty(Select__assertThisInitialized(_this), "onSelect", function (value) { var _this$props = _this.props, onSelect = _this$props.onSelect, type = _this$props.type; onSelect(type, value); }); Select__defineProperty(Select__assertThisInitialized(_this), "handleMouseEnter", function (e) { var onMouseEnter = _this.props.onMouseEnter; _this.setState({ active: true }); onMouseEnter(e); }); Select__defineProperty(Select__assertThisInitialized(_this), "handleMouseLeave", function () { _this.setState({ active: false }); }); Select__defineProperty(Select__assertThisInitialized(_this), "saveList", function (node) { _this.list = node; }); return _this; } Select__createClass(Select, [{ key: "componentDidMount", value: function componentDidMount() { // jump to selected option this.scrollToSelected(0); } }, { key: "componentDidUpdate", value: function componentDidUpdate(prevProps) { var selectedIndex = this.props.selectedIndex; // smooth scroll to selected option if (prevProps.selectedIndex !== selectedIndex) { this.scrollToSelected(120); } } }, { key: "getOptions", value: function getOptions() { var _this2 = this; var _this$props2 = this.props, options = _this$props2.options, selectedIndex = _this$props2.selectedIndex, prefixCls = _this$props2.prefixCls, onEsc = _this$props2.onEsc; return options.map(function (item, index) { var _classNames; var cls = classnames_default()((_classNames = {}, Select__defineProperty(_classNames, "".concat(prefixCls, "-select-option-selected"), selectedIndex === index), Select__defineProperty(_classNames, "".concat(prefixCls, "-select-option-disabled"), item.disabled), _classNames)); var onClick = item.disabled ? undefined : function () { _this2.onSelect(item.value); }; var onKeyDown = function onKeyDown(e) { if (e.keyCode === 13) onClick();else if (e.keyCode === 27) onEsc(); }; return react_default.a.createElement("li", { role: "button", onClick: onClick, className: cls, key: index, disabled: item.disabled, tabIndex: "0", onKeyDown: onKeyDown }, item.value); }); } }, { key: "scrollToSelected", value: function scrollToSelected(duration) { // move to selected item var selectedIndex = this.props.selectedIndex; var select = react_dom_default.a.findDOMNode(this); var list = react_dom_default.a.findDOMNode(this.list); if (!list) { return; } var index = selectedIndex; if (index < 0) { index = 0; } var topOption = list.children[index]; var to = topOption.offsetTop; Select_scrollTo(select, to, duration); } }, { key: "render", value: function render() { var _this$props3 = this.props, prefixCls = _this$props3.prefixCls, options = _this$props3.options; var active = this.state.active; if (options.length === 0) { return null; } var cls = classnames_default()("".concat(prefixCls, "-select"), Select__defineProperty({}, "".concat(prefixCls, "-select-active"), active)); return react_default.a.createElement("div", { className: cls, onMouseEnter: this.handleMouseEnter, onMouseLeave: this.handleMouseLeave }, react_default.a.createElement("ul", { ref: this.saveList }, this.getOptions())); } }]); return Select; }(react["Component"]); Select__defineProperty(Select_Select, "propTypes", { prefixCls: prop_types_default.a.string, options: prop_types_default.a.array, selectedIndex: prop_types_default.a.number, type: prop_types_default.a.string, onSelect: prop_types_default.a.func, onMouseEnter: prop_types_default.a.func, onEsc: prop_types_default.a.func }); /* harmony default export */ var es_Select = (Select_Select); // CONCATENATED MODULE: ./node_modules/rc-time-picker/es/Combobox.js function Combobox__classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function Combobox__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); } } function Combobox__createClass(Constructor, protoProps, staticProps) { if (protoProps) Combobox__defineProperties(Constructor.prototype, protoProps); if (staticProps) Combobox__defineProperties(Constructor, staticProps); return Constructor; } function Combobox__possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return Combobox__assertThisInitialized(self); } function Combobox__getPrototypeOf(o) { Combobox__getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return Combobox__getPrototypeOf(o); } function Combobox__assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function Combobox__inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) Combobox__setPrototypeOf(subClass, superClass); } function Combobox__setPrototypeOf(o, p) { Combobox__setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return Combobox__setPrototypeOf(o, p); } function Combobox__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 formatOption = function formatOption(option, disabledOptions) { var value = "".concat(option); if (option < 10) { value = "0".concat(option); } var disabled = false; if (disabledOptions && disabledOptions.indexOf(option) >= 0) { disabled = true; } return { value: value, disabled: disabled }; }; var Combobox_Combobox = /*#__PURE__*/ function (_Component) { Combobox__inherits(Combobox, _Component); function Combobox() { var _getPrototypeOf2; var _this; Combobox__classCallCheck(this, Combobox); for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } _this = Combobox__possibleConstructorReturn(this, (_getPrototypeOf2 = Combobox__getPrototypeOf(Combobox)).call.apply(_getPrototypeOf2, [this].concat(args))); Combobox__defineProperty(Combobox__assertThisInitialized(_this), "onItemChange", function (type, itemValue) { var _this$props = _this.props, onChange = _this$props.onChange, defaultOpenValue = _this$props.defaultOpenValue, use12Hours = _this$props.use12Hours, propValue = _this$props.value, isAM = _this$props.isAM, onAmPmChange = _this$props.onAmPmChange; var value = (propValue || defaultOpenValue).clone(); if (type === 'hour') { if (use12Hours) { if (isAM) { value.hour(+itemValue % 12); } else { value.hour(+itemValue % 12 + 12); } } else { value.hour(+itemValue); } } else if (type === 'minute') { value.minute(+itemValue); } else if (type === 'ampm') { var ampm = itemValue.toUpperCase(); if (use12Hours) { if (ampm === 'PM' && value.hour() < 12) { value.hour(value.hour() % 12 + 12); } if (ampm === 'AM') { if (value.hour() >= 12) { value.hour(value.hour() - 12); } } } onAmPmChange(ampm); } else { value.second(+itemValue); } onChange(value); }); Combobox__defineProperty(Combobox__assertThisInitialized(_this), "onEnterSelectPanel", function (range) { var onCurrentSelectPanelChange = _this.props.onCurrentSelectPanelChange; onCurrentSelectPanelChange(range); }); return _this; } Combobox__createClass(Combobox, [{ key: "getHourSelect", value: function getHourSelect(hour) { var _this2 = this; var _this$props2 = this.props, prefixCls = _this$props2.prefixCls, hourOptions = _this$props2.hourOptions, disabledHours = _this$props2.disabledHours, showHour = _this$props2.showHour, use12Hours = _this$props2.use12Hours, onEsc = _this$props2.onEsc; if (!showHour) { return null; } var disabledOptions = disabledHours(); var hourOptionsAdj; var hourAdj; if (use12Hours) { hourOptionsAdj = [12].concat(hourOptions.filter(function (h) { return h < 12 && h > 0; })); hourAdj = hour % 12 || 12; } else { hourOptionsAdj = hourOptions; hourAdj = hour; } return react_default.a.createElement(es_Select, { prefixCls: prefixCls, options: hourOptionsAdj.map(function (option) { return formatOption(option, disabledOptions); }), selectedIndex: hourOptionsAdj.indexOf(hourAdj), type: "hour", onSelect: this.onItemChange, onMouseEnter: function onMouseEnter() { return _this2.onEnterSelectPanel('hour'); }, onEsc: onEsc }); } }, { key: "getMinuteSelect", value: function getMinuteSelect(minute) { var _this3 = this; var _this$props3 = this.props, prefixCls = _this$props3.prefixCls, minuteOptions = _this$props3.minuteOptions, disabledMinutes = _this$props3.disabledMinutes, defaultOpenValue = _this$props3.defaultOpenValue, showMinute = _this$props3.showMinute, propValue = _this$props3.value, onEsc = _this$props3.onEsc; if (!showMinute) { return null; } var value = propValue || defaultOpenValue; var disabledOptions = disabledMinutes(value.hour()); return react_default.a.createElement(es_Select, { prefixCls: prefixCls, options: minuteOptions.map(function (option) { return formatOption(option, disabledOptions); }), selectedIndex: minuteOptions.indexOf(minute), type: "minute", onSelect: this.onItemChange, onMouseEnter: function onMouseEnter() { return _this3.onEnterSelectPanel('minute'); }, onEsc: onEsc }); } }, { key: "getSecondSelect", value: function getSecondSelect(second) { var _this4 = this; var _this$props4 = this.props, prefixCls = _this$props4.prefixCls, secondOptions = _this$props4.secondOptions, disabledSeconds = _this$props4.disabledSeconds, showSecond = _this$props4.showSecond, defaultOpenValue = _this$props4.defaultOpenValue, propValue = _this$props4.value, onEsc = _this$props4.onEsc; if (!showSecond) { return null; } var value = propValue || defaultOpenValue; var disabledOptions = disabledSeconds(value.hour(), value.minute()); return react_default.a.createElement(es_Select, { prefixCls: prefixCls, options: secondOptions.map(function (option) { return formatOption(option, disabledOptions); }), selectedIndex: secondOptions.indexOf(second), type: "second", onSelect: this.onItemChange, onMouseEnter: function onMouseEnter() { return _this4.onEnterSelectPanel('second'); }, onEsc: onEsc }); } }, { key: "getAMPMSelect", value: function getAMPMSelect() { var _this5 = this; var _this$props5 = this.props, prefixCls = _this$props5.prefixCls, use12Hours = _this$props5.use12Hours, format = _this$props5.format, isAM = _this$props5.isAM, onEsc = _this$props5.onEsc; if (!use12Hours) { return null; } var AMPMOptions = ['am', 'pm'] // If format has A char, then we should uppercase AM/PM .map(function (c) { return format.match(/\sA/) ? c.toUpperCase() : c; }).map(function (c) { return { value: c }; }); var selected = isAM ? 0 : 1; return react_default.a.createElement(es_Select, { prefixCls: prefixCls, options: AMPMOptions, selectedIndex: selected, type: "ampm", onSelect: this.onItemChange, onMouseEnter: function onMouseEnter() { return _this5.onEnterSelectPanel('ampm'); }, onEsc: onEsc }); } }, { key: "render", value: function render() { var _this$props6 = this.props, prefixCls = _this$props6.prefixCls, defaultOpenValue = _this$props6.defaultOpenValue, propValue = _this$props6.value; var value = propValue || defaultOpenValue; return react_default.a.createElement("div", { className: "".concat(prefixCls, "-combobox") }, this.getHourSelect(value.hour()), this.getMinuteSelect(value.minute()), this.getSecondSelect(value.second()), this.getAMPMSelect(value.hour())); } }]); return Combobox; }(react["Component"]); Combobox__defineProperty(Combobox_Combobox, "propTypes", { format: prop_types_default.a.string, defaultOpenValue: prop_types_default.a.object, prefixCls: prop_types_default.a.string, value: prop_types_default.a.object, onChange: prop_types_default.a.func, onAmPmChange: prop_types_default.a.func, showHour: prop_types_default.a.bool, showMinute: prop_types_default.a.bool, showSecond: prop_types_default.a.bool, hourOptions: prop_types_default.a.array, minuteOptions: prop_types_default.a.array, secondOptions: prop_types_default.a.array, disabledHours: prop_types_default.a.func, disabledMinutes: prop_types_default.a.func, disabledSeconds: prop_types_default.a.func, onCurrentSelectPanelChange: prop_types_default.a.func, use12Hours: prop_types_default.a.bool, onEsc: prop_types_default.a.func, isAM: prop_types_default.a.bool }); /* harmony default export */ var es_Combobox = (Combobox_Combobox); // CONCATENATED MODULE: ./node_modules/rc-time-picker/es/Panel.js function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { Panel__defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function Panel__classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function Panel__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); } } function Panel__createClass(Constructor, protoProps, staticProps) { if (protoProps) Panel__defineProperties(Constructor.prototype, protoProps); if (staticProps) Panel__defineProperties(Constructor, staticProps); return Constructor; } function Panel__possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return Panel__assertThisInitialized(self); } function Panel__getPrototypeOf(o) { Panel__getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return Panel__getPrototypeOf(o); } function Panel__assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function Panel__inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) Panel__setPrototypeOf(subClass, superClass); } function Panel__setPrototypeOf(o, p) { Panel__setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return Panel__setPrototypeOf(o, p); } function Panel__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; } function noop() {} function generateOptions(length, disabledOptions, hideDisabledOptions) { var step = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1; var arr = []; for (var value = 0; value < length; value += step) { if (!disabledOptions || disabledOptions.indexOf(value) < 0 || !hideDisabledOptions) { arr.push(value); } } return arr; } function toNearestValidTime(time, hourOptions, minuteOptions, secondOptions) { var hour = hourOptions.slice().sort(function (a, b) { return Math.abs(time.hour() - a) - Math.abs(time.hour() - b); })[0]; var minute = minuteOptions.slice().sort(function (a, b) { return Math.abs(time.minute() - a) - Math.abs(time.minute() - b); })[0]; var second = secondOptions.slice().sort(function (a, b) { return Math.abs(time.second() - a) - Math.abs(time.second() - b); })[0]; return moment_default()("".concat(hour, ":").concat(minute, ":").concat(second), 'HH:mm:ss'); } var Panel_Panel = /*#__PURE__*/ function (_Component) { Panel__inherits(Panel, _Component); function Panel() { var _getPrototypeOf2; var _this; Panel__classCallCheck(this, Panel); for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } _this = Panel__possibleConstructorReturn(this, (_getPrototypeOf2 = Panel__getPrototypeOf(Panel)).call.apply(_getPrototypeOf2, [this].concat(args))); Panel__defineProperty(Panel__assertThisInitialized(_this), "state", {}); Panel__defineProperty(Panel__assertThisInitialized(_this), "onChange", function (newValue) { var onChange = _this.props.onChange; _this.setState({ value: newValue }); onChange(newValue); }); Panel__defineProperty(Panel__assertThisInitialized(_this), "onAmPmChange", function (ampm) { var onAmPmChange = _this.props.onAmPmChange; onAmPmChange(ampm); }); Panel__defineProperty(Panel__assertThisInitialized(_this), "onCurrentSelectPanelChange", function (currentSelectPanel) { _this.setState({ currentSelectPanel: currentSelectPanel }); }); Panel__defineProperty(Panel__assertThisInitialized(_this), "disabledHours", function () { var _this$props = _this.props, use12Hours = _this$props.use12Hours, disabledHours = _this$props.disabledHours; var disabledOptions = disabledHours(); if (use12Hours && Array.isArray(disabledOptions)) { if (_this.isAM()) { disabledOptions = disabledOptions.filter(function (h) { return h < 12; }).map(function (h) { return h === 0 ? 12 : h; }); } else { disabledOptions = disabledOptions.map(function (h) { return h === 12 ? 12 : h - 12; }); } } return disabledOptions; }); return _this; } Panel__createClass(Panel, [{ key: "close", // https://github.com/ant-design/ant-design/issues/5829 value: function close() { var onEsc = this.props.onEsc; onEsc(); } }, { key: "isAM", value: function isAM() { var defaultOpenValue = this.props.defaultOpenValue; var value = this.state.value; var realValue = value || defaultOpenValue; return realValue.hour() >= 0 && realValue.hour() < 12; } }, { key: "render", value: function render() { var _this$props2 = this.props, prefixCls = _this$props2.prefixCls, className = _this$props2.className, placeholder = _this$props2.placeholder, disabledMinutes = _this$props2.disabledMinutes, disabledSeconds = _this$props2.disabledSeconds, hideDisabledOptions = _this$props2.hideDisabledOptions, showHour = _this$props2.showHour, showMinute = _this$props2.showMinute, showSecond = _this$props2.showSecond, format = _this$props2.format, defaultOpenValue = _this$props2.defaultOpenValue, clearText = _this$props2.clearText, onEsc = _this$props2.onEsc, addon = _this$props2.addon, use12Hours = _this$props2.use12Hours, focusOnOpen = _this$props2.focusOnOpen, onKeyDown = _this$props2.onKeyDown, hourStep = _this$props2.hourStep, minuteStep = _this$props2.minuteStep, secondStep = _this$props2.secondStep, inputReadOnly = _this$props2.inputReadOnly, clearIcon = _this$props2.clearIcon; var _this$state = this.state, value = _this$state.value, currentSelectPanel = _this$state.currentSelectPanel; var disabledHourOptions = this.disabledHours(); var disabledMinuteOptions = disabledMinutes(value ? value.hour() : null); var disabledSecondOptions = disabledSeconds(value ? value.hour() : null, value ? value.minute() : null); var hourOptions = generateOptions(24, disabledHourOptions, hideDisabledOptions, hourStep); var minuteOptions = generateOptions(60, disabledMinuteOptions, hideDisabledOptions, minuteStep); var secondOptions = generateOptions(60, disabledSecondOptions, hideDisabledOptions, secondStep); var validDefaultOpenValue = toNearestValidTime(defaultOpenValue, hourOptions, minuteOptions, secondOptions); return react_default.a.createElement("div", { className: classnames_default()(className, "".concat(prefixCls, "-inner")) }, react_default.a.createElement(es_Header, { clearText: clearText, prefixCls: prefixCls, defaultOpenValue: validDefaultOpenValue, value: value, currentSelectPanel: currentSelectPanel, onEsc: onEsc, format: format, placeholder: placeholder, hourOptions: hourOptions, minuteOptions: minuteOptions, secondOptions: secondOptions, disabledHours: this.disabledHours, disabledMinutes: disabledMinutes, disabledSeconds: disabledSeconds, onChange: this.onChange, focusOnOpen: focusOnOpen, onKeyDown: onKeyDown, inputReadOnly: inputReadOnly, clearIcon: clearIcon }), react_default.a.createElement(es_Combobox, { prefixCls: prefixCls, value: value, defaultOpenValue: validDefaultOpenValue, format: format, onChange: this.onChange, onAmPmChange: this.onAmPmChange, showHour: showHour, showMinute: showMinute, showSecond: showSecond, hourOptions: hourOptions, minuteOptions: minuteOptions, secondOptions: secondOptions, disabledHours: this.disabledHours, disabledMinutes: disabledMinutes, disabledSeconds: disabledSeconds, onCurrentSelectPanelChange: this.onCurrentSelectPanelChange, use12Hours: use12Hours, onEsc: onEsc, isAM: this.isAM() }), addon(this)); } }], [{ key: "getDerivedStateFromProps", value: function getDerivedStateFromProps(props, state) { if ('value' in props) { return _objectSpread({}, state, { value: props.value }); } return null; } }]); return Panel; }(react["Component"]); Panel__defineProperty(Panel_Panel, "propTypes", { clearText: prop_types_default.a.string, prefixCls: prop_types_default.a.string, className: prop_types_default.a.string, defaultOpenValue: prop_types_default.a.object, value: prop_types_default.a.object, placeholder: prop_types_default.a.string, format: prop_types_default.a.string, inputReadOnly: prop_types_default.a.bool, disabledHours: prop_types_default.a.func, disabledMinutes: prop_types_default.a.func, disabledSeconds: prop_types_default.a.func, hideDisabledOptions: prop_types_default.a.bool, onChange: prop_types_default.a.func, onAmPmChange: prop_types_default.a.func, onEsc: prop_types_default.a.func, showHour: prop_types_default.a.bool, showMinute: prop_types_default.a.bool, showSecond: prop_types_default.a.bool, use12Hours: prop_types_default.a.bool, hourStep: prop_types_default.a.number, minuteStep: prop_types_default.a.number, secondStep: prop_types_default.a.number, addon: prop_types_default.a.func, focusOnOpen: prop_types_default.a.bool, onKeyDown: prop_types_default.a.func, clearIcon: prop_types_default.a.node }); Panel__defineProperty(Panel_Panel, "defaultProps", { prefixCls: 'rc-time-picker-panel', onChange: noop, disabledHours: noop, disabledMinutes: noop, disabledSeconds: noop, defaultOpenValue: moment_default()(), use12Hours: false, addon: noop, onKeyDown: noop, onAmPmChange: noop, inputReadOnly: false }); Object(react_lifecycles_compat_es["polyfill"])(Panel_Panel); /* harmony default export */ var es_Panel = __webpack_exports__["a"] = (Panel_Panel); /***/ }), /***/ "NrWQ": /***/ (function(module, exports) { module.exports = "data:image/png;base64,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" /***/ }), /***/ "O6j2": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); // EXTERNAL MODULE: ./node_modules/react/index.js var react = __webpack_require__("GiK3"); var react_default = /*#__PURE__*/__webpack_require__.n(react); // EXTERNAL MODULE: ./node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js var react_lifecycles_compat_es = __webpack_require__("R8mX"); // EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/extends.js var helpers_extends = __webpack_require__("Dd8w"); var extends_default = /*#__PURE__*/__webpack_require__.n(helpers_extends); // EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/objectWithoutProperties.js var objectWithoutProperties = __webpack_require__("+6Bu"); var objectWithoutProperties_default = /*#__PURE__*/__webpack_require__.n(objectWithoutProperties); // EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/classCallCheck.js var classCallCheck = __webpack_require__("Zrlr"); var classCallCheck_default = /*#__PURE__*/__webpack_require__.n(classCallCheck); // EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/possibleConstructorReturn.js var possibleConstructorReturn = __webpack_require__("zwoO"); var possibleConstructorReturn_default = /*#__PURE__*/__webpack_require__.n(possibleConstructorReturn); // EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/inherits.js var inherits = __webpack_require__("Pf15"); var inherits_default = /*#__PURE__*/__webpack_require__.n(inherits); // EXTERNAL MODULE: ./node_modules/prop-types/index.js var prop_types = __webpack_require__("KSGD"); var prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types); // EXTERNAL MODULE: ./node_modules/rc-trigger/es/index.js + 4 modules var es = __webpack_require__("isWq"); // CONCATENATED MODULE: ./node_modules/rc-tooltip/es/placements.js var placements_autoAdjustOverflow = { adjustX: 1, adjustY: 1 }; var targetOffset = [0, 0]; var placements = { left: { points: ['cr', 'cl'], overflow: placements_autoAdjustOverflow, offset: [-4, 0], targetOffset: targetOffset }, right: { points: ['cl', 'cr'], overflow: placements_autoAdjustOverflow, offset: [4, 0], targetOffset: targetOffset }, top: { points: ['bc', 'tc'], overflow: placements_autoAdjustOverflow, offset: [0, -4], targetOffset: targetOffset }, bottom: { points: ['tc', 'bc'], overflow: placements_autoAdjustOverflow, offset: [0, 4], targetOffset: targetOffset }, topLeft: { points: ['bl', 'tl'], overflow: placements_autoAdjustOverflow, offset: [0, -4], targetOffset: targetOffset }, leftTop: { points: ['tr', 'tl'], overflow: placements_autoAdjustOverflow, offset: [-4, 0], targetOffset: targetOffset }, topRight: { points: ['br', 'tr'], overflow: placements_autoAdjustOverflow, offset: [0, -4], targetOffset: targetOffset }, rightTop: { points: ['tl', 'tr'], overflow: placements_autoAdjustOverflow, offset: [4, 0], targetOffset: targetOffset }, bottomRight: { points: ['tr', 'br'], overflow: placements_autoAdjustOverflow, offset: [0, 4], targetOffset: targetOffset }, rightBottom: { points: ['bl', 'br'], overflow: placements_autoAdjustOverflow, offset: [4, 0], targetOffset: targetOffset }, bottomLeft: { points: ['tl', 'bl'], overflow: placements_autoAdjustOverflow, offset: [0, 4], targetOffset: targetOffset }, leftBottom: { points: ['br', 'bl'], overflow: placements_autoAdjustOverflow, offset: [-4, 0], targetOffset: targetOffset } }; /* harmony default export */ var es_placements = (placements); // CONCATENATED MODULE: ./node_modules/rc-tooltip/es/Content.js var Content_Content = function (_React$Component) { inherits_default()(Content, _React$Component); function Content() { classCallCheck_default()(this, Content); return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments)); } Content.prototype.componentDidUpdate = function componentDidUpdate() { var trigger = this.props.trigger; if (trigger) { trigger.forcePopupAlign(); } }; Content.prototype.render = function render() { var _props = this.props, overlay = _props.overlay, prefixCls = _props.prefixCls, id = _props.id; return react_default.a.createElement( 'div', { className: prefixCls + '-inner', id: id, role: 'tooltip' }, typeof overlay === 'function' ? overlay() : overlay ); }; return Content; }(react_default.a.Component); Content_Content.propTypes = { prefixCls: prop_types_default.a.string, overlay: prop_types_default.a.oneOfType([prop_types_default.a.node, prop_types_default.a.func]).isRequired, id: prop_types_default.a.string, trigger: prop_types_default.a.any }; /* harmony default export */ var es_Content = (Content_Content); // CONCATENATED MODULE: ./node_modules/rc-tooltip/es/Tooltip.js var Tooltip_Tooltip = function (_Component) { inherits_default()(Tooltip, _Component); function Tooltip() { var _temp, _this, _ret; classCallCheck_default()(this, Tooltip); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _ret = (_temp = (_this = possibleConstructorReturn_default()(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.getPopupElement = function () { var _this$props = _this.props, arrowContent = _this$props.arrowContent, overlay = _this$props.overlay, prefixCls = _this$props.prefixCls, id = _this$props.id; return [react_default.a.createElement( 'div', { className: prefixCls + '-arrow', key: 'arrow' }, arrowContent ), react_default.a.createElement(es_Content, { key: 'content', trigger: _this.trigger, prefixCls: prefixCls, id: id, overlay: overlay })]; }, _this.saveTrigger = function (node) { _this.trigger = node; }, _temp), possibleConstructorReturn_default()(_this, _ret); } Tooltip.prototype.getPopupDomNode = function getPopupDomNode() { return this.trigger.getPopupDomNode(); }; Tooltip.prototype.render = function render() { var _props = this.props, overlayClassName = _props.overlayClassName, trigger = _props.trigger, mouseEnterDelay = _props.mouseEnterDelay, mouseLeaveDelay = _props.mouseLeaveDelay, overlayStyle = _props.overlayStyle, prefixCls = _props.prefixCls, children = _props.children, onVisibleChange = _props.onVisibleChange, afterVisibleChange = _props.afterVisibleChange, transitionName = _props.transitionName, animation = _props.animation, placement = _props.placement, align = _props.align, destroyTooltipOnHide = _props.destroyTooltipOnHide, defaultVisible = _props.defaultVisible, getTooltipContainer = _props.getTooltipContainer, restProps = objectWithoutProperties_default()(_props, ['overlayClassName', 'trigger', 'mouseEnterDelay', 'mouseLeaveDelay', 'overlayStyle', 'prefixCls', 'children', 'onVisibleChange', 'afterVisibleChange', 'transitionName', 'animation', 'placement', 'align', 'destroyTooltipOnHide', 'defaultVisible', 'getTooltipContainer']); var extraProps = extends_default()({}, restProps); if ('visible' in this.props) { extraProps.popupVisible = this.props.visible; } return react_default.a.createElement( es["a" /* default */], extends_default()({ popupClassName: overlayClassName, ref: this.saveTrigger, prefixCls: prefixCls, popup: this.getPopupElement, action: trigger, builtinPlacements: placements, popupPlacement: placement, popupAlign: align, getPopupContainer: getTooltipContainer, onPopupVisibleChange: onVisibleChange, afterPopupVisibleChange: afterVisibleChange, popupTransitionName: transitionName, popupAnimation: animation, defaultPopupVisible: defaultVisible, destroyPopupOnHide: destroyTooltipOnHide, mouseLeaveDelay: mouseLeaveDelay, popupStyle: overlayStyle, mouseEnterDelay: mouseEnterDelay }, extraProps), children ); }; return Tooltip; }(react["Component"]); Tooltip_Tooltip.propTypes = { trigger: prop_types_default.a.any, children: prop_types_default.a.any, defaultVisible: prop_types_default.a.bool, visible: prop_types_default.a.bool, placement: prop_types_default.a.string, transitionName: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.object]), animation: prop_types_default.a.any, onVisibleChange: prop_types_default.a.func, afterVisibleChange: prop_types_default.a.func, overlay: prop_types_default.a.oneOfType([prop_types_default.a.node, prop_types_default.a.func]).isRequired, overlayStyle: prop_types_default.a.object, overlayClassName: prop_types_default.a.string, prefixCls: prop_types_default.a.string, mouseEnterDelay: prop_types_default.a.number, mouseLeaveDelay: prop_types_default.a.number, getTooltipContainer: prop_types_default.a.func, destroyTooltipOnHide: prop_types_default.a.bool, align: prop_types_default.a.object, arrowContent: prop_types_default.a.any, id: prop_types_default.a.string }; Tooltip_Tooltip.defaultProps = { prefixCls: 'rc-tooltip', mouseEnterDelay: 0, destroyTooltipOnHide: false, mouseLeaveDelay: 0.1, align: {}, placement: 'right', trigger: ['hover'], arrowContent: null }; /* harmony default export */ var es_Tooltip = (Tooltip_Tooltip); // CONCATENATED MODULE: ./node_modules/rc-tooltip/es/index.js /* harmony default export */ var rc_tooltip_es = (es_Tooltip); // EXTERNAL MODULE: ./node_modules/antd/node_modules/classnames/index.js var classnames = __webpack_require__("kTQ8"); var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); // CONCATENATED MODULE: ./node_modules/antd/es/tooltip/placements.js function _extends() { _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; }; return _extends.apply(this, arguments); } var autoAdjustOverflowEnabled = { adjustX: 1, adjustY: 1 }; var autoAdjustOverflowDisabled = { adjustX: 0, adjustY: 0 }; var placements_targetOffset = [0, 0]; function getOverflowOptions(autoAdjustOverflow) { if (typeof autoAdjustOverflow === 'boolean') { return autoAdjustOverflow ? autoAdjustOverflowEnabled : autoAdjustOverflowDisabled; } return _extends(_extends({}, autoAdjustOverflowDisabled), autoAdjustOverflow); } function placements_getPlacements() { var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; var _config$arrowWidth = config.arrowWidth, arrowWidth = _config$arrowWidth === void 0 ? 5 : _config$arrowWidth, _config$horizontalArr = config.horizontalArrowShift, horizontalArrowShift = _config$horizontalArr === void 0 ? 16 : _config$horizontalArr, _config$verticalArrow = config.verticalArrowShift, verticalArrowShift = _config$verticalArrow === void 0 ? 12 : _config$verticalArrow, _config$autoAdjustOve = config.autoAdjustOverflow, autoAdjustOverflow = _config$autoAdjustOve === void 0 ? true : _config$autoAdjustOve; var placementMap = { left: { points: ['cr', 'cl'], offset: [-4, 0] }, right: { points: ['cl', 'cr'], offset: [4, 0] }, top: { points: ['bc', 'tc'], offset: [0, -4] }, bottom: { points: ['tc', 'bc'], offset: [0, 4] }, topLeft: { points: ['bl', 'tc'], offset: [-(horizontalArrowShift + arrowWidth), -4] }, leftTop: { points: ['tr', 'cl'], offset: [-4, -(verticalArrowShift + arrowWidth)] }, topRight: { points: ['br', 'tc'], offset: [horizontalArrowShift + arrowWidth, -4] }, rightTop: { points: ['tl', 'cr'], offset: [4, -(verticalArrowShift + arrowWidth)] }, bottomRight: { points: ['tr', 'bc'], offset: [horizontalArrowShift + arrowWidth, 4] }, rightBottom: { points: ['bl', 'cr'], offset: [4, verticalArrowShift + arrowWidth] }, bottomLeft: { points: ['tl', 'bc'], offset: [-(horizontalArrowShift + arrowWidth), 4] }, leftBottom: { points: ['br', 'cl'], offset: [-4, verticalArrowShift + arrowWidth] } }; Object.keys(placementMap).forEach(function (key) { placementMap[key] = config.arrowPointAtCenter ? _extends(_extends({}, placementMap[key]), { overflow: getOverflowOptions(autoAdjustOverflow), targetOffset: placements_targetOffset }) : _extends(_extends({}, placements[key]), { overflow: getOverflowOptions(autoAdjustOverflow) }); placementMap[key].ignoreShake = true; }); return placementMap; } // EXTERNAL MODULE: ./node_modules/antd/es/config-provider/index.js + 1 modules var config_provider = __webpack_require__("PmSq"); // CONCATENATED MODULE: ./node_modules/antd/es/tooltip/index.js function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } 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; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function tooltip__extends() { tooltip__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; }; return tooltip__extends.apply(this, arguments); } var splitObject = function splitObject(obj, keys) { var picked = {}; var omitted = tooltip__extends({}, obj); keys.forEach(function (key) { if (obj && key in obj) { picked[key] = obj[key]; delete omitted[key]; } }); return { picked: picked, omitted: omitted }; }; // Fix Tooltip won't hide at disabled button // mouse events don't trigger at disabled button in Chrome // https://github.com/react-component/tooltip/issues/18 function getDisabledCompatibleChildren(element) { var elementType = element.type; if ((elementType.__ANT_BUTTON === true || elementType.__ANT_SWITCH === true || elementType.__ANT_CHECKBOX === true || element.type === 'button') && element.props.disabled) { // Pick some layout related style properties up to span // Prevent layout bugs like https://github.com/ant-design/ant-design/issues/5254 var _splitObject = splitObject(element.props.style, ['position', 'left', 'right', 'top', 'bottom', 'float', 'display', 'zIndex']), picked = _splitObject.picked, omitted = _splitObject.omitted; var spanStyle = tooltip__extends(tooltip__extends({ display: 'inline-block' }, picked), { cursor: 'not-allowed', width: element.props.block ? '100%' : null }); var buttonStyle = tooltip__extends(tooltip__extends({}, omitted), { pointerEvents: 'none' }); var child = /*#__PURE__*/react["cloneElement"](element, { style: buttonStyle, className: null }); return /*#__PURE__*/react["createElement"]("span", { style: spanStyle, className: element.props.className }, child); } return element; } var tooltip_Tooltip = /*#__PURE__*/function (_React$Component) { _inherits(Tooltip, _React$Component); var _super = _createSuper(Tooltip); function Tooltip(props) { var _this; _classCallCheck(this, Tooltip); _this = _super.call(this, props); _this.onVisibleChange = function (visible) { var onVisibleChange = _this.props.onVisibleChange; if (!('visible' in _this.props)) { _this.setState({ visible: _this.isNoTitle() ? false : visible }); } if (onVisibleChange && !_this.isNoTitle()) { onVisibleChange(visible); } }; _this.saveTooltip = function (node) { _this.tooltip = node; }; // 动态设置动画点 _this.onPopupAlign = function (domNode, align) { var placements = _this.getPlacements(); // 当前返回的位置 var placement = Object.keys(placements).filter(function (key) { return placements[key].points[0] === align.points[0] && placements[key].points[1] === align.points[1]; })[0]; if (!placement) { return; } // 根据当前坐标设置动画点 var rect = domNode.getBoundingClientRect(); var transformOrigin = { top: '50%', left: '50%' }; if (placement.indexOf('top') >= 0 || placement.indexOf('Bottom') >= 0) { transformOrigin.top = "".concat(rect.height - align.offset[1], "px"); } else if (placement.indexOf('Top') >= 0 || placement.indexOf('bottom') >= 0) { transformOrigin.top = "".concat(-align.offset[1], "px"); } if (placement.indexOf('left') >= 0 || placement.indexOf('Right') >= 0) { transformOrigin.left = "".concat(rect.width - align.offset[0], "px"); } else if (placement.indexOf('right') >= 0 || placement.indexOf('Left') >= 0) { transformOrigin.left = "".concat(-align.offset[0], "px"); } domNode.style.transformOrigin = "".concat(transformOrigin.left, " ").concat(transformOrigin.top); }; _this.renderTooltip = function (_ref) { var getContextPopupContainer = _ref.getPopupContainer, getPrefixCls = _ref.getPrefixCls; var _assertThisInitialize = _assertThisInitialized(_this), props = _assertThisInitialize.props, state = _assertThisInitialize.state; var customizePrefixCls = props.prefixCls, openClassName = props.openClassName, getPopupContainer = props.getPopupContainer, getTooltipContainer = props.getTooltipContainer; var children = props.children; var prefixCls = getPrefixCls('tooltip', customizePrefixCls); var visible = state.visible; // Hide tooltip when there is no title if (!('visible' in props) && _this.isNoTitle()) { visible = false; } var child = getDisabledCompatibleChildren( /*#__PURE__*/react["isValidElement"](children) ? children : /*#__PURE__*/react["createElement"]("span", null, children)); var childProps = child.props; var childCls = classnames_default()(childProps.className, _defineProperty({}, openClassName || "".concat(prefixCls, "-open"), true)); return /*#__PURE__*/react["createElement"](rc_tooltip_es, tooltip__extends({}, _this.props, { prefixCls: prefixCls, getTooltipContainer: getPopupContainer || getTooltipContainer || getContextPopupContainer, ref: _this.saveTooltip, builtinPlacements: _this.getPlacements(), overlay: _this.getOverlay(), visible: visible, onVisibleChange: _this.onVisibleChange, onPopupAlign: _this.onPopupAlign }), visible ? /*#__PURE__*/react["cloneElement"](child, { className: childCls }) : child); }; _this.state = { visible: !!props.visible || !!props.defaultVisible }; return _this; } _createClass(Tooltip, [{ key: "getPopupDomNode", value: function getPopupDomNode() { return this.tooltip.getPopupDomNode(); } }, { key: "getPlacements", value: function getPlacements() { var _this$props = this.props, builtinPlacements = _this$props.builtinPlacements, arrowPointAtCenter = _this$props.arrowPointAtCenter, autoAdjustOverflow = _this$props.autoAdjustOverflow; return builtinPlacements || placements_getPlacements({ arrowPointAtCenter: arrowPointAtCenter, verticalArrowShift: 8, autoAdjustOverflow: autoAdjustOverflow }); } }, { key: "isNoTitle", value: function isNoTitle() { var _this$props2 = this.props, title = _this$props2.title, overlay = _this$props2.overlay; return !title && !overlay && title !== 0; // overlay for old version compatibility } }, { key: "getOverlay", value: function getOverlay() { var _this$props3 = this.props, title = _this$props3.title, overlay = _this$props3.overlay; if (title === 0) { return title; } return overlay || title || ''; } }, { key: "render", value: function render() { return /*#__PURE__*/react["createElement"](config_provider["ConfigConsumer"], null, this.renderTooltip); } }], [{ key: "getDerivedStateFromProps", value: function getDerivedStateFromProps(nextProps) { if ('visible' in nextProps) { return { visible: nextProps.visible }; } return null; } }]); return Tooltip; }(react["Component"]); tooltip_Tooltip.defaultProps = { placement: 'top', transitionName: 'zoom-big-fast', mouseEnterDelay: 0.1, mouseLeaveDelay: 0.1, arrowPointAtCenter: false, autoAdjustOverflow: true }; Object(react_lifecycles_compat_es["polyfill"])(tooltip_Tooltip); /* harmony default export */ var tooltip = __webpack_exports__["default"] = (tooltip_Tooltip); /***/ }), /***/ "OJD5": /***/ (function(module, exports) { // removed by extract-text-webpack-plugin /***/ }), /***/ "ORE9": /***/ (function(module, exports) { module.exports = "data:image/png;base64,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" /***/ }), /***/ "OWew": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); // EXTERNAL MODULE: ./node_modules/tslib/tslib.es6.js var tslib_es6 = __webpack_require__("TToO"); // EXTERNAL MODULE: ./node_modules/echarts/index.js + 547 modules var echarts = __webpack_require__("XLwt"); // EXTERNAL MODULE: ./node_modules/react/index.js var react = __webpack_require__("GiK3"); var react_default = /*#__PURE__*/__webpack_require__.n(react); // EXTERNAL MODULE: ./node_modules/size-sensor/lib/index.js var lib = __webpack_require__("JyvE"); var lib_default = /*#__PURE__*/__webpack_require__.n(lib); // CONCATENATED MODULE: ./node_modules/echarts-for-react/esm/helper/pick.js /** * 保留 object 中的部分内容 * @param obj * @param keys */ function pick(obj, keys) { var r = {}; keys.forEach(function (key) { r[key] = obj[key]; }); return r; } //# sourceMappingURL=pick.js.map // CONCATENATED MODULE: ./node_modules/echarts-for-react/esm/helper/is-function.js function isFunction(v) { return typeof v === 'function'; } //# sourceMappingURL=is-function.js.map // CONCATENATED MODULE: ./node_modules/echarts-for-react/esm/helper/is-string.js function isString(v) { return typeof v === 'string'; } //# sourceMappingURL=is-string.js.map // EXTERNAL MODULE: ./node_modules/fast-deep-equal/index.js var fast_deep_equal = __webpack_require__("s6Sk"); var fast_deep_equal_default = /*#__PURE__*/__webpack_require__.n(fast_deep_equal); // CONCATENATED MODULE: ./node_modules/echarts-for-react/esm/helper/is-equal.js //# sourceMappingURL=is-equal.js.map // CONCATENATED MODULE: ./node_modules/echarts-for-react/esm/core.js /** * core component for echarts binding */ var core_EChartsReactCore = /** @class */ (function (_super) { Object(tslib_es6["b" /* __extends */])(EChartsReactCore, _super); function EChartsReactCore(props) { var _this = _super.call(this, props) || this; _this.echarts = props.echarts; _this.ele = null; _this.isInitialResize = true; return _this; } EChartsReactCore.prototype.componentDidMount = function () { this.renderNewEcharts(); }; // update EChartsReactCore.prototype.componentDidUpdate = function (prevProps) { /** * if shouldSetOption return false, then return, not update echarts options * default is true */ var shouldSetOption = this.props.shouldSetOption; if (isFunction(shouldSetOption) && !shouldSetOption(prevProps, this.props)) { return; } // 以下属性修改的时候,需要 dispose 之后再新建 // 1. 切换 theme 的时候 // 2. 修改 opts 的时候 // 3. 修改 onEvents 的时候,这样可以取消所有之前绑定的事件 issue #151 if (!fast_deep_equal_default()(prevProps.theme, this.props.theme) || !fast_deep_equal_default()(prevProps.opts, this.props.opts) || !fast_deep_equal_default()(prevProps.onEvents, this.props.onEvents)) { this.dispose(); this.renderNewEcharts(); // 重建 return; } // when these props are not isEqual, update echarts var pickKeys = ['option', 'notMerge', 'lazyUpdate', 'showLoading', 'loadingOption']; if (!fast_deep_equal_default()(pick(this.props, pickKeys), pick(prevProps, pickKeys))) { this.updateEChartsOption(); } /** * when style or class name updated, change size. */ if (!fast_deep_equal_default()(prevProps.style, this.props.style) || !fast_deep_equal_default()(prevProps.className, this.props.className)) { this.resize(); } }; EChartsReactCore.prototype.componentWillUnmount = function () { this.dispose(); }; /** * return the echart object * 1. if exist, return the existed instance * 2. or new one instance */ EChartsReactCore.prototype.getEchartsInstance = function () { return this.echarts.getInstanceByDom(this.ele) || this.echarts.init(this.ele, this.props.theme, this.props.opts); }; /** * dispose echarts and clear size-sensor */ EChartsReactCore.prototype.dispose = function () { if (this.ele) { try { Object(lib["clear"])(this.ele); } catch (e) { console.warn(e); } // dispose echarts instance this.echarts.dispose(this.ele); } }; /** * render a new echarts instance */ EChartsReactCore.prototype.renderNewEcharts = function () { var _this = this; var _a = this.props, onEvents = _a.onEvents, onChartReady = _a.onChartReady; // 1. new echarts instance var echartsInstance = this.updateEChartsOption(); // 2. bind events this.bindEvents(echartsInstance, onEvents || {}); // 3. on chart ready if (isFunction(onChartReady)) onChartReady(echartsInstance); // 4. on resize if (this.ele) { Object(lib["bind"])(this.ele, function () { _this.resize(); }); } }; // bind the events EChartsReactCore.prototype.bindEvents = function (instance, events) { function _bindEvent(eventName, func) { // ignore the event config which not satisfy if (isString(eventName) && isFunction(func)) { // binding event instance.on(eventName, function (param) { func(param, instance); }); } } // loop and bind for (var eventName in events) { if (Object.prototype.hasOwnProperty.call(events, eventName)) { _bindEvent(eventName, events[eventName]); } } }; /** * render the echarts */ EChartsReactCore.prototype.updateEChartsOption = function () { var _a = this.props, option = _a.option, _b = _a.notMerge, notMerge = _b === void 0 ? false : _b, _c = _a.lazyUpdate, lazyUpdate = _c === void 0 ? false : _c, showLoading = _a.showLoading, _d = _a.loadingOption, loadingOption = _d === void 0 ? null : _d; // 1. get or initial the echarts object var echartInstance = this.getEchartsInstance(); // 2. set the echarts option echartInstance.setOption(option, notMerge, lazyUpdate); // 3. set loading mask if (showLoading) echartInstance.showLoading(loadingOption); else echartInstance.hideLoading(); return echartInstance; }; /** * resize wrapper */ EChartsReactCore.prototype.resize = function () { // 1. get the echarts object var echartsInstance = this.getEchartsInstance(); // 2. call echarts instance resize if not the initial resize // resize should not happen on first render as it will cancel initial echarts animations if (!this.isInitialResize) { try { echartsInstance.resize(); } catch (e) { console.warn(e); } } // 3. update variable for future calls this.isInitialResize = false; }; EChartsReactCore.prototype.render = function () { var _this = this; var _a = this.props, style = _a.style, _b = _a.className, className = _b === void 0 ? '' : _b; // default height = 300 var newStyle = Object(tslib_es6["a" /* __assign */])({ height: 300 }, style); return (react_default.a.createElement("div", { ref: function (e) { _this.ele = e; }, style: newStyle, className: "echarts-for-react " + className })); }; return EChartsReactCore; }(react["PureComponent"])); /* harmony default export */ var core = (core_EChartsReactCore); //# sourceMappingURL=core.js.map // CONCATENATED MODULE: ./node_modules/echarts-for-react/esm/index.js // export the Component the echarts Object. var esm_EChartsReact = /** @class */ (function (_super) { Object(tslib_es6["b" /* __extends */])(EChartsReact, _super); function EChartsReact(props) { var _this = _super.call(this, props) || this; // 初始化为 echarts 整个包 _this.echarts = echarts; return _this; } return EChartsReact; }(core)); /* harmony default export */ var esm = __webpack_exports__["default"] = (esm_EChartsReact); //# sourceMappingURL=index.js.map /***/ }), /***/ "Ogtn": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _defineProperty2 = _interopRequireDefault(__webpack_require__("mAPx")); var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); __webpack_require__("11Jr"); var _decodeText = __webpack_require__("wUgD"); function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /** * IM可视化视图 */ var TextElement = exports.default = /*#__PURE__*/function (_Component) { function TextElement(props) { var _this; (0, _classCallCheck2.default)(this, TextElement); _this = _callSuper(this, TextElement, [props]); _this.state = { isMine: props.isMine, payload: props.payload }; return _this; } (0, _inherits2.default)(TextElement, _Component); return (0, _createClass2.default)(TextElement, [{ key: "componentDidMount", value: function componentDidMount() {} }, { key: "componentWillReceiveProps", value: function componentWillReceiveProps(nextProps) { this.setState({ isMine: nextProps.isMine, payload: nextProps.payload }); } }, { key: "render", value: function render() { var contentList = (0, _decodeText.decodeText)(this.state.payload); return /*#__PURE__*/_react.default.createElement("div", (0, _defineProperty2.default)({ className: "text-element-wrapper" }, "className", this.state.isMine ? 'element-send' : 'element-received'), /*#__PURE__*/_react.default.createElement("div", { className: "text-element" }, contentList.map(function (item, index) { if (item.name === 'text') { return /*#__PURE__*/_react.default.createElement("span", { key: index }, item.text); } else { return /*#__PURE__*/_react.default.createElement("img", { src: item.src, style: { width: '20px', height: '20px' }, key: index }); } }))); } }]); }(_react.Component); /***/ }), /***/ "Oilc": /***/ (function(module, exports) { module.exports = "data:image/png;base64,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" /***/ }), /***/ "OwOc": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return DEFAULT_FONT_SIZE; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return DEFAULT_FONT_FAMILY; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return DEFAULT_FONT; }); /* unused harmony export DEFAULT_TEXT_WIDTH_MAP */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return platformApi; }); /* harmony export (immutable) */ __webpack_exports__["e"] = setPlatformAPI; var DEFAULT_FONT_SIZE = 12; var DEFAULT_FONT_FAMILY = 'sans-serif'; var DEFAULT_FONT = DEFAULT_FONT_SIZE + "px " + DEFAULT_FONT_FAMILY; var OFFSET = 20; var SCALE = 100; var defaultWidthMapStr = "007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N"; function getTextWidthMap(mapStr) { var map = {}; if (typeof JSON === 'undefined') { return map; } for (var i = 0; i < mapStr.length; i++) { var char = String.fromCharCode(i + 32); var size = (mapStr.charCodeAt(i) - OFFSET) / SCALE; map[char] = size; } return map; } var DEFAULT_TEXT_WIDTH_MAP = getTextWidthMap(defaultWidthMapStr); var platformApi = { createCanvas: function () { return typeof document !== 'undefined' && document.createElement('canvas'); }, measureText: (function () { var _ctx; var _cachedFont; return function (text, font) { if (!_ctx) { var canvas = platformApi.createCanvas(); _ctx = canvas && canvas.getContext('2d'); } if (_ctx) { if (_cachedFont !== font) { _cachedFont = _ctx.font = font || DEFAULT_FONT; } return _ctx.measureText(text); } else { text = text || ''; font = font || DEFAULT_FONT; var res = /((?:\d+)?\.?\d*)px/.exec(font); var fontSize = res && +res[1] || DEFAULT_FONT_SIZE; var width = 0; if (font.indexOf('mono') >= 0) { width = fontSize * text.length; } else { for (var i = 0; i < text.length; i++) { var preCalcWidth = DEFAULT_TEXT_WIDTH_MAP[text[i]]; width += preCalcWidth == null ? fontSize : (preCalcWidth * fontSize); } } return { width: width }; } }; })(), loadImage: function (src, onload, onerror) { var image = new Image(); image.onload = onload; image.onerror = onerror; image.src = src; return image; } }; function setPlatformAPI(newPlatformApis) { for (var key in platformApi) { if (newPlatformApis[key]) { platformApi[key] = newPlatformApis[key]; } } } /***/ }), /***/ "P4e/": /***/ (function(module, exports) { // removed by extract-text-webpack-plugin /***/ }), /***/ "PK9/": /***/ (function(module, exports) { // removed by extract-text-webpack-plugin /***/ }), /***/ "PNws": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; __webpack_require__("baa2"); var _icon = _interopRequireDefault(__webpack_require__("FC3+")); var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); var _dva = __webpack_require__("S6G3"); __webpack_require__("11Jr"); var _timJsSdk = _interopRequireDefault(__webpack_require__("B5T/")); var _dec, _class; /** * IM可视化视图 */ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } var ImageElement = exports.default = (_dec = (0, _dva.connect)(function (state) { return { currentMessageList: state.im.currentMessageList }; }), _dec(_class = /*#__PURE__*/function (_Component) { function ImageElement(props) { var _this; (0, _classCallCheck2.default)(this, ImageElement); _this = _callSuper(this, ImageElement, [props]); _this.state = { // isMine: props.isMine, payload: props.payload, imagePreviewerStatus: false, //预览图片弹窗状态 imgUrlList: [], //会话中的所有图片列表 zoom: 1, index: 0 }; return _this; } (0, _inherits2.default)(ImageElement, _Component); return (0, _createClass2.default)(ImageElement, [{ key: "componentDidMount", value: function componentDidMount() { this.setState({ imgUrlList: this.imgUrlList() }); } }, { key: "imgUrlList", value: function imgUrlList() { return this.props.currentMessageList.filter(function (message) { return message.type === _timJsSdk.default.TYPES.MSG_IMAGE; }).map(function (message) { return message.payload.imageInfoArray[0].url; }); } }, { key: "componentWillReceiveProps", value: function componentWillReceiveProps(nextProps) { this.setState({ // isMine: nextProps.isMine, payload: nextProps.payload }); } }, { key: "formatUrl", value: function formatUrl(url) { if (!url) { return ''; } return url.slice(0, 2) === '//' ? "https:".concat(url) : url; } }, { key: "render", value: function render() { var _this2 = this; var imageUrl = ''; var url = this.state.payload.imageInfoArray[0].url; if (typeof url !== 'string') { imageUrl = ''; } imageUrl = url.slice(0, 2) === '//' ? "https:".concat(url) : url; return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("img", { className: "image-element", src: imageUrl, onClick: function onClick() { _this2.setState({ imagePreviewerStatus: true }); } }), /*#__PURE__*/_react.default.createElement("div", { className: "image-previewer-wrapper", style: { display: this.state.imagePreviewerStatus ? 'block' : 'none' } }, /*#__PURE__*/_react.default.createElement("div", { className: "image-wrapper" }, /*#__PURE__*/_react.default.createElement("img", { className: "image-preview" // style="{transform: `scale(${zoom}) rotate(${rotate}deg)`}" , src: this.formatUrl(this.state.imgUrlList[this.state.index]) // @click="close" })), /*#__PURE__*/_react.default.createElement(_icon.default, { type: "close", className: "close-button", onClick: function onClick() { _this2.setState({ imagePreviewerStatus: false }); } }))); } }]); }(_react.Component)) || _class); /***/ }), /***/ "Pdzk": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; __webpack_require__("UQ5M"); var _message2 = _interopRequireDefault(__webpack_require__("/qCn")); var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("jlIA")); var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); __webpack_require__("gZEk"); var _form = _interopRequireDefault(__webpack_require__("8rR3")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); var _dva = __webpack_require__("S6G3"); var _index = _interopRequireDefault(__webpack_require__("m4Fn")); var _MouseMovement = _interopRequireDefault(__webpack_require__("06MX")); var _dec, _dec2, _class; /** * 海康的设备视频流 */ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i.return) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); } function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, _regeneratorDefine2(e, r, n, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } // import { throttleAll } from "_lodash-decorators@6.0.1@lodash-decorators"; var NanNing = exports.default = (_dec = _form.default.create(), _dec2 = (0, _dva.connect)(function (state) { return {}; }), _dec(_class = _dec2(_class = /*#__PURE__*/function (_Component) { function NanNing(props) { var _this2; (0, _classCallCheck2.default)(this, NanNing); _this2 = _callSuper(this, NanNing, [props]); _this2.state = { player: null, mode: 0, isPlay: false, currentUrl: "" }; return _this2; } (0, _inherits2.default)(NanNing, _Component); return (0, _createClass2.default)(NanNing, [{ key: "componentDidMount", value: function componentDidMount() { this.initH5Player(); } }, { key: "componentDidUpdate", value: function componentDidUpdate(prevProps) { if (this.props.videoUrl && this.state.currentUrl != this.props.videoUrl) { this.setState({ currentUrl: this.props.videoUrl }); console.log('this.props.videoUrl', this.props.videoUrl); this.realplay(); } } }, { key: "initH5Player", value: function initH5Player() { var _window = window, JSPlugin = _window.JSPlugin; if (!JSPlugin) { var script = document.createElement('script'); script.type = 'text/javascript'; script.async = true; script.src = '/sdk/h5player.min.js'; document.head.appendChild(script); this.loading(); } else { this.initPlayer(); } } }, { key: "loading", value: function loading() { var _this = this; function nextStep() { return new Promise(function (resolve) { setTimeout(function () { resolve("JSPlugin" in window); }, 500); }); } function ajaxPlay() { return _ajaxPlay.apply(this, arguments); } function _ajaxPlay() { _ajaxPlay = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator().m(function _callee() { var ifComplete, i, _window2, JSPlugin; return _regenerator().w(function (_context) { while (1) switch (_context.n) { case 0: ifComplete = false; i = 0; case 1: if (!(i < 10)) { _context.n = 6; break; } if (ifComplete) { _context.n = 3; break; } console.log("没有"); _context.n = 2; return nextStep(); case 2: ifComplete = _context.v; _context.n = 5; break; case 3: if (!ifComplete) { _context.n = 4; break; } _window2 = window, JSPlugin = _window2.JSPlugin; console.log("第" + i + "次加载" + "play。。。"); console.log(JSPlugin); if (!JSPlugin) { initH5Player.call(_this); } else { // initPlayer.call(_this) _this.initPlayer(); } return _context.a(3, 6); case 4: _message2.default.error("网络超时"); case 5: i++; _context.n = 1; break; case 6: return _context.a(2); } }, _callee); })); return _ajaxPlay.apply(this, arguments); } ajaxPlay(); } }, { key: "initPlayer", value: function initPlayer() { var _this3 = this; var player = new window.JSPlugin({ szId: 'player', szBasePath: "/sdk", iMaxSplit: 4, iCurrentSplit: 1, openDebug: true, oStyle: { borderSelect: '#000' } }); this.setState({ player: player }, function () { // 事件回调绑定 var _this = _this3; _this3.state.player.JS_SetWindowControlCallback({ windowEventSelect: function windowEventSelect(iWndIndex) { //插件选中窗口回调 console.log('windowSelect callback: ', iWndIndex); }, pluginErrorHandler: function pluginErrorHandler(iWndIndex, iErrorCode, oError) { //插件错误回调 console.log("iErrorCode--->", iErrorCode); _this.closeVideoPlay(); switch (iErrorCode) { case '0x0190003e': console.log(0x0190003e); _message2.default.info('该车辆未发车'); break; case 11: console.log(11); _message2.default.info('当前信号不佳,请重新播放'); break; default: console.log('default'); _message2.default.info('加载失败,请重新播放'); } return; }, windowEventOver: function windowEventOver(iWndIndex) {//鼠标移过回调 //console.log(iWndIndex); }, windowEventOut: function windowEventOut(iWndIndex) {//鼠标移出回调 //console.log(iWndIndex); }, windowEventUp: function windowEventUp(iWndIndex) {//鼠标mouseup事件回调 //console.log(iWndIndex); }, windowFullCcreenChange: function windowFullCcreenChange(bFull) { //全屏切换回调 console.log('fullScreen callback: ', bFull); }, firstFrameDisplay: function firstFrameDisplay(iWndIndex, iWidth, iHeight) { //首帧显示回调 console.log('firstFrame loaded callback: ', iWndIndex, iWidth, iHeight); }, performanceLack: function performanceLack() { //性能不足回调 console.log('performanceLack callback: '); } }); }); } /* 视频播放 */ }, { key: "realplay", value: function realplay() { var _this4 = this; var _this$state = this.state, player = _this$state.player, mode = _this$state.mode, isPlay = _this$state.isPlay; var videoUrl = this.props.videoUrl; console.log(videoUrl); var index = player.currentWindowIndex; if (isPlay) { player.JS_Stop(index).then(function () { player.JS_Play(videoUrl, { playURL: videoUrl, mode: mode }, index).then(function () { console.log('realplay success'); _this4.setState({ isPlay: true }); }, function (e) { console.error(e); }); }); } else { player.JS_Play(videoUrl, { playURL: videoUrl, mode: mode }, index).then(function () { console.log('realplay success'); }, function (e) { console.error(e); }); } } // 关闭播放器 }, { key: "closeVideoPlay", value: function closeVideoPlay() { // const { player, isPlay } = this.state; // if (isPlay) { // player.JS_Stop(player.currentWindowIndex).then(() => { // console.log('stop') // this.props.closeHaikangVideo(); // }) // }else{ // console.log("close") // this.props.closeHaikangVideo(); // } this.props.closeHaikangVideo(); } // 全屏 }, { key: "wholeFullScreen", value: function wholeFullScreen() { this.state.player.JS_FullScreenDisplay(true).then(function () { console.log("wholeFullScreen success"); }, function (e) { console.error(e); }); } }, { key: "render", value: function render() { return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("div", { className: _index.default.fullScreen, onClick: this.wholeFullScreen.bind(this) }), /*#__PURE__*/_react.default.createElement("div", { style: { position: 'absolute', top: '-2px', right: '20px', fontSize: '16px', cursor: 'pointer' }, onClick: this.closeVideoPlay.bind(this) }, "x"), /*#__PURE__*/_react.default.createElement("div", { className: _index.default.hk, id: "player" })); } }]); }(_react.Component)) || _class) || _class); /***/ }), /***/ "Pe7w": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAA6hJREFUaEPtmk1IFGEYx//PrGZp1CWTiiAiuhV2qkO4I1oQ9HEogw4RBH1QVO5sChmkBhUUO1pEYJc6RER2KAyEStzdoI9DJHVKqlOX8hCVVpY7/5jdmWXcXT92HZ0JnNMw79f/9zzPvu/zvu8K/vNH/nP9yAmw5QoX/DSwHgYqhSjzEpKCISjoK1Xwsvu4fM/UkgWgtnGXQVwDUe6l8KyxBQOK4Eg0JPecZaMAkuINdPpKeIYYRUGdEyINYIbN0AjeOyzfL4IHQvz0EoiCUhI7AKxO6hAMlBVhlR1OaYBgOzcxgUeW2P6F87Gu65B4Kt423LYOln4bxGsbQgLYHKuXxyke6wnqbCBxMflRcCmmSaOXls8cO6jzIokGS19jTJNLowDUCFsMoNn8qACt0bC0FAoQ1HkOwHEAV2KanC60H2e7sfSlPTARQPVl1iQMLKxYhgeduyUxnqiqCIcBzAHwJx6WEs8B1Ag3GMBzy2Wdi5djz3gQVRHSFh0PiyuL5ZQ8UN3O9YkEXtiiRHC7OoS9LSJGLuv6DsAUGdSpkwilIYCbUQ37RSRtbbvMlwCmuKoIrwI46vDE9WgIhzMhfAtAUtQ2dJA4kA4dwdW4JsecoeRbAFOkCRFsww0Q+xzhpMfCEvZ9CNkCW0ilV8ctAnvSEAouxELSZIWav2ahXDON2ssi4zXugNhpl9sLoK9DyAlzsIPF7wZxj8B2Rzg1ETjvq3VgvJW07i7nfPmE+yS25Krni4VsolRAvcG5/IouErWZdT0HMBMzEiet3GYilqxyPwD8IDE/b+WpxIlxTZSC2mY0KjgXKtgDAnMqfRbXZKOnAG4M7kYfBXvAjcHd6GMWwA0rTqWPoM4zJFqTc4OgOabJ2dQ8YT0TbSmnMrgbbdU2qiSeWAC10ZBEPQeo0zlvQEENE1gjwJh7ZwLDEsDbIuKD+d4Tko+O1CX1OtMeqGnn2r+J5Clg6sBqck9/cQB1PfXyxlMA0/Kfib48xdua+ysElZ2a/PIshNR2bjUS6Jqc0bNrKQFsi9bLQ88AghGecqbc+YII0BQLywXPAJy/t3zFm/WdJ4eeTKOzAI6z21kPFBLDsyGUK4Rm8oJjWjwwk1dM07IOJO+G/yaTpUVWXLt/yScYkQC6SSxxfSVOJnQzcM0qwFCJgZW/FTx1NRdK7wum+aLbBCgtxtI/Bla4mo06p8Np+6uBFUK9J+SVOV6++4FyAz12FpqVThcyn/uhjSsXcF6C/APUfdNPMejk3AAAAABJRU5ErkJggg==" /***/ }), /***/ "Pfdv": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAASJJREFUOE+lk71KA0EUhb+7mCaSjVoLYiP2Vhb6DlZKXsFmNbYBH2BFhegDiGBhYWWjlQi+gtiIQgoRxGQTC0N2j6z4E7KbZI3TDMzM+WbuOXeMfw77q971dB1rgj1biucfQLGsBYWcAWMmjsMcfsu3594LXE/6AnxqfwGergTLXYIAUQkmqbJt0fd6H4DM9WgB+URJxo3jUKrv2GO8lwpwNzSFeOnrh3g1h7XGrl2kAibWNRPleBhkqKBtDitEnCc8KGxqziLuhiUiqBlMJwFlzVvI7ciA4pZm1eF+5BIymQirjX27HBRjExhPjbFNqX4wIMZYVEw2UhOjEtSocmrhkEaCgqdFgyNB3jFOOu/4b4f2lLmVhyXQ9YL0z5QV0HvuA0mPixHOexoSAAAAAElFTkSuQmCC" /***/ }), /***/ "PgSr": /***/ (function(module, exports) { module.exports = "data:image/png;base64,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" /***/ }), /***/ "PmMp": /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.policeAddPictueMarks = policeAddPictueMarks; exports.policeReduceMarks = policeReduceMarks; var _markMarkers = __webpack_require__("CEIq"); /** * 这里主要是抽离出警保联动图层放在GIS的公共方法 */ //一张图数据展示的增加打点 function policeAddPictueMarks(addData, place, tab) { // if (data.length == 0) { // return message.warning("该部门暂无定位数据"); // } var policeMarkers = _markMarkers.markPolice.call(this, addData); //打点到地图中 this.state.map.add(policeMarkers); this.state.map.setFitView(policeMarkers); //添加打点位置到缓存 this.props.dispatch({ type: "command/fetchPoliceData", payload: { options: 'add', tab: tab, place: place, markerData: policeMarkers, personData: addData } }); } //一张图数据展示的减少打点 function policeReduceMarks(reduceData, place, tab) { if (reduceData && reduceData.length > 0) { this.state.map.remove(reduceData); //清除打点信息(因为每次打点的信息都是不一样的,需要随时更新) this.props.dispatch({ type: "command/fetchPoliceData", payload: { options: 'reduce', tab: tab, place: place, markerData: null } }); } } /***/ }), /***/ "PoMe": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); __webpack_require__("sRCI"); var _modal = _interopRequireDefault(__webpack_require__("vnWH")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); var _dva = __webpack_require__("S6G3"); var _classnames = _interopRequireDefault(__webpack_require__("HW6M")); var _index = _interopRequireDefault(__webpack_require__("W7F7")); var _events = _interopRequireDefault(__webpack_require__("TLe5")); var _PersonItem = _interopRequireDefault(__webpack_require__("baF6")); var _dec, _class; //渲染每一个人员item /** * 通过搜索获得地图列表(保安人员) */ // 引入 EventEmitter function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } // import "../person.less"; var confirm = _modal.default.confirm; var PoliceList = exports.default = (_dec = (0, _dva.connect)(function (state) { return { selectedId: state.command.personList.selectedId, layoutAuthority: state.command.layoutAuthority, mapStyle: state.command.mapStyle // tabIndex2: state.command.tabIndex.person.tabIndex2, }; }), _dec(_class = /*#__PURE__*/function (_Component) { function PoliceList(props) { var _this; (0, _classCallCheck2.default)(this, PoliceList); _this = _callSuper(this, PoliceList, [props]); _this.state = { data: props.data || [], // height: '',Z loadingText: "" }; return _this; } (0, _inherits2.default)(PoliceList, _Component); return (0, _createClass2.default)(PoliceList, [{ key: "componentDidMount", value: function componentDidMount() {} }, { key: "componentWillReceiveProps", value: function componentWillReceiveProps(nextProps) { this.setState({ loadingText: nextProps.loadingText }); if (nextProps.data != this.state.data) { this.setState({ data: nextProps.data }); } } }, { key: "render", value: function render() { var mapStyle = this.props.mapStyle; var clsString = (0, _classnames.default)(_index.default[mapStyle], 'security', 'search-list_command', 'amap_lib_placeSearch'); return /*#__PURE__*/_react.default.createElement("div", { className: clsString }, /*#__PURE__*/_react.default.createElement("div", { className: "list", style: { maxHeight: this.state.height, overflow: "auto" } }, /*#__PURE__*/_react.default.createElement(_PersonItem.default, { data: this.state.data, loadingText: " " }))); } }]); }(_react.Component)) || _class); /***/ }), /***/ "Prs7": /***/ (function(module, exports) { module.exports = "data:image/png;base64,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" /***/ }), /***/ "PtIz": /***/ (function(module, exports) { module.exports = "data:image/png;base64,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" /***/ }), /***/ "Px4o": /***/ (function(module, exports) { // removed by extract-text-webpack-plugin /***/ }), /***/ "Q+cA": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAAEEfUpiAAAAAXNSR0IArs4c6QAAAyBJREFUWAntV71rFEEU/727MwENhx+9gn+BRdRCUliolURICjEGJIhGEESJbFBLhVsDNnZq4Uc6IxaChUGwsRIEEcRCjGCnIBg8kCS3429md3Z39nbv9gIXEB2Ym3kfv/fevDcfe0CmiaEbSll+xU4wK0YYavjqeST4FSu4E20jsiPw1TAU3rga2kZkJzSqxb5acbVIeTJgvYZmBEs0t4uiOLzEQir42FIUe0yva2Jj0CsecCxUMIbL8iwMRmELg9vk9ABHNaBiM2LQdWx3rPjqc7wcI1jGD47LaaWKLUOKWY/nnuyuRcQIBFdigZ54csah+0YkpdAu8sqR51pw14YYrkEDBXuZR7cJ7pF32mVGVIhZctOoZYIF9lPYbwozRY5nMlnDsOFHeDskpa5hBKt4awUdR70E4AT7l3AJngwZQCO7hgIzCh8ZlcG4S9BrLtNm5VYZtb9EJ9lIDXWWZbpdIu4mN9E2q2cPg67/mDmQVlI8bk2L3CqkJSXnFV5oQYcz8CnXjq/GLSZZQlZTUEcVg1jD96woTbcvQZ8DwWHm4yW7lt+noaHoHLxKg/W8PQJFgG0t3CHwPFooegjoQaFJpabFZMZRyr9meJpcs5hkH/jqBZUP5Si3s1J3fpIDfcLW0ZIINNhXT/k72NFOFTOYkQ9Wx02iwjErKBxbeE1ZbKBQ779gwzLg7gLrtpc9aTHdxtRjmFZN9nGau4HzcBv7ap6nMMxGFdcQ9CkCX+2jnwvGuuAbb/aLNgP6kQ17gB0l3D80r72++XprO6lufY1qqA2gnBnhvQgcIOo6L/RFruAB86YPtn6STpJ/nLPfhi75494keSDBIxp+EosCTLNEk4a+qaYom+B9/5OfNePkTzOQSfJWjTzAOab8SIzNmXQPQNFgK3KYNRDwFReMYoVfpwoHjVjhsclTVreADgPwxC2FX/IbC9hMZ4sFttvZniyQ6Rx913E7pO8cJ5rYm1IVzGEP0+r+O4kVepzoV3tW3ueh8veASMC38RIDmMgD9cwT3CCmhwC0hyqusr7vWLHOD3S3aBQ/aKqY76b278r/AAajzJ99YhOYAAAAAElFTkSuQmCC" /***/ }), /***/ "Q3h8": /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.showCompanyPointInfo = exports.showAttendPointInfo = exports.showAttendList = exports.getCompanyList = void 0; var attend = _interopRequireWildcard(__webpack_require__("mkdi")); var company = _interopRequireWildcard(__webpack_require__("/nwH")); function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } // 驻勤点 // 驻勤点 var showAttendPointInfo = exports.showAttendPointInfo = attend.showAttendPointInfo, showAttendList = exports.showAttendList = attend.showAttendList; var showCompanyPointInfo = exports.showCompanyPointInfo = company.showCompanyPointInfo, getCompanyList = exports.getCompanyList = company.getCompanyList; /***/ }), /***/ "Q7hp": /***/ (function(module, exports, __webpack_require__) { var baseGet = __webpack_require__("uCi2"); /** * Gets the value at `path` of `object`. If the resolved value is * `undefined`, the `defaultValue` is returned in its place. * * @static * @memberOf _ * @since 3.7.0 * @category Object * @param {Object} object The object to query. * @param {Array|string} path The path of the property to get. * @param {*} [defaultValue] The value returned for `undefined` resolved values. * @returns {*} Returns the resolved value. * @example * * var object = { 'a': [{ 'b': { 'c': 3 } }] }; * * _.get(object, 'a[0].b.c'); * // => 3 * * _.get(object, ['a', '0', 'b', 'c']); * // => 3 * * _.get(object, 'a.b.c', 'default'); * // => 'default' */ function get(object, path, defaultValue) { var result = object == null ? undefined : baseGet(object, path); return result === undefined ? defaultValue : result; } module.exports = get; /***/ }), /***/ "QBvF": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; __webpack_require__("baa2"); var _icon = _interopRequireDefault(__webpack_require__("FC3+")); var _objectSpread2 = _interopRequireDefault(__webpack_require__("+TWC")); var _defineProperty2 = _interopRequireDefault(__webpack_require__("mAPx")); var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("jlIA")); var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); var _dva = __webpack_require__("S6G3"); var _api = __webpack_require__("H/Zg"); var _PersonItem = _interopRequireDefault(__webpack_require__("zW9u")); var _index = _interopRequireDefault(__webpack_require__("XhzF")); var _dec, _class; /** * 人员信息 */ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i.return) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); } function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, _regeneratorDefine2(e, r, n, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } var PersonList = exports.default = (_dec = (0, _dva.connect)(function (state) { return { tab1Data: state.command.policeData.tab1, mapStyle: state.command.mapStyle }; }), _dec(_class = /*#__PURE__*/function (_PureComponent) { function PersonList(props) { var _this; (0, _classCallCheck2.default)(this, PersonList); _this = _callSuper(this, PersonList, [props]); _this.state = { enterpriseList: [], //企业信息列表 allHeight: null, currentTab: 1 }; return _this; } (0, _inherits2.default)(PersonList, _PureComponent); return (0, _createClass2.default)(PersonList, [{ key: "componentDidMount", value: function componentDidMount() { var allHeight = document.documentElement.clientHeight - 140 - 16; this.setState({ allHeight: allHeight }); this._getEnterpriseList(); } }, { key: "componentWillReceiveProps", value: function componentWillReceiveProps(nextProps) { var _this2 = this; var enterpriseList = JSON.parse(JSON.stringify(this.state.enterpriseList)); if (this.state.currentTab != nextProps.clickTab) { enterpriseList.map(function (data, index) { if (data.open) { data.open = false; if (data.children.length > 0) { data.children.map(function (child) { _this2.close(child); _this2.closeSubordinateOpenStatus(child.children.departList); }); } } }); this.setState({ enterpriseList: enterpriseList }); } } //获取企业列表 }, { key: "_getEnterpriseList", value: function _getEnterpriseList() { var _this3 = this; var _currpage = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1; (0, _api.getEnterpriseList)({ _currpage: _currpage, lines: 10 }, { appId: "__ZLuP7RGirprZZ6SCdiX", viewId: "__xzByH4ZZxj2gVJZv0G4", opentarget: "detail", containTitle: "企业信息接口" }).then(function (res) { _this3.setState({ enterpriseList: _this3.state.enterpriseList.concat(res.data.data) }); //如果没有加载完,需要再一次加载 var _res$data = res.data, pageNumber = _res$data.pageNumber, pageSize = _res$data.pageSize, total = _res$data.total; if (total > pageNumber * pageSize) { _this3._getEnterpriseList(_currpage + 1); } }); } //根据对应企业id的获取部门列表 }, { key: "_passEnterpriseIDGetDepartList", value: function _passEnterpriseIDGetDepartList() { var _this4 = this; var _currpage = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1; var enterpriseId = arguments.length > 1 ? arguments[1] : undefined; var index = arguments.length > 2 ? arguments[2] : undefined; (0, _api.passEnterpriseIDGetDepartList)({ _currpage: 1, lines: 10 }, { did: enterpriseId, //企业id appId: "__ZLuP7RGirprZZ6SCdiX", viewId: "__MbFPvXeIwgTOEoodAVc", opentarget: "detail", containTitle: "部门信息接口", field: "" }).then(function (res) { //第一级的部门存储在企业列表信息下 var enterpriseList = _this4.state.enterpriseList; var value = JSON.parse(JSON.stringify(enterpriseList)); if (value[index].children) { value[index].children = value[index].children.concat(res.data.data); } else { value[index].children = res.data.data || []; } _this4.setState({ enterpriseList: value }); //如果没有加载完,需要再一次加载 var _res$data2 = res.data, pageNumber = _res$data2.pageNumber, pageSize = _res$data2.pageSize, total = _res$data2.total; if (total > pageNumber * pageSize) { _this4._passEnterpriseIDGetDepartList(_currpage + 1, enterpriseId); } }); } //获取部门和人员 }, { key: "_getDepartAndPerson", value: function () { var _getDepartAndPerson2 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator().m(function _callee() { var _currpage, departID, place, _args = arguments; return _regenerator().w(function (_context) { while (1) switch (_context.n) { case 0: _currpage = _args.length > 0 && _args[0] !== undefined ? _args[0] : 1; departID = _args.length > 1 ? _args[1] : undefined; place = _args.length > 2 ? _args[2] : undefined; _context.n = 1; return this._passDepartIdGetDepartList(_currpage, departID, place); case 1: return _context.a(2); } }, _callee, this); })); function _getDepartAndPerson() { return _getDepartAndPerson2.apply(this, arguments); } return _getDepartAndPerson; }() //根据部门id查询下级部门 }, { key: "_passDepartIdGetDepartList", value: function _passDepartIdGetDepartList() { var _this5 = this; var _currpage = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1; var departID = arguments.length > 1 ? arguments[1] : undefined; var place = arguments.length > 2 ? arguments[2] : undefined; (0, _api.passDepartIdGetDepartList)({ _currpage: _currpage, lines: 10 }, { did: departID, appId: "__ZLuP7RGirprZZ6SCdiX", viewId: "__uPN8uNlIhDaGiEgKxnX", opentarget: "detail", containTitle: "根据部门id查询下级部门id" }).then(function (res) { var value; if (_this5.state[departID]) { value = { parentId: departID, departList: _this5.state[departID].departList.concat(res.data.data), personList: [], open: true }; } else { value = { parentId: departID, departList: res.data.data, personList: [] }; } _this5.setState((0, _defineProperty2.default)({}, departID, value), function () { //如果没有加载完,需要再一次加载 var _res$data3 = res.data, pageNumber = _res$data3.pageNumber, pageSize = _res$data3.pageSize, total = _res$data3.total; if (total > pageNumber * pageSize) { _this5._passDepartIdGetDepartList(_currpage + 1, departID, place); } else { //查询人员 _this5._passDepartIdGetPersonList(_currpage, departID, place); } }); }); } //根据部门id查询保安员 }, { key: "_passDepartIdGetPersonList", value: function _passDepartIdGetPersonList() { var _this6 = this; var _currpage = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1; var departID = arguments.length > 1 ? arguments[1] : undefined; var place = arguments.length > 2 ? arguments[2] : undefined; (0, _api.passDepartIdGetPersonList)({ _currpage: _currpage, lines: 100 }, { did: departID, appId: "__ZLuP7RGirprZZ6SCdiX", viewId: "__P1bb27ekxYoAiowqVv1", opentarget: "detail", containTitle: "部门ID查询保安员信息接口" }).then(function (res) { var data = res.data.data; data.map(function (element, index) { var location = element.position && JSON.parse(element.position); if (location) { data[index].longitude = location.longitude || ''; data[index].latitude = location.latitude || ''; data[index].name = element.securityName; } data[index].mobilePhone = element.phone; }); var value = _this6.state[departID]; if (!value) { value = { departList: [], personList: [] }; } value.personList = value.personList.concat(data); value.place = place; //打点 _this6.props.addPoliceMarks(data, place, 'tab1'); //1指tab _this6.setState((0, _defineProperty2.default)({}, departID, value), function () { //如果没有加载完,需要再一次加载 var _res$data4 = res.data, pageNumber = _res$data4.pageNumber, pageSize = _res$data4.pageSize, total = _res$data4.total; if (total > pageNumber * pageSize) { _this6._passDepartIdGetPersonList(_currpage + 1, departID, place); } else if (place) { _this6.setValue(place, _this6.state[departID]); } }); }); } //将取到的部门跟人员数据存储起来 }, { key: "setValue", value: function setValue(place, data) { var enterpriseList = JSON.parse(JSON.stringify(this.state.enterpriseList)); var value; if (place.length < 3) { for (var i = 0; i < place.length; i++) { if (i == 0) { value = enterpriseList[place[i]]; } else { value = value.children[place[i]]; } } value.children = (0, _objectSpread2.default)({}, data); } else { for (var i = 0; i < place.length; i++) { if (i == 0) { value = enterpriseList[place[i]]; } else if (i == 1) { value = value.children[place[i]]; } else { value = value.children.departList[place[i]]; } } value.children = (0, _objectSpread2.default)({}, data); } this.setState({ enterpriseList: enterpriseList }); } //改变列表是否被展开状态 }, { key: "switchOpenStatus", value: function switchOpenStatus(place) { var _this7 = this; //每次是打开的时候,需要存储打开列表的位置,为了后续切换tab的时候,将数据点清除 if (!place) { return; } var enterpriseList = JSON.parse(JSON.stringify(this.state.enterpriseList)); var value; for (var i = 0; i < place.length; i++) { if (i == 0) { //第一级是企业,企业下没有保安员,不用存储数据 value = enterpriseList[place[i]]; } else if (i == 1) { value = value.children[place[i]]; } else { value = value.children.departList[place[i]]; } } value.open = !value.open; if (place.length > 1) { switch (value.open) { case true: //打点 if (value.children && value.children.personList.length > 0) { this.props.addPoliceMarks(value.children.personList, place, 'tab1'); } break; case false: //关掉打点 //关掉下级打点 //自己也关掉 var reduceData = this.props.tab1Data[place]; if (reduceData) { this.props.reducePoliceMarks(reduceData, place, 'tab1'); } //下级部门的人员以及open状态都要关掉 if (value.children && value.children.departList.length > 0) { value = this.closeSubordinateOpenStatus(value.children.departList); } break; } } else if (value.open == false) { //企业自己不用关 //下级部门的人员以及open状态都要关掉 if (value.children.length > 0) { value.children.map(function (child) { _this7.close(child); child.children && _this7.closeSubordinateOpenStatus(child.children.departList); }); } } this.setState({ enterpriseList: enterpriseList }); } //关掉下级的open状态 }, { key: "closeSubordinateOpenStatus", value: function closeSubordinateOpenStatus(data) { var _this8 = this; data.map(function (item, index) { if (item.children && item.children.departList.length > 0) { _this8.close(data[index]); _this8.closeSubordinateOpenStatus(item.children.departList); } else { _this8.close(data[index]); } }); return data; } }, { key: "close", value: function close(data) { data.open = false; if (data.children && data.children.place) { var placeIndex = data.children.place; var reduceData = this.props.tab1Data[placeIndex]; this.props.reducePoliceMarks(reduceData, placeIndex, 'tab1'); } } //渲染部门跟保安员信息 // 非第一级列表 }, { key: "_renderDepartAndPerson", value: function _renderDepartAndPerson(list) { var _this9 = this; var value = JSON.parse(JSON.stringify(list)); if (list.children) { return this._renderDepartAndPerson(list.children); } return value.personList.concat(value.departList).map(function (perAndDep, index) { var place = JSON.parse(JSON.stringify(list.place)); place.push(index - value.personList.length); if (perAndDep.children) { return /*#__PURE__*/_react.default.createElement("div", { key: perAndDep.id + index }, /*#__PURE__*/_react.default.createElement("div", { className: _index.default.depart, key: perAndDep.id, onClick: function onClick(e) { e.stopPropagation(); _this9.switchOpenStatus(place); } }, _this9._renderTitle(perAndDep, place), perAndDep.open && _this9._renderDepartAndPerson(perAndDep.children))); } else { return /*#__PURE__*/_react.default.createElement("div", { key: perAndDep.id + index }, perAndDep.securityName && _this9._renderPersonList(perAndDep, index, list.place), perAndDep.parentid && /*#__PURE__*/_react.default.createElement("div", { className: _index.default.depart, key: perAndDep.id, onClick: function onClick(e) { e.stopPropagation(); if (!perAndDep.children) { //获取部门下的部门+部门下的保安员 _this9._getDepartAndPerson(1, perAndDep.id, place); } _this9.switchOpenStatus(place); } }, _this9._renderTitle(perAndDep, place))); } }); } //渲染保安员 }, { key: "_renderPersonList", value: function _renderPersonList(perAndDep, index, place) { return /*#__PURE__*/_react.default.createElement("div", { onClick: function onClick(e) { return e.stopPropagation(); } }, /*#__PURE__*/_react.default.createElement(_PersonItem.default, { place: place, tab: "tab1", _thisGIS: this.props._thisGIS, data: [perAndDep], index: index })); } //渲染列表下的企业跟部门名称 }, { key: "_renderTitle", value: function _renderTitle(value, place) { var mapStyle = this.props.mapStyle; if (place.length == 1) { return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("span", { className: _index.default.ellipsis, style: { width: '230px' } }, value.name), /*#__PURE__*/_react.default.createElement(_icon.default, { className: _index.default.icon, type: value.open ? 'up' : 'down', style: { color: mapStyle == 'dark' ? '#fff' : '' } })); } else { return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("span", { className: _index.default.ellipsis, style: { color: value.open ? '#0E70FF' : '' } }, value.name), /*#__PURE__*/_react.default.createElement(_icon.default, { className: _index.default.icon, type: value.open ? 'up' : 'down', style: { color: value.open ? '#0E70FF' : mapStyle == 'dark' ? '#fff' : '' } })); } } }, { key: "render", value: function render() { var _this0 = this; var enterpriseList = this.state.enterpriseList; var mapStyle = this.props.mapStyle; return /*#__PURE__*/_react.default.createElement("div", { className: _index.default[mapStyle] }, /*#__PURE__*/_react.default.createElement("div", { className: _index.default.personList, style: { maxHeight: this.state.allHeight, overflow: 'auto' } }, enterpriseList.length > 0 ? enterpriseList.map(function (list, index) { return /*#__PURE__*/_react.default.createElement("div", { key: list.id + index }, /*#__PURE__*/_react.default.createElement("div", { key: list.id + index, className: "", onClick: function onClick(e) { e.stopPropagation(); if (!list.children) { //获取部门列表节点 _this0._passEnterpriseIDGetDepartList(1, list.id, index); } _this0.switchOpenStatus([index]); } }, _this0._renderTitle(list, [index]), /*#__PURE__*/_react.default.createElement("div", null, list.open && list.children && list.children.map(function (departItem, depIndex) { return /*#__PURE__*/_react.default.createElement("div", { key: departItem.id + index }, /*#__PURE__*/_react.default.createElement("div", { className: _index.default.depart, key: departItem.id, onClick: (/*#__PURE__*/function () { var _ref = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator().m(function _callee2(e) { return _regenerator().w(function (_context2) { while (1) switch (_context2.n) { case 0: e.stopPropagation(); if (departItem.children) { _context2.n = 1; break; } _context2.n = 1; return _this0._getDepartAndPerson(1, departItem.id, [index, depIndex]); case 1: _context2.n = 2; return _this0.switchOpenStatus([index, depIndex]); case 2: return _context2.a(2); } }, _callee2); })); return function (_x) { return _ref.apply(this, arguments); }; }()) }, _this0._renderTitle(departItem, [index, depIndex]), /*#__PURE__*/_react.default.createElement("div", null, departItem.open && departItem.children && _this0._renderDepartAndPerson(departItem.children)))); })))); }) : /*#__PURE__*/_react.default.createElement("span", { className: _index.default.detail }, "\u6682\u65E0\u6570\u636E..."))); } }]); }(_react.PureComponent)) || _class); /***/ }), /***/ "QF8I": /***/ (function(module, exports) { // removed by extract-text-webpack-plugin /***/ }), /***/ "QP22": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAAAXNSR0IArs4c6QAABX9JREFUaAXlmz1rHEcYx+9WpxcMwlUch3wAkzqFMcixr0sgEHAnN0mXDxAlnVMkpe0P4C5q4s5gMESd8iIwKVwHfYDgYFdGYHSnk5T/b71zzI1m925mZ/dO1sAxO7Mzz/P85u2Z3Z3rdhoKp6enl0aj0cbJycmnUnGNn/KudrvddV3zIxwo70B5/+l6n1+WZS96vd6e8t5SIHXophQo468MBoO7knlHBl9XeiVGvuoOVfdv1X2yurr6q9KvYuT46iQBPjo6+kw9+b0UfC5Dez5FsXmCHanujnr+/vLy8p+xcky9WsAC7R8fH/8kYRtGYMPx3tLS0j2B/x6rJwpYvfjRcDh8qHgzVnGdeur1xysrK98pfhkqJxj48PDwCxQK9nKospTlZcMbGnxtbe23ELlZSGHB0qrP5g2LzdiALdgUwjBTD0v4qobwI8Vfhwhvq6zAtzXEv1U8mKZzKrAgPxDsU8U3pgmb533BPhf0V4pfV9lRCVz07G4TsNqU5HbJnXX4SUdHrqcjv1tlb+W9ArqvuLSnK+dwMYwb6VmA5dY6cms5LCSA1wl0DDZXySgFZjGQgFbnrHqmytaZ7mFz1ULm1aAKuB5W49IGmUl7RSFtQcc9q83EuKQ2FePr2AvZfiLbv/S5rDPAKsim4h/FjfpZhnMKuLJGEfQbLWKfKJ7YnJzpQcGyg2oUtszIlPkwwOLKnOhhtfptLSK7bqHUaXqXRUuPgY32MnZruvTtvfdEDwv259Rwtjy1eoe5a1wSMem6q7Otw712mcbAavVbKtzYUw/uxwcHrC/fNbxGeqNgy0WMgaV4q4bQyqr0pObTeFX2FW4S2mbL57CG2hUZ9K/ipA/vDGFAZx2yWlHzOW27KV/jhOZJ7kgr9seKX+U9rNa9mxoWyDJYwIAitoNpIDPH7Xt1rmGDERlmSN+pI9BXF6N9PQuoNgQdtXges1K7gVWcOZ845IyZ6C+ppa8nFl5qsDtcfcDYkhoYRlgz9cSGLqLeLqZupCblwQhrpmHHe+PWAsNVynN9xKTbCrAygXhJ3loAUg8n+YJlwFtTLlYWrVaBDdwcYFF9jUXrqjFikWLfCl/XPlh7Wr3WY1qbOrgeVlOfP01gXD70XTno4lUQq7ur1y3rpmFlDpsPW+79yrTtK2MarFJ4cdMnlzx6nxhfHhjWzcYjsF56PxlqQKyfBvggVNk5Ln/AonVhgGHNNJH5GH0hAqwM6f0LQfsOcn8uwLgTHiJwLy2H/Z6Uvohd8WKMxZXYT0z48rb207BmcuAcIBnGGB9ah82CDUt9X16o3FnKwwgri9ZbrV4cIGk8uLBGYVm+uZ8ihhFWM4mepBC64DJyxhy4OBr07vvlglsdY556dgQjdXNgZXAOaidEWMphKP0hqvOygfp3CsbxSzxcxP0QrXwIC1FK2TI3RH6orJAPcTbbRNPqTcRfgm7s60NIgyYsu6e3pDeNPLNo5Wm18o/mxvsSi+mezTIBrGGyq7H+2C5wnq9hsb8cwjIxpMmQv2rlgzi6mgyCne2DuAq+FPSm4nonTJqkmSIb2wuGia//VJsY0kYOZyNU4QeTPm8xtvvOd8BxZkjbcPoA9Ysqt3qSx9Yfc63e3dYm45uyupXAguXI4a7iRs5qlRkVmy9YTuP1FQ/KZHiHtClMRQngON9zk7eoMTYWtpbCYnslMAUk6HXRatukFzHIRg6X9rF1mn1TgREgQYNiXmzpemFW78KWLWzDxmmwOcsshewyxSm9i3FAHHCWew0fTrjNbUeGbmwocz12B7nXlau0W9hN613Ubb0P42xXWw8c8/mThwf8lr73cOypyb/xPNC++A9Xd2i6Vg+7yuSvP9RmZVP57/cftVxw0oJfyL/i/Q86W7pBryR6FwAAAABJRU5ErkJggg==" /***/ }), /***/ "Qbm7": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__style_index_less__ = __webpack_require__("vtiu"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__style_index_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__style_index_less__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__index_less__ = __webpack_require__("8H71"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__index_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__index_less__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__tooltip_style__ = __webpack_require__("/m1I"); // style dependencies // deps-lint-skip: layout /***/ }), /***/ "QmcU": /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.createSensor = void 0; var _object = __webpack_require__("v8Vb"); var _resizeObserver = __webpack_require__("bdBS"); /** * Created by hustcc on 18/7/5. * Contract: i@hust.cc */ /** * sensor strategies */ // export const createSensor = createObjectSensor; var createSensor = typeof ResizeObserver !== 'undefined' ? _resizeObserver.createSensor : _object.createSensor; exports.createSensor = createSensor; /***/ }), /***/ "QoDT": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__grid__ = __webpack_require__("pmXr"); /* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_0__grid__["a" /* Col */]); /***/ }), /***/ "Qohn": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; __webpack_require__("MIrP"); var _slider = _interopRequireDefault(__webpack_require__("IDpA")); var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("jlIA")); var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); var _echartsForReact = _interopRequireDefault(__webpack_require__("OWew")); var _api = __webpack_require__("H/Zg"); var _moment = _interopRequireDefault(__webpack_require__("PJh5")); var _index = _interopRequireDefault(__webpack_require__("W7F7")); var _dva = __webpack_require__("S6G3"); var _config = __webpack_require__("bzuE"); var _APictureData = _interopRequireDefault(__webpack_require__("TniA")); var _AttendInfo = _interopRequireDefault(__webpack_require__("qDWn")); var _Search = _interopRequireDefault(__webpack_require__("js55")); var _InfoSearch = _interopRequireDefault(__webpack_require__("ELni")); var _Componey = _interopRequireDefault(__webpack_require__("waVv")); var _ComprehensiveSearch = _interopRequireDefault(__webpack_require__("jK1M")); var _MapEventModule = _interopRequireDefault(__webpack_require__("97+s")); var _ComponyList = _interopRequireDefault(__webpack_require__("X2jB")); var _dec, _class; /** * 一张图图层的数据展示 */ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i.return) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); } function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, _regeneratorDefine2(e, r, n, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } var APicture = exports.default = (_dec = (0, _dva.connect)(function (state) { return { //所有下左右按钮状态 switchOpenStatus: state.command.switchOpenStatus, mapStyle: state.command.mapStyle, gITFPoint: state.command.gITFPoint, selectAttendInfo: state.command.selectAttendInfo, selectComponeyInfo: state.command.selectComponeyInfo, selectComponyList: state.command.selectComponyList, mapLayerSwitchState: state.command.mapLayerSwitchState }; }), _dec(_class = /*#__PURE__*/function (_Component) { function APicture(props) { var _this; (0, _classCallCheck2.default)(this, APicture); _this = _callSuper(this, APicture, [props]); _this.state = { nowErrorList: [], errTimeOption: {}, errorReportOption: {}, errorTimeReport: {}, todayCount: 0, yesterdayCount: 0, beforeYesterdayCount: 0, errorTimeHeight: null // gITFPoint: [ // { // name: "rjyA", // lng: 118.051053, // lat: 24.607252, // gIFTurl: "https://bcxin-vedio-prod.obs.myhuaweicloud.com/glTF/0914san-fbx2/0914san-fbx.gltf", // isShow: false, // }, // { // name: "rjyB", // lng: 118.048937, // lat: 24.611863, // gIFTurl: "https://bcxin-vedio-prod.obs.myhuaweicloud.com/glTF/B-1/B-1.gltf", // isShow: false, // }, // ], }; return _this; } (0, _inherits2.default)(APicture, _Component); return (0, _createClass2.default)(APicture, [{ key: "componentDidMount", value: function componentDidMount() { this.getThreeDaysAbnormalCount(); this.recentAbnormalData(); this.getErrorTime(); this.getErrorReport(); var errorTimeHeight = document.documentElement.clientHeight - 148 - 340 - 46 - 16; this.setState({ errorTimeHeight: errorTimeHeight }); this.setGITFMark(); } // 获取这三天异常 }, { key: "getThreeDaysAbnormalCount", value: function getThreeDaysAbnormalCount() { var _this2 = this; var today = (0, _moment.default)().format("YYYY-MM-DD"); var yesterday = (0, _moment.default)().subtract(1, 'days').format('YYYY-MM-DD'); var beforeYesterday = (0, _moment.default)().subtract(2, 'days').format('YYYY-MM-DD'); //获取今天异常 this.getAbnormaCount(today).then(function (res) { _this2.setState({ todayCount: res.data.data[0].total }); }); //获取昨天异常 this.getAbnormaCount(yesterday).then(function (res) { _this2.setState({ yesterdayCount: res.data.data[0].total }); }); //获取前天异常 this.getAbnormaCount(beforeYesterday).then(function (res) { _this2.setState({ beforeYesterdayCount: res.data.data[0].total }); }); } //按时间获取异常数 }, { key: "getAbnormaCount", value: function getAbnormaCount(day) { return (0, _api.getAbnormaCount)({ _currpage: 1, lines: 10 }, { appId: "__N04pcqn4nJYvdkjohbK", containTitle: "根据时间查询", dateTime: day, field: "", opentarget: "detail", viewId: "__kZW6NG4GdBBRHfcSzlx" }); } //近期实时上报异常数据 }, { key: "recentAbnormalData", value: function recentAbnormalData() { var _this3 = this; (0, _api.recentAbnormalData)({ _currpage: 1, lines: 10 }, { appId: "__N04pcqn4nJYvdkjohbK", viewId: "__0iiRNXOJBGOiwTDPSr3", opentarget: "detail", containTitle: "近期实时上报异常展示接口", categoryParentName: "现场态势" }).then(function (res) { _this3.setState({ nowErrorList: res.data.data }); console.log(res.data.data); }); } //展示当前异常的详细信息 }, { key: "getEventAddress", value: function getEventAddress(item) { this.props.addNowErrorEvent(item); } // 获取异常事件 }, { key: "getErrorTime", value: function getErrorTime() { var _this4 = this; (0, _api.getTodayAbnormalData)({ _currpage: 1, lines: 20 }, { appId: "__N04pcqn4nJYvdkjohbK", containTitle: "今日异常上报各分类数量接口", opentarget: "detail", viewId: "__K3a3SsbfKNZis2xBMjQ" }).then(function (res) { var data = res.data.data; var yAxis = data.map(function (item) { return item.alarmeventtypename; }); var seriesData = data.map(function (item) { return item.sum; }); var errorTimeReportData = data.map(function (item) { return { value: item.sum, name: item.alarmeventtypename }; }); var errTimeOption = { tooltip: { trigger: 'axis', axisPointer: { type: 'shadow' } }, legend: { data: "errorTime", show: false }, grid: { left: 0, // right: '4%', bottom: '3%', top: '10%', containLabel: true }, xAxis: { type: 'value', show: false, splitLine: { show: false } }, yAxis: { type: 'category', data: yAxis }, series: { name: '异常事件', type: 'bar', data: seriesData, itemStyle: { normal: { color: '#FF9846' } }, label: { show: true, position: 'right' } } }; var errorTimeReport = { tooltip: { trigger: 'item' }, series: [{ name: '异常事件', type: 'pie', radius: '50%', data: errorTimeReportData, emphasis: { itemStyle: { shadowBlur: 10, shadowOffsetX: 0, shadowColor: 'rgba(0, 0, 0, 0.5)' } } }] }; _this4.setState({ errTimeOption: errTimeOption, errorTimeReport: errorTimeReport }); }); } // 获取分时异常报告 }, { key: "getErrorReport", value: function () { var _getErrorReport = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator().m(function _callee() { var today, yesterday, beforeYesterday, todayCount, yesterdayyCount, beforeYesterdayCount, todayList, yesterdayList, beforeYesterdayList, errorReportOption; return _regenerator().w(function (_context) { while (1) switch (_context.n) { case 0: today = (0, _moment.default)().format("YYYY-MM-DD"); yesterday = (0, _moment.default)().subtract(1, 'days').format('YYYY-MM-DD'); beforeYesterday = (0, _moment.default)().subtract(2, 'days').format('YYYY-MM-DD'); todayCount = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; yesterdayyCount = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; beforeYesterdayCount = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; _context.n = 1; return (0, _api.getTimeAbnormalCount)({ _currpage: 1, lines: 99999 }, { appId: "__N04pcqn4nJYvdkjohbK", containTitle: "根据时间返回所有事件详情", dateTime: today, field: "", opentarget: "detail", viewId: "__CZBJre6k8BYpk881gTV" }); case 1: todayList = _context.v; _context.n = 2; return (0, _api.getTimeAbnormalCount)({ _currpage: 1, lines: 99999 }, { appId: "__N04pcqn4nJYvdkjohbK", containTitle: "根据时间返回所有事件详情", dateTime: yesterday, field: "", opentarget: "detail", viewId: "__CZBJre6k8BYpk881gTV" }); case 2: yesterdayList = _context.v; _context.n = 3; return (0, _api.getTimeAbnormalCount)({ _currpage: 1, lines: 99999 }, { appId: "__N04pcqn4nJYvdkjohbK", containTitle: "根据时间返回所有事件详情", dateTime: beforeYesterday, field: "", opentarget: "detail", viewId: "__CZBJre6k8BYpk881gTV" }); case 3: beforeYesterdayList = _context.v; todayList = todayList.data.data; yesterdayList = yesterdayList.data.data; beforeYesterdayList = beforeYesterdayList.data.data; todayList.forEach(function (item) { var time = item.alarmTime; var hour = (0, _moment.default)(time).hour(); todayCount[hour] = todayCount[hour] + 1; }); yesterdayList.forEach(function (item) { var time = item.alarmTime; var hour = (0, _moment.default)(time).hour(); yesterdayyCount[hour] = yesterdayyCount[hour] + 1; }); beforeYesterdayList.forEach(function (item) { var time = item.alarmTime; var hour = (0, _moment.default)(time).hour(); beforeYesterdayCount[hour] = beforeYesterdayCount[hour] + 1; }); errorReportOption = { tooltip: { trigger: 'axis' }, legend: { data: ['前天', '昨天', '今天'] }, grid: { left: '3%', right: '4%', bottom: "3%", containLabel: true }, xAxis: { type: 'category', boundaryGap: false, data: ['1时', '2时', '3时', '4时', '5时', '6时', '7时', '8时', '9时', '10时', '11时', '12时', '13时', '14时', '15时', '16时', '17时', '18时', '19时', '20时', '21时', '22时', '23时'] }, yAxis: { type: 'value' }, series: [{ name: '前天', type: 'line', smooth: true, stack: '总量', data: todayCount }, { name: '昨天', type: 'line', smooth: true, stack: '总量', data: yesterdayyCount }, { name: '今天', type: 'line', smooth: true, stack: '总量', data: beforeYesterdayCount }] }; this.setState({ errorReportOption: errorReportOption }); case 4: return _context.a(2); } }, _callee, this); })); function getErrorReport() { return _getErrorReport.apply(this, arguments); } return getErrorReport; }() // 调整3d地图仰视角 }, { key: "changePitch", value: function changePitch(e) { this.props.locaMap.setPitch(e); } // gIFT建模 }, { key: "setGITFMark", value: function setGITFMark() { var _this5 = this; var _window = window, AMap = _window.AMap; // let { gITFPoint } = this.state; var _this$props = this.props, locaMap = _this$props.locaMap, gITFPoint = _this$props.gITFPoint; // 地图图块加载完成后触发 locaMap.on('complete', function () { // 加载3d模型组件 var gITFMarks = []; var object3Dlayer = new AMap.Object3DLayer(); _this5.props.dispatch({ type: "command/changeObject3Dlayer", payload: object3Dlayer }); locaMap.add(object3Dlayer); var gltfObj = new AMap.GltfLoader(); gITFPoint.forEach(function (item) { var marker = new AMap.Marker({ icon: "https://bcxin-saas-test.obs.cn-north-1.myhuaweicloud.com:443/upload%2F2021-09-18%2F1631951346190020782.png", // icon: "../../../../../src/assets/images/prevention/gIFT.png", position: [item.lng, item.lat] }); var paramCity = { position: new AMap.LngLat(item.lng, item.lat), // 必须 scale: 10, // 非必须,默认1 height: 0, // 非必须,默认0 scene: 0 // 非必须,默认0 }; var cityMeshes = null; AMap.event.addListener(marker, "click", function () { if (!item.isShow) { _this5.props.dispatch({ type: "command/setSwitchOpenStatus", payload: { type: 'is3D', value: true } }); gltfObj.load(item.gIFTurl, function (gltfCity) { cityMeshes = gltfCity; item.cityMeshes = gltfCity; gltfCity.setOption(paramCity); switch (item.name) { case "rjyA": gltfCity.rotateX(90); break; case "rjyB": gltfCity.rotateX(90); } item.isShow = true; _this5.props.dispatch({ type: "command/changeGITFPoint", payload: gITFPoint }); object3Dlayer.add(gltfCity); }); locaMap.setZoomAndCenter(17, [item.lng, item.lat]); locaMap.setPitch(50); // locaMap.setPitch(0) _this5.props.setSatellite(true); } else { object3Dlayer.remove(cityMeshes); item.isShow = false; _this5.props.dispatch({ type: "command/changeGITFPoint", payload: gITFPoint }); } }); gITFMarks.push(marker); }); locaMap.add(gITFMarks); }); } }, { key: "render", value: function render() { var _this6 = this; var _this$props$switchOpe = this.props.switchOpenStatus, all = _this$props$switchOpe.all, down = _this$props$switchOpe.down, left = _this$props$switchOpe.left, right = _this$props$switchOpe.right, is3D = _this$props$switchOpe.is3D, search = _this$props$switchOpe.search; var _this$props$mapLayerS = this.props.mapLayerSwitchState, searchViews = _this$props$mapLayerS.searchViews, resourceViews = _this$props$mapLayerS.resourceViews, eventViews = _this$props$mapLayerS.eventViews; var _this$props2 = this.props, mapStyle = _this$props2.mapStyle, searchAround = _this$props2.searchAround, selectAttendInfo = _this$props2.selectAttendInfo, selectComponeyInfo = _this$props2.selectComponeyInfo, selectComponyList = _this$props2.selectComponyList; console.log('APicture-state', this.state); return /*#__PURE__*/_react.default.createElement("div", { style: { display: '' }, className: _index.default[mapStyle] }, /*#__PURE__*/_react.default.createElement("div", { className: _index.default.slider, style: { display: is3D ? '' : 'none' } }, /*#__PURE__*/_react.default.createElement(_slider.default, { onChange: this.changePitch.bind(this), vertical: true, defaultValue: 0 })), eventViews ? /*#__PURE__*/_react.default.createElement(_MapEventModule.default, null) : null, selectAttendInfo.selectAttendId ? /*#__PURE__*/_react.default.createElement(_AttendInfo.default // addPictueMarks={(data, type) => { // this.props.addPictueMarks(data, type); // }} // reducePictueMarks={(data, type) => { // this.props.reducePictueMarks(data, type); // }} , null) : "", selectComponeyInfo.selectComponeyId ? /*#__PURE__*/_react.default.createElement(_Componey.default // addPictueMarks={(data, type) => { // this.props.addPictueMarks(data, type); // }} // reducePictueMarks={(data, type) => { // this.props.reducePictueMarks(data, type); // }} , null) : selectComponyList && selectComponyList.length > 0 ? /*#__PURE__*/_react.default.createElement(_ComponyList.default, null) : null, searchViews && /*#__PURE__*/_react.default.createElement(_ComprehensiveSearch.default, { _thisGIS: this.props._thisGIS }), /* 周边搜索组件 */ searchAround.show && searchAround.type == 'aPicture' && /*#__PURE__*/_react.default.createElement(_Search.default, { _thisGIS: this.props._thisGIS, onClose: function onClose(value) { return _this6.props.changeShowSearchView(value); }, lnglat: searchAround.lnglat // addPictueMarks={(data, type, where) => { // this.props.addPictueMarks(data, type, where); // }} // reducePictueMarks={(data, type, where) => { // this.props.reducePictueMarks(data, type, where); // }} }), /*#__PURE__*/_react.default.createElement("div", { style: { display: resourceViews ? '' : 'none' } }, /*#__PURE__*/_react.default.createElement(_APictureData.default, { _thisGIS: this.props._thisGIS }), search && /*#__PURE__*/_react.default.createElement(_InfoSearch.default, { _thisGIS: this.props._thisGIS }))); } }]); }(_react.Component)) || _class); /***/ }), /***/ "QsfC": /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _rule = __webpack_require__("hGxU"); var _rule2 = _interopRequireDefault(_rule); var _util = __webpack_require__("eCjd"); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } /** * Validates a number. * * @param rule The validation rule. * @param value The value of the field on the source object. * @param callback The callback function. * @param source The source object being validated. * @param options The validation options. * @param options.messages The validation messages. */ function number(rule, value, callback, source, options) { var errors = []; var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate) { if (value === '') { value = undefined; } if ((0, _util.isEmptyValue)(value) && !rule.required) { return callback(); } _rule2['default'].required(rule, value, source, errors, options); if (value !== undefined) { _rule2['default'].type(rule, value, source, errors, options); _rule2['default'].range(rule, value, source, errors, options); } } callback(errors); } exports['default'] = number; /***/ }), /***/ "R07g": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAACDklEQVRIS72Wv4sTQRTHv+8GSQi3/0CwEA7utJ4hKbZJ6w/UE7RQG0ErRbA4sRM70UIQOwUbtfBAPSFnmyZFwrxa70CwEP8Ac4QNMj55YVc3XBI2kPXBNLs77/P2+37MEOZYs9k8GkI4B+A0gDURqevnRPQDwFcAbWPMTq/X+z7LDU17EcdxPUmSB0R0TUTMvCCIKIjIy2q1er/b7Sp4wg4BnHNnAbwSkQjALwAfdBljfK1WGzsYDof1EIIDcD5dR4hoAOCq9/5jnjABsNbeBvAEwAqA9wC2mFmlmGnW2jUAjwFsAvgN4A4zP802/AVo5CKiTlXje9573VTYnHNbIvIw3b+Z/ckYoJqPRqMvKgsR3V3UeRZFCnmkclUqleOakzHAWvscwHWVhZkvTAvbOdfW5957rah5kr1L5XrBzDcoLcVvIqL6nZilubVW1CszT628jJjm5DMRrRhjjpFz7qaIPAOwzcyXZoVWFJAq8hbARSK6pYBdETkJ4Aozv1kS4DKA10T0SQF7IrJujNno9/v7ywA0Go31EMIeEe2TtVYbZDWKoqjT6RwsA9BqtVYHg4H6PSgFEMdxlCTJzzGgdIkWTfI0CYloN98f1tqJJBcqU200ETk1I0dtZj6T64V/ZVq00YoOpUONVnRULACYHBX/ZdgppNRxnUtOeQdObqaXd2RmkFIP/Xy1LOPa8gf5E3leGBJWtQAAAABJRU5ErkJggg==" /***/ }), /***/ "RKq/": /***/ (function(module, exports) { // removed by extract-text-webpack-plugin /***/ }), /***/ "RMDC": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAAAXNSR0IArs4c6QAAA3pJREFUWEfNmE1rJEUYx/9P9WS7RzKLXhYMrKCHiOfp5JBkISvkIE7nRY2ikP0GvpFlBfWogqtBVz+BERSNa7LJiIeACWwyh92Zs2wOCi5E2IuSCU51Mt1/qZp0djImcbIOsfvUVFc9z6+fet6qBCd8+MrQIzvb4bNxzBEBHgPQA2GPFUPZBLBJ4DelZPlMt/uDfLX2x0lUSLuTw7H+CcbRq6BcIJhpZ51A6hDeFOV87t64Nd/emn+ZtTvqD9ZjXAU40I7Ao+dIKaNwpWuxvH6cnCMtxMlJJ6z9MkPg9WYBIogJlESwQCUVEbXpZh4yW4Ww/lcPGfdIzDyJcQEGSKgD64FrbvaJaZmbiw4DOxSI48MPh9H2tyRHkkUC0QA+c7vOzMh86V471uLEwLlwd2cawGsEvX1ZIsuu0/2iLKz+2SrnH0AWpl4tEXiqScB1V8mbcuP23XZAWudwrO98GPMTks/f/0H87GZyA61QB4DsNulff0wsIyZuRN51l8ofPAhI65ow8N8m+R4Bq1eMpbzHn2nevgNAupD/NPEZCwP1slu8/U0nYBIZYaHvJSL+eh8KuOYVK280Wa7x2ogmriUflMg7nbLMYZaKyfeT8YySoST69i1UK/jrSWiLyHVvqfxCJy3TKksH/nf3fUpK2WJ50G6jDdex/ok4ir5vDIh2Hel9UAdu9yeso0fcSKJPOc5zJnlaIB3kfyJxcQ/oqlcsv9Wu4P8yTxf8DwleaTg4VrylytNialO4pe+ZcmCSnptxHz0uz9QKeZ4EIlusHJ18TZ6qh7+b5GnKjHvWOyc7gT8VkbNWiWAtu1S5cJzCTgIZPbUgfxPEkHl3RC5JLfBnQU5ZHoXL3mJl5jSB9Gh+mjE+bhhEvhRd8FcIDtuBjFzMLpRXTxOoNu4Po86VPf9dNUB3CPbagS7nSW/+1sZpAumJ/l7uRnf2gDZEB/kqiW4z4GVzOZlb3T5NIE4Od+tatboXaduiA3+LZM4CKe+sLK7bj0c9nXZqjg7mdKy3GkBSTeGWpc2pawX/C4CX/rewD/ouk/FHDReR2VQlRqXUVPpKhzFUqoqrAUpd+2GLXJoaNAOUuhbW+lKamnwDlLpjkIVK00ExKaipOkrvQ6XpsqG59UjNdUxrP5SaC6tWMHNs2q3qQgSMCHH+0Cs9wV0HWO7KecWTXun9DQiwh1e+zbTOAAAAAElFTkSuQmCC" /***/ }), /***/ "RRDu": /***/ (function(module, exports) { module.exports = "data:image/png;base64,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" /***/ }), /***/ "RTRi": /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _util = __webpack_require__("eCjd"); var util = _interopRequireWildcard(_util); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } var ENUM = 'enum'; /** * Rule for validating a value exists in an enumerable list. * * @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 enumerable(rule, value, source, errors, options) { rule[ENUM] = Array.isArray(rule[ENUM]) ? rule[ENUM] : []; if (rule[ENUM].indexOf(value) === -1) { errors.push(util.format(options.messages[ENUM], rule.fullField, rule[ENUM].join(', '))); } } exports['default'] = enumerable; /***/ }), /***/ "RYu5": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* unused harmony export getVendorPrefixes */ /* unused harmony export getVendorPrefixedEventName */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return animationEndName; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return transitionEndName; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return supportTransition; }); /* harmony export (immutable) */ __webpack_exports__["b"] = getTransitionName; var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); // ================= Transition ================= // Event wrapper. Copy from react source code function makePrefixMap(styleProp, eventName) { var prefixes = {}; prefixes[styleProp.toLowerCase()] = eventName.toLowerCase(); prefixes['Webkit' + styleProp] = 'webkit' + eventName; prefixes['Moz' + styleProp] = 'moz' + eventName; prefixes['ms' + styleProp] = 'MS' + eventName; prefixes['O' + styleProp] = 'o' + eventName.toLowerCase(); return prefixes; } function getVendorPrefixes(domSupport, win) { var prefixes = { animationend: makePrefixMap('Animation', 'AnimationEnd'), transitionend: makePrefixMap('Transition', 'TransitionEnd') }; if (domSupport) { if (!('AnimationEvent' in win)) { delete prefixes.animationend.animation; } if (!('TransitionEvent' in win)) { delete prefixes.transitionend.transition; } } return prefixes; } var vendorPrefixes = getVendorPrefixes(canUseDOM, typeof window !== 'undefined' ? window : {}); var style = {}; if (canUseDOM) { style = document.createElement('div').style; } var prefixedEventNames = {}; function getVendorPrefixedEventName(eventName) { if (prefixedEventNames[eventName]) { return prefixedEventNames[eventName]; } var prefixMap = vendorPrefixes[eventName]; if (prefixMap) { var stylePropList = Object.keys(prefixMap); var len = stylePropList.length; for (var i = 0; i < len; i += 1) { var styleProp = stylePropList[i]; if (Object.prototype.hasOwnProperty.call(prefixMap, styleProp) && styleProp in style) { prefixedEventNames[eventName] = prefixMap[styleProp]; return prefixedEventNames[eventName]; } } } return ''; } var animationEndName = getVendorPrefixedEventName('animationend'); var transitionEndName = getVendorPrefixedEventName('transitionend'); var supportTransition = !!(animationEndName && transitionEndName); function getTransitionName(transitionName, transitionType) { if (!transitionName) return null; if (typeof transitionName === 'object') { var type = transitionType.replace(/-\w/g, function (match) { return match[1].toUpperCase(); }); return transitionName[type]; } return transitionName + '-' + transitionType; } /***/ }), /***/ "RaPn": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAiCAYAAAC0nUK+AAAAAXNSR0IArs4c6QAABTlJREFUSA2lVXlsFGUUf2+O3e32oJ1tG1qxHhiaIlSkRQ5DSVtFQCHBUAkJmuAfpCSGxCPQlphghNBGY/AvrkSMR0IggLEJxNJDoKYKbdMoFoMgaUCwFtqlK9vd2Z35fG+2U2a3Wyj6kpnv+97xmzfv+hDuQ0vrh8qiprkSQJSjgHwA9AkUg7S/DhKellH69rutmWcRiZOEMAkPKncOlQOY9QLEc8nkTh4inAchb23ZltXm5PM+Dny7ENKZXbd3goAaFuakS1A5ywULnnJBfpYMGSkIwyMCbgwZ8ONlHVou6DAQMFmVgPCjxXVazXbEGMPiWSL6cSHwhV2Dh2ldo8oAG5Z4YXWpB1xK3PdHtWOLHhVwvDMEB08HIWIwGh4rq9Wq7A8QTIza3Zs/IOBNmV6EhnUZUD7TDbI0MTBbsXzWNBXmPqFCx+86hCKi6NrZsPJHa0Mryy3rpfW3F0VNaFclgZ+sz4CZj6gseyjq/TMC73w1DBETBYVoSUuddlZhBMMUHGfkUCQC8+9yfFt/1aGnLwJzHlOh4ulYHjh8NrEd2+9vDXLp7CD+EnyxwV9qRKPnOXlfbMq0YmyStPNqBNoIsP1SGILh8ZXmdSM8P8NFH3JDKYWFI8g5eGOPP5ZkBeYrpmFQHYNVFZy8vS1BaPolDHeCY0m3nYtb+YOnSI+fKV4Jls52Q3Wl18I51BECjOIrEvlUyVZcbkxV81Ng+TNuaz+Z1xrSZ0deneex1G0cxpUoQAXM5Tpm8qUhzH508gldXBhzKpXCxGTjUKkUSIAil5ncIDY9mSvDy3M81u/avMTVoyKsIB0tVYoT2TgIIkcBgXephdzceew1U26GBBeuR2EFhSc9RbI68odLOgzdNaEgW4aVz3qgrMgF565E4MNvAnHgjGMR4XIp9tOjcUv70u550XcrCvww5WXKVlU8niPDjKkKnOgJwZv77sDd8PikMw4TFfsNhcLSTTVexLXsjLUiI0SNmBc3/QYcPTdiGSW+aCLy6BhjMw4TtVI3xVw6yQceQlynNn1JNV9dmQqFeVaf2eyxlet89bwU2P16xhiP7RnHIhSNiitVNIb/wSGablk8hNYuSLFkHPeq+R7ruek34fuLYWjrjTmwaq4HllE+vC6EEcLKpgZU6U+Pd47EGghhQFa1k1YGK3bd2gYm7OB2/t+zJTYd326t8+22Mqgovt00bC7yHHn/SAB4CD0MsT7bsT152+1O0/aw/VhxL2sYLtQNnW4VSP+v85xy+7fsxtKmd33X4sD5UFE/uBxN0UjZt9r14W4iCFLYK5rqsn9iLKYxz2NHALqNNpqmuc8+T27FKMi4qrVGsyrPtrnXNaOc5lptP11XH9sKk1lp3G5MBGa7ceDMLFuo1VJzdPD+gYR4oLnOdzCZXlLw7eUYdbukdRQ1fzIjm0cO/FyQp222z4lrUnBWOvFeVh9K+FaigX2mygjLoK79fAOGbF7iOiE4K7bUal+Td6cSjawz4s6muozfkspGmfcFZx2XIm+iJc47bjhtutYwijHh8kDwk1syr9DtW+9EkGWp+shrODqhnJL4/bg6d4pLSkq8kUhEgylFudkvfdoEqPiEPnxm4OiqakmSAqqqDnZ1dQWdNs597OJ0ckb3xcXFuaFQaLphGGlGsB/d0xbpijd3YaD3UE3oRmeA+fThnPz8fKO/v59us/E0YVioS6c61QebtxzT/Vc/C/QcuOzkJ+o5ZROC02//5VQ0dX90oHH9XieP94l6TvmkYk7epdMwc9EqE5hB5alPJub/Akr9FWyRATXZAAAAAElFTkSuQmCC" /***/ }), /***/ "RkMR": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = showInsuranceModal; __webpack_require__("sRCI"); var _modal = _interopRequireDefault(__webpack_require__("vnWH")); var _extends2 = _interopRequireDefault(__webpack_require__("uMMT")); var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); var _reactDom = _interopRequireDefault(__webpack_require__("O27J")); function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } // import PropTypes from 'prop-types'; // 弹窗组件 var NormalModal = /*#__PURE__*/function (_Component) { function NormalModal(props, context) { var _this; (0, _classCallCheck2.default)(this, NormalModal); _this = _callSuper(this, NormalModal, [props, context]); _this._toggle = function (type) { var close = function close() { _this.setState({ visible: false }, function () { // 删除组件 setTimeout(function () { var divs = document.getElementsByClassName('n_modal'); Reflect.apply(Array.prototype.forEach, divs, [function (item) { _reactDom.default.unmountComponentAtNode(item); document.body.removeChild(item); }]); }, 300); }); }; // 点击确定以后 if (type == 'confirm') { if (_this.props.onOk) { _this.props.onOk(close); _this.props.update && _this.props.update(); } else { close(); } } else { _this.props.onCancel && _this.props.onCancel(); close(); } }; _this.state = { visible: true }; return _this; } (0, _inherits2.default)(NormalModal, _Component); return (0, _createClass2.default)(NormalModal, [{ key: "render", value: function render() { var _this2 = this; return /*#__PURE__*/_react.default.createElement(_modal.default, (0, _extends2.default)({}, this.props, { visible: this.state.visible, onOk: function onOk() { _this2._toggle('confirm'); }, onCancel: function onCancel() { _this2._toggle(); }, okText: this.props.okText || '确定', cancelText: this.props.cancelText || '取消' }), this.props.content); } }]); }(_react.Component); // NormalModal.propTypes = { // }; // 插入弹窗 function showInsuranceModal(props) { var div = document.createElement('div'); div.setAttribute('class', 'n_modal'); document.body.appendChild(div); props.okText = props.okText || '确定'; props.cancelText = props.cancelText || '取消'; _reactDom.default.render(/*#__PURE__*/_react.default.createElement(NormalModal, props), div); } /***/ }), /***/ "RtRc": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _objectSpread2 = _interopRequireDefault(__webpack_require__("+TWC")); var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); __webpack_require__("qK5s"); var _tree = _interopRequireDefault(__webpack_require__("N0tX")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); var _api = __webpack_require__("H/Zg"); var _PersonList = _interopRequireDefault(__webpack_require__("x075")); function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } //通讯录 var TreeNode = _tree.default.TreeNode, DirectoryTree = _tree.default.DirectoryTree; var AddressBook = exports.default = /*#__PURE__*/function (_PureComponent) { function AddressBook(props) { var _this; (0, _classCallCheck2.default)(this, AddressBook); _this = _callSuper(this, AddressBook, [props]); _this.state = { departTreeData: null, // editTreeData: null, treeData: [], expandedKeys: ["-1"], tableData: [], selectedRows: null, selectedRowKeys: null, height: null, //搜索列表的最大高度 pagenav: { current: 1, pageSize: 10, showQuickJumper: true, showSizeChanger: true, showTotal: function showTotal(total) { return "\u603B\u5171 ".concat(total, " \u6761"); }, onShowSizeChange: function onShowSizeChange(current, pageSize) { var pagenav = Object.assign({}, _this.state.pagenav); pagenav.current = current; pagenav.pageSize = pageSize; _this.setState({ pagenav: pagenav }, function () { _this.__getOrgPersonList(_this.state.requestData); }); }, onChange: function onChange(page, pageSize) { var pagenav = Object.assign({}, _this.state.pagenav); pagenav.current = page; pagenav.pageSize = pageSize; _this.setState({ pagenav: pagenav }, function () { _this.__getOrgPersonList(_this.state.requestData); }); }, total: 0 } }; return _this; } (0, _inherits2.default)(AddressBook, _PureComponent); return (0, _createClass2.default)(AddressBook, [{ key: "componentDidMount", value: function componentDidMount() { var height = document.documentElement.clientHeight - 120 - 130 - 40; this.setState({ height: height }); this.__getDepartTree(); } }, { key: "__getDepartTree", value: function __getDepartTree(cb) { var _this2 = this; var domainId = this.props.domainId; // 获取到组织架构列表 (0, _api.systemComDepartGetDepartTree)().then(function (res) { // // 初始化页面判断右边列表的展示 // if (res.data[0] && res.data[0].isExistsDataAuth == 0) { // this.setState({ // rightListShow: true, // }); // } _this2.setState({ departTreeData: _this2.recursionTreeData(res.data, true), //含有disable属性 // editTreeData: this.recursionTreeData(res.data, true), treeData: _this2.recursionTreeData(res.data) }, function () { cb && cb(res.data); }); }); } }, { key: "recursionTreeData", value: function recursionTreeData(treeData, hasDisable) { var _this3 = this; treeData = JSON.parse(JSON.stringify(treeData)); // TreeSelect组件所需值: title, value, key, children disabled return treeData.map(function (item) { item.title = item.departName; item.key = item.departId; item.value = item.departId; if (hasDisable) { // "isExistsDataAuth": "1", //权限 1有权限 0:没权限 item.disabled = item.isExistsDataAuth == 0; } else { // 没有权限的部门名称后面新增人数 item.title = "".concat(item.departName, "(").concat(item.personCount, ")"); } // 不展示下级部门 // if(idArr.some(id => id == item.departId)) return item; if (item.childDepart) { item.children = _this3.recursionTreeData(item.childDepart, hasDisable); } return item; }); } }, { key: "__getOrgPersonList", value: function __getOrgPersonList(data) { var _this4 = this; var POST_DATA = (0, _objectSpread2.default)({ pageSize: this.state.pagenav.pageSize, pageNumber: this.state.pagenav.current }, data); (0, _api.systemComDepartGetOrgPersonList)(POST_DATA).then(function (response) { var _response$data = response.data, pageNumber = _response$data.pageNumber, pageSize = _response$data.pageSize; var tableData = response.data.data.map(function (val, i) { val.key = i; val.number = (pageNumber - 1) * pageSize + i + 1; return val; }); var pagenav = Object.assign({}, _this4.state.pagenav); pagenav.total = response.data.total; _this4.setState({ tableData: tableData, selectedRows: [], selectedRowKeys: [], pagenav: pagenav }); }); } // // 递归展示树状组织架构 // renderTreeNodes = (data, parentkey, parentTitle) => { // return data.map((item, index) => ( // // { // (() => { // if (item.childDepart.length > 0) { // parentkey++; // return this.renderTreeNodes(item.childDepart, parentkey); // } // })() // } // ) // ); // }; }, { key: "render", value: function render() { return /*#__PURE__*/_react.default.createElement("div", { className: "PartmentSelect" }, /*#__PURE__*/_react.default.createElement("div", { className: "data-list address-book PartmentSelect-box" }, /*#__PURE__*/_react.default.createElement(_PersonList.default, { style: { maxHeight: this.state.height, overflow: 'auto' } // fetchType={this.props.fetchType} , type: "radio", value: [] }))); } }]); }(_react.PureComponent); /***/ }), /***/ "Ruo5": /***/ (function(module, exports, __webpack_require__) { /* * __ ___ * _____/ /___ __/ (_)____ * / ___/ __/ / / / / / ___/ * (__ ) /_/ /_/ / / (__ ) * /____/\__/\__, /_/_/____/ * /____/ * * light - weight css preprocessor @licence MIT */ (function (factory) {/* eslint-disable */ true ? (module['exports'] = factory(null)) : typeof define === 'function' && define['amd'] ? define(factory(null)) : (window['stylis'] = factory(null)) }(/** @param {*=} options */function factory (options) {/* eslint-disable */ 'use strict' /** * Notes * * The [''] pattern is used to support closure compiler * the jsdoc signatures are also used to the same effect * * ---- * * int + int + int === n4 [faster] * * vs * * int === n1 && int === n2 && int === n3 * * ---- * * switch (int) { case ints...} [faster] * * vs * * if (int == 1 && int === 2 ...) * * ---- * * The (first*n1 + second*n2 + third*n3) format used in the property parser * is a simple way to hash the sequence of characters * taking into account the index they occur in * since any number of 3 character sequences could produce duplicates. * * On the other hand sequences that are directly tied to the index of the character * resolve a far more accurate measure, it's also faster * to evaluate one condition in a switch statement * than three in an if statement regardless of the added math. * * This allows the vendor prefixer to be both small and fast. */ var nullptn = /^\0+/g /* matches leading null characters */ var formatptn = /[\0\r\f]/g /* matches new line, null and formfeed characters */ var colonptn = /: */g /* splits animation rules */ var cursorptn = /zoo|gra/ /* assert cursor varient */ var transformptn = /([,: ])(transform)/g /* vendor prefix transform, older webkit */ var animationptn = /,+\s*(?![^(]*[)])/g /* splits multiple shorthand notation animations */ var propertiesptn = / +\s*(?![^(]*[)])/g /* animation properties */ var elementptn = / *[\0] */g /* selector elements */ var selectorptn = /,\r+?/g /* splits selectors */ var andptn = /([\t\r\n ])*\f?&/g /* match & */ var escapeptn = /:global\(((?:[^\(\)\[\]]*|\[.*\]|\([^\(\)]*\))*)\)/g /* matches :global(.*) */ var invalidptn = /\W+/g /* removes invalid characters from keyframes */ var keyframeptn = /@(k\w+)\s*(\S*)\s*/ /* matches @keyframes $1 */ var plcholdrptn = /::(place)/g /* match ::placeholder varient */ var readonlyptn = /:(read-only)/g /* match :read-only varient */ var beforeptn = /\s+(?=[{\];=:>])/g /* matches \s before ] ; = : */ var afterptn = /([[}=:>])\s+/g /* matches \s after characters [ } = : */ var tailptn = /(\{[^{]+?);(?=\})/g /* matches tail semi-colons ;} */ var whiteptn = /\s{2,}/g /* matches repeating whitespace */ var pseudoptn = /([^\(])(:+) */g /* pseudo element */ var writingptn = /[svh]\w+-[tblr]{2}/ /* match writing mode property values */ var gradientptn = /([\w-]+t\()/g /* match *gradient property */ var supportsptn = /\(\s*(.*)\s*\)/g /* match supports (groups) */ var propertyptn = /([\s\S]*?);/g /* match properties leading semicolon */ var selfptn = /-self|flex-/g /* match flex- and -self in align-self: flex-*; */ var pseudofmt = /[^]*?(:[rp][el]a[\w-]+)[^]*/ /* extrats :readonly or :placholder from selector */ var trimptn = /[ \t]+$/ /* match tail whitspace */ var dimensionptn = /stretch|:\s*\w+\-(?:conte|avail)/ /* match max/min/fit-content, fill-available */ var imgsrcptn = /([^-])(image-set\()/ /* vendors */ var webkit = '-webkit-' var moz = '-moz-' var ms = '-ms-' /* character codes */ var SEMICOLON = 59 /* ; */ var CLOSEBRACES = 125 /* } */ var OPENBRACES = 123 /* { */ var OPENPARENTHESES = 40 /* ( */ var CLOSEPARENTHESES = 41 /* ) */ var OPENBRACKET = 91 /* [ */ var CLOSEBRACKET = 93 /* ] */ var NEWLINE = 10 /* \n */ var CARRIAGE = 13 /* \r */ var TAB = 9 /* \t */ var AT = 64 /* @ */ var SPACE = 32 /* */ var AND = 38 /* & */ var DASH = 45 /* - */ var UNDERSCORE = 95 /* _ */ var STAR = 42 /* * */ var COMMA = 44 /* , */ var COLON = 58 /* : */ var SINGLEQUOTE = 39 /* ' */ var DOUBLEQUOTE = 34 /* " */ var FOWARDSLASH = 47 /* / */ var GREATERTHAN = 62 /* > */ var PLUS = 43 /* + */ var TILDE = 126 /* ~ */ var NULL = 0 /* \0 */ var FORMFEED = 12 /* \f */ var VERTICALTAB = 11 /* \v */ /* special identifiers */ var KEYFRAME = 107 /* k */ var MEDIA = 109 /* m */ var SUPPORTS = 115 /* s */ var PLACEHOLDER = 112 /* p */ var READONLY = 111 /* o */ var IMPORT = 105 /* i */ var CHARSET = 99 /* c */ var DOCUMENT = 100 /* d */ var PAGE = 112 /* p */ var column = 1 /* current column */ var line = 1 /* current line numebr */ var pattern = 0 /* :pattern */ var cascade = 1 /* #id h1 h2 vs h1#id h2#id */ var prefix = 1 /* vendor prefix */ var escape = 1 /* escape :global() pattern */ var compress = 0 /* compress output */ var semicolon = 0 /* no/semicolon option */ var preserve = 0 /* preserve empty selectors */ /* empty reference */ var array = [] /* plugins */ var plugins = [] var plugged = 0 var should = null /* plugin context */ var POSTS = -2 var PREPS = -1 var UNKWN = 0 var PROPS = 1 var BLCKS = 2 var ATRUL = 3 /* plugin newline context */ var unkwn = 0 /* keyframe animation */ var keyed = 1 var key = '' /* selector namespace */ var nscopealt = '' var nscope = '' /** * Compile * * @param {Array} parent * @param {Array} current * @param {string} body * @param {number} id * @param {number} depth * @return {string} */ function compile (parent, current, body, id, depth) { var bracket = 0 /* brackets [] */ var comment = 0 /* comments /* // or /* */ var parentheses = 0 /* functions () */ var quote = 0 /* quotes '', "" */ var first = 0 /* first character code */ var second = 0 /* second character code */ var code = 0 /* current character code */ var tail = 0 /* previous character code */ var trail = 0 /* character before previous code */ var peak = 0 /* previous non-whitespace code */ var counter = 0 /* count sequence termination */ var context = 0 /* track current context */ var atrule = 0 /* track @at-rule context */ var pseudo = 0 /* track pseudo token index */ var caret = 0 /* current character index */ var format = 0 /* control character formating context */ var insert = 0 /* auto semicolon insertion */ var invert = 0 /* inverted selector pattern */ var length = 0 /* generic length address */ var eof = body.length /* end of file(length) */ var eol = eof - 1 /* end of file(characters) */ var char = '' /* current character */ var chars = '' /* current buffer of characters */ var child = '' /* next buffer of characters */ var out = '' /* compiled body */ var children = '' /* compiled children */ var flat = '' /* compiled leafs */ var selector /* generic selector address */ var result /* generic address */ // ...build body while (caret < eof) { code = body.charCodeAt(caret) // eof varient if (caret === eol) { // last character + noop context, add synthetic padding for noop context to terminate if (comment + quote + parentheses + bracket !== 0) { if (comment !== 0) { code = comment === FOWARDSLASH ? NEWLINE : FOWARDSLASH } quote = parentheses = bracket = 0 eof++ eol++ } } if (comment + quote + parentheses + bracket === 0) { // eof varient if (caret === eol) { if (format > 0) { chars = chars.replace(formatptn, '') } if (chars.trim().length > 0) { switch (code) { case SPACE: case TAB: case SEMICOLON: case CARRIAGE: case NEWLINE: { break } default: { chars += body.charAt(caret) } } code = SEMICOLON } } // auto semicolon insertion if (insert === 1) { switch (code) { // false flags case OPENBRACES: case CLOSEBRACES: case SEMICOLON: case DOUBLEQUOTE: case SINGLEQUOTE: case OPENPARENTHESES: case CLOSEPARENTHESES: case COMMA: { insert = 0 } // ignore case TAB: case CARRIAGE: case NEWLINE: case SPACE: { break } // valid default: { insert = 0 length = caret first = code caret-- code = SEMICOLON while (length < eof) { switch (body.charCodeAt(length++)) { case NEWLINE: case CARRIAGE: case SEMICOLON: { ++caret code = first length = eof break } case COLON: { if (format > 0) { ++caret code = first } } case OPENBRACES: { length = eof } } } } } } // token varient switch (code) { case OPENBRACES: { chars = chars.trim() first = chars.charCodeAt(0) counter = 1 length = ++caret while (caret < eof) { switch (code = body.charCodeAt(caret)) { case OPENBRACES: { counter++ break } case CLOSEBRACES: { counter-- break } case FOWARDSLASH: { switch (second = body.charCodeAt(caret + 1)) { // /*, // case STAR: case FOWARDSLASH: { caret = delimited(second, caret, eol, body) } } break } // given "[" === 91 & "]" === 93 hence forth 91 + 1 + 1 === 93 case OPENBRACKET: { code++ } // given "(" === 40 & ")" === 41 hence forth 40 + 1 === 41 case OPENPARENTHESES: { code++ } // quote tail delimiter is identical to the head delimiter hence noop, // fallthrough clauses have been shifted to the correct tail delimiter case DOUBLEQUOTE: case SINGLEQUOTE: { while (caret++ < eol) { if (body.charCodeAt(caret) === code) { break } } } } if (counter === 0) { break } caret++ } child = body.substring(length, caret) if (first === NULL) { first = (chars = chars.replace(nullptn, '').trim()).charCodeAt(0) } switch (first) { // @at-rule case AT: { if (format > 0) { chars = chars.replace(formatptn, '') } second = chars.charCodeAt(1) switch (second) { case DOCUMENT: case MEDIA: case SUPPORTS: case DASH: { selector = current break } default: { selector = array } } child = compile(current, selector, child, second, depth+1) length = child.length // preserve empty @at-rule if (preserve > 0 && length === 0) { length = chars.length } // execute plugins, @at-rule context if (plugged > 0) { selector = select(array, chars, invert) result = proxy(ATRUL, child, selector, current, line, column, length, second, depth, id) chars = selector.join('') if (result !== void 0) { if ((length = (child = result.trim()).length) === 0) { second = 0 child = '' } } } if (length > 0) { switch (second) { case SUPPORTS: { chars = chars.replace(supportsptn, supports) } case DOCUMENT: case MEDIA: case DASH: { child = chars + '{' + child + '}' break } case KEYFRAME: { chars = chars.replace(keyframeptn, '$1 $2' + (keyed > 0 ? key : '')) child = chars + '{' + child + '}' if (prefix === 1 || (prefix === 2 && vendor('@'+child, 3))) { child = '@' + webkit + child + '@' + child } else { child = '@' + child } break } default: { child = chars + child if (id === PAGE) { child = (out += child, '') } } } } else { child = '' } break } // selector default: { child = compile(current, select(current, chars, invert), child, id, depth+1) } } children += child // reset context = 0 insert = 0 pseudo = 0 format = 0 invert = 0 atrule = 0 chars = '' child = '' code = body.charCodeAt(++caret) break } case CLOSEBRACES: case SEMICOLON: { chars = (format > 0 ? chars.replace(formatptn, '') : chars).trim() if ((length = chars.length) > 1) { // monkey-patch missing colon if (pseudo === 0) { first = chars.charCodeAt(0) // first character is a letter or dash, buffer has a space character if ((first === DASH || first > 96 && first < 123)) { length = (chars = chars.replace(' ', ':')).length } } // execute plugins, property context if (plugged > 0) { if ((result = proxy(PROPS, chars, current, parent, line, column, out.length, id, depth, id)) !== void 0) { if ((length = (chars = result.trim()).length) === 0) { chars = '\0\0' } } } first = chars.charCodeAt(0) second = chars.charCodeAt(1) switch (first) { case NULL: { break } case AT: { if (second === IMPORT || second === CHARSET) { flat += chars + body.charAt(caret) break } } default: { if (chars.charCodeAt(length-1) === COLON) { break } out += property(chars, first, second, chars.charCodeAt(2)) } } } // reset context = 0 insert = 0 pseudo = 0 format = 0 invert = 0 chars = '' code = body.charCodeAt(++caret) break } } } // parse characters switch (code) { case CARRIAGE: case NEWLINE: { // auto insert semicolon if (comment + quote + parentheses + bracket + semicolon === 0) { // valid non-whitespace characters that // may precede a newline switch (peak) { case CLOSEPARENTHESES: case SINGLEQUOTE: case DOUBLEQUOTE: case AT: case TILDE: case GREATERTHAN: case STAR: case PLUS: case FOWARDSLASH: case DASH: case COLON: case COMMA: case SEMICOLON: case OPENBRACES: case CLOSEBRACES: { break } default: { // current buffer has a colon if (pseudo > 0) { insert = 1 } } } } // terminate line comment if (comment === FOWARDSLASH) { comment = 0 } else if (cascade + context === 0 && id !== KEYFRAME && chars.length > 0) { format = 1 chars += '\0' } // execute plugins, newline context if (plugged * unkwn > 0) { proxy(UNKWN, chars, current, parent, line, column, out.length, id, depth, id) } // next line, reset column position column = 1 line++ break } case SEMICOLON: case CLOSEBRACES: { if (comment + quote + parentheses + bracket === 0) { column++ break } } default: { // increment column position column++ // current character char = body.charAt(caret) // remove comments, escape functions, strings, attributes and prepare selectors switch (code) { case TAB: case SPACE: { if (quote + bracket + comment === 0) { switch (tail) { case COMMA: case COLON: case TAB: case SPACE: { char = '' break } default: { if (code !== SPACE) { char = ' ' } } } } break } // escape breaking control characters case NULL: { char = '\\0' break } case FORMFEED: { char = '\\f' break } case VERTICALTAB: { char = '\\v' break } // & case AND: { // inverted selector pattern i.e html & if (quote + comment + bracket === 0 && cascade > 0) { invert = 1 format = 1 char = '\f' + char } break } // ::paceholder, l // :read-ony, l case 108: { if (quote + comment + bracket + pattern === 0 && pseudo > 0) { switch (caret - pseudo) { // ::placeholder case 2: { if (tail === PLACEHOLDER && body.charCodeAt(caret-3) === COLON) { pattern = tail } } // :read-only case 8: { if (trail === READONLY) { pattern = trail } } } } break } // : case COLON: { if (quote + comment + bracket === 0) { pseudo = caret } break } // selectors case COMMA: { if (comment + parentheses + quote + bracket === 0) { format = 1 char += '\r' } break } // quotes case DOUBLEQUOTE: case SINGLEQUOTE: { if (comment === 0) { quote = quote === code ? 0 : (quote === 0 ? code : quote) } break } // attributes case OPENBRACKET: { if (quote + comment + parentheses === 0) { bracket++ } break } case CLOSEBRACKET: { if (quote + comment + parentheses === 0) { bracket-- } break } // functions case CLOSEPARENTHESES: { if (quote + comment + bracket === 0) { parentheses-- } break } case OPENPARENTHESES: { if (quote + comment + bracket === 0) { if (context === 0) { switch (tail*2 + trail*3) { // :matches case 533: { break } // :global, :not, :nth-child etc... default: { counter = 0 context = 1 } } } parentheses++ } break } case AT: { if (comment + parentheses + quote + bracket + pseudo + atrule === 0) { atrule = 1 } break } // block/line comments case STAR: case FOWARDSLASH: { if (quote + bracket + parentheses > 0) { break } switch (comment) { // initialize line/block comment context case 0: { switch (code*2 + body.charCodeAt(caret+1)*3) { // // case 235: { comment = FOWARDSLASH break } // /* case 220: { length = caret comment = STAR break } } break } // end block comment context case STAR: { if (code === FOWARDSLASH && tail === STAR && length + 2 !== caret) { // /* ... */, ! if (body.charCodeAt(length+2) === 33) { out += body.substring(length, caret+1) } char = '' comment = 0 } } } } } // ignore comment blocks if (comment === 0) { // aggressive isolation mode, divide each individual selector // including selectors in :not function but excluding selectors in :global function if (cascade + quote + bracket + atrule === 0 && id !== KEYFRAME && code !== SEMICOLON) { switch (code) { case COMMA: case TILDE: case GREATERTHAN: case PLUS: case CLOSEPARENTHESES: case OPENPARENTHESES: { if (context === 0) { // outside of an isolated context i.e nth-child(<...>) switch (tail) { case TAB: case SPACE: case NEWLINE: case CARRIAGE: { char = char + '\0' break } default: { char = '\0' + char + (code === COMMA ? '' : '\0') } } format = 1 } else { // within an isolated context, sleep untill it's terminated switch (code) { case OPENPARENTHESES: { // :globa( if (pseudo + 7 === caret && tail === 108) { pseudo = 0 } context = ++counter break } case CLOSEPARENTHESES: { if ((context = --counter) === 0) { format = 1 char += '\0' } break } } } break } case TAB: case SPACE: { switch (tail) { case NULL: case OPENBRACES: case CLOSEBRACES: case SEMICOLON: case COMMA: case FORMFEED: case TAB: case SPACE: case NEWLINE: case CARRIAGE: { break } default: { // ignore in isolated contexts if (context === 0) { format = 1 char += '\0' } } } } } } // concat buffer of characters chars += char // previous non-whitespace character code if (code !== SPACE && code !== TAB) { peak = code } } } } // tail character codes trail = tail tail = code // visit every character caret++ } length = out.length // preserve empty selector if (preserve > 0) { if (length === 0 && children.length === 0 && (current[0].length === 0) === false) { if (id !== MEDIA || (current.length === 1 && (cascade > 0 ? nscopealt : nscope) === current[0])) { length = current.join(',').length + 2 } } } if (length > 0) { // cascade isolation mode? selector = cascade === 0 && id !== KEYFRAME ? isolate(current) : current // execute plugins, block context if (plugged > 0) { result = proxy(BLCKS, out, selector, parent, line, column, length, id, depth, id) if (result !== void 0 && (out = result).length === 0) { return flat + out + children } } out = selector.join(',') + '{' + out + '}' if (prefix*pattern !== 0) { if (prefix === 2 && !vendor(out, 2)) pattern = 0 switch (pattern) { // ::read-only case READONLY: { out = out.replace(readonlyptn, ':'+moz+'$1')+out break } // ::placeholder case PLACEHOLDER: { out = ( out.replace(plcholdrptn, '::' + webkit + 'input-$1') + out.replace(plcholdrptn, '::' + moz + '$1') + out.replace(plcholdrptn, ':' + ms + 'input-$1') + out ) break } } pattern = 0 } } return flat + out + children } /** * Select * * @param {Array} parent * @param {string} current * @param {number} invert * @return {Array} */ function select (parent, current, invert) { var selectors = current.trim().split(selectorptn) var out = selectors var length = selectors.length var l = parent.length switch (l) { // 0-1 parent selectors case 0: case 1: { for (var i = 0, selector = l === 0 ? '' : parent[0] + ' '; i < length; ++i) { out[i] = scope(selector, out[i], invert, l).trim() } break } // >2 parent selectors, nested default: { for (var i = 0, j = 0, out = []; i < length; ++i) { for (var k = 0; k < l; ++k) { out[j++] = scope(parent[k] + ' ', selectors[i], invert, l).trim() } } } } return out } /** * Scope * * @param {string} parent * @param {string} current * @param {number} invert * @param {number} level * @return {string} */ function scope (parent, current, invert, level) { var selector = current var code = selector.charCodeAt(0) // trim leading whitespace if (code < 33) { code = (selector = selector.trim()).charCodeAt(0) } switch (code) { // & case AND: { switch (cascade + level) { case 0: case 1: { if (parent.trim().length === 0) { break } } default: { return selector.replace(andptn, '$1'+parent.trim()) } } break } // : case COLON: { switch (selector.charCodeAt(1)) { // g in :global case 103: { if (escape > 0 && cascade > 0) { return selector.replace(escapeptn, '$1').replace(andptn, '$1'+nscope) } break } default: { // :hover return parent.trim() + selector.replace(andptn, '$1'+parent.trim()) } } } default: { // html & if (invert*cascade > 0 && selector.indexOf('\f') > 0) { return selector.replace(andptn, (parent.charCodeAt(0) === COLON ? '' : '$1')+parent.trim()) } } } return parent + selector } /** * Property * * @param {string} input * @param {number} first * @param {number} second * @param {number} third * @return {string} */ function property (input, first, second, third) { var index = 0 var out = input + ';' var hash = (first*2) + (second*3) + (third*4) var cache // animation: a, n, i characters if (hash === 944) { return animation(out) } else if (prefix === 0 || (prefix === 2 && !vendor(out, 1))) { return out } // vendor prefix switch (hash) { // text-decoration/text-size-adjust/text-shadow/text-align/text-transform: t, e, x case 1015: { // text-shadow/text-align/text-transform, a return out.charCodeAt(10) === 97 ? webkit + out + out : out } // filter/fill f, i, l case 951: { // filter, t return out.charCodeAt(3) === 116 ? webkit + out + out : out } // color/column, c, o, l case 963: { // column, n return out.charCodeAt(5) === 110 ? webkit + out + out : out } // box-decoration-break, b, o, x case 1009: { if (out.charCodeAt(4) !== 100) { break } } // mask, m, a, s // clip-path, c, l, i case 969: case 942: { return webkit + out + out } // appearance: a, p, p case 978: { return webkit + out + moz + out + out } // hyphens: h, y, p // user-select: u, s, e case 1019: case 983: { return webkit + out + moz + out + ms + out + out } // background/backface-visibility, b, a, c case 883: { // backface-visibility, - if (out.charCodeAt(8) === DASH) { return webkit + out + out } // image-set(...) if (out.indexOf('image-set(', 11) > 0) { return out.replace(imgsrcptn, '$1'+webkit+'$2') + out } return out } // flex: f, l, e case 932: { if (out.charCodeAt(4) === DASH) { switch (out.charCodeAt(5)) { // flex-grow, g case 103: { return webkit + 'box-' + out.replace('-grow', '') + webkit + out + ms + out.replace('grow', 'positive') + out } // flex-shrink, s case 115: { return webkit + out + ms + out.replace('shrink', 'negative') + out } // flex-basis, b case 98: { return webkit + out + ms + out.replace('basis', 'preferred-size') + out } } } return webkit + out + ms + out + out } // order: o, r, d case 964: { return webkit + out + ms + 'flex' + '-' + out + out } // justify-items/justify-content, j, u, s case 1023: { // justify-content, c if (out.charCodeAt(8) !== 99) { break } cache = out.substring(out.indexOf(':', 15)).replace('flex-', '').replace('space-between', 'justify') return webkit + 'box-pack' + cache + webkit + out + ms + 'flex-pack' + cache + out } // cursor, c, u, r case 1005: { return cursorptn.test(out) ? out.replace(colonptn, ':' + webkit) + out.replace(colonptn, ':' + moz) + out : out } // writing-mode, w, r, i case 1000: { cache = out.substring(13).trim() index = cache.indexOf('-') + 1 switch (cache.charCodeAt(0)+cache.charCodeAt(index)) { // vertical-lr case 226: { cache = out.replace(writingptn, 'tb') break } // vertical-rl case 232: { cache = out.replace(writingptn, 'tb-rl') break } // horizontal-tb case 220: { cache = out.replace(writingptn, 'lr') break } default: { return out } } return webkit + out + ms + cache + out } // position: sticky case 1017: { if (out.indexOf('sticky', 9) === -1) { return out } } // display(flex/inline-flex/inline-box): d, i, s case 975: { index = (out = input).length - 10 cache = (out.charCodeAt(index) === 33 ? out.substring(0, index) : out).substring(input.indexOf(':', 7) + 1).trim() switch (hash = cache.charCodeAt(0) + (cache.charCodeAt(7)|0)) { // inline- case 203: { // inline-box if (cache.charCodeAt(8) < 111) { break } } // inline-box/sticky case 115: { out = out.replace(cache, webkit+cache)+';'+out break } // inline-flex // flex case 207: case 102: { out = ( out.replace(cache, webkit+(hash > 102 ? 'inline-' : '')+'box')+';'+ out.replace(cache, webkit+cache)+';'+ out.replace(cache, ms+cache+'box')+';'+ out ) } } return out + ';' } // align-items, align-center, align-self: a, l, i, - case 938: { if (out.charCodeAt(5) === DASH) { switch (out.charCodeAt(6)) { // align-items, i case 105: { cache = out.replace('-items', '') return webkit + out + webkit + 'box-' + cache + ms + 'flex-' + cache + out } // align-self, s case 115: { return webkit + out + ms + 'flex-item-' + out.replace(selfptn, '') + out } // align-content default: { return webkit + out + ms + 'flex-line-pack' + out.replace('align-content', '').replace(selfptn, '') + out } } } break } // min/max case 973: case 989: { // min-/max- height/width/block-size/inline-size if (out.charCodeAt(3) !== DASH || out.charCodeAt(4) === 122) { break } } // height/width: min-content / width: max-content case 931: case 953: { if (dimensionptn.test(input) === true) { // stretch if ((cache = input.substring(input.indexOf(':') + 1)).charCodeAt(0) === 115) return property(input.replace('stretch', 'fill-available'), first, second, third).replace(':fill-available', ':stretch') else return out.replace(cache, webkit + cache) + out.replace(cache, moz + cache.replace('fill-', '')) + out } break } // transform, transition: t, r, a case 962: { out = webkit + out + (out.charCodeAt(5) === 102 ? ms + out : '') + out // transitions if (second + third === 211 && out.charCodeAt(13) === 105 && out.indexOf('transform', 10) > 0) { return out.substring(0, out.indexOf(';', 27) + 1).replace(transformptn, '$1' + webkit + '$2') + out } break } } return out } /** * Vendor * * @param {string} content * @param {number} context * @return {boolean} */ function vendor (content, context) { var index = content.indexOf(context === 1 ? ':' : '{') var key = content.substring(0, context !== 3 ? index : 10) var value = content.substring(index + 1, content.length - 1) return should(context !== 2 ? key : key.replace(pseudofmt, '$1'), value, context) } /** * Supports * * @param {string} match * @param {string} group * @return {string} */ function supports (match, group) { var out = property(group, group.charCodeAt(0), group.charCodeAt(1), group.charCodeAt(2)) return out !== group+';' ? out.replace(propertyptn, ' or ($1)').substring(4) : '('+group+')' } /** * Animation * * @param {string} input * @return {string} */ function animation (input) { var length = input.length var index = input.indexOf(':', 9) + 1 var declare = input.substring(0, index).trim() var out = input.substring(index, length-1).trim() switch (input.charCodeAt(9)*keyed) { case 0: { break } // animation-*, - case DASH: { // animation-name, n if (input.charCodeAt(10) !== 110) { break } } // animation/animation-name default: { // split in case of multiple animations var list = out.split((out = '', animationptn)) for (var i = 0, index = 0, length = list.length; i < length; index = 0, ++i) { var value = list[i] var items = value.split(propertiesptn) while (value = items[index]) { var peak = value.charCodeAt(0) if (keyed === 1 && ( // letters (peak > AT && peak < 90) || (peak > 96 && peak < 123) || peak === UNDERSCORE || // dash but not in sequence i.e -- (peak === DASH && value.charCodeAt(1) !== DASH) )) { // not a number/function switch (isNaN(parseFloat(value)) + (value.indexOf('(') !== -1)) { case 1: { switch (value) { // not a valid reserved keyword case 'infinite': case 'alternate': case 'backwards': case 'running': case 'normal': case 'forwards': case 'both': case 'none': case 'linear': case 'ease': case 'ease-in': case 'ease-out': case 'ease-in-out': case 'paused': case 'reverse': case 'alternate-reverse': case 'inherit': case 'initial': case 'unset': case 'step-start': case 'step-end': { break } default: { value += key } } } } } items[index++] = value } out += (i === 0 ? '' : ',') + items.join(' ') } } } out = declare + out + ';' if (prefix === 1 || (prefix === 2 && vendor(out, 1))) return webkit + out + out return out } /** * Isolate * * @param {Array} current */ function isolate (current) { for (var i = 0, length = current.length, selector = Array(length), padding, element; i < length; ++i) { // split individual elements in a selector i.e h1 h2 === [h1, h2] var elements = current[i].split(elementptn) var out = '' for (var j = 0, size = 0, tail = 0, code = 0, l = elements.length; j < l; ++j) { // empty element if ((size = (element = elements[j]).length) === 0 && l > 1) { continue } tail = out.charCodeAt(out.length-1) code = element.charCodeAt(0) padding = '' if (j !== 0) { // determine if we need padding switch (tail) { case STAR: case TILDE: case GREATERTHAN: case PLUS: case SPACE: case OPENPARENTHESES: { break } default: { padding = ' ' } } } switch (code) { case AND: { element = padding + nscopealt } case TILDE: case GREATERTHAN: case PLUS: case SPACE: case CLOSEPARENTHESES: case OPENPARENTHESES: { break } case OPENBRACKET: { element = padding + element + nscopealt break } case COLON: { switch (element.charCodeAt(1)*2 + element.charCodeAt(2)*3) { // :global case 530: { if (escape > 0) { element = padding + element.substring(8, size - 1) break } } // :hover, :nth-child(), ... default: { if (j < 1 || elements[j-1].length < 1) { element = padding + nscopealt + element } } } break } case COMMA: { padding = '' } default: { if (size > 1 && element.indexOf(':') > 0) { element = padding + element.replace(pseudoptn, '$1' + nscopealt + '$2') } else { element = padding + element + nscopealt } } } out += element } selector[i] = out.replace(formatptn, '').trim() } return selector } /** * Proxy * * @param {number} context * @param {string} content * @param {Array} selectors * @param {Array} parents * @param {number} line * @param {number} column * @param {number} length * @param {number} id * @param {number} depth * @param {number} at * @return {(string|void|*)} */ function proxy (context, content, selectors, parents, line, column, length, id, depth, at) { for (var i = 0, out = content, next; i < plugged; ++i) { switch (next = plugins[i].call(stylis, context, out, selectors, parents, line, column, length, id, depth, at)) { case void 0: case false: case true: case null: { break } default: { out = next } } } if (out !== content) { return out } } /** * @param {number} code * @param {number} index * @param {number} length * @param {string} body * @return {number} */ function delimited (code, index, length, body) { for (var i = index + 1; i < length; ++i) { switch (body.charCodeAt(i)) { // /* case FOWARDSLASH: { if (code === STAR) { if (body.charCodeAt(i - 1) === STAR && index + 2 !== i) { return i + 1 } } break } // // case NEWLINE: { if (code === FOWARDSLASH) { return i + 1 } } } } return i } /** * @param {number} type * @param {number} index * @param {number} length * @param {number} find * @param {string} body * @return {number} */ function match (type, index, length, body) { for (var i = index + 1; i < length; ++i) { switch (body.charCodeAt(i)) { case type: { return i } } } return i } /** * Minify * * @param {(string|*)} output * @return {string} */ function minify (output) { return output .replace(formatptn, '') .replace(beforeptn, '') .replace(afterptn, '$1') .replace(tailptn, '$1') .replace(whiteptn, ' ') } /** * Use * * @param {(Array|function(...?)|number|void)?} plugin */ function use (plugin) { switch (plugin) { case void 0: case null: { plugged = plugins.length = 0 break } default: { if (typeof plugin === 'function') { plugins[plugged++] = plugin } else if (typeof plugin === 'object') { for (var i = 0, length = plugin.length; i < length; ++i) { use(plugin[i]) } } else { unkwn = !!plugin|0 } } } return use } /** * Set * * @param {*} options */ function set (options) { for (var name in options) { var value = options[name] switch (name) { case 'keyframe': keyed = value|0; break case 'global': escape = value|0; break case 'cascade': cascade = value|0; break case 'compress': compress = value|0; break case 'semicolon': semicolon = value|0; break case 'preserve': preserve = value|0; break case 'prefix': should = null if (!value) { prefix = 0 } else if (typeof value !== 'function') { prefix = 1 } else { prefix = 2 should = value } } } return set } /** * Stylis * * @param {string} selector * @param {string} input * @return {*} */ function stylis (selector, input) { if (this !== void 0 && this.constructor === stylis) { return factory(selector) } // setup var ns = selector var code = ns.charCodeAt(0) // trim leading whitespace if (code < 33) { code = (ns = ns.trim()).charCodeAt(0) } // keyframe/animation namespace if (keyed > 0) { key = ns.replace(invalidptn, code === OPENBRACKET ? '' : '-') } // reset, used to assert if a plugin is moneky-patching the return value code = 1 // cascade/isolate if (cascade === 1) { nscope = ns } else { nscopealt = ns } var selectors = [nscope] var result // execute plugins, pre-process context if (plugged > 0) { result = proxy(PREPS, input, selectors, selectors, line, column, 0, 0, 0, 0) if (result !== void 0 && typeof result === 'string') { input = result } } // build var output = compile(array, selectors, input, 0, 0) // execute plugins, post-process context if (plugged > 0) { result = proxy(POSTS, output, selectors, selectors, line, column, output.length, 0, 0, 0) // bypass minification if (result !== void 0 && typeof(output = result) !== 'string') { code = 0 } } // reset key = '' nscope = '' nscopealt = '' pattern = 0 line = 1 column = 1 return compress*code === 0 ? output : minify(output) } stylis['use'] = use stylis['set'] = set if (options !== void 0) { set(options) } return stylis })); /***/ }), /***/ "Ryky": /***/ (function(module, exports) { // removed by extract-text-webpack-plugin /***/ }), /***/ "Rzld": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAARCAYAAADUryzEAAAAAXNSR0IArs4c6QAAAXxJREFUOE+lkktLAlEUx//n+iBs30LaSdCX6ANEtK9lEERaLlqFjnIdtQgEIWFsFuFWWrQJ+gIFfYQoXCUtsgcGmWkzc2JMxcfkUN3Nvffce37nfx6Efy76rX9CLa7YPunkZtne+wBd133VmhUlhkf4RTm1u3HnBI+rWtu2Z5Nh/xBASWuHYGx3nAifzChZXiu2H9t6HgQpqsb2PZMMd4L3FShqsQrw7EjURwJFe3LtN0eAlKUpQzTfB4FDIEKp8fIRyed3ms6Ag+Og0WrdTyooga7afrHoa5v1sRSUtB4CmxW3jhBwxsDyGEDu6fOGYV67AQDYaQYcFBzNga1bVwChBMbauAJZCBrCM7EGAE69Vm3VEDMtB8CJ3xBPTQDCQYUBItVrPmSllNakOagAHBoB3LDg9awSuezZfwakihkQx78/ch2E3GvNzBUK0Y5kVwCYSckcLRGbAY9F51JG3pyKqqhao1uD6aFRdu1A90NC1RbsYzoZvvgTYDTQF+f5pxJQ2RbdAAAAAElFTkSuQmCC" /***/ }), /***/ "SECW": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAAAXNSR0IArs4c6QAABQhJREFUWEe1mFtsFGUYht93tiAa3NkCNxaIGEOC0WjkQkASAUlUEBHihQKeoggxGLLTVqjRi15oRG13NkRiQDSeALkwoBFQExGNcvACo9HYhBgxlXrDYWdpFEp3XjN/Z9ahdOksg3vV3fm/93vmO/z/95dI+bEdvQRhNYj1nsvnU8qBaQWyjs5CGAmir+zyirR6iYDGtGqG7+PvUoE/DnaYzUvRb+Uih9TLNesWy8JVJzt4YDjgiwKNf05je//BBgEPguiHhQXlTn4eFx0OyHZ0l4BdEBoIbB99JVYde5knaoHVBMo161ZfRuiayNgiHi+5fLceoJyjx3zhnZhNj2VhQanAH4aCGhLIbtZc+NgpYHRkRODtkovlJKspCp4NFyFJzDnYLOCJmFYvLCzyCvxyMNQFQEFk5OObGMxZEqs9l5uGeqPhgCIb29EKCesBmMIn0EsLdwyO1HlATS0a1+vjpyhNJLohLPKKPFwr50mBAns7r6kgdkqYaPSIv0ZbuLmnk8dj0fvPlZ3Xh6aABxafoTDzYjBJUjb4RQIoEd9BGBVGartX5EMXAJluEKodRAsrvALfHK5N64lQNX3Neko+qiVA4m7P5Rch4MCybF77AcwIo/NB2eUjw8FcSoQizayj9yE8HH4/UC7y9ipQY14zK8C34UNxBCZ7r/G3/xPIflbX6xyODNQ30GBh5skC95svuWa97vtYFQLsKRc5PwmMiVCKoyOb124A8wIdy8KGUoHPGKBsXscANAV/Z4AFp4rclRQozeHamNe9FeDT0FdPucjxHLNGE/r70G3yR3iOjTHt7fSTAqVZ194uy/VwUoJt0jYSE9no6L6K8EkItNdzOTeNk3ptbUd7Jcwx2SEWMtxBN4ZAmzyXK+sVTbPedrRRworQ/0razVorH+vCH17xXLalcVCvre1onYS1xr+FNuYctfhCRwjU6blsrVc0zXrbUYeElrDTWpht0RJUsNUAAdu8IpemcVCvrZ3XVgFLjF0GS4MIzfKFfWGEvvZczq5XNM1629E+CbNMhIjZzLXoWr+CoyHQ6Qk2xv3Szr40TpLa3tiukX96OC7hagOUwaSBjdHRrxCmGCFiXtnlZ0lF06zLOroHwp7Qb1fZ5Q0G6LxKJ97yXC5P4yipre1os4Qn4x1ugMa2atq5fhwMSfuYwRSvg78nFb6UdXarrlMFXeYKBWBEA6af6OCh6sQYLy4SWz2Xyy7FUVIb29EWCaajSVSbqQqUdXQbhEOhoCwLi0oFmiPlcn9yzVro+9gZjR4gppVdfj9QwrFPfIQNhnCrATNOdfDnywnU2Kqb/H4ciC4RwV1tyBHWFHebGnXGRGlyGMpuK4P5lwvKwFSwuzrkA0c4CtO8dTwVvfQF16CxLZrS7+NgNBKE15VladMXpEk+tlQjQ3gNFqaf6GRXPAO17uJzJOyIoACIxDZk8EK93Rd0Eyp4UTLHg/EXzF0kFpcK/GpwOdS8SgeROlcxc5JJX3VLIN6T8NFEG3tr7ejBDtzt4U4SD0h4NGrtUOXIiAwWDo5MzZSdV+RtasQZvFG9q8UekjgN4DCEHhA95pHQBJpReGp0HAxKx3aMwtPxmkkcofjCYEsg8Gp0CNbbdcE+I2BN1NoXs0/0/6FIINjR+ytYLOD+6tlXS53oIvBxQwY7gh046UvUBRQXDaYE+JjkW2iy/IEbi2+hx/LRAwtHS538IylEfN2/pxokvL7XsMgAAAAASUVORK5CYII=" /***/ }), /***/ "SHda": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; __webpack_require__("E+tM"); var _cascader = _interopRequireDefault(__webpack_require__("csJ0")); var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); var _cascaderAddressOptions = _interopRequireDefault(__webpack_require__("7fAF")); var _dva = __webpack_require__("S6G3"); var _dec, _class; /** * @see https://gist.github.com/afc163/7582f35654fd03d5be7009444345ea17 * 省市区选择组件 */ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } var CityCascader = exports.default = (_dec = (0, _dva.connect)(function (state) { return { //地图数据 mapStyle: state.command.mapStyle }; }), _dec(_class = /*#__PURE__*/function (_Component) { function CityCascader(props) { var _this; (0, _classCallCheck2.default)(this, CityCascader); _this = _callSuper(this, CityCascader, [props]); _this.onChange = function (code, name) { _this.props.onChange && _this.props.onChange({ code: code, name: name }); }; return _this; } (0, _inherits2.default)(CityCascader, _Component); return (0, _createClass2.default)(CityCascader, [{ key: "componentDidMount", value: function componentDidMount() {} }, { key: "render", value: function render() { return /*#__PURE__*/_react.default.createElement(_cascader.default, { options: _cascaderAddressOptions.default, onChange: this.onChange }); } }]); }(_react.Component)) || _class); /***/ }), /***/ "SJXl": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAAAXNSR0IArs4c6QAABIxJREFUaAXlmz9vEzEYxpNrmrSVEAOiFPEBKmaGCqlQsoGEhNStLLDxAShsMMAIfAA2utCtEhIS3VKgUsXQGfUDoKJ2qiK1TZqmPE+wI58b38UXX+LrnRT5T+zX78+v7XPsN8VCSs/Z2dlUq9Wab7fbt9DELD/ImykWi5cQ54dPHXl15P1FfIefIAi2S6XSJvIOWcD1U3QpEMpPNxqNx5C5CIXnkC4nkY+6TdT9hbprlUrlM9J7SeT0quME+OTk5C4s+QIN3IeipV4NJc0DbAt112H5d+Pj4z+SypH1BgIGaPX09PQNhM1LgSmHm2NjY68AvpG0nUTAsOL1ZrP5AeFS0oYHqQerr5bL5ecId23lWAMfHx8/YIOAvWzbmMvy0OGAHT4xMfHNRm5gUxiw7NWvo4alztSBulAnG4a+LAzhFQzhjwif2AgfVlmAr2CIP0PYiGszFhiQVwH7BeHtOGGj/B6wW4B+hHA/So9IYGHZmu+wElBAVxEaLR05h8Uw9tqyEpYhDUOd1Tw9bgTmYgABXs5ZHUJNU+eohaznkEYFvnq4Ghs7RG3Etzh0b0P3h71eWeeAUZCbit8IR/qeHbQTAX2ARewmwtDm5JwFAcsdVKZh2VlkIIvecSELY298D3vjml7IVfro6CiRqMnJyUT1WAl776q69w5ZGLBvE0v2tKLO1AWGdReg87B+9Qyze+YFW6fNLjB+zy4PU4thtqWydeYwJvg0JvgfhE5/vOtQcg7rc9I2X5cbl8ZK3cKKfQPhXsfCPJZJGzZOqTS/J5s4eirIIb2YZoOeyO4wBqCfgqnnPFEqNTXISNYSj1IRSXS6KLWTc1Cm9dA0Z/VycXL08jZpMpI1wArGc+NcPGTlHOYheV6e2dwBlzC2Z1yZt9+5aipnynelH1kDrF7ynseVXG/lkJVDOjfAZJUbD2+t4lox7p3r+FxxIbjf96ipnCnfhW5CRp07LQLn4iErFy1eRufiISvn8E4uaP9D7nAOOwPu9z1qKmfKd2gQulQE2w4Fei2KrIFwIGl6rakD5TB/m2TlonWI1YsOJBf6ISNZ5RnWGmjvDEpseo/q+XpatmvKl98PGJKx4OQQL2VFC/piZgsOy4YP8ZBBP6h1W0EZKr8uGLuHeAX6QWUIwEpVlS10t4Rr0p+QdNFuHzZxbdpdn0K/lnDx9Nqq6zJQmI5sqpohYNyy1TDWV9UCWY6TRb05JEtoSDMD76t8XYijV3YBvYSwzQ7I4kPdBUPo9p8soSEt4egbgQovZTprIXXv5d9BjnNDWoXDBdQnVM6UJw+suwIf66cqhxqPBAYsXQ5rCDPhqwVYeuNVETZUSDXec0jLAqwo3Pm2ZJ6voYCl66ERlrpHArMABOyLXlth2scHOtK5tEpd4/SLBaYACGqIebGMuDert9BlmbpRxzjYDks/hdQywksvHw7iBOdyj+FDD7eR7cjYNnUwvXpUA+nxyFVaL6ynhSMbfbuG9YNjNH/y6AG+IFyD0vwbz3vsi7/rbdumB7Kw3hje19ewWVlC/sX+o5YOzjTgvfwr3j9ZFyQJX8egnAAAAABJRU5ErkJggg==" /***/ }), /***/ "Sgor": /***/ (function(module, exports) { module.exports = "data:image/png;base64,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" /***/ }), /***/ "Skvt": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAc9JREFUOE+dkz2LE1EUhp9zJxOTwkphQbDQwg9UFLETCxFB/QEWlhZGgopaaGRn9DpZ7PwgISO7gmDrD7BRsPOr3Cw2YiFaaSEbRNnN3Dky+RizwWDWW809c97nvufce4SxFUbz+8CdVTgObAVE4bOIPE+dPr5jq4ujEhlurLXFrpm5L2gF8MbBvb3ggIWC23zZ2tOr/RCQiZ2Zeabosb8Kx4IKL/306wlr7WoPENTjBsrFacR5jtCaC6sXJKi3dqtKWybZnkx1QrpfgvrDe6heWdfpg2TBPJAgai2B7PljTRTVvLlrwLL2nyrvMwcdVDcOOnrLS8uNxPx6o7DD9woHu5qUJOU1SLtbNEf8FXcd4cYA/EOCKP4JlLOAQuinScMZ/22K7vQ9DjinGxR5h7BYcHo4EVNDdHYA6EhwO24j7B1aVcj8D0vQvNz+RwqYPDcrIYziuwpX/6+J0uhdIypLo+QpYakgh3pWZ6P4o8D2KYWDV81C/Wa1ItY2t3SN92Wk7n9ysqfc+ZacbDYvrWQ9OKPwBJFXorqswil0wjBBgkqroJuu5cNk7dNiqfS9XKtVlvuDNb8r8ZJzIEdBtqGaTeAnlBcY82guPP9h1OJvbgewvR46MaEAAAAASUVORK5CYII=" /***/ }), /***/ "T2Uv": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; __webpack_require__("/m1I"); var _tooltip = _interopRequireDefault(__webpack_require__("O6j2")); __webpack_require__("baa2"); var _icon = _interopRequireDefault(__webpack_require__("FC3+")); var _toConsumableArray2 = _interopRequireDefault(__webpack_require__("V4Os")); __webpack_require__("UQ5M"); var _message2 = _interopRequireDefault(__webpack_require__("/qCn")); var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); __webpack_require__("sRCI"); var _modal = _interopRequireDefault(__webpack_require__("vnWH")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); var _dva = __webpack_require__("S6G3"); var _imInitialize = _interopRequireDefault(__webpack_require__("cLc/")); var _events = _interopRequireDefault(__webpack_require__("TLe5")); var _dec, _class; /** * */ // import SendBar from "./SendBar"; function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } // 引入 EventEmitter var confirm = _modal.default.confirm; var Group = exports.default = (_dec = (0, _dva.connect)(function (state) { return { conversationList: state.im.conversationList, currentConversation: state.im.currentConversation, nextReqMessageID: state.im.nextReqMessageID, isCompleted: state.im.isCompleted, currentMessageList: state.im.currentMessageList }; }), _dec(_class = /*#__PURE__*/function (_Component) { function Group(props) { var _this; (0, _classCallCheck2.default)(this, Group); _this = _callSuper(this, Group, [props]); _this.state = { height: null //最大高度 }; return _this; } (0, _inherits2.default)(Group, _Component); return (0, _createClass2.default)(Group, [{ key: "componentDidMount", value: function componentDidMount() { var height = document.documentElement.clientHeight - 120 - 130 - 40; this.setState({ height: height }); } }, { key: "componentWillReceiveProps", value: function componentWillReceiveProps(nextProps) {} //切换会话 }, { key: "selectConversation", value: function selectConversation(conversationID) { var _this2 = this; this.props.changeImStatus(true); //将侧边栏的im状态打开 // 1.切换会话前,将切换前的会话进行已读上报 if (this.props.conversationID) { _imInitialize.default.setMessageRead({ conversationID: this.props.conversation && this.props.conversation.conversationID // conversationID: this.props.conversationID }); } // 2.待切换的会话也进行已读上报 _imInitialize.default.setMessageRead({ conversationID: conversationID }); this.props.dispatch({ type: "im/totalUnreadCount", payload: "" }); // 3. 获取会话信息 return _imInitialize.default.getConversationProfile(conversationID).then(function (_ref) { var data = _ref.data; // console.log(data); // // 3.1 更新当前会话 _this2.props.dispatch({ type: "im/updateCurrentConversation", payload: data.conversation }); // 3.2 获取消息列表 _this2.getMessageList(conversationID); return Promise.resolve(); }, function (err) { _message2.default.error(err.toString()); }); } }, { key: "getMessageList", value: function getMessageList(conversationID) { var _this3 = this; if (this.props.isCompleted) { _message2.default.info("没有更多的历史消息了"); return; } var _this$props = this.props, nextReqMessageID = _this$props.nextReqMessageID, currentMessageList = _this$props.currentMessageList; _imInitialize.default.getMessageList({ conversationID: conversationID, nextReqMessageID: nextReqMessageID, count: 15 }).then(function (imReponse) { // 更新messageID,续拉时要用到 // console.log(imReponse) _this3.props.dispatch({ type: "im/updateCurrentConversationCont", payload: { nextReqMessageID: imReponse.data.nextReqMessageID, isCompleted: imReponse.data.isCompleted, currentMessageList: [].concat((0, _toConsumableArray2.default)(imReponse.data.messageList), (0, _toConsumableArray2.default)(currentMessageList)) // 更新当前消息列表,从头部插入 } }); }); } }, { key: "render", value: function render() { var _this4 = this; return /*#__PURE__*/_react.default.createElement("div", { className: "data-list group" }, /*#__PURE__*/_react.default.createElement("div", { className: "security search-list_command amap_lib_placeSearch" }, /*#__PURE__*/_react.default.createElement("div", { className: "list", style: { maxHeight: this.state.height, overflow: "auto" } }, this.props.conversationList.map(function (item, index) { if (item.type == "GROUP") { var name = item.groupProfile.name; var avatar = __webpack_require__("PgSr"); return /*#__PURE__*/_react.default.createElement("div", { key: index, className: "item", onClick: function onClick() { _this4.selectConversation(item.conversationID); } }, /*#__PURE__*/_react.default.createElement("div", { className: "poibox" }, /*#__PURE__*/_react.default.createElement("img", { className: "img", src: avatar, style: { margin: "8px 10px 0 0" } }), /*#__PURE__*/_react.default.createElement("div", { style: { marginLeft: 45 } }, /*#__PURE__*/_react.default.createElement("div", { className: "name", style: { fontSize: "16px" } }, name || "---"), /*#__PURE__*/_react.default.createElement("div", { className: "text", style: { margin: "10px 0" } }, /*#__PURE__*/_react.default.createElement("span", { className: "send-header-bar", style: { float: "unset" } }, /*#__PURE__*/_react.default.createElement(_tooltip.default, { placement: "bottom", title: "\u6587\u5B57\u8C03\u5EA6" }, /*#__PURE__*/_react.default.createElement(_icon.default, { type: "form", style: { fontSize: "17px" }, onClick: function onClick(e) { _this4.selectConversation(item.conversationID); } })), /*#__PURE__*/_react.default.createElement(_tooltip.default, { placement: "bottom", title: "\u8BED\u97F3\u8C03\u5EA6", onClick: function onClick(e) { var list = { photoUrl: avatar, name: name, conversonGroupID: item.conversationID, group: item.groupProfile.groupID }; e.stopPropagation(), //合成事件停止冒泡 // this.props.clickTextScheduling(list, "voice"); _events.default.emit('clickTextScheduling', { item: item, type: "voice" }); } }, /*#__PURE__*/_react.default.createElement(_icon.default, { type: "audio", style: { fontSize: "17px" } })), /*#__PURE__*/_react.default.createElement(_tooltip.default, { placement: "bottom", title: "\u89C6\u9891\u8C03\u5EA6", onClick: function onClick(e) { e.stopPropagation(); // var options = { groupID: item.groupProfile.groupID, count: 100 }; _imInitialize.default.getGroupMemberList(options).then(function (res) { if (res.code == 0) { var list = res.data.memberList.map(function (value) { return { value: value, mobilePhone: value.userID, photoUrl: value.avatar, name: value.nick }; }); console.log(list); _this4.props.groupVideo(list); // this.props.clickTextScheduling( // list, // "video" // ); } }).catch(function (err) { console.log(err); }); } }, /*#__PURE__*/_react.default.createElement(_icon.default, { type: "video-camera", style: { fontSize: "17px" } }))))))); } }), JSON.stringify(this.props.conversationList).indexOf('"type":"GROUP"') == -1 && /*#__PURE__*/_react.default.createElement("div", { style: { textAlign: "center", fontSize: "14px", color: "#afb0b1" } }, "\u6682\u65E0\u6570\u636E")))); } }]); }(_react.Component)) || _class); /***/ }), /***/ "TGlF": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAAW1JREFUaEPtWTtOw1AQnAmfioouiDtwgyTU4QJwiEhgxA1oEAkSh4ALAC3BN8gdItLRQMUni2LhYEUiej9jv2hd7+zb2Z21366JyB9GHj8yAp1r2ZUPXAjRgaBpRYqYUDDkBs6GPY6tsAGMOQt++okRBNte/oiXxjr2/psE2325EeDQK/gfMIHbp4RHRV/tgZyL4BTAZogzCj7eSVyyNZDngmy6acIHm4P2r6T7NcVdhiEm6Ql3Fgi8imDLxqepLYk3tvoiOSBN6NTUy3yUX4GSCZhm09Wu9Aq4BmaKUwKzTIXoI9OML9ppBbQCrtrJP54h9BvChysP7YGV74HyrxKFy9xaAwePx7y30WPll7nor9PRDzTRj5Q2eq+jrdMAUyciSqDqauheaF4B3QtZi1H3QvOU6V7IWj2/AB1oVn6g8VCHEVQlpBIyEsrfRiohlVDdJaR7oSUVyn7y6V4oz1BVA43uhTzfIr7w6Ncq39QKqcSwtbgkAAAAAElFTkSuQmCC" /***/ }), /***/ "TKha": /***/ (function(module, exports) { module.exports = "data:image/png;base64,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" /***/ }), /***/ "TLe5": /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _events = __webpack_require__("vzCy"); /** * @see https://zhuanlan.zhihu.com/p/133303180 * @see https://www.jianshu.com/p/e95d9ffd32e4 * Events事件做跨级通信 **/ var eventCenter = new _events.EventEmitter(); var _default = exports.default = eventCenter; /***/ }), /***/ "TP+C": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = _default; __webpack_require__("sRCI"); var _modal = _interopRequireDefault(__webpack_require__("vnWH")); /** * 定义个人的信息窗体 * @param type:用于基础图层与一张图的图层区分(两者除了展示的字段不一样,其余功能都一样)'police'是警保联动 */ var confirm = _modal.default.confirm; function _default(data) { var _this2 = this; var name = data.name, idCardNo = data.idCardNo, photoUrl = data.photoUrl, mobilePhone = data.mobilePhone; var content = []; var imgHeader = []; if (photoUrl) { imgHeader.push(""); } else { imgHeader.push("" + name.substring(name.length - 2, name.length) + ""); } content.push("
    " + imgHeader + "
    " + name + "
    证件号码:" + idCardNo + "
    "); content.join("
    "); var info = document.createElement("div"); info.className = "content-window-card"; //可以通过下面的方式修改自定义窗体的宽高 info.style.width = "400px"; // 定义内容 var middle = document.createElement("div"); middle.className = "info-middle"; middle.innerHTML = content; info.appendChild(middle); //定义详情 var detail = document.createElement("div"); detail.className = "detail-div"; info.appendChild(detail); //定义关闭按钮 var detail = document.createElement("div"); detail.className = "close-div"; var a = document.createElement("a"); a.innerHTML = "x"; a.onclick = function () { // this.state.map.clearInfoWindow(); _this2.clear('setPersonSelectIndex'); }; detail.appendChild(a); info.appendChild(detail); //定义三个调度按钮 var layoutAuthority = this.props.layoutAuthority; if (layoutAuthority.basisLayer) { var top = document.createElement("div"); top.className = "info-button"; var button1 = document.createElement("span"); button1.className = "button"; button1.innerHTML = "文字调度"; button1.onclick = function () { _this2.clear('setPersonSelectIndex'); _this2.character(data); }; var button2 = document.createElement("span"); button2.className = "button"; button2.innerHTML = "语音调度"; button2.onclick = function () { _this2.clear('setPersonSelectIndex'); _this2.voice(data); }; // var button3 = document.createElement("span"); // button3.className = "button"; // button3.innerHTML = "视频调度"; var _this = this; // button3.onclick = () => { // _this.clear('setPersonSelectIndex') // confirm({ // title: <>是否开启屏幕录制?Modal.destroyAll()} style={{position:'absolute',top:'4px',right:'6px',cursor:'pointer',color:'#000000a6'}}>取消, // content: // "开启后,被调度保安员的视频页面将会被录制,调度结束后,可查看录制文件。", // okText: "开启录制,继续调度", // cancelText: "不开启录制,继续调度", // onOk() { // _this.video([data], "个人调度", [mobilePhone]); // }, // onCancel() { // _this.video([data], "个人调度", []); // }, // }); // }; top.appendChild(button1); top.appendChild(button2); // top.appendChild(button3); info.appendChild(top); // 定义底部内容 var bottom = document.createElement("div"); bottom.className = "info-bottom"; bottom.style.position = "relative"; bottom.style.top = "-1px"; bottom.style.margin = "0 auto"; var sharp = document.createElement("img"); sharp.src = "https://webapi.amap.com/images/sharp.png"; bottom.appendChild(sharp); info.appendChild(bottom); } return info; } /***/ }), /***/ "TToO": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["b"] = __extends; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __assign; }); /* unused harmony export __rest */ /* unused harmony export __decorate */ /* unused harmony export __param */ /* unused harmony export __metadata */ /* unused harmony export __awaiter */ /* unused harmony export __generator */ /* unused harmony export __createBinding */ /* unused harmony export __exportStar */ /* unused harmony export __values */ /* unused harmony export __read */ /* unused harmony export __spread */ /* unused harmony export __spreadArrays */ /* unused harmony export __spreadArray */ /* unused harmony export __await */ /* unused harmony export __asyncGenerator */ /* unused harmony export __asyncDelegator */ /* unused harmony export __asyncValues */ /* unused harmony export __makeTemplateObject */ /* unused harmony export __importStar */ /* unused harmony export __importDefault */ /* unused harmony export __classPrivateFieldGet */ /* unused harmony export __classPrivateFieldSet */ /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ /* global Reflect, Promise */ var extendStatics = function(d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; function __extends(d, b) { if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); } var __assign = function() { __assign = Object.assign || function __assign(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } return t; } return __assign.apply(this, arguments); } function __rest(s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; } function __decorate(decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; } function __param(paramIndex, decorator) { return function (target, key) { decorator(target, key, paramIndex); } } function __metadata(metadataKey, metadataValue) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); } function __awaiter(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); } function __generator(thisArg, body) { var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); while (_) try { if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; if (y = 0, t) op = [op[0] & 2, t.value]; switch (op[0]) { case 0: case 1: t = op; break; case 4: _.label++; return { value: op[1], done: false }; case 5: _.label++; y = op[1]; op = [0]; continue; case 7: op = _.ops.pop(); _.trys.pop(); continue; default: if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } if (t[2]) _.ops.pop(); _.trys.pop(); continue; } op = body.call(thisArg, _); } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; } } var __createBinding = Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; }); function __exportStar(m, o) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); } function __values(o) { var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; if (m) return m.call(o); if (o && typeof o.length === "number") return { next: function () { if (o && i >= o.length) o = void 0; return { value: o && o[i++], done: !o }; } }; throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); } function __read(o, n) { var m = typeof Symbol === "function" && o[Symbol.iterator]; if (!m) return o; var i = m.call(o), r, ar = [], e; try { while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); } catch (error) { e = { error: error }; } finally { try { if (r && !r.done && (m = i["return"])) m.call(i); } finally { if (e) throw e.error; } } return ar; } /** @deprecated */ function __spread() { for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); return ar; } /** @deprecated */ function __spreadArrays() { for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; for (var r = Array(s), k = 0, i = 0; i < il; i++) for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) r[k] = a[j]; return r; } function __spreadArray(to, from, pack) { if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { if (ar || !(i in from)) { if (!ar) ar = Array.prototype.slice.call(from, 0, i); ar[i] = from[i]; } } return to.concat(ar || from); } function __await(v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } function __asyncGenerator(thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } function fulfill(value) { resume("next", value); } function reject(value) { resume("throw", value); } function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } } function __asyncDelegator(o) { var i, p; return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } } function __asyncValues(o) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var m = o[Symbol.asyncIterator], i; return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } } function __makeTemplateObject(cooked, raw) { if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } return cooked; }; var __setModuleDefault = Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }; function __importStar(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; } function __importDefault(mod) { return (mod && mod.__esModule) ? mod : { default: mod }; } function __classPrivateFieldGet(receiver, state, kind, f) { if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); } function __classPrivateFieldSet(receiver, state, value, kind, f) { if (kind === "m") throw new TypeError("Private method is not writable"); if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; } /***/ }), /***/ "Tcim": /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__.p + "static/map.8150d686.png"; /***/ }), /***/ "TnUk": /***/ (function(module, exports) { // removed by extract-text-webpack-plugin /***/ }), /***/ "TniA": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; __webpack_require__("faxx"); var _row = _interopRequireDefault(__webpack_require__("FV1P")); __webpack_require__("rpBe"); var _checkbox = _interopRequireDefault(__webpack_require__("hK1P")); var _defineProperty2 = _interopRequireDefault(__webpack_require__("mAPx")); var _objectSpread2 = _interopRequireDefault(__webpack_require__("+TWC")); var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); var _api = __webpack_require__("H/Zg"); var _index = _interopRequireDefault(__webpack_require__("W7F7")); var _dva = __webpack_require__("S6G3"); var _events = _interopRequireDefault(__webpack_require__("TLe5")); var _recordHistory = __webpack_require__("eXDv"); var _biz = __webpack_require__("Q3h8"); var _CityCascader = _interopRequireDefault(__webpack_require__("SHda")); var _TypeData = __webpack_require__("HV3m"); var _dec, _class; /** * 一张图数据展示 * 此页面用于一张图以及警保联动 * param:layerSatatus * 如果没有此layerSatatus参数,需要正常显示所有功能 */ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } var store = __webpack_require__("Y4FN"); var APictureData = exports.default = (_dec = (0, _dva.connect)(function (state) { return { //地图数据 pictureMarkersList: state.command.pictureMarkersList, mapStyle: state.command.mapStyle, layoutAuthority: state.command.layoutAuthority }; }), _dec(_class = /*#__PURE__*/function (_Component) { function APictureData(props) { var _this; (0, _classCallCheck2.default)(this, APictureData); _this = _callSuper(this, APictureData, [props]); // 获取保安公司列表 _this.getSecurityCompanyList = function () { var typeList = []; var that = _this; (0, _biz.getCompanyList)({ hasMark: false, success: function success(res) { if (res.length == 1) { return that.setState({ hasOneCompany: true }); } typeList = that.state.securityCompanyData.typeList.concat(res); that.setState({ securityCompanyData: (0, _objectSpread2.default)({}, that.state.securityCompanyData, { typeList: typeList }) }); } }); }; // 分类的点击事件 _this.onChangeList = function (dataList, type, e) { var mapIcon = null; var currentChecked = null; var optionType = null; //当前的操作类型 /** * 如果当前选中的框长度大于之前的,证明是增加的 * 反之是取消勾选 */ var has = ''; /////////增加 if (e.length > _this.state[type].checkdata.length) { currentChecked = e[e.length - 1].categoryName; mapIcon = e[e.length - 1].mapIcon; optionType = 'add'; switch (type) { //保安人员 case 'securityResource': var location = JSON.parse(e[e.length - 1].location); _this.propsOption(optionType, { data: [(0, _objectSpread2.default)({}, e[e.length - 1], { name: e[e.length - 1].securityName, mobilePhone: e[e.length - 1].phone, longitude: location && location.longitude, latitude: location && location.latitude })], mapIcon: '' }, type); break; default: if (dataList.length > 0) { has = dataList.find(function (item) { return item.name == currentChecked; }); } else { has = ''; } /** * 如果选中类型的定位数据已有存在,就直接返回值 * 如果不存在,需要先去获取值,然后在存储 * 目的:避免重复加载数据 */ if (has) { _this.propsOption(optionType, (0, _objectSpread2.default)({}, has, { mapIcon: mapIcon }), type); } else { if (type == 'perception') { _this.perceptionGetTypeData(1, currentChecked, optionType, mapIcon); } else if (type == 'attendance') { _this.attendanceGetTypeData(1, currentChecked, optionType, mapIcon); } // 不推荐这种写法,代码可读性极差 // let apiUrl = type + 'GetTypeData' // this[apiUrl](1, currentChecked, optionType, mapIcon) } break; } } else { /////减少 var data = _this.state[type].checkdata.filter(function (i1) { return !e.find(function (i2) { return i1 == i2; }); })[0]; currentChecked = data.categoryName; mapIcon = data.mapIcon; optionType = 'reduce'; switch (type) { case 'securityResource': has = _this.props.pictureMarkersList[type].find(function (item) { return item.name == data.ID; }); _this.propsOption(optionType, (0, _objectSpread2.default)({}, has, { mapIcon: '' }), type); break; default: has = _this.props.pictureMarkersList[type].find(function (item) { return item.name == currentChecked; }); _this.propsOption(optionType, (0, _objectSpread2.default)({}, has, { mapIcon: mapIcon }), type); break; } } _this.setState((0, _defineProperty2.default)({}, type, (0, _objectSpread2.default)({}, _this.state[type], { checkdata: e }))); }; // 保安资源选择 _this.onChangeSecRes = function (e) { console.log('onChange', e); if (e.target.checked) { e = e.target.value; //增加 _this.propsOption('add', { data: e.typeList }, e.type); // TAG: 根据需求 368, 勾选保安服务公司时,打开公司列表浮层 if (e.type == 'securityCompany') { _this.props.dispatch({ type: 'command/setSelectComponyList', payload: e.typeList }); var selectComponyList = JSON.parse(JSON.stringify(e.typeList)); // 解引用 var param = { from: 'componyList', data: selectComponyList }; (0, _recordHistory.recordAdd)({ from: 'APictureData', to: 'CreateComponeyInfoWindow', fromData: e.typeList, toID: e.type }); } else { (0, _recordHistory.recordAdd)({ from: 'APictureData', to: 'CreateTrajectoryInfoWindow', fromData: e.typeList, toID: e.type }); } if (e.type == 'securityCompany') { _this.setState({ securityCompanyChecked: true }); } else { _this.setState({ securityResourceChecked: true }); } } else { e = e.target.value; //减少 var markSecurityResource = _this.props.pictureMarkersList.securityResource; if (markSecurityResource.length > 0) { _this.propsOption('reduce', { data: markSecurityResource[0].data }, e.type); } (0, _recordHistory.recordRemove)({ from: 'APictureData', toID: e.type }); if (e.type == 'securityCompany') { _this.setState({ securityCompanyChecked: false }); _this.state.securityCompanyChecked = false; _this.props.dispatch({ type: 'command/setSelectAttendInfo', payload: {} }); // 清除公司标记 _this.props.dispatch({ type: 'command/setSelectComponyList', payload: [] }); _events.default.emit('clearMapModal', 'ComponeyInfo'); _events.default.emit('clearMapTag', 'securityCompany'); } else { // 清除地图所有标记 _events.default.emit('clearMapModal', 'ComponeyInfo'); _events.default.emit('clearMapModal', 'AttendInfo'); _this.setState({ securityResourceChecked: false }); _this.state.securityResourceChecked = false; } // TAG: 没有任何勾选时,则返回至最初的GIS地图页面 if (!_this.state.securityCompanyChecked && !_this.state.securityResourceChecked) { var point = store.get('userPosition'); console.log('userPosition', point); _events.default.emit('gotoPosition', point); } } }; _this.state = { securityResource: { //保安资源 typeList: [], //列表数据 checkdata: [] //上一次选中的复选框 }, securityCompanyData: { //保安公司资源 typeList: [], //列表数据 checkdata: [] //上一次选中的复选框 }, perception: { //态势感知 typeList: [], //列表数据 checkdata: [] //上一次选中的复选框 }, attendance: { //驻勤点 typeList: [], //列表数据 checkdata: [] //上一次选中的复选框 }, //一张图所有数据 pictureList: { //保安资源的数据 //态势感知的数据 perception: [], //驻勤点的数据 attendance: [] }, // height: null, //保安员资源列表的最大高度 allHeight: null, hasOneCompany: false, // 根据需求 460, 接口处拿到的保安公司只有一家企业时,就需要在隐藏保安公司入口 securityResourceChecked: false, securityCompanyChecked: false }; return _this; } (0, _inherits2.default)(APictureData, _Component); return (0, _createClass2.default)(APictureData, [{ key: "componentDidMount", value: function componentDidMount() { var allHeight = document.documentElement.clientHeight - 9 - 340 - 46 - 16; var that = this; this.setState({ allHeight: allHeight }); //默认情况下需加载所有数据 this.getSecurityCompanyList(); if (!this.props.layerSatatus) { this.getSecurityResourcesList(); } this.getClassification(); this.props.dispatch({ type: 'command/setSelectComponyList', payload: [] }); _events.default.addListener('showAPictureData', function (result) { console.log('showAPictureData', result); that.propsOption('add', { data: result.typeList }, result.type); // TAG: 根据需求 368, 勾选保安服务公司时,打开公司列表浮层 if (result.type == 'securityCompany') { that.props.dispatch({ type: 'command/setSelectComponyList', payload: result.typeList }); var selectComponyList = JSON.parse(JSON.stringify(result.typeList)); // 解引用 var param = { from: 'componyList', data: selectComponyList }; (0, _recordHistory.recordAdd)({ from: 'APictureData', to: 'CreateComponeyInfoWindow', fromData: result.typeList, toID: result.type }); } else { (0, _recordHistory.recordAdd)({ from: 'APictureData', to: 'CreateTrajectoryInfoWindow', fromData: result.typeList, toID: result.type }); } if (result.type == 'securityCompany') { that.setState({ securityCompanyChecked: true }); } else { that.setState({ securityResourceChecked: true }); } }); _events.default.addListener('APictureChecked', function (result) { var json = {}; json[result.type] = result.checked; that.setState(json); }); } //获取保安员列表数据 }, { key: "getSecurityResourcesList", value: function getSecurityResourcesList() { var _this2 = this; var _currpage = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1; (0, _api.getSecurityResourcesList)({ _currpage: _currpage, lines: 1000 }, { appId: "__ZLuP7RGirprZZ6SCdiX", viewId: "__FBwWBm18eyoRndv9tIP", opentarget: "detail", containTitle: "保安资源接口" }).then(function (res) { var typeList = []; if (res.data.data.length > 0) { var data = res.data.data; data.forEach(function (element, index) { var location = element.location && JSON.parse(element.location); // location = {longitude:"118.051982",latitude:"24.607542"} if (location) { data[index].longitude = location.longitude || ''; data[index].latitude = location.latitude || ''; data[index].time = location.time || ''; } data[index].name = element.securityName; data[index].mobilePhone = element.phone; }); typeList = _this2.state.securityResource.typeList.concat(res.data.data); _this2.setState({ securityResource: (0, _objectSpread2.default)({}, _this2.state.securityResource, { typeList: typeList }) }); } //如果没有加载完,需要再一次加载 var _res$data = res.data, pageNumber = _res$data.pageNumber, pageSize = _res$data.pageSize, total = _res$data.total; if (total > pageNumber * pageSize) { _this2.getSecurityResourcesList(_currpage + 1); } else { _this2.props.dispatch({ type: "command/setSecurityResourceData", payload: { dataList: typeList } }); } }); } }, { key: "getClassification", value: //获取驻勤点/现场态势分类(目前最长20) function getClassification() { var _this3 = this; if (!this.props.layerSatatus) { //现场态势 (0, _api.getClassification)({ _currpage: 1, lines: 20 }, { appId: "__ZLuP7RGirprZZ6SCdiX", viewId: "__yhhLbXvCrdnsejsjY8G", opentarget: "detail", containTitle: "分类列表", categoryParentName: "现场态势" }).then(function (res) { var data = res.data.data; data = data.map(function (item) { return (0, _objectSpread2.default)({}, item, { iconSrc: item.iconSrc && JSON.parse(item.iconSrc)[0] && JSON.parse(item.iconSrc)[0].path, mapIcon: item.MAPICON && JSON.parse(item.MAPICON)[0] && JSON.parse(item.MAPICON)[0].path, darkIconSrc: item.darkIconSrc && JSON.parse(item.darkIconSrc)[0] && JSON.parse(item.darkIconSrc)[0].path }); }); _this3.setState({ perception: (0, _objectSpread2.default)({}, _this3.state.perception, { typeList: data }) }); }); } //驻勤点 (0, _api.getClassification)({ _currpage: 1, lines: 20 }, { appId: "__ZLuP7RGirprZZ6SCdiX", viewId: "__yhhLbXvCrdnsejsjY8G", opentarget: "detail", containTitle: "分类列表", categoryParentName: "驻勤点" }).then(function (res) { var data = res.data.data; data = data.map(function (item) { return (0, _objectSpread2.default)({}, item, { iconSrc: item.iconSrc && JSON.parse(item.iconSrc)[0] && JSON.parse(item.iconSrc)[0].path, mapIcon: item.MAPICON && JSON.parse(item.MAPICON)[0] && JSON.parse(item.MAPICON)[0].path, darkIconSrc: item.darkIconSrc && JSON.parse(item.darkIconSrc)[0] && JSON.parse(item.darkIconSrc)[0].path }); }); _this3.setState({ attendance: (0, _objectSpread2.default)({}, _this3.state.perception, { typeList: data }) }); }); } //态势感知根据分类获取分类数据 }, { key: "perceptionGetTypeData", value: function perceptionGetTypeData() { var _this4 = this; var _currpage = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1; var categoryName = arguments.length > 1 ? arguments[1] : undefined; var optionType = arguments.length > 2 ? arguments[2] : undefined; var mapIcon = arguments.length > 3 ? arguments[3] : undefined; (0, _api.perceptionGetTypeData)({ _currpage: _currpage, lines: 100 }, { categoryName: categoryName, appId: "__ZLuP7RGirprZZ6SCdiX", viewId: "__gnF6tfEwBQwo6IrdMrK", opentarget: "detail", containTitle: "现场态势接口" }).then(function (res) { var data = _this4.state.pictureList.perception; var index = data.findIndex(function (item) { return item.name === categoryName; }); if (index > -1) { res.data.data.length > 0 ? data[index].data.push(res.data.data) : ''; } else { data.push({ name: categoryName, data: res.data.data }); } _this4.setState({ pictureList: (0, _objectSpread2.default)({}, _this4.state.pictureList, { perception: data }) }, function () { _this4.propsOption(optionType, { name: categoryName, data: res.data.data, mapIcon: mapIcon }, 'perception'); }); //如果没有加载完,需要再一次加载 var _res$data2 = res.data, pageNumber = _res$data2.pageNumber, pageSize = _res$data2.pageSize, total = _res$data2.total; if (total > pageNumber * pageSize) { _this4.perceptionGetTypeData(_currpage + 1, categoryName, optionType, mapIcon); } }); } //驻勤点根据分类获取分类数据 }, { key: "attendanceGetTypeData", value: function attendanceGetTypeData() { var _this5 = this; var _currpage = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1; var categoryName = arguments.length > 1 ? arguments[1] : undefined; var optionType = arguments.length > 2 ? arguments[2] : undefined; var mapIcon = arguments.length > 3 ? arguments[3] : undefined; (0, _api.attendanceGetTypeData)({ _currpage: 1, lines: 20 }, { categoryName: categoryName, appId: "__ZLuP7RGirprZZ6SCdiX", viewId: "__YxVuFY8k0tZjSoJWNS4", opentarget: "detail", containTitle: "驻勤点接口" }).then(function (res) { var data = _this5.state.pictureList.attendance; var index = data.findIndex(function (item) { return item.name === categoryName; }); var result = []; res.data.data.map(function (item) { // 对数据字段重新组装 var rJson = item; rJson.selectAttendId = item.id; rJson.attendName = item.ATTENDANCESITENAME; // rJson.componey = item.companyName, rJson.name = item.PRINCIPALNAME; rJson.phone = item.PRINCIPALPHONENO; rJson.address = item.ATTENDANCESITEADDRESS; rJson.addressDetail = item.ATTENDANCESITEFULLADDRESS; rJson.scope = item.PERFORMRANGE; rJson.org = item.OFFICEPOLICEADDRESS; rJson.obj = item.SERVEOBJECTNAME; rJson.contract = item.CONTRACTSTATE; // 如果没有符合的图标,默认设置 var current = _TypeData.data.length - 1; _TypeData.data.map(function (e, index) { if (e.key == item.ATTENDANCESITETYPE) { current = index; } }); rJson.markerIcon = _TypeData.data[current].markerIcon; rJson.clickMarkerIcon = _TypeData.data[current].clickMarkerIcon; result.push(rJson); }); if (index > -1) { result.length > 0 ? data[index].data.push(result) : ''; } else { data.push({ name: categoryName, data: result }); } _this5.setState({ pictureList: (0, _objectSpread2.default)({}, _this5.state.pictureList, { attendance: data }) }, function () { _this5.propsOption(optionType, { name: categoryName, data: result, mapIcon: mapIcon }, 'attendance'); }); //如果没有加载完,需要再一次加载 var _res$data3 = res.data, pageNumber = _res$data3.pageNumber, pageSize = _res$data3.pageSize, total = _res$data3.total; if (total > pageNumber * pageSize) { _this5.attendanceGetTypeData(_currpage + 1, categoryName, optionType, mapIcon); } }); } }, { key: "renderList", value: /** * 渲染分类数据列表 */ function renderList(dataList, type) { console.log('renderList', dataList, type); var mapStyle = this.props.mapStyle; this.state[type].typeList = this.state[type].typeList.sort(function (a, b) { // 升序显示 return a.categoryName.length - b.categoryName.length; }); return /*#__PURE__*/_react.default.createElement(_checkbox.default.Group, { onChange: this.onChangeList.bind(this, dataList, type) }, /*#__PURE__*/_react.default.createElement(_row.default, null, this.state[type].typeList.length == 0 ? /*#__PURE__*/_react.default.createElement("div", { className: _index.default.detail }, "\u6682\u65E0\u6570\u636E...") : this.state[type].typeList.map(function (item, index) { return /*#__PURE__*/_react.default.createElement("span", { key: item.id + index }, type == 'securityResource' ? /*#__PURE__*/_react.default.createElement(_checkbox.default, { value: item }, item.pirture && /*#__PURE__*/_react.default.createElement("img", { src: item.pirture }), /*#__PURE__*/_react.default.createElement("span", { className: _index.default.detail }, item.securityName)) : /*#__PURE__*/_react.default.createElement(_checkbox.default, { value: item }, mapStyle == 'dark' ? item.darkIconSrc && /*#__PURE__*/_react.default.createElement("img", { src: item.darkIconSrc }) : item.iconSrc && /*#__PURE__*/_react.default.createElement("img", { src: item.iconSrc }), /*#__PURE__*/_react.default.createElement("span", { className: _index.default.detail }, item.categoryName))); }))); } }, { key: "renderSecResList", value: /** * 渲染保安资源 */ function renderSecResList() { var _this$state = this.state, hasOneCompany = _this$state.hasOneCompany, securityResource = _this$state.securityResource, securityCompanyData = _this$state.securityCompanyData, securityCompanyChecked = _this$state.securityCompanyChecked, securityResourceChecked = _this$state.securityResourceChecked; return ( /*#__PURE__*/ // _react.default.createElement(_row.default, null, securityResource.typeList.length == 0 ? /*#__PURE__*/_react.default.createElement("div", { className: _index.default.detail }, "\u6682\u65E0\u6570\u636E...") : /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_checkbox.default, { checked: securityResourceChecked, value: { typeList: securityResource.typeList, type: 'securityResource' }, onChange: this.onChangeSecRes }, /*#__PURE__*/_react.default.createElement("div", { style: { padding: '0 8px 0 5px', display: 'inline' }, className: _index.default.detail }, "\u4FDD\u5B89\u5458")), !hasOneCompany ? /*#__PURE__*/_react.default.createElement(_checkbox.default, { checked: securityCompanyChecked, value: { typeList: securityCompanyData.typeList, type: 'securityCompany' }, onChange: this.onChangeSecRes }, /*#__PURE__*/_react.default.createElement("div", { style: { padding: '0 8px 0 5px', display: 'inline' }, className: _index.default.detail }, "\u4FDD\u5B89\u670D\u52A1\u516C\u53F8")) : null)) // ); } /** * 向上级传递打点数据 * @param {*} optionType * @param {*} data * @param {*} type */ }, { key: "propsOption", value: function propsOption(optionType, data, type) { console.log('propsOption', optionType, data, type); switch (optionType) { case 'add': // event 发送器: eventCenter.emit("事件名称", 参数列表); // 这样做的好处是,爷传孙,不需要父级组件做承载 _events.default.emit('addPictueMarks', { data: data, type: type }); // this.props.addPictueMarks(data, type); break; case 'reduce': _events.default.emit('reducePictueMarks', { data: data, type: type }); // this.props.reducePictueMarks(data, type); break; } } }, { key: "render", value: function render() { var _this$props = this.props, layerSatatus = _this$props.layerSatatus, mapStyle = _this$props.mapStyle, layoutAuthority = _this$props.layoutAuthority; return /*#__PURE__*/_react.default.createElement("div", { className: _index.default[mapStyle] }, /*#__PURE__*/_react.default.createElement("div", { className: _index.default.apicture }, /*#__PURE__*/_react.default.createElement("div", { className: _index.default.title }, "\u4E00\u5F20\u56FE\u6570\u636E\u5C55\u793A"), /*#__PURE__*/_react.default.createElement("div", { className: _index.default.content, style: { height: this.state.allHeight, overflow: "auto" } }, layoutAuthority.peoplePermissions ? /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("h1", null, /*#__PURE__*/_react.default.createElement("img", { src: __webpack_require__("dDE8") }), "\u4FDD\u5B89\u8D44\u6E90"), /*#__PURE__*/_react.default.createElement("div", { className: _index.default.item }, this.renderSecResList())) : '', /*#__PURE__*/_react.default.createElement("div", { className: _index.default.borderline }), layoutAuthority.hardWarePermissions ? /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("h1", null, /*#__PURE__*/_react.default.createElement("img", { src: __webpack_require__("Q+cA") }), "\u6001\u52BF\u611F\u77E5"), /*#__PURE__*/_react.default.createElement("div", { className: _index.default.item }, this.renderList(this.state.pictureList.perception, 'perception'))) : '', /*#__PURE__*/_react.default.createElement("div", { className: _index.default.borderline }), layoutAuthority.attendancePermissions ? /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("h1", null, /*#__PURE__*/_react.default.createElement("img", { src: __webpack_require__("1+y7") }), "\u9A7B\u52E4\u70B9"), /*#__PURE__*/_react.default.createElement("div", { className: _index.default.item }, this.renderList(this.state.pictureList.attendance, 'attendance'))) : ''))); } }]); }(_react.Component)) || _class); /***/ }), /***/ "TnzN": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); var _dva = __webpack_require__("S6G3"); __webpack_require__("PK9/"); var _reactDom = _interopRequireDefault(__webpack_require__("O27J")); var _recording = _interopRequireDefault(__webpack_require__("RMDC")); var _moment = _interopRequireDefault(__webpack_require__("PJh5")); __webpack_require__("Vz2w"); var _dec, _class; /** * 录制中倒计时 */ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } _moment.default.locale('zh-cn'); // import { initRecordRTC, stopRecord, startRecord, playRecord, downloadRecord } from '../Video/recordRTC'; var RecordTimer = exports.default = (_dec = (0, _dva.connect)(function (state) { return { ownCid: state.im.v5Data.ownCid, recordStatus: state.command.recordStatus // 0:未录制 1:录制中 }; }), _dec(_class = /*#__PURE__*/function (_Component) { function RecordTimer(props) { var _this; (0, _classCallCheck2.default)(this, RecordTimer); _this = _callSuper(this, RecordTimer, [props]); _this.state = { isShowChange: false, // 切换布局弹框是否显示 recordStatus: 0, // 0:未录制 1:录制中 recordTime: 0 // 单位: 秒 }; _this.recordTimer = null; return _this; } (0, _inherits2.default)(RecordTimer, _Component); return (0, _createClass2.default)(RecordTimer, [{ key: "componentWillReceiveProps", value: function componentWillReceiveProps(nextProps) { if (JSON.stringify(nextProps.recordStatus) !== JSON.stringify(this.state.recordStatus)) { if (nextProps.recordStatus == 1) { this.setState({ recordStatus: nextProps.recordStatus }); var that = this; this.recordTimer = setInterval(function () { that.setState({ recordTime: that.state.recordTime + 1 }); }, 1000); } else { this.setState({ recordStatus: nextProps.recordStatus, recordTime: 0 }); clearInterval(this.recordTimer); this.recordTimer = null; } } } }, { key: "componentDidMount", value: function componentDidMount() {} }, { key: "render", value: function render() { var _this$state = this.state, recordStatus = _this$state.recordStatus, recordTime = _this$state.recordTime; if (recordStatus == 0) { return null; } var today = (0, _moment.default)().format("YYYY年MM月DD日"); var duration = _moment.default.duration(recordTime * 1000); var hours = duration.hours() < 10 ? "0" + duration.hours() : duration.hours(); var minutes = duration.minutes() < 10 ? "0" + duration.minutes() : duration.minutes(); var seconds = duration.seconds() < 10 ? "0" + duration.seconds() : duration.seconds(); return /*#__PURE__*/_react.default.createElement("div", { className: "record-timer-content" }, /*#__PURE__*/_react.default.createElement("img", { src: _recording.default }), /*#__PURE__*/_react.default.createElement("div", null, "\u5F55\u5236\u4E2D"), /*#__PURE__*/_react.default.createElement("div", null, hours + ":" + minutes + ":" + seconds), /*#__PURE__*/_react.default.createElement("div", null, today)); } }]); }(_react.Component)) || _class); /***/ }), /***/ "U7cL": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAAAXNSR0IArs4c6QAABYNJREFUaAXlm01vFDcYx3cn70gVBwQF8QFQzz2gSrztjUqVKnFLL3DjAxCO9NAeoR+gN3IhN6RKlcgtQFdCPXCu8gEqKjihSCS72ST9/4bxyjM7L2t7NrvLWNrY47EfP7/nsT0ej9NuTSicnJycGQwG146Pj79VE1f4Ke9iu93+Sml+hD3l7SnvP6V3+UVR9HZxcbGrvE8UqDu06xQo5S/0er2fJPOOFL6q62Uf+arbV92/Vff5ysrKM12/95GTV6cW4MPDwxvy5EM1cFuKLuY15Jsn2IHqbsvzj5eWll77yjH1goAF2jk6OvpFwq4ZgROOuwsLC48E/tK3HS9gefFSv9//TfG6b8Mh9eT1reXl5QeK37nKcQY+ODj4ngYFe9a1sTrLS4ePGHx1dfWFi9zIpbBgseqf04ZFZ3RAF3RyYRjLwxK+oi78u+K7LsJPq6zAN9XF7yvuVbVZCSzI84L9Q/F3VcKmeV+wbwT9o+IPZXqUAiee3Zl1WAOYQHcUF3q6dAwn3XimPWtgiXEMOtt52XQhMJOBBMzkmM1C2NfoXDaR5XZpVeDRw2xcaBC7kVlLS/dj6f5D3iNrBFgFWVT8o3iqz9lQIwr6oyaxbxSnFicjHhQsK6i5hsVYMMCSNVzKw1ob39LaeCdbaJ6vtfbu2GvvFLDG7l+Cq/1FQNbG4i0Zs6W3qjiNEfUG1FKXS8UTMG5XY/m6kTsElndvSqGX5oZvbICy8bjyMIL9wyChQV6+JS+/Qs7w3VUKbvgItr1mIPPkoLjtTRk4r1jcA5BjB2MA6ms3xL41Vjphi4Fj86m7XdAA/1exs7T9/f2RRg2YrSh5dsirZ98vSq+trRXdKsxX2wPN2JcVv49nabZlfGDtFgDSWGmhELEaiL0BdBbWrncaadiSraeWeSzdqaPhaYNVMMSMkejPSNGrFYXn/jaMsEZspSrhtbs4T1aAEdZIMxj7xo0IsDKG2SRvSrjSPGD17YtNcS+skWYv853ni+eGlS7dGGBYnZeSZd1A037Z7dQ9lzUx63V1x1R93wuA9/Q75yvA1EOhohcCU8aOXdbEANcU9lhpAdyIACuTFh+jGxFgZdLabQTtZ8jdYGBZbeL2Mm2YOKBBjlREbwMEnMq7rtkBCQWGNUoOkPR9obVf5Ft1rHr2oy6kLRmrDyuT1ifNXhwg8Qo8T0MtX9QwjzoDzM6Jy7M7KxNGWBnDhOefI7+/bOdMIvBcB5oQApvoFjMGb+IlwmJP1Lnw0KZivI9tYLXNappyjuXZ9CaeMjgHte0syaqAB2rwQizRhmXchsAmKm4njMNNPDa/H1v6eyVRLASaJaS+fgw9C2wdw8VmM2MYK74WZdeL1KoEtKuSjFO8ys8es65yLDXsZDdhi/OGwFzJoj/bJX3TeEZHBitnbzwKpO1Vdb3YYBiujiBdHtlyRpZJ2rB+Jiuv24VC0kxk5tFiywHMeNPkYyhAuVdHkJwtGZ6zn8MwIllK1P5BHDCg88DRxDxjAa4rCHa8D+Iq+A4PK05/0QrQRLJiz/EJBg8CSB4THOOU7l8zLEceYEh9/QdhxMOGS+PqgdJPzPWcxRsy7sjXfxgKgbmp8fxUlpqrkzzy6qZ6zD30zwulwILlyOGO4rk4qyVYTuN1FPfyYMlLPZayhagoARzne5O9N2vX6JjoWgiLzqXAFJCgD4nVNrmexSAdOVzaQdcq/SqBESBBvWRcbChd2+xdpVzV/USXDXRDx6ry3C8dw3kCNHs354A4BtB0/0LdhxNuW3kGOY082kYHdHFtz9nDdgNaNnKQ7Vfl1X62y27HSk/nnzwsBeKkwG8mR4Mm+W88T7RKe5Vt2/U6yMPZxvS8/lqLlXXlf9n/qJUF51rwM/mveP8DYdWOrCpxhvsAAAAASUVORK5CYII=" /***/ }), /***/ "UQ5M": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__style_index_less__ = __webpack_require__("vtiu"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__style_index_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__style_index_less__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__index_less__ = __webpack_require__("P4e/"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__index_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__index_less__); /***/ }), /***/ "UahI": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAipJREFUOE+Nkz9oFEEUxr9v9pTEgGARoyDaBIzEwk4NpBVRQcWAKAhW5v4IFgqeYXdvbncvRoONmL1ErYKFFoKC2AQtJBZGUCMI/iFdSBGRoJicXG7nyZ3cuR6RZKph3rzfe2++b4jYujQ83tbyazFJkeMC7gKkFcAswQkgCn33/If4/eqe9QPHC3sFeCDAFgJTAnlFYYlEpwAHBNhAwfWEzNtaa1PPqwFqycQEBTOAnPXdzOt4pWw23JRo41WI9IMcC5xUsgGotV36+YXAQnm91XMt2/+9uc1Yl74AtlLs8+zUw9oItl+8KCLDCrK3uXIzSGutKmrzGwCJwE3v/gPIhy9BsQI3s+9/lePnjheeE2AMRFfgpD/R9orfBOZewc1cWAtgQI/sUYpvRdSxQi75mLYXLkFwM8ils2sB2H64E4KPBE/5bup+FfCZwHvfTfetBeAWwsMmwhOJpLeQz0zS8YojAjlTWcKOoaH0wmoQ2w/HITiaMPPtWusyHe9Wt4GaJnk3ru9KIB3c7lk2lRcKvOG7qcsNJ9r5cBDEFQKBZeZzcaf99cDofoF5BLId4JHAST5tAGr6Wh1hzWnANIEwMjKlLJaUQqep4KQQp5XIjJARyG1Cdahg9082/kKV5gbFE8ZIHkB30wg/CI6WF9WgtVG1WFHluUC2M8GD/wDqSVWpxKguRWk1ysyuq3ydqj5YPT5QuNOhouVnIN+tCFhNiWpca52Ym9vK32LT7Io2WYqvAAAAAElFTkSuQmCC" /***/ }), /***/ "Ubhr": /***/ (function(module, exports, __webpack_require__) { var isSymbol = __webpack_require__("6MiT"); /** Used as references for various `Number` constants. */ var INFINITY = 1 / 0; /** * Converts `value` to a string key if it's not a string or symbol. * * @private * @param {*} value The value to inspect. * @returns {string|symbol} Returns the key. */ function toKey(value) { if (typeof value == 'string' || isSymbol(value)) { return value; } var result = (value + ''); return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; } module.exports = toKey; /***/ }), /***/ "Un61": /***/ (function(module, exports) { module.exports = "data:image/png;base64,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" /***/ }), /***/ "UnLw": /***/ (function(module, exports, __webpack_require__) { var memoizeCapped = __webpack_require__("fMqj"); /** Used to match property names within property paths. */ var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; /** Used to match backslashes in property paths. */ var reEscapeChar = /\\(\\)?/g; /** * Converts `string` to a property path array. * * @private * @param {string} string The string to convert. * @returns {Array} Returns the property path array. */ var stringToPath = memoizeCapped(function(string) { var result = []; if (string.charCodeAt(0) === 46 /* . */) { result.push(''); } string.replace(rePropName, function(match, number, quote, subString) { result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match)); }); return result; }); module.exports = stringToPath; /***/ }), /***/ "UuDn": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAARCAYAAADUryzEAAABQ0lEQVQ4T52TvyuFcRTGP4/Fj25ZyGYgySBdk5FFKT8yEfJHkN0u/geFmIRBGZTNRDJIYrCJwUBMHp3be6/b670/OMtb33O+n/c5z/keUSFsNwDrgIAlSV9ZpZHMDNvzwFaSXJC0XTfAdoCvgP7k0jUwIMlpSKYC2xPAYap4UtJRVUDy505gFxhKFZ8Ds8BjuRLZHgcWgV6gB2iu5Ety/gHcAbfAZgBegdYalyqlXwMQcmf+CdgLQCOwD4z9EXIMTBemYLsJOABG64ScAFOSPktjtB3mXSZmVuOEeXlJYWbhmZbC9j3QVUPFg6TuYk1awRsQO1AtYidyvxTYzgMXdXowKCna/WnB9hxQvjBPwGoCjG9HGXxe0k4aMAycAu/ABrAmKVqKKeWAFWAZaAFGJJ1lmdgHPEt6yWrFdhvQLummmP8GNylp72bVcrcAAAAASUVORK5CYII=" /***/ }), /***/ "V8Q4": /***/ (function(module, exports) { module.exports = "data:image/png;base64,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" /***/ }), /***/ "VIZy": /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = _default; exports.removePathSimplifierIns = removePathSimplifierIns; var _utils = __webpack_require__("oAV5"); function _default(pointData) { removePathSimplifierIns(); pointData = pointData.map(function (item) { var lnglat = item.location.split(","); return { time: (0, _utils.timestamp)(item.locatetime), lnglat: [lnglat[0], lnglat[1]] }; }); var _this = this; AMapUI.load(['ui/misc/PathSimplifier'], function (PathSimplifier) { if (!PathSimplifier.supportCanvas) { alert('当前环境不支持 Canvas!'); return; } console.log('ui环境准备完毕'); var defaultRenderOptions = { renderAllPointsIfNumberBelow: 100, pathTolerance: 2, keyPointTolerance: 0, pathLineStyle: { lineWidth: 3, strokeStyle: '#0E70FF', borderWidth: 1, borderStyle: '#eeeeee', dirArrowStyle: false } // pathLineHoverStyle: { // lineWidth: 3, // strokeStyle: 'rgba(204, 63, 88,1)', // borderWidth: 1, // borderStyle: '#cccccc', // dirArrowStyle: false // }, // pathLineSelectedStyle: { // lineWidth: 6, // strokeStyle: '#C11534', // borderWidth: 1, // borderStyle: '#cccccc', // dirArrowStyle: true // }, // dirArrowStyle: { // stepSpace: 35, // strokeStyle: '#ffffff', // lineWidth: 2 // }, // startPointStyle: { // radius: 4, // fillStyle: '#109618', // lineWidth: 1, // strokeStyle: '#eeeeee' // }, // endPointStyle: { // radius: 4, // fillStyle: '#dc3912', // lineWidth: 1, // strokeStyle: '#eeeeee' // }, // keyPointStyle: { // radius: 3, // fillStyle: 'rgba(8, 126, 196, 1)', // lineWidth: 1, // strokeStyle: '#eeeeee' // }, // keyPointHoverStyle: { // radius: 4, // fillStyle: 'rgba(0, 0, 0, 0)', // lineWidth: 2, // strokeStyle: '#ffa500' // }, // keyPointOnSelectedPathLineStyle: { // radius: 4, // fillStyle: 'rgba(8, 126, 196, 1)', // lineWidth: 2, // strokeStyle: '#eeeeee' // } }; var pathSimplifierIns = new PathSimplifier({ zIndex: 100, //autoSetFitView:false, map: _this.state.map, //所属的地图实例 getPath: function getPath(pathData, pathIndex) { var points = pathData.points, lnglatList = []; for (var i = 0, len = points.length; i < len; i++) { lnglatList.push(points[i].lnglat); } return lnglatList; }, getHoverTitle: function getHoverTitle(pathData, pathIndex, pointIndex) { if (pointIndex >= 0) { return pathData.points[pointIndex].time; } }, // renderOptions: { // renderAllPointsIfNumberBelow: -1, // pathTolerance: 2, // keyPointTolerance: 0, // pathLineStyle: { // lineWidth: 3, // strokeStyle: '#F7B538', // borderWidth: 1, // borderStyle: '#eeeeee', // dirArrowStyle: false // }, // pathLineHoverStyle: { // lineWidth: 3, // strokeStyle: 'rgba(204, 63, 88,1)', // borderWidth: 1, // borderStyle: '#cccccc', // dirArrowStyle: false // }, // startPointStyle: { // radius: 4, // fillStyle: '#109618', // lineWidth: 1, // strokeStyle: '#eeeeee' // }, // endPointStyle: { // radius: 4, // fillStyle: '#dc3912', // lineWidth: 1, // strokeStyle: '#eeeeee' // }, // } renderOptions: defaultRenderOptions }); window.pathSimplifierIns = pathSimplifierIns; //设置数据 pathSimplifierIns.setData([{ name: '路线0', points: pointData }]); //选中路线0 // pathSimplifierIns.setSelectedPathIndex(0); pathSimplifierIns.on('pointClick', function (e, info) { console.log('Click: ' + info.pathData.points[info.pointIndex].name); }); }); } //清除地图上的轨迹路线 function removePathSimplifierIns() { if (window.pathSimplifierIns) { window.pathSimplifierIns.setData([]); } } /***/ }), /***/ "VfRB": /***/ (function(module, exports) { /** * Created by j_bleach on 2018/9/11. */var workercode=function workercode(){/*eslint-disable*/function lamejs(){function new_byte(count){return new Int8Array(count);}function new_short(count){return new Int16Array(count);}function new_int(count){return new Int32Array(count);}function new_float(count){return new Float32Array(count);}function new_double(count){return new Float64Array(count);}function new_float_n(args){if(args.length==1){return new_float(args[0]);}var sz=args[0];args=args.slice(1);var A=[];for(var i=0;i 11/1999 * * 09/2000: ASM code removed in favor of IEEE754 hack by Takehiro Tominaga. * If you need the ASM code, check CVS circa Aug 2000. * * 01/2004: Optimizations by Gabriel Bouvigne */function quantize_lines_xrpow_01(l,istep,xr,xrPos,ix,ixPos){var compareval0=(1.0-0.4054)/istep;l=l>>1;while(l--!=0){ix[ixPos++]=compareval0>xr[xrPos++]?0:1;ix[ixPos++]=compareval0>xr[xrPos++]?0:1;}}/** * XRPOW_FTOI is a macro to convert floats to ints.
    * if XRPOW_FTOI(x) = nearest_int(x), then QUANTFAC(x)=adj43asm[x]
    * ROUNDFAC= -0.0946
    * * if XRPOW_FTOI(x) = floor(x), then QUANTFAC(x)=asj43[x]
    * ROUNDFAC=0.4054
    * * Note: using floor() or 0| is extremely slow. On machines where the * TAKEHIRO_IEEE754_HACK code above does not work, it is worthwile to write * some ASM for XRPOW_FTOI(). */function quantize_lines_xrpow(l,istep,xr,xrPos,ix,ixPos){l=l>>1;var remaining=l%2;l=l>>1;while(l--!=0){var x0,x1,x2,x3;var rx0,rx1,rx2,rx3;x0=xr[xrPos++]*istep;x1=xr[xrPos++]*istep;rx0=0|x0;x2=xr[xrPos++]*istep;rx1=0|x1;x3=xr[xrPos++]*istep;rx2=0|x2;x0+=qupvt.adj43[rx0];rx3=0|x3;x1+=qupvt.adj43[rx1];ix[ixPos++]=0|x0;x2+=qupvt.adj43[rx2];ix[ixPos++]=0|x1;x3+=qupvt.adj43[rx3];ix[ixPos++]=0|x2;ix[ixPos++]=0|x3;}if(remaining!=0){var x0,x1;var rx0,rx1;x0=xr[xrPos++]*istep;x1=xr[xrPos++]*istep;rx0=0|x0;rx1=0|x1;x0+=qupvt.adj43[rx0];x1+=qupvt.adj43[rx1];ix[ixPos++]=0|x0;ix[ixPos++]=0|x1;}}/** * Quantization function This function will select which lines to quantize * and call the proper quantization function */function quantize_xrpow(xp,pi,istep,codInfo,prevNoise){/* quantize on xr^(3/4) instead of xr */var sfb;var sfbmax;var j=0;var prev_data_use;var accumulate=0;var accumulate01=0;var xpPos=0;var iData=pi;var iDataPos=0;var acc_iData=iData;var acc_iDataPos=0;var acc_xp=xp;var acc_xpPos=0;/* * Reusing previously computed data does not seems to work if global * gain is changed. Finding why it behaves this way would allow to use a * cache of previously computed values (let's 10 cached values per sfb) * that would probably provide a noticeable speedup */prev_data_use=prevNoise!=null&&codInfo.global_gain==prevNoise.global_gain;if(codInfo.block_type==Encoder.SHORT_TYPE)sfbmax=38;else sfbmax=21;for(sfb=0;sfb<=sfbmax;sfb++){var step=-1;if(prev_data_use||codInfo.block_type==Encoder.NORM_TYPE){step=codInfo.global_gain-(codInfo.scalefac[sfb]+(codInfo.preflag!=0?qupvt.pretab[sfb]:0)<codInfo.max_nonzero_coeff){/* do not compute upper zero part */var usefullsize;usefullsize=codInfo.max_nonzero_coeff-j+1;Arrays.fill(pi,codInfo.max_nonzero_coeff,576,0);l=usefullsize;if(l<0){l=0;}/* no need to compute higher sfb values */sfb=sfbmax+1;}/* accumulate lines to quantize */if(0==accumulate&&0==accumulate01){acc_iData=iData;acc_iDataPos=iDataPos;acc_xp=xp;acc_xpPos=xpPos;}if(prevNoise!=null&&prevNoise.sfb_count1>0&&sfb>=prevNoise.sfb_count1&&prevNoise.step[sfb]>0&&step>=prevNoise.step[sfb]){if(accumulate!=0){quantize_lines_xrpow(accumulate,istep,acc_xp,acc_xpPos,acc_iData,acc_iDataPos);accumulate=0;acc_iData=iData;acc_iDataPos=iDataPos;acc_xp=xp;acc_xpPos=xpPos;}accumulate01+=l;}else{if(accumulate01!=0){quantize_lines_xrpow_01(accumulate01,istep,acc_xp,acc_xpPos,acc_iData,acc_iDataPos);accumulate01=0;acc_iData=iData;acc_iDataPos=iDataPos;acc_xp=xp;acc_xpPos=xpPos;}accumulate+=l;}if(l<=0){/* * rh: 20040215 may happen due to "prev_data_use" * optimization */if(accumulate01!=0){quantize_lines_xrpow_01(accumulate01,istep,acc_xp,acc_xpPos,acc_iData,acc_iDataPos);accumulate01=0;}if(accumulate!=0){quantize_lines_xrpow(accumulate,istep,acc_xp,acc_xpPos,acc_iData,acc_iDataPos);accumulate=0;}break;/* ends for-loop */}}if(sfb<=sfbmax){iDataPos+=codInfo.width[sfb];xpPos+=codInfo.width[sfb];j+=codInfo.width[sfb];}}if(accumulate!=0){/* last data part */quantize_lines_xrpow(accumulate,istep,acc_xp,acc_xpPos,acc_iData,acc_iDataPos);accumulate=0;}if(accumulate01!=0){/* last data part */quantize_lines_xrpow_01(accumulate01,istep,acc_xp,acc_xpPos,acc_iData,acc_iDataPos);accumulate01=0;}}/** * ix_max */function ix_max(ix,ixPos,endPos){var max1=0,max2=0;do{var x1=ix[ixPos++];var x2=ix[ixPos++];if(max114){x=15;sum+=linbits;}x*=16;}if(y!=0){if(y>14){y=15;sum+=linbits;}x+=y;}sum+=Tables.largetbl[x];}while(ixPos>=16;if(sum>sum2){sum=sum2;t1=t2;}s.bits+=sum;return t1;}function count_bit_noESC(ix,ixPos,end,s){/* No ESC-words */var sum1=0;var hlen1=Tables.ht[1].hlen;do{var x=ix[ixPos+0]*2+ix[ixPos+1];ixPos+=2;sum1+=hlen1[x];}while(ixPos>=16;if(sum>sum2){sum=sum2;t1++;}s.bits+=sum;return t1;}function count_bit_noESC_from3(ix,ixPos,end,t1,s){/* No ESC-words */var sum1=0;var sum2=0;var sum3=0;var xlen=Tables.ht[t1].xlen;var hlen1=Tables.ht[t1].hlen;var hlen2=Tables.ht[t1+1].hlen;var hlen3=Tables.ht[t1+2].hlen;do{var x=ix[ixPos+0]*xlen+ix[ixPos+1];ixPos+=2;sum1+=hlen1[x];sum2+=hlen2[x];sum3+=hlen3[x];}while(ixPossum2){sum1=sum2;t++;}if(sum1>sum3){sum1=sum3;t=t1+2;}s.bits+=sum1;return t;}/*************************************************************************//* choose table *//*************************************************************************/var huf_tbl_noESC=[1,2,5,7,7,10,10,13,13,13,13,13,13,13,13];/** * Choose the Huffman table that will encode ix[begin..end] with the fewest * bits. * * Note: This code contains knowledge about the sizes and characteristics of * the Huffman tables as defined in the IS (Table B.7), and will not work * with any arbitrary tables. */function choose_table(ix,ixPos,endPos,s){var max=ix_max(ix,ixPos,endPos);switch(max){case 0:return max;case 1:return count_bit_noESC(ix,ixPos,endPos,s);case 2:case 3:return count_bit_noESC_from2(ix,ixPos,endPos,huf_tbl_noESC[max-1],s);case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 12:case 13:case 14:case 15:return count_bit_noESC_from3(ix,ixPos,endPos,huf_tbl_noESC[max-1],s);default:/* try tables with linbits */if(max>QuantizePVT.IXMAX_VAL){s.bits=QuantizePVT.LARGE_BITS;return-1;}max-=15;var choice2;for(choice2=24;choice2<32;choice2++){if(Tables.ht[choice2].linmax>=max){break;}}var choice;for(choice=choice2-8;choice<24;choice++){if(Tables.ht[choice].linmax>=max){break;}}return count_bit_ESC(ix,ixPos,endPos,choice,choice2,s);}}/** * count_bit */this.noquant_count_bits=function(gfc,gi,prev_noise){var ix=gi.l3_enc;var i=Math.min(576,gi.max_nonzero_coeff+2>>1<<1);if(prev_noise!=null)prev_noise.sfb_count1=0;/* Determine count1 region */for(;i>1;i-=2){if((ix[i-1]|ix[i-2])!=0)break;}gi.count1=i;/* Determines the number of bits to encode the quadruples. */var a1=0;var a2=0;for(;i>3;i-=4){var p;/* hack to check if all values <= 1 *///throw "TODO: HACK if ((((long) ix[i - 1] | (long) ix[i - 2] | (long) ix[i - 3] | (long) ix[i - 4]) & 0xffffffffL) > 1L " //if (true) { if(((ix[i-1]|ix[i-2]|ix[i-3]|ix[i-4])&0x7fffffff)>1){break;}p=((ix[i-4]*2+ix[i-3])*2+ix[i-2])*2+ix[i-1];a1+=Tables.t32l[p];a2+=Tables.t33l[p];}var bits=a1;gi.count1table_select=0;if(a1>a2){bits=a2;gi.count1table_select=1;}gi.count1bits=bits;gi.big_values=i;if(i==0)return bits;if(gi.block_type==Encoder.SHORT_TYPE){a1=3*gfc.scalefac_band.s[3];if(a1>gi.big_values)a1=gi.big_values;a2=gi.big_values;}else if(gi.block_type==Encoder.NORM_TYPE){/* bv_scf has 576 entries (0..575) */a1=gi.region0_count=gfc.bv_scf[i-2];a2=gi.region1_count=gfc.bv_scf[i-1];a2=gfc.scalefac_band.l[a1+a2+2];a1=gfc.scalefac_band.l[a1+1];if(a2a2){a1=a2;}}/* have to allow for the case when bigvalues < region0 < region1 *//* (and region0, region1 are ignored) */a1=Math.min(a1,i);a2=Math.min(a2,i);/* Count the number of bits necessary to code the bigvalues region. */if(0w)return QuantizePVT.LARGE_BITS;quantize_xrpow(xr,ix,qupvt.IPOW20(gi.global_gain),gi,prev_noise);if((gfc.substep_shaping&2)!=0){var j=0;/* 0.634521682242439 = 0.5946*2**(.5*0.1875) */var gain=gi.global_gain+gi.scalefac_scale;var roundfac=0.634521682242439/qupvt.IPOW20(gain);for(var sfb=0;sfb=roundfac?ix[k]:0;}}}}return this.noquant_count_bits(gfc,gi,prev_noise);};/** * re-calculate the best scalefac_compress using scfsi the saved bits are * kept in the bit reservoir. */function recalc_divide_init(gfc,cod_info,ix,r01_bits,r01_div,r0_tbl,r1_tbl){var bigv=cod_info.big_values;for(var r0=0;r0<=7+15;r0++){r01_bits[r0]=QuantizePVT.LARGE_BITS;}for(var r0=0;r0<16;r0++){var a1=gfc.scalefac_band.l[r0+1];if(a1>=bigv)break;var r0bits=0;var bi=new Bits(r0bits);var r0t=choose_table(ix,0,a1,bi);r0bits=bi.bits;for(var r1=0;r1<8;r1++){var a2=gfc.scalefac_band.l[r0+r1+2];if(a2>=bigv)break;var bits=r0bits;bi=new Bits(bits);var r1t=choose_table(ix,a1,a2,bi);bits=bi.bits;if(r01_bits[r0+r1]>bits){r01_bits[r0+r1]=bits;r01_div[r0+r1]=r0;r0_tbl[r0+r1]=r0t;r1_tbl[r0+r1]=r1t;}}}}function recalc_divide_sub(gfc,cod_info2,gi,ix,r01_bits,r01_div,r0_tbl,r1_tbl){var bigv=cod_info2.big_values;for(var r2=2;r2=bigv)break;var bits=r01_bits[r2-2]+cod_info2.count1bits;if(gi.part2_3_length<=bits)break;var bi=new Bits(bits);var r2t=choose_table(ix,a2,bigv,bi);bits=bi.bits;if(gi.part2_3_length<=bits)continue;gi.assign(cod_info2);gi.part2_3_length=bits;gi.region0_count=r01_div[r2-2];gi.region1_count=r2-2-r01_div[r2-2];gi.table_select[0]=r0_tbl[r2-2];gi.table_select[1]=r1_tbl[r2-2];gi.table_select[2]=r2t;}}this.best_huffman_divide=function(gfc,gi){var cod_info2=new GrInfo();var ix=gi.l3_enc;var r01_bits=new_int(7+15+1);var r01_div=new_int(7+15+1);var r0_tbl=new_int(7+15+1);var r1_tbl=new_int(7+15+1);/* SHORT BLOCK stuff fails for MPEG2 */if(gi.block_type==Encoder.SHORT_TYPE&&gfc.mode_gr==1)return;cod_info2.assign(gi);if(gi.block_type==Encoder.NORM_TYPE){recalc_divide_init(gfc,gi,ix,r01_bits,r01_div,r0_tbl,r1_tbl);recalc_divide_sub(gfc,cod_info2,gi,ix,r01_bits,r01_div,r0_tbl,r1_tbl);}var i=cod_info2.big_values;if(i==0||(ix[i-2]|ix[i-1])>1)return;i=gi.count1+2;if(i>576)return;/* Determines the number of bits to encode the quadruples. */cod_info2.assign(gi);cod_info2.count1=i;var a1=0;var a2=0;for(;i>cod_info2.big_values;i-=4){var p=((ix[i-4]*2+ix[i-3])*2+ix[i-2])*2+ix[i-1];a1+=Tables.t32l[p];a2+=Tables.t33l[p];}cod_info2.big_values=i;cod_info2.count1table_select=0;if(a1>a2){a1=a2;cod_info2.count1table_select=1;}cod_info2.count1bits=a1;if(cod_info2.block_type==Encoder.NORM_TYPE)recalc_divide_sub(gfc,cod_info2,gi,ix,r01_bits,r01_div,r0_tbl,r1_tbl);else{/* Count the number of bits necessary to code the bigvalues region. */cod_info2.part2_3_length=a1;a1=gfc.scalefac_band.l[7+1];if(a1>i){a1=i;}if(a1>0){var bi=new Bits(cod_info2.part2_3_length);cod_info2.table_select[0]=choose_table(ix,0,a1,bi);cod_info2.part2_3_length=bi.bits;}if(i>a1){var bi=new Bits(cod_info2.part2_3_length);cod_info2.table_select[1]=choose_table(ix,a1,i,bi);cod_info2.part2_3_length=bi.bits;}if(gi.part2_3_length>cod_info2.part2_3_length)gi.assign(cod_info2);}};var slen1_n=[1,1,1,1,8,2,2,2,4,4,4,8,8,8,16,16];var slen2_n=[1,2,4,8,1,2,4,8,2,4,8,2,4,8,4,8];var slen1_tab=[0,0,0,0,3,1,1,1,2,2,2,3,3,3,4,4];var slen2_tab=[0,1,2,3,0,1,2,3,1,2,3,1,2,3,2,3];Takehiro.slen1_tab=slen1_tab;Takehiro.slen2_tab=slen2_tab;function scfsi_calc(ch,l3_side){var sfb;var gi=l3_side.tt[1][ch];var g0=l3_side.tt[0][ch];for(var i=0;i=0)break;}if(sfb==Tables.scfsi_band[i+1]){for(sfb=Tables.scfsi_band[i];sfbc){gi.part2_length=c;gi.scalefac_compress=i;}}}}/** * Find the optimal way to store the scalefactors. Only call this routine * after final scalefactors have been chosen and the channel/granule will * not be re-encoded. */this.best_scalefac_store=function(gfc,gr,ch,l3_side){/* use scalefac_scale if we can */var gi=l3_side.tt[gr][ch];var sfb,i,j,l;var recalc=0;/* * remove scalefacs from bands with ix=0. This idea comes from the AAC * ISO docs. added mt 3/00 *//* check if l3_enc=0 */j=0;for(sfb=0;sfb0)s|=gi.scalefac[sfb];}if(0==(s&1)&&s!=0){for(sfb=0;sfb0)gi.scalefac[sfb]>>=1;}gi.scalefac_scale=recalc=1;}}if(0==gi.preflag&&gi.block_type!=Encoder.SHORT_TYPE&&gfc.mode_gr==2){for(sfb=11;sfb0)gi.scalefac[sfb]-=qupvt.pretab[sfb];}gi.preflag=recalc=1;}}for(i=0;i<4;i++){l3_side.scfsi[ch][i]=0;}if(gfc.mode_gr==2&&gr==1&&l3_side.tt[0][ch].block_type!=Encoder.SHORT_TYPE&&l3_side.tt[1][ch].block_type!=Encoder.SHORT_TYPE){scfsi_calc(ch,l3_side);recalc=0;}for(sfb=0;sfb 10/99 loop over *all* * posible values of scalefac_compress to find the one which uses the * smallest number of bits. ISO would stop at first valid index */cod_info.part2_length=QuantizePVT.LARGE_BITS;for(k=0;k<16;k++){if(max_slen1tab[k]){cod_info.part2_length=tab[k];cod_info.scalefac_compress=k;}}return cod_info.part2_length==QuantizePVT.LARGE_BITS;};/** * table of largest scalefactor values for MPEG2 */var max_range_sfac_tab=[[15,15,7,7],[15,15,7,0],[7,3,0,0],[15,31,31,0],[7,7,7,0],[3,3,0,0]];/** * Also counts the number of bits to encode the scalefacs but for MPEG 2 * Lower sampling frequencies (24, 22.05 and 16 kHz.) * * This is reverse-engineered from section 2.4.3.2 of the MPEG2 IS, * "Audio Decoding Layer III" */this.scale_bitcount_lsf=function(gfc,cod_info){var table_number,row_in_table,partition,nr_sfb,window;var over;var i,sfb;var max_sfac=new_int(4);//var partition_table; var scalefac=cod_info.scalefac;/* * Set partition table. Note that should try to use table one, but do * not yet... */if(cod_info.preflag!=0)table_number=2;else table_number=0;for(i=0;i<4;i++){max_sfac[i]=0;}if(cod_info.block_type==Encoder.SHORT_TYPE){row_in_table=1;var partition_table=qupvt.nr_of_sfb_block[table_number][row_in_table];for(sfb=0,partition=0;partition<4;partition++){nr_sfb=partition_table[partition]/3;for(i=0;imax_sfac[partition])max_sfac[partition]=scalefac[sfb*3+window];}}}}else{row_in_table=0;var partition_table=qupvt.nr_of_sfb_block[table_number][row_in_table];for(sfb=0,partition=0;partition<4;partition++){nr_sfb=partition_table[partition];for(i=0;imax_sfac[partition])max_sfac[partition]=scalefac[sfb];}}}for(over=false,partition=0;partition<4;partition++){if(max_sfac[partition]>max_range_sfac_tab[table_number][partition])over=true;}if(!over){var slen1,slen2,slen3,slen4;cod_info.sfb_partition_table=qupvt.nr_of_sfb_block[table_number][row_in_table];for(partition=0;partition<4;partition++){cod_info.slen[partition]=log2tab[max_sfac[partition]];}/* set scalefac_compress */slen1=cod_info.slen[0];slen2=cod_info.slen[1];slen3=cod_info.slen[2];slen4=cod_info.slen[3];switch(table_number){case 0:cod_info.scalefac_compress=(slen1*5+slen2<<4)+(slen3<<2)+slen4;break;case 1:cod_info.scalefac_compress=400+(slen1*5+slen2<<2)+slen3;break;case 2:cod_info.scalefac_compress=500+slen1*3+slen2;break;default:System.err.printf("intensity stereo not implemented yet\n");break;}}if(!over){cod_info.part2_length=0;for(partition=0;partition<4;partition++){cod_info.part2_length+=cod_info.slen[partition]*cod_info.sfb_partition_table[partition];}}return over;};/* * Since no bands have been over-amplified, we can set scalefac_compress and * slen[] for the formatter */var log2tab=[0,1,2,2,3,3,3,3,4,4,4,4,4,4,4,4];this.huffman_init=function(gfc){for(var i=2;i<=576;i+=2){var scfb_anz=0,bv_index;while(gfc.scalefac_band.l[++scfb_anz]i){bv_index--;}if(bv_index<0){/* * this is an indication that everything is going to be encoded * as region0: bigvalues < region0 < region1 so lets set * region0, region1 to some value larger than bigvalues */bv_index=subdv_table[scfb_anz][0];// .region0_count }gfc.bv_scf[i-2]=bv_index;bv_index=subdv_table[scfb_anz][1];// .region1_count while(gfc.scalefac_band.l[bv_index+gfc.bv_scf[i-2]+2]>i){bv_index--;}if(bv_index<0){bv_index=subdv_table[scfb_anz][1];// .region1_count }gfc.bv_scf[i-1]=bv_index;}};}/* * ReplayGainAnalysis - analyzes input samples and give the recommended dB change * Copyright (C) 2001 David Robinson and Glen Sawyer * Improvements and optimizations added by Frank Klemm, and by Marcel Muller * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * concept and filter values by David Robinson (David@Robinson.org) * -- blame him if you think the idea is flawed * original coding by Glen Sawyer (mp3gain@hotmail.com) * -- blame him if you think this runs too slowly, or the coding is otherwise flawed * * lots of code improvements by Frank Klemm ( http://www.uni-jena.de/~pfk/mpp/ ) * -- credit him for all the _good_ programming ;) * * * For an explanation of the concepts and the basic algorithms involved, go to: * http://www.replaygain.org/ *//* * Here's the deal. Call * * InitGainAnalysis ( long samplefreq ); * * to initialize everything. Call * * AnalyzeSamples ( var Float_t* left_samples, * var Float_t* right_samples, * size_t num_samples, * int num_channels ); * * as many times as you want, with as many or as few samples as you want. * If mono, pass the sample buffer in through left_samples, leave * right_samples NULL, and make sure num_channels = 1. * * GetTitleGain() * * will return the recommended dB level change for all samples analyzed * SINCE THE LAST TIME you called GetTitleGain() OR InitGainAnalysis(). * * GetAlbumGain() * * will return the recommended dB level change for all samples analyzed * since InitGainAnalysis() was called and finalized with GetTitleGain(). * * Pseudo-code to process an album: * * Float_t l_samples [4096]; * Float_t r_samples [4096]; * size_t num_samples; * unsigned int num_songs; * unsigned int i; * * InitGainAnalysis ( 44100 ); * for ( i = 1; i <= num_songs; i++ ) { * while ( ( num_samples = getSongSamples ( song[i], left_samples, right_samples ) ) > 0 ) * AnalyzeSamples ( left_samples, right_samples, num_samples, 2 ); * fprintf ("Recommended dB change for song %2d: %+6.2 dB\n", i, GetTitleGain() ); * } * fprintf ("Recommended dB change for whole album: %+6.2 dB\n", GetAlbumGain() ); *//* * So here's the main source of potential code confusion: * * The filters applied to the incoming samples are IIR filters, * meaning they rely on up to number of previous samples * AND up to number of previous filtered samples. * * I set up the AnalyzeSamples routine to minimize memory usage and interface * complexity. The speed isn't compromised too much (I don't think), but the * internal complexity is higher than it should be for such a relatively * simple routine. * * Optimization/clarity suggestions are welcome. *//** * Table entries per dB */GainAnalysis.STEPS_per_dB=100.;/** * Table entries for 0...MAX_dB (normal max. values are 70...80 dB) */GainAnalysis.MAX_dB=120.;GainAnalysis.GAIN_NOT_ENOUGH_SAMPLES=-24601;GainAnalysis.GAIN_ANALYSIS_ERROR=0;GainAnalysis.GAIN_ANALYSIS_OK=1;GainAnalysis.INIT_GAIN_ANALYSIS_ERROR=0;GainAnalysis.INIT_GAIN_ANALYSIS_OK=1;GainAnalysis.YULE_ORDER=10;GainAnalysis.MAX_ORDER=GainAnalysis.YULE_ORDER;GainAnalysis.MAX_SAMP_FREQ=48000;GainAnalysis.RMS_WINDOW_TIME_NUMERATOR=1;GainAnalysis.RMS_WINDOW_TIME_DENOMINATOR=20;GainAnalysis.MAX_SAMPLES_PER_WINDOW=GainAnalysis.MAX_SAMP_FREQ*GainAnalysis.RMS_WINDOW_TIME_NUMERATOR/GainAnalysis.RMS_WINDOW_TIME_DENOMINATOR+1;function GainAnalysis(){/** * calibration value for 89dB */var PINK_REF=64.82;var YULE_ORDER=GainAnalysis.YULE_ORDER;/** * percentile which is louder than the proposed level */var RMS_PERCENTILE=0.95;/** * maximum allowed sample frequency [Hz] */var MAX_SAMP_FREQ=GainAnalysis.MAX_SAMP_FREQ;var RMS_WINDOW_TIME_NUMERATOR=GainAnalysis.RMS_WINDOW_TIME_NUMERATOR;/** * numerator / denominator = time slice size [s] */var RMS_WINDOW_TIME_DENOMINATOR=GainAnalysis.RMS_WINDOW_TIME_DENOMINATOR;/** * max. Samples per Time slice */var MAX_SAMPLES_PER_WINDOW=GainAnalysis.MAX_SAMPLES_PER_WINDOW;var ABYule=[[0.03857599435200,-3.84664617118067,-0.02160367184185,7.81501653005538,-0.00123395316851,-11.34170355132042,-0.00009291677959,13.05504219327545,-0.01655260341619,-12.28759895145294,0.02161526843274,9.48293806319790,-0.02074045215285,-5.87257861775999,0.00594298065125,2.75465861874613,0.00306428023191,-0.86984376593551,0.00012025322027,0.13919314567432,0.00288463683916],[0.05418656406430,-3.47845948550071,-0.02911007808948,6.36317777566148,-0.00848709379851,-8.54751527471874,-0.00851165645469,9.47693607801280,-0.00834990904936,-8.81498681370155,0.02245293253339,6.85401540936998,-0.02596338512915,-4.39470996079559,0.01624864962975,2.19611684890774,-0.00240879051584,-0.75104302451432,0.00674613682247,0.13149317958808,-0.00187763777362],[0.15457299681924,-2.37898834973084,-0.09331049056315,2.84868151156327,-0.06247880153653,-2.64577170229825,0.02163541888798,2.23697657451713,-0.05588393329856,-1.67148153367602,0.04781476674921,1.00595954808547,0.00222312597743,-0.45953458054983,0.03174092540049,0.16378164858596,-0.01390589421898,-0.05032077717131,0.00651420667831,0.02347897407020,-0.00881362733839],[0.30296907319327,-1.61273165137247,-0.22613988682123,1.07977492259970,-0.08587323730772,-0.25656257754070,0.03282930172664,-0.16276719120440,-0.00915702933434,-0.22638893773906,-0.02364141202522,0.39120800788284,-0.00584456039913,-0.22138138954925,0.06276101321749,0.04500235387352,-0.00000828086748,0.02005851806501,0.00205861885564,0.00302439095741,-0.02950134983287],[0.33642304856132,-1.49858979367799,-0.25572241425570,0.87350271418188,-0.11828570177555,0.12205022308084,0.11921148675203,-0.80774944671438,-0.07834489609479,0.47854794562326,-0.00469977914380,-0.12453458140019,-0.00589500224440,-0.04067510197014,0.05724228140351,0.08333755284107,0.00832043980773,-0.04237348025746,-0.01635381384540,0.02977207319925,-0.01760176568150],[0.44915256608450,-0.62820619233671,-0.14351757464547,0.29661783706366,-0.22784394429749,-0.37256372942400,-0.01419140100551,0.00213767857124,0.04078262797139,-0.42029820170918,-0.12398163381748,0.22199650564824,0.04097565135648,0.00613424350682,0.10478503600251,0.06747620744683,-0.01863887810927,0.05784820375801,-0.03193428438915,0.03222754072173,0.00541907748707],[0.56619470757641,-1.04800335126349,-0.75464456939302,0.29156311971249,0.16242137742230,-0.26806001042947,0.16744243493672,0.00819999645858,-0.18901604199609,0.45054734505008,0.30931782841830,-0.33032403314006,-0.27562961986224,0.06739368333110,0.00647310677246,-0.04784254229033,0.08647503780351,0.01639907836189,-0.03788984554840,0.01807364323573,-0.00588215443421],[0.58100494960553,-0.51035327095184,-0.53174909058578,-0.31863563325245,-0.14289799034253,-0.20256413484477,0.17520704835522,0.14728154134330,0.02377945217615,0.38952639978999,0.15558449135573,-0.23313271880868,-0.25344790059353,-0.05246019024463,0.01628462406333,-0.02505961724053,0.06920467763959,0.02442357316099,-0.03721611395801,0.01818801111503,-0.00749618797172],[0.53648789255105,-0.25049871956020,-0.42163034350696,-0.43193942311114,-0.00275953611929,-0.03424681017675,0.04267842219415,-0.04678328784242,-0.10214864179676,0.26408300200955,0.14590772289388,0.15113130533216,-0.02459864859345,-0.17556493366449,-0.11202315195388,-0.18823009262115,-0.04060034127000,0.05477720428674,0.04788665548180,0.04704409688120,-0.02217936801134]];var ABButter=[[0.98621192462708,-1.97223372919527,-1.97242384925416,0.97261396931306,0.98621192462708],[0.98500175787242,-1.96977855582618,-1.97000351574484,0.97022847566350,0.98500175787242],[0.97938932735214,-1.95835380975398,-1.95877865470428,0.95920349965459,0.97938932735214],[0.97531843204928,-1.95002759149878,-1.95063686409857,0.95124613669835,0.97531843204928],[0.97316523498161,-1.94561023566527,-1.94633046996323,0.94705070426118,0.97316523498161],[0.96454515552826,-1.92783286977036,-1.92909031105652,0.93034775234268,0.96454515552826],[0.96009142950541,-1.91858953033784,-1.92018285901082,0.92177618768381,0.96009142950541],[0.95856916599601,-1.91542108074780,-1.91713833199203,0.91885558323625,0.95856916599601],[0.94597685600279,-1.88903307939452,-1.89195371200558,0.89487434461664,0.94597685600279]];/** * When calling this procedure, make sure that ip[-order] and op[-order] * point to real data *///private void filterYule(final float[] input, int inputPos, float[] output, //int outputPos, int nSamples, final float[] kernel) { function filterYule(input,inputPos,output,outputPos,nSamples,kernel){while(nSamples--!=0){/* 1e-10 is a hack to avoid slowdown because of denormals */output[outputPos]=1e-10+input[inputPos+0]*kernel[0]-output[outputPos-1]*kernel[1]+input[inputPos-1]*kernel[2]-output[outputPos-2]*kernel[3]+input[inputPos-2]*kernel[4]-output[outputPos-3]*kernel[5]+input[inputPos-3]*kernel[6]-output[outputPos-4]*kernel[7]+input[inputPos-4]*kernel[8]-output[outputPos-5]*kernel[9]+input[inputPos-5]*kernel[10]-output[outputPos-6]*kernel[11]+input[inputPos-6]*kernel[12]-output[outputPos-7]*kernel[13]+input[inputPos-7]*kernel[14]-output[outputPos-8]*kernel[15]+input[inputPos-8]*kernel[16]-output[outputPos-9]*kernel[17]+input[inputPos-9]*kernel[18]-output[outputPos-10]*kernel[19]+input[inputPos-10]*kernel[20];++outputPos;++inputPos;}}//private void filterButter(final float[] input, int inputPos, // float[] output, int outputPos, int nSamples, final float[] kernel) { function filterButter(input,inputPos,output,outputPos,nSamples,kernel){while(nSamples--!=0){output[outputPos]=input[inputPos+0]*kernel[0]-output[outputPos-1]*kernel[1]+input[inputPos-1]*kernel[2]-output[outputPos-2]*kernel[3]+input[inputPos-2]*kernel[4];++outputPos;++inputPos;}}/** * @return INIT_GAIN_ANALYSIS_OK if successful, INIT_GAIN_ANALYSIS_ERROR if * not */function ResetSampleFrequency(rgData,samplefreq){/* zero out initial values */for(var i=0;i0){cursamples=batchsamples>rgData.sampleWindow-rgData.totsamp?rgData.sampleWindow-rgData.totsamp:batchsamples;if(cursampleposMAX_ORDER-cursamplepos)cursamples=MAX_ORDER-cursamplepos;}else{curleft=left_samplesPos+cursamplepos;curleftBase=left_samples;curright=right_samplesPos+cursamplepos;currightBase=right_samples;}filterYule(curleftBase,curleft,rgData.lstepbuf,rgData.lstep+rgData.totsamp,cursamples,ABYule[rgData.reqindex]);filterYule(currightBase,curright,rgData.rstepbuf,rgData.rstep+rgData.totsamp,cursamples,ABYule[rgData.reqindex]);filterButter(rgData.lstepbuf,rgData.lstep+rgData.totsamp,rgData.loutbuf,rgData.lout+rgData.totsamp,cursamples,ABButter[rgData.reqindex]);filterButter(rgData.rstepbuf,rgData.rstep+rgData.totsamp,rgData.routbuf,rgData.rout+rgData.totsamp,cursamples,ABButter[rgData.reqindex]);curleft=rgData.lout+rgData.totsamp;/* Get the squared values */curleftBase=rgData.loutbuf;curright=rgData.rout+rgData.totsamp;currightBase=rgData.routbuf;var i=cursamples%8;while(i--!=0){rgData.lsum+=fsqr(curleftBase[curleft++]);rgData.rsum+=fsqr(currightBase[curright++]);}i=cursamples/8;while(i--!=0){rgData.lsum+=fsqr(curleftBase[curleft+0])+fsqr(curleftBase[curleft+1])+fsqr(curleftBase[curleft+2])+fsqr(curleftBase[curleft+3])+fsqr(curleftBase[curleft+4])+fsqr(curleftBase[curleft+5])+fsqr(curleftBase[curleft+6])+fsqr(curleftBase[curleft+7]);curleft+=8;rgData.rsum+=fsqr(currightBase[curright+0])+fsqr(currightBase[curright+1])+fsqr(currightBase[curright+2])+fsqr(currightBase[curright+3])+fsqr(currightBase[curright+4])+fsqr(currightBase[curright+5])+fsqr(currightBase[curright+6])+fsqr(currightBase[curright+7]);curright+=8;}batchsamples-=cursamples;cursamplepos+=cursamples;rgData.totsamp+=cursamples;if(rgData.totsamp==rgData.sampleWindow){/* Get the Root Mean Square (RMS) for this set of samples */var val=GainAnalysis.STEPS_per_dB*10.*Math.log10((rgData.lsum+rgData.rsum)/rgData.totsamp*0.5+1.e-37);var ival=val<=0?0:0|val;if(ival>=rgData.A.length)ival=rgData.A.length-1;rgData.A[ival]++;rgData.lsum=rgData.rsum=0.;System.arraycopy(rgData.loutbuf,rgData.totsamp,rgData.loutbuf,0,MAX_ORDER);System.arraycopy(rgData.routbuf,rgData.totsamp,rgData.routbuf,0,MAX_ORDER);System.arraycopy(rgData.lstepbuf,rgData.totsamp,rgData.lstepbuf,0,MAX_ORDER);System.arraycopy(rgData.rstepbuf,rgData.totsamp,rgData.rstepbuf,0,MAX_ORDER);rgData.totsamp=0;}if(rgData.totsamp>rgData.sampleWindow){/* * somehow I really screwed up: Error in programming! Contact * author about totsamp > sampleWindow */return GAIN_ANALYSIS_ERROR;}}if(num_samples0;){if((upper-=Array[i])<=0)break;}//return (float) ((float) PINK_REF - (float) i / (float) STEPS_per_dB); return PINK_REF-i/GainAnalysis.STEPS_per_dB;}this.GetTitleGain=function(rgData){var retval=analyzeResult(rgData.A,rgData.A.length);for(var i=0;i * Switch mappings for VBR mode VBR_RH * vbr_q qcomp_l qcomp_s expY st_lrm st_s mask adj_l adj_s ath_lower ath_curve ath_sens interChR safejoint sfb21mod msfix * */var vbr_old_switch_map=[new VBRPresets(0,9,9,0,5.20,125.0,-4.2,-6.3,4.8,1,0,0,2,21,0.97),new VBRPresets(1,9,9,0,5.30,125.0,-3.6,-5.6,4.5,1.5,0,0,2,21,1.35),new VBRPresets(2,9,9,0,5.60,125.0,-2.2,-3.5,2.8,2,0,0,2,21,1.49),new VBRPresets(3,9,9,1,5.80,130.0,-1.8,-2.8,2.6,3,-4,0,2,20,1.64),new VBRPresets(4,9,9,1,6.00,135.0,-0.7,-1.1,1.1,3.5,-8,0,2,0,1.79),new VBRPresets(5,9,9,1,6.40,140.0,0.5,0.4,-7.5,4,-12,0.0002,0,0,1.95),new VBRPresets(6,9,9,1,6.60,145.0,0.67,0.65,-14.7,6.5,-19,0.0004,0,0,2.30),new VBRPresets(7,9,9,1,6.60,145.0,0.8,0.75,-19.7,8,-22,0.0006,0,0,2.70),new VBRPresets(8,9,9,1,6.60,145.0,1.2,1.15,-27.5,10,-23,0.0007,0,0,0),new VBRPresets(9,9,9,1,6.60,145.0,1.6,1.6,-36,11,-25,0.0008,0,0,0),new VBRPresets(10,9,9,1,6.60,145.0,2.0,2.0,-36,12,-25,0.0008,0,0,0)];/** *
                 *                 vbr_q  qcomp_l  qcomp_s  expY  st_lrm   st_s  mask adj_l  adj_s  ath_lower  ath_curve  ath_sens  interChR  safejoint sfb21mod  msfix
                 * 
    */var vbr_psy_switch_map=[new VBRPresets(0,9,9,0,4.20,25.0,-7.0,-4.0,7.5,1,0,0,2,26,0.97),new VBRPresets(1,9,9,0,4.20,25.0,-5.6,-3.6,4.5,1.5,0,0,2,21,1.35),new VBRPresets(2,9,9,0,4.20,25.0,-4.4,-1.8,2,2,0,0,2,18,1.49),new VBRPresets(3,9,9,1,4.20,25.0,-3.4,-1.25,1.1,3,-4,0,2,15,1.64),new VBRPresets(4,9,9,1,4.20,25.0,-2.2,0.1,0,3.5,-8,0,2,0,1.79),new VBRPresets(5,9,9,1,4.20,25.0,-1.0,1.65,-7.7,4,-12,0.0002,0,0,1.95),new VBRPresets(6,9,9,1,4.20,25.0,-0.0,2.47,-7.7,6.5,-19,0.0004,0,0,2),new VBRPresets(7,9,9,1,4.20,25.0,0.5,2.0,-14.5,8,-22,0.0006,0,0,2),new VBRPresets(8,9,9,1,4.20,25.0,1.0,2.4,-22.0,10,-23,0.0007,0,0,2),new VBRPresets(9,9,9,1,4.20,25.0,1.5,2.95,-30.0,11,-25,0.0008,0,0,2),new VBRPresets(10,9,9,1,4.20,25.0,2.0,2.95,-36.0,12,-30,0.0008,0,0,2)];function apply_vbr_preset(gfp,a,enforce){var vbr_preset=gfp.VBR==VbrMode.vbr_rh?vbr_old_switch_map:vbr_psy_switch_map;var x=gfp.VBR_q_frac;var p=vbr_preset[a];var q=vbr_preset[a+1];var set=p;// NOOP(vbr_q); // NOOP(quant_comp); // NOOP(quant_comp_s); // NOOP(expY); p.st_lrm=p.st_lrm+x*(q.st_lrm-p.st_lrm);// LERP(st_lrm); p.st_s=p.st_s+x*(q.st_s-p.st_s);// LERP(st_s); p.masking_adj=p.masking_adj+x*(q.masking_adj-p.masking_adj);// LERP(masking_adj); p.masking_adj_short=p.masking_adj_short+x*(q.masking_adj_short-p.masking_adj_short);// LERP(masking_adj_short); p.ath_lower=p.ath_lower+x*(q.ath_lower-p.ath_lower);// LERP(ath_lower); p.ath_curve=p.ath_curve+x*(q.ath_curve-p.ath_curve);// LERP(ath_curve); p.ath_sensitivity=p.ath_sensitivity+x*(q.ath_sensitivity-p.ath_sensitivity);// LERP(ath_sensitivity); p.interch=p.interch+x*(q.interch-p.interch);// LERP(interch); // NOOP(safejoint); // NOOP(sfb21mod); p.msfix=p.msfix+x*(q.msfix-p.msfix);// LERP(msfix); lame_set_VBR_q(gfp,set.vbr_q);if(enforce!=0)gfp.quant_comp=set.quant_comp;else if(!(Math.abs(gfp.quant_comp- -1)>0))gfp.quant_comp=set.quant_comp;// SET_OPTION(quant_comp, set.quant_comp, -1); if(enforce!=0)gfp.quant_comp_short=set.quant_comp_s;else if(!(Math.abs(gfp.quant_comp_short- -1)>0))gfp.quant_comp_short=set.quant_comp_s;// SET_OPTION(quant_comp_short, set.quant_comp_s, -1); if(set.expY!=0){gfp.experimentalY=set.expY!=0;}if(enforce!=0)gfp.internal_flags.nsPsy.attackthre=set.st_lrm;else if(!(Math.abs(gfp.internal_flags.nsPsy.attackthre- -1)>0))gfp.internal_flags.nsPsy.attackthre=set.st_lrm;// SET_OPTION(short_threshold_lrm, set.st_lrm, -1); if(enforce!=0)gfp.internal_flags.nsPsy.attackthre_s=set.st_s;else if(!(Math.abs(gfp.internal_flags.nsPsy.attackthre_s- -1)>0))gfp.internal_flags.nsPsy.attackthre_s=set.st_s;// SET_OPTION(short_threshold_s, set.st_s, -1); if(enforce!=0)gfp.maskingadjust=set.masking_adj;else if(!(Math.abs(gfp.maskingadjust-0)>0))gfp.maskingadjust=set.masking_adj;// SET_OPTION(maskingadjust, set.masking_adj, 0); if(enforce!=0)gfp.maskingadjust_short=set.masking_adj_short;else if(!(Math.abs(gfp.maskingadjust_short-0)>0))gfp.maskingadjust_short=set.masking_adj_short;// SET_OPTION(maskingadjust_short, set.masking_adj_short, 0); if(enforce!=0)gfp.ATHlower=-set.ath_lower/10.0;else if(!(Math.abs(-gfp.ATHlower*10.0-0)>0))gfp.ATHlower=-set.ath_lower/10.0;// SET_OPTION(ATHlower, set.ath_lower, 0); if(enforce!=0)gfp.ATHcurve=set.ath_curve;else if(!(Math.abs(gfp.ATHcurve- -1)>0))gfp.ATHcurve=set.ath_curve;// SET_OPTION(ATHcurve, set.ath_curve, -1); if(enforce!=0)gfp.athaa_sensitivity=set.ath_sensitivity;else if(!(Math.abs(gfp.athaa_sensitivity- -1)>0))gfp.athaa_sensitivity=set.ath_sensitivity;// SET_OPTION(athaa_sensitivity, set.ath_sensitivity, 0); if(set.interch>0){if(enforce!=0)gfp.interChRatio=set.interch;else if(!(Math.abs(gfp.interChRatio- -1)>0))gfp.interChRatio=set.interch;// SET_OPTION(interChRatio, set.interch, -1); }/* parameters for which there is no proper set/get interface */if(set.safejoint>0){gfp.exp_nspsytune=gfp.exp_nspsytune|set.safejoint;}if(set.sfb21mod>0){gfp.exp_nspsytune=gfp.exp_nspsytune|set.sfb21mod<<20;}if(enforce!=0)gfp.msfix=set.msfix;else if(!(Math.abs(gfp.msfix- -1)>0))gfp.msfix=set.msfix;// SET_OPTION(msfix, set.msfix, -1); if(enforce==0){gfp.VBR_q=a;gfp.VBR_q_frac=x;}}/** *
                 *  Switch mappings for ABR mode
                 *
                 *              kbps  quant q_s safejoint nsmsfix st_lrm  st_s  ns-bass scale   msk ath_lwr ath_curve  interch , sfscale
                 * 
    */var abr_switch_map=[new ABRPresets(8,9,9,0,0,6.60,145,0,0.95,0,-30.0,11,0.0012,1),/* 8, impossible to use in stereo */new ABRPresets(16,9,9,0,0,6.60,145,0,0.95,0,-25.0,11,0.0010,1),/* 16 */new ABRPresets(24,9,9,0,0,6.60,145,0,0.95,0,-20.0,11,0.0010,1),/* 24 */new ABRPresets(32,9,9,0,0,6.60,145,0,0.95,0,-15.0,11,0.0010,1),/* 32 */new ABRPresets(40,9,9,0,0,6.60,145,0,0.95,0,-10.0,11,0.0009,1),/* 40 */new ABRPresets(48,9,9,0,0,6.60,145,0,0.95,0,-10.0,11,0.0009,1),/* 48 */new ABRPresets(56,9,9,0,0,6.60,145,0,0.95,0,-6.0,11,0.0008,1),/* 56 */new ABRPresets(64,9,9,0,0,6.60,145,0,0.95,0,-2.0,11,0.0008,1),/* 64 */new ABRPresets(80,9,9,0,0,6.60,145,0,0.95,0,.0,8,0.0007,1),/* 80 */new ABRPresets(96,9,9,0,2.50,6.60,145,0,0.95,0,1.0,5.5,0.0006,1),/* 96 */new ABRPresets(112,9,9,0,2.25,6.60,145,0,0.95,0,2.0,4.5,0.0005,1),/* 112 */new ABRPresets(128,9,9,0,1.95,6.40,140,0,0.95,0,3.0,4,0.0002,1),/* 128 */new ABRPresets(160,9,9,1,1.79,6.00,135,0,0.95,-2,5.0,3.5,0,1),/* 160 */new ABRPresets(192,9,9,1,1.49,5.60,125,0,0.97,-4,7.0,3,0,0),/* 192 */new ABRPresets(224,9,9,1,1.25,5.20,125,0,0.98,-6,9.0,2,0,0),/* 224 */new ABRPresets(256,9,9,1,0.97,5.20,125,0,1.00,-8,10.0,1,0,0),/* 256 */new ABRPresets(320,9,9,1,0.90,5.20,125,0,1.00,-10,12.0,0,0,0)/* 320 */];function apply_abr_preset(gfp,preset,enforce){/* Variables for the ABR stuff */var actual_bitrate=preset;var r=lame.nearestBitrateFullIndex(preset);gfp.VBR=VbrMode.vbr_abr;gfp.VBR_mean_bitrate_kbps=actual_bitrate;gfp.VBR_mean_bitrate_kbps=Math.min(gfp.VBR_mean_bitrate_kbps,320);gfp.VBR_mean_bitrate_kbps=Math.max(gfp.VBR_mean_bitrate_kbps,8);gfp.brate=gfp.VBR_mean_bitrate_kbps;if(gfp.VBR_mean_bitrate_kbps>320){gfp.disable_reservoir=true;}/* parameters for which there is no proper set/get interface */if(abr_switch_map[r].safejoint>0)gfp.exp_nspsytune=gfp.exp_nspsytune|2;/* safejoint */if(abr_switch_map[r].sfscale>0){gfp.internal_flags.noise_shaping=2;}/* ns-bass tweaks */if(Math.abs(abr_switch_map[r].nsbass)>0){var k=int(abr_switch_map[r].nsbass*4);if(k<0)k+=64;gfp.exp_nspsytune=gfp.exp_nspsytune|k<<2;}if(enforce!=0)gfp.quant_comp=abr_switch_map[r].quant_comp;else if(!(Math.abs(gfp.quant_comp- -1)>0))gfp.quant_comp=abr_switch_map[r].quant_comp;// SET_OPTION(quant_comp, abr_switch_map[r].quant_comp, -1); if(enforce!=0)gfp.quant_comp_short=abr_switch_map[r].quant_comp_s;else if(!(Math.abs(gfp.quant_comp_short- -1)>0))gfp.quant_comp_short=abr_switch_map[r].quant_comp_s;// SET_OPTION(quant_comp_short, abr_switch_map[r].quant_comp_s, -1); if(enforce!=0)gfp.msfix=abr_switch_map[r].nsmsfix;else if(!(Math.abs(gfp.msfix- -1)>0))gfp.msfix=abr_switch_map[r].nsmsfix;// SET_OPTION(msfix, abr_switch_map[r].nsmsfix, -1); if(enforce!=0)gfp.internal_flags.nsPsy.attackthre=abr_switch_map[r].st_lrm;else if(!(Math.abs(gfp.internal_flags.nsPsy.attackthre- -1)>0))gfp.internal_flags.nsPsy.attackthre=abr_switch_map[r].st_lrm;// SET_OPTION(short_threshold_lrm, abr_switch_map[r].st_lrm, -1); if(enforce!=0)gfp.internal_flags.nsPsy.attackthre_s=abr_switch_map[r].st_s;else if(!(Math.abs(gfp.internal_flags.nsPsy.attackthre_s- -1)>0))gfp.internal_flags.nsPsy.attackthre_s=abr_switch_map[r].st_s;// SET_OPTION(short_threshold_s, abr_switch_map[r].st_s, -1); /* * ABR seems to have big problems with clipping, especially at low * bitrates *//* * so we compensate for that here by using a scale value depending on * bitrate */if(enforce!=0)gfp.scale=abr_switch_map[r].scale;else if(!(Math.abs(gfp.scale- -1)>0))gfp.scale=abr_switch_map[r].scale;// SET_OPTION(scale, abr_switch_map[r].scale, -1); if(enforce!=0)gfp.maskingadjust=abr_switch_map[r].masking_adj;else if(!(Math.abs(gfp.maskingadjust-0)>0))gfp.maskingadjust=abr_switch_map[r].masking_adj;// SET_OPTION(maskingadjust, abr_switch_map[r].masking_adj, 0); if(abr_switch_map[r].masking_adj>0){if(enforce!=0)gfp.maskingadjust_short=abr_switch_map[r].masking_adj*.9;else if(!(Math.abs(gfp.maskingadjust_short-0)>0))gfp.maskingadjust_short=abr_switch_map[r].masking_adj*.9;// SET_OPTION(maskingadjust_short, abr_switch_map[r].masking_adj * // .9, 0); }else{if(enforce!=0)gfp.maskingadjust_short=abr_switch_map[r].masking_adj*1.1;else if(!(Math.abs(gfp.maskingadjust_short-0)>0))gfp.maskingadjust_short=abr_switch_map[r].masking_adj*1.1;// SET_OPTION(maskingadjust_short, abr_switch_map[r].masking_adj * // 1.1, 0); }if(enforce!=0)gfp.ATHlower=-abr_switch_map[r].ath_lower/10.;else if(!(Math.abs(-gfp.ATHlower*10.-0)>0))gfp.ATHlower=-abr_switch_map[r].ath_lower/10.;// SET_OPTION(ATHlower, abr_switch_map[r].ath_lower, 0); if(enforce!=0)gfp.ATHcurve=abr_switch_map[r].ath_curve;else if(!(Math.abs(gfp.ATHcurve- -1)>0))gfp.ATHcurve=abr_switch_map[r].ath_curve;// SET_OPTION(ATHcurve, abr_switch_map[r].ath_curve, -1); if(enforce!=0)gfp.interChRatio=abr_switch_map[r].interch;else if(!(Math.abs(gfp.interChRatio- -1)>0))gfp.interChRatio=abr_switch_map[r].interch;// SET_OPTION(interChRatio, abr_switch_map[r].interch, -1); return preset;}this.apply_preset=function(gfp,preset,enforce){/* translate legacy presets */switch(preset){case Lame.R3MIX:{preset=Lame.V3;gfp.VBR=VbrMode.vbr_mtrh;break;}case Lame.MEDIUM:{preset=Lame.V4;gfp.VBR=VbrMode.vbr_rh;break;}case Lame.MEDIUM_FAST:{preset=Lame.V4;gfp.VBR=VbrMode.vbr_mtrh;break;}case Lame.STANDARD:{preset=Lame.V2;gfp.VBR=VbrMode.vbr_rh;break;}case Lame.STANDARD_FAST:{preset=Lame.V2;gfp.VBR=VbrMode.vbr_mtrh;break;}case Lame.EXTREME:{preset=Lame.V0;gfp.VBR=VbrMode.vbr_rh;break;}case Lame.EXTREME_FAST:{preset=Lame.V0;gfp.VBR=VbrMode.vbr_mtrh;break;}case Lame.INSANE:{preset=320;gfp.preset=preset;apply_abr_preset(gfp,preset,enforce);gfp.VBR=VbrMode.vbr_off;return preset;}}gfp.preset=preset;{switch(preset){case Lame.V9:apply_vbr_preset(gfp,9,enforce);return preset;case Lame.V8:apply_vbr_preset(gfp,8,enforce);return preset;case Lame.V7:apply_vbr_preset(gfp,7,enforce);return preset;case Lame.V6:apply_vbr_preset(gfp,6,enforce);return preset;case Lame.V5:apply_vbr_preset(gfp,5,enforce);return preset;case Lame.V4:apply_vbr_preset(gfp,4,enforce);return preset;case Lame.V3:apply_vbr_preset(gfp,3,enforce);return preset;case Lame.V2:apply_vbr_preset(gfp,2,enforce);return preset;case Lame.V1:apply_vbr_preset(gfp,1,enforce);return preset;case Lame.V0:apply_vbr_preset(gfp,0,enforce);return preset;default:break;}}if(8<=preset&&preset<=320){return apply_abr_preset(gfp,preset,enforce);}/* no corresponding preset found */gfp.preset=0;return preset;};// Rest from getset.c: /** * VBR quality level.
    * 0 = highest
    * 9 = lowest */function lame_set_VBR_q(gfp,VBR_q){var ret=0;if(0>VBR_q){/* Unknown VBR quality level! */ret=-1;VBR_q=0;}if(9 * Called (repeatedly) at the beginning of a frame. Updates the maximum size of * the reservoir, and checks to make sure main_data_begin was set properly by * the formatter
    * Background information: * * This is the original text from the ISO standard. Because of sooo many bugs * and irritations correcting comments are added in brackets []. A '^W' means * you should remove the last word. * *
             *  1. The following rule can be used to calculate the maximum
             *     number of bits used for one granule [^W frame]:
    * At the highest possible bitrate of Layer III (320 kbps * per stereo signal [^W^W^W], 48 kHz) the frames must be of * [^W^W^W are designed to have] constant length, i.e. * one buffer [^W^W the frame] length is:
    * * 320 kbps * 1152/48 kHz = 7680 bit = 960 byte * * This value is used as the maximum buffer per channel [^W^W] at * lower bitrates [than 320 kbps]. At 64 kbps mono or 128 kbps * stereo the main granule length is 64 kbps * 576/48 kHz = 768 bit * [per granule and channel] at 48 kHz sampling frequency. * This means that there is a maximum deviation (short time buffer * [= reservoir]) of 7680 - 2*2*768 = 4608 bits is allowed at 64 kbps. * The actual deviation is equal to the number of bytes [with the * meaning of octets] denoted by the main_data_end offset pointer. * The actual maximum deviation is (2^9-1)*8 bit = 4088 bits * [for MPEG-1 and (2^8-1)*8 bit for MPEG-2, both are hard limits]. * ... The xchange of buffer bits between the left and right channel * is allowed without restrictions [exception: dual channel]. * Because of the [constructed] constraint on the buffer size * main_data_end is always set to 0 in the case of bit_rate_index==14, * i.e. data rate 320 kbps per stereo signal [^W^W^W]. In this case * all data are allocated between adjacent header [^W sync] words * [, i.e. there is no buffering at all]. *
    */function Reservoir(){var bs;this.setModules=function(_bs){bs=_bs;};this.ResvFrameBegin=function(gfp,mean_bits){var gfc=gfp.internal_flags;var maxmp3buf;var l3_side=gfc.l3_side;var frameLength=bs.getframebits(gfp);mean_bits.bits=(frameLength-gfc.sideinfo_len*8)/gfc.mode_gr;/** *
                     *  Meaning of the variables:
                     *      resvLimit: (0, 8, ..., 8*255 (MPEG-2), 8*511 (MPEG-1))
                     *          Number of bits can be stored in previous frame(s) due to
                     *          counter size constaints
                     *      maxmp3buf: ( ??? ... 8*1951 (MPEG-1 and 2), 8*2047 (MPEG-2.5))
                     *          Number of bits allowed to encode one frame (you can take 8*511 bit
                     *          from the bit reservoir and at most 8*1440 bit from the current
                     *          frame (320 kbps, 32 kHz), so 8*1951 bit is the largest possible
                     *          value for MPEG-1 and -2)
                     *
                     *          maximum allowed granule/channel size times 4 = 8*2047 bits.,
                     *          so this is the absolute maximum supported by the format.
                     *
                     *
                     *      fullFrameBits:  maximum number of bits available for encoding
                     *                      the current frame.
                     *
                     *      mean_bits:      target number of bits per granule.
                     *
                     *      frameLength:
                     *
                     *      gfc.ResvMax:   maximum allowed reservoir
                     *
                     *      gfc.ResvSize:  current reservoir size
                     *
                     *      l3_side.resvDrain_pre:
                     *         ancillary data to be added to previous frame:
                     *         (only usefull in VBR modes if it is possible to have
                     *         maxmp3buf < fullFrameBits)).  Currently disabled,
                     *         see #define NEW_DRAIN
                     *         2010-02-13: RH now enabled, it seems to be needed for CBR too,
                     *                     as there exists one example, where the FhG decoder
                     *                     can't decode a -b320 CBR file anymore.
                     *
                     *      l3_side.resvDrain_post:
                     *         ancillary data to be added to this frame:
                     *
                     * 
    *//* main_data_begin has 9 bits in MPEG-1, 8 bits MPEG-2 */var resvLimit=8*256*gfc.mode_gr-8;/* * maximum allowed frame size. dont use more than this number of bits, * even if the frame has the space for them: */if(gfp.brate>320){/* in freeformat the buffer is constant */maxmp3buf=8*int(gfp.brate*1000/(gfp.out_samplerate/1152)/8+.5);}else{/* * all mp3 decoders should have enough buffer to handle this value: * size of a 320kbps 32kHz frame */maxmp3buf=8*1440;/* * Bouvigne suggests this more lax interpretation of the ISO doc * instead of using 8*960. */if(gfp.strict_ISO){maxmp3buf=8*int(320000/(gfp.out_samplerate/1152)/8+.5);}}gfc.ResvMax=maxmp3buf-frameLength;if(gfc.ResvMax>resvLimit)gfc.ResvMax=resvLimit;if(gfc.ResvMax<0||gfp.disable_reservoir)gfc.ResvMax=0;var fullFrameBits=mean_bits.bits*gfc.mode_gr+Math.min(gfc.ResvSize,gfc.ResvMax);if(fullFrameBits>maxmp3buf)fullFrameBits=maxmp3buf;l3_side.resvDrain_pre=0;// frame analyzer code if(gfc.pinfo!=null){/* * expected bits per channel per granule [is this also right for * mono/stereo, MPEG-1/2 ?] */gfc.pinfo.mean_bits=mean_bits.bits/2;gfc.pinfo.resvsize=gfc.ResvSize;}return fullFrameBits;};/** * returns targ_bits: target number of bits to use for 1 granule
    * extra_bits: amount extra available from reservoir
    * Mark Taylor 4/99 */this.ResvMaxBits=function(gfp,mean_bits,targ_bits,cbr){var gfc=gfp.internal_flags;var add_bits;var ResvSize=gfc.ResvSize,ResvMax=gfc.ResvMax;/* compensate the saved bits used in the 1st granule */if(cbr!=0)ResvSize+=mean_bits;if((gfc.substep_shaping&1)!=0)ResvMax*=0.9;targ_bits.bits=mean_bits;/* extra bits if the reservoir is almost full */if(ResvSize*10>ResvMax*9){add_bits=ResvSize-ResvMax*9/10;targ_bits.bits+=add_bits;gfc.substep_shaping|=0x80;}else{add_bits=0;gfc.substep_shaping&=0x7f;/* * build up reservoir. this builds the reservoir a little slower * than FhG. It could simple be mean_bits/15, but this was rigged to * always produce 100 (the old value) at 128kbs */if(!gfp.disable_reservoir&&0==(gfc.substep_shaping&1))targ_bits.bits-=.1*mean_bits;}/* amount from the reservoir we are allowed to use. ISO says 6/10 */var extra_bits=ResvSize0){stuffingBits+=over_bits;}/* * NOTE: enabling the NEW_DRAIN code fixes some problems with FhG * decoder shipped with MS Windows operating systems. Using this, it is * even possible to use Gabriel's lax buffer consideration again, which * assumes, any decoder should have a buffer large enough for a 320 kbps * frame at 32 kHz sample rate. * * old drain code: lame -b320 BlackBird.wav --. does not play with * GraphEdit.exe using FhG decoder V1.5 Build 50 * * new drain code: lame -b320 BlackBird.wav --. plays fine with * GraphEdit.exe using FhG decoder V1.5 Build 50 * * Robert Hegemann, 2010-02-13. *//* * drain as many bits as possible into previous frame ancillary data In * particular, in VBR mode ResvMax may have changed, and we have to make * sure main_data_begin does not create a reservoir bigger than ResvMax * mt 4/00 */{var mdb_bytes=Math.min(l3_side.main_data_begin*8,stuffingBits)/8;l3_side.resvDrain_pre+=8*mdb_bytes;stuffingBits-=8*mdb_bytes;gfc.ResvSize-=8*mdb_bytes;l3_side.main_data_begin-=mdb_bytes;}/* drain the rest into this frames ancillary data */l3_side.resvDrain_post+=stuffingBits;gfc.ResvSize-=stuffingBits;};}/** * A Vbr header may be present in the ancillary data field of the first frame of * an mp3 bitstream
    * The Vbr header (optionally) contains *
      *
    • frames total number of audio frames in the bitstream *
    • bytes total number of bytes in the bitstream *
    • toc table of contents *
    * * toc (table of contents) gives seek points for random access.
    * The ith entry determines the seek point for i-percent duration.
    * seek point in bytes = (toc[i]/256.0) * total_bitstream_bytes
    * e.g. half duration seek point = (toc[50]/256.0) * total_bitstream_bytes */VBRTag.NUMTOCENTRIES=100;VBRTag.MAXFRAMESIZE=2880;function VBRTag(){var lame;var bs;var v;this.setModules=function(_lame,_bs,_v){lame=_lame;bs=_bs;v=_v;};var FRAMES_FLAG=0x0001;var BYTES_FLAG=0x0002;var TOC_FLAG=0x0004;var VBR_SCALE_FLAG=0x0008;var NUMTOCENTRIES=VBRTag.NUMTOCENTRIES;/** * (0xB40) the max freeformat 640 32kHz framesize. */var MAXFRAMESIZE=VBRTag.MAXFRAMESIZE;/** *
                 *    4 bytes for Header Tag
                 *    4 bytes for Header Flags
                 *  100 bytes for entry (toc)
                 *    4 bytes for frame size
                 *    4 bytes for stream size
                 *    4 bytes for VBR scale. a VBR quality indicator: 0=best 100=worst
                 *   20 bytes for LAME tag.  for example, "LAME3.12 (beta 6)"
                 * ___________
                 *  140 bytes
                 * 
    */var VBRHEADERSIZE=NUMTOCENTRIES+4+4+4+4+4;var LAMEHEADERSIZE=VBRHEADERSIZE+9+1+1+8+1+1+3+1+1+2+4+2+2;/** * The size of the Xing header MPEG-1, bit rate in kbps. */var XING_BITRATE1=128;/** * The size of the Xing header MPEG-2, bit rate in kbps. */var XING_BITRATE2=64;/** * The size of the Xing header MPEG-2.5, bit rate in kbps. */var XING_BITRATE25=32;/** * ISO-8859-1 charset for byte to string operations. */var ISO_8859_1=null;//Charset.forName("ISO-8859-1"); /** * VBR header magic string. */var VBRTag0="Xing";/** * VBR header magic string (VBR == VBRMode.vbr_off). */var VBRTag1="Info";/** * Lookup table for fast CRC-16 computation. Uses the polynomial * x^16+x^15+x^2+1 */var crc16Lookup=[0x0000,0xC0C1,0xC181,0x0140,0xC301,0x03C0,0x0280,0xC241,0xC601,0x06C0,0x0780,0xC741,0x0500,0xC5C1,0xC481,0x0440,0xCC01,0x0CC0,0x0D80,0xCD41,0x0F00,0xCFC1,0xCE81,0x0E40,0x0A00,0xCAC1,0xCB81,0x0B40,0xC901,0x09C0,0x0880,0xC841,0xD801,0x18C0,0x1980,0xD941,0x1B00,0xDBC1,0xDA81,0x1A40,0x1E00,0xDEC1,0xDF81,0x1F40,0xDD01,0x1DC0,0x1C80,0xDC41,0x1400,0xD4C1,0xD581,0x1540,0xD701,0x17C0,0x1680,0xD641,0xD201,0x12C0,0x1380,0xD341,0x1100,0xD1C1,0xD081,0x1040,0xF001,0x30C0,0x3180,0xF141,0x3300,0xF3C1,0xF281,0x3240,0x3600,0xF6C1,0xF781,0x3740,0xF501,0x35C0,0x3480,0xF441,0x3C00,0xFCC1,0xFD81,0x3D40,0xFF01,0x3FC0,0x3E80,0xFE41,0xFA01,0x3AC0,0x3B80,0xFB41,0x3900,0xF9C1,0xF881,0x3840,0x2800,0xE8C1,0xE981,0x2940,0xEB01,0x2BC0,0x2A80,0xEA41,0xEE01,0x2EC0,0x2F80,0xEF41,0x2D00,0xEDC1,0xEC81,0x2C40,0xE401,0x24C0,0x2580,0xE541,0x2700,0xE7C1,0xE681,0x2640,0x2200,0xE2C1,0xE381,0x2340,0xE101,0x21C0,0x2080,0xE041,0xA001,0x60C0,0x6180,0xA141,0x6300,0xA3C1,0xA281,0x6240,0x6600,0xA6C1,0xA781,0x6740,0xA501,0x65C0,0x6480,0xA441,0x6C00,0xACC1,0xAD81,0x6D40,0xAF01,0x6FC0,0x6E80,0xAE41,0xAA01,0x6AC0,0x6B80,0xAB41,0x6900,0xA9C1,0xA881,0x6840,0x7800,0xB8C1,0xB981,0x7940,0xBB01,0x7BC0,0x7A80,0xBA41,0xBE01,0x7EC0,0x7F80,0xBF41,0x7D00,0xBDC1,0xBC81,0x7C40,0xB401,0x74C0,0x7580,0xB541,0x7700,0xB7C1,0xB681,0x7640,0x7200,0xB2C1,0xB381,0x7340,0xB101,0x71C0,0x7080,0xB041,0x5000,0x90C1,0x9181,0x5140,0x9301,0x53C0,0x5280,0x9241,0x9601,0x56C0,0x5780,0x9741,0x5500,0x95C1,0x9481,0x5440,0x9C01,0x5CC0,0x5D80,0x9D41,0x5F00,0x9FC1,0x9E81,0x5E40,0x5A00,0x9AC1,0x9B81,0x5B40,0x9901,0x59C0,0x5880,0x9841,0x8801,0x48C0,0x4980,0x8941,0x4B00,0x8BC1,0x8A81,0x4A40,0x4E00,0x8EC1,0x8F81,0x4F40,0x8D01,0x4DC0,0x4C80,0x8C41,0x4400,0x84C1,0x8581,0x4540,0x8701,0x47C0,0x4680,0x8641,0x8201,0x42C0,0x4380,0x8341,0x4100,0x81C1,0x8081,0x4040];/*********************************************************************** * Robert Hegemann 2001-01-17 ***********************************************************************/function addVbr(v,bitrate){v.nVbrNumFrames++;v.sum+=bitrate;v.seen++;if(v.seenv.pos-1)indx=v.pos-1;act=v.bag[indx];sum=v.sum;var seek_point=0|256.*act/sum;if(seek_point>255)seek_point=255;t[i]=0xff&seek_point;}}/** * Add VBR entry, used to fill the VBR TOC entries. * * @param gfp * global flags */this.addVbrFrame=function(gfp){var gfc=gfp.internal_flags;var kbps=Tables.bitrate_table[gfp.version][gfc.bitrate_index];addVbr(gfc.VBR_seek_table,kbps);};/** * Read big endian integer (4-bytes) from header. * * @param buf * header containing the integer * @param bufPos * offset into the header * @return extracted integer */function extractInteger(buf,bufPos){var x=buf[bufPos+0]&0xff;x<<=8;x|=buf[bufPos+1]&0xff;x<<=8;x|=buf[bufPos+2]&0xff;x<<=8;x|=buf[bufPos+3]&0xff;return x;}/** * Write big endian integer (4-bytes) in the header. * * @param buf * header to write the integer into * @param bufPos * offset into the header * @param value * integer value to write */function createInteger(buf,bufPos,value){buf[bufPos+0]=0xff&(value>>24&0xff);buf[bufPos+1]=0xff&(value>>16&0xff);buf[bufPos+2]=0xff&(value>>8&0xff);buf[bufPos+3]=0xff&(value&0xff);}/** * Write big endian short (2-bytes) in the header. * * @param buf * header to write the integer into * @param bufPos * offset into the header * @param value * integer value to write */function createShort(buf,bufPos,value){buf[bufPos+0]=0xff&(value>>8&0xff);buf[bufPos+1]=0xff&(value&0xff);}/** * Check for magic strings (Xing/Info). * * @param buf * header to check * @param bufPos * header offset to check * @return magic string found */function isVbrTag(buf,bufPos){return new String(buf,bufPos,VBRTag0.length(),ISO_8859_1).equals(VBRTag0)||new String(buf,bufPos,VBRTag1.length(),ISO_8859_1).equals(VBRTag1);}function shiftInBitsValue(x,n,v){return 0xff&(x< * * @param gfp * global flags * @param buffer * header */function setLameTagFrameHeader(gfp,buffer){var gfc=gfp.internal_flags;// MP3 Sync Word buffer[0]=shiftInBitsValue(buffer[0],8,0xff);buffer[1]=shiftInBitsValue(buffer[1],3,7);buffer[1]=shiftInBitsValue(buffer[1],1,gfp.out_samplerate<16000?0:1);// Version buffer[1]=shiftInBitsValue(buffer[1],1,gfp.version);// 01 == Layer 3 buffer[1]=shiftInBitsValue(buffer[1],2,4-3);// Error protection buffer[1]=shiftInBitsValue(buffer[1],1,!gfp.error_protection?1:0);// Bit rate buffer[2]=shiftInBitsValue(buffer[2],4,gfc.bitrate_index);// Frequency buffer[2]=shiftInBitsValue(buffer[2],2,gfc.samplerate_index);// Pad. Bit buffer[2]=shiftInBitsValue(buffer[2],1,0);// Priv. Bit buffer[2]=shiftInBitsValue(buffer[2],1,gfp.extension);// Mode buffer[3]=shiftInBitsValue(buffer[3],2,gfp.mode.ordinal());// Mode extension (Used with Joint Stereo) buffer[3]=shiftInBitsValue(buffer[3],2,gfc.mode_ext);// Copy buffer[3]=shiftInBitsValue(buffer[3],1,gfp.copyright);// Original buffer[3]=shiftInBitsValue(buffer[3],1,gfp.original);// Emphasis buffer[3]=shiftInBitsValue(buffer[3],2,gfp.emphasis);/* the default VBR header. 48 kbps layer III, no padding, no crc *//* but sampling freq, mode and copyright/copy protection taken *//* from first valid frame */buffer[0]=0xff;var abyte=0xff&(buffer[1]&0xf1);var bitrate;if(1==gfp.version){bitrate=XING_BITRATE1;}else{if(gfp.out_samplerate<16000)bitrate=XING_BITRATE25;else bitrate=XING_BITRATE2;}if(gfp.VBR==VbrMode.vbr_off)bitrate=gfp.brate;var bbyte;if(gfp.free_format)bbyte=0x00;else bbyte=0xff&16*lame.BitrateIndex(bitrate,gfp.version,gfp.out_samplerate);/* * Use as much of the info from the real frames in the Xing header: * samplerate, channels, crc, etc... */if(gfp.version==1){/* MPEG1 */buffer[1]=0xff&(abyte|0x0a);/* was 0x0b; */abyte=0xff&(buffer[2]&0x0d);/* AF keep also private bit */buffer[2]=0xff&(bbyte|abyte);/* 64kbs MPEG1 frame */}else{/* MPEG2 */buffer[1]=0xff&(abyte|0x02);/* was 0x03; */abyte=0xff&(buffer[2]&0x0d);/* AF keep also private bit */buffer[2]=0xff&(bbyte|abyte);/* 64kbs MPEG2 frame */}}/** * Get VBR tag information * * @param buf * header to analyze * @param bufPos * offset into the header * @return VBR tag data */this.getVbrTag=function(buf){var pTagData=new VBRTagData();var bufPos=0;/* get Vbr header data */pTagData.flags=0;/* get selected MPEG header data */var hId=buf[bufPos+1]>>3&1;var hSrIndex=buf[bufPos+2]>>2&3;var hMode=buf[bufPos+3]>>6&3;var hBitrate=buf[bufPos+2]>>4&0xf;hBitrate=Tables.bitrate_table[hId][hBitrate];/* check for FFE syncword */if(buf[bufPos+1]>>4==0xE)pTagData.samprate=Tables.samplerate_table[2][hSrIndex];else pTagData.samprate=Tables.samplerate_table[hId][hSrIndex];/* determine offset of header */if(hId!=0){/* mpeg1 */if(hMode!=3)bufPos+=32+4;else bufPos+=17+4;}else{/* mpeg2 */if(hMode!=3)bufPos+=17+4;else bufPos+=9+4;}if(!isVbrTag(buf,bufPos))return null;bufPos+=4;pTagData.hId=hId;/* get flags */var head_flags=pTagData.flags=extractInteger(buf,bufPos);bufPos+=4;if((head_flags&FRAMES_FLAG)!=0){pTagData.frames=extractInteger(buf,bufPos);bufPos+=4;}if((head_flags&BYTES_FLAG)!=0){pTagData.bytes=extractInteger(buf,bufPos);bufPos+=4;}if((head_flags&TOC_FLAG)!=0){if(pTagData.toc!=null){for(var i=0;i>4;var encPadding=(buf[bufPos+1]&0x0F)<<8;encPadding+=buf[bufPos+2]&0xff;/* check for reasonable values (this may be an old Xing header, *//* not a INFO tag) */if(encDelay<0||encDelay>3000)encDelay=-1;if(encPadding<0||encPadding>3000)encPadding=-1;pTagData.encDelay=encDelay;pTagData.encPadding=encPadding;/* success */return pTagData;};/** * Initializes the header * * @param gfp * global flags */this.InitVbrTag=function(gfp){var gfc=gfp.internal_flags;/** *
                     * Xing VBR pretends to be a 48kbs layer III frame.  (at 44.1kHz).
                     * (at 48kHz they use 56kbs since 48kbs frame not big enough for
                     * table of contents)
                     * let's always embed Xing header inside a 64kbs layer III frame.
                     * this gives us enough room for a LAME version string too.
                     * size determined by sampling frequency (MPEG1)
                     * 32kHz:    216 bytes@48kbs    288bytes@ 64kbs
                     * 44.1kHz:  156 bytes          208bytes@64kbs     (+1 if padding = 1)
                     * 48kHz:    144 bytes          192
                     *
                     * MPEG 2 values are the same since the framesize and samplerate
                     * are each reduced by a factor of 2.
                     * 
    */var kbps_header;if(1==gfp.version){kbps_header=XING_BITRATE1;}else{if(gfp.out_samplerate<16000)kbps_header=XING_BITRATE25;else kbps_header=XING_BITRATE2;}if(gfp.VBR==VbrMode.vbr_off)kbps_header=gfp.brate;// make sure LAME Header fits into Frame var totalFrameSize=(gfp.version+1)*72000*kbps_header/gfp.out_samplerate;var headerSize=gfc.sideinfo_len+LAMEHEADERSIZE;gfc.VBR_seek_table.TotalFrameSize=totalFrameSize;if(totalFrameSizeMAXFRAMESIZE){/* disable tag, it wont fit */gfp.bWriteVbrTag=false;return;}gfc.VBR_seek_table.nVbrNumFrames=0;gfc.VBR_seek_table.nBytesWritten=0;gfc.VBR_seek_table.sum=0;gfc.VBR_seek_table.seen=0;gfc.VBR_seek_table.want=1;gfc.VBR_seek_table.pos=0;if(gfc.VBR_seek_table.bag==null){gfc.VBR_seek_table.bag=new int[400]();gfc.VBR_seek_table.size=400;}// write dummy VBR tag of all 0's into bitstream var buffer=new_byte(MAXFRAMESIZE);setLameTagFrameHeader(gfp,buffer);var n=gfc.VBR_seek_table.TotalFrameSize;for(var i=0;i>8^crc16Lookup[tmp&0xff];return crc;}this.updateMusicCRC=function(crc,buffer,bufferPos,size){for(var i=0;i255?255:gfp.lowpassfreq/100.0+.5);var peakSignalAmplitude=0;var radioReplayGain=0;var audiophileReplayGain=0;var noiseShaping=gfp.internal_flags.noise_shaping;var stereoMode=0;var nonOptimal=0;var sourceFreq=0;var misc=0;var musicCRC=0;// psy model type: Gpsycho or NsPsytune var expNPsyTune=(gfp.exp_nspsytune&1)!=0;var safeJoint=(gfp.exp_nspsytune&2)!=0;var noGapMore=false;var noGapPrevious=false;var noGapCount=gfp.internal_flags.nogap_total;var noGapCurr=gfp.internal_flags.nogap_current;// 4 bits var athType=gfp.ATHtype;var flags=0;// vbr modes var abrBitrate;switch(gfp.VBR){case vbr_abr:abrBitrate=gfp.VBR_mean_bitrate_kbps;break;case vbr_off:abrBitrate=gfp.brate;break;default:abrBitrate=gfp.VBR_min_bitrate_kbps;}// revision and vbr method if(gfp.VBR.ordinal()0x1FE)gfc.RadioGain=0x1FE;if(gfc.RadioGain<-0x1FE)gfc.RadioGain=-0x1FE;// set name code radioReplayGain=0x2000;// set originator code to `determined automatically' radioReplayGain|=0xC00;if(gfc.RadioGain>=0){// set gain adjustment radioReplayGain|=gfc.RadioGain;}else{// set the sign bit radioReplayGain|=0x200;// set gain adjustment radioReplayGain|=-gfc.RadioGain;}}// peak sample if(gfc.findPeakSample)peakSignalAmplitude=Math.abs(0|gfc.PeakSample/32767.0*Math.pow(2,23)+.5);// nogap if(noGapCount!=-1){if(noGapCurr>0)noGapPrevious=true;if(noGapCurr48000)sourceFreq=0x03;else{// default is 44100Hz sourceFreq=0x01;}// Check if the user overrided the default LAME behavior with some // nasty options if(gfp.short_blocks==ShortBlock.short_block_forced||gfp.short_blocks==ShortBlock.short_block_dispensed||gfp.lowpassfreq==-1&&gfp.highpassfreq==-1||/* "-k" */gfp.scale_leftgfp.scale_right||gfp.disable_reservoir&&gfp.brate<320||gfp.noATH||gfp.ATHonly||athType==0||gfp.in_samplerate<=32000)nonOptimal=1;misc=noiseShaping+(stereoMode<<2)+(nonOptimal<<5)+(sourceFreq<<6);musicCRC=gfc.nMusicCRC;// Write all this information into the stream createInteger(streamBuffer,streamBufferPos+bytesWritten,quality);bytesWritten+=4;for(var j=0;j<9;j++){streamBuffer[streamBufferPos+bytesWritten+j]=0xff&version.charAt(j);}bytesWritten+=9;streamBuffer[streamBufferPos+bytesWritten]=0xff&revMethod;bytesWritten++;streamBuffer[streamBufferPos+bytesWritten]=0xff&lowpass;bytesWritten++;createInteger(streamBuffer,streamBufferPos+bytesWritten,peakSignalAmplitude);bytesWritten+=4;createShort(streamBuffer,streamBufferPos+bytesWritten,radioReplayGain);bytesWritten+=2;createShort(streamBuffer,streamBufferPos+bytesWritten,audiophileReplayGain);bytesWritten+=2;streamBuffer[streamBufferPos+bytesWritten]=0xff&flags;bytesWritten++;if(abrBitrate>=255)streamBuffer[streamBufferPos+bytesWritten]=0xFF;else streamBuffer[streamBufferPos+bytesWritten]=0xff&abrBitrate;bytesWritten++;streamBuffer[streamBufferPos+bytesWritten]=0xff&encDelay>>4;streamBuffer[streamBufferPos+bytesWritten+1]=0xff&(encDelay<<4)+(encPadding>>8);streamBuffer[streamBufferPos+bytesWritten+2]=0xff&encPadding;bytesWritten+=3;streamBuffer[streamBufferPos+bytesWritten]=0xff&misc;bytesWritten++;// unused in rev0 streamBuffer[streamBufferPos+bytesWritten++]=0;createShort(streamBuffer,streamBufferPos+bytesWritten,gfp.preset);bytesWritten+=2;createInteger(streamBuffer,streamBufferPos+bytesWritten,musicLength);bytesWritten+=4;createShort(streamBuffer,streamBufferPos+bytesWritten,musicCRC);bytesWritten+=2;// Calculate tag CRC.... must be done here, since it includes previous // information for(var i=0;ibuffer.length){return-1;}if(bytes<1){return 0;}// Put it all to disk again stream.write(buffer,0,bytes);// success return 0;};}BitStream.EQ=function(a,b){return Math.abs(a)>Math.abs(b)?Math.abs(a-b)<=Math.abs(a)*1e-6:Math.abs(a-b)<=Math.abs(b)*1e-6;};BitStream.NEQ=function(a,b){return!BitStream.EQ(a,b);};function BitStream(){var self=this;var CRC16_POLYNOMIAL=0x8005;/* * we work with ints, so when doing bit manipulation, we limit ourselves to * MAX_LENGTH-2 just to be on the safe side */var MAX_LENGTH=32;//GainAnalysis ga; //MPGLib mpg; //Version ver; //VBRTag vbr; var ga=null;var mpg=null;var ver=null;var vbr=null;//public final void setModules(GainAnalysis ga, MPGLib mpg, Version ver, // VBRTag vbr) { this.setModules=function(_ga,_mpg,_ver,_vbr){ga=_ga;mpg=_mpg;ver=_ver;vbr=_vbr;};/** * Bit stream buffer. *///private byte[] buf; var buf=null;/** * Bit counter of bit stream. */var totbit=0;/** * Pointer to top byte in buffer. */var bufByteIdx=0;/** * Pointer to top bit of top byte in buffer. */var bufBitIdx=0;/** * compute bitsperframe and mean_bits for a layer III frame */this.getframebits=function(gfp){var gfc=gfp.internal_flags;var bit_rate;/* get bitrate in kbps [?] */if(gfc.bitrate_index!=0)bit_rate=Tables.bitrate_table[gfp.version][gfc.bitrate_index];else bit_rate=gfp.brate;/* main encoding routine toggles padding on and off *//* one Layer3 Slot consists of 8 bits */var bytes=0|(gfp.version+1)*72000*bit_rate/gfp.out_samplerate+gfc.padding;return 8*bytes;};function putheader_bits(gfc){System.arraycopy(gfc.header[gfc.w_ptr].buf,0,buf,bufByteIdx,gfc.sideinfo_len);bufByteIdx+=gfc.sideinfo_len;totbit+=gfc.sideinfo_len*8;gfc.w_ptr=gfc.w_ptr+1&LameInternalFlags.MAX_HEADER_BUF-1;}/** * write j bits into the bit stream */function putbits2(gfc,val,j){while(j>0){var k;if(bufBitIdx==0){bufBitIdx=8;bufByteIdx++;if(gfc.header[gfc.w_ptr].write_timing==totbit){putheader_bits(gfc);}buf[bufByteIdx]=0;}k=Math.min(j,bufBitIdx);j-=k;bufBitIdx-=k;/* 32 too large on 32 bit machines */buf[bufByteIdx]|=val>>j<0){var k;if(bufBitIdx==0){bufBitIdx=8;bufByteIdx++;buf[bufByteIdx]=0;}k=Math.min(j,bufBitIdx);j-=k;bufBitIdx-=k;/* 32 too large on 32 bit machines */buf[bufByteIdx]|=val>>j<=8){putbits2(gfc,0x4c,8);remainingBits-=8;}if(remainingBits>=8){putbits2(gfc,0x41,8);remainingBits-=8;}if(remainingBits>=8){putbits2(gfc,0x4d,8);remainingBits-=8;}if(remainingBits>=8){putbits2(gfc,0x45,8);remainingBits-=8;}if(remainingBits>=32){var version=ver.getLameShortVersion();if(remainingBits>=32)for(i=0;i=8;++i){remainingBits-=8;putbits2(gfc,version.charAt(i),8);}}for(;remainingBits>=1;remainingBits-=1){putbits2(gfc,gfc.ancillary_flag,1);gfc.ancillary_flag^=!gfp.disable_reservoir?1:0;}}/** * write N bits into the header */function writeheader(gfc,val,j){var ptr=gfc.header[gfc.h_ptr].ptr;while(j>0){var k=Math.min(j,8-(ptr&7));j-=k;/* >> 32 too large for 32 bit machines */gfc.header[gfc.h_ptr].buf[ptr>>3]|=val>>j<<8-(ptr&7)-k;ptr+=k;}gfc.header[gfc.h_ptr].ptr=ptr;}function CRC_update(value,crc){value<<=8;for(var i=0;i<8;i++){value<<=1;crc<<=1;if(((crc^value)&0x10000)!=0)crc^=CRC16_POLYNOMIAL;}return crc;}this.CRC_writeheader=function(gfc,header){var crc=0xffff;/* (jo) init crc16 for error_protection */crc=CRC_update(header[2]&0xff,crc);crc=CRC_update(header[3]&0xff,crc);for(var i=6;i>8);header[5]=byte(crc&255);};function encodeSideInfo2(gfp,bitsPerFrame){var gfc=gfp.internal_flags;var l3_side;var gr,ch;l3_side=gfc.l3_side;gfc.header[gfc.h_ptr].ptr=0;Arrays.fill(gfc.header[gfc.h_ptr].buf,0,gfc.sideinfo_len,0);if(gfp.out_samplerate<16000)writeheader(gfc,0xffe,12);else writeheader(gfc,0xfff,12);writeheader(gfc,gfp.version,1);writeheader(gfc,4-3,2);writeheader(gfc,!gfp.error_protection?1:0,1);writeheader(gfc,gfc.bitrate_index,4);writeheader(gfc,gfc.samplerate_index,2);writeheader(gfc,gfc.padding,1);writeheader(gfc,gfp.extension,1);writeheader(gfc,gfp.mode.ordinal(),2);writeheader(gfc,gfc.mode_ext,2);writeheader(gfc,gfp.copyright,1);writeheader(gfc,gfp.original,1);writeheader(gfc,gfp.emphasis,2);if(gfp.error_protection){writeheader(gfc,0,16);/* dummy */}if(gfp.version==1){/* MPEG1 */writeheader(gfc,l3_side.main_data_begin,9);if(gfc.channels_out==2)writeheader(gfc,l3_side.private_bits,3);else writeheader(gfc,l3_side.private_bits,5);for(ch=0;ch0;--i){var huffbits=0;var p=0,v;v=gi.l3_enc[ix+0];if(v!=0){p+=8;if(gi.xr[xr+0]<0)huffbits++;}v=gi.l3_enc[ix+1];if(v!=0){p+=4;huffbits*=2;if(gi.xr[xr+1]<0)huffbits++;}v=gi.l3_enc[ix+2];if(v!=0){p+=2;huffbits*=2;if(gi.xr[xr+2]<0)huffbits++;}v=gi.l3_enc[ix+3];if(v!=0){p++;huffbits*=2;if(gi.xr[xr+3]<0)huffbits++;}ix+=4;xr+=4;putbits2(gfc,huffbits+h.table[p],h.hlen[p]);bits+=h.hlen[p];}return bits;}/** * Implements the pseudocode of page 98 of the IS */function Huffmancode(gfc,tableindex,start,end,gi){var h=Tables.ht[tableindex];var bits=0;if(0==tableindex)return bits;for(var i=start;i15){/* use ESC-words */if(x1>14){var linbits_x1=x1-15;ext|=linbits_x1<<1;xbits=linbits;x1=15;}if(x2>14){var linbits_x2=x2-15;ext<<=linbits;ext|=linbits_x2;xbits+=linbits;x2=15;}xlen=16;}if(x2!=0){ext<<=1;if(gi.xr[i+1]<0)ext++;cbits--;}x1=x1*xlen+x2;xbits-=cbits;cbits+=h.hlen[x1];putbits2(gfc,h.table[x1],cbits);putbits2(gfc,ext,xbits);bits+=cbits+xbits;}return bits;}/** * Note the discussion of huffmancodebits() on pages 28 and 29 of the IS, as * well as the definitions of the side information on pages 26 and 27. */function ShortHuffmancodebits(gfc,gi){var region1Start=3*gfc.scalefac_band.s[3];if(region1Start>gi.big_values)region1Start=gi.big_values;/* short blocks do not have a region2 */var bits=Huffmancode(gfc,gi.table_select[0],0,region1Start,gi);bits+=Huffmancode(gfc,gi.table_select[1],region1Start,gi.big_values,gi);return bits;}function LongHuffmancodebits(gfc,gi){var bigvalues,bits;var region1Start,region2Start;bigvalues=gi.big_values;var i=gi.region0_count+1;region1Start=gfc.scalefac_band.l[i];i+=gi.region1_count+1;region2Start=gfc.scalefac_band.l[i];if(region1Start>bigvalues)region1Start=bigvalues;if(region2Start>bigvalues)region2Start=bigvalues;bits=Huffmancode(gfc,gi.table_select[0],0,region1Start,gi);bits+=Huffmancode(gfc,gi.table_select[1],region1Start,region2Start,gi);bits+=Huffmancode(gfc,gi.table_select[2],region2Start,bigvalues,gi);return bits;}function writeMainData(gfp){var gr,ch,sfb,data_bits,tot_bits=0;var gfc=gfp.internal_flags;var l3_side=gfc.l3_side;if(gfp.version==1){/* MPEG 1 */for(gr=0;gr<2;gr++){for(ch=0;ch=0){/* if flushbits >= 0, some headers have not yet been written *//* reduce flushbits by the size of the headers */remaining_headers=1+last_ptr-first_ptr;if(last_ptr0){/* clipping occurs */if(EQ(gfp.scale,1.0)||EQ(gfp.scale,0.0))gfc.noclipScale=Math.floor(32767.0/gfc.PeakSample*100.0)/100.0;/* round down */else{/* * the user specified his own scaling factor. We could * suggest the scaling factor of * (32767.0/gfp.PeakSample)*(gfp.scale) but it's usually * very inaccurate. So we'd rather not advice him on the * scaling factor. */gfc.noclipScale=-1;}}else/* no clipping */gfc.noclipScale=-1;}};this.add_dummy_byte=function(gfp,val,n){var gfc=gfp.internal_flags;var i;while(n-->0){putbits_noheaders(gfc,val,8);for(i=0;i ResvSize");}/* * compare main_data_begin for the next frame with what we think the * resvsize is: */if(l3_side.main_data_begin*8!=gfc.ResvSize){System.err.printf("bit reservoir error: \n"+"l3_side.main_data_begin: %d \n"+"Resvoir size: %d \n"+"resv drain (post) %d \n"+"resv drain (pre) %d \n"+"header and sideinfo: %d \n"+"data bits: %d \n"+"total bits: %d (remainder: %d) \n"+"bitsperframe: %d \n",8*l3_side.main_data_begin,gfc.ResvSize,l3_side.resvDrain_post,l3_side.resvDrain_pre,8*gfc.sideinfo_len,bits-l3_side.resvDrain_post-8*gfc.sideinfo_len,bits,bits%8,bitsPerFrame);System.err.println("This is a fatal error. It has several possible causes:");System.err.println("90%% LAME compiled with buggy version of gcc using advanced optimizations");System.err.println(" 9%% Your system is overclocked");System.err.println(" 1%% bug in LAME encoding library");gfc.ResvSize=l3_side.main_data_begin*8;}//; if(totbit>1000000000){/* * to avoid totbit overflow, (at 8h encoding at 128kbs) lets reset * bit counter */var i;for(i=0;i * copy data out of the internal MP3 bit buffer into a user supplied * unsigned char buffer. * * mp3data=0 indicates data in buffer is an id3tags and VBR tags * mp3data=1 data is real mp3 frame data. * */this.copy_buffer=function(gfc,buffer,bufferPos,size,mp3data){var minimum=bufByteIdx+1;if(minimum<=0)return 0;if(size!=0&&minimum>size){/* buffer is too small */return-1;}System.arraycopy(buf,0,buffer,bufferPos,minimum);bufByteIdx=-1;bufBitIdx=0;if(mp3data!=0){var crc=new_int(1);crc[0]=gfc.nMusicCRC;vbr.updateMusicCRC(crc,buffer,bufferPos,minimum);gfc.nMusicCRC=crc[0];/** * sum number of bytes belonging to the mp3 stream this info will be * written into the Xing/LAME header for seeking */if(minimum>0){gfc.VBR_seek_table.nBytesWritten+=minimum;}if(gfc.decode_on_the_fly){/* decode the frame */var pcm_buf=new_float_n([2,1152]);var mp3_in=minimum;var samples_out=-1;var i;/* re-synthesis to pcm. Repeat until we get a samples_out=0 */while(samples_out!=0){samples_out=mpg.hip_decode1_unclipped(gfc.hip,buffer,bufferPos,mp3_in,pcm_buf[0],pcm_buf[1]);/* * samples_out = 0: need more data to decode samples_out = * -1: error. Lets assume 0 pcm output samples_out = number * of samples output *//* * set the lenght of the mp3 input buffer to zero, so that * in the next iteration of the loop we will be querying * mpglib about buffered data */mp3_in=0;if(samples_out==-1){/* * error decoding. Not fatal, but might screw up the * ReplayGain tag. What should we do? Ignore for now */samples_out=0;}if(samples_out>0){/* process the PCM data *//* * this should not be possible, and indicates we have * overflown the pcm_buf buffer */if(gfc.findPeakSample){for(i=0;igfc.PeakSample)gfc.PeakSample=pcm_buf[0][i];else if(-pcm_buf[0][i]>gfc.PeakSample)gfc.PeakSample=-pcm_buf[0][i];}if(gfc.channels_out>1)for(i=0;igfc.PeakSample)gfc.PeakSample=pcm_buf[1][i];else if(-pcm_buf[1][i]>gfc.PeakSample)gfc.PeakSample=-pcm_buf[1][i];}}if(gfc.findReplayGain)if(ga.AnalyzeSamples(gfc.rgdata,pcm_buf[0],0,pcm_buf[1],0,samples_out,gfc.channels_out)==GainAnalysis.GAIN_ANALYSIS_ERROR)return-6;}/* if (samples_out>0) */}/* while (samples_out!=0) */}/* if (gfc.decode_on_the_fly) */}/* if (mp3data) */return minimum;};this.init_bit_stream_w=function(gfc){buf=new_byte(Lame.LAME_MAXMP3BUFFER);gfc.h_ptr=gfc.w_ptr=0;gfc.header[gfc.h_ptr].write_timing=0;bufByteIdx=-1;bufBitIdx=0;totbit=0;};// From machine.h }function HuffCodeTab(len,max,tab,hl){this.xlen=len;this.linmax=max;this.table=tab;this.hlen=hl;}var Tables={};Tables.t1HB=[1,1,1,0];Tables.t2HB=[1,2,1,3,1,1,3,2,0];Tables.t3HB=[3,2,1,1,1,1,3,2,0];Tables.t5HB=[1,2,6,5,3,1,4,4,7,5,7,1,6,1,1,0];Tables.t6HB=[7,3,5,1,6,2,3,2,5,4,4,1,3,3,2,0];Tables.t7HB=[1,2,10,19,16,10,3,3,7,10,5,3,11,4,13,17,8,4,12,11,18,15,11,2,7,6,9,14,3,1,6,4,5,3,2,0];Tables.t8HB=[3,4,6,18,12,5,5,1,2,16,9,3,7,3,5,14,7,3,19,17,15,13,10,4,13,5,8,11,5,1,12,4,4,1,1,0];Tables.t9HB=[7,5,9,14,15,7,6,4,5,5,6,7,7,6,8,8,8,5,15,6,9,10,5,1,11,7,9,6,4,1,14,4,6,2,6,0];Tables.t10HB=[1,2,10,23,35,30,12,17,3,3,8,12,18,21,12,7,11,9,15,21,32,40,19,6,14,13,22,34,46,23,18,7,20,19,33,47,27,22,9,3,31,22,41,26,21,20,5,3,14,13,10,11,16,6,5,1,9,8,7,8,4,4,2,0];Tables.t11HB=[3,4,10,24,34,33,21,15,5,3,4,10,32,17,11,10,11,7,13,18,30,31,20,5,25,11,19,59,27,18,12,5,35,33,31,58,30,16,7,5,28,26,32,19,17,15,8,14,14,12,9,13,14,9,4,1,11,4,6,6,6,3,2,0];Tables.t12HB=[9,6,16,33,41,39,38,26,7,5,6,9,23,16,26,11,17,7,11,14,21,30,10,7,17,10,15,12,18,28,14,5,32,13,22,19,18,16,9,5,40,17,31,29,17,13,4,2,27,12,11,15,10,7,4,1,27,12,8,12,6,3,1,0];Tables.t13HB=[1,5,14,21,34,51,46,71,42,52,68,52,67,44,43,19,3,4,12,19,31,26,44,33,31,24,32,24,31,35,22,14,15,13,23,36,59,49,77,65,29,40,30,40,27,33,42,16,22,20,37,61,56,79,73,64,43,76,56,37,26,31,25,14,35,16,60,57,97,75,114,91,54,73,55,41,48,53,23,24,58,27,50,96,76,70,93,84,77,58,79,29,74,49,41,17,47,45,78,74,115,94,90,79,69,83,71,50,59,38,36,15,72,34,56,95,92,85,91,90,86,73,77,65,51,44,43,42,43,20,30,44,55,78,72,87,78,61,46,54,37,30,20,16,53,25,41,37,44,59,54,81,66,76,57,54,37,18,39,11,35,33,31,57,42,82,72,80,47,58,55,21,22,26,38,22,53,25,23,38,70,60,51,36,55,26,34,23,27,14,9,7,34,32,28,39,49,75,30,52,48,40,52,28,18,17,9,5,45,21,34,64,56,50,49,45,31,19,12,15,10,7,6,3,48,23,20,39,36,35,53,21,16,23,13,10,6,1,4,2,16,15,17,27,25,20,29,11,17,12,16,8,1,1,0,1];Tables.t15HB=[7,12,18,53,47,76,124,108,89,123,108,119,107,81,122,63,13,5,16,27,46,36,61,51,42,70,52,83,65,41,59,36,19,17,15,24,41,34,59,48,40,64,50,78,62,80,56,33,29,28,25,43,39,63,55,93,76,59,93,72,54,75,50,29,52,22,42,40,67,57,95,79,72,57,89,69,49,66,46,27,77,37,35,66,58,52,91,74,62,48,79,63,90,62,40,38,125,32,60,56,50,92,78,65,55,87,71,51,73,51,70,30,109,53,49,94,88,75,66,122,91,73,56,42,64,44,21,25,90,43,41,77,73,63,56,92,77,66,47,67,48,53,36,20,71,34,67,60,58,49,88,76,67,106,71,54,38,39,23,15,109,53,51,47,90,82,58,57,48,72,57,41,23,27,62,9,86,42,40,37,70,64,52,43,70,55,42,25,29,18,11,11,118,68,30,55,50,46,74,65,49,39,24,16,22,13,14,7,91,44,39,38,34,63,52,45,31,52,28,19,14,8,9,3,123,60,58,53,47,43,32,22,37,24,17,12,15,10,2,1,71,37,34,30,28,20,17,26,21,16,10,6,8,6,2,0];Tables.t16HB=[1,5,14,44,74,63,110,93,172,149,138,242,225,195,376,17,3,4,12,20,35,62,53,47,83,75,68,119,201,107,207,9,15,13,23,38,67,58,103,90,161,72,127,117,110,209,206,16,45,21,39,69,64,114,99,87,158,140,252,212,199,387,365,26,75,36,68,65,115,101,179,164,155,264,246,226,395,382,362,9,66,30,59,56,102,185,173,265,142,253,232,400,388,378,445,16,111,54,52,100,184,178,160,133,257,244,228,217,385,366,715,10,98,48,91,88,165,157,148,261,248,407,397,372,380,889,884,8,85,84,81,159,156,143,260,249,427,401,392,383,727,713,708,7,154,76,73,141,131,256,245,426,406,394,384,735,359,710,352,11,139,129,67,125,247,233,229,219,393,743,737,720,885,882,439,4,243,120,118,115,227,223,396,746,742,736,721,712,706,223,436,6,202,224,222,218,216,389,386,381,364,888,443,707,440,437,1728,4,747,211,210,208,370,379,734,723,714,1735,883,877,876,3459,865,2,377,369,102,187,726,722,358,711,709,866,1734,871,3458,870,434,0,12,10,7,11,10,17,11,9,13,12,10,7,5,3,1,3];Tables.t24HB=[15,13,46,80,146,262,248,434,426,669,653,649,621,517,1032,88,14,12,21,38,71,130,122,216,209,198,327,345,319,297,279,42,47,22,41,74,68,128,120,221,207,194,182,340,315,295,541,18,81,39,75,70,134,125,116,220,204,190,178,325,311,293,271,16,147,72,69,135,127,118,112,210,200,188,352,323,306,285,540,14,263,66,129,126,119,114,214,202,192,180,341,317,301,281,262,12,249,123,121,117,113,215,206,195,185,347,330,308,291,272,520,10,435,115,111,109,211,203,196,187,353,332,313,298,283,531,381,17,427,212,208,205,201,193,186,177,169,320,303,286,268,514,377,16,335,199,197,191,189,181,174,333,321,305,289,275,521,379,371,11,668,184,183,179,175,344,331,314,304,290,277,530,383,373,366,10,652,346,171,168,164,318,309,299,287,276,263,513,375,368,362,6,648,322,316,312,307,302,292,284,269,261,512,376,370,364,359,4,620,300,296,294,288,282,273,266,515,380,374,369,365,361,357,2,1033,280,278,274,267,264,259,382,378,372,367,363,360,358,356,0,43,20,19,17,15,13,11,9,7,6,4,7,5,3,1,3];Tables.t32HB=[1<<0,5<<1,4<<1,5<<2,6<<1,5<<2,4<<2,4<<3,7<<1,3<<2,6<<2,0<<3,7<<2,2<<3,3<<3,1<<4];Tables.t33HB=[15<<0,14<<1,13<<1,12<<2,11<<1,10<<2,9<<2,8<<3,7<<1,6<<2,5<<2,4<<3,3<<2,2<<3,1<<3,0<<4];Tables.t1l=[1,4,3,5];Tables.t2l=[1,4,7,4,5,7,6,7,8];Tables.t3l=[2,3,7,4,4,7,6,7,8];Tables.t5l=[1,4,7,8,4,5,8,9,7,8,9,10,8,8,9,10];Tables.t6l=[3,4,6,8,4,4,6,7,5,6,7,8,7,7,8,9];Tables.t7l=[1,4,7,9,9,10,4,6,8,9,9,10,7,7,9,10,10,11,8,9,10,11,11,11,8,9,10,11,11,12,9,10,11,12,12,12];Tables.t8l=[2,4,7,9,9,10,4,4,6,10,10,10,7,6,8,10,10,11,9,10,10,11,11,12,9,9,10,11,12,12,10,10,11,11,13,13];Tables.t9l=[3,4,6,7,9,10,4,5,6,7,8,10,5,6,7,8,9,10,7,7,8,9,9,10,8,8,9,9,10,11,9,9,10,10,11,11];Tables.t10l=[1,4,7,9,10,10,10,11,4,6,8,9,10,11,10,10,7,8,9,10,11,12,11,11,8,9,10,11,12,12,11,12,9,10,11,12,12,12,12,12,10,11,12,12,13,13,12,13,9,10,11,12,12,12,13,13,10,10,11,12,12,13,13,13];Tables.t11l=[2,4,6,8,9,10,9,10,4,5,6,8,10,10,9,10,6,7,8,9,10,11,10,10,8,8,9,11,10,12,10,11,9,10,10,11,11,12,11,12,9,10,11,12,12,13,12,13,9,9,9,10,11,12,12,12,9,9,10,11,12,12,12,12];Tables.t12l=[4,4,6,8,9,10,10,10,4,5,6,7,9,9,10,10,6,6,7,8,9,10,9,10,7,7,8,8,9,10,10,10,8,8,9,9,10,10,10,11,9,9,10,10,10,11,10,11,9,9,9,10,10,11,11,12,10,10,10,11,11,11,11,12];Tables.t13l=[1,5,7,8,9,10,10,11,10,11,12,12,13,13,14,14,4,6,8,9,10,10,11,11,11,11,12,12,13,14,14,14,7,8,9,10,11,11,12,12,11,12,12,13,13,14,15,15,8,9,10,11,11,12,12,12,12,13,13,13,13,14,15,15,9,9,11,11,12,12,13,13,12,13,13,14,14,15,15,16,10,10,11,12,12,12,13,13,13,13,14,13,15,15,16,16,10,11,12,12,13,13,13,13,13,14,14,14,15,15,16,16,11,11,12,13,13,13,14,14,14,14,15,15,15,16,18,18,10,10,11,12,12,13,13,14,14,14,14,15,15,16,17,17,11,11,12,12,13,13,13,15,14,15,15,16,16,16,18,17,11,12,12,13,13,14,14,15,14,15,16,15,16,17,18,19,12,12,12,13,14,14,14,14,15,15,15,16,17,17,17,18,12,13,13,14,14,15,14,15,16,16,17,17,17,18,18,18,13,13,14,15,15,15,16,16,16,16,16,17,18,17,18,18,14,14,14,15,15,15,17,16,16,19,17,17,17,19,18,18,13,14,15,16,16,16,17,16,17,17,18,18,21,20,21,18];Tables.t15l=[3,5,6,8,8,9,10,10,10,11,11,12,12,12,13,14,5,5,7,8,9,9,10,10,10,11,11,12,12,12,13,13,6,7,7,8,9,9,10,10,10,11,11,12,12,13,13,13,7,8,8,9,9,10,10,11,11,11,12,12,12,13,13,13,8,8,9,9,10,10,11,11,11,11,12,12,12,13,13,13,9,9,9,10,10,10,11,11,11,11,12,12,13,13,13,14,10,9,10,10,10,11,11,11,11,12,12,12,13,13,14,14,10,10,10,11,11,11,11,12,12,12,12,12,13,13,13,14,10,10,10,11,11,11,11,12,12,12,12,13,13,14,14,14,10,10,11,11,11,11,12,12,12,13,13,13,13,14,14,14,11,11,11,11,12,12,12,12,12,13,13,13,13,14,15,14,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,15,12,12,11,12,12,12,13,13,13,13,13,13,14,14,15,15,12,12,12,12,12,13,13,13,13,14,14,14,14,14,15,15,13,13,13,13,13,13,13,13,14,14,14,14,15,15,14,15,13,13,13,13,13,13,13,14,14,14,14,14,15,15,15,15];Tables.t16_5l=[1,5,7,9,10,10,11,11,12,12,12,13,13,13,14,11,4,6,8,9,10,11,11,11,12,12,12,13,14,13,14,11,7,8,9,10,11,11,12,12,13,12,13,13,13,14,14,12,9,9,10,11,11,12,12,12,13,13,14,14,14,15,15,13,10,10,11,11,12,12,13,13,13,14,14,14,15,15,15,12,10,10,11,11,12,13,13,14,13,14,14,15,15,15,16,13,11,11,11,12,13,13,13,13,14,14,14,14,15,15,16,13,11,11,12,12,13,13,13,14,14,15,15,15,15,17,17,13,11,12,12,13,13,13,14,14,15,15,15,15,16,16,16,13,12,12,12,13,13,14,14,15,15,15,15,16,15,16,15,14,12,13,12,13,14,14,14,14,15,16,16,16,17,17,16,13,13,13,13,13,14,14,15,16,16,16,16,16,16,15,16,14,13,14,14,14,14,15,15,15,15,17,16,16,16,16,18,14,15,14,14,14,15,15,16,16,16,18,17,17,17,19,17,14,14,15,13,14,16,16,15,16,16,17,18,17,19,17,16,14,11,11,11,12,12,13,13,13,14,14,14,14,14,14,14,12];Tables.t16l=[1,5,7,9,10,10,11,11,12,12,12,13,13,13,14,10,4,6,8,9,10,11,11,11,12,12,12,13,14,13,14,10,7,8,9,10,11,11,12,12,13,12,13,13,13,14,14,11,9,9,10,11,11,12,12,12,13,13,14,14,14,15,15,12,10,10,11,11,12,12,13,13,13,14,14,14,15,15,15,11,10,10,11,11,12,13,13,14,13,14,14,15,15,15,16,12,11,11,11,12,13,13,13,13,14,14,14,14,15,15,16,12,11,11,12,12,13,13,13,14,14,15,15,15,15,17,17,12,11,12,12,13,13,13,14,14,15,15,15,15,16,16,16,12,12,12,12,13,13,14,14,15,15,15,15,16,15,16,15,13,12,13,12,13,14,14,14,14,15,16,16,16,17,17,16,12,13,13,13,13,14,14,15,16,16,16,16,16,16,15,16,13,13,14,14,14,14,15,15,15,15,17,16,16,16,16,18,13,15,14,14,14,15,15,16,16,16,18,17,17,17,19,17,13,14,15,13,14,16,16,15,16,16,17,18,17,19,17,16,13,10,10,10,11,11,12,12,12,13,13,13,13,13,13,13,10];Tables.t24l=[4,5,7,8,9,10,10,11,11,12,12,12,12,12,13,10,5,6,7,8,9,10,10,11,11,11,12,12,12,12,12,10,7,7,8,9,9,10,10,11,11,11,11,12,12,12,13,9,8,8,9,9,10,10,10,11,11,11,11,12,12,12,12,9,9,9,9,10,10,10,10,11,11,11,12,12,12,12,13,9,10,9,10,10,10,10,11,11,11,11,12,12,12,12,12,9,10,10,10,10,10,11,11,11,11,12,12,12,12,12,13,9,11,10,10,10,11,11,11,11,12,12,12,12,12,13,13,10,11,11,11,11,11,11,11,11,11,12,12,12,12,13,13,10,11,11,11,11,11,11,11,12,12,12,12,12,13,13,13,10,12,11,11,11,11,12,12,12,12,12,12,13,13,13,13,10,12,12,11,11,11,12,12,12,12,12,12,13,13,13,13,10,12,12,12,12,12,12,12,12,12,12,13,13,13,13,13,10,12,12,12,12,12,12,12,12,13,13,13,13,13,13,13,10,13,12,12,12,12,12,12,13,13,13,13,13,13,13,13,10,9,9,9,9,9,9,9,9,9,9,9,10,10,10,10,6];Tables.t32l=[1+0,4+1,4+1,5+2,4+1,6+2,5+2,6+3,4+1,5+2,5+2,6+3,5+2,6+3,6+3,6+4];Tables.t33l=[4+0,4+1,4+1,4+2,4+1,4+2,4+2,4+3,4+1,4+2,4+2,4+3,4+2,4+3,4+3,4+4];Tables.ht=[/* xlen, linmax, table, hlen */new HuffCodeTab(0,0,null,null),new HuffCodeTab(2,0,Tables.t1HB,Tables.t1l),new HuffCodeTab(3,0,Tables.t2HB,Tables.t2l),new HuffCodeTab(3,0,Tables.t3HB,Tables.t3l),new HuffCodeTab(0,0,null,null),/* Apparently not used */new HuffCodeTab(4,0,Tables.t5HB,Tables.t5l),new HuffCodeTab(4,0,Tables.t6HB,Tables.t6l),new HuffCodeTab(6,0,Tables.t7HB,Tables.t7l),new HuffCodeTab(6,0,Tables.t8HB,Tables.t8l),new HuffCodeTab(6,0,Tables.t9HB,Tables.t9l),new HuffCodeTab(8,0,Tables.t10HB,Tables.t10l),new HuffCodeTab(8,0,Tables.t11HB,Tables.t11l),new HuffCodeTab(8,0,Tables.t12HB,Tables.t12l),new HuffCodeTab(16,0,Tables.t13HB,Tables.t13l),new HuffCodeTab(0,0,null,Tables.t16_5l),/* Apparently not used */new HuffCodeTab(16,0,Tables.t15HB,Tables.t15l),new HuffCodeTab(1,1,Tables.t16HB,Tables.t16l),new HuffCodeTab(2,3,Tables.t16HB,Tables.t16l),new HuffCodeTab(3,7,Tables.t16HB,Tables.t16l),new HuffCodeTab(4,15,Tables.t16HB,Tables.t16l),new HuffCodeTab(6,63,Tables.t16HB,Tables.t16l),new HuffCodeTab(8,255,Tables.t16HB,Tables.t16l),new HuffCodeTab(10,1023,Tables.t16HB,Tables.t16l),new HuffCodeTab(13,8191,Tables.t16HB,Tables.t16l),new HuffCodeTab(4,15,Tables.t24HB,Tables.t24l),new HuffCodeTab(5,31,Tables.t24HB,Tables.t24l),new HuffCodeTab(6,63,Tables.t24HB,Tables.t24l),new HuffCodeTab(7,127,Tables.t24HB,Tables.t24l),new HuffCodeTab(8,255,Tables.t24HB,Tables.t24l),new HuffCodeTab(9,511,Tables.t24HB,Tables.t24l),new HuffCodeTab(11,2047,Tables.t24HB,Tables.t24l),new HuffCodeTab(13,8191,Tables.t24HB,Tables.t24l),new HuffCodeTab(0,0,Tables.t32HB,Tables.t32l),new HuffCodeTab(0,0,Tables.t33HB,Tables.t33l)];/** * * for (i = 0; i < 16*16; i++) [ * largetbl[i] = ((ht[16].hlen[i]) << 16) + ht[24].hlen[i]; * ] * * */Tables.largetbl=[0x010004,0x050005,0x070007,0x090008,0x0a0009,0x0a000a,0x0b000a,0x0b000b,0x0c000b,0x0c000c,0x0c000c,0x0d000c,0x0d000c,0x0d000c,0x0e000d,0x0a000a,0x040005,0x060006,0x080007,0x090008,0x0a0009,0x0b000a,0x0b000a,0x0b000b,0x0c000b,0x0c000b,0x0c000c,0x0d000c,0x0e000c,0x0d000c,0x0e000c,0x0a000a,0x070007,0x080007,0x090008,0x0a0009,0x0b0009,0x0b000a,0x0c000a,0x0c000b,0x0d000b,0x0c000b,0x0d000b,0x0d000c,0x0d000c,0x0e000c,0x0e000d,0x0b0009,0x090008,0x090008,0x0a0009,0x0b0009,0x0b000a,0x0c000a,0x0c000a,0x0c000b,0x0d000b,0x0d000b,0x0e000b,0x0e000c,0x0e000c,0x0f000c,0x0f000c,0x0c0009,0x0a0009,0x0a0009,0x0b0009,0x0b000a,0x0c000a,0x0c000a,0x0d000a,0x0d000b,0x0d000b,0x0e000b,0x0e000c,0x0e000c,0x0f000c,0x0f000c,0x0f000d,0x0b0009,0x0a000a,0x0a0009,0x0b000a,0x0b000a,0x0c000a,0x0d000a,0x0d000b,0x0e000b,0x0d000b,0x0e000b,0x0e000c,0x0f000c,0x0f000c,0x0f000c,0x10000c,0x0c0009,0x0b000a,0x0b000a,0x0b000a,0x0c000a,0x0d000a,0x0d000b,0x0d000b,0x0d000b,0x0e000b,0x0e000c,0x0e000c,0x0e000c,0x0f000c,0x0f000c,0x10000d,0x0c0009,0x0b000b,0x0b000a,0x0c000a,0x0c000a,0x0d000b,0x0d000b,0x0d000b,0x0e000b,0x0e000c,0x0f000c,0x0f000c,0x0f000c,0x0f000c,0x11000d,0x11000d,0x0c000a,0x0b000b,0x0c000b,0x0c000b,0x0d000b,0x0d000b,0x0d000b,0x0e000b,0x0e000b,0x0f000b,0x0f000c,0x0f000c,0x0f000c,0x10000c,0x10000d,0x10000d,0x0c000a,0x0c000b,0x0c000b,0x0c000b,0x0d000b,0x0d000b,0x0e000b,0x0e000b,0x0f000c,0x0f000c,0x0f000c,0x0f000c,0x10000c,0x0f000d,0x10000d,0x0f000d,0x0d000a,0x0c000c,0x0d000b,0x0c000b,0x0d000b,0x0e000b,0x0e000c,0x0e000c,0x0e000c,0x0f000c,0x10000c,0x10000c,0x10000d,0x11000d,0x11000d,0x10000d,0x0c000a,0x0d000c,0x0d000c,0x0d000b,0x0d000b,0x0e000b,0x0e000c,0x0f000c,0x10000c,0x10000c,0x10000c,0x10000c,0x10000d,0x10000d,0x0f000d,0x10000d,0x0d000a,0x0d000c,0x0e000c,0x0e000c,0x0e000c,0x0e000c,0x0f000c,0x0f000c,0x0f000c,0x0f000c,0x11000c,0x10000d,0x10000d,0x10000d,0x10000d,0x12000d,0x0d000a,0x0f000c,0x0e000c,0x0e000c,0x0e000c,0x0f000c,0x0f000c,0x10000c,0x10000c,0x10000d,0x12000d,0x11000d,0x11000d,0x11000d,0x13000d,0x11000d,0x0d000a,0x0e000d,0x0f000c,0x0d000c,0x0e000c,0x10000c,0x10000c,0x0f000c,0x10000d,0x10000d,0x11000d,0x12000d,0x11000d,0x13000d,0x11000d,0x10000d,0x0d000a,0x0a0009,0x0a0009,0x0a0009,0x0b0009,0x0b0009,0x0c0009,0x0c0009,0x0c0009,0x0d0009,0x0d0009,0x0d0009,0x0d000a,0x0d000a,0x0d000a,0x0d000a,0x0a0006];/** * * for (i = 0; i < 3*3; i++) [ * table23[i] = ((ht[2].hlen[i]) << 16) + ht[3].hlen[i]; * ] * * */Tables.table23=[0x010002,0x040003,0x070007,0x040004,0x050004,0x070007,0x060006,0x070007,0x080008];/** * * for (i = 0; i < 4*4; i++) [ * table56[i] = ((ht[5].hlen[i]) << 16) + ht[6].hlen[i]; * ] * * */Tables.table56=[0x010003,0x040004,0x070006,0x080008,0x040004,0x050004,0x080006,0x090007,0x070005,0x080006,0x090007,0x0a0008,0x080007,0x080007,0x090008,0x0a0009];Tables.bitrate_table=[[0,8,16,24,32,40,48,56,64,80,96,112,128,144,160,-1],/* MPEG 2 */[0,32,40,48,56,64,80,96,112,128,160,192,224,256,320,-1],/* MPEG 1 */[0,8,16,24,32,40,48,56,64,-1,-1,-1,-1,-1,-1,-1]];/** * MPEG 2, MPEG 1, MPEG 2.5. */Tables.samplerate_table=[[22050,24000,16000,-1],[44100,48000,32000,-1],[11025,12000,8000,-1]];/** * This is the scfsi_band table from 2.4.2.7 of the IS. */Tables.scfsi_band=[0,6,11,16,21];function MeanBits(meanBits){this.bits=meanBits;}//package mp3; function CalcNoiseResult(){/** * sum of quantization noise > masking */this.over_noise=0.;/** * sum of all quantization noise */this.tot_noise=0.;/** * max quantization noise */this.max_noise=0.;/** * number of quantization noise > masking */this.over_count=0;/** * SSD-like cost of distorted bands */this.over_SSD=0;this.bits=0;}function VBRQuantize(){var qupvt;var tak;this.setModules=function(_qupvt,_tk){qupvt=_qupvt;tak=_tk;};//TODO }/** * ATH related stuff, if something new ATH related has to be added, please plug * it here into the ATH. */function ATH(){/** * Method for the auto adjustment. */this.useAdjust=0;/** * factor for tuning the (sample power) point below which adaptive threshold * of hearing adjustment occurs */this.aaSensitivityP=0.;/** * Lowering based on peak volume, 1 = no lowering. */this.adjust=0.;/** * Limit for dynamic ATH adjust. */this.adjustLimit=0.;/** * Determined to lower x dB each second. */this.decay=0.;/** * Lowest ATH value. */this.floor=0.;/** * ATH for sfbs in long blocks. */this.l=new_float(Encoder.SBMAX_l);/** * ATH for sfbs in short blocks. */this.s=new_float(Encoder.SBMAX_s);/** * ATH for partitioned sfb21 in long blocks. */this.psfb21=new_float(Encoder.PSFB21);/** * ATH for partitioned sfb12 in short blocks. */this.psfb12=new_float(Encoder.PSFB12);/** * ATH for long block convolution bands. */this.cb_l=new_float(Encoder.CBANDS);/** * ATH for short block convolution bands. */this.cb_s=new_float(Encoder.CBANDS);/** * Equal loudness weights (based on ATH). */this.eql_w=new_float(Encoder.BLKSIZE/2);}function LameGlobalFlags(){this.class_id=0;/* input description *//** * number of samples. default=-1 */this.num_samples=0;/** * input number of channels. default=2 */this.num_channels=0;/** * input_samp_rate in Hz. default=44.1 kHz */this.in_samplerate=0;/** * output_samp_rate. default: LAME picks best value at least not used for * MP3 decoding: Remember 44.1 kHz MP3s and AC97 */this.out_samplerate=0;/** * scale input by this amount before encoding at least not used for MP3 * decoding */this.scale=0.;/** * scale input of channel 0 (left) by this amount before encoding */this.scale_left=0.;/** * scale input of channel 1 (right) by this amount before encoding */this.scale_right=0.;/* general control params *//** * collect data for a MP3 frame analyzer? */this.analysis=false;/** * add Xing VBR tag? */this.bWriteVbrTag=false;/** * use lame/mpglib to convert mp3 to wav */this.decode_only=false;/** * quality setting 0=best, 9=worst default=5 */this.quality=0;/** * see enum default = LAME picks best value */this.mode=MPEGMode.STEREO;/** * force M/S mode. requires mode=1 */this.force_ms=false;/** * use free format? default=0 */this.free_format=false;/** * find the RG value? default=0 */this.findReplayGain=false;/** * decode on the fly? default=0 */this.decode_on_the_fly=false;/** * 1 (default) writes ID3 tags, 0 not */this.write_id3tag_automatic=false;/* * set either brate>0 or compression_ratio>0, LAME will compute the value of * the variable not set. Default is compression_ratio = 11.025 *//** * bitrate */this.brate=0;/** * sizeof(wav file)/sizeof(mp3 file) */this.compression_ratio=0.;/* frame params *//** * mark as copyright. default=0 */this.copyright=0;/** * mark as original. default=1 */this.original=0;/** * the MP3 'private extension' bit. Meaningless */this.extension=0;/** * Input PCM is emphased PCM (for instance from one of the rarely emphased * CDs), it is STRONGLY not recommended to use this, because psycho does not * take it into account, and last but not least many decoders don't care * about these bits */this.emphasis=0;/** * use 2 bytes per frame for a CRC checksum. default=0 */this.error_protection=0;/** * enforce ISO spec as much as possible */this.strict_ISO=false;/** * use bit reservoir? */this.disable_reservoir=false;/* quantization/noise shaping */this.quant_comp=0;this.quant_comp_short=0;this.experimentalY=false;this.experimentalZ=0;this.exp_nspsytune=0;this.preset=0;/* VBR control */this.VBR=null;/** * Range [0,...,1[ */this.VBR_q_frac=0.;/** * Range [0,...,9] */this.VBR_q=0;this.VBR_mean_bitrate_kbps=0;this.VBR_min_bitrate_kbps=0;this.VBR_max_bitrate_kbps=0;/** * strictly enforce VBR_min_bitrate normaly, it will be violated for analog * silence */this.VBR_hard_min=0;/* resampling and filtering *//** * freq in Hz. 0=lame choses. -1=no filter */this.lowpassfreq=0;/** * freq in Hz. 0=lame choses. -1=no filter */this.highpassfreq=0;/** * freq width of filter, in Hz (default=15%) */this.lowpasswidth=0;/** * freq width of filter, in Hz (default=15%) */this.highpasswidth=0;/* * psycho acoustics and other arguments which you should not change unless * you know what you are doing */this.maskingadjust=0.;this.maskingadjust_short=0.;/** * only use ATH */this.ATHonly=false;/** * only use ATH for short blocks */this.ATHshort=false;/** * disable ATH */this.noATH=false;/** * select ATH formula */this.ATHtype=0;/** * change ATH formula 4 shape */this.ATHcurve=0.;/** * lower ATH by this many db */this.ATHlower=0.;/** * select ATH auto-adjust scheme */this.athaa_type=0;/** * select ATH auto-adjust loudness calc */this.athaa_loudapprox=0;/** * dB, tune active region of auto-level */this.athaa_sensitivity=0.;this.short_blocks=null;/** * use temporal masking effect */this.useTemporal=false;this.interChRatio=0.;/** * Naoki's adjustment of Mid/Side maskings */this.msfix=0.;/** * 0 off, 1 on */this.tune=false;/** * used to pass values for debugging and stuff */this.tune_value_a=0.;/************************************************************************//* internal variables, do not set... *//* provided because they may be of use to calling application *//************************************************************************//** * 0=MPEG-2/2.5 1=MPEG-1 */this.version=0;this.encoder_delay=0;/** * number of samples of padding appended to input */this.encoder_padding=0;this.framesize=0;/** * number of frames encoded */this.frameNum=0;/** * is this struct owned by calling program or lame? */this.lame_allocated_gfp=0;/**************************************************************************//* more internal variables are stored in this structure: *//**************************************************************************/this.internal_flags=null;}function CBRNewIterationLoop(_quantize){var quantize=_quantize;this.quantize=quantize;this.iteration_loop=function(gfp,pe,ms_ener_ratio,ratio){var gfc=gfp.internal_flags;var l3_xmin=new_float(L3Side.SFBMAX);var xrpow=new_float(576);var targ_bits=new_int(2);var mean_bits=0,max_bits;var l3_side=gfc.l3_side;var mb=new MeanBits(mean_bits);this.quantize.rv.ResvFrameBegin(gfp,mb);mean_bits=mb.bits;/* quantize! */for(var gr=0;gr * minimum possible number of * -cod_info.global_gain + ((scalefac[] + (cod_info.preflag ? pretab[sfb] : 0)) * << (cod_info.scalefac_scale + 1)) + cod_info.subblock_gain[cod_info.window[sfb]] * 8; * * for long block, 0+((15+3)<<2) = 18*4 = 72 * for short block, 0+(15<<2)+7*8 = 15*4+56 = 116 * */var Q_MAX2=QuantizePVT.Q_MAX2;var LARGE_BITS=QuantizePVT.LARGE_BITS;/** * Assuming dynamic range=96dB, this value should be 92 */var NSATHSCALE=100;/** * The following table is used to implement the scalefactor partitioning for * MPEG2 as described in section 2.4.3.2 of the IS. The indexing corresponds * to the way the tables are presented in the IS: * * [table_number][row_in_table][column of nr_of_sfb] */this.nr_of_sfb_block=[[[6,5,5,5],[9,9,9,9],[6,9,9,9]],[[6,5,7,3],[9,9,12,6],[6,9,12,6]],[[11,10,0,0],[18,18,0,0],[15,18,0,0]],[[7,7,7,0],[12,12,12,0],[6,15,12,0]],[[6,6,6,3],[12,9,9,6],[6,12,9,6]],[[8,8,5,0],[15,12,9,0],[6,18,9,0]]];/** * Table B.6: layer3 preemphasis */var pretab=[0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,2,2,3,3,3,2,0];this.pretab=pretab;/** * Here are MPEG1 Table B.8 and MPEG2 Table B.1 -- Layer III scalefactor * bands.
    * Index into this using a method such as:
    * idx = fr_ps.header.sampling_frequency + (fr_ps.header.version * 3) */this.sfBandIndex=[// Table B.2.b: 22.05 kHz new ScaleFac([0,6,12,18,24,30,36,44,54,66,80,96,116,140,168,200,238,284,336,396,464,522,576],[0,4,8,12,18,24,32,42,56,74,100,132,174,192],[0,0,0,0,0,0,0]// sfb21 pseudo sub bands ,[0,0,0,0,0,0,0]// sfb12 pseudo sub bands ),/* Table B.2.c: 24 kHz *//* docs: 332. mpg123(broken): 330 */new ScaleFac([0,6,12,18,24,30,36,44,54,66,80,96,114,136,162,194,232,278,332,394,464,540,576],[0,4,8,12,18,26,36,48,62,80,104,136,180,192],[0,0,0,0,0,0,0]/* sfb21 pseudo sub bands */,[0,0,0,0,0,0,0]/* sfb12 pseudo sub bands */),/* Table B.2.a: 16 kHz */new ScaleFac([0,6,12,18,24,30,36,44,54,66,80,96,116,140,168,200,238,284,336,396,464,522,576],[0,4,8,12,18,26,36,48,62,80,104,134,174,192],[0,0,0,0,0,0,0]/* sfb21 pseudo sub bands */,[0,0,0,0,0,0,0]/* sfb12 pseudo sub bands */),/* Table B.8.b: 44.1 kHz */new ScaleFac([0,4,8,12,16,20,24,30,36,44,52,62,74,90,110,134,162,196,238,288,342,418,576],[0,4,8,12,16,22,30,40,52,66,84,106,136,192],[0,0,0,0,0,0,0]/* sfb21 pseudo sub bands */,[0,0,0,0,0,0,0]/* sfb12 pseudo sub bands */),/* Table B.8.c: 48 kHz */new ScaleFac([0,4,8,12,16,20,24,30,36,42,50,60,72,88,106,128,156,190,230,276,330,384,576],[0,4,8,12,16,22,28,38,50,64,80,100,126,192],[0,0,0,0,0,0,0]/* sfb21 pseudo sub bands */,[0,0,0,0,0,0,0]/* sfb12 pseudo sub bands */),/* Table B.8.a: 32 kHz */new ScaleFac([0,4,8,12,16,20,24,30,36,44,54,66,82,102,126,156,194,240,296,364,448,550,576],[0,4,8,12,16,22,30,42,58,78,104,138,180,192],[0,0,0,0,0,0,0]/* sfb21 pseudo sub bands */,[0,0,0,0,0,0,0]/* sfb12 pseudo sub bands */),/* MPEG-2.5 11.025 kHz */new ScaleFac([0,6,12,18,24,30,36,44,54,66,80,96,116,140,168,200,238,284,336,396,464,522,576],[0/3,12/3,24/3,36/3,54/3,78/3,108/3,144/3,186/3,240/3,312/3,402/3,522/3,576/3],[0,0,0,0,0,0,0]/* sfb21 pseudo sub bands */,[0,0,0,0,0,0,0]/* sfb12 pseudo sub bands */),/* MPEG-2.5 12 kHz */new ScaleFac([0,6,12,18,24,30,36,44,54,66,80,96,116,140,168,200,238,284,336,396,464,522,576],[0/3,12/3,24/3,36/3,54/3,78/3,108/3,144/3,186/3,240/3,312/3,402/3,522/3,576/3],[0,0,0,0,0,0,0]/* sfb21 pseudo sub bands */,[0,0,0,0,0,0,0]/* sfb12 pseudo sub bands */),/* MPEG-2.5 8 kHz */new ScaleFac([0,12,24,36,48,60,72,88,108,132,160,192,232,280,336,400,476,566,568,570,572,574,576],[0/3,24/3,48/3,72/3,108/3,156/3,216/3,288/3,372/3,480/3,486/3,492/3,498/3,576/3],[0,0,0,0,0,0,0]/* sfb21 pseudo sub bands */,[0,0,0,0,0,0,0]/* sfb12 pseudo sub bands */)];var pow20=new_float(Q_MAX+Q_MAX2+1);var ipow20=new_float(Q_MAX);var pow43=new_float(PRECALC_SIZE);var adj43=new_float(PRECALC_SIZE);this.adj43=adj43;/** *
                 * compute the ATH for each scalefactor band cd range: 0..96db
                 *
                 * Input: 3.3kHz signal 32767 amplitude (3.3kHz is where ATH is smallest =
                 * -5db) longblocks: sfb=12 en0/bw=-11db max_en0 = 1.3db shortblocks: sfb=5
                 * -9db 0db
                 *
                 * Input: 1 1 1 1 1 1 1 -1 -1 -1 -1 -1 -1 -1 (repeated) longblocks: amp=1
                 * sfb=12 en0/bw=-103 db max_en0 = -92db amp=32767 sfb=12 -12 db -1.4db
                 *
                 * Input: 1 1 1 1 1 1 1 -1 -1 -1 -1 -1 -1 -1 (repeated) shortblocks: amp=1
                 * sfb=5 en0/bw= -99 -86 amp=32767 sfb=5 -9 db 4db
                 *
                 *
                 * MAX energy of largest wave at 3.3kHz = 1db AVE energy of largest wave at
                 * 3.3kHz = -11db Let's take AVE: -11db = maximum signal in sfb=12. Dynamic
                 * range of CD: 96db. Therefor energy of smallest audible wave in sfb=12 =
                 * -11 - 96 = -107db = ATH at 3.3kHz.
                 *
                 * ATH formula for this wave: -5db. To adjust to LAME scaling, we need ATH =
                 * ATH_formula - 103 (db) ATH = ATH * 2.5e-10 (ener)
                 * 
    */function ATHmdct(gfp,f){var ath=psy.ATHformula(f,gfp);ath-=NSATHSCALE;/* modify the MDCT scaling for the ATH and convert to energy */ath=Math.pow(10.0,ath/10.0+gfp.ATHlower);return ath;}function compute_ath(gfp){var ATH_l=gfp.internal_flags.ATH.l;var ATH_psfb21=gfp.internal_flags.ATH.psfb21;var ATH_s=gfp.internal_flags.ATH.s;var ATH_psfb12=gfp.internal_flags.ATH.psfb12;var gfc=gfp.internal_flags;var samp_freq=gfp.out_samplerate;for(var sfb=0;sfb>2&63;if(i>=32)i-=64;bass=Math.pow(10,i/4.0/10.0);i=gfp.exp_nspsytune>>8&63;if(i>=32)i-=64;alto=Math.pow(10,i/4.0/10.0);i=gfp.exp_nspsytune>>14&63;if(i>=32)i-=64;treble=Math.pow(10,i/4.0/10.0);/* * to be compatible with Naoki's original code, the next 6 bits * define only the amount of changing treble for sfb21 */i=gfp.exp_nspsytune>>20&63;if(i>=32)i-=64;sfb21=treble*Math.pow(10,i/4.0/10.0);for(i=0;i * mt 6/99
    * bugfixes rh 8/01: often allocated more than the allowed 4095 bits */this.on_pe=function(gfp,pe,targ_bits,mean_bits,gr,cbr){var gfc=gfp.internal_flags;var tbits=0,bits;var add_bits=new_int(2);var ch;/* allocate targ_bits for granule */var mb=new MeanBits(tbits);var extra_bits=rv.ResvMaxBits(gfp,mean_bits,mb,cbr);tbits=mb.bits;/* maximum allowed bits for this granule */var max_bits=tbits+extra_bits;if(max_bits>LameInternalFlags.MAX_BITS_PER_GRANULE){// hard limit per granule max_bits=LameInternalFlags.MAX_BITS_PER_GRANULE;}for(bits=0,ch=0;chmean_bits*3/4)add_bits[ch]=mean_bits*3/4;if(add_bits[ch]<0)add_bits[ch]=0;if(add_bits[ch]+targ_bits[ch]>LameInternalFlags.MAX_BITS_PER_CHANNEL)add_bits[ch]=Math.max(0,LameInternalFlags.MAX_BITS_PER_CHANNEL-targ_bits[ch]);bits+=add_bits[ch];}if(bits>extra_bits){for(ch=0;chLameInternalFlags.MAX_BITS_PER_GRANULE){var sum=0;for(ch=0;ch.5)fac=.5;/* number of bits to move from side channel to mid channel *//* move_bits = fac*targ_bits[1]; */var move_bits=0|fac*.5*(targ_bits[0]+targ_bits[1]);if(move_bits>LameInternalFlags.MAX_BITS_PER_CHANNEL-targ_bits[0]){move_bits=LameInternalFlags.MAX_BITS_PER_CHANNEL-targ_bits[0];}if(move_bits<0)move_bits=0;if(targ_bits[1]>=125){/* dont reduce side channel below 125 bits */if(targ_bits[1]-move_bits>125){/* if mid channel already has 2x more than average, dont bother *//* mean_bits = bits per granule (for both channels) */if(targ_bits[0]max_bits){targ_bits[0]=max_bits*targ_bits[0]/move_bits;targ_bits[1]=max_bits*targ_bits[1]/move_bits;}};/** * Robert Hegemann 2001-04-27: * this adjusts the ATH, keeping the original noise floor * affects the higher frequencies more than the lower ones */this.athAdjust=function(a,x,athFloor){/* * work in progress */var o=90.30873362;var p=94.82444863;var u=Util.FAST_LOG10_X(x,10.0);var v=a*a;var w=0.0;u-=athFloor;/* undo scaling */if(v>1E-20)w=1.+Util.FAST_LOG10_X(v,10.0/o);if(w<0)w=0.;u*=w;u+=athFloor+o-p;/* redo scaling */return Math.pow(10.,0.1*u);};/** * Calculate the allowed distortion for each scalefactor band, as determined * by the psychoacoustic model. xmin(sb) = ratio(sb) * en(sb) / bw(sb) * * returns number of sfb's with energy > ATH */this.calc_xmin=function(gfp,ratio,cod_info,pxmin){var pxminPos=0;var gfc=gfp.internal_flags;var gsfb,j=0,ath_over=0;var ATH=gfc.ATH;var xr=cod_info.xr;var enable_athaa_fix=gfp.VBR==VbrMode.vbr_mtrh?1:0;var masking_lower=gfc.masking_lower;if(gfp.VBR==VbrMode.vbr_mtrh||gfp.VBR==VbrMode.vbr_mt){/* was already done in PSY-Model */masking_lower=1.0;}for(gsfb=0;gsfb>1;en0=0.0;do{var xa,xb;xa=xr[j]*xr[j];en0+=xa;rh2+=xa0);if(en0>xmin)ath_over++;if(gsfb==Encoder.SBPSY_l){var x=xmin*gfc.nsPsy.longfact[gsfb];if(rh20.0){var x;x=en0*ratio.thm.l[gsfb]*masking_lower/e;if(enable_athaa_fix!=0)x*=gfc.nsPsy.longfact[gsfb];if(xmin>1;rh1=tmpATH/width;rh2=DBL_EPSILON;do{var xa,xb;xa=xr[j]*xr[j];en0+=xa;rh2+=xa0);if(en0>tmpATH)ath_over++;if(sfb==Encoder.SBPSY_s){var x=tmpATH*gfc.nsPsy.shortfact[sfb];if(rh20.0){var x;x=en0*ratio.thm.s[sfb][b]*masking_lower/e;if(enable_athaa_fix!=0)x*=gfc.nsPsy.shortfact[sfb];if(xminpxmin[pxminPos-3+1])pxmin[pxminPos-3+1]+=(pxmin[pxminPos-3]-pxmin[pxminPos-3+1])*gfc.decay;if(pxmin[pxminPos-3+1]>pxmin[pxminPos-3+2])pxmin[pxminPos-3+2]+=(pxmin[pxminPos-3+1]-pxmin[pxminPos-3+2])*gfc.decay;}}/* end of short block sfb loop */return ath_over;};function StartLine(j){this.s=j;}this.calc_noise_core=function(cod_info,startline,l,step){var noise=0;var j=startline.s;var ix=cod_info.l3_enc;if(j>cod_info.count1){while(l--!=0){var temp;temp=cod_info.xr[j];j++;noise+=temp*temp;temp=cod_info.xr[j];j++;noise+=temp*temp;}}else if(j>cod_info.big_values){var ix01=new_float(2);ix01[0]=0;ix01[1]=step;while(l--!=0){var temp;temp=Math.abs(cod_info.xr[j])-ix01[ix[j]];j++;noise+=temp*temp;temp=Math.abs(cod_info.xr[j])-ix01[ix[j]];j++;noise+=temp*temp;}}else{while(l--!=0){var temp;temp=Math.abs(cod_info.xr[j])-pow43[ix[j]]*step;j++;noise+=temp*temp;temp=Math.abs(cod_info.xr[j])-pow43[ix[j]]*step;j++;noise+=temp*temp;}}startline.s=j;return noise;};/** *
                 * -oo dB  =>  -1.00
                 * - 6 dB  =>  -0.97
                 * - 3 dB  =>  -0.80
                 * - 2 dB  =>  -0.64
                 * - 1 dB  =>  -0.38
                 *   0 dB  =>   0.00
                 * + 1 dB  =>  +0.49
                 * + 2 dB  =>  +1.06
                 * + 3 dB  =>  +1.68
                 * + 6 dB  =>  +3.69
                 * +10 dB  =>  +6.45
                 * 
    */this.calc_noise=function(cod_info,l3_xmin,distort,res,prev_noise){var distortPos=0;var l3_xminPos=0;var sfb,l,over=0;var over_noise_db=0;/* 0 dB relative to masking */var tot_noise_db=0;/* -200 dB relative to masking */var max_noise=-20.0;var j=0;var scalefac=cod_info.scalefac;var scalefacPos=0;res.over_SSD=0;for(sfb=0;sfb>1;if(j+cod_info.width[sfb]>cod_info.max_nonzero_coeff){var usefullsize;usefullsize=cod_info.max_nonzero_coeff-j+1;if(usefullsize>0)l=usefullsize>>1;else l=0;}var sl=new StartLine(j);noise=this.calc_noise_core(cod_info,sl,l,step);j=sl.s;if(prev_noise!=null){/* save noise values */prev_noise.step[sfb]=s;prev_noise.noise[sfb]=noise;}noise=distort[distortPos++]=noise/l3_xmin[l3_xminPos++];/* multiplying here is adding in dB, but can overflow */noise=Util.FAST_LOG10(Math.max(noise,1E-20));if(prev_noise!=null){/* save noise values */prev_noise.noise_log[sfb]=noise;}}if(prev_noise!=null){/* save noise values */prev_noise.global_gain=cod_info.global_gain;}tot_noise_db+=noise;if(noise>0.0){var tmp;tmp=Math.max(0|noise*10+.5,1);res.over_SSD+=tmp*tmp;over++;/* multiplying here is adding in dB -but can overflow *//* over_noise *= noise; */over_noise_db+=noise;}max_noise=Math.max(max_noise,noise);}res.over_count=over;res.tot_noise=tot_noise_db;res.over_noise=over_noise_db;res.max_noise=max_noise;return over;};/** * updates plotting data * * Mark Taylor 2000-??-?? * * Robert Hegemann: moved noise/distortion calc into it */this.set_pinfo=function(gfp,cod_info,ratio,gr,ch){var gfc=gfp.internal_flags;var sfb,sfb2;var l;var en0,en1;var ifqstep=cod_info.scalefac_scale==0?.5:1.0;var scalefac=cod_info.scalefac;var l3_xmin=new_float(L3Side.SFBMAX);var xfsf=new_float(L3Side.SFBMAX);var noise=new CalcNoiseResult();calc_xmin(gfp,ratio,cod_info,l3_xmin);calc_noise(cod_info,l3_xmin,xfsf,noise,null);var j=0;sfb2=cod_info.sfb_lmax;if(cod_info.block_type!=Encoder.SHORT_TYPE&&0==cod_info.mixed_block_flag)sfb2=22;for(sfb=0;sfb0&&!gfp.ATHonly)en0=en0/ratio.en.l[sfb];else en0=0.0;gfc.pinfo.thr[gr][ch][sfb]=en1*Math.max(en0*ratio.thm.l[sfb],gfc.ATH.l[sfb]);/* there is no scalefactor bands >= SBPSY_l */gfc.pinfo.LAMEsfb[gr][ch][sfb]=0;if(cod_info.preflag!=0&&sfb>=11)gfc.pinfo.LAMEsfb[gr][ch][sfb]=-ifqstep*pretab[sfb];if(sfb0)en0=en0/ratio.en.s[sfb][i];else en0=0.0;if(gfp.ATHonly||gfp.ATHshort)en0=0;gfc.pinfo.thr_s[gr][ch][3*sfb+i]=en1*Math.max(en0*ratio.thm.s[sfb][i],gfc.ATH.s[sfb]);/* there is no scalefactor bands >= SBPSY_s */gfc.pinfo.LAMEsfb_s[gr][ch][3*sfb+i]=-2.0*cod_info.subblock_gain[i];if(sfbcod_info.xrpow_max)cod_info.xrpow_max=xrpow[i];}return sum;}this.init_xrpow=function(gfc,cod_info,xrpow){var sum=0;var upper=0|cod_info.max_nonzero_coeff;cod_info.xrpow_max=0;/* * check if there is some energy we have to quantize and calculate xrpow * matching our fresh scalefactors */Arrays.fill(xrpow,upper,576,0);sum=init_xrpow_core(cod_info,xrpow,upper,sum);/* * return 1 if we have something to quantize, else 0 */if(sum>1E-20){var j=0;if((gfc.substep_shaping&2)!=0)j=1;for(var i=0;i * Analog silence detection in partitionned sfb21 or sfb12 for short blocks * * From top to bottom of sfb, changes to 0 coeffs which are below ath. It * stops on the first coeff higher than ath. */function psfb21_analogsilence(gfc,cod_info){var ath=gfc.ATH;var xr=cod_info.xr;if(cod_info.block_type!=Encoder.SHORT_TYPE){/* NORM, START or STOP type, but not SHORT blocks */var stop=false;for(var gsfb=Encoder.PSFB21-1;gsfb>=0&&!stop;gsfb--){var start=gfc.scalefac_band.psfb21[gsfb];var end=gfc.scalefac_band.psfb21[gsfb+1];var ath21=qupvt.athAdjust(ath.adjust,ath.psfb21[gsfb],ath.floor);if(gfc.nsPsy.longfact[21]>1e-12)ath21*=gfc.nsPsy.longfact[21];for(var j=end-1;j>=start;j--){if(Math.abs(xr[j])=0&&!stop;gsfb--){var start=gfc.scalefac_band.s[12]*3+(gfc.scalefac_band.s[13]-gfc.scalefac_band.s[12])*block+(gfc.scalefac_band.psfb12[gsfb]-gfc.scalefac_band.psfb12[0]);var end=start+(gfc.scalefac_band.psfb12[gsfb+1]-gfc.scalefac_band.psfb12[gsfb]);var ath12=qupvt.athAdjust(ath.adjust,ath.psfb12[gsfb],ath.floor);if(gfc.nsPsy.shortfact[12]>1e-12)ath12*=gfc.nsPsy.shortfact[12];for(var j=end-1;j>=start;j--){if(Math.abs(xr[j])desired_rate){/* increase Quantize_StepSize */if(Direction==BinSearchDirection.BINSEARCH_DOWN)flagGoneOver=true;if(flagGoneOver)CurrentStep/=2;Direction=BinSearchDirection.BINSEARCH_UP;step=CurrentStep;}else{/* decrease Quantize_StepSize */if(Direction==BinSearchDirection.BINSEARCH_UP)flagGoneOver=true;if(flagGoneOver)CurrentStep/=2;Direction=BinSearchDirection.BINSEARCH_DOWN;step=-CurrentStep;}cod_info.global_gain+=step;if(cod_info.global_gain<0){cod_info.global_gain=0;flagGoneOver=true;}if(cod_info.global_gain>255){cod_info.global_gain=255;flagGoneOver=true;}}while(nBits>desired_rate&&cod_info.global_gain<255){cod_info.global_gain++;nBits=tk.count_bits(gfc,xrpow,cod_info,null);}gfc.CurrentStep[ch]=start-cod_info.global_gain>=4?4:2;gfc.OldValue[ch]=cod_info.global_gain;cod_info.part2_3_length=nBits;return nBits;}this.trancate_smallspectrums=function(gfc,gi,l3_xmin,work){var distort=new_float(L3Side.SFBMAX);if(0==(gfc.substep_shaping&4)&&gi.block_type==Encoder.SHORT_TYPE||(gfc.substep_shaping&0x80)!=0)return;qupvt.calc_noise(gi,l3_xmin,distort,new CalcNoiseResult(),null);for(var j=0;j<576;j++){var xr=0.0;if(gi.l3_enc[j]!=0)xr=Math.abs(gi.xr[j]);work[j]=xr;}var j=0;var sfb=8;if(gi.block_type==Encoder.SHORT_TYPE)sfb=6;do{var allowedNoise,trancateThreshold;var nsame,start;var width=gi.width[sfb];j+=width;if(distort[sfb]>=1.0)continue;Arrays.sort(work,j-width,width);if(BitStream.EQ(work[j-1],0.0))continue;/* all zero sfb */allowedNoise=(1.0-distort[sfb])*l3_xmin[sfb];trancateThreshold=0.0;start=0;do{var noise;for(nsame=1;start+nsame0);}while(++sfb * * over_noise: ??? (the previous comment is fully wrong)
    * tot_noise: ??? (the previous comment is fully wrong)
    * max_noise: max quantization noise */var better;switch(quant_comp){default:case 9:{if(best.over_count>0){/* there are distorted sfb */better=calc.over_SSD<=best.over_SSD;if(calc.over_SSD==best.over_SSD)better=calc.bits0.2||calc.max_noise<=0.0&&best.max_noise<0.0&&best.max_noise>calc.max_noise-0.2&&calc.tot_noise0.0&&best.max_noise>calc.max_noise-0.2&&calc.tot_noise0.0&&best.max_noise>-0.05&&best.max_noise>calc.max_noise-0.1&&calc.tot_noise+calc.over_noise0.0&&best.max_noise>-0.1&&best.max_noise>calc.max_noise-0.15&&calc.tot_noise+calc.over_noise+calc.over_noise * Amplify the scalefactor bands that violate the masking threshold. * See ISO 11172-3 Section C.1.5.4.3.5 * * distort[] = noise/masking * distort[] > 1 ==> noise is not masked * distort[] < 1 ==> noise is masked * max_dist = maximum value of distort[] * * Three algorithms: * noise_shaping_amp * 0 Amplify all bands with distort[]>1. * * 1 Amplify all bands with distort[] >= max_dist^(.5); * ( 50% in the db scale) * * 2 Amplify first band with distort[] >= max_dist; * * * For algorithms 0 and 1, if max_dist < 1, then amplify all bands * with distort[] >= .95*max_dist. This is to make sure we always * amplify at least one band. * */function amp_scalefac_bands(gfp,cod_info,distort,xrpow,bRefine){var gfc=gfp.internal_flags;var ifqstep34;if(cod_info.scalefac_scale==0){ifqstep34=1.29683955465100964055;/* 2**(.75*.5) */}else{ifqstep34=1.68179283050742922612;/* 2**(.75*1) */}/* compute maximum value of distort[] */var trigger=0;for(var sfb=0;sfb1.0)trigger=Math.pow(trigger,.5);else trigger*=.95;break;case 0:default:/* ISO algorithm. amplify all bands with distort>1 */if(trigger>1.0)trigger=1.0;else trigger*=.95;break;}var j=0;for(var sfb=0;sfbcod_info.xrpow_max)cod_info.xrpow_max=xrpow[j+l];}if(gfc.noise_shaping_amp==2)return;}}/** * Takehiro Tominaga 2000-xx-xx * * turns on scalefac scale and adjusts scalefactors */function inc_scalefac_scale(cod_info,xrpow){var ifqstep34=1.29683955465100964055;var j=0;for(var sfb=0;sfbcod_info.xrpow_max)cod_info.xrpow_max=xrpow[j+l];}}cod_info.scalefac[sfb]=s>>1;}cod_info.preflag=0;cod_info.scalefac_scale=1;}/** * Takehiro Tominaga 2000-xx-xx * * increases the subblock gain and adjusts scalefactors */function inc_subblock_gain(gfc,cod_info,xrpow){var sfb;var scalefac=cod_info.scalefac;/* subbloc_gain can't do anything in the long block region */for(sfb=0;sfb=16)return true;}for(var window=0;window<3;window++){var s1=0;var s2=0;for(sfb=cod_info.sfb_lmax+window;sfb=7)return true;/* * even though there is no scalefactor for sfb12 subblock gain * affects upper frequencies too, that's why we have to go up to * SBMAX_s */cod_info.subblock_gain[window]++;var j=gfc.scalefac_band.l[cod_info.sfb_lmax];for(sfb=cod_info.sfb_lmax+window;sfb>cod_info.scalefac_scale);if(s>=0){scalefac[sfb]=s;j+=width*3;continue;}scalefac[sfb]=0;{var gain=210+(s<cod_info.xrpow_max)cod_info.xrpow_max=xrpow[j+l];}j+=width*(3-window-1);}{var amp=qupvt.IPOW20(202);j+=cod_info.width[sfb]*(window+1);for(var l=-cod_info.width[sfb];l<0;l++){xrpow[j+l]*=amp;if(xrpow[j+l]>cod_info.xrpow_max)cod_info.xrpow_max=xrpow[j+l];}}}return false;}/** *
                 *  Takehiro Tominaga /date??
                 *  Robert Hegemann 2000-09-06: made a function of it
                 *
                 *  amplifies scalefactor bands,
                 *   - if all are already amplified returns 0
                 *   - if some bands are amplified too much:
                 *      * try to increase scalefac_scale
                 *      * if already scalefac_scale was set
                 *          try on short blocks to increase subblock gain
                 * 
    */function balance_noise(gfp,cod_info,distort,xrpow,bRefine){var gfc=gfp.internal_flags;amp_scalefac_bands(gfp,cod_info,distort,xrpow,bRefine);/* * check to make sure we have not amplified too much loop_break returns * 0 if there is an unamplified scalefac scale_bitcount returns 0 if no * scalefactors are too large */var status=loop_break(cod_info);if(status)return false;/* all bands amplified *//* * not all scalefactors have been amplified. so these scalefacs are * possibly valid. encode them: */if(gfc.mode_gr==2)status=tk.scale_bitcount(cod_info);else status=tk.scale_bitcount_lsf(gfc,cod_info);if(!status)return true;/* amplified some bands not exceeding limits *//* * some scalefactors are too large. lets try setting scalefac_scale=1 */if(gfc.noise_shaping>1){Arrays.fill(gfc.pseudohalf,0);if(0==cod_info.scalefac_scale){inc_scalefac_scale(cod_info,xrpow);status=false;}else{if(cod_info.block_type==Encoder.SHORT_TYPE&&gfc.subblock_gain>0){status=inc_subblock_gain(gfc,cod_info,xrpow)||loop_break(cod_info);}}}if(!status){if(gfc.mode_gr==2)status=tk.scale_bitcount(cod_info);else status=tk.scale_bitcount_lsf(gfc,cod_info);}return!status;}/** *
                 *  Function: The outer iteration loop controls the masking conditions
                 *  of all scalefactorbands. It computes the best scalefac and
                 *  global gain. This module calls the inner iteration loop
                 *
                 *  mt 5/99 completely rewritten to allow for bit reservoir control,
                 *  mid/side channels with L/R or mid/side masking thresholds,
                 *  and chooses best quantization instead of last quantization when
                 *  no distortion free quantization can be found.
                 *
                 *  added VBR support mt 5/99
                 *
                 *  some code shuffle rh 9/00
                 * 
    * * @param l3_xmin * allowed distortion * @param xrpow * coloured magnitudes of spectral * @param targ_bits * maximum allowed bits */this.outer_loop=function(gfp,cod_info,l3_xmin,xrpow,ch,targ_bits){var gfc=gfp.internal_flags;var cod_info_w=new GrInfo();var save_xrpow=new_float(576);var distort=new_float(L3Side.SFBMAX);var best_noise_info=new CalcNoiseResult();var better;var prev_noise=new CalcNoiseData();var best_part2_3_length=9999999;var bEndOfSearch=false;var bRefine=false;var best_ggain_pass1=0;bin_search_StepSize(gfc,cod_info,targ_bits,ch,xrpow);if(0==gfc.noise_shaping)/* fast mode, no noise shaping, we are ready */return 100;/* default noise_info.over_count *//* compute the distortion in this quantization *//* coefficients and thresholds both l/r (or both mid/side) */qupvt.calc_noise(cod_info,l3_xmin,distort,best_noise_info,prev_noise);best_noise_info.bits=cod_info.part2_3_length;cod_info_w.assign(cod_info);var age=0;System.arraycopy(xrpow,0,save_xrpow,0,576);while(!bEndOfSearch){/* BEGIN MAIN LOOP */do{var noise_info=new CalcNoiseResult();var search_limit;var maxggain=255;/* * When quantization with no distorted bands is found, allow up * to X new unsuccesful tries in serial. This gives us more * possibilities for different quant_compare modes. Much more * than 3 makes not a big difference, it is only slower. */if((gfc.substep_shaping&2)!=0){search_limit=20;}else{search_limit=3;}/* * Check if the last scalefactor band is distorted. in VBR mode * we can't get rid of the distortion, so quit now and VBR mode * will try again with more bits. (makes a 10% speed increase, * the files I tested were binary identical, 2000/05/20 Robert * Hegemann) distort[] > 1 means noise > allowed noise */if(gfc.sfb21_extra){if(distort[cod_info_w.sfbmax]>1.0)break;if(cod_info_w.block_type==Encoder.SHORT_TYPE&&(distort[cod_info_w.sfbmax+1]>1.0||distort[cod_info_w.sfbmax+2]>1.0))break;}/* try a new scalefactor conbination on cod_info_w */if(!balance_noise(gfp,cod_info_w,distort,xrpow,bRefine))break;if(cod_info_w.scalefac_scale!=0)maxggain=254;/* * inner_loop starts with the initial quantization step computed * above and slowly increases until the bits < huff_bits. Thus * it is important not to start with too large of an inital * quantization step. Too small is ok, but inner_loop will take * longer */var huff_bits=targ_bits-cod_info_w.part2_length;if(huff_bits<=0)break;/* * increase quantizer stepsize until needed bits are below * maximum */while((cod_info_w.part2_3_length=tk.count_bits(gfc,xrpow,cod_info_w,prev_noise))>huff_bits&&cod_info_w.global_gain<=maxggain){cod_info_w.global_gain++;}if(cod_info_w.global_gain>maxggain)break;if(best_noise_info.over_count==0){while((cod_info_w.part2_3_length=tk.count_bits(gfc,xrpow,cod_info_w,prev_noise))>best_part2_3_length&&cod_info_w.global_gain<=maxggain){cod_info_w.global_gain++;}if(cod_info_w.global_gain>maxggain)break;}/* compute the distortion in this quantization */qupvt.calc_noise(cod_info_w,l3_xmin,distort,noise_info,prev_noise);noise_info.bits=cod_info_w.part2_3_length;/* * check if this quantization is better than our saved * quantization */if(cod_info.block_type!=Encoder.SHORT_TYPE){// NORM, START or STOP type better=gfp.quant_comp;}else better=gfp.quant_comp_short;better=quant_compare(better,best_noise_info,noise_info,cod_info_w,distort)?1:0;/* save data so we can restore this quantization later */if(better!=0){best_part2_3_length=cod_info.part2_3_length;best_noise_info=noise_info;cod_info.assign(cod_info_w);age=0;/* save data so we can restore this quantization later *//* store for later reuse */System.arraycopy(xrpow,0,save_xrpow,0,576);}else{/* early stop? */if(gfc.full_outer_loop==0){if(++age>search_limit&&best_noise_info.over_count==0)break;if(gfc.noise_shaping_amp==3&&bRefine&&age>30)break;if(gfc.noise_shaping_amp==3&&bRefine&&cod_info_w.global_gain-best_ggain_pass1>15)break;}}}while(cod_info_w.global_gain+cod_info_w.scalefac_scale<255);if(gfc.noise_shaping_amp==3){if(!bRefine){/* refine search */cod_info_w.assign(cod_info);System.arraycopy(save_xrpow,0,xrpow,0,576);age=0;best_ggain_pass1=cod_info_w.global_gain;bRefine=true;}else{/* search already refined, stop */bEndOfSearch=true;}}else{bEndOfSearch=true;}}/* * finish up */if(gfp.VBR==VbrMode.vbr_rh||gfp.VBR==VbrMode.vbr_mtrh)/* restore for reuse on next try */System.arraycopy(save_xrpow,0,xrpow,0,576);/* * do the 'substep shaping' */else if((gfc.substep_shaping&1)!=0)trancate_smallspectrums(gfc,cod_info,l3_xmin,xrpow);return best_noise_info.over_count;};/** * Robert Hegemann 2000-09-06 * * update reservoir status after FINAL quantization/bitrate */this.iteration_finish_one=function(gfc,gr,ch){var l3_side=gfc.l3_side;var cod_info=l3_side.tt[gr][ch];/* * try some better scalefac storage */tk.best_scalefac_store(gfc,gr,ch,l3_side);/* * best huffman_divide may save some bits too */if(gfc.use_best_huffman==1)tk.best_huffman_divide(gfc,cod_info);/* * update reservoir status after FINAL quantization/bitrate */rv.ResvAdjust(gfc,cod_info);};/** * * 2000-09-04 Robert Hegemann * * @param l3_xmin * allowed distortion of the scalefactor * @param xrpow * coloured magnitudes of spectral values */this.VBR_encode_granule=function(gfp,cod_info,l3_xmin,xrpow,ch,min_bits,max_bits){var gfc=gfp.internal_flags;var bst_cod_info=new GrInfo();var bst_xrpow=new_float(576);var Max_bits=max_bits;var real_bits=max_bits+1;var this_bits=(max_bits+min_bits)/2;var dbits,over,found=0;var sfb21_extra=gfc.sfb21_extra;Arrays.fill(bst_cod_info.l3_enc,0);/* * search within round about 40 bits of optimal */do{if(this_bits>Max_bits-42)gfc.sfb21_extra=false;else gfc.sfb21_extra=sfb21_extra;over=outer_loop(gfp,cod_info,l3_xmin,xrpow,ch,this_bits);/* * is quantization as good as we are looking for ? in this case: is * no scalefactor band distorted? */if(over<=0){found=1;/* * now we know it can be done with "real_bits" and maybe we can * skip some iterations */real_bits=cod_info.part2_3_length;/* * store best quantization so far */bst_cod_info.assign(cod_info);System.arraycopy(xrpow,0,bst_xrpow,0,576);/* * try with fewer bits */max_bits=real_bits-32;dbits=max_bits-min_bits;this_bits=(max_bits+min_bits)/2;}else{/* * try with more bits */min_bits=this_bits+32;dbits=max_bits-min_bits;this_bits=(max_bits+min_bits)/2;if(found!=0){found=2;/* * start again with best quantization so far */cod_info.assign(bst_cod_info);System.arraycopy(bst_xrpow,0,xrpow,0,576);}}}while(dbits>12);gfc.sfb21_extra=sfb21_extra;/* * found=0 => nothing found, use last one found=1 => we just found the * best and left the loop found=2 => we restored a good one and have now * l3_enc to restore too */if(found==2){System.arraycopy(bst_cod_info.l3_enc,0,cod_info.l3_enc,0,576);}};/** * Robert Hegemann 2000-09-05 * * calculates * how many bits are available for analog silent granules * how * many bits to use for the lowest allowed bitrate * how many bits each * bitrate would provide */this.get_framebits=function(gfp,frameBits){var gfc=gfp.internal_flags;/* * always use at least this many bits per granule per channel unless we * detect analog silence, see below */gfc.bitrate_index=gfc.VBR_min_bitrate;var bitsPerFrame=bs.getframebits(gfp);/* * bits for analog silence */gfc.bitrate_index=1;bitsPerFrame=bs.getframebits(gfp);for(var i=1;i<=gfc.VBR_max_bitrate;i++){gfc.bitrate_index=i;var mb=new MeanBits(bitsPerFrame);frameBits[i]=rv.ResvFrameBegin(gfp,mb);bitsPerFrame=mb.bits;}};/* RH: this one needs to be overhauled sometime *//** *
                 *  2000-09-04 Robert Hegemann
                 *
                 *  * converts LR to MS coding when necessary
                 *  * calculates allowed/adjusted quantization noise amounts
                 *  * detects analog silent frames
                 *
                 *  some remarks:
                 *  - lower masking depending on Quality setting
                 *  - quality control together with adjusted ATH MDCT scaling
                 *    on lower quality setting allocate more noise from
                 *    ATH masking, and on higher quality setting allocate
                 *    less noise from ATH masking.
                 *  - experiments show that going more than 2dB over GPSYCHO's
                 *    limits ends up in very annoying artefacts
                 * 
    */this.VBR_old_prepare=function(gfp,pe,ms_ener_ratio,ratio,l3_xmin,frameBits,min_bits,max_bits,bands){var gfc=gfp.internal_flags;var masking_lower_db,adjust=0.0;var analog_silence=1;var bits=0;gfc.bitrate_index=gfc.VBR_max_bitrate;var avg=rv.ResvFrameBegin(gfp,new MeanBits(0))/gfc.mode_gr;get_framebits(gfp,frameBits);for(var gr=0;grframeBits[gfc.VBR_max_bitrate]){max_bits[gr][ch]*=frameBits[gfc.VBR_max_bitrate];max_bits[gr][ch]/=bits;}if(min_bits[gr][ch]>max_bits[gr][ch])min_bits[gr][ch]=max_bits[gr][ch];}/* for ch */}/* for gr */return analog_silence;};this.bitpressure_strategy=function(gfc,l3_xmin,min_bits,max_bits){for(var gr=0;grmaximum_framebits){max_bits[gr][ch]*=maximum_framebits;max_bits[gr][ch]/=bits;}}/* for ch */}/* for gr */return analog_silence;};/** * calculates target bits for ABR encoding * * mt 2000/05/31 */this.calc_target_bits=function(gfp,pe,ms_ener_ratio,targ_bits,analog_silence_bits,max_frame_bits){var gfc=gfp.internal_flags;var l3_side=gfc.l3_side;var res_factor;var gr,ch,totbits,mean_bits=0;gfc.bitrate_index=gfc.VBR_max_bitrate;var mb=new MeanBits(mean_bits);max_frame_bits[0]=rv.ResvFrameBegin(gfp,mb);mean_bits=mb.bits;gfc.bitrate_index=1;mean_bits=bs.getframebits(gfp)-gfc.sideinfo_len*8;analog_silence_bits[0]=mean_bits/(gfc.mode_gr*gfc.channels_out);mean_bits=gfp.VBR_mean_bitrate_kbps*gfp.framesize*1000;if((gfc.substep_shaping&1)!=0)mean_bits*=1.09;mean_bits/=gfp.out_samplerate;mean_bits-=gfc.sideinfo_len*8;mean_bits/=gfc.mode_gr*gfc.channels_out;/** *
                     *           res_factor is the percentage of the target bitrate that should
                     *           be used on average.  the remaining bits are added to the
                     *           bitreservoir and used for difficult to encode frames.
                     *
                     *           Since we are tracking the average bitrate, we should adjust
                     *           res_factor "on the fly", increasing it if the average bitrate
                     *           is greater than the requested bitrate, and decreasing it
                     *           otherwise.  Reasonable ranges are from .9 to 1.0
                     *
                     *           Until we get the above suggestion working, we use the following
                     *           tuning:
                     *           compression ratio    res_factor
                     *           5.5  (256kbps)         1.0      no need for bitreservoir
                     *           11   (128kbps)         .93      7% held for reservoir
                     *
                     *           with linear interpolation for other values.
                     * 
    */res_factor=.93+.07*(11.0-gfp.compression_ratio)/(11.0-5.5);if(res_factor<.90)res_factor=.90;if(res_factor>1.00)res_factor=1.00;for(gr=0;gr700){var add_bits=int((pe[gr][ch]-700)/1.4);var cod_info=l3_side.tt[gr][ch];targ_bits[gr][ch]=int(res_factor*mean_bits);/* short blocks use a little extra, no matter what the pe */if(cod_info.block_type==Encoder.SHORT_TYPE){if(add_bitsmean_bits*3/2)add_bits=mean_bits*3/2;else if(add_bits<0)add_bits=0;targ_bits[gr][ch]+=add_bits;}if(targ_bits[gr][ch]>LameInternalFlags.MAX_BITS_PER_CHANNEL){targ_bits[gr][ch]=LameInternalFlags.MAX_BITS_PER_CHANNEL;}sum+=targ_bits[gr][ch];}/* for ch */if(sum>LameInternalFlags.MAX_BITS_PER_GRANULE){for(ch=0;chLameInternalFlags.MAX_BITS_PER_CHANNEL)targ_bits[gr][ch]=LameInternalFlags.MAX_BITS_PER_CHANNEL;totbits+=targ_bits[gr][ch];}}/* * repartion target bits if needed */if(totbits>max_frame_bits[0]){for(gr=0;gr subband filtering -> mdct routine * * Copyright (c) 1999-2000 Takehiro Tominaga * * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. *//* * Special Thanks to Patrick De Smet for your advices. *//* $Id: NewMDCT.java,v 1.11 2011/05/24 20:48:06 kenchis Exp $ *///package mp3; //import java.util.Arrays; function NewMDCT(){var enwindow=[-4.77e-07*0.740951125354959/2.384e-06,1.03951e-04*0.740951125354959/2.384e-06,9.53674e-04*0.740951125354959/2.384e-06,2.841473e-03*0.740951125354959/2.384e-06,3.5758972e-02*0.740951125354959/2.384e-06,3.401756e-03*0.740951125354959/2.384e-06,9.83715e-04*0.740951125354959/2.384e-06,9.9182e-05*0.740951125354959/2.384e-06,/* 15 */1.2398e-05*0.740951125354959/2.384e-06,1.91212e-04*0.740951125354959/2.384e-06,2.283096e-03*0.740951125354959/2.384e-06,1.6994476e-02*0.740951125354959/2.384e-06,-1.8756866e-02*0.740951125354959/2.384e-06,-2.630711e-03*0.740951125354959/2.384e-06,-2.47478e-04*0.740951125354959/2.384e-06,-1.4782e-05*0.740951125354959/2.384e-06,9.063471690191471e-01,1.960342806591213e-01,-4.77e-07*0.773010453362737/2.384e-06,1.05858e-04*0.773010453362737/2.384e-06,9.30786e-04*0.773010453362737/2.384e-06,2.521515e-03*0.773010453362737/2.384e-06,3.5694122e-02*0.773010453362737/2.384e-06,3.643036e-03*0.773010453362737/2.384e-06,9.91821e-04*0.773010453362737/2.384e-06,9.6321e-05*0.773010453362737/2.384e-06,/* 14 */1.1444e-05*0.773010453362737/2.384e-06,1.65462e-04*0.773010453362737/2.384e-06,2.110004e-03*0.773010453362737/2.384e-06,1.6112804e-02*0.773010453362737/2.384e-06,-1.9634247e-02*0.773010453362737/2.384e-06,-2.803326e-03*0.773010453362737/2.384e-06,-2.77042e-04*0.773010453362737/2.384e-06,-1.6689e-05*0.773010453362737/2.384e-06,8.206787908286602e-01,3.901806440322567e-01,-4.77e-07*0.803207531480645/2.384e-06,1.07288e-04*0.803207531480645/2.384e-06,9.02653e-04*0.803207531480645/2.384e-06,2.174854e-03*0.803207531480645/2.384e-06,3.5586357e-02*0.803207531480645/2.384e-06,3.858566e-03*0.803207531480645/2.384e-06,9.95159e-04*0.803207531480645/2.384e-06,9.3460e-05*0.803207531480645/2.384e-06,/* 13 */1.0014e-05*0.803207531480645/2.384e-06,1.40190e-04*0.803207531480645/2.384e-06,1.937389e-03*0.803207531480645/2.384e-06,1.5233517e-02*0.803207531480645/2.384e-06,-2.0506859e-02*0.803207531480645/2.384e-06,-2.974033e-03*0.803207531480645/2.384e-06,-3.07560e-04*0.803207531480645/2.384e-06,-1.8120e-05*0.803207531480645/2.384e-06,7.416505462720353e-01,5.805693545089249e-01,-4.77e-07*0.831469612302545/2.384e-06,1.08242e-04*0.831469612302545/2.384e-06,8.68797e-04*0.831469612302545/2.384e-06,1.800537e-03*0.831469612302545/2.384e-06,3.5435200e-02*0.831469612302545/2.384e-06,4.049301e-03*0.831469612302545/2.384e-06,9.94205e-04*0.831469612302545/2.384e-06,9.0599e-05*0.831469612302545/2.384e-06,/* 12 */9.060e-06*0.831469612302545/2.384e-06,1.16348e-04*0.831469612302545/2.384e-06,1.766682e-03*0.831469612302545/2.384e-06,1.4358521e-02*0.831469612302545/2.384e-06,-2.1372318e-02*0.831469612302545/2.384e-06,-3.14188e-03*0.831469612302545/2.384e-06,-3.39031e-04*0.831469612302545/2.384e-06,-1.9550e-05*0.831469612302545/2.384e-06,6.681786379192989e-01,7.653668647301797e-01,-4.77e-07*0.857728610000272/2.384e-06,1.08719e-04*0.857728610000272/2.384e-06,8.29220e-04*0.857728610000272/2.384e-06,1.399517e-03*0.857728610000272/2.384e-06,3.5242081e-02*0.857728610000272/2.384e-06,4.215240e-03*0.857728610000272/2.384e-06,9.89437e-04*0.857728610000272/2.384e-06,8.7261e-05*0.857728610000272/2.384e-06,/* 11 */8.106e-06*0.857728610000272/2.384e-06,9.3937e-05*0.857728610000272/2.384e-06,1.597881e-03*0.857728610000272/2.384e-06,1.3489246e-02*0.857728610000272/2.384e-06,-2.2228718e-02*0.857728610000272/2.384e-06,-3.306866e-03*0.857728610000272/2.384e-06,-3.71456e-04*0.857728610000272/2.384e-06,-2.1458e-05*0.857728610000272/2.384e-06,5.993769336819237e-01,9.427934736519954e-01,-4.77e-07*0.881921264348355/2.384e-06,1.08719e-04*0.881921264348355/2.384e-06,7.8392e-04*0.881921264348355/2.384e-06,9.71317e-04*0.881921264348355/2.384e-06,3.5007000e-02*0.881921264348355/2.384e-06,4.357815e-03*0.881921264348355/2.384e-06,9.80854e-04*0.881921264348355/2.384e-06,8.3923e-05*0.881921264348355/2.384e-06,/* 10 */7.629e-06*0.881921264348355/2.384e-06,7.2956e-05*0.881921264348355/2.384e-06,1.432419e-03*0.881921264348355/2.384e-06,1.2627602e-02*0.881921264348355/2.384e-06,-2.3074150e-02*0.881921264348355/2.384e-06,-3.467083e-03*0.881921264348355/2.384e-06,-4.04358e-04*0.881921264348355/2.384e-06,-2.3365e-05*0.881921264348355/2.384e-06,5.345111359507916e-01,1.111140466039205e+00,-9.54e-07*0.903989293123443/2.384e-06,1.08242e-04*0.903989293123443/2.384e-06,7.31945e-04*0.903989293123443/2.384e-06,5.15938e-04*0.903989293123443/2.384e-06,3.4730434e-02*0.903989293123443/2.384e-06,4.477024e-03*0.903989293123443/2.384e-06,9.68933e-04*0.903989293123443/2.384e-06,8.0585e-05*0.903989293123443/2.384e-06,/* 9 */6.676e-06*0.903989293123443/2.384e-06,5.2929e-05*0.903989293123443/2.384e-06,1.269817e-03*0.903989293123443/2.384e-06,1.1775017e-02*0.903989293123443/2.384e-06,-2.3907185e-02*0.903989293123443/2.384e-06,-3.622532e-03*0.903989293123443/2.384e-06,-4.38213e-04*0.903989293123443/2.384e-06,-2.5272e-05*0.903989293123443/2.384e-06,4.729647758913199e-01,1.268786568327291e+00,-9.54e-07*0.92387953251128675613/2.384e-06,1.06812e-04*0.92387953251128675613/2.384e-06,6.74248e-04*0.92387953251128675613/2.384e-06,3.3379e-05*0.92387953251128675613/2.384e-06,3.4412861e-02*0.92387953251128675613/2.384e-06,4.573822e-03*0.92387953251128675613/2.384e-06,9.54151e-04*0.92387953251128675613/2.384e-06,7.6771e-05*0.92387953251128675613/2.384e-06,6.199e-06*0.92387953251128675613/2.384e-06,3.4332e-05*0.92387953251128675613/2.384e-06,1.111031e-03*0.92387953251128675613/2.384e-06,1.0933399e-02*0.92387953251128675613/2.384e-06,-2.4725437e-02*0.92387953251128675613/2.384e-06,-3.771782e-03*0.92387953251128675613/2.384e-06,-4.72546e-04*0.92387953251128675613/2.384e-06,-2.7657e-05*0.92387953251128675613/2.384e-06,4.1421356237309504879e-01,/* tan(PI/8) */1.414213562373095e+00,-9.54e-07*0.941544065183021/2.384e-06,1.05381e-04*0.941544065183021/2.384e-06,6.10352e-04*0.941544065183021/2.384e-06,-4.75883e-04*0.941544065183021/2.384e-06,3.4055710e-02*0.941544065183021/2.384e-06,4.649162e-03*0.941544065183021/2.384e-06,9.35555e-04*0.941544065183021/2.384e-06,7.3433e-05*0.941544065183021/2.384e-06,/* 7 */5.245e-06*0.941544065183021/2.384e-06,1.7166e-05*0.941544065183021/2.384e-06,9.56535e-04*0.941544065183021/2.384e-06,1.0103703e-02*0.941544065183021/2.384e-06,-2.5527000e-02*0.941544065183021/2.384e-06,-3.914356e-03*0.941544065183021/2.384e-06,-5.07355e-04*0.941544065183021/2.384e-06,-3.0041e-05*0.941544065183021/2.384e-06,3.578057213145241e-01,1.546020906725474e+00,-9.54e-07*0.956940335732209/2.384e-06,1.02520e-04*0.956940335732209/2.384e-06,5.39303e-04*0.956940335732209/2.384e-06,-1.011848e-03*0.956940335732209/2.384e-06,3.3659935e-02*0.956940335732209/2.384e-06,4.703045e-03*0.956940335732209/2.384e-06,9.15051e-04*0.956940335732209/2.384e-06,7.0095e-05*0.956940335732209/2.384e-06,/* 6 */4.768e-06*0.956940335732209/2.384e-06,9.54e-07*0.956940335732209/2.384e-06,8.06808e-04*0.956940335732209/2.384e-06,9.287834e-03*0.956940335732209/2.384e-06,-2.6310921e-02*0.956940335732209/2.384e-06,-4.048824e-03*0.956940335732209/2.384e-06,-5.42164e-04*0.956940335732209/2.384e-06,-3.2425e-05*0.956940335732209/2.384e-06,3.033466836073424e-01,1.662939224605090e+00,-1.431e-06*0.970031253194544/2.384e-06,9.9182e-05*0.970031253194544/2.384e-06,4.62532e-04*0.970031253194544/2.384e-06,-1.573563e-03*0.970031253194544/2.384e-06,3.3225536e-02*0.970031253194544/2.384e-06,4.737377e-03*0.970031253194544/2.384e-06,8.91685e-04*0.970031253194544/2.384e-06,6.6280e-05*0.970031253194544/2.384e-06,/* 5 */4.292e-06*0.970031253194544/2.384e-06,-1.3828e-05*0.970031253194544/2.384e-06,6.61850e-04*0.970031253194544/2.384e-06,8.487225e-03*0.970031253194544/2.384e-06,-2.7073860e-02*0.970031253194544/2.384e-06,-4.174709e-03*0.970031253194544/2.384e-06,-5.76973e-04*0.970031253194544/2.384e-06,-3.4809e-05*0.970031253194544/2.384e-06,2.504869601913055e-01,1.763842528696710e+00,-1.431e-06*0.98078528040323/2.384e-06,9.5367e-05*0.98078528040323/2.384e-06,3.78609e-04*0.98078528040323/2.384e-06,-2.161503e-03*0.98078528040323/2.384e-06,3.2754898e-02*0.98078528040323/2.384e-06,4.752159e-03*0.98078528040323/2.384e-06,8.66413e-04*0.98078528040323/2.384e-06,6.2943e-05*0.98078528040323/2.384e-06,/* 4 */3.815e-06*0.98078528040323/2.384e-06,-2.718e-05*0.98078528040323/2.384e-06,5.22137e-04*0.98078528040323/2.384e-06,7.703304e-03*0.98078528040323/2.384e-06,-2.7815342e-02*0.98078528040323/2.384e-06,-4.290581e-03*0.98078528040323/2.384e-06,-6.11782e-04*0.98078528040323/2.384e-06,-3.7670e-05*0.98078528040323/2.384e-06,1.989123673796580e-01,1.847759065022573e+00,-1.907e-06*0.989176509964781/2.384e-06,9.0122e-05*0.989176509964781/2.384e-06,2.88486e-04*0.989176509964781/2.384e-06,-2.774239e-03*0.989176509964781/2.384e-06,3.2248020e-02*0.989176509964781/2.384e-06,4.748821e-03*0.989176509964781/2.384e-06,8.38757e-04*0.989176509964781/2.384e-06,5.9605e-05*0.989176509964781/2.384e-06,/* 3 */3.338e-06*0.989176509964781/2.384e-06,-3.9577e-05*0.989176509964781/2.384e-06,3.88145e-04*0.989176509964781/2.384e-06,6.937027e-03*0.989176509964781/2.384e-06,-2.8532982e-02*0.989176509964781/2.384e-06,-4.395962e-03*0.989176509964781/2.384e-06,-6.46591e-04*0.989176509964781/2.384e-06,-4.0531e-05*0.989176509964781/2.384e-06,1.483359875383474e-01,1.913880671464418e+00,-1.907e-06*0.995184726672197/2.384e-06,8.4400e-05*0.995184726672197/2.384e-06,1.91689e-04*0.995184726672197/2.384e-06,-3.411293e-03*0.995184726672197/2.384e-06,3.1706810e-02*0.995184726672197/2.384e-06,4.728317e-03*0.995184726672197/2.384e-06,8.09669e-04*0.995184726672197/2.384e-06,5.579e-05*0.995184726672197/2.384e-06,3.338e-06*0.995184726672197/2.384e-06,-5.0545e-05*0.995184726672197/2.384e-06,2.59876e-04*0.995184726672197/2.384e-06,6.189346e-03*0.995184726672197/2.384e-06,-2.9224873e-02*0.995184726672197/2.384e-06,-4.489899e-03*0.995184726672197/2.384e-06,-6.80923e-04*0.995184726672197/2.384e-06,-4.3392e-05*0.995184726672197/2.384e-06,9.849140335716425e-02,1.961570560806461e+00,-2.384e-06*0.998795456205172/2.384e-06,7.7724e-05*0.998795456205172/2.384e-06,8.8215e-05*0.998795456205172/2.384e-06,-4.072189e-03*0.998795456205172/2.384e-06,3.1132698e-02*0.998795456205172/2.384e-06,4.691124e-03*0.998795456205172/2.384e-06,7.79152e-04*0.998795456205172/2.384e-06,5.2929e-05*0.998795456205172/2.384e-06,2.861e-06*0.998795456205172/2.384e-06,-6.0558e-05*0.998795456205172/2.384e-06,1.37329e-04*0.998795456205172/2.384e-06,5.462170e-03*0.998795456205172/2.384e-06,-2.9890060e-02*0.998795456205172/2.384e-06,-4.570484e-03*0.998795456205172/2.384e-06,-7.14302e-04*0.998795456205172/2.384e-06,-4.6253e-05*0.998795456205172/2.384e-06,4.912684976946725e-02,1.990369453344394e+00,3.5780907e-02*Util.SQRT2*0.5/2.384e-06,1.7876148e-02*Util.SQRT2*0.5/2.384e-06,3.134727e-03*Util.SQRT2*0.5/2.384e-06,2.457142e-03*Util.SQRT2*0.5/2.384e-06,9.71317e-04*Util.SQRT2*0.5/2.384e-06,2.18868e-04*Util.SQRT2*0.5/2.384e-06,1.01566e-04*Util.SQRT2*0.5/2.384e-06,1.3828e-05*Util.SQRT2*0.5/2.384e-06,3.0526638e-02/2.384e-06,4.638195e-03/2.384e-06,7.47204e-04/2.384e-06,4.9591e-05/2.384e-06,4.756451e-03/2.384e-06,2.1458e-05/2.384e-06,-6.9618e-05/2.384e-06];var NS=12;var NL=36;var win=[[2.382191739347913e-13,6.423305872147834e-13,9.400849094049688e-13,1.122435026096556e-12,1.183840321267481e-12,1.122435026096556e-12,9.400849094049690e-13,6.423305872147839e-13,2.382191739347918e-13,5.456116108943412e-12,4.878985199565852e-12,4.240448995017367e-12,3.559909094758252e-12,2.858043359288075e-12,2.156177623817898e-12,1.475637723558783e-12,8.371015190102974e-13,2.599706096327376e-13,-5.456116108943412e-12,-4.878985199565852e-12,-4.240448995017367e-12,-3.559909094758252e-12,-2.858043359288076e-12,-2.156177623817898e-12,-1.475637723558783e-12,-8.371015190102975e-13,-2.599706096327376e-13,-2.382191739347923e-13,-6.423305872147843e-13,-9.400849094049696e-13,-1.122435026096556e-12,-1.183840321267481e-12,-1.122435026096556e-12,-9.400849094049694e-13,-6.423305872147840e-13,-2.382191739347918e-13],[2.382191739347913e-13,6.423305872147834e-13,9.400849094049688e-13,1.122435026096556e-12,1.183840321267481e-12,1.122435026096556e-12,9.400849094049688e-13,6.423305872147841e-13,2.382191739347918e-13,5.456116108943413e-12,4.878985199565852e-12,4.240448995017367e-12,3.559909094758253e-12,2.858043359288075e-12,2.156177623817898e-12,1.475637723558782e-12,8.371015190102975e-13,2.599706096327376e-13,-5.461314069809755e-12,-4.921085770524055e-12,-4.343405037091838e-12,-3.732668368707687e-12,-3.093523840190885e-12,-2.430835727329465e-12,-1.734679010007751e-12,-9.748253656609281e-13,-2.797435120168326e-13,0.000000000000000e+00,0.000000000000000e+00,0.000000000000000e+00,0.000000000000000e+00,0.000000000000000e+00,0.000000000000000e+00,-2.283748241799531e-13,-4.037858874020686e-13,-2.146547464825323e-13],[1.316524975873958e-01,/* win[SHORT_TYPE] */4.142135623730950e-01,7.673269879789602e-01,1.091308501069271e+00,/* tantab_l */1.303225372841206e+00,1.569685577117490e+00,1.920982126971166e+00,2.414213562373094e+00,3.171594802363212e+00,4.510708503662055e+00,7.595754112725146e+00,2.290376554843115e+01,0.98480775301220802032,/* cx */0.64278760968653936292,0.34202014332566882393,0.93969262078590842791,-0.17364817766693030343,-0.76604444311897790243,0.86602540378443870761,0.500000000000000e+00,-5.144957554275265e-01,/* ca */-4.717319685649723e-01,-3.133774542039019e-01,-1.819131996109812e-01,-9.457419252642064e-02,-4.096558288530405e-02,-1.419856857247115e-02,-3.699974673760037e-03,8.574929257125442e-01,/* cs */8.817419973177052e-01,9.496286491027329e-01,9.833145924917901e-01,9.955178160675857e-01,9.991605581781475e-01,9.998991952444470e-01,9.999931550702802e-01],[0.000000000000000e+00,0.000000000000000e+00,0.000000000000000e+00,0.000000000000000e+00,0.000000000000000e+00,0.000000000000000e+00,2.283748241799531e-13,4.037858874020686e-13,2.146547464825323e-13,5.461314069809755e-12,4.921085770524055e-12,4.343405037091838e-12,3.732668368707687e-12,3.093523840190885e-12,2.430835727329466e-12,1.734679010007751e-12,9.748253656609281e-13,2.797435120168326e-13,-5.456116108943413e-12,-4.878985199565852e-12,-4.240448995017367e-12,-3.559909094758253e-12,-2.858043359288075e-12,-2.156177623817898e-12,-1.475637723558782e-12,-8.371015190102975e-13,-2.599706096327376e-13,-2.382191739347913e-13,-6.423305872147834e-13,-9.400849094049688e-13,-1.122435026096556e-12,-1.183840321267481e-12,-1.122435026096556e-12,-9.400849094049688e-13,-6.423305872147841e-13,-2.382191739347918e-13]];var tantab_l=win[Encoder.SHORT_TYPE];var cx=win[Encoder.SHORT_TYPE];var ca=win[Encoder.SHORT_TYPE];var cs=win[Encoder.SHORT_TYPE];/** * new IDCT routine written by Takehiro TOMINAGA * * PURPOSE: Overlapping window on PCM samples
    * * SEMANTICS:
    * 32 16-bit pcm samples are scaled to fractional 2's complement and * concatenated to the end of the window buffer #x#. The updated window * buffer #x# is then windowed by the analysis window #c# to produce the * windowed sample #z# */var order=[0,1,16,17,8,9,24,25,4,5,20,21,12,13,28,29,2,3,18,19,10,11,26,27,6,7,22,23,14,15,30,31];/** * returns sum_j=0^31 a[j]*cos(PI*j*(k+1/2)/32), 0<=k<32 */function window_subband(x1,x1Pos,a){var wp=10;var x2=x1Pos+238-14-286;for(var i=-15;i<0;i++){var w,s,t;w=enwindow[wp+-10];s=x1[x2+-224]*w;t=x1[x1Pos+224]*w;w=enwindow[wp+-9];s+=x1[x2+-160]*w;t+=x1[x1Pos+160]*w;w=enwindow[wp+-8];s+=x1[x2+-96]*w;t+=x1[x1Pos+96]*w;w=enwindow[wp+-7];s+=x1[x2+-32]*w;t+=x1[x1Pos+32]*w;w=enwindow[wp+-6];s+=x1[x2+32]*w;t+=x1[x1Pos+-32]*w;w=enwindow[wp+-5];s+=x1[x2+96]*w;t+=x1[x1Pos+-96]*w;w=enwindow[wp+-4];s+=x1[x2+160]*w;t+=x1[x1Pos+-160]*w;w=enwindow[wp+-3];s+=x1[x2+224]*w;t+=x1[x1Pos+-224]*w;w=enwindow[wp+-2];s+=x1[x1Pos+-256]*w;t-=x1[x2+256]*w;w=enwindow[wp+-1];s+=x1[x1Pos+-192]*w;t-=x1[x2+192]*w;w=enwindow[wp+0];s+=x1[x1Pos+-128]*w;t-=x1[x2+128]*w;w=enwindow[wp+1];s+=x1[x1Pos+-64]*w;t-=x1[x2+64]*w;w=enwindow[wp+2];s+=x1[x1Pos+0]*w;t-=x1[x2+0]*w;w=enwindow[wp+3];s+=x1[x1Pos+64]*w;t-=x1[x2+-64]*w;w=enwindow[wp+4];s+=x1[x1Pos+128]*w;t-=x1[x2+-128]*w;w=enwindow[wp+5];s+=x1[x1Pos+192]*w;t-=x1[x2+-192]*w;/* * this multiplyer could be removed, but it needs more 256 FLOAT * data. thinking about the data cache performance, I think we * should not use such a huge table. tt 2000/Oct/25 */s*=enwindow[wp+6];w=t-s;a[30+i*2]=t+s;a[31+i*2]=enwindow[wp+7]*w;wp+=18;x1Pos--;x2++;}{var s,t,u,v;t=x1[x1Pos+-16]*enwindow[wp+-10];s=x1[x1Pos+-32]*enwindow[wp+-2];t+=(x1[x1Pos+-48]-x1[x1Pos+16])*enwindow[wp+-9];s+=x1[x1Pos+-96]*enwindow[wp+-1];t+=(x1[x1Pos+-80]+x1[x1Pos+48])*enwindow[wp+-8];s+=x1[x1Pos+-160]*enwindow[wp+0];t+=(x1[x1Pos+-112]-x1[x1Pos+80])*enwindow[wp+-7];s+=x1[x1Pos+-224]*enwindow[wp+1];t+=(x1[x1Pos+-144]+x1[x1Pos+112])*enwindow[wp+-6];s-=x1[x1Pos+32]*enwindow[wp+2];t+=(x1[x1Pos+-176]-x1[x1Pos+144])*enwindow[wp+-5];s-=x1[x1Pos+96]*enwindow[wp+3];t+=(x1[x1Pos+-208]+x1[x1Pos+176])*enwindow[wp+-4];s-=x1[x1Pos+160]*enwindow[wp+4];t+=(x1[x1Pos+-240]-x1[x1Pos+208])*enwindow[wp+-3];s-=x1[x1Pos+224];u=s-t;v=s+t;t=a[14];s=a[15]-t;a[31]=v+t;/* A0 */a[30]=u+s;/* A1 */a[15]=u-s;/* A2 */a[14]=v-t;/* A3 */}{var xr;xr=a[28]-a[0];a[0]+=a[28];a[28]=xr*enwindow[wp+-2*18+7];xr=a[29]-a[1];a[1]+=a[29];a[29]=xr*enwindow[wp+-2*18+7];xr=a[26]-a[2];a[2]+=a[26];a[26]=xr*enwindow[wp+-4*18+7];xr=a[27]-a[3];a[3]+=a[27];a[27]=xr*enwindow[wp+-4*18+7];xr=a[24]-a[4];a[4]+=a[24];a[24]=xr*enwindow[wp+-6*18+7];xr=a[25]-a[5];a[5]+=a[25];a[25]=xr*enwindow[wp+-6*18+7];xr=a[22]-a[6];a[6]+=a[22];a[22]=xr*Util.SQRT2;xr=a[23]-a[7];a[7]+=a[23];a[23]=xr*Util.SQRT2-a[7];a[7]-=a[6];a[22]-=a[7];a[23]-=a[22];xr=a[6];a[6]=a[31]-xr;a[31]=a[31]+xr;xr=a[7];a[7]=a[30]-xr;a[30]=a[30]+xr;xr=a[22];a[22]=a[15]-xr;a[15]=a[15]+xr;xr=a[23];a[23]=a[14]-xr;a[14]=a[14]+xr;xr=a[20]-a[8];a[8]+=a[20];a[20]=xr*enwindow[wp+-10*18+7];xr=a[21]-a[9];a[9]+=a[21];a[21]=xr*enwindow[wp+-10*18+7];xr=a[18]-a[10];a[10]+=a[18];a[18]=xr*enwindow[wp+-12*18+7];xr=a[19]-a[11];a[11]+=a[19];a[19]=xr*enwindow[wp+-12*18+7];xr=a[16]-a[12];a[12]+=a[16];a[16]=xr*enwindow[wp+-14*18+7];xr=a[17]-a[13];a[13]+=a[17];a[17]=xr*enwindow[wp+-14*18+7];xr=-a[20]+a[24];a[20]+=a[24];a[24]=xr*enwindow[wp+-12*18+7];xr=-a[21]+a[25];a[21]+=a[25];a[25]=xr*enwindow[wp+-12*18+7];xr=a[4]-a[8];a[4]+=a[8];a[8]=xr*enwindow[wp+-12*18+7];xr=a[5]-a[9];a[5]+=a[9];a[9]=xr*enwindow[wp+-12*18+7];xr=a[0]-a[12];a[0]+=a[12];a[12]=xr*enwindow[wp+-4*18+7];xr=a[1]-a[13];a[1]+=a[13];a[13]=xr*enwindow[wp+-4*18+7];xr=a[16]-a[28];a[16]+=a[28];a[28]=xr*enwindow[wp+-4*18+7];xr=-a[17]+a[29];a[17]+=a[29];a[29]=xr*enwindow[wp+-4*18+7];xr=Util.SQRT2*(a[2]-a[10]);a[2]+=a[10];a[10]=xr;xr=Util.SQRT2*(a[3]-a[11]);a[3]+=a[11];a[11]=xr;xr=Util.SQRT2*(-a[18]+a[26]);a[18]+=a[26];a[26]=xr-a[18];xr=Util.SQRT2*(-a[19]+a[27]);a[19]+=a[27];a[27]=xr-a[19];xr=a[2];a[19]-=a[3];a[3]-=xr;a[2]=a[31]-xr;a[31]+=xr;xr=a[3];a[11]-=a[19];a[18]-=xr;a[3]=a[30]-xr;a[30]+=xr;xr=a[18];a[27]-=a[11];a[19]-=xr;a[18]=a[15]-xr;a[15]+=xr;xr=a[19];a[10]-=xr;a[19]=a[14]-xr;a[14]+=xr;xr=a[10];a[11]-=xr;a[10]=a[23]-xr;a[23]+=xr;xr=a[11];a[26]-=xr;a[11]=a[22]-xr;a[22]+=xr;xr=a[26];a[27]-=xr;a[26]=a[7]-xr;a[7]+=xr;xr=a[27];a[27]=a[6]-xr;a[6]+=xr;xr=Util.SQRT2*(a[0]-a[4]);a[0]+=a[4];a[4]=xr;xr=Util.SQRT2*(a[1]-a[5]);a[1]+=a[5];a[5]=xr;xr=Util.SQRT2*(a[16]-a[20]);a[16]+=a[20];a[20]=xr;xr=Util.SQRT2*(a[17]-a[21]);a[17]+=a[21];a[21]=xr;xr=-Util.SQRT2*(a[8]-a[12]);a[8]+=a[12];a[12]=xr-a[8];xr=-Util.SQRT2*(a[9]-a[13]);a[9]+=a[13];a[13]=xr-a[9];xr=-Util.SQRT2*(a[25]-a[29]);a[25]+=a[29];a[29]=xr-a[25];xr=-Util.SQRT2*(a[24]+a[28]);a[24]-=a[28];a[28]=xr-a[24];xr=a[24]-a[16];a[24]=xr;xr=a[20]-xr;a[20]=xr;xr=a[28]-xr;a[28]=xr;xr=a[25]-a[17];a[25]=xr;xr=a[21]-xr;a[21]=xr;xr=a[29]-xr;a[29]=xr;xr=a[17]-a[1];a[17]=xr;xr=a[9]-xr;a[9]=xr;xr=a[25]-xr;a[25]=xr;xr=a[5]-xr;a[5]=xr;xr=a[21]-xr;a[21]=xr;xr=a[13]-xr;a[13]=xr;xr=a[29]-xr;a[29]=xr;xr=a[1]-a[0];a[1]=xr;xr=a[16]-xr;a[16]=xr;xr=a[17]-xr;a[17]=xr;xr=a[8]-xr;a[8]=xr;xr=a[9]-xr;a[9]=xr;xr=a[24]-xr;a[24]=xr;xr=a[25]-xr;a[25]=xr;xr=a[4]-xr;a[4]=xr;xr=a[5]-xr;a[5]=xr;xr=a[20]-xr;a[20]=xr;xr=a[21]-xr;a[21]=xr;xr=a[12]-xr;a[12]=xr;xr=a[13]-xr;a[13]=xr;xr=a[28]-xr;a[28]=xr;xr=a[29]-xr;a[29]=xr;xr=a[0];a[0]+=a[31];a[31]-=xr;xr=a[1];a[1]+=a[30];a[30]-=xr;xr=a[16];a[16]+=a[15];a[15]-=xr;xr=a[17];a[17]+=a[14];a[14]-=xr;xr=a[8];a[8]+=a[23];a[23]-=xr;xr=a[9];a[9]+=a[22];a[22]-=xr;xr=a[24];a[24]+=a[7];a[7]-=xr;xr=a[25];a[25]+=a[6];a[6]-=xr;xr=a[4];a[4]+=a[27];a[27]-=xr;xr=a[5];a[5]+=a[26];a[26]-=xr;xr=a[20];a[20]+=a[11];a[11]-=xr;xr=a[21];a[21]+=a[10];a[10]-=xr;xr=a[12];a[12]+=a[19];a[19]-=xr;xr=a[13];a[13]+=a[18];a[18]-=xr;xr=a[28];a[28]+=a[3];a[3]-=xr;xr=a[29];a[29]+=a[2];a[2]-=xr;}}/** * Function: Calculation of the MDCT In the case of long blocks (type 0,1,3) * there are 36 coefficents in the time domain and 18 in the frequency * domain.
    * In the case of short blocks (type 2) there are 3 transformations with * short length. This leads to 12 coefficents in the time and 6 in the * frequency domain. In this case the results are stored side by side in the * vector out[]. * * New layer3 */function mdct_short(inout,inoutPos){for(var l=0;l<3;l++){var tc0,tc1,tc2,ts0,ts1,ts2;ts0=inout[inoutPos+2*3]*win[Encoder.SHORT_TYPE][0]-inout[inoutPos+5*3];tc0=inout[inoutPos+0*3]*win[Encoder.SHORT_TYPE][2]-inout[inoutPos+3*3];tc1=ts0+tc0;tc2=ts0-tc0;ts0=inout[inoutPos+5*3]*win[Encoder.SHORT_TYPE][0]+inout[inoutPos+2*3];tc0=inout[inoutPos+3*3]*win[Encoder.SHORT_TYPE][2]+inout[inoutPos+0*3];ts1=ts0+tc0;ts2=-ts0+tc0;tc0=(inout[inoutPos+1*3]*win[Encoder.SHORT_TYPE][1]-inout[inoutPos+4*3])*2.069978111953089e-11;/* * tritab_s [ 1 ] */ts0=(inout[inoutPos+4*3]*win[Encoder.SHORT_TYPE][1]+inout[inoutPos+1*3])*2.069978111953089e-11;/* * tritab_s [ 1 ] */inout[inoutPos+3*0]=tc1*1.907525191737280e-11+tc0;/* * tritab_s[ 2 ] */inout[inoutPos+3*5]=-ts1*1.907525191737280e-11+ts0;/* * tritab_s[0 ] */tc2=tc2*0.86602540378443870761*1.907525191737281e-11;/* * tritab_s[ 2] */ts1=ts1*0.5*1.907525191737281e-11+ts0;inout[inoutPos+3*1]=tc2-ts1;inout[inoutPos+3*2]=tc2+ts1;tc1=tc1*0.5*1.907525191737281e-11-tc0;ts2=ts2*0.86602540378443870761*1.907525191737281e-11;/* * tritab_s[ 0] */inout[inoutPos+3*3]=tc1+ts2;inout[inoutPos+3*4]=tc1-ts2;inoutPos++;}}function mdct_long(out,outPos,_in){var ct,st;{var tc1,tc2,tc3,tc4,ts5,ts6,ts7,ts8;/* 1,2, 5,6, 9,10, 13,14, 17 */tc1=_in[17]-_in[9];tc3=_in[15]-_in[11];tc4=_in[14]-_in[12];ts5=_in[0]+_in[8];ts6=_in[1]+_in[7];ts7=_in[2]+_in[6];ts8=_in[3]+_in[5];out[outPos+17]=ts5+ts7-ts8-(ts6-_in[4]);st=(ts5+ts7-ts8)*cx[12+7]+(ts6-_in[4]);ct=(tc1-tc3-tc4)*cx[12+6];out[outPos+5]=ct+st;out[outPos+6]=ct-st;tc2=(_in[16]-_in[10])*cx[12+6];ts6=ts6*cx[12+7]+_in[4];ct=tc1*cx[12+0]+tc2+tc3*cx[12+1]+tc4*cx[12+2];st=-ts5*cx[12+4]+ts6-ts7*cx[12+5]+ts8*cx[12+3];out[outPos+1]=ct+st;out[outPos+2]=ct-st;ct=tc1*cx[12+1]-tc2-tc3*cx[12+2]+tc4*cx[12+0];st=-ts5*cx[12+5]+ts6-ts7*cx[12+3]+ts8*cx[12+4];out[outPos+9]=ct+st;out[outPos+10]=ct-st;ct=tc1*cx[12+2]-tc2+tc3*cx[12+0]-tc4*cx[12+1];st=ts5*cx[12+3]-ts6+ts7*cx[12+4]-ts8*cx[12+5];out[outPos+13]=ct+st;out[outPos+14]=ct-st;}{var ts1,ts2,ts3,ts4,tc5,tc6,tc7,tc8;ts1=_in[8]-_in[0];ts3=_in[6]-_in[2];ts4=_in[5]-_in[3];tc5=_in[17]+_in[9];tc6=_in[16]+_in[10];tc7=_in[15]+_in[11];tc8=_in[14]+_in[12];out[outPos+0]=tc5+tc7+tc8+(tc6+_in[13]);ct=(tc5+tc7+tc8)*cx[12+7]-(tc6+_in[13]);st=(ts1-ts3+ts4)*cx[12+6];out[outPos+11]=ct+st;out[outPos+12]=ct-st;ts2=(_in[7]-_in[1])*cx[12+6];tc6=_in[13]-tc6*cx[12+7];ct=tc5*cx[12+3]-tc6+tc7*cx[12+4]+tc8*cx[12+5];st=ts1*cx[12+2]+ts2+ts3*cx[12+0]+ts4*cx[12+1];out[outPos+3]=ct+st;out[outPos+4]=ct-st;ct=-tc5*cx[12+5]+tc6-tc7*cx[12+3]-tc8*cx[12+4];st=ts1*cx[12+1]+ts2-ts3*cx[12+2]-ts4*cx[12+0];out[outPos+7]=ct+st;out[outPos+8]=ct-st;ct=-tc5*cx[12+4]+tc6-tc7*cx[12+5]-tc8*cx[12+3];st=ts1*cx[12+0]-ts2+ts3*cx[12+1]-ts4*cx[12+2];out[outPos+15]=ct+st;out[outPos+16]=ct-st;}}this.mdct_sub48=function(gfc,w0,w1){var wk=w0;var wkPos=286;/* thinking cache performance, ch->gr loop is better than gr->ch loop */for(var ch=0;ch=0;--k){var bu,bd;bu=mdct_enc[mdct_encPos+k]*ca[20+k]+mdct_enc[mdct_encPos+-1-k]*cs[28+k];bd=mdct_enc[mdct_encPos+k]*cs[28+k]-mdct_enc[mdct_encPos+-1-k]*ca[20+k];mdct_enc[mdct_encPos+-1-k]=bu;mdct_enc[mdct_encPos+k]=bd;}}}}wk=w1;wkPos=286;if(gfc.mode_gr==1){for(var i=0;i<18;i++){System.arraycopy(gfc.sb_sample[ch][1][i],0,gfc.sb_sample[ch][0][i],0,32);}}}};}//package mp3; function III_psy_ratio(){this.thm=new III_psy_xmin();this.en=new III_psy_xmin();}/** * ENCDELAY The encoder delay. * * Minimum allowed is MDCTDELAY (see below) * * The first 96 samples will be attenuated, so using a value less than 96 * will result in corrupt data for the first 96-ENCDELAY samples. * * suggested: 576 set to 1160 to sync with FhG. */Encoder.ENCDELAY=576;/** * make sure there is at least one complete frame after the last frame * containing real data * * Using a value of 288 would be sufficient for a a very sophisticated * decoder that can decode granule-by-granule instead of frame by frame. But * lets not assume this, and assume the decoder will not decode frame N * unless it also has data for frame N+1 */Encoder.POSTDELAY=1152;/** * delay of the MDCT used in mdct.c original ISO routines had a delay of * 528! Takehiro's routines: */Encoder.MDCTDELAY=48;Encoder.FFTOFFSET=224+Encoder.MDCTDELAY;/** * Most decoders, including the one we use, have a delay of 528 samples. */Encoder.DECDELAY=528;/** * number of subbands */Encoder.SBLIMIT=32;/** * parition bands bands */Encoder.CBANDS=64;/** * number of critical bands/scale factor bands where masking is computed */Encoder.SBPSY_l=21;Encoder.SBPSY_s=12;/** * total number of scalefactor bands encoded */Encoder.SBMAX_l=22;Encoder.SBMAX_s=13;Encoder.PSFB21=6;Encoder.PSFB12=6;/** * FFT sizes */Encoder.BLKSIZE=1024;Encoder.HBLKSIZE=Encoder.BLKSIZE/2+1;Encoder.BLKSIZE_s=256;Encoder.HBLKSIZE_s=Encoder.BLKSIZE_s/2+1;Encoder.NORM_TYPE=0;Encoder.START_TYPE=1;Encoder.SHORT_TYPE=2;Encoder.STOP_TYPE=3;/** *
             * Mode Extention:
             * When we are in stereo mode, there are 4 possible methods to store these
             * two channels. The stereo modes -m? are using a subset of them.
             *
             *  -ms: MPG_MD_LR_LR
             *  -mj: MPG_MD_LR_LR and MPG_MD_MS_LR
             *  -mf: MPG_MD_MS_LR
             *  -mi: all
             * 
    */Encoder.MPG_MD_LR_LR=0;Encoder.MPG_MD_LR_I=1;Encoder.MPG_MD_MS_LR=2;Encoder.MPG_MD_MS_I=3;Encoder.fircoef=[-0.0207887*5,-0.0378413*5,-0.0432472*5,-0.031183*5,7.79609e-18*5,0.0467745*5,0.10091*5,0.151365*5,0.187098*5];function Encoder(){var FFTOFFSET=Encoder.FFTOFFSET;var MPG_MD_MS_LR=Encoder.MPG_MD_MS_LR;//BitStream bs; //PsyModel psy; //VBRTag vbr; //QuantizePVT qupvt; var bs=null;this.psy=null;var psy=null;var vbr=null;var qupvt=null;//public final void setModules(BitStream bs, PsyModel psy, QuantizePVT qupvt, // VBRTag vbr) { this.setModules=function(_bs,_psy,_qupvt,_vbr){bs=_bs;this.psy=_psy;psy=_psy;vbr=_vbr;qupvt=_qupvt;};var newMDCT=new NewMDCT();/*********************************************************************** * * encoder and decoder delays * ***********************************************************************//** *
                 * layer III enc->dec delay:  1056 (1057?)   (observed)
                 * layer  II enc->dec delay:   480  (481?)   (observed)
                 *
                 * polyphase 256-16             (dec or enc)        = 240
                 * mdct      256+32  (9*32)     (dec or enc)        = 288
                 * total:    512+16
                 *
                 * My guess is that delay of polyphase filterbank is actualy 240.5
                 * (there are technical reasons for this, see postings in mp3encoder).
                 * So total Encode+Decode delay = ENCDELAY + 528 + 1
                 * 
    *//** * auto-adjust of ATH, useful for low volume Gabriel Bouvigne 3 feb 2001 * * modifies some values in gfp.internal_flags.ATH (gfc.ATH) *///private void adjust_ATH(final LameInternalFlags gfc) { function adjust_ATH(gfc){var gr2_max,max_pow;if(gfc.ATH.useAdjust==0){gfc.ATH.adjust=1.0;/* no adjustment */return;}/* jd - 2001 mar 12, 27, jun 30 *//* loudness based on equal loudness curve; *//* use granule with maximum combined loudness */max_pow=gfc.loudness_sq[0][0];gr2_max=gfc.loudness_sq[1][0];if(gfc.channels_out==2){max_pow+=gfc.loudness_sq[0][1];gr2_max+=gfc.loudness_sq[1][1];}else{max_pow+=max_pow;gr2_max+=gr2_max;}if(gfc.mode_gr==2){max_pow=Math.max(max_pow,gr2_max);}max_pow*=0.5;/* max_pow approaches 1.0 for full band noise *//* jd - 2001 mar 31, jun 30 *//* user tuning of ATH adjustment region */max_pow*=gfc.ATH.aaSensitivityP;/* * adjust ATH depending on range of maximum value *//* jd - 2001 feb27, mar12,20, jun30, jul22 *//* continuous curves based on approximation *//* to GB's original values. *//* For an increase in approximate loudness, *//* set ATH adjust to adjust_limit immediately *//* after a delay of one frame. *//* For a loudness decrease, reduce ATH adjust *//* towards adjust_limit gradually. *//* max_pow is a loudness squared or a power. */if(max_pow>0.03125){/* ((1 - 0.000625)/ 31.98) from curve below */if(gfc.ATH.adjust>=1.0){gfc.ATH.adjust=1.0;}else{/* preceding frame has lower ATH adjust; *//* ascend only to the preceding adjust_limit *//* in case there is leading low volume */if(gfc.ATH.adjust=adj_lim_new){/* descend gradually */gfc.ATH.adjust*=adj_lim_new*0.075+0.925;if(gfc.ATH.adjust=adj_lim_new){gfc.ATH.adjust=adj_lim_new;}else{/* preceding frame has lower ATH adjust; *//* ascend only to the preceding adjust_limit */if(gfc.ATH.adjust * some simple statistics * * bitrate index 0: free bitrate . not allowed in VBR mode * : bitrates, kbps depending on MPEG version * bitrate index 15: forbidden * * mode_ext: * 0: LR * 1: LR-i * 2: MS * 3: MS-i * */function updateStats(gfc){var gr,ch;/* count bitrate indices */gfc.bitrate_stereoMode_Hist[gfc.bitrate_index][4]++;gfc.bitrate_stereoMode_Hist[15][4]++;/* count 'em for every mode extension in case of 2 channel encoding */if(gfc.channels_out==2){gfc.bitrate_stereoMode_Hist[gfc.bitrate_index][gfc.mode_ext]++;gfc.bitrate_stereoMode_Hist[15][gfc.mode_ext]++;}for(gr=0;gr * encodeframe() Layer 3 * * encode a single frame * * * lame_encode_frame() * * * gr 0 gr 1 * inbuf: |--------------|--------------|--------------| * * * Polyphase (18 windows, each shifted 32) * gr 0: * window1 <----512---. * window18 <----512---. * * gr 1: * window1 <----512---. * window18 <----512---. * * * * MDCT output: |--------------|--------------|--------------| * * FFT's <---------1024---------. * <---------1024-------. * * * * inbuf = buffer of PCM data size=MP3 framesize * encoder acts on inbuf[ch][0], but output is delayed by MDCTDELAY * so the MDCT coefficints are from inbuf[ch][-MDCTDELAY] * * psy-model FFT has a 1 granule delay, so we feed it data for the * next granule. * FFT is centered over granule: 224+576+224 * So FFT starts at: 576-224-MDCTDELAY * * MPEG2: FFT ends at: BLKSIZE+576-224-MDCTDELAY (1328) * MPEG1: FFT ends at: BLKSIZE+2*576-224-MDCTDELAY (1904) * * MPEG2: polyphase first window: [0..511] * 18th window: [544..1055] (1056) * MPEG1: 36th window: [1120..1631] (1632) * data needed: 512+framesize-32 * * A close look newmdct.c shows that the polyphase filterbank * only uses data from [0..510] for each window. Perhaps because the window * used by the filterbank is zero for the last point, so Takehiro's * code doesn't bother to compute with it. * * FFT starts at 576-224-MDCTDELAY (304) = 576-FFTOFFSET * * */this.lame_encode_mp3_frame=function(gfp,inbuf_l,inbuf_r,mp3buf,mp3bufPos,mp3buf_size){var mp3count;var masking_LR=new_array_n([2,2]);/* * LR masking & * energy */masking_LR[0][0]=new III_psy_ratio();masking_LR[0][1]=new III_psy_ratio();masking_LR[1][0]=new III_psy_ratio();masking_LR[1][1]=new III_psy_ratio();var masking_MS=new_array_n([2,2]);/* MS masking & energy */masking_MS[0][0]=new III_psy_ratio();masking_MS[0][1]=new III_psy_ratio();masking_MS[1][0]=new III_psy_ratio();masking_MS[1][1]=new III_psy_ratio();//III_psy_ratio masking[][]; var masking;/* pointer to selected maskings */var inbuf=[null,null];var gfc=gfp.internal_flags;var tot_ener=new_float_n([2,4]);var ms_ener_ratio=[.5,.5];var pe=[[0.,0.],[0.,0.]];var pe_MS=[[0.,0.],[0.,0.]];//float[][] pe_use; var pe_use;var ch,gr;inbuf[0]=inbuf_l;inbuf[1]=inbuf_r;if(gfc.lame_encode_frame_init==0){/* first run? */lame_encode_frame_init(gfp,inbuf);}/********************** padding *****************************//** *
                     * padding method as described in
                     * "MPEG-Layer3 / Bitstream Syntax and Decoding"
                     * by Martin Sieler, Ralph Sperschneider
                     *
                     * note: there is no padding for the very first frame
                     *
                     * Robert Hegemann 2000-06-22
                     * 
    */gfc.padding=0;if((gfc.slot_lag-=gfc.frac_SpF)<0){gfc.slot_lag+=gfp.out_samplerate;gfc.padding=1;}/**************************************** * Stage 1: psychoacoustic model * ****************************************/if(gfc.psymodel!=0){/* * psychoacoustic model psy model has a 1 granule (576) delay that * we must compensate for (mt 6/99). */var ret;var bufp=[null,null];/* address of beginning of left & right granule */var bufpPos=0;/* address of beginning of left & right granule */var blocktype=new_int(2);for(gr=0;gr0)ms_ener_ratio[gr]=tot_ener[gr][3]/ms_ener_ratio[gr];}/* block type flags */for(ch=0;ch * [0] and [1] are the results for the two granules in MPEG-1, * in MPEG-2 it's only a faked averaging of the same value * _prev is the value of the last granule of the previous frame * _next is the value of the first granule of the next frame * */var sum_pe_MS=0.;var sum_pe_LR=0.;for(gr=0;gr * 1 = amplify within 50% of max (on db scale)
    * 2 = amplify only most distorted band
    * 3 = method 1 and refine with method 2
    */this.noise_shaping_amp=0;/** * 0 = no substep
    * 1 = use substep shaping at last step(VBR only)
    * (not implemented yet)
    * 2 = use substep inside loop
    * 3 = use substep inside loop and last step
    */this.substep_shaping=0;/** * 1 = gpsycho. 0 = none */this.psymodel=0;/** * 0 = stop at over=0, all scalefacs amplified or
    * a scalefac has reached max value
    * 1 = stop when all scalefacs amplified or a scalefac has reached max value
    * 2 = stop when all scalefacs amplified */this.noise_shaping_stop=0;/** * 0 = no, 1 = yes */this.subblock_gain=0;/** * 0 = no. 1=outside loop 2=inside loop(slow) */this.use_best_huffman=0;/** * 0 = stop early after 0 distortion found. 1 = full search */this.full_outer_loop=0;//public IIISideInfo l3_side = new IIISideInfo(); this.l3_side=new IIISideInfo();this.ms_ratio=new_float(2);/* used for padding *//** * padding for the current frame? */this.padding=0;this.frac_SpF=0;this.slot_lag=0;/** * optional ID3 tags *///public ID3TagSpec tag_spec; this.tag_spec=null;this.nMusicCRC=0;/* variables used by Quantize *///public int OldValue[] = new int[2]; this.OldValue=new_int(2);//public int CurrentStep[] = new int[2]; this.CurrentStep=new_int(2);this.masking_lower=0.;//public int bv_scf[] = new int[576]; this.bv_scf=new_int(576);//public int pseudohalf[] = new int[L3Side.SFBMAX]; this.pseudohalf=new_int(L3Side.SFBMAX);/** * will be set in lame_init_params */this.sfb21_extra=false;/* BPC = maximum number of filter convolution windows to precompute *///public float[][] inbuf_old = new float[2][]; this.inbuf_old=new Array(2);//public float[][] blackfilt = new float[2 * BPC + 1][]; this.blackfilt=new Array(2*LameInternalFlags.BPC+1);//public double itime[] = new double[2]; this.itime=new_double(2);this.sideinfo_len=0;/* variables for newmdct.c *///public float sb_sample[][][][] = new float[2][2][18][Encoder.SBLIMIT]; this.sb_sample=new_float_n([2,2,18,Encoder.SBLIMIT]);this.amp_filter=new_float(32);/* variables for BitStream *//** *
                 * mpeg1: buffer=511 bytes  smallest frame: 96-38(sideinfo)=58
                 * max number of frames in reservoir:  8
                 * mpeg2: buffer=255 bytes.  smallest frame: 24-23bytes=1
                 * with VBR, if you are encoding all silence, it is possible to
                 * have 8kbs/24khz frames with 1byte of data each, which means we need
                 * to buffer up to 255 headers!
                 * 
    *//** * also, max_header_buf has to be a power of two *//** * max size of header is 38 */function Header(){this.write_timing=0;this.ptr=0;//public byte buf[] = new byte[MAX_HEADER_LEN]; this.buf=new_byte(MAX_HEADER_LEN);}this.header=new Array(LameInternalFlags.MAX_HEADER_BUF);this.h_ptr=0;this.w_ptr=0;this.ancillary_flag=0;/* variables for Reservoir *//** * in bits */this.ResvSize=0;/** * in bits */this.ResvMax=0;//public ScaleFac scalefac_band = new ScaleFac(); this.scalefac_band=new ScaleFac();/* daa from PsyModel *//* The static variables "r", "phi_sav", "new", "old" and "oldest" have *//* to be remembered for the unpredictability measure. For "r" and *//* "phi_sav", the first index from the left is the channel select and *//* the second index is the "age" of the data. */this.minval_l=new_float(Encoder.CBANDS);this.minval_s=new_float(Encoder.CBANDS);this.nb_1=new_float_n([4,Encoder.CBANDS]);this.nb_2=new_float_n([4,Encoder.CBANDS]);this.nb_s1=new_float_n([4,Encoder.CBANDS]);this.nb_s2=new_float_n([4,Encoder.CBANDS]);this.s3_ss=null;this.s3_ll=null;this.decay=0.;//public III_psy_xmin[] thm = new III_psy_xmin[4]; //public III_psy_xmin[] en = new III_psy_xmin[4]; this.thm=new Array(4);this.en=new Array(4);/** * fft and energy calculation */this.tot_ener=new_float(4);/* loudness calculation (for adaptive threshold of hearing) *//** * loudness^2 approx. per granule and channel */this.loudness_sq=new_float_n([2,2]);/** * account for granule delay of L3psycho_anal */this.loudness_sq_save=new_float(2);/** * Scale Factor Bands */this.mld_l=new_float(Encoder.SBMAX_l);this.mld_s=new_float(Encoder.SBMAX_s);this.bm_l=new_int(Encoder.SBMAX_l);this.bo_l=new_int(Encoder.SBMAX_l);this.bm_s=new_int(Encoder.SBMAX_s);this.bo_s=new_int(Encoder.SBMAX_s);this.npart_l=0;this.npart_s=0;this.s3ind=new_int_n([Encoder.CBANDS,2]);this.s3ind_s=new_int_n([Encoder.CBANDS,2]);this.numlines_s=new_int(Encoder.CBANDS);this.numlines_l=new_int(Encoder.CBANDS);this.rnumlines_l=new_float(Encoder.CBANDS);this.mld_cb_l=new_float(Encoder.CBANDS);this.mld_cb_s=new_float(Encoder.CBANDS);this.numlines_s_num1=0;this.numlines_l_num1=0;/* ratios */this.pe=new_float(4);this.ms_ratio_s_old=0.;this.ms_ratio_l_old=0.;this.ms_ener_ratio_old=0.;/** * block type */this.blocktype_old=new_int(2);/** * variables used for --nspsytune */this.nsPsy=new NsPsy();/** * used for Xing VBR header */this.VBR_seek_table=new VBRSeekInfo();/** * all ATH related stuff *///public ATH ATH; this.ATH=null;this.PSY=null;this.nogap_total=0;this.nogap_current=0;/* ReplayGain */this.decode_on_the_fly=true;this.findReplayGain=true;this.findPeakSample=true;this.PeakSample=0.;this.RadioGain=0;this.AudiophileGain=0;//public ReplayGain rgdata; this.rgdata=null;/** * gain change required for preventing clipping */this.noclipGainChange=0;/** * user-specified scale factor required for preventing clipping */this.noclipScale=0.;/* simple statistics */this.bitrate_stereoMode_Hist=new_int_n([16,4+1]);/** * norm/start/short/stop/mixed(short)/sum */this.bitrate_blockType_Hist=new_int_n([16,4+1+1]);//public PlottingData pinfo; //public MPGLib.mpstr_tag hip; this.pinfo=null;this.hip=null;this.in_buffer_nsamples=0;//public float[] in_buffer_0; //public float[] in_buffer_1; this.in_buffer_0=null;this.in_buffer_1=null;//public IIterationLoop iteration_loop; this.iteration_loop=null;for(var i=0;i>1;k1=k4;k2=k4<<1;k3=k2+k1;k4=k2<<1;fi=fzPos;gi=fi+kx;do{var f0,f1,f2,f3;f1=fz[fi+0]-fz[fi+k1];f0=fz[fi+0]+fz[fi+k1];f3=fz[fi+k2]-fz[fi+k3];f2=fz[fi+k2]+fz[fi+k3];fz[fi+k2]=f0-f2;fz[fi+0]=f0+f2;fz[fi+k3]=f1-f3;fz[fi+k1]=f1+f3;f1=fz[gi+0]-fz[gi+k1];f0=fz[gi+0]+fz[gi+k1];f3=Util.SQRT2*fz[gi+k3];f2=Util.SQRT2*fz[gi+k2];fz[gi+k2]=f0-f2;fz[gi+0]=f0+f2;fz[gi+k3]=f1-f3;fz[gi+k1]=f1+f3;gi+=k4;fi+=k4;}while(fi=0);fht(x_real[b],x,Encoder.BLKSIZE_s/2);/* BLKSIZE_s/2 because of 3DNow! ASM routine *//* BLKSIZE/2 because of 3DNow! ASM routine */}};this.fft_long=function(gfc,y,chn,buffer,bufPos){var jj=Encoder.BLKSIZE/8-1;var x=Encoder.BLKSIZE/2;do{var f0,f1,f2,f3,w;var i=rv_tbl[jj]&0xff;f0=window[i]*buffer[chn][bufPos+i];w=window[i+0x200]*buffer[chn][bufPos+i+0x200];f1=f0-w;f0=f0+w;f2=window[i+0x100]*buffer[chn][bufPos+i+0x100];w=window[i+0x300]*buffer[chn][bufPos+i+0x300];f3=f2-w;f2=f2+w;x-=4;y[x+0]=f0+f2;y[x+2]=f0-f2;y[x+1]=f1+f3;y[x+3]=f1-f3;f0=window[i+0x001]*buffer[chn][bufPos+i+0x001];w=window[i+0x201]*buffer[chn][bufPos+i+0x201];f1=f0-w;f0=f0+w;f2=window[i+0x101]*buffer[chn][bufPos+i+0x101];w=window[i+0x301]*buffer[chn][bufPos+i+0x301];f3=f2-w;f2=f2+w;y[x+Encoder.BLKSIZE/2+0]=f0+f2;y[x+Encoder.BLKSIZE/2+2]=f0-f2;y[x+Encoder.BLKSIZE/2+1]=f1+f3;y[x+Encoder.BLKSIZE/2+3]=f1-f3;}while(--jj>=0);fht(y,x,Encoder.BLKSIZE/2);/* BLKSIZE/2 because of 3DNow! ASM routine */};this.init_fft=function(gfc){/* The type of window used here will make no real difference, but *//* * in the interest of merging nspsytune stuff - switch to blackman * window */for(var i=0;i * L3psycho_anal. Compute psycho acoustics. * * Data returned to the calling program must be delayed by one * granule. * * This is done in two places. * If we do not need to know the blocktype, the copying * can be done here at the top of the program: we copy the data for * the last granule (computed during the last call) before it is * overwritten with the new data. It looks like this: * * 0. static psymodel_data * 1. calling_program_data = psymodel_data * 2. compute psymodel_data * * For data which needs to know the blocktype, the copying must be * done at the end of this loop, and the old values must be saved: * * 0. static psymodel_data_old * 1. compute psymodel_data * 2. compute possible block type of this granule * 3. compute final block type of previous granule based on #2. * 4. calling_program_data = psymodel_data_old * 5. psymodel_data_old = psymodel_data * psycho_loudness_approx * jd - 2001 mar 12 * in: energy - BLKSIZE/2 elements of frequency magnitudes ^ 2 * gfp - uses out_samplerate, ATHtype (also needed for ATHformula) * returns: loudness^2 approximation, a positive value roughly tuned for a value * of 1.0 for signals near clipping. * notes: When calibrated, feeding this function binary white noise at sample * values +32767 or -32768 should return values that approach 3. * ATHformula is used to approximate an equal loudness curve. * future: Data indicates that the shape of the equal loudness curve varies * with intensity. This function might be improved by using an equal * loudness curve shaped for typical playback levels (instead of the * ATH, that is shaped for the threshold). A flexible realization might * simply bend the existing ATH curve to achieve the desired shape. * However, the potential gain may not be enough to justify an effort. * */function psycho_loudness_approx(energy,gfc){var loudness_power=0.0;/* apply weights to power in freq. bands */for(var i=0;i=0;--j){var l=wsamp_l[wsamp_lPos+0][j];var r=wsamp_l[wsamp_lPos+1][j];wsamp_l[wsamp_lPos+0][j]=(l+r)*Util.SQRT2*0.5;wsamp_l[wsamp_lPos+1][j]=(l-r)*Util.SQRT2*0.5;}for(var b=2;b>=0;--b){for(var j=Encoder.BLKSIZE_s-1;j>=0;--j){var l=wsamp_s[wsamp_sPos+0][b][j];var r=wsamp_s[wsamp_sPos+1][b][j];wsamp_s[wsamp_sPos+0][b][j]=(l+r)*Util.SQRT2*0.5;wsamp_s[wsamp_sPos+1][b][j]=(l-r)*Util.SQRT2*0.5;}}}/********************************************************************* * compute energies *********************************************************************/fftenergy[0]=NON_LINEAR_SCALE_ENERGY(wsamp_l[wsamp_lPos+0][0]);fftenergy[0]*=fftenergy[0];for(var j=Encoder.BLKSIZE/2-1;j>=0;--j){var re=wsamp_l[wsamp_lPos+0][Encoder.BLKSIZE/2-j];var im=wsamp_l[wsamp_lPos+0][Encoder.BLKSIZE/2+j];fftenergy[Encoder.BLKSIZE/2-j]=NON_LINEAR_SCALE_ENERGY((re*re+im*im)*0.5);}for(var b=2;b>=0;--b){fftenergy_s[b][0]=wsamp_s[wsamp_sPos+0][b][0];fftenergy_s[b][0]*=fftenergy_s[b][0];for(var j=Encoder.BLKSIZE_s/2-1;j>=0;--j){var re=wsamp_s[wsamp_sPos+0][b][Encoder.BLKSIZE_s/2-j];var im=wsamp_s[wsamp_sPos+0][b][Encoder.BLKSIZE_s/2+j];fftenergy_s[b][Encoder.BLKSIZE_s/2-j]=NON_LINEAR_SCALE_ENERGY((re*re+im*im)*0.5);}}/* total energy */{var totalenergy=0.0;for(var j=11;j * For example, with i = 10*log10(m2/m1)/10*16 (= log10(m2/m1)*16) * * abs(i)>8 is equivalent (as i is an integer) to * abs(i)>=9 * i>=9 || i<=-9 * equivalent to (as i is the biggest integer smaller than log10(m2/m1)*16 * or the smallest integer bigger than log10(m2/m1)*16 depending on the sign of log10(m2/m1)*16) * log10(m2/m1)>=9/16 || log10(m2/m1)<=-9/16 * exp10 is strictly increasing thus this is equivalent to * m2/m1 >= 10^(9/16) || m2/m1<=10^(-9/16) which are comparisons to constants * *//** * as in if(i>8) */var I1LIMIT=8;/** * as in if(i>24) . changed 23 */var I2LIMIT=23;/** * as in if(m<15) */var MLIMIT=15;var ma_max_i1;var ma_max_i2;var ma_max_m;/** * This is the masking table:
    * According to tonality, values are going from 0dB (TMN) to 9.3dB (NMT).
    * After additive masking computation, 8dB are added, so final values are * going from 8dB to 17.3dB * * pow(10, -0.0..-0.6) */var tab=[1.0,0.79433,0.63096,0.63096,0.63096,0.63096,0.63096,0.25119,0.11749];function init_mask_add_max_values(){ma_max_i1=Math.pow(10,(I1LIMIT+1)/16.0);ma_max_i2=Math.pow(10,(I2LIMIT+1)/16.0);ma_max_m=Math.pow(10,MLIMIT/10.0);}var table1=[3.3246*3.3246,3.23837*3.23837,3.15437*3.15437,3.00412*3.00412,2.86103*2.86103,2.65407*2.65407,2.46209*2.46209,2.284*2.284,2.11879*2.11879,1.96552*1.96552,1.82335*1.82335,1.69146*1.69146,1.56911*1.56911,1.46658*1.46658,1.37074*1.37074,1.31036*1.31036,1.25264*1.25264,1.20648*1.20648,1.16203*1.16203,1.12765*1.12765,1.09428*1.09428,1.0659*1.0659,1.03826*1.03826,1.01895*1.01895,1];var table2=[1.33352*1.33352,1.35879*1.35879,1.38454*1.38454,1.39497*1.39497,1.40548*1.40548,1.3537*1.3537,1.30382*1.30382,1.22321*1.22321,1.14758*1.14758,1];var table3=[2.35364*2.35364,2.29259*2.29259,2.23313*2.23313,2.12675*2.12675,2.02545*2.02545,1.87894*1.87894,1.74303*1.74303,1.61695*1.61695,1.49999*1.49999,1.39148*1.39148,1.29083*1.29083,1.19746*1.19746,1.11084*1.11084,1.03826*1.03826];/** * addition of simultaneous masking Naoki Shibata 2000/7 */function mask_add(m1,m2,kk,b,gfc,shortblock){var ratio;if(m2>m1){if(m2=m2*ma_max_i2)return m1+m2;ratio=m1/m2;}/* Should always be true, just checking */m1+=m2;//if (((long)(b + 3) & 0xffffffff) <= 3 + 3) { if(b+3<=3+3){/* approximately, 1 bark = 3 partitions *//* 65% of the cases *//* originally 'if(i > 8)' */if(ratio>=ma_max_i1){/* 43% of the total */return m1;}/* 22% of the total */var i=0|Util.FAST_LOG10_X(ratio,16.0);return m1*table2[i];}/** *
                     * m<15 equ log10((m1+m2)/gfc.ATH.cb[k])<1.5
                     * equ (m1+m2)/gfc.ATH.cb[k]<10^1.5
                     * equ (m1+m2)<10^1.5 * gfc.ATH.cb[k]
                     * 
    */var i=0|Util.FAST_LOG10_X(ratio,16.0);if(shortblock!=0){m2=gfc.ATH.cb_s[kk]*gfc.ATH.adjust;}else{m2=gfc.ATH.cb_l[kk]*gfc.ATH.adjust;}if(m1 0) { */if(m1>m2){var f,r;f=1.0;if(i<=13)f=table3[i];r=Util.FAST_LOG10_X(m1/m2,10.0/15.0);return m1*((table1[i]-f)*r+f);}if(i>13)return m1;return m1*table3[i];}/* 10% of total */return m1*table1[i];}var table2_=[1.33352*1.33352,1.35879*1.35879,1.38454*1.38454,1.39497*1.39497,1.40548*1.40548,1.3537*1.3537,1.30382*1.30382,1.22321*1.22321,1.14758*1.14758,1];/** * addition of simultaneous masking Naoki Shibata 2000/7 */function vbrpsy_mask_add(m1,m2,b){var ratio;if(m1<0){m1=0;}if(m2<0){m2=0;}if(m1<=0){return m2;}if(m2<=0){return m1;}if(m2>m1){ratio=m2/m1;}else{ratio=m1/m2;}if(-2<=b&&b<=2){/* approximately, 1 bark = 3 partitions *//* originally 'if(i > 8)' */if(ratio>=ma_max_i1){return m1+m2;}else{var i=0|Util.FAST_LOG10_X(ratio,16.0);return(m1+m2)*table2_[i];}}if(ratio1){for(var sb=0;sb1.58*gfc.thm[1].l[sb]||gfc.thm[1].l[sb]>1.58*gfc.thm[0].l[sb])continue;var mld=gfc.mld_l[sb]*gfc.en[3].l[sb];var rmid=Math.max(gfc.thm[2].l[sb],Math.min(gfc.thm[3].l[sb],mld));mld=gfc.mld_l[sb]*gfc.en[2].l[sb];var rside=Math.max(gfc.thm[3].l[sb],Math.min(gfc.thm[2].l[sb],mld));gfc.thm[2].l[sb]=rmid;gfc.thm[3].l[sb]=rside;}for(var sb=0;sb1.58*gfc.thm[1].s[sb][sblock]||gfc.thm[1].s[sb][sblock]>1.58*gfc.thm[0].s[sb][sblock])continue;var mld=gfc.mld_s[sb]*gfc.en[3].s[sb][sblock];var rmid=Math.max(gfc.thm[2].s[sb][sblock],Math.min(gfc.thm[3].s[sb][sblock],mld));mld=gfc.mld_s[sb]*gfc.en[2].s[sb][sblock];var rside=Math.max(gfc.thm[3].s[sb][sblock],Math.min(gfc.thm[2].s[sb][sblock],mld));gfc.thm[2].s[sb][sblock]=rmid;gfc.thm[3].s[sb][sblock]=rside;}}}/** * Adjust M/S maskings if user set "msfix" * * Naoki Shibata 2000 */function ns_msfix(gfc,msfix,athadjust){var msfix2=msfix;var athlower=Math.pow(10,athadjust);msfix*=2.0;msfix2*=2.0;for(var sb=0;sb=npart_s){++sb;break;}// iff failed, it may indicate some index error elsewhere {/* at transition sfb . sfb+1 */var w_curr=gfc.PSY.bo_s_weight[sb];var w_next=1.0-w_curr;enn=w_curr*eb[b];thmm=w_curr*thr[b];gfc.en[chn].s[sb][sblock]+=enn;gfc.thm[chn].s[sb][sblock]+=thmm;enn=w_next*eb[b];thmm=w_next*thr[b];}}/* zero initialize the rest */for(;sb=npart_l){++sb;break;}{/* at transition sfb . sfb+1 */var w_curr=gfc.PSY.bo_l_weight[sb];var w_next=1.0-w_curr;enn=w_curr*eb[b];thmm=w_curr*thr[b];gfc.en[chn].l[sb]+=enn;gfc.thm[chn].l[sb]+=thmm;enn=w_next*eb[b];thmm=w_next*thr[b];}}/* zero initialize the rest */for(;sb=1.0){/* 99.7% of the time */return x;}if(r<=0.0)return y;if(y>0.0){/* rest of the time */return Math.pow(x/y,r)*y;}/* never happens */return 0.0;}/** * these values are tuned only for 44.1kHz... */var regcoef_s=[11.8,13.6,17.2,32,46.5,51.3,57.5,67.1,71.5,84.6,97.6,130];function pecalc_s(mr,masking_lower){var pe_s=1236.28/4;for(var sb=0;sb0.0){var x=thm*masking_lower;var en=mr.en.s[sb][sblock];if(en>x){if(en>x*1e10){pe_s+=regcoef_s[sb]*(10.0*LOG10);}else{pe_s+=regcoef_s[sb]*Util.FAST_LOG10(en/x);}}}}}return pe_s;}/** * these values are tuned only for 44.1kHz... */var regcoef_l=[6.8,5.8,5.8,6.4,6.5,9.9,12.1,14.4,15,18.9,21.6,26.9,34.2,40.2,46.8,56.5,60.7,73.9,85.7,93.4,126.1];function pecalc_l(mr,masking_lower){var pe_l=1124.23/4;for(var sb=0;sb0.0){var x=thm*masking_lower;var en=mr.en.l[sb];if(en>x){if(en>x*1e10){pe_l+=regcoef_l[sb]*(10.0*LOG10);}else{pe_l+=regcoef_l[sb]*Util.FAST_LOG10(en/x);}}}}return pe_l;}function calc_energy(gfc,fftenergy,eb,max,avg){var b,j;for(b=j=0;b0.0){var m=max[b];if(mlast_tab_entry)k=last_tab_entry;mask_idx[b]=k;}else{mask_idx[b]=0;}for(b=1;b0.0){var m=max[b-1];if(mlast_tab_entry)k=last_tab_entry;mask_idx[b]=k;}else{mask_idx[b]=0;}}a=avg[b-1]+avg[b];if(a>0.0){var m=max[b-1];if(mlast_tab_entry)k=last_tab_entry;mask_idx[b]=k;}else{mask_idx[b]=0;}}var fircoef=[-8.65163e-18*2,-0.00851586*2,-6.74764e-18*2,0.0209036*2,-3.36639e-17*2,-0.0438162*2,-1.54175e-17*2,0.0931738*2,-5.52212e-17*2,-0.313819*2];this.L3psycho_anal_ns=function(gfp,buffer,bufPos,gr_out,masking_ratio,masking_MS_ratio,percep_entropy,percep_MS_entropy,energy,blocktype_d){/* * to get a good cache performance, one has to think about the sequence, * in which the variables are used. */var gfc=gfp.internal_flags;/* fft and energy calculation */var wsamp_L=new_float_n([2,Encoder.BLKSIZE]);var wsamp_S=new_float_n([2,3,Encoder.BLKSIZE_s]);/* convolution */var eb_l=new_float(Encoder.CBANDS+1);var eb_s=new_float(Encoder.CBANDS+1);var thr=new_float(Encoder.CBANDS+2);/* block type */var blocktype=new_int(2),uselongblock=new_int(2);/* usual variables like loop indices, etc.. */var numchn,chn;var b,i,j,k;var sb,sblock;/* variables used for --nspsytune */var ns_hpfsmpl=new_float_n([2,576]);var pcfact;var mask_idx_l=new_int(Encoder.CBANDS+2),mask_idx_s=new_int(Encoder.CBANDS+2);Arrays.fill(mask_idx_s,0);numchn=gfc.channels_out;/* chn=2 and 3 = Mid and Side channels */if(gfp.mode==MPEGMode.JOINT_STEREO)numchn=4;if(gfp.VBR==VbrMode.vbr_off)pcfact=gfc.ResvMax==0?0:gfc.ResvSize/gfc.ResvMax*0.5;else if(gfp.VBR==VbrMode.vbr_rh||gfp.VBR==VbrMode.vbr_mtrh||gfp.VBR==VbrMode.vbr_mt){pcfact=0.6;}else pcfact=1.0;/********************************************************************** * Apply HPF of fs/4 to the input signal. This is used for attack * detection / handling. **********************************************************************//* Don't copy the input buffer into a temporary buffer *//* unroll the loop 2 times */for(chn=0;chn2){/* MS maskings *//* percep_MS_entropy [chn-2] = gfc . pe [chn]; */masking_MS_ratio[gr_out][chn].en.assign(gfc.en[chn+2]);masking_MS_ratio[gr_out][chn].thm.assign(gfc.thm[chn+2]);}}for(chn=0;chnen_subshort[i+3-2]){p=p/en_subshort[i+3-2];}else if(en_subshort[i+3-2]>p*10.0){p=en_subshort[i+3-2]/(p*10.0);}else p=0.0;attack_intensity[i+3]=p;}}if(gfp.analysis){var x=attack_intensity[0];for(i=1;i<12;i++){if(xattackThreshold)ns_attacks[i/3]=i%3+1;}/* * should have energy change between short blocks, in order to avoid * periodic signals */for(i=1;i<4;i++){var ratio;if(en_short[i-1]>en_short[i]){ratio=en_short[i-1]/en_short[i];}else{ratio=en_short[i]/en_short[i-1];}if(ratio<1.7){ns_attacks[i]=0;if(i==1)ns_attacks[0]=0;}}if(ns_attacks[0]!=0&&gfc.nsPsy.lastAttacks[chn]!=0)ns_attacks[0]=0;if(gfc.nsPsy.lastAttacks[chn]==3||ns_attacks[0]+ns_attacks[1]+ns_attacks[2]+ns_attacks[3]!=0){ns_uselongblock=0;if(ns_attacks[1]!=0&&ns_attacks[0]!=0)ns_attacks[1]=0;if(ns_attacks[2]!=0&&ns_attacks[1]!=0)ns_attacks[2]=0;if(ns_attacks[3]!=0&&ns_attacks[2]!=0)ns_attacks[3]=0;}if(chn<2){uselongblock[chn]=ns_uselongblock;}else{if(ns_uselongblock==0){uselongblock[0]=uselongblock[1]=0;}}/* * there is a one granule delay. Copy maskings computed last call * into masking_ratio to return to calling program. */energy[chn]=gfc.tot_ener[chn];/********************************************************************* * compute FFTs *********************************************************************/wsamp_s=wsamp_S;wsamp_l=wsamp_L;compute_ffts(gfp,fftenergy,fftenergy_s,wsamp_l,chn&1,wsamp_s,chn&1,gr_out,chn,buffer,bufPos);/********************************************************************* * Calculate the energy and the tonality of each partition. *********************************************************************/calc_energy(gfc,fftenergy,eb_l,max,avg);calc_mask_index_l(gfc,max,avg,mask_idx_l);/* compute masking thresholds for short blocks */for(sblock=0;sblock<3;sblock++){var enn,thmm;compute_masking_s(gfp,fftenergy_s,eb_s,thr,chn,sblock);convert_partition2scalefac_s(gfc,eb_s,thr,chn,sblock);/**** short block pre-echo control ****/for(sb=0;sb=2||ns_attacks[sblock+1]==1){var idx=sblock!=0?sblock-1:2;var p=NS_INTERP(gfc.thm[chn].s[sb][idx],thmm,NS_PREECHO_ATT1*pcfact);thmm=Math.min(thmm,p);}if(ns_attacks[sblock]==1){var idx=sblock!=0?sblock-1:2;var p=NS_INTERP(gfc.thm[chn].s[sb][idx],thmm,NS_PREECHO_ATT2*pcfact);thmm=Math.min(thmm,p);}else if(sblock!=0&&ns_attacks[sblock-1]==3||sblock==0&&gfc.nsPsy.lastAttacks[chn]==3){var idx=sblock!=2?sblock+1:0;var p=NS_INTERP(gfc.thm[chn].s[sb][idx],thmm,NS_PREECHO_ATT2*pcfact);thmm=Math.min(thmm,p);}/* pulse like signal detection for fatboy.wav and so on */enn=en_subshort[sblock*3+3]+en_subshort[sblock*3+4]+en_subshort[sblock*3+5];if(en_subshort[sblock*3+5]*6 * dont use long block pre-echo control if previous granule was * a short block. This is to avoid the situation: * frame0: quiet (very low masking) * frame1: surge (triggers short blocks) * frame2: regular frame. looks like pre-echo when compared to * frame0, but all pre-echo was in frame1. * *//* * chn=0,1 L and R channels * * chn=2,3 S and M channels. */if(gfc.blocktype_old[chn&1]==Encoder.SHORT_TYPE)thr[b]=ecb;else thr[b]=NS_INTERP(Math.min(ecb,Math.min(rpelev*gfc.nb_1[chn][b],rpelev2*gfc.nb_2[chn][b])),ecb,pcfact);gfc.nb_2[chn][b]=gfc.nb_1[chn][b];gfc.nb_1[chn][b]=ecb;}}for(;b<=Encoder.CBANDS;++b){eb_l[b]=0;thr[b]=0;}/* compute masking thresholds for long blocks */convert_partition2scalefac_l(gfc,eb_l,thr,chn);}/* end loop over chn */if(gfp.mode==MPEGMode.STEREO||gfp.mode==MPEGMode.JOINT_STEREO){if(gfp.interChRatio>0.0){calc_interchannel_masking(gfp,gfp.interChRatio);}}if(gfp.mode==MPEGMode.JOINT_STEREO){var msfix;msfix1(gfc);msfix=gfp.msfix;if(Math.abs(msfix)>0.0)ns_msfix(gfc,msfix,gfp.ATHlower*gfc.ATH.adjust);}/*************************************************************** * determine final block type ***************************************************************/block_type_set(gfp,uselongblock,blocktype_d,blocktype);/********************************************************************* * compute the value of PE to return ... no delay and advance *********************************************************************/for(chn=0;chn1){ppe=percep_MS_entropy;ppePos=-2;type=Encoder.NORM_TYPE;if(blocktype_d[0]==Encoder.SHORT_TYPE||blocktype_d[1]==Encoder.SHORT_TYPE)type=Encoder.SHORT_TYPE;mr=masking_MS_ratio[gr_out][chn-2];}else{ppe=percep_entropy;ppePos=0;type=blocktype_d[chn];mr=masking_ratio[gr_out][chn];}if(type==Encoder.SHORT_TYPE)ppe[ppePos+chn]=pecalc_s(mr,gfc.masking_lower);else ppe[ppePos+chn]=pecalc_l(mr,gfc.masking_lower);if(gfp.analysis)gfc.pinfo.pe[gr_out][chn]=ppe[ppePos+chn];}return 0;};function vbrpsy_compute_fft_l(gfp,buffer,bufPos,chn,gr_out,fftenergy,wsamp_l,wsamp_lPos){var gfc=gfp.internal_flags;if(chn<2){fft.fft_long(gfc,wsamp_l[wsamp_lPos],chn,buffer,bufPos);}else if(chn==2){/* FFT data for mid and side channel is derived from L & R */for(var j=Encoder.BLKSIZE-1;j>=0;--j){var l=wsamp_l[wsamp_lPos+0][j];var r=wsamp_l[wsamp_lPos+1][j];wsamp_l[wsamp_lPos+0][j]=(l+r)*Util.SQRT2*0.5;wsamp_l[wsamp_lPos+1][j]=(l-r)*Util.SQRT2*0.5;}}/********************************************************************* * compute energies *********************************************************************/fftenergy[0]=NON_LINEAR_SCALE_ENERGY(wsamp_l[wsamp_lPos+0][0]);fftenergy[0]*=fftenergy[0];for(var j=Encoder.BLKSIZE/2-1;j>=0;--j){var re=wsamp_l[wsamp_lPos+0][Encoder.BLKSIZE/2-j];var im=wsamp_l[wsamp_lPos+0][Encoder.BLKSIZE/2+j];fftenergy[Encoder.BLKSIZE/2-j]=NON_LINEAR_SCALE_ENERGY((re*re+im*im)*0.5);}/* total energy */{var totalenergy=0.0;for(var j=11;j=0;--j){var l=wsamp_s[wsamp_sPos+0][sblock][j];var r=wsamp_s[wsamp_sPos+1][sblock][j];wsamp_s[wsamp_sPos+0][sblock][j]=(l+r)*Util.SQRT2*0.5;wsamp_s[wsamp_sPos+1][sblock][j]=(l-r)*Util.SQRT2*0.5;}}/********************************************************************* * compute energies *********************************************************************/fftenergy_s[sblock][0]=wsamp_s[wsamp_sPos+0][sblock][0];fftenergy_s[sblock][0]*=fftenergy_s[sblock][0];for(var j=Encoder.BLKSIZE_s/2-1;j>=0;--j){var re=wsamp_s[wsamp_sPos+0][sblock][Encoder.BLKSIZE_s/2-j];var im=wsamp_s[wsamp_sPos+0][sblock][Encoder.BLKSIZE_s/2+j];fftenergy_s[sblock][Encoder.BLKSIZE_s/2-j]=NON_LINEAR_SCALE_ENERGY((re*re+im*im)*0.5);}}/** * compute loudness approximation (used for ATH auto-level adjustment) */function vbrpsy_compute_loudness_approximation_l(gfp,gr_out,chn,fftenergy){var gfc=gfp.internal_flags;if(gfp.athaa_loudapprox==2&&chn<2){// no loudness for mid/side ch gfc.loudness_sq[gr_out][chn]=gfc.loudness_sq_save[chn];gfc.loudness_sq_save[chn]=psycho_loudness_approx(fftenergy,gfc);}}var fircoef_=[-8.65163e-18*2,-0.00851586*2,-6.74764e-18*2,0.0209036*2,-3.36639e-17*2,-0.0438162*2,-1.54175e-17*2,0.0931738*2,-5.52212e-17*2,-0.313819*2];/** * Apply HPF of fs/4 to the input signal. This is used for attack detection * / handling. */function vbrpsy_attack_detection(gfp,buffer,bufPos,gr_out,masking_ratio,masking_MS_ratio,energy,sub_short_factor,ns_attacks,uselongblock){var ns_hpfsmpl=new_float_n([2,576]);var gfc=gfp.internal_flags;var n_chn_out=gfc.channels_out;/* chn=2 and 3 = Mid and Side channels */var n_chn_psy=gfp.mode==MPEGMode.JOINT_STEREO?4:n_chn_out;/* Don't copy the input buffer into a temporary buffer *//* unroll the loop 2 times */for(var chn=0;chn2){/* MS maskings *//* percep_MS_entropy [chn-2] = gfc . pe [chn]; */masking_MS_ratio[gr_out][chn].en.assign(gfc.en[chn+2]);masking_MS_ratio[gr_out][chn].thm.assign(gfc.thm[chn+2]);}}for(var chn=0;chn0;++i,--j){var l=ns_hpfsmpl[0][i];var r=ns_hpfsmpl[1][i];ns_hpfsmpl[0][i]=l+r;ns_hpfsmpl[1][i]=l-r;}}/*************************************************************** * determine the block type (window type) ***************************************************************//* calculate energies of each sub-shortblocks */for(var i=0;i<3;i++){en_subshort[i]=gfc.nsPsy.last_en_subshort[chn][i+6];attack_intensity[i]=en_subshort[i]/gfc.nsPsy.last_en_subshort[chn][i+4];en_short[0]+=en_subshort[i];}for(var i=0;i<9;i++){var pfe=pfPos+576/9;var p=1.;for(;pfPosen_subshort[i+3-2]){p=p/en_subshort[i+3-2];}else if(en_subshort[i+3-2]>p*10.0){p=en_subshort[i+3-2]/(p*10.0);}else{p=0.0;}attack_intensity[i+3]=p;}/* pulse like signal detection for fatboy.wav and so on */for(var i=0;i<3;++i){var enn=en_subshort[i*3+3]+en_subshort[i*3+4]+en_subshort[i*3+5];var factor=1.;if(en_subshort[i*3+5]*6attackThreshold){ns_attacks[chn][i/3]=i%3+1;}}/* * should have energy change between short blocks, in order to avoid * periodic signals *//* Good samples to show the effect are Trumpet test songs *//* * GB: tuned (1) to avoid too many short blocks for test sample * TRUMPET *//* * RH: tuned (2) to let enough short blocks through for test sample * FSOL and SNAPS */for(var i=1;i<4;i++){var u=en_short[i-1];var v=en_short[i];var m=Math.max(u,v);if(m<40000){/* (2) */if(u<1.7*v&&v<1.7*u){/* (1) */if(i==1&&ns_attacks[chn][0]<=ns_attacks[chn][i]){ns_attacks[chn][0]=0;}ns_attacks[chn][i]=0;}}}if(ns_attacks[chn][0]<=gfc.nsPsy.lastAttacks[chn]){ns_attacks[chn][0]=0;}if(gfc.nsPsy.lastAttacks[chn]==3||ns_attacks[chn][0]+ns_attacks[chn][1]+ns_attacks[chn][2]+ns_attacks[chn][3]!=0){ns_uselongblock=0;if(ns_attacks[chn][1]!=0&&ns_attacks[chn][0]!=0){ns_attacks[chn][1]=0;}if(ns_attacks[chn][2]!=0&&ns_attacks[chn][1]!=0){ns_attacks[chn][2]=0;}if(ns_attacks[chn][3]!=0&&ns_attacks[chn][2]!=0){ns_attacks[chn][3]=0;}}if(chn<2){uselongblock[chn]=ns_uselongblock;}else{if(ns_uselongblock==0){uselongblock[0]=uselongblock[1]=0;}}/* * there is a one granule delay. Copy maskings computed last call * into masking_ratio to return to calling program. */energy[chn]=gfc.tot_ener[chn];}}function vbrpsy_skip_masking_s(gfc,chn,sblock){if(sblock==0){for(var b=0;b0.0){var m=max[b];if(mlast_tab_entry)k=last_tab_entry;mask_idx[b]=k;}else{mask_idx[b]=0;}for(b=1;b0.0){var m=max[b-1];if(mlast_tab_entry)k=last_tab_entry;mask_idx[b]=k;}else{mask_idx[b]=0;}}a=avg[b-1]+avg[b];if(a>0.0){var m=max[b-1];if(mlast_tab_entry)k=last_tab_entry;mask_idx[b]=k;}else{mask_idx[b]=0;}}function vbrpsy_compute_masking_s(gfp,fftenergy_s,eb,thr,chn,sblock){var gfc=gfp.internal_flags;var max=new float[Encoder.CBANDS](),avg=new_float(Encoder.CBANDS);var i,j,b;var mask_idx_s=new int[Encoder.CBANDS]();for(b=j=0;bx){thr[b]=x;}}if(gfc.masking_lower>1){thr[b]*=gfc.masking_lower;}if(thr[b]>eb[b]){thr[b]=eb[b];}if(gfc.masking_lower<1){thr[b]*=gfc.masking_lower;}}for(;b * dont use long block pre-echo control if previous granule was * a short block. This is to avoid the situation: * frame0: quiet (very low masking) * frame1: surge (triggers short blocks) * frame2: regular frame. looks like pre-echo when compared to * frame0, but all pre-echo was in frame1. * *//* * chn=0,1 L and R channels chn=2,3 S and M channels. */if(gfc.blocktype_old[chn&0x01]==Encoder.SHORT_TYPE){var ecb_limit=rpelev*gfc.nb_1[chn][b];if(ecb_limit>0){thr[b]=Math.min(ecb,ecb_limit);}else{/** *
                                 * Robert 071209:
                                 * Because we don't calculate long block psy when we know a granule
                                 * should be of short blocks, we don't have any clue how the granule
                                 * before would have looked like as a long block. So we have to guess
                                 * a little bit for this END_TYPE block.
                                 * Most of the time we get away with this sloppyness. (fingers crossed :)
                                 * The speed increase is worth it.
                                 * 
    */thr[b]=Math.min(ecb,eb_l[b]*NS_PREECHO_ATT2);}}else{var ecb_limit_2=rpelev2*gfc.nb_2[chn][b];var ecb_limit_1=rpelev*gfc.nb_1[chn][b];var ecb_limit;if(ecb_limit_2<=0){ecb_limit_2=ecb;}if(ecb_limit_1<=0){ecb_limit_1=ecb;}if(gfc.blocktype_old[chn&0x01]==Encoder.NORM_TYPE){ecb_limit=Math.min(ecb_limit_1,ecb_limit_2);}else{ecb_limit=ecb_limit_1;}thr[b]=Math.min(ecb,ecb_limit);}gfc.nb_2[chn][b]=gfc.nb_1[chn][b];gfc.nb_1[chn][b]=ecb;{/* * if THR exceeds EB, the quantization routines will take the * difference from other bands. in case of strong tonal samples * (tonaltest.wav) this leads to heavy distortions. that's why * we limit THR here. */x=max[b];x*=gfc.minval_l[b];x*=avg_mask;if(thr[b]>x){thr[b]=x;}}if(gfc.masking_lower>1){thr[b]*=gfc.masking_lower;}if(thr[b]>eb_l[b]){thr[b]=eb_l[b];}if(gfc.masking_lower<1){thr[b]*=gfc.masking_lower;}}for(;b0?Math.pow(10,athadjust):1;var rside,rmid;for(var b=0;b0){/***************************************************************//* Adjust M/S maskings if user set "msfix" *//***************************************************************//* Naoki Shibata 2000 */var thmLR,thmMS;var ath=ath_cb[b]*athlower;thmLR=Math.min(Math.max(thmL,ath),Math.max(thmR,ath));thmM=Math.max(rmid,ath);thmS=Math.max(rside,ath);thmMS=thmM+thmS;if(thmMS>0&&thmLR*msfix2ebM){rmid=ebM;}if(rside>ebS){rside=ebS;}thr[2][b]=rmid;thr[3][b]=rside;}}this.L3psycho_anal_vbr=function(gfp,buffer,bufPos,gr_out,masking_ratio,masking_MS_ratio,percep_entropy,percep_MS_entropy,energy,blocktype_d){var gfc=gfp.internal_flags;/* fft and energy calculation */var wsamp_l;var wsamp_s;var fftenergy=new_float(Encoder.HBLKSIZE);var fftenergy_s=new_float_n([3,Encoder.HBLKSIZE_s]);var wsamp_L=new_float_n([2,Encoder.BLKSIZE]);var wsamp_S=new_float_n([2,3,Encoder.BLKSIZE_s]);var eb=new_float_n([4,Encoder.CBANDS]),thr=new_float_n([4,Encoder.CBANDS]);var sub_short_factor=new_float_n([4,3]);var pcfact=0.6;/* block type */var ns_attacks=[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]];var uselongblock=new_int(2);/* usual variables like loop indices, etc.. *//* chn=2 and 3 = Mid and Side channels */var n_chn_psy=gfp.mode==MPEGMode.JOINT_STEREO?4:gfc.channels_out;vbrpsy_attack_detection(gfp,buffer,bufPos,gr_out,masking_ratio,masking_MS_ratio,energy,sub_short_factor,ns_attacks,uselongblock);vbrpsy_compute_block_type(gfp,uselongblock);/* LONG BLOCK CASE */{for(var chn=0;chn=2||ns_attacks[chn][sblock+1]==1){var idx=sblock!=0?sblock-1:2;var p=NS_INTERP(gfc.thm[chn].s[sb][idx],thmm,NS_PREECHO_ATT1*pcfact);thmm=Math.min(thmm,p);}else if(ns_attacks[chn][sblock]==1){var idx=sblock!=0?sblock-1:2;var p=NS_INTERP(gfc.thm[chn].s[sb][idx],thmm,NS_PREECHO_ATT2*pcfact);thmm=Math.min(thmm,p);}else if(sblock!=0&&ns_attacks[chn][sblock-1]==3||sblock==0&&gfc.nsPsy.lastAttacks[chn]==3){var idx=sblock!=2?sblock+1:0;var p=NS_INTERP(gfc.thm[chn].s[sb][idx],thmm,NS_PREECHO_ATT2*pcfact);thmm=Math.min(thmm,p);}/* pulse like signal detection for fatboy.wav and so on */thmm*=sub_short_factor[chn][sblock];new_thmm[sblock]=thmm;}for(var sblock=0;sblock<3;sblock++){gfc.thm[chn].s[sb][sblock]=new_thmm[sblock];}}}}for(var chn=0;chn1){ppe=percep_MS_entropy;ppePos=-2;type=Encoder.NORM_TYPE;if(blocktype_d[0]==Encoder.SHORT_TYPE||blocktype_d[1]==Encoder.SHORT_TYPE)type=Encoder.SHORT_TYPE;mr=masking_MS_ratio[gr_out][chn-2];}else{ppe=percep_entropy;ppePos=0;type=blocktype_d[chn];mr=masking_ratio[gr_out][chn];}if(type==Encoder.SHORT_TYPE){ppe[ppePos+chn]=pecalc_s(mr,gfc.masking_lower);}else{ppe[ppePos+chn]=pecalc_l(mr,gfc.masking_lower);}if(gfp.analysis){gfc.pinfo.pe[gr_out][chn]=ppe[ppePos+chn];}}return 0;};function s3_func_x(bark,hf_slope){var tempx=bark,tempy;if(tempx>=0){tempy=-tempx*27;}else{tempy=tempx*hf_slope;}if(tempy<=-72.0){return 0;}return Math.exp(tempy*LN_TO_LOG10);}function norm_s3_func_x(hf_slope){var lim_a=0,lim_b=0;{var x=0,l,h;for(x=0;s3_func_x(x,hf_slope)>1e-20;x-=1){}l=x;h=0;while(Math.abs(h-l)>1e-12){x=(h+l)/2;if(s3_func_x(x,hf_slope)>0){h=x;}else{l=x;}}lim_a=l;}{var x=0,l,h;for(x=0;s3_func_x(x,hf_slope)>1e-20;x+=1){}l=0;h=x;while(Math.abs(h-l)>1e-12){x=(h+l)/2;if(s3_func_x(x,hf_slope)>0){l=x;}else{h=x;}}lim_b=h;}{var sum=0;var m=1000;var i;for(i=0;i<=m;++i){var x=lim_a+i*(lim_b-lim_a)/m;var y=s3_func_x(x,hf_slope);sum+=y;}{var norm=(m+1)/(sum*(lim_b-lim_a));/* printf( "norm = %lf\n",norm); */return norm;}}}/** * The spreading function. Values returned in units of energy */function s3_func(bark){var tempx,x,tempy,temp;tempx=bark;if(tempx>=0)tempx*=3;else tempx*=1.5;if(tempx>=0.5&&tempx<=2.5){temp=tempx-0.5;x=8.0*(temp*temp-2.0*temp);}else x=0.0;tempx+=0.474;tempy=15.811389+7.5*tempx-17.5*Math.sqrt(1.0+tempx*tempx);if(tempy<=-60.0)return 0.0;tempx=Math.exp((x+tempy)*LN_TO_LOG10);/** *
                     * Normalization.  The spreading function should be normalized so that:
                     * +inf
                     * /
                     * |  s3 [ bark ]  d(bark)   =  1
                     * /
                     * -inf
                     * 
    */tempx/=.6609193;return tempx;}/** * see for example "Zwicker: Psychoakustik, 1982; ISBN 3-540-11401-7 */function freq2bark(freq){/* input: freq in hz output: barks */if(freq<0)freq=0;freq=freq*0.001;return 13.0*Math.atan(.76*freq)+3.5*Math.atan(freq*freq/(7.5*7.5));}function init_numline(numlines,bo,bm,bval,bval_width,mld,bo_w,sfreq,blksize,scalepos,deltafreq,sbmax){var b_frq=new_float(Encoder.CBANDS+1);var sample_freq_frac=sfreq/(sbmax>15?2*576:2*192);var partition=new_int(Encoder.HBLKSIZE);var i;sfreq/=blksize;var j=0;var ni=0;/* compute numlines, the number of spectral lines in each partition band *//* each partition band should be about DELBARK wide. */for(i=0;iblksize/2){j=blksize/2;++i;break;}}b_frq[i]=sfreq*j;for(var sfb=0;sfbblksize/2)i2=blksize/2;bm[sfb]=(partition[i1]+partition[i2])/2;bo[sfb]=partition[i2];var f_tmp=sample_freq_frac*end;/* * calculate how much of this band belongs to current scalefactor * band */bo_w[sfb]=(f_tmp-b_frq[bo[sfb]])/(b_frq[bo[sfb]+1]-b_frq[bo[sfb]]);if(bo_w[sfb]<0){bo_w[sfb]=0;}else{if(bo_w[sfb]>1){bo_w[sfb]=1;}}/* setup stereo demasking thresholds *//* formula reverse enginerred from plot in paper */arg=freq2bark(sfreq*scalepos[sfb]*deltafreq);arg=Math.min(arg,15.5)/15.5;mld[sfb]=Math.pow(10.0,1.25*(1-Math.cos(Math.PI*arg))-2.5);}/* compute bark values of each critical band */j=0;for(var k=0;k * s[i][j], the value of the spreading function, * centered at band j (masker), for band i (maskee) * * i.e.: sum over j to spread into signal barkval=i * NOTE: i and j are used opposite as in the ISO docs * */if(use_old_s3){for(var i=0;i0.0)break;}s3ind[i][0]=j;for(j=npart-1;j>0;j--){if(s3[i][j]>0.0)break;}s3ind[i][1]=j;numberOfNoneZero+=s3ind[i][1]-s3ind[i][0]+1;}var p=new_float(numberOfNoneZero);var k=0;for(var i=0;i=bvl_a){snr=snr_l_b*(bval[i]-bvl_a)/(bvl_b-bvl_a)+snr_l_a*(bvl_b-bval[i])/(bvl_b-bvl_a);}norm[i]=Math.pow(10.0,snr/10.0);if(gfc.numlines_l[i]>0){gfc.rnumlines_l[i]=1.0/gfc.numlines_l[i];}else{gfc.rnumlines_l[i]=0;}}gfc.s3_ll=init_s3_values(gfc.s3ind,gfc.npart_l,bval,bval_width,norm,useOldS3);/* compute long block specific values, ATH and MINVAL */var j=0;for(i=0;ilevel)x=level;}gfc.ATH.cb_l[i]=x;/* * MINVAL. For low freq, the strength of the masking is limited by * minval this is an ISO MPEG1 thing, dont know if it is really * needed *//* * FIXME: it does work to reduce low-freq problems in S53-Wind-Sax * and lead-voice samples, but introduces some 3 kbps bit bloat too. * TODO: Further refinement of the shape of this hack. */x=-20+bval[i]*20/10;if(x>6){x=100;}if(x<-15){x=-15;}x-=8.;gfc.minval_l[i]=Math.pow(10.0,x/10.)*gfc.numlines_l[i];}/************************************************************************ * do the same things for short blocks ************************************************************************/gfc.npart_s=init_numline(gfc.numlines_s,gfc.bo_s,gfc.bm_s,bval,bval_width,gfc.mld_s,gfc.PSY.bo_s_weight,sfreq,Encoder.BLKSIZE_s,gfc.scalefac_band.s,Encoder.BLKSIZE_s/(2.0*192),Encoder.SBMAX_s);/* SNR formula. short block is normalized by SNR. is it still right ? */j=0;for(i=0;i=bvl_a){snr=snr_s_b*(bval[i]-bvl_a)/(bvl_b-bvl_a)+snr_s_a*(bvl_b-bval[i])/(bvl_b-bvl_a);}norm[i]=Math.pow(10.0,snr/10.0);/* ATH */x=Float.MAX_VALUE;for(var k=0;klevel)x=level;}gfc.ATH.cb_s[i]=x;/* * MINVAL. For low freq, the strength of the masking is limited by * minval this is an ISO MPEG1 thing, dont know if it is really * needed */x=-7.0+bval[i]*7.0/12.0;if(bval[i]>12){x*=1+Math.log(1+x)*3.1;}if(bval[i]<12){x*=1+Math.log(1-x)*2.3;}if(x<-15){x=-15;}x-=8;gfc.minval_s[i]=Math.pow(10.0,x/10)*gfc.numlines_s[i];}gfc.s3_ss=init_s3_values(gfc.s3ind_s,gfc.npart_s,bval,bval_width,norm,useOldS3);init_mask_add_max_values();fft.init_fft(gfc);/* setup temporal masking */gfc.decay=Math.exp(-1.0*LOG10/(temporalmask_sustain_sec*sfreq/192.0));{var msfix;msfix=NS_MSFIX;if((gfp.exp_nspsytune&2)!=0)msfix=1.0;if(Math.abs(gfp.msfix)>0.0)msfix=gfp.msfix;gfp.msfix=msfix;/* * spread only from npart_l bands. Normally, we use the spreading * function to convolve from npart_l down to npart_l bands */for(var b=0;bgfc.npart_l-1)gfc.s3ind[b][1]=gfc.npart_l-1;}}/* * prepare for ATH auto adjustment: we want to decrease the ATH by 12 dB * per second */var frame_duration=576.*gfc.mode_gr/sfreq;gfc.ATH.decay=Math.pow(10.,-12./10.*frame_duration);gfc.ATH.adjust=0.01;/* minimum, for leading low loudness */gfc.ATH.adjustLimit=1.0;/* on lead, allow adjust up to maximum */if(gfp.ATHtype!=-1){/* compute equal loudness weights (eql_w) */var freq;var freq_inc=gfp.out_samplerate/Encoder.BLKSIZE;var eql_balance=0.0;freq=0.0;for(i=0;i=0;){/* scale weights */gfc.ATH.eql_w[i]*=eql_balance;}}{for(var b=j=0;b * from Painter & Spanias * modified by Gabriel Bouvigne to better fit the reality * ath = 3.640 * pow(f,-0.8) * - 6.800 * exp(-0.6*pow(f-3.4,2.0)) * + 6.000 * exp(-0.15*pow(f-8.7,2.0)) * + 0.6* 0.001 * pow(f,4.0); * * * In the past LAME was using the Painter &Spanias formula. * But we had some recurrent problems with HF content. * We measured real ATH values, and found the older formula * to be inaccurate in the higher part. So we made this new * formula and this solved most of HF problematic test cases. * The tradeoff is that in VBR mode it increases a lot the * bitrate. * *//* * This curve can be adjusted according to the VBR scale: it adjusts * from something close to Painter & Spanias on V9 up to Bouvigne's * formula for V0. This way the VBR bitrate is more balanced according * to the -V value. */// the following Hack allows to ask for the lowest value if(f<-.3)f=3410;// convert to khz f/=1000;f=Math.max(0.1,f);var ath=3.640*Math.pow(f,-0.8)-6.800*Math.exp(-0.6*Math.pow(f-3.4,2.0))+6.000*Math.exp(-0.15*Math.pow(f-8.7,2.0))+(0.6+0.04*value)*0.001*Math.pow(f,4.0);return ath;}this.ATHformula=function(f,gfp){var ath;switch(gfp.ATHtype){case 0:ath=ATHformula_GB(f,9);break;case 1:// over sensitive, should probably be removed ath=ATHformula_GB(f,-1);break;case 2:ath=ATHformula_GB(f,0);break;case 3:// modification of GB formula by Roel ath=ATHformula_GB(f,1)+6;break;case 4:ath=ATHformula_GB(f,gfp.ATHcurve);break;default:ath=ATHformula_GB(f,0);break;}return ath;};}function Lame(){var self=this;var LAME_MAXALBUMART=128*1024;Lame.V9=410;Lame.V8=420;Lame.V7=430;Lame.V6=440;Lame.V5=450;Lame.V4=460;Lame.V3=470;Lame.V2=480;Lame.V1=490;Lame.V0=500;/* still there for compatibility */Lame.R3MIX=1000;Lame.STANDARD=1001;Lame.EXTREME=1002;Lame.INSANE=1003;Lame.STANDARD_FAST=1004;Lame.EXTREME_FAST=1005;Lame.MEDIUM=1006;Lame.MEDIUM_FAST=1007;/** * maximum size of mp3buffer needed if you encode at most 1152 samples for * each call to lame_encode_buffer. see lame_encode_buffer() below * (LAME_MAXMP3BUFFER is now obsolete) */var LAME_MAXMP3BUFFER=16384+LAME_MAXALBUMART;Lame.LAME_MAXMP3BUFFER=LAME_MAXMP3BUFFER;var ga;var bs;var p;var qupvt;var qu;var psy=new PsyModel();var vbr;var ver;var id3;var mpglib;this.enc=new Encoder();this.setModules=function(_ga,_bs,_p,_qupvt,_qu,_vbr,_ver,_id3,_mpglib){ga=_ga;bs=_bs;p=_p;qupvt=_qupvt;qu=_qu;vbr=_vbr;ver=_ver;id3=_id3;mpglib=_mpglib;this.enc.setModules(bs,psy,qupvt,vbr);};/** * PSY Model related stuff */function PSY(){/** * The dbQ stuff. */this.mask_adjust=0.;/** * The dbQ stuff. */this.mask_adjust_short=0.;/* at transition from one scalefactor band to next *//** * Band weight long scalefactor bands. */this.bo_l_weight=new_float(Encoder.SBMAX_l);/** * Band weight short scalefactor bands. */this.bo_s_weight=new_float(Encoder.SBMAX_s);}function LowPassHighPass(){this.lowerlimit=0.;}function BandPass(bitrate,lPass){this.lowpass=lPass;}var LAME_ID=0xFFF88E3B;function lame_init_old(gfp){var gfc;gfp.class_id=LAME_ID;gfc=gfp.internal_flags=new LameInternalFlags();/* Global flags. set defaults here for non-zero values *//* see lame.h for description *//* * set integer values to -1 to mean that LAME will compute the best * value, UNLESS the calling program as set it (and the value is no * longer -1) */gfp.mode=MPEGMode.NOT_SET;gfp.original=1;gfp.in_samplerate=44100;gfp.num_channels=2;gfp.num_samples=-1;gfp.bWriteVbrTag=true;gfp.quality=-1;gfp.short_blocks=null;gfc.subblock_gain=-1;gfp.lowpassfreq=0;gfp.highpassfreq=0;gfp.lowpasswidth=-1;gfp.highpasswidth=-1;gfp.VBR=VbrMode.vbr_off;gfp.VBR_q=4;gfp.ATHcurve=-1;gfp.VBR_mean_bitrate_kbps=128;gfp.VBR_min_bitrate_kbps=0;gfp.VBR_max_bitrate_kbps=0;gfp.VBR_hard_min=0;gfc.VBR_min_bitrate=1;/* not 0 ????? */gfc.VBR_max_bitrate=13;/* not 14 ????? */gfp.quant_comp=-1;gfp.quant_comp_short=-1;gfp.msfix=-1;gfc.resample_ratio=1;gfc.OldValue[0]=180;gfc.OldValue[1]=180;gfc.CurrentStep[0]=4;gfc.CurrentStep[1]=4;gfc.masking_lower=1;gfc.nsPsy.attackthre=-1;gfc.nsPsy.attackthre_s=-1;gfp.scale=-1;gfp.athaa_type=-1;gfp.ATHtype=-1;/* default = -1 = set in lame_init_params */gfp.athaa_loudapprox=-1;/* 1 = flat loudness approx. (total energy) *//* 2 = equal loudness curve */gfp.athaa_sensitivity=0.0;/* no offset */gfp.useTemporal=null;gfp.interChRatio=-1;/* * The reason for int mf_samples_to_encode = ENCDELAY + POSTDELAY; * ENCDELAY = internal encoder delay. And then we have to add * POSTDELAY=288 because of the 50% MDCT overlap. A 576 MDCT granule * decodes to 1152 samples. To synthesize the 576 samples centered under * this granule we need the previous granule for the first 288 samples * (no problem), and the next granule for the next 288 samples (not * possible if this is last granule). So we need to pad with 288 samples * to make sure we can encode the 576 samples we are interested in. */gfc.mf_samples_to_encode=Encoder.ENCDELAY+Encoder.POSTDELAY;gfp.encoder_padding=0;gfc.mf_size=Encoder.ENCDELAY-Encoder.MDCTDELAY;/* * we pad input with this many 0's */gfp.findReplayGain=false;gfp.decode_on_the_fly=false;gfc.decode_on_the_fly=false;gfc.findReplayGain=false;gfc.findPeakSample=false;gfc.RadioGain=0;gfc.AudiophileGain=0;gfc.noclipGainChange=0;gfc.noclipScale=-1.0;gfp.preset=0;gfp.write_id3tag_automatic=true;return 0;}this.lame_init=function(){var gfp=new LameGlobalFlags();var ret=lame_init_old(gfp);if(ret!=0){return null;}gfp.lame_allocated_gfp=1;return gfp;};function filter_coef(x){if(x>1.0)return 0.0;if(x<=0.0)return 1.0;return Math.cos(Math.PI/2*x);}this.nearestBitrateFullIndex=function(bitrate){/* borrowed from DM abr presets */var full_bitrate_table=[8,16,24,32,40,48,56,64,80,96,112,128,160,192,224,256,320];var lower_range=0,lower_range_kbps=0,upper_range=0,upper_range_kbps=0;/* We assume specified bitrate will be 320kbps */upper_range_kbps=full_bitrate_table[16];upper_range=16;lower_range_kbps=full_bitrate_table[16];lower_range=16;/* * Determine which significant bitrates the value specified falls * between, if loop ends without breaking then we were correct above * that the value was 320 */for(var b=0;b<16;b++){if(Math.max(bitrate,full_bitrate_table[b+1])!=bitrate){upper_range_kbps=full_bitrate_table[b+1];upper_range=b+1;lower_range_kbps=full_bitrate_table[b];lower_range=b;break;/* We found upper range */}}/* Determine which range the value specified is closer to */if(upper_range_kbps-bitrate>bitrate-lower_range_kbps){return lower_range;}return upper_range;};function optimum_samplefreq(lowpassfreq,input_samplefreq){/* * Rules: * * - if possible, sfb21 should NOT be used */var suggested_samplefreq=44100;if(input_samplefreq>=48000)suggested_samplefreq=48000;else if(input_samplefreq>=44100)suggested_samplefreq=44100;else if(input_samplefreq>=32000)suggested_samplefreq=32000;else if(input_samplefreq>=24000)suggested_samplefreq=24000;else if(input_samplefreq>=22050)suggested_samplefreq=22050;else if(input_samplefreq>=16000)suggested_samplefreq=16000;else if(input_samplefreq>=12000)suggested_samplefreq=12000;else if(input_samplefreq>=11025)suggested_samplefreq=11025;else if(input_samplefreq>=8000)suggested_samplefreq=8000;if(lowpassfreq==-1)return suggested_samplefreq;if(lowpassfreq<=15960)suggested_samplefreq=44100;if(lowpassfreq<=15250)suggested_samplefreq=32000;if(lowpassfreq<=11220)suggested_samplefreq=24000;if(lowpassfreq<=9970)suggested_samplefreq=22050;if(lowpassfreq<=7230)suggested_samplefreq=16000;if(lowpassfreq<=5420)suggested_samplefreq=12000;if(lowpassfreq<=4510)suggested_samplefreq=11025;if(lowpassfreq<=3970)suggested_samplefreq=8000;if(input_samplefreq44100){return 48000;}if(input_samplefreq>32000){return 44100;}if(input_samplefreq>24000){return 32000;}if(input_samplefreq>22050){return 24000;}if(input_samplefreq>16000){return 22050;}if(input_samplefreq>12000){return 16000;}if(input_samplefreq>11025){return 12000;}if(input_samplefreq>8000){return 11025;}return 8000;}return suggested_samplefreq;}/** * convert samp freq in Hz to index */function SmpFrqIndex(sample_freq,gpf){switch(sample_freq){case 44100:gpf.version=1;return 0;case 48000:gpf.version=1;return 1;case 32000:gpf.version=1;return 2;case 22050:gpf.version=0;return 0;case 24000:gpf.version=0;return 1;case 16000:gpf.version=0;return 2;case 11025:gpf.version=0;return 0;case 12000:gpf.version=0;return 1;case 8000:gpf.version=0;return 2;default:gpf.version=0;return-1;}}/** * @param bRate * legal rates from 8 to 320 */function FindNearestBitrate(bRate,version,samplerate){/* MPEG-1 or MPEG-2 LSF */if(samplerate<16000)version=2;var bitrate=Tables.bitrate_table[version][1];for(var i=2;i<=14;i++){if(Tables.bitrate_table[version][i]>0){if(Math.abs(Tables.bitrate_table[version][i]-bRate)0){if(Tables.bitrate_table[version][i]==bRate){return i;}}}return-1;}function optimum_bandwidth(lh,bitrate){/** *
                     *  Input:
                     *      bitrate     total bitrate in kbps
                     *
                     *   Output:
                     *      lowerlimit: best lowpass frequency limit for input filter in Hz
                     *      upperlimit: best highpass frequency limit for input filter in Hz
                     * 
    */var freq_map=[new BandPass(8,2000),new BandPass(16,3700),new BandPass(24,3900),new BandPass(32,5500),new BandPass(40,7000),new BandPass(48,7500),new BandPass(56,10000),new BandPass(64,11000),new BandPass(80,13500),new BandPass(96,15100),new BandPass(112,15600),new BandPass(128,17000),new BandPass(160,17500),new BandPass(192,18600),new BandPass(224,19400),new BandPass(256,19700),new BandPass(320,20500)];var table_index=self.nearestBitrateFullIndex(bitrate);lh.lowerlimit=freq_map[table_index].lowpass;}function lame_init_params_ppflt(gfp){var gfc=gfp.internal_flags;/***************************************************************//* compute info needed for polyphase filter (filter type==0, default) *//***************************************************************/var lowpass_band=32;var highpass_band=-1;if(gfc.lowpass1>0){var minband=999;for(var band=0;band<=31;band++){var freq=band/31.0;/* this band and above will be zeroed: */if(freq>=gfc.lowpass2){lowpass_band=Math.min(lowpass_band,band);}if(gfc.lowpass10){if(gfc.highpass2<.9*(.75/31.0)){gfc.highpass1=0;gfc.highpass2=0;System.err.println("Warning: highpass filter disabled. "+"highpass frequency too small\n");}}if(gfc.highpass2>0){var maxband=-1;for(var band=0;band<=31;band++){var freq=band/31.0;/* this band and below will be zereod */if(freq<=gfc.highpass1){highpass_band=Math.max(highpass_band,band);}if(gfc.highpass1gfc.highpass1){fc1=filter_coef((gfc.highpass2-freq)/(gfc.highpass2-gfc.highpass1+1e-20));}else{fc1=1.0;}if(gfc.lowpass2>gfc.lowpass1){fc2=filter_coef((freq-gfc.lowpass1)/(gfc.lowpass2-gfc.lowpass1+1e-20));}else{fc2=1.0;}gfc.amp_filter[band]=fc1*fc2;}}function lame_init_qval(gfp){var gfc=gfp.internal_flags;switch(gfp.quality){default:case 9:/* no psymodel, no noise shaping */gfc.psymodel=0;gfc.noise_shaping=0;gfc.noise_shaping_amp=0;gfc.noise_shaping_stop=0;gfc.use_best_huffman=0;gfc.full_outer_loop=0;break;case 8:gfp.quality=7;//$FALL-THROUGH$ case 7:/* * use psymodel (for short block and m/s switching), but no noise * shapping */gfc.psymodel=1;gfc.noise_shaping=0;gfc.noise_shaping_amp=0;gfc.noise_shaping_stop=0;gfc.use_best_huffman=0;gfc.full_outer_loop=0;break;case 6:gfc.psymodel=1;if(gfc.noise_shaping==0)gfc.noise_shaping=1;gfc.noise_shaping_amp=0;gfc.noise_shaping_stop=0;if(gfc.subblock_gain==-1)gfc.subblock_gain=1;gfc.use_best_huffman=0;gfc.full_outer_loop=0;break;case 5:gfc.psymodel=1;if(gfc.noise_shaping==0)gfc.noise_shaping=1;gfc.noise_shaping_amp=0;gfc.noise_shaping_stop=0;if(gfc.subblock_gain==-1)gfc.subblock_gain=1;gfc.use_best_huffman=0;gfc.full_outer_loop=0;break;case 4:gfc.psymodel=1;if(gfc.noise_shaping==0)gfc.noise_shaping=1;gfc.noise_shaping_amp=0;gfc.noise_shaping_stop=0;if(gfc.subblock_gain==-1)gfc.subblock_gain=1;gfc.use_best_huffman=1;gfc.full_outer_loop=0;break;case 3:gfc.psymodel=1;if(gfc.noise_shaping==0)gfc.noise_shaping=1;gfc.noise_shaping_amp=1;gfc.noise_shaping_stop=1;if(gfc.subblock_gain==-1)gfc.subblock_gain=1;gfc.use_best_huffman=1;gfc.full_outer_loop=0;break;case 2:gfc.psymodel=1;if(gfc.noise_shaping==0)gfc.noise_shaping=1;if(gfc.substep_shaping==0)gfc.substep_shaping=2;gfc.noise_shaping_amp=1;gfc.noise_shaping_stop=1;if(gfc.subblock_gain==-1)gfc.subblock_gain=1;gfc.use_best_huffman=1;/* inner loop */gfc.full_outer_loop=0;break;case 1:gfc.psymodel=1;if(gfc.noise_shaping==0)gfc.noise_shaping=1;if(gfc.substep_shaping==0)gfc.substep_shaping=2;gfc.noise_shaping_amp=2;gfc.noise_shaping_stop=1;if(gfc.subblock_gain==-1)gfc.subblock_gain=1;gfc.use_best_huffman=1;gfc.full_outer_loop=0;break;case 0:gfc.psymodel=1;if(gfc.noise_shaping==0)gfc.noise_shaping=1;if(gfc.substep_shaping==0)gfc.substep_shaping=2;gfc.noise_shaping_amp=2;gfc.noise_shaping_stop=1;if(gfc.subblock_gain==-1)gfc.subblock_gain=1;gfc.use_best_huffman=1;/* * type 2 disabled because of it slowness, in favor of full outer * loop search */gfc.full_outer_loop=0;/* * full outer loop search disabled because of audible distortions it * may generate rh 060629 */break;}}function lame_init_bitstream(gfp){var gfc=gfp.internal_flags;gfp.frameNum=0;if(gfp.write_id3tag_automatic){id3.id3tag_write_v2(gfp);}/* initialize histogram data optionally used by frontend */gfc.bitrate_stereoMode_Hist=new_int_n([16,4+1]);gfc.bitrate_blockType_Hist=new_int_n([16,4+1+1]);gfc.PeakSample=0.0;/* Write initial VBR Header to bitstream and init VBR data */if(gfp.bWriteVbrTag)vbr.InitVbrTag(gfp);}/******************************************************************** * initialize internal params based on data in gf (globalflags struct filled * in by calling program) * * OUTLINE: * * We first have some complex code to determine bitrate, output samplerate * and mode. It is complicated by the fact that we allow the user to set * some or all of these parameters, and need to determine best possible * values for the rest of them: * * 1. set some CPU related flags 2. check if we are mono.mono, stereo.mono * or stereo.stereo 3. compute bitrate and output samplerate: user may have * set compression ratio user may have set a bitrate user may have set a * output samplerate 4. set some options which depend on output samplerate * 5. compute the actual compression ratio 6. set mode based on compression * ratio * * The remaining code is much simpler - it just sets options based on the * mode & compression ratio: * * set allow_diff_short based on mode select lowpass filter based on * compression ratio & mode set the bitrate index, and min/max bitrates for * VBR modes disable VBR tag if it is not appropriate initialize the * bitstream initialize scalefac_band data set sideinfo_len (based on * channels, CRC, out_samplerate) write an id3v2 tag into the bitstream * write VBR tag into the bitstream set mpeg1/2 flag estimate the number of * frames (based on a lot of data) * * now we set more flags: nspsytune: see code VBR modes see code CBR/ABR see * code * * Finally, we set the algorithm flags based on the gfp.quality value * lame_init_qval(gfp); * ********************************************************************/this.lame_init_params=function(gfp){var gfc=gfp.internal_flags;gfc.Class_ID=0;if(gfc.ATH==null)gfc.ATH=new ATH();if(gfc.PSY==null)gfc.PSY=new PSY();if(gfc.rgdata==null)gfc.rgdata=new ReplayGain();gfc.channels_in=gfp.num_channels;if(gfc.channels_in==1)gfp.mode=MPEGMode.MONO;gfc.channels_out=gfp.mode==MPEGMode.MONO?1:2;gfc.mode_ext=Encoder.MPG_MD_MS_LR;if(gfp.mode==MPEGMode.MONO)gfp.force_ms=false;/* * don't allow forced mid/side stereo for mono output */if(gfp.VBR==VbrMode.vbr_off&&gfp.VBR_mean_bitrate_kbps!=128&&gfp.brate==0)gfp.brate=gfp.VBR_mean_bitrate_kbps;if(gfp.VBR==VbrMode.vbr_off||gfp.VBR==VbrMode.vbr_mtrh||gfp.VBR==VbrMode.vbr_mt){/* these modes can handle free format condition */}else{gfp.free_format=false;/* mode can't be mixed with free format */}if(gfp.VBR==VbrMode.vbr_off&&gfp.brate==0){/* no bitrate or compression ratio specified, use 11.025 */if(BitStream.EQ(gfp.compression_ratio,0))gfp.compression_ratio=11.025;/* * rate to compress a CD down to exactly 128000 bps */}/* find bitrate if user specify a compression ratio */if(gfp.VBR==VbrMode.vbr_off&&gfp.compression_ratio>0){if(gfp.out_samplerate==0)gfp.out_samplerate=map2MP3Frequency(int(0.97*gfp.in_samplerate));/* * round up with a margin of 3 % *//* * choose a bitrate for the output samplerate which achieves * specified compression ratio */gfp.brate=0|gfp.out_samplerate*16*gfc.channels_out/(1.e3*gfp.compression_ratio);/* we need the version for the bitrate table look up */gfc.samplerate_index=SmpFrqIndex(gfp.out_samplerate,gfp);if(!gfp.free_format)/* * for non Free Format find the nearest allowed * bitrate */gfp.brate=FindNearestBitrate(gfp.brate,gfp.version,gfp.out_samplerate);}if(gfp.out_samplerate!=0){if(gfp.out_samplerate<16000){gfp.VBR_mean_bitrate_kbps=Math.max(gfp.VBR_mean_bitrate_kbps,8);gfp.VBR_mean_bitrate_kbps=Math.min(gfp.VBR_mean_bitrate_kbps,64);}else if(gfp.out_samplerate<32000){gfp.VBR_mean_bitrate_kbps=Math.max(gfp.VBR_mean_bitrate_kbps,8);gfp.VBR_mean_bitrate_kbps=Math.min(gfp.VBR_mean_bitrate_kbps,160);}else{gfp.VBR_mean_bitrate_kbps=Math.max(gfp.VBR_mean_bitrate_kbps,32);gfp.VBR_mean_bitrate_kbps=Math.min(gfp.VBR_mean_bitrate_kbps,320);}}/****************************************************************//* if a filter has not been enabled, see if we should add one: *//****************************************************************/if(gfp.lowpassfreq==0){var lowpass=16000.;switch(gfp.VBR){case VbrMode.vbr_off:{var lh=new LowPassHighPass();optimum_bandwidth(lh,gfp.brate);lowpass=lh.lowerlimit;break;}case VbrMode.vbr_abr:{var lh=new LowPassHighPass();optimum_bandwidth(lh,gfp.VBR_mean_bitrate_kbps);lowpass=lh.lowerlimit;break;}case VbrMode.vbr_rh:{var x=[19500,19000,18600,18000,17500,16000,15600,14900,12500,10000,3950];if(0<=gfp.VBR_q&&gfp.VBR_q<=9){var a=x[gfp.VBR_q],b=x[gfp.VBR_q+1],m=gfp.VBR_q_frac;lowpass=linear_int(a,b,m);}else{lowpass=19500;}break;}default:{var x=[19500,19000,18500,18000,17500,16500,15500,14500,12500,9500,3950];if(0<=gfp.VBR_q&&gfp.VBR_q<=9){var a=x[gfp.VBR_q],b=x[gfp.VBR_q+1],m=gfp.VBR_q_frac;lowpass=linear_int(a,b,m);}else{lowpass=19500;}}}if(gfp.mode==MPEGMode.MONO&&(gfp.VBR==VbrMode.vbr_off||gfp.VBR==VbrMode.vbr_abr))lowpass*=1.5;gfp.lowpassfreq=lowpass|0;}if(gfp.out_samplerate==0){if(2*gfp.lowpassfreq>gfp.in_samplerate){gfp.lowpassfreq=gfp.in_samplerate/2;}gfp.out_samplerate=optimum_samplefreq(gfp.lowpassfreq|0,gfp.in_samplerate);}gfp.lowpassfreq=Math.min(20500,gfp.lowpassfreq);gfp.lowpassfreq=Math.min(gfp.out_samplerate/2,gfp.lowpassfreq);if(gfp.VBR==VbrMode.vbr_off){gfp.compression_ratio=gfp.out_samplerate*16*gfc.channels_out/(1.e3*gfp.brate);}if(gfp.VBR==VbrMode.vbr_abr){gfp.compression_ratio=gfp.out_samplerate*16*gfc.channels_out/(1.e3*gfp.VBR_mean_bitrate_kbps);}/* * do not compute ReplayGain values and do not find the peak sample if * we can't store them */if(!gfp.bWriteVbrTag){gfp.findReplayGain=false;gfp.decode_on_the_fly=false;gfc.findPeakSample=false;}gfc.findReplayGain=gfp.findReplayGain;gfc.decode_on_the_fly=gfp.decode_on_the_fly;if(gfc.decode_on_the_fly)gfc.findPeakSample=true;if(gfc.findReplayGain){if(ga.InitGainAnalysis(gfc.rgdata,gfp.out_samplerate)==GainAnalysis.INIT_GAIN_ANALYSIS_ERROR){gfp.internal_flags=null;return-6;}}if(gfc.decode_on_the_fly&&!gfp.decode_only){if(gfc.hip!=null){mpglib.hip_decode_exit(gfc.hip);}gfc.hip=mpglib.hip_decode_init();}gfc.mode_gr=gfp.out_samplerate<=24000?1:2;/* * Number of granules per frame */gfp.framesize=576*gfc.mode_gr;gfp.encoder_delay=Encoder.ENCDELAY;gfc.resample_ratio=gfp.in_samplerate/gfp.out_samplerate;/** *
                     *  sample freq       bitrate     compression ratio
                     *     [kHz]      [kbps/channel]   for 16 bit input
                     *     44.1            56               12.6
                     *     44.1            64               11.025
                     *     44.1            80                8.82
                     *     22.05           24               14.7
                     *     22.05           32               11.025
                     *     22.05           40                8.82
                     *     16              16               16.0
                     *     16              24               10.667
                     * 
    *//** *
                     *  For VBR, take a guess at the compression_ratio.
                     *  For example:
                     *
                     *    VBR_q    compression     like
                     *     -        4.4         320 kbps/44 kHz
                     *   0...1      5.5         256 kbps/44 kHz
                     *     2        7.3         192 kbps/44 kHz
                     *     4        8.8         160 kbps/44 kHz
                     *     6       11           128 kbps/44 kHz
                     *     9       14.7          96 kbps
                     *
                     *  for lower bitrates, downsample with --resample
                     * 
    */switch(gfp.VBR){case VbrMode.vbr_mt:case VbrMode.vbr_rh:case VbrMode.vbr_mtrh:{/* numbers are a bit strange, but they determine the lowpass value */var cmp=[5.7,6.5,7.3,8.2,10,11.9,13,14,15,16.5];gfp.compression_ratio=cmp[gfp.VBR_q];}break;case VbrMode.vbr_abr:gfp.compression_ratio=gfp.out_samplerate*16*gfc.channels_out/(1.e3*gfp.VBR_mean_bitrate_kbps);break;default:gfp.compression_ratio=gfp.out_samplerate*16*gfc.channels_out/(1.e3*gfp.brate);break;}/* * mode = -1 (not set by user) or mode = MONO (because of only 1 input * channel). If mode has not been set, then select J-STEREO */if(gfp.mode==MPEGMode.NOT_SET){gfp.mode=MPEGMode.JOINT_STEREO;}/* apply user driven high pass filter */if(gfp.highpassfreq>0){gfc.highpass1=2.*gfp.highpassfreq;if(gfp.highpasswidth>=0)gfc.highpass2=2.*(gfp.highpassfreq+gfp.highpasswidth);else/* 0% above on default */gfc.highpass2=(1+0.00)*2.*gfp.highpassfreq;gfc.highpass1/=gfp.out_samplerate;gfc.highpass2/=gfp.out_samplerate;}else{gfc.highpass1=0;gfc.highpass2=0;}/* apply user driven low pass filter */if(gfp.lowpassfreq>0){gfc.lowpass2=2.*gfp.lowpassfreq;if(gfp.lowpasswidth>=0){gfc.lowpass1=2.*(gfp.lowpassfreq-gfp.lowpasswidth);if(gfc.lowpass1<0)/* has to be >= 0 */gfc.lowpass1=0;}else{/* 0% below on default */gfc.lowpass1=(1-0.00)*2.*gfp.lowpassfreq;}gfc.lowpass1/=gfp.out_samplerate;gfc.lowpass2/=gfp.out_samplerate;}else{gfc.lowpass1=0;gfc.lowpass2=0;}/**********************************************************************//* compute info needed for polyphase filter (filter type==0, default) *//**********************************************************************/lame_init_params_ppflt(gfp);/******************************************************* * samplerate and bitrate index *******************************************************/gfc.samplerate_index=SmpFrqIndex(gfp.out_samplerate,gfp);if(gfc.samplerate_index<0){gfp.internal_flags=null;return-1;}if(gfp.VBR==VbrMode.vbr_off){if(gfp.free_format){gfc.bitrate_index=0;}else{gfp.brate=FindNearestBitrate(gfp.brate,gfp.version,gfp.out_samplerate);gfc.bitrate_index=BitrateIndex(gfp.brate,gfp.version,gfp.out_samplerate);if(gfc.bitrate_index<=0){gfp.internal_flags=null;return-1;}}}else{gfc.bitrate_index=1;}/* for CBR, we will write an "info" tag. */if(gfp.analysis)gfp.bWriteVbrTag=false;/* some file options not allowed if output is: not specified or stdout */if(gfc.pinfo!=null)gfp.bWriteVbrTag=false;/* disable Xing VBR tag */bs.init_bit_stream_w(gfc);var j=gfc.samplerate_index+3*gfp.version+6*(gfp.out_samplerate<16000?1:0);for(var i=0;i * The newer VBR code supports only a limited * subset of quality levels: * 9-5=5 are the same, uses x^3/4 quantization * 4-0=0 are the same 5 plus best huffman divide code * */if(gfp.quality<0)gfp.quality=LAME_DEFAULT_QUALITY;if(gfp.quality<5)gfp.quality=0;if(gfp.quality>5)gfp.quality=5;gfc.PSY.mask_adjust=gfp.maskingadjust;gfc.PSY.mask_adjust_short=gfp.maskingadjust_short;/* * sfb21 extra only with MPEG-1 at higher sampling rates */if(gfp.experimentalY)gfc.sfb21_extra=false;else gfc.sfb21_extra=gfp.out_samplerate>44000;gfc.iteration_loop=new VBRNewIterationLoop(qu);break;}case VbrMode.vbr_rh:{p.apply_preset(gfp,500-gfp.VBR_q*10,0);gfc.PSY.mask_adjust=gfp.maskingadjust;gfc.PSY.mask_adjust_short=gfp.maskingadjust_short;/* * sfb21 extra only with MPEG-1 at higher sampling rates */if(gfp.experimentalY)gfc.sfb21_extra=false;else gfc.sfb21_extra=gfp.out_samplerate>44000;/* * VBR needs at least the output of GPSYCHO, so we have to garantee * that by setting a minimum quality level, actually level 6 does * it. down to level 6 */if(gfp.quality>6)gfp.quality=6;if(gfp.quality<0)gfp.quality=LAME_DEFAULT_QUALITY;gfc.iteration_loop=new VBROldIterationLoop(qu);break;}default:/* cbr/abr */{var vbrmode;/* * no sfb21 extra with CBR code */gfc.sfb21_extra=false;if(gfp.quality<0)gfp.quality=LAME_DEFAULT_QUALITY;vbrmode=gfp.VBR;if(vbrmode==VbrMode.vbr_off)gfp.VBR_mean_bitrate_kbps=gfp.brate;/* second, set parameters depending on bitrate */p.apply_preset(gfp,gfp.VBR_mean_bitrate_kbps,0);gfp.VBR=vbrmode;gfc.PSY.mask_adjust=gfp.maskingadjust;gfc.PSY.mask_adjust_short=gfp.maskingadjust_short;if(vbrmode==VbrMode.vbr_off){gfc.iteration_loop=new CBRNewIterationLoop(qu);}else{gfc.iteration_loop=new ABRIterationLoop(qu);}break;}}/* initialize default values common for all modes */if(gfp.VBR!=VbrMode.vbr_off){/* choose a min/max bitrate for VBR *//* if the user didn't specify VBR_max_bitrate: */gfc.VBR_min_bitrate=1;/* * default: allow 8 kbps (MPEG-2) or 32 kbps (MPEG-1) */gfc.VBR_max_bitrate=14;/* * default: allow 160 kbps (MPEG-2) or 320 kbps (MPEG-1) */if(gfp.out_samplerate<16000)gfc.VBR_max_bitrate=8;/* default: allow 64 kbps (MPEG-2.5) */if(gfp.VBR_min_bitrate_kbps!=0){gfp.VBR_min_bitrate_kbps=FindNearestBitrate(gfp.VBR_min_bitrate_kbps,gfp.version,gfp.out_samplerate);gfc.VBR_min_bitrate=BitrateIndex(gfp.VBR_min_bitrate_kbps,gfp.version,gfp.out_samplerate);if(gfc.VBR_min_bitrate<0)return-1;}if(gfp.VBR_max_bitrate_kbps!=0){gfp.VBR_max_bitrate_kbps=FindNearestBitrate(gfp.VBR_max_bitrate_kbps,gfp.version,gfp.out_samplerate);gfc.VBR_max_bitrate=BitrateIndex(gfp.VBR_max_bitrate_kbps,gfp.version,gfp.out_samplerate);if(gfc.VBR_max_bitrate<0)return-1;}gfp.VBR_min_bitrate_kbps=Tables.bitrate_table[gfp.version][gfc.VBR_min_bitrate];gfp.VBR_max_bitrate_kbps=Tables.bitrate_table[gfp.version][gfc.VBR_max_bitrate];gfp.VBR_mean_bitrate_kbps=Math.min(Tables.bitrate_table[gfp.version][gfc.VBR_max_bitrate],gfp.VBR_mean_bitrate_kbps);gfp.VBR_mean_bitrate_kbps=Math.max(Tables.bitrate_table[gfp.version][gfc.VBR_min_bitrate],gfp.VBR_mean_bitrate_kbps);}/* just another daily changing developer switch */if(gfp.tune){gfc.PSY.mask_adjust+=gfp.tune_value_a;gfc.PSY.mask_adjust_short+=gfp.tune_value_a;}/* initialize internal qval settings */lame_init_qval(gfp);/* * automatic ATH adjustment on */if(gfp.athaa_type<0)gfc.ATH.useAdjust=3;else gfc.ATH.useAdjust=gfp.athaa_type;/* initialize internal adaptive ATH settings -jd */gfc.ATH.aaSensitivityP=Math.pow(10.0,gfp.athaa_sensitivity/-10.0);if(gfp.short_blocks==null){gfp.short_blocks=ShortBlock.short_block_allowed;}/* * Note Jan/2003: Many hardware decoders cannot handle short blocks in * regular stereo mode unless they are coupled (same type in both * channels) it is a rare event (1 frame per min. or so) that LAME would * use uncoupled short blocks, so lets turn them off until we decide how * to handle this. No other encoders allow uncoupled short blocks, even * though it is in the standard. *//* * rh 20040217: coupling makes no sense for mono and dual-mono streams */if(gfp.short_blocks==ShortBlock.short_block_allowed&&(gfp.mode==MPEGMode.JOINT_STEREO||gfp.mode==MPEGMode.STEREO)){gfp.short_blocks=ShortBlock.short_block_coupled;}if(gfp.quant_comp<0)gfp.quant_comp=1;if(gfp.quant_comp_short<0)gfp.quant_comp_short=0;if(gfp.msfix<0)gfp.msfix=0;/* select psychoacoustic model */gfp.exp_nspsytune=gfp.exp_nspsytune|1;if(gfp.internal_flags.nsPsy.attackthre<0)gfp.internal_flags.nsPsy.attackthre=PsyModel.NSATTACKTHRE;if(gfp.internal_flags.nsPsy.attackthre_s<0)gfp.internal_flags.nsPsy.attackthre_s=PsyModel.NSATTACKTHRE_S;if(gfp.scale<0)gfp.scale=1;if(gfp.ATHtype<0)gfp.ATHtype=4;if(gfp.ATHcurve<0)gfp.ATHcurve=4;if(gfp.athaa_loudapprox<0)gfp.athaa_loudapprox=2;if(gfp.interChRatio<0)gfp.interChRatio=0;if(gfp.useTemporal==null)gfp.useTemporal=true;/* on by default *//* * padding method as described in * "MPEG-Layer3 / Bitstream Syntax and Decoding" by Martin Sieler, Ralph * Sperschneider * * note: there is no padding for the very first frame * * Robert Hegemann 2000-06-22 */gfc.slot_lag=gfc.frac_SpF=0;if(gfp.VBR==VbrMode.vbr_off)gfc.slot_lag=gfc.frac_SpF=(gfp.version+1)*72000*gfp.brate%gfp.out_samplerate|0;qupvt.iteration_init(gfp);psy.psymodel_init(gfp);return 0;};function update_inbuffer_size(gfc,nsamples){if(gfc.in_buffer_0==null||gfc.in_buffer_nsamples0&&imp3>=0){var bunch=mf_needed-gfc.mf_size;var frame_num=gfp.frameNum;bunch*=gfp.in_samplerate;bunch/=gfp.out_samplerate;if(bunch>1152)bunch=1152;if(bunch<1)bunch=1;mp3buffer_size_remaining=mp3buffer_size-mp3count;/* if user specifed buffer size = 0, dont check size */if(mp3buffer_size==0)mp3buffer_size_remaining=0;imp3=this.lame_encode_buffer(gfp,buffer[0],buffer[1],bunch,mp3buffer,mp3bufferPos,mp3buffer_size_remaining);mp3bufferPos+=imp3;mp3count+=imp3;frames_left-=frame_num!=gfp.frameNum?1:0;}/* * Set gfc.mf_samples_to_encode to 0, so we may detect and break loops * calling it more than once in a row. */gfc.mf_samples_to_encode=0;if(imp3<0){/* some type of fatal error */return imp3;}mp3buffer_size_remaining=mp3buffer_size-mp3count;/* if user specifed buffer size = 0, dont check size */if(mp3buffer_size==0)mp3buffer_size_remaining=0;/* mp3 related stuff. bit buffer might still contain some mp3 data */bs.flush_bitstream(gfp);imp3=bs.copy_buffer(gfc,mp3buffer,mp3bufferPos,mp3buffer_size_remaining,1);if(imp3<0){/* some type of fatal error */return imp3;}mp3bufferPos+=imp3;mp3count+=imp3;mp3buffer_size_remaining=mp3buffer_size-mp3count;/* if user specifed buffer size = 0, dont check size */if(mp3buffer_size==0)mp3buffer_size_remaining=0;if(gfp.write_id3tag_automatic){/* write a id3 tag to the bitstream */id3.id3tag_write_v1(gfp);imp3=bs.copy_buffer(gfc,mp3buffer,mp3bufferPos,mp3buffer_size_remaining,0);if(imp3<0){return imp3;}mp3count+=imp3;}return mp3count;};this.lame_encode_buffer=function(gfp,buffer_l,buffer_r,nsamples,mp3buf,mp3bufPos,mp3buf_size){var gfc=gfp.internal_flags;var in_buffer=[null,null];if(gfc.Class_ID!=LAME_ID)return-3;if(nsamples==0)return 0;update_inbuffer_size(gfc,nsamples);in_buffer[0]=gfc.in_buffer_0;in_buffer[1]=gfc.in_buffer_1;/* make a copy of input buffer, changing type to sample_t */for(var i=0;i1)in_buffer[1][i]=buffer_r[i];}return lame_encode_buffer_sample(gfp,in_buffer[0],in_buffer[1],nsamples,mp3buf,mp3bufPos,mp3buf_size);};function calcNeeded(gfp){var mf_needed=Encoder.BLKSIZE+gfp.framesize-Encoder.FFTOFFSET;/* * amount needed for FFT */mf_needed=Math.max(mf_needed,512+gfp.framesize-32);return mf_needed;}function lame_encode_buffer_sample(gfp,buffer_l,buffer_r,nsamples,mp3buf,mp3bufPos,mp3buf_size){var gfc=gfp.internal_flags;var mp3size=0,ret,i,ch,mf_needed;var mp3out;var mfbuf=[null,null];var in_buffer=[null,null];if(gfc.Class_ID!=LAME_ID)return-3;if(nsamples==0)return 0;/* copy out any tags that may have been written into bitstream */mp3out=bs.copy_buffer(gfc,mp3buf,mp3bufPos,mp3buf_size,0);if(mp3out<0)return mp3out;/* not enough buffer space */mp3bufPos+=mp3out;mp3size+=mp3out;in_buffer[0]=buffer_l;in_buffer[1]=buffer_r;/* Apply user defined re-scaling *//* user selected scaling of the samples */if(BitStream.NEQ(gfp.scale,0)&&BitStream.NEQ(gfp.scale,1.0)){for(i=0;i0){var in_buffer_ptr=[null,null];var n_in=0;/* number of input samples processed with fill_buffer */var n_out=0;/* number of samples output with fill_buffer *//* n_in <> n_out if we are resampling */in_buffer_ptr[0]=in_buffer[0];in_buffer_ptr[1]=in_buffer[1];/* copy in new samples into mfbuf, with resampling */var inOut=new InOut();fill_buffer(gfp,mfbuf,in_buffer_ptr,in_bufferPos,nsamples,inOut);n_in=inOut.n_in;n_out=inOut.n_out;/* compute ReplayGain of resampled input if requested */if(gfc.findReplayGain&&!gfc.decode_on_the_fly)if(ga.AnalyzeSamples(gfc.rgdata,mfbuf[0],gfc.mf_size,mfbuf[1],gfc.mf_size,n_out,gfc.channels_out)==GainAnalysis.GAIN_ANALYSIS_ERROR)return-6;/* update in_buffer counters */nsamples-=n_in;in_bufferPos+=n_in;if(gfc.channels_out==2);// in_bufferPos += n_in; /* update mfbuf[] counters */gfc.mf_size+=n_out;/* * lame_encode_flush may have set gfc.mf_sample_to_encode to 0 so we * have to reinitialize it here when that happened. */if(gfc.mf_samples_to_encode<1){gfc.mf_samples_to_encode=Encoder.ENCDELAY+Encoder.POSTDELAY;}gfc.mf_samples_to_encode+=n_out;if(gfc.mf_size>=mf_needed){/* encode the frame. *//* mp3buf = pointer to current location in buffer *//* mp3buf_size = size of original mp3 output buffer *//* = 0 if we should not worry about the *//* buffer size because calling program is *//* to lazy to compute it *//* mp3size = size of data written to buffer so far *//* mp3buf_size-mp3size = amount of space avalable */var buf_size=mp3buf_size-mp3size;if(mp3buf_size==0)buf_size=0;ret=lame_encode_frame(gfp,mfbuf[0],mfbuf[1],mp3buf,mp3bufPos,buf_size);if(ret<0)return ret;mp3bufPos+=ret;mp3size+=ret;/* shift out old samples */gfc.mf_size-=gfp.framesize;gfc.mf_samples_to_encode-=gfp.framesize;for(ch=0;ch * Joint work of Euclid and M. Hendry */function gcd(i,j){return j!=0?gcd(j,i%j):i;}/** * Resampling via FIR filter, blackman window. */function blackman(x,fcn,l){/* * This algorithm from: SIGNAL PROCESSING ALGORITHMS IN FORTRAN AND C * S.D. Stearns and R.A. David, Prentice-Hall, 1992 */var wcn=Math.PI*fcn;x/=l;if(x<0)x=0;if(x>1)x=1;var x2=x-.5;var bkwn=0.42-0.5*Math.cos(2*x*Math.PI)+0.08*Math.cos(4*x*Math.PI);if(Math.abs(x2)<1e-9)return wcn/Math.PI;else return bkwn*Math.sin(l*wcn*x2)/(Math.PI*l*x2);}function fill_buffer_resample(gfp,outbuf,outbufPos,desired_len,inbuf,in_bufferPos,len,num_used,ch){var gfc=gfp.internal_flags;var i,j=0,k;/* number of convolution functions to pre-compute */var bpc=gfp.out_samplerate/gcd(gfp.out_samplerate,gfp.in_samplerate);if(bpc>LameInternalFlags.BPC)bpc=LameInternalFlags.BPC;var intratio=Math.abs(gfc.resample_ratio-Math.floor(.5+gfc.resample_ratio))<.0001?1:0;var fcn=1.00/gfc.resample_ratio;if(fcn>1.00)fcn=1.00;var filter_l=31;if(0==filter_l%2)--filter_l;/* must be odd */filter_l+=intratio;/* unless resample_ratio=int, it must be even */var BLACKSIZE=filter_l+1;/* size of data needed for FIR */if(gfc.fill_buffer_resample_init==0){gfc.inbuf_old[0]=new_float(BLACKSIZE);gfc.inbuf_old[1]=new_float(BLACKSIZE);for(i=0;i<=2*bpc;++i){gfc.blackfilt[i]=new_float(BLACKSIZE);}gfc.itime[0]=0;gfc.itime[1]=0;/* precompute blackman filter coefficients */for(j=0;j<=2*bpc;j++){var sum=0.;var offset=(j-bpc)/(2.*bpc);for(i=0;i<=filter_l;i++){sum+=gfc.blackfilt[j][i]=blackman(i-offset,fcn,filter_l);}for(i=0;i<=filter_l;i++){gfc.blackfilt[j][i]/=sum;}}gfc.fill_buffer_resample_init=1;}var inbuf_old=gfc.inbuf_old[ch];/* time of j'th element in inbuf = itime + j/ifreq; *//* time of k'th element in outbuf = j/ofreq */for(k=0;k=len)break;/* blackman filter. by default, window centered at j+.5(filter_l%2) *//* but we want a window centered at time0. */var offset=time0-gfc.itime[ch]-(j+.5*(filter_l%2));/* find the closest precomputed window for this offset: */joff=0|Math.floor(offset*2*bpc+bpc+.5);var xvalue=0.;for(i=0;i<=filter_l;++i){var j2=i+j-filter_l/2;var y;y=j2<0?inbuf_old[BLACKSIZE+j2]:inbuf[in_bufferPos+j2];xvalue+=y*gfc.blackfilt[joff][i];}outbuf[outbufPos+k]=xvalue;}/* k = number of samples added to outbuf *//* last k sample used data from [j-filter_l/2,j+filter_l-filter_l/2] *//* how many samples of input data were used: */num_used.num_used=Math.min(len,filter_l+j-filter_l/2);/* * adjust our input time counter. Incriment by the number of samples * used, then normalize so that next output sample is at time 0, next * input buffer is at time itime[ch] */gfc.itime[ch]+=num_used.num_used-k*gfc.resample_ratio;/* save the last BLACKSIZE samples into the inbuf_old buffer */if(num_used.num_used>=BLACKSIZE){for(i=0;i1.0001){for(var ch=0;chmaxSamples){maxSamples=left.length;mp3buf_size=0|1.25*maxSamples+7200;mp3buf=new_byte(mp3buf_size);}var _sz=lame.lame_encode_buffer(gfp,left,right,left.length,mp3buf,0,mp3buf_size);return new Int8Array(mp3buf.subarray(0,_sz));};this.flush=function(){var _sz=lame.lame_encode_flush(gfp,mp3buf,0,mp3buf_size);return new Int8Array(mp3buf.subarray(0,_sz));};}function WavHeader(){this.dataOffset=0;this.dataLen=0;this.channels=0;this.sampleRate=0;}function fourccToInt(fourcc){return fourcc.charCodeAt(0)<<24|fourcc.charCodeAt(1)<<16|fourcc.charCodeAt(2)<<8|fourcc.charCodeAt(3);}WavHeader.RIFF=fourccToInt("RIFF");WavHeader.WAVE=fourccToInt("WAVE");WavHeader.fmt_=fourccToInt("fmt ");WavHeader.data=fourccToInt("data");WavHeader.readHeader=function(dataView){var w=new WavHeader();var header=dataView.getUint32(0,false);if(WavHeader.RIFF!=header){return;}var fileLen=dataView.getUint32(4,true);if(WavHeader.WAVE!=dataView.getUint32(8,false)){return;}if(WavHeader.fmt_!=dataView.getUint32(12,false)){return;}var fmtLen=dataView.getUint32(16,true);var pos=16+4;switch(fmtLen){case 16:case 18:w.channels=dataView.getUint16(pos+2,true);w.sampleRate=dataView.getUint32(pos+4,true);break;default:throw'extended fmt chunk not implemented';}pos+=fmtLen;var data=WavHeader.data;var len=0;while(data!=header){header=dataView.getUint32(pos,false);len=dataView.getUint32(pos+4,true);if(data==header){break;}pos+=len+8;}w.dataLen=len;w.dataOffset=pos+8;return w;};L3Side.SFBMAX=Encoder.SBMAX_s*3;//testFullLength(); lamejs.Mp3Encoder=Mp3Encoder;lamejs.WavHeader=WavHeader;}//fs=require('fs'); lamejs();var mp3Encoder,maxSamples=1152,wav,samplesLeft,config,dataBuffer,samplesRight;var clearBuffer=function clearBuffer(){dataBuffer=[];};var appendToBuffer=function appendToBuffer(mp3Buf){dataBuffer.push(new Int8Array(mp3Buf));};var init=function init(prefConfig){config=prefConfig||{};clearBuffer();};var encode=function encode(arrayBuffer){wav=lamejs.WavHeader.readHeader(new DataView(arrayBuffer));if(!wav){self.postMessage({cmd:"error",msg:"Specified file is not a Wave file"});return;}var dataView=new Int16Array(arrayBuffer,wav.dataOffset,wav.dataLen/2);samplesLeft=wav.channels===1?dataView:new Int16Array(wav.dataLen/(2*wav.channels));samplesRight=wav.channels===2?new Int16Array(wav.dataLen/(2*wav.channels)):undefined;if(wav.channels>1){for(var i=0;i=maxSamples;i+=maxSamples){var left=samplesLeft.subarray(i,i+maxSamples);var right;if(samplesRight){right=samplesRight.subarray(i,i+maxSamples);}var mp3buf=mp3Encoder.encodeBuffer(left,right);appendToBuffer(mp3buf);remaining-=maxSamples;self.postMessage({cmd:"progress",progress:1-remaining/samplesLeft.length});}};var finish=function finish(){if(!wav){return;}var mp3buf=mp3Encoder.flush();appendToBuffer(mp3buf);self.postMessage({cmd:"end",buf:dataBuffer});clearBuffer();//free up memory };self.onmessage=function(e){switch(e.data.cmd){case"init":init(e.data.config);break;case"encode":encode(e.data.rawInput);break;case"finish":finish();break;}};};var code=workercode.toString();code=code.substring(code.indexOf("{")+1,code.lastIndexOf("}"));var blob=new Blob([code],{type:"application/javascript"});var worker_script=URL.createObjectURL(blob);module.exports=worker_script; //# sourceMappingURL=mp3worker.js.map /***/ }), /***/ "Vg41": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__style_index_less__ = __webpack_require__("vtiu"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__style_index_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__style_index_less__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__index_less__ = __webpack_require__("yv8W"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__index_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__index_less__); /***/ }), /***/ "Vp7n": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAhCAYAAADdy1suAAAAAXNSR0IArs4c6QAABQxJREFUSEuNlmtsVFUQgL+5u2y33d2W0gqCsi0Uf9iWEkBAeQioSKQtBUxqoomgLbF/jIkiAYyiP0wE5W0EAxjERBMlEOiLPmIrEkxDgwQ1tNBiKahJaYG2u33u3mPubm/b7W6h8+uemXO+mTNnztwjjCZFcfGI/1VgBUrNBiaC9CP8C6oGXQqZ7DnNU/RHQkiYspAYNOdWlHoXJGZUx0HDP4jaSqb3u5HzQsFnY2fg008B6Q8BjjSfYJxnAyvxmoYhcElUCvq4c8AU0zjTlUb+1PW8kLgcd/TjKBQ3u29RdqeSw83HqPdeH+6gmi7PKnLpNpRBcBV2vM5aIM0YRmlR7EvdyUb3BjTRIgbv030caDrE5roP8SnfwBx1lCxv/hC4yPkpsM1Q2LUoyhecYcmEhWPKxtmWCrJrc4fDV5DlrRQqXQl0qyYEp0E6MvNL8tzrxwQ1J+26sZ9NVz8wh7+R5VkoFDsLUBw0tHNiZ3Fx8bmQ7Td332ZGVQb9KlhVFrHQ/NxVptgnDzrv1/tJ+2Ue17sagzolTwqFjkJEsozxofS9vJWUFxLtT/+dIvfS64O6gqQ8DqbvDdvRjoY9bKn/KKgX9Z5Q7GpCqSRj3LjsCtMd00IWba3bzmeNuwO6qfbH+HPpRWKtrjDwpfbLzD2/ZEAv3wpFzi4g2iiPnpfasGm2kEUv1uRQ0fpzQBdnjSXBlsCxWYfCDre1r41HKpLN6igRihzdIPbRwIkVSbT13R10Nj0mmb+W1gaqZ7jc6W1lYuXAbkWVGhE3ACnGpIZlV0gZkYqvbh6h5v5Fjt/+PsA5OfcH1j4aOJIQCUmFcEQodJ5AeNmYdTB9DwVJgfoOka+bv6Hgj3d4PnEZlQsKw+yGYkfDbrbUbw/aFG8LJa430dVRYzw7NoPaxb+G3bZt9Z+ws3EPl5dcIN2VGgY2yi393HyueY3No9AsTwhlOOh33gLiDe3hmQfId28IWfza73lMsMVzIO2LiNHuatzPprqBCyKUk+lZGewVxY73UbLT+DT6RPn80zybsGgQUtFaxby4OYwfFxcGLm0pZ3XtK+aV9iP+RWR215hNyIrXaXS2Z4JwG3tTd7DR/UbgpkUSownta/qKLXXbh/qEyOdkdm425g+1zZPOiURxARWsEEPSnanku4fapq70wbZ59NbxkW3zNJmedQh6KNgYnbG7EUs1IqHXL2LMw5VSgta5jlX0mtrwX1OxPQllqYIxwkVKkc61w6HhEZvuDDiWapSYdzRyzCJnkc41I6Gjgw1LqT0Zv6UaJNCgIkgZDs8altMTyRieiuGzztinoQXg7pDFRq3GeHJGgz44YpNUZJ8OgZyb8Eq6PKvNn+Zo5/rgiM1Vp6JSsFmrUHKNLk/2w6Bji9iEl45Pxne/hWyM/v1QiRzxx2g8HTuevr44sMZg1W30Y8GCQsSPkl50nxfVc48cOsd2eOcTXbR1T0NUFOKPRykXFosNXQUfGAGwvwfR2kHrQPm8dPfdIJe+kCsT4s2IdJ4jA6Us4EtCadFBu5qEiB1BoasOkPtBJ6oVLK0ofwfZvSHPotBUKIxfVQairCjfVNAcA+BENIlGiQK9AyUdAb2mWlCWu/j97eT0BpqxKeE5LpvkoPdeMsoajabHge5CWWwI1sDjTcOH0nvQpB2leQPROnv/ZjnmOyu4mVGP90fiiIuORddj6LNGYSWYYyU+VH8vusWL1nV/tCr5H1G1zQWjI7W0AAAAAElFTkSuQmCC" /***/ }), /***/ "Vs/p": /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _rule = __webpack_require__("hGxU"); var _rule2 = _interopRequireDefault(_rule); var _util = __webpack_require__("eCjd"); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } function date(rule, value, callback, source, options) { // console.log('integer rule called %j', rule); var errors = []; var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); // console.log('validate on %s value', value); if (validate) { if ((0, _util.isEmptyValue)(value) && !rule.required) { return callback(); } _rule2['default'].required(rule, value, source, errors, options); if (!(0, _util.isEmptyValue)(value)) { var dateObject = void 0; if (typeof value === 'number') { dateObject = new Date(value); } else { dateObject = value; } _rule2['default'].type(rule, dateObject, source, errors, options); if (dateObject) { _rule2['default'].range(rule, dateObject.getTime(), source, errors, options); } } } callback(errors); } exports['default'] = date; /***/ }), /***/ "Vtxq": /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _util = __webpack_require__("eCjd"); var util = _interopRequireWildcard(_util); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } /** * Rule for validating minimum and maximum allowed values. * * @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 range(rule, value, source, errors, options) { var len = typeof rule.len === 'number'; var min = typeof rule.min === 'number'; var max = typeof rule.max === 'number'; // 正则匹配码点范围从U+010000一直到U+10FFFF的文字(补充平面Supplementary Plane) var spRegexp = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g; var val = value; var key = null; var num = typeof value === 'number'; var str = typeof value === 'string'; var arr = Array.isArray(value); if (num) { key = 'number'; } else if (str) { key = 'string'; } else if (arr) { key = 'array'; } // if the value is not of a supported type for range validation // the validation rule rule should use the // type property to also test for a particular type if (!key) { return false; } if (arr) { val = value.length; } if (str) { // 处理码点大于U+010000的文字length属性不准确的bug,如"𠮷𠮷𠮷".lenght !== 3 val = value.replace(spRegexp, '_').length; } if (len) { if (val !== rule.len) { errors.push(util.format(options.messages[key].len, rule.fullField, rule.len)); } } else if (min && !max && val < rule.min) { errors.push(util.format(options.messages[key].min, rule.fullField, rule.min)); } else if (max && !min && val > rule.max) { errors.push(util.format(options.messages[key].max, rule.fullField, rule.max)); } else if (min && max && (val < rule.min || val > rule.max)) { errors.push(util.format(options.messages[key].range, rule.fullField, rule.min, rule.max)); } } exports['default'] = range; /***/ }), /***/ "W7F7": /***/ (function(module, exports) { // removed by extract-text-webpack-plugin module.exports = {"search_content":"search_content___3rohV","search_input":"search_input___exevd","search_name":"search_name___3KoBE","search_btn":"search_btn___3sBzz","type_body":"type_body___3CAJh","type_item":"type_item___2MG_L","type_img":"type_img___28mQy","item_checked":"item_checked___3TMdE","company_list":"company_list___GZrfg","personnel_list":"personnel_list___1nKqL","points_list":"points_list___1YBgj","apicture":"apicture___2VMZ4","title":"title___2MdoJ","content":"content___1apSU","borderline":"borderline___3_JHr","item":"item___1Tivm","dashed":"dashed___1B8AK","todayError":"todayError___313B6","todayErrorContent":"todayErrorContent___3y6DK","todayCount":"todayCount___2w5rn","otherDay":"otherDay___3G0fr","otherDayCount":"otherDayCount___krIl6","errorTime":"errorTime___kFJ8y","nowError":"nowError___1gT0d","norErrorContent":"norErrorContent___23D7V","nowErrorItem":"nowErrorItem___nvhVJ","itemTitle":"itemTitle___34MTQ","icon":"icon___3qLMQ","itemInfo":"itemInfo___2XuSn","errorReport":"errorReport___374GY","errorTimeReport":"errorTimeReport___1-GLV","attendInfo":"attendInfo___1UCZB","back_icon":"back_icon___1kX3M","attend_name":"attend_name___3lgtL","attend_info":"attend_info___3Od7T","attend_item":"attend_item___3Lj6X","attend_list":"attend_list___2H09q","openvideo-mask":"openvideo-mask___2XLhb","map_video":"map_video___wWRJz","right_click_search":"right_click_search___G7q8g","close":"close___3fFRl","info__search":"info__search___251zq","check_box":"check_box___3LVs7","compony_list":"compony_list___fXkx5","list_header":"list_header___34Za1","list_close":"list_close___gCG3N","list_content":"list_content___2chKX","map_event_content":"map_event_content___WrBYw","map_event_header":"map_event_header___3Fh7U","header_name":"header_name___35H3L","header_icon":"header_icon___261qS","header_back":"header_back___3dOye","map_event_body":"map_event_body___RkLZS","body_card":"body_card___PeyOf","card_title":"card_title___2bd8e","card_label":"card_label___SwPmo","card_name":"card_name___3IB2k","card_content":"card_content___2TsAj","card_item":"card_item___3IYVw","card_sum":"card_sum___2CoOO","body_detail":"body_detail___3F6y9","detail_time":"detail_time___n2BFr","detail_item":"detail_item___23NZj","item_title":"item_title___21ZcE","item_content":"item_content___Rg13p","text":"text___2PQmm","detail_bottom":"detail_bottom___i2Hpg","componey":"componey___2uBgH","componey_box":"componey_box___1R1F5","componey_info":"componey_info___2RIOj","info":"info___39XJr","info_item":"info_item___1WYHa","tabs":"tabs___3-Pf2","tab_pane":"tab_pane___3naFs","tab_active":"tab_active___WJrp2","police_list":"police_list___3uB7W","poibox":"poibox___1rX5c","img_span":"img_span___2PFcB","name":"name___38CEZ","send_header_bar":"send_header_bar___11-wv","dep_box":"dep_box___25YQR","root_dep":"root_dep___3EEE2","nav_content":"nav_content___1MVhp","nav":"nav___ex3wt","dep_item":"dep_item___Ts9La","dep_name":"dep_name___1W9CW","dep_next":"dep_next___1TIi6","dark":"dark___341xK","detail":"detail___3grIF","slider":"slider___1IPyX"}; /***/ }), /***/ "WO9G": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAAAXNSR0IArs4c6QAABBhJREFUWEfNmE1MHGUYx3/PLAImZWdLKiqxnhrU9GBMT9KilASNsYnfNR7o1ZPtzkLQWIxr/Igi7NJ68igejNX6kdQYJYFqW3pqjIfGlvRkDSo2dHZpIuDuPOYdZzfLdKFDaeq8p8nM+/zn//6fj/d5X2Gdw35FN1vLPF726BW4W4V2UdoNjAqzoswq/JqwmPAa+abwrlxezy8k6uSUo08pvKTQhdIQyU4oCZwQ+MDNy5dRbK5JaHNad5aFYZTOKICrzhGmE8rg5TE5tRbOqoSeO6KJ704zinJgBYDgoUxbwlckONPgMStJZn2XFWkvWbRTZoenPInQiWKF7A89+iD9n+2Vcj1idQmlsppSlyMKvVUjYVGEw80Wo3+OyFwUtW4f0LZFj35V9qM0V2wEJiTFXjcrbhjnKkKGjOcyDdxXBRCOJgRnPicXoxAJz2nN6NayklflmZpvv1gpOsOkVhAybvp+mm9rlFERhgp5eed6iIRtbEdfVeUtwP+vUeqRTh6rdd8KQklHx2piRsXihUJOPr0RZCoYdkafV49PKqQQDhXzkq5x53+PfjbByRo3HbxRyqyi1NuV9wnYVcm+qkJJR09VUluEo4W8PBtVmW2HtcnMvbBflqLa2I5+Xo0pYbqYl52BG8EUPU/5wgcTFhuEjqgBnMro/ar84JsKD7s5+TkKKRPoJWWmkn2W8LQpnr5CtqOTquz2QS2GCzl5OQqomZN0dAjlzWAxrxXzYoI20rAz+p56DAaLmSrkpUfM3qRLzPnbgeDdmuDOqHXGAKUymvU8XjfPlsUbbk6ykdgApk79XeZ3v3iabaaJNkmltc+D8QDkZHFMuqICbpSQr3BaTwC7/AXBPkk6Oo7S578QBty8jN5MQilH+z1lJHD5x2KndUqh2yfUwG53RI7fVEID2u2VmAoy7LhR6DxKh3nRaHHPpZzM1COUyugDwBPqXdV6dCk8FAD+CBgXVIdYlICv3Zz8VA93S0Y7lj3OBwrNGIUWFDaZF00pWv7KypWw4fasNv5WYE4Vez3qVeaKULjLpu1sVpbD9rdlddOSy0KwoCtiO1pUpcVXqJHkpWHxP9aOHR/qLRfO8YcqrddJaH7bvdxx5kX5J2y/ZVBblpcp+oSEhcgua3V0e1nYAyGXKT2q9ASAkwiToZ+WEsqx+bycjeqymAV1Wj8C9vlZ9j+kvZ3WAYX3A/XGY1UYExZ98ds6jFQb2VztjB5Uz+8CzcY8VMhJtc+5VkbW3VyN0UbaD5N9JfCrewN0r5ZNYXJrth9m8kYaNNOLG4zVjjb1lFqzQTMGsWthA5Xi0+QbQrE7BvkBHqeDYiX4YnWUrpCK1WVDbZrG5jomXDtic2EVJmaOTbLIHk/oFWVr3Ss94aKlTGgzx9Z7pfcvw56HcwBK5ogAAAAASUVORK5CYII=" /***/ }), /***/ "Wg2s": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; __webpack_require__("crfj"); var _button = _interopRequireDefault(__webpack_require__("zwGx")); __webpack_require__("tIHZ"); var _popover = _interopRequireDefault(__webpack_require__("tjvM")); __webpack_require__("/m1I"); var _tooltip = _interopRequireDefault(__webpack_require__("O6j2")); __webpack_require__("baa2"); var _icon = _interopRequireDefault(__webpack_require__("FC3+")); var _toConsumableArray2 = _interopRequireDefault(__webpack_require__("V4Os")); __webpack_require__("UQ5M"); var _message2 = _interopRequireDefault(__webpack_require__("/qCn")); var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); __webpack_require__("LHBr"); var _input = _interopRequireDefault(__webpack_require__("A+AJ")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); var _timJsSdk = _interopRequireDefault(__webpack_require__("B5T/")); var _dva = __webpack_require__("S6G3"); __webpack_require__("RKq/"); var _emojiMap = __webpack_require__("Da15"); var _imInitialize = _interopRequireDefault(__webpack_require__("cLc/")); var _api = __webpack_require__("H/Zg"); var _Record = _interopRequireDefault(__webpack_require__("tVfF")); var _store = _interopRequireDefault(__webpack_require__("Y4FN")); var _utils = __webpack_require__("oAV5"); var _dec, _class; /** * IM可视化视图 */ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } var TextArea = _input.default.TextArea; var MessageSendBox = exports.default = (_dec = (0, _dva.connect)(function (state) { return { imIsLogin: state.global.imIsLogin, isSDKReady: state.im.isSDKReady, // username: state.global.companyInfo.adminPhone, imSig: state.im.imSig, currentConversation: state.im.currentConversation, currentMessageList: state.im.currentMessageList }; }), _dec(_class = /*#__PURE__*/function (_Component) { function MessageSendBox(props) { var _this; (0, _classCallCheck2.default)(this, MessageSendBox); _this = _callSuper(this, MessageSendBox, [props]); _this.state = { mobilePhone: (0, _utils.gup)('mobilePhone', window.location.href), name: decodeURI((0, _utils.gup)('username', window.location.href)), emojiMap: _emojiMap.emojiMap, emojiName: _emojiMap.emojiName, emojiUrl: _emojiMap.emojiUrl, messageContent: '', //文本值 messageSendSoundURL: null, //发送的录音地址 messageSendSoundTime: null, //发送的录音时长 // startRecord: false //是否开始录音 // account: '@TGS#12U4JMAGX', //发送给谁的账号 // currentConversationType:'',//是个人,还是群组 startRecord: false //是否开始录音 }; return _this; } (0, _inherits2.default)(MessageSendBox, _Component); return (0, _createClass2.default)(MessageSendBox, [{ key: "componentDidMount", value: function componentDidMount() {} }, { key: "componentWillReceiveProps", value: function componentWillReceiveProps(nextProps) { //如果有进来要发送的录音地址,就发送一条自定义的消息 if (nextProps.messageSendSoundURL !== this.state.messageSendSoundURL) { this.sendSound(nextProps.messageSendSoundURL, nextProps.messageSendSoundTime); this.setState({ messageSendSoundURL: nextProps.messageSendSoundURL, messageSendSoundTime: nextProps.messageSendSoundTime }); } } }, { key: "getAccount", value: function getAccount() { if (!this.props.currentConversation || !this.props.currentConversation.conversationID) { return ''; } switch (this.props.currentConversation.type) { case 'C2C': return this.props.currentConversation.conversationID.replace('C2C', ''); case 'GROUP': return this.props.currentConversation.conversationID.replace('GROUP', ''); default: return this.props.currentConversation.conversationID; } } //获取是个人,还是群组 }, { key: "getType", value: function getType() { if (!this.props.currentConversation || !this.props.currentConversation.type) { return ''; } return this.props.currentConversation.type; } //发送文字跟表情 }, { key: "sendTextMessage", value: function sendTextMessage() { var account = this.getAccount(); var currentConversationType = this.getType(); if (this.state.messageContent === '' || this.state.messageContent.trim().length === 0) { this.setState({ messageContent: '' }); _message2.default.warning('不能发送空消息哦!'); return; } var messageData = _imInitialize.default.createTextMessage({ to: account, conversationType: currentConversationType, //会话类型,端到端,或者是群组 payload: { text: this.state.messageContent } }); if (this.props.imIsLogin) { this.pushCurrentMessageList(messageData); this.sendMessage(messageData); } else { ///这里还要完善,没有登录的时候先登录,然后在发送 this.props.dispatch({ type: "global/imLogin", payload: { username: this.state.mobilePhone, name: this.state.name } }); } } //发送图片 }, { key: "sendImage", value: function sendImage() { var account = this.getAccount(); var currentConversationType = this.getType(); var messageImage = _imInitialize.default.createImageMessage({ to: account, conversationType: currentConversationType, payload: { file: document.getElementById('imagePicker') // 或者用event.target } // onProgress: percent => { // this.$set(message, 'progress', percent) // 手动给message 实例加个响应式属性: progress // } }); if (this.props.imIsLogin) { this.pushCurrentMessageList(messageImage); this.sendMessage(messageImage); } // this.$store.commit('pushCurrentMessageList', message) // this.tim.sendMessage(message).catch(imError => this.$message.error(imError.message)) this.refs.imageRef.value = null; } //发送文件 }, { key: "sendFile", value: function sendFile() { var account = this.getAccount(); var currentConversationType = this.getType(); var messageFile = _imInitialize.default.createFileMessage({ to: account, conversationType: currentConversationType, payload: { file: document.getElementById('filePicker') // 或者用event.target } // onProgress: percent => { // this.$set(message, 'progress', percent) // 手动给message 实例加个响应式属性: progress // } }); if (this.props.imIsLogin) { this.pushCurrentMessageList(messageFile); this.sendMessage(messageFile); } this.refs.fileRef.value = null; } //发送自定义(语音) }, { key: "sendSound", value: function sendSound(soundRUL, soundTime) { var account = this.getAccount(); var currentConversationType = this.getType(); var content = { url: soundRUL, time: soundTime }; var messageSound = _imInitialize.default.createCustomMessage({ to: account, conversationType: currentConversationType, payload: { data: 'Sound', // 用于标识该消息是音频类型消息 description: '[语音]', // 获取音频路径 extension: JSON.stringify(content) } }); if (this.props.imIsLogin) { this.pushCurrentMessageList(messageSound); this.sendMessage(messageSound); } this.setState({ messageSendSoundURL: '' }); // }; } }, { key: "pushCurrentMessageList", value: function pushCurrentMessageList(messageData) { if (!this.props.currentConversation.conversationID) { return; } if (Array.isArray(messageData)) { // console.log(message); // 筛选出当前会话的消息 // const result = messageData.filter( // item => // item.conversationID === this.props.currentConversation.conversationID // ); // this.props.dispatch({ // type: 'im/pushCurrentMessageList', // payload: [...this.props.currentMessageList, messageData] // }); // state.currentMessageList = [...state.currentMessageList, ...result] // console.log(result); } else if (messageData.conversationID === this.props.currentConversation.conversationID) { this.props.dispatch({ type: 'im/pushCurrentMessageList', payload: [].concat((0, _toConsumableArray2.default)(this.props.currentMessageList), [messageData]) }); } } }, { key: "sendMessage", value: function sendMessage(message) { var _this2 = this; _imInitialize.default.sendMessage(message).then(function (res) { console.log('发送成功'); console.log(res); _this2.setState({ messageContent: '' }); }).catch(function (err) { console.log('发送失败'); console.log(err); message.error('发送失败'); }); } }, { key: "render", value: function render() { var _this3 = this; return /*#__PURE__*/_react.default.createElement("div", { id: "message-send-box-wrapper" }, /*#__PURE__*/_react.default.createElement("div", { className: "send-header-bar" }, /*#__PURE__*/_react.default.createElement(_popover.default, { placement: "topLeft", content: /*#__PURE__*/_react.default.createElement("div", { className: "emojis" }, this.state.emojiName.map(function (item, index) { return /*#__PURE__*/_react.default.createElement("div", { className: "emoji", key: index, onClick: function onClick() { _this3.setState({ messageContent: _this3.state.messageContent + item }); } }, /*#__PURE__*/_react.default.createElement("img", { src: _this3.state.emojiUrl + _this3.state.emojiMap[item], style: { width: '25px', height: '25px' } })); })), trigger: "click" }, /*#__PURE__*/_react.default.createElement(_tooltip.default, { placement: "bottom", title: "\u53D1\u8868\u60C5" }, /*#__PURE__*/_react.default.createElement(_icon.default, { type: "smile", style: { fontSize: '17px' } }))), /*#__PURE__*/_react.default.createElement(_tooltip.default, { placement: "bottom", title: "\u53D1\u6587\u4EF6" }, /*#__PURE__*/_react.default.createElement(_icon.default, { type: "folder", onClick: function onClick() { _this3.refs.fileRef.click(); }, style: { fontSize: '17px' } })), /*#__PURE__*/_react.default.createElement("input", { type: "file", id: "filePicker", ref: "fileRef", onChange: function onChange() { _this3.sendFile(); }, style: { display: 'none' } }), /*#__PURE__*/_react.default.createElement(_tooltip.default, { placement: "bottom", title: "\u5F55\u97F3" }, /*#__PURE__*/_react.default.createElement(_icon.default, { type: "audio", style: { fontSize: '17px' }, onClick: function onClick() { _this3.setState({ startRecord: !_this3.state.startRecord }); _this3.props.startRecord(!_this3.state.startRecord); } }))), /*#__PURE__*/_react.default.createElement(TextArea, { style: { background: 'none', border: 'none' }, rows: 4, className: "text-input", value: this.state.messageContent, onChange: function onChange(e) { _this3.setState({ messageContent: e.target.value }); }, onPressEnter: function onPressEnter() { return _this3.sendTextMessage(); } }), /*#__PURE__*/_react.default.createElement(_button.default, { size: "small", className: "btn-send", onClick: function onClick() { return _this3.sendTextMessage(); } }, "\u53D1\u9001")); } }]); }(_react.Component)) || _class); /***/ }), /***/ "Wny5": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAEBJREFUOE9jZKAQMML0x8XF3WdgYFAg0rwHixYtUgSppZ4BRNqMoQzugmFgwGgskBuJSCmRXCOol5QpjkZyvQAAczweEdHiqQUAAAAASUVORK5CYII=" /***/ }), /***/ "WoMo": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAiCAYAAAC0nUK+AAAAAXNSR0IArs4c6QAABP1JREFUSA2dVXtMW1UY/859tNAAwu3AiQtxmzo3F/4YZNmIMoE5XTLJTFSyuH/2D9kSwx8+xsOYYCLSxrf/qFviNNFkbnEmIxlZBRYGZiwDJNsEMxFZ2Igd8mpHaW977/H7bnvppS2P8SXtOed7/M53vtdlsAztc02XRnT9JQBexjjkAzAnZ3wK93dAYJ0iE85frM3uYgw5KYil4EFF03QZgO7iwHemklt5jME14GJt+7s5l6x82i8Cb+RcuNw82QQc6kiYmylAxXYb7HrcBvk5ImSlM/DNcxif1qBnWIX2mypM+HVSRSD20bMNSl0jY1GGwTNE+HDO2d7mqTO4viKLAEf2OODl4jSwSYvuj2lHFzXC4ZfeIJzqDEBYIzR2rrReedW8AGGi1G2veR+Bj2U7GLgPZUHZNjuIwtLAZEXy7Rtk2LFRhit/qRAM861jXSFppMPdQXLDep9rsiSiQ7cscPbp4SzY9qhMspQ0rwLUnvZBuo1Bc1Um5jWqNng3DG/+4IOwzjiGaE97g9IlkEjTOcaZMwrFcsA61kT3rRAUb5Khd0QFz43QggNkR/aEgxH4gATC8+6ZYs7hOUoexXg5ujYShiceluD1knRYny3ChYE4ONmRPeHgDaXl7v92CrqmYR2DURXLJY90Ric0eCxXxFgDHCxKg6G7EZgNxEuc7Km6iFiEHRBQVEEHKreViMC/75oHV8t9+O2WCjo+mV5jJROHcCXsrQK6m+o4kcjQO6tD+dM2cGACb4yFMc5Uc3Giet8b85a4CzgMCgRgPI+Y1CBW0rAVPmudgzSZQeeQCtNzHONs5N+qBv2jiz03cRjwXAk4m8ME2KnznBnxCy4Nqui1Bs3n/QbYQUxW5Y40+D0BbDagw8g9DTblRV9OOAYhLrnipQO1tJV+6pm3Ho3KeCpfgoy0ZO8Hbse9N3Gw2McpLP2EQrEzqWc4jN5EzKOxUqtfvB6CZ55MTvzNO3FdEwdbqR/BhVaypiFEAERnrs4brU3tTT8BRx+OVWj/A8G3JIMPxsDJnnAMYryF7f9yMit0H0axs3Kqyx1QtSs9KlzDP4XyREeAhsqEJDs3Cq01Th+G5hPCoulGM2ItRHZkHyX2oeedaEJBkpyf48OHaGy+d9b/wBcQMNmRPdZbvz1D+YouWai9F92+Laqm4lcFMtc6zzEt90Q7K/a85RxbBE6HctfUfqbzFpxqRtE+2JcIAiKDck/DuquERbTgefQIgF+jal3XvzHPq1tZBERW2VGnGJVn2iR1RFu9cgLr7mNTYTUrVmt1IjDZJYETs3S3Uo91fYX2KxJjJ9sanKdS6aUEbyxjEbtNOIRRm0llZPLQgesFjyg15jlxTQlOShfezrnNBPZGooF5xsoIiSBXfXeEBU1e4rokOCm21ys/one/JhoZZ8aaPA1Zf6aUxZjLgpOOTRKP4bLIO2o4ZbPijmEsuawI3no8+2+cXC4rgigKR8++xuJj1Cq07JPq3CKDoqIiRzgcVuChrXnrXvjCA0xyctV3eeLnyqOCIPhlWZ7q6+szB4rV1NgnfzhjKoWFhXnBYHCzpmkZWsDL7BtKVMmRt9s/eLouON7rJz5enJufn695vV78miXTkmHBLl1vVZ9qO35OnfnnW//AyWErP1HPKlsSHJ/9r1VRV2ciEy2Hv7byaJ+oZ5WvKuboXSYOMxuuIoJpWJ7qamL+P8dZFdQwMDXiAAAAAElFTkSuQmCC" /***/ }), /***/ "X/W6": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAUCAYAAAEYUjbiAAAAAXNSR0IArs4c6QAAAZ9JREFUOBGdUz1LA0EQvQvWKQQhNkLw68BCrSL4B6ys/AcGEUVttBV/gpZKGq1tLBLzBxT9DSnFjyQYLERt5Hxvb+cybjZHuIF3M/vmzcze7l0QwOI47tAzmLA+DiWAP2NsLIQkRvRTwGMF+GRRiaw2knVLbEnCNOADRDIPsTRMkwhKbE77DmFJGPyyTKxqgwbJU6BriYpV9x0SezZJt9vPJMO5E/PSOuHEXbNWXeoiAHcrvIguhcjwV9JAipaVePFfUi8gOrTCI83LIUk3XpExdYBBAZUdGSMCeuGY992H1pqY9/Oo2MiOiRT3wLZlaa0SelxZL6h9ASrAMxdiI+1pDCMWgHWgBVwDYhsIZoGbkc5JqgY89hPJnhw/PyC2hPxGHF8F+Ck1gSmgBkwCrr2C2ASegDWAn2cNR9ziaV04k/Muz3mJ08AwayOxA6wC28AbMMxmTAJbmfNsp+Grgq7p0aaNikjeewRf4HiWqXENkHftDkSRH8871ONpRf6gxzNbAnr5e5hKbijzLz9w38Wu93MNRvEJ8GGb0B9nNfoDDmdI2fruJ4gAAAAASUVORK5CYII=" /***/ }), /***/ "X2jB": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); __webpack_require__("yQBS"); var _tabs = _interopRequireDefault(__webpack_require__("qA/u")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); var _index = _interopRequireDefault(__webpack_require__("W7F7")); var _dva = __webpack_require__("S6G3"); var _events = _interopRequireDefault(__webpack_require__("TLe5")); var _api = __webpack_require__("H/Zg"); var _ComponyItem = _interopRequireDefault(__webpack_require__("shlV")); var _classnames = _interopRequireDefault(__webpack_require__("HW6M")); var _biz = __webpack_require__("Q3h8"); var _dec, _class; /** * 保安服务公司列表 */ // 引入 EventEmitter function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } var TabPane = _tabs.default.TabPane; var ComponyList = exports.default = (_dec = (0, _dva.connect)(function (state) { return { //地图数据 pictureMarkersList: state.command.pictureMarkersList, mapStyle: state.command.mapStyle, selectComponyList: state.command.selectComponyList }; }), _dec(_class = /*#__PURE__*/function (_Component) { function ComponyList(props) { var _this; (0, _classCallCheck2.default)(this, ComponyList); _this = _callSuper(this, ComponyList, [props]); _this.onClose = function () { // 关闭 _this.props.dispatch({ type: 'command/setSelectComponyList', payload: [] }); _events.default.emit('clearMapTag', 'securityCompany'); _events.default.emit('clearMapModal', 'ComponeyInfo'); _events.default.emit('APictureChecked', { type: 'securityCompanyChecked', checked: false }); _this.props.onClose && _this.props.onClose(); }; _this.state = { companyList: [] }; return _this; } (0, _inherits2.default)(ComponyList, _Component); return (0, _createClass2.default)(ComponyList, [{ key: "componentDidMount", value: function componentDidMount() {} // 利用此事件来决定何时需要重新渲染组件。 // shouldComponentUpdate(nextProps, nextState) { // } }, { key: "onChangeCompony", value: function onChangeCompony(item) { console.log('onChangeCompony'); var that = this.props; (0, _biz.showCompanyPointInfo)({ doMainId: item.selectComponeyId, success: function success(info) { var data = { data: [info] }; // TAG: 根据需求 368。点击打开公司办公地点定位,并打开公司信息弹框 // event 发送器: eventCenter.emit("事件名称", 参数列表); // 这样做的好处是,爷传孙,不需要父级组件做承载 _events.default.emit('addPictueMarks', { data: data, type: "securityCompany" }); } }); } }, { key: "render", value: function render() { var _this2 = this; var _this$props = this.props, mapStyle = _this$props.mapStyle, selectComponyList = _this$props.selectComponyList; var clsString = (0, _classnames.default)(_index.default.list_item, 'list_item'); return /*#__PURE__*/_react.default.createElement("div", { className: mapStyle }, /*#__PURE__*/_react.default.createElement("div", { className: _index.default.compony_list }, /*#__PURE__*/_react.default.createElement("div", { className: _index.default.list_header }, /*#__PURE__*/_react.default.createElement("div", { className: _index.default.list_close, onClick: this.onClose }, "x"), "\u4FDD\u5B89\u670D\u52A1\u516C\u53F8"), /*#__PURE__*/_react.default.createElement("div", { className: _index.default.list_content }, selectComponyList && selectComponyList.map(function (item, i) { return /*#__PURE__*/_react.default.createElement(_ComponyItem.default, { item: item, onChangeCompony: _this2.onChangeCompony }); })))); } }]); }(_react.Component)) || _class); /***/ }), /***/ "XDoD": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = _default; __webpack_require__("UQ5M"); var _message2 = _interopRequireDefault(__webpack_require__("/qCn")); var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("jlIA")); __webpack_require__("sRCI"); var _modal = _interopRequireDefault(__webpack_require__("vnWH")); var _reactDom = _interopRequireDefault(__webpack_require__("O27J")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); var _api = __webpack_require__("H/Zg"); var _InitTraietory = _interopRequireWildcard(__webpack_require__("VIZy")); var _utils = __webpack_require__("oAV5"); var _MouseMovement = _interopRequireDefault(__webpack_require__("06MX")); var _func = __webpack_require__("ZKAp"); var _events = _interopRequireDefault(__webpack_require__("TLe5")); var _recordHistory = __webpack_require__("eXDv"); var _biz = __webpack_require__("Q3h8"); function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i.return) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); } function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, _regeneratorDefine2(e, r, n, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /** * 定义个人的信息窗体 * @param type:用于警保联动与一张图的图层区分(两者除了展示的字段不一样,其余功能都一样)'police'是警保联动 */ var confirm = _modal.default.confirm; // 引入 EventEmitter function _default(data) { var _this2 = this; var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''; var marker = arguments.length > 2 ? arguments[2] : undefined; console.log('this.props', this.props); var mapStyle = this.props.mapStyle; var name = data.name, photoUrl = data.photoUrl, mobilePhone = data.mobilePhone, DEPTNAME = data.DEPTNAME, companyName = data.companyName, securityName = data.securityName, time = data.time, domainid = data.domainid, ATTENDANCESITEID = data.ATTENDANCESITEID, ATTENDANCESITENAME = data.ATTENDANCESITENAME; var content = []; var imgHeader = []; var that = this; if (photoUrl) { imgHeader.push("" + name + ""); } else { imgHeader.push("" + name.substring(name.length - 2, name.length) + "" + name + ""); } switch (type) { //警保联动 // case 'police': // content.push( // "
    " + // imgHeader + // "
    所属公司:" + // companyName + // "
    手机号:" + // mobilePhone + // "
    " // ); // break; //一张图 default: content.push("
    " + imgHeader + "
    "); break; } content.join("
    "); var infoDiv = document.createElement("div"); infoDiv.className = mapStyle; var info = document.createElement("div"); info.className = "content-window-card-trajectory"; infoDiv.appendChild(info); //可以通过下面的方式修改自定义窗体的宽高 // info.style.width = "400px"; // 定义内容 var middle = document.createElement("div"); middle.className = "info-middle"; middle.innerHTML = content; var componeyDiv = document.createElement("div"); componeyDiv.className = "text"; componeyDiv.innerHTML = "所属公司:"; var componey = document.createElement("span"); componey.className = "content-click"; componey.innerHTML = companyName; componey.onclick = function () { (0, _recordHistory.recordAdd)({ from: 'CreateTrajectoryInfoWindow', to: 'ComponeyInfo', fromData: data, toID: domainid }); (0, _biz.showCompanyPointInfo)({ doMainId: domainid, success: function success(info) { that.props.dispatch({ type: 'command/setSelectComponeyInfo', payload: info }); } }); }; componeyDiv.appendChild(componey); var attendanceDiv = document.createElement("div"); attendanceDiv.className = "text"; attendanceDiv.innerHTML = "所属驻勤点:"; var attendance = document.createElement("span"); attendance.className = "content-click"; attendance.innerHTML = ATTENDANCESITENAME; // attendance.innerHTML = "驻勤点"; attendanceDiv.appendChild(attendance); attendance.onclick = function () { (0, _recordHistory.recordAdd)({ from: 'CreateTrajectoryInfoWindow', to: 'AttendInfo', fromData: data, toID: ATTENDANCESITEID }); (0, _biz.showAttendPointInfo)({ aid: ATTENDANCESITEID, companyName: companyName, doMainId: domainid, success: function success(result) { that.props.dispatch({ type: 'command/setSelectAttendInfo', payload: result }); } }); }; var phone = document.createElement("div"); phone.className = "text"; phone.innerHTML = "手机号:" + mobilePhone; middle.appendChild(componeyDiv); middle.appendChild(attendanceDiv); middle.appendChild(phone); info.appendChild(middle); //定义详情 var detail = document.createElement("div"); detail.className = "detail-div"; info.appendChild(detail); //定义关闭按钮 var detail = document.createElement("div"); detail.className = "close-div"; var a = document.createElement("a"); a.innerHTML = "x"; a.onclick = function () { // this.state.map.clearInfoWindow(); //因为police的图层的打点跟列表的选中,没有做更多处理,直接传选中点的信息在这更改,避免需要在生命周期中监听修改的麻烦 if (type == 'police') { _this2.clear('setPoliceSelectIndex'); marker.setContent('
    ' + marker.w.indexText + "
    "); } else { _this2.clear('setPersonSelectIndex'); _events.default.emit('checkedMapTag', { type: 'securityResource', checked: false }); } }; detail.appendChild(a); info.appendChild(detail); // 定义定位信息 var top = document.createElement("div"); top.className = "info-button"; var titleDiv = document.createElement("div"); titleDiv.className = "title"; titleDiv.innerHTML = '定位信息'; top.appendChild(titleDiv); var locationDiv = document.createElement("div"); locationDiv.className = "location-time"; locationDiv.innerHTML = "该定位上传时间:" + (time != undefined ? time : ''); top.appendChild(locationDiv); info.appendChild(top); //定义4个指挥调度按钮 var top = document.createElement("div"); top.className = "info-button"; var titleDiv = document.createElement("div"); titleDiv.className = "title"; titleDiv.innerHTML = '指挥调度'; top.appendChild(titleDiv); var button1 = document.createElement("span"); button1.className = "button"; button1.innerHTML = "文字"; button1.onclick = function () { _this2.clear('setPersonSelectIndex'); _this2.character(data); }; var button2 = document.createElement("span"); button2.className = "button"; button2.innerHTML = "语音"; button2.onclick = function () { _this2.clear('setPersonSelectIndex'); _this2.voice(data); }; var button3 = document.createElement("span"); button3.className = "button"; button3.innerHTML = "视频调度"; var button4 = document.createElement("span"); button4.className = "button"; button4.innerHTML = "视频上拉"; var _this = this; button3.onclick = function () { _this.clear('setPersonSelectIndex'); // confirm({ // title: <>是否开启屏幕录制? Modal.destroyAll()} style={{ position: 'absolute', top: '4px', right: '6px', cursor: 'pointer', color: '#000000a6' }}>取消, // content: // "开启后,被调度保安员的视频页面将会被录制,调度结束后,可查看录制文件。", // okText: "开启录制,继续调度", // cancelText: "不开启录制,继续调度", // onOk() { // _this.video([data], "个人调度", [mobilePhone]); // }, // onCancel() { // _this.video([data], "个人调度", []); // }, // }); _this.props.dispatch({ type: 'command/fetchVideoGenre', payload: 0 }); // _this.video([data], "个人调度", [mobilePhone]); _events.default.emit('clickTextScheduling', { item: [data], isNeedRecord: [mobilePhone], type: "video" }); }; button4.onclick = function () { _this.clear('setPersonSelectIndex'); _this.props.dispatch({ type: 'command/fetchVideoGenre', payload: 1 }); // _this.video([data], "个人调度", [mobilePhone]); _events.default.emit('clickTextScheduling', { item: [data], isNeedRecord: [mobilePhone], type: "video" }); }; top.appendChild(button1); top.appendChild(button2); top.appendChild(button3); top.appendChild(button4); info.appendChild(top); //定义2个轨迹服务按钮 var top = document.createElement("div"); top.className = "info-button"; var titleDiv = document.createElement("div"); titleDiv.className = "title"; titleDiv.innerHTML = '轨迹服务'; top.appendChild(titleDiv); var button21 = document.createElement("span"); button21.className = "button"; button21.innerHTML = "轨迹查询"; button21.onclick = function () { _this2.clear('setPoliceSelectIndex'); if (type == 'police') { marker.setContent('
    ' + marker.w.indexText + "
    "); } _getTerminalByUserId.call(_this2, data, marker, type); }; var button22 = document.createElement("span"); button22.className = "button"; button22.innerHTML = "轨迹上拉"; button22.onclick = function () {}; top.appendChild(button21); top.appendChild(button22); info.appendChild(top); // 定义底部内容 var bottom = document.createElement("div"); bottom.className = "info-bottom"; bottom.style.position = "relative"; bottom.style.top = "19px"; bottom.style.margin = "0 auto"; // var sharp = document.createElement("img"); // sharp.src = "https://webapi.amap.com/images/sharp.png"; var sharp = document.createElement("div"); sharp.className = "sharp"; bottom.appendChild(sharp); info.appendChild(bottom); return infoDiv; } //历史轨迹 // function trajectory(data, marker, terminalData, type) { // const _this = this // const { mapStyle } = this.props // const { name, photoUrl, mobilePhone, companyName, DEPTNAME } = data; // var content = []; // const imgHeader = []; // if (photoUrl) { // imgHeader.push("" + name + ""); // } else { // imgHeader.push( // "" + // name.substring(name.length - 2, name.length) + // "" + name + "" // ); // } // switch (type) { // //警保联动 // case 'police': // content.push( // "
    " + // imgHeader + // "
    所属公司:" + // companyName + // "
    手机号:" + // mobilePhone + // "
    " // ); // break; // //一张图 // default: // content.push( // "
    " + // imgHeader + // "
    所属部门:" + // DEPTNAME + // "
    手机号:" + // mobilePhone + // "
    " // ); // break; // } // content.join("
    "); // var infoDiv = document.createElement("div"); // infoDiv.className = mapStyle; // var info = document.createElement("div"); // info.className = "content-window-card-trajectory"; // infoDiv.appendChild(info); // //可以通过下面的方式修改自定义窗体的宽高 // // info.style.width = "400px"; // // 定义内容 // var middle = document.createElement("div"); // middle.className = "info-middle"; // middle.innerHTML = content; // info.appendChild(middle); // //定义详情 // var detail = document.createElement("div"); // detail.className = "detail-div"; // info.appendChild(detail); // //定义关闭按钮 // var detail = document.createElement("div"); // detail.className = "close-div"; // var a = document.createElement("a"); // a.innerHTML = "x"; // a.onclick = () => { // this.clear('setPoliceSelectIndex') // if (type == 'police') { // marker.setContent( // '
    ' + // marker.w.indexText + // "
    " // ); // } // }; // detail.appendChild(a); // info.appendChild(detail); // //时间选择器 // var timeDiv = document.createElement("div"); // timeDiv.className = 'time-div' // var timeSpan = document.createElement("span"); // timeSpan.className = 'time-title' // timeSpan.innerHTML = '请先选择日期:' // timeDiv.appendChild(timeSpan) // //存放所有的轨迹list // var terminalListDiv = document.createElement("div"); // terminalListDiv.id = 'terminal-list' // var timeButton = document.createElement("div"); // timeButton.innerHTML = '确定' // timeButton.className = 'button' // timeButton.onclick = () => { // var date = document.getElementById("myDate").value; // if (date) { // trackTrsearch({ // key: terminalData.key, // sid: terminalData.serviceId, // tid: terminalData.tid, // day: date // }).then(res => { // var terminal = document.getElementById('terminal-list') // var list = terminal.getElementsByClassName('list') // let length = list.length // if (list.length > 0) { // for (var i = 0; i < length; i++) { // terminal.removeChild(list[0]); // } // } // if (res.data && res.data.counts > 0) { // var terminalList = res.data.tracks // terminalList.map(item => { // var itemDiv = document.createElement("div") // itemDiv.className = 'list' // var itemName = document.createElement("div") // itemName.innerHTML = '轨迹时间:' // itemName.className = 'item-name' // var itemTime = document.createElement("span") // itemTime.innerHTML = timestamp(item.startPoint.locatetime) + '-' + timestamp(item.endPoint.locatetime) // itemTime.className = 'item-time' // var itembuttonList = document.createElement("div"); // itembuttonList.className = 'item-button' // var itembutton1 = document.createElement("div"); // itembutton1.className = "button"; // itembutton1.innerHTML = "查看"; // itembutton1.onclick = () => { // if (item.counts > 0) { // InitTraietory.call(_this, item.points) // } else { // message.warning("该人员暂无相关轨迹信息") // } // }; // var itembutton2 = document.createElement("div"); // itembutton2.className = "button"; // itembutton2.innerHTML = "播放"; // itembutton2.onclick = () => { // }; // itembuttonList.appendChild(itembutton1) // itembuttonList.appendChild(itembutton2) // itemDiv.appendChild(itemName) // itemDiv.appendChild(itemTime) // itemDiv.appendChild(itembuttonList) // terminalListDiv.appendChild(itemDiv); // }) // } else { // var noData = document.createElement("div") // noData.className = 'list' // noData.innerHTML = '暂无数据...' // terminalListDiv.appendChild(noData); // } // }) // } else { // message.warning("请先选择日期") // } // } // var timeInput = document.createElement("input"); // timeInput.id = 'myDate' // timeInput.type = 'date' // // timeInput.value = '2021-07-26' // timeInput.style.marginLeft = '10px' // timeDiv.appendChild(timeInput) // timeDiv.appendChild(timeButton) // info.appendChild(timeDiv) // //定义历史轨迹 // var top = document.createElement("div"); // top.className = "info-button"; // var titleDiv = document.createElement("div"); // titleDiv.className = "title"; // titleDiv.innerHTML = '历史轨迹' // top.appendChild(titleDiv) // top.appendChild(terminalListDiv) // info.appendChild(top); // // 定义底部内容 // var bottom = document.createElement("div"); // bottom.className = "info-bottom"; // bottom.style.position = "relative"; // bottom.style.top = "19px"; // bottom.style.margin = "0 auto"; // var sharp = document.createElement("div"); // sharp.className = "sharp"; // bottom.appendChild(sharp); // info.appendChild(bottom); // return infoDiv; // } function _getTerminalByUserId(_x, _x2, _x3) { return _getTerminalByUserId2.apply(this, arguments); } //显示轨迹查看框 function _getTerminalByUserId2() { _getTerminalByUserId2 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator().m(function _callee(data, marker, type) { var terminalData, that, divs; return _regenerator().w(function (_context) { while (1) switch (_context.n) { case 0: if (!data.TUserID) { _context.n = 2; break; } _context.n = 1; return (0, _api.getTerminalByUserId)({ userid: data.TUserID }).then(function (res) { if (res.data) { return res.data; } }); case 1: terminalData = _context.v; if (terminalData) { that = this; // 删除组件 divs = document.getElementsByClassName('n_trajectory'); if (divs) { Reflect.apply(Array.prototype.forEach, divs, [function (item) { _reactDom.default.unmountComponentAtNode(item); document.body.removeChild(item); }]); } this.props.dispatch({ type: "command/setSwitchOpenStatus", payload: { type: 'all', value: true } }); trajectoryList({ terminalData: terminalData, personData: data, _thisGIS: that, type: type }); // var infoWindow = new AMap.InfoWindow({ // isCustom: true, //使用自定义窗体 // content: trajectory.call(that, data, marker, terminalData, type), // offset: new AMap.Pixel(16, -45), // }); // infoWindow.open(that.state.map, marker.getPosition()); } else { _message2.default.warning("该人员暂无相关轨迹信息"); } _context.n = 3; break; case 2: _message2.default.warning("没有相应的用户信息"); case 3: return _context.a(2); } }, _callee, this); })); return _getTerminalByUserId2.apply(this, arguments); } function trajectoryList(props) { var div = document.createElement('div'); div.setAttribute('class', 'n_trajectory'); document.body.appendChild(div); _reactDom.default.render(/*#__PURE__*/_react.default.createElement(TrajectoryModal, props), div); } var TrajectoryModal = /*#__PURE__*/function (_Component) { function TrajectoryModal(props, context) { var _this3; (0, _classCallCheck2.default)(this, TrajectoryModal); _this3 = _callSuper(this, TrajectoryModal, [props, context]); _this3.state = { //拖动参数 isDown: false, offsetLeft: 0, offsetTop: 0, //轨迹列表 terminalList: [] }; return _this3; } (0, _inherits2.default)(TrajectoryModal, _Component); return (0, _createClass2.default)(TrajectoryModal, [{ key: "render", value: function render() { var _this4 = this; var _this$props = this.props, terminalData = _this$props.terminalData, _thisGIS = _this$props._thisGIS, personData = _this$props.personData, type = _this$props.type; var name = personData.name, photoUrl = personData.photoUrl, mobilePhone = personData.mobilePhone, companyName = personData.companyName, DEPTNAME = personData.DEPTNAME; var terminalList = this.state.terminalList; return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_MouseMovement.default, { isDown: this.state.isDown, offsetLeft: this.state.offsetLeft, offsetTop: this.state.offsetTop }, function (_ref) { var x = _ref.x, y = _ref.y, _ref$cursor = _ref.cursor, cursor = _ref$cursor === void 0 ? 'move' : _ref$cursor; return /*#__PURE__*/_react.default.createElement("div", { className: "video-text", ref: "video-text", style: { cursor: 'move', position: 'absolute', top: y == 0 ? '70px' : y, left: x == 0 ? '16px' : x }, onMouseDown: function onMouseDown(e) { _this4.setState({ isDown: true, offsetLeft: document.getElementsByClassName('video-text')[0].offsetLeft, offsetTop: document.getElementsByClassName('video-text')[0].offsetTop }); }, onMouseUp: function onMouseUp(e) { _this4.setState({ isDown: false }); } }, /*#__PURE__*/_react.default.createElement("div", { className: "content-window-card-trajectory" }, /*#__PURE__*/_react.default.createElement("div", { className: "info-middle" }, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("div", { className: "image" }, photoUrl ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("img", { src: photoUrl }), /*#__PURE__*/_react.default.createElement("span", { className: "img-span" }, name)) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("span", { className: "img-span" }, name.substring(name.length - 2, name.length)), /*#__PURE__*/_react.default.createElement("span", { className: "img-name" }, name))), /*#__PURE__*/_react.default.createElement("div", { className: "content-text" }, type == 'police' ? /*#__PURE__*/_react.default.createElement("div", { className: "text" }, "\u6240\u5C5E\u516C\u53F8\uFF1A", companyName) : /*#__PURE__*/_react.default.createElement("div", { className: "text" }, "\u6240\u5C5E\u90E8\u95E8\uFF1A", DEPTNAME), /*#__PURE__*/_react.default.createElement("div", { className: "text" }, "\u624B\u673A\u53F7\uFF1A", mobilePhone)))), /*#__PURE__*/_react.default.createElement("div", { className: "close-div", onClick: function onClick() { // 删除组件 var divs = document.getElementsByClassName('n_trajectory'); Reflect.apply(Array.prototype.forEach, divs, [function (item) { _reactDom.default.unmountComponentAtNode(item); document.body.removeChild(item); }]); (0, _InitTraietory.removePathSimplifierIns)(); _this4.props._thisGIS.props.dispatch({ type: "command/setSwitchOpenStatus", payload: { type: 'all', value: false } }); } }, /*#__PURE__*/_react.default.createElement("a", null, "x")), /*#__PURE__*/_react.default.createElement("div", { className: "time-div" }, /*#__PURE__*/_react.default.createElement("span", { className: "time-title" }, "\u8BF7\u5148\u9009\u62E9\u65E5\u671F:"), /*#__PURE__*/_react.default.createElement("input", { id: "myDate", type: "date", style: { marginLeft: '10px' } }), /*#__PURE__*/_react.default.createElement("div", { className: "button", onClick: function onClick() { var date = document.getElementById("myDate").value; if (date) { (0, _api.trackTrsearch)({ key: terminalData.key, sid: terminalData.serviceId, tid: terminalData.tid, day: date }).then(function (res) { if (res.data && res.data.counts > 0) { _this4.setState({ terminalList: res.data.tracks }); } }); } else { _message2.default.warning("请先选择日期"); } } }, "\u786E\u5B9A")), /*#__PURE__*/_react.default.createElement("div", { className: "info-button" }, /*#__PURE__*/_react.default.createElement("div", { className: "title" }, "\u5386\u53F2\u8F68\u8FF9"), /*#__PURE__*/_react.default.createElement("div", { id: "terminal-list" }, terminalList.length > 0 ? terminalList.map(function (item, index) { return /*#__PURE__*/_react.default.createElement("div", { className: "list", key: index }, /*#__PURE__*/_react.default.createElement("div", { className: "item-name" }, "\u8F68\u8FF9\u65F6\u95F4:"), /*#__PURE__*/_react.default.createElement("span", { className: "item-time" }, (0, _utils.timestamp)(item.startPoint.locatetime) + '-' + (0, _utils.timestamp)(item.endPoint.locatetime)), /*#__PURE__*/_react.default.createElement("div", { className: "item-button" }, /*#__PURE__*/_react.default.createElement("div", { className: "button", onClick: function onClick() { if (item.counts > 0) { _InitTraietory.default.call(_thisGIS, item.points); } else { _message2.default.warning("该人员暂无相关轨迹信息"); } } }, "\u67E5\u770B"), /*#__PURE__*/_react.default.createElement("div", { className: "button" }, "\u64AD\u653E"))); }) : /*#__PURE__*/_react.default.createElement("div", { className: "list" }, "\u6682\u65E0\u6570\u636E..."))))); })); } }]); }(_react.Component); /***/ }), /***/ "XLwt": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); var vector_namespaceObject = {}; __webpack_require__.d(vector_namespaceObject, "create", function() { return vector_create; }); __webpack_require__.d(vector_namespaceObject, "copy", function() { return vector_copy; }); __webpack_require__.d(vector_namespaceObject, "clone", function() { return clone; }); __webpack_require__.d(vector_namespaceObject, "set", function() { return set; }); __webpack_require__.d(vector_namespaceObject, "add", function() { return vector_add; }); __webpack_require__.d(vector_namespaceObject, "scaleAndAdd", function() { return scaleAndAdd; }); __webpack_require__.d(vector_namespaceObject, "sub", function() { return sub; }); __webpack_require__.d(vector_namespaceObject, "len", function() { return vector_len; }); __webpack_require__.d(vector_namespaceObject, "length", function() { return vector_length; }); __webpack_require__.d(vector_namespaceObject, "lenSquare", function() { return lenSquare; }); __webpack_require__.d(vector_namespaceObject, "lengthSquare", function() { return lengthSquare; }); __webpack_require__.d(vector_namespaceObject, "mul", function() { return vector_mul; }); __webpack_require__.d(vector_namespaceObject, "div", function() { return div; }); __webpack_require__.d(vector_namespaceObject, "dot", function() { return dot; }); __webpack_require__.d(vector_namespaceObject, "scale", function() { return vector_scale; }); __webpack_require__.d(vector_namespaceObject, "normalize", function() { return normalize; }); __webpack_require__.d(vector_namespaceObject, "distance", function() { return vector_distance; }); __webpack_require__.d(vector_namespaceObject, "dist", function() { return vector_dist; }); __webpack_require__.d(vector_namespaceObject, "distanceSquare", function() { return distanceSquare; }); __webpack_require__.d(vector_namespaceObject, "distSquare", function() { return distSquare; }); __webpack_require__.d(vector_namespaceObject, "negate", function() { return negate; }); __webpack_require__.d(vector_namespaceObject, "lerp", function() { return lerp; }); __webpack_require__.d(vector_namespaceObject, "applyTransform", function() { return applyTransform; }); __webpack_require__.d(vector_namespaceObject, "min", function() { return vector_min; }); __webpack_require__.d(vector_namespaceObject, "max", function() { return vector_max; }); var matrix_namespaceObject = {}; __webpack_require__.d(matrix_namespaceObject, "create", function() { return matrix_create; }); __webpack_require__.d(matrix_namespaceObject, "identity", function() { return identity; }); __webpack_require__.d(matrix_namespaceObject, "copy", function() { return matrix_copy; }); __webpack_require__.d(matrix_namespaceObject, "mul", function() { return matrix_mul; }); __webpack_require__.d(matrix_namespaceObject, "translate", function() { return matrix_translate; }); __webpack_require__.d(matrix_namespaceObject, "rotate", function() { return matrix_rotate; }); __webpack_require__.d(matrix_namespaceObject, "scale", function() { return matrix_scale; }); __webpack_require__.d(matrix_namespaceObject, "invert", function() { return matrix_invert; }); __webpack_require__.d(matrix_namespaceObject, "clone", function() { return matrix_clone; }); var zrender_namespaceObject = {}; __webpack_require__.d(zrender_namespaceObject, "init", function() { return init; }); __webpack_require__.d(zrender_namespaceObject, "dispose", function() { return dispose; }); __webpack_require__.d(zrender_namespaceObject, "disposeAll", function() { return disposeAll; }); __webpack_require__.d(zrender_namespaceObject, "getInstance", function() { return getInstance; }); __webpack_require__.d(zrender_namespaceObject, "registerPainter", function() { return registerPainter; }); __webpack_require__.d(zrender_namespaceObject, "getElementSSRData", function() { return getElementSSRData; }); __webpack_require__.d(zrender_namespaceObject, "registerSSRDataGetter", function() { return registerSSRDataGetter; }); __webpack_require__.d(zrender_namespaceObject, "version", function() { return version; }); var graphic_namespaceObject = {}; __webpack_require__.d(graphic_namespaceObject, "updateProps", function() { return updateProps; }); __webpack_require__.d(graphic_namespaceObject, "initProps", function() { return initProps; }); __webpack_require__.d(graphic_namespaceObject, "removeElement", function() { return removeElement; }); __webpack_require__.d(graphic_namespaceObject, "removeElementWithFadeOut", function() { return removeElementWithFadeOut; }); __webpack_require__.d(graphic_namespaceObject, "isElementRemoved", function() { return isElementRemoved; }); __webpack_require__.d(graphic_namespaceObject, "extendShape", function() { return extendShape; }); __webpack_require__.d(graphic_namespaceObject, "extendPath", function() { return extendPath; }); __webpack_require__.d(graphic_namespaceObject, "registerShape", function() { return registerShape; }); __webpack_require__.d(graphic_namespaceObject, "getShapeClass", function() { return getShapeClass; }); __webpack_require__.d(graphic_namespaceObject, "makePath", function() { return makePath; }); __webpack_require__.d(graphic_namespaceObject, "makeImage", function() { return makeImage; }); __webpack_require__.d(graphic_namespaceObject, "mergePath", function() { return graphic_mergePath; }); __webpack_require__.d(graphic_namespaceObject, "resizePath", function() { return resizePath; }); __webpack_require__.d(graphic_namespaceObject, "subPixelOptimizeLine", function() { return graphic_subPixelOptimizeLine; }); __webpack_require__.d(graphic_namespaceObject, "subPixelOptimizeRect", function() { return graphic_subPixelOptimizeRect; }); __webpack_require__.d(graphic_namespaceObject, "subPixelOptimize", function() { return graphic_subPixelOptimize; }); __webpack_require__.d(graphic_namespaceObject, "getTransform", function() { return getTransform; }); __webpack_require__.d(graphic_namespaceObject, "applyTransform", function() { return graphic_applyTransform; }); __webpack_require__.d(graphic_namespaceObject, "transformDirection", function() { return transformDirection; }); __webpack_require__.d(graphic_namespaceObject, "groupTransition", function() { return groupTransition; }); __webpack_require__.d(graphic_namespaceObject, "clipPointsByRect", function() { return clipPointsByRect; }); __webpack_require__.d(graphic_namespaceObject, "clipRectByRect", function() { return clipRectByRect; }); __webpack_require__.d(graphic_namespaceObject, "createIcon", function() { return createIcon; }); __webpack_require__.d(graphic_namespaceObject, "linePolygonIntersect", function() { return linePolygonIntersect; }); __webpack_require__.d(graphic_namespaceObject, "lineLineIntersect", function() { return lineLineIntersect; }); __webpack_require__.d(graphic_namespaceObject, "setTooltipConfig", function() { return setTooltipConfig; }); __webpack_require__.d(graphic_namespaceObject, "traverseElements", function() { return traverseElements; }); __webpack_require__.d(graphic_namespaceObject, "Group", function() { return graphic_Group; }); __webpack_require__.d(graphic_namespaceObject, "Image", function() { return graphic_Image; }); __webpack_require__.d(graphic_namespaceObject, "Text", function() { return Text; }); __webpack_require__.d(graphic_namespaceObject, "Circle", function() { return shape_Circle; }); __webpack_require__.d(graphic_namespaceObject, "Ellipse", function() { return shape_Ellipse; }); __webpack_require__.d(graphic_namespaceObject, "Sector", function() { return shape_Sector; }); __webpack_require__.d(graphic_namespaceObject, "Ring", function() { return shape_Ring; }); __webpack_require__.d(graphic_namespaceObject, "Polygon", function() { return shape_Polygon; }); __webpack_require__.d(graphic_namespaceObject, "Polyline", function() { return shape_Polyline; }); __webpack_require__.d(graphic_namespaceObject, "Rect", function() { return shape_Rect; }); __webpack_require__.d(graphic_namespaceObject, "Line", function() { return shape_Line; }); __webpack_require__.d(graphic_namespaceObject, "BezierCurve", function() { return shape_BezierCurve; }); __webpack_require__.d(graphic_namespaceObject, "Arc", function() { return shape_Arc; }); __webpack_require__.d(graphic_namespaceObject, "IncrementalDisplayable", function() { return graphic_IncrementalDisplayable; }); __webpack_require__.d(graphic_namespaceObject, "CompoundPath", function() { return graphic_CompoundPath; }); __webpack_require__.d(graphic_namespaceObject, "LinearGradient", function() { return graphic_LinearGradient; }); __webpack_require__.d(graphic_namespaceObject, "RadialGradient", function() { return graphic_RadialGradient; }); __webpack_require__.d(graphic_namespaceObject, "BoundingRect", function() { return core_BoundingRect; }); __webpack_require__.d(graphic_namespaceObject, "OrientedBoundingRect", function() { return core_OrientedBoundingRect; }); __webpack_require__.d(graphic_namespaceObject, "Point", function() { return core_Point; }); __webpack_require__.d(graphic_namespaceObject, "Path", function() { return graphic_Path; }); var api_helper_namespaceObject = {}; __webpack_require__.d(api_helper_namespaceObject, "createList", function() { return createList; }); __webpack_require__.d(api_helper_namespaceObject, "getLayoutRect", function() { return getLayoutRect; }); __webpack_require__.d(api_helper_namespaceObject, "createDimensions", function() { return createDimensions; }); __webpack_require__.d(api_helper_namespaceObject, "dataStack", function() { return helper_dataStack; }); __webpack_require__.d(api_helper_namespaceObject, "createSymbol", function() { return symbol_createSymbol; }); __webpack_require__.d(api_helper_namespaceObject, "createScale", function() { return createScale; }); __webpack_require__.d(api_helper_namespaceObject, "mixinAxisModelCommonMethods", function() { return mixinAxisModelCommonMethods; }); __webpack_require__.d(api_helper_namespaceObject, "getECData", function() { return getECData; }); __webpack_require__.d(api_helper_namespaceObject, "enableHoverEmphasis", function() { return enableHoverEmphasis; }); __webpack_require__.d(api_helper_namespaceObject, "createTextStyle", function() { return helper_createTextStyle; }); var api_number_namespaceObject = {}; __webpack_require__.d(api_number_namespaceObject, "linearMap", function() { return linearMap; }); __webpack_require__.d(api_number_namespaceObject, "round", function() { return round; }); __webpack_require__.d(api_number_namespaceObject, "asc", function() { return asc; }); __webpack_require__.d(api_number_namespaceObject, "getPrecision", function() { return getPrecision; }); __webpack_require__.d(api_number_namespaceObject, "getPrecisionSafe", function() { return number_getPrecisionSafe; }); __webpack_require__.d(api_number_namespaceObject, "getPixelPrecision", function() { return getPixelPrecision; }); __webpack_require__.d(api_number_namespaceObject, "getPercentWithPrecision", function() { return getPercentWithPrecision; }); __webpack_require__.d(api_number_namespaceObject, "MAX_SAFE_INTEGER", function() { return MAX_SAFE_INTEGER; }); __webpack_require__.d(api_number_namespaceObject, "remRadian", function() { return remRadian; }); __webpack_require__.d(api_number_namespaceObject, "isRadianAroundZero", function() { return isRadianAroundZero; }); __webpack_require__.d(api_number_namespaceObject, "parseDate", function() { return parseDate; }); __webpack_require__.d(api_number_namespaceObject, "quantity", function() { return quantity; }); __webpack_require__.d(api_number_namespaceObject, "quantityExponent", function() { return quantityExponent; }); __webpack_require__.d(api_number_namespaceObject, "nice", function() { return nice; }); __webpack_require__.d(api_number_namespaceObject, "quantile", function() { return quantile; }); __webpack_require__.d(api_number_namespaceObject, "reformIntervals", function() { return reformIntervals; }); __webpack_require__.d(api_number_namespaceObject, "isNumeric", function() { return isNumeric; }); __webpack_require__.d(api_number_namespaceObject, "numericToNumber", function() { return numericToNumber; }); var api_time_namespaceObject = {}; __webpack_require__.d(api_time_namespaceObject, "parse", function() { return parseDate; }); __webpack_require__.d(api_time_namespaceObject, "format", function() { return format; }); var api_graphic_namespaceObject = {}; __webpack_require__.d(api_graphic_namespaceObject, "extendShape", function() { return extendShape; }); __webpack_require__.d(api_graphic_namespaceObject, "extendPath", function() { return extendPath; }); __webpack_require__.d(api_graphic_namespaceObject, "makePath", function() { return makePath; }); __webpack_require__.d(api_graphic_namespaceObject, "makeImage", function() { return makeImage; }); __webpack_require__.d(api_graphic_namespaceObject, "mergePath", function() { return graphic_mergePath; }); __webpack_require__.d(api_graphic_namespaceObject, "resizePath", function() { return resizePath; }); __webpack_require__.d(api_graphic_namespaceObject, "createIcon", function() { return createIcon; }); __webpack_require__.d(api_graphic_namespaceObject, "updateProps", function() { return updateProps; }); __webpack_require__.d(api_graphic_namespaceObject, "initProps", function() { return initProps; }); __webpack_require__.d(api_graphic_namespaceObject, "getTransform", function() { return getTransform; }); __webpack_require__.d(api_graphic_namespaceObject, "clipPointsByRect", function() { return clipPointsByRect; }); __webpack_require__.d(api_graphic_namespaceObject, "clipRectByRect", function() { return clipRectByRect; }); __webpack_require__.d(api_graphic_namespaceObject, "registerShape", function() { return registerShape; }); __webpack_require__.d(api_graphic_namespaceObject, "getShapeClass", function() { return getShapeClass; }); __webpack_require__.d(api_graphic_namespaceObject, "Group", function() { return graphic_Group; }); __webpack_require__.d(api_graphic_namespaceObject, "Image", function() { return graphic_Image; }); __webpack_require__.d(api_graphic_namespaceObject, "Text", function() { return Text; }); __webpack_require__.d(api_graphic_namespaceObject, "Circle", function() { return shape_Circle; }); __webpack_require__.d(api_graphic_namespaceObject, "Ellipse", function() { return shape_Ellipse; }); __webpack_require__.d(api_graphic_namespaceObject, "Sector", function() { return shape_Sector; }); __webpack_require__.d(api_graphic_namespaceObject, "Ring", function() { return shape_Ring; }); __webpack_require__.d(api_graphic_namespaceObject, "Polygon", function() { return shape_Polygon; }); __webpack_require__.d(api_graphic_namespaceObject, "Polyline", function() { return shape_Polyline; }); __webpack_require__.d(api_graphic_namespaceObject, "Rect", function() { return shape_Rect; }); __webpack_require__.d(api_graphic_namespaceObject, "Line", function() { return shape_Line; }); __webpack_require__.d(api_graphic_namespaceObject, "BezierCurve", function() { return shape_BezierCurve; }); __webpack_require__.d(api_graphic_namespaceObject, "Arc", function() { return shape_Arc; }); __webpack_require__.d(api_graphic_namespaceObject, "IncrementalDisplayable", function() { return graphic_IncrementalDisplayable; }); __webpack_require__.d(api_graphic_namespaceObject, "CompoundPath", function() { return graphic_CompoundPath; }); __webpack_require__.d(api_graphic_namespaceObject, "LinearGradient", function() { return graphic_LinearGradient; }); __webpack_require__.d(api_graphic_namespaceObject, "RadialGradient", function() { return graphic_RadialGradient; }); __webpack_require__.d(api_graphic_namespaceObject, "BoundingRect", function() { return core_BoundingRect; }); var api_format_namespaceObject = {}; __webpack_require__.d(api_format_namespaceObject, "addCommas", function() { return addCommas; }); __webpack_require__.d(api_format_namespaceObject, "toCamelCase", function() { return toCamelCase; }); __webpack_require__.d(api_format_namespaceObject, "normalizeCssArray", function() { return normalizeCssArray; }); __webpack_require__.d(api_format_namespaceObject, "encodeHTML", function() { return encodeHTML; }); __webpack_require__.d(api_format_namespaceObject, "formatTpl", function() { return formatTpl; }); __webpack_require__.d(api_format_namespaceObject, "getTooltipMarker", function() { return getTooltipMarker; }); __webpack_require__.d(api_format_namespaceObject, "formatTime", function() { return formatTime; }); __webpack_require__.d(api_format_namespaceObject, "capitalFirst", function() { return capitalFirst; }); __webpack_require__.d(api_format_namespaceObject, "truncateText", function() { return truncateText; }); __webpack_require__.d(api_format_namespaceObject, "getTextRect", function() { return getTextRect; }); var api_util_namespaceObject = {}; __webpack_require__.d(api_util_namespaceObject, "map", function() { return core_util["map"]; }); __webpack_require__.d(api_util_namespaceObject, "each", function() { return core_util["each"]; }); __webpack_require__.d(api_util_namespaceObject, "indexOf", function() { return core_util["indexOf"]; }); __webpack_require__.d(api_util_namespaceObject, "inherits", function() { return core_util["inherits"]; }); __webpack_require__.d(api_util_namespaceObject, "reduce", function() { return core_util["reduce"]; }); __webpack_require__.d(api_util_namespaceObject, "filter", function() { return core_util["filter"]; }); __webpack_require__.d(api_util_namespaceObject, "bind", function() { return core_util["bind"]; }); __webpack_require__.d(api_util_namespaceObject, "curry", function() { return core_util["curry"]; }); __webpack_require__.d(api_util_namespaceObject, "isArray", function() { return core_util["isArray"]; }); __webpack_require__.d(api_util_namespaceObject, "isString", function() { return core_util["isString"]; }); __webpack_require__.d(api_util_namespaceObject, "isObject", function() { return core_util["isObject"]; }); __webpack_require__.d(api_util_namespaceObject, "isFunction", function() { return core_util["isFunction"]; }); __webpack_require__.d(api_util_namespaceObject, "extend", function() { return core_util["extend"]; }); __webpack_require__.d(api_util_namespaceObject, "defaults", function() { return core_util["defaults"]; }); __webpack_require__.d(api_util_namespaceObject, "clone", function() { return core_util["clone"]; }); __webpack_require__.d(api_util_namespaceObject, "merge", function() { return core_util["merge"]; }); // EXTERNAL MODULE: ./node_modules/tslib/tslib.es6.js var tslib_es6 = __webpack_require__("TToO"); // EXTERNAL MODULE: ./node_modules/zrender/lib/core/env.js var core_env = __webpack_require__("YNzw"); // EXTERNAL MODULE: ./node_modules/zrender/lib/core/util.js var core_util = __webpack_require__("/gxq"); // CONCATENATED MODULE: ./node_modules/zrender/lib/core/vector.js function vector_create(x, y) { if (x == null) { x = 0; } if (y == null) { y = 0; } return [x, y]; } function vector_copy(out, v) { out[0] = v[0]; out[1] = v[1]; return out; } function clone(v) { return [v[0], v[1]]; } function set(out, a, b) { out[0] = a; out[1] = b; return out; } function vector_add(out, v1, v2) { out[0] = v1[0] + v2[0]; out[1] = v1[1] + v2[1]; return out; } function scaleAndAdd(out, v1, v2, a) { out[0] = v1[0] + v2[0] * a; out[1] = v1[1] + v2[1] * a; return out; } function sub(out, v1, v2) { out[0] = v1[0] - v2[0]; out[1] = v1[1] - v2[1]; return out; } function vector_len(v) { return Math.sqrt(lenSquare(v)); } var vector_length = vector_len; function lenSquare(v) { return v[0] * v[0] + v[1] * v[1]; } var lengthSquare = lenSquare; function vector_mul(out, v1, v2) { out[0] = v1[0] * v2[0]; out[1] = v1[1] * v2[1]; return out; } function div(out, v1, v2) { out[0] = v1[0] / v2[0]; out[1] = v1[1] / v2[1]; return out; } function dot(v1, v2) { return v1[0] * v2[0] + v1[1] * v2[1]; } function vector_scale(out, v, s) { out[0] = v[0] * s; out[1] = v[1] * s; return out; } function normalize(out, v) { var d = vector_len(v); if (d === 0) { out[0] = 0; out[1] = 0; } else { out[0] = v[0] / d; out[1] = v[1] / d; } return out; } function vector_distance(v1, v2) { return Math.sqrt((v1[0] - v2[0]) * (v1[0] - v2[0]) + (v1[1] - v2[1]) * (v1[1] - v2[1])); } var vector_dist = vector_distance; function distanceSquare(v1, v2) { return (v1[0] - v2[0]) * (v1[0] - v2[0]) + (v1[1] - v2[1]) * (v1[1] - v2[1]); } var distSquare = distanceSquare; function negate(out, v) { out[0] = -v[0]; out[1] = -v[1]; return out; } function lerp(out, v1, v2, t) { out[0] = v1[0] + t * (v2[0] - v1[0]); out[1] = v1[1] + t * (v2[1] - v1[1]); return out; } function applyTransform(out, v, m) { var x = v[0]; var y = v[1]; out[0] = m[0] * x + m[2] * y + m[4]; out[1] = m[1] * x + m[3] * y + m[5]; return out; } function vector_min(out, v1, v2) { out[0] = Math.min(v1[0], v2[0]); out[1] = Math.min(v1[1], v2[1]); return out; } function vector_max(out, v1, v2) { out[0] = Math.max(v1[0], v2[0]); out[1] = Math.max(v1[1], v2[1]); return out; } // CONCATENATED MODULE: ./node_modules/zrender/lib/mixin/Draggable.js var Param = (function () { function Param(target, e) { this.target = target; this.topTarget = e && e.topTarget; } return Param; }()); var Draggable = (function () { function Draggable(handler) { this.handler = handler; handler.on('mousedown', this._dragStart, this); handler.on('mousemove', this._drag, this); handler.on('mouseup', this._dragEnd, this); } Draggable.prototype._dragStart = function (e) { var draggingTarget = e.target; while (draggingTarget && !draggingTarget.draggable) { draggingTarget = draggingTarget.parent || draggingTarget.__hostTarget; } if (draggingTarget) { this._draggingTarget = draggingTarget; draggingTarget.dragging = true; this._x = e.offsetX; this._y = e.offsetY; this.handler.dispatchToElement(new Param(draggingTarget, e), 'dragstart', e.event); } }; Draggable.prototype._drag = function (e) { var draggingTarget = this._draggingTarget; if (draggingTarget) { var x = e.offsetX; var y = e.offsetY; var dx = x - this._x; var dy = y - this._y; this._x = x; this._y = y; draggingTarget.drift(dx, dy, e); this.handler.dispatchToElement(new Param(draggingTarget, e), 'drag', e.event); var dropTarget = this.handler.findHover(x, y, draggingTarget).target; var lastDropTarget = this._dropTarget; this._dropTarget = dropTarget; if (draggingTarget !== dropTarget) { if (lastDropTarget && dropTarget !== lastDropTarget) { this.handler.dispatchToElement(new Param(lastDropTarget, e), 'dragleave', e.event); } if (dropTarget && dropTarget !== lastDropTarget) { this.handler.dispatchToElement(new Param(dropTarget, e), 'dragenter', e.event); } } } }; Draggable.prototype._dragEnd = function (e) { var draggingTarget = this._draggingTarget; if (draggingTarget) { draggingTarget.dragging = false; } this.handler.dispatchToElement(new Param(draggingTarget, e), 'dragend', e.event); if (this._dropTarget) { this.handler.dispatchToElement(new Param(this._dropTarget, e), 'drop', e.event); } this._draggingTarget = null; this._dropTarget = null; }; return Draggable; }()); /* harmony default export */ var mixin_Draggable = (Draggable); // CONCATENATED MODULE: ./node_modules/zrender/lib/core/Eventful.js var Eventful = (function () { function Eventful(eventProcessors) { if (eventProcessors) { this._$eventProcessor = eventProcessors; } } Eventful.prototype.on = function (event, query, handler, context) { if (!this._$handlers) { this._$handlers = {}; } var _h = this._$handlers; if (typeof query === 'function') { context = handler; handler = query; query = null; } if (!handler || !event) { return this; } var eventProcessor = this._$eventProcessor; if (query != null && eventProcessor && eventProcessor.normalizeQuery) { query = eventProcessor.normalizeQuery(query); } if (!_h[event]) { _h[event] = []; } for (var i = 0; i < _h[event].length; i++) { if (_h[event][i].h === handler) { return this; } } var wrap = { h: handler, query: query, ctx: (context || this), callAtLast: handler.zrEventfulCallAtLast }; var lastIndex = _h[event].length - 1; var lastWrap = _h[event][lastIndex]; (lastWrap && lastWrap.callAtLast) ? _h[event].splice(lastIndex, 0, wrap) : _h[event].push(wrap); return this; }; Eventful.prototype.isSilent = function (eventName) { var _h = this._$handlers; return !_h || !_h[eventName] || !_h[eventName].length; }; Eventful.prototype.off = function (eventType, handler) { var _h = this._$handlers; if (!_h) { return this; } if (!eventType) { this._$handlers = {}; return this; } if (handler) { if (_h[eventType]) { var newList = []; for (var i = 0, l = _h[eventType].length; i < l; i++) { if (_h[eventType][i].h !== handler) { newList.push(_h[eventType][i]); } } _h[eventType] = newList; } if (_h[eventType] && _h[eventType].length === 0) { delete _h[eventType]; } } else { delete _h[eventType]; } return this; }; Eventful.prototype.trigger = function (eventType) { var args = []; for (var _i = 1; _i < arguments.length; _i++) { args[_i - 1] = arguments[_i]; } if (!this._$handlers) { return this; } var _h = this._$handlers[eventType]; var eventProcessor = this._$eventProcessor; if (_h) { var argLen = args.length; var len = _h.length; for (var i = 0; i < len; i++) { var hItem = _h[i]; if (eventProcessor && eventProcessor.filter && hItem.query != null && !eventProcessor.filter(eventType, hItem.query)) { continue; } switch (argLen) { case 0: hItem.h.call(hItem.ctx); break; case 1: hItem.h.call(hItem.ctx, args[0]); break; case 2: hItem.h.call(hItem.ctx, args[0], args[1]); break; default: hItem.h.apply(hItem.ctx, args); break; } } } eventProcessor && eventProcessor.afterTrigger && eventProcessor.afterTrigger(eventType); return this; }; Eventful.prototype.triggerWithContext = function (type) { var args = []; for (var _i = 1; _i < arguments.length; _i++) { args[_i - 1] = arguments[_i]; } if (!this._$handlers) { return this; } var _h = this._$handlers[type]; var eventProcessor = this._$eventProcessor; if (_h) { var argLen = args.length; var ctx = args[argLen - 1]; var len = _h.length; for (var i = 0; i < len; i++) { var hItem = _h[i]; if (eventProcessor && eventProcessor.filter && hItem.query != null && !eventProcessor.filter(type, hItem.query)) { continue; } switch (argLen) { case 0: hItem.h.call(ctx); break; case 1: hItem.h.call(ctx, args[0]); break; case 2: hItem.h.call(ctx, args[0], args[1]); break; default: hItem.h.apply(ctx, args.slice(1, argLen - 1)); break; } } } eventProcessor && eventProcessor.afterTrigger && eventProcessor.afterTrigger(type); return this; }; return Eventful; }()); /* harmony default export */ var core_Eventful = (Eventful); // CONCATENATED MODULE: ./node_modules/zrender/lib/core/fourPointsTransform.js var LN2 = Math.log(2); function determinant(rows, rank, rowStart, rowMask, colMask, detCache) { var cacheKey = rowMask + '-' + colMask; var fullRank = rows.length; if (detCache.hasOwnProperty(cacheKey)) { return detCache[cacheKey]; } if (rank === 1) { var colStart = Math.round(Math.log(((1 << fullRank) - 1) & ~colMask) / LN2); return rows[rowStart][colStart]; } var subRowMask = rowMask | (1 << rowStart); var subRowStart = rowStart + 1; while (rowMask & (1 << subRowStart)) { subRowStart++; } var sum = 0; for (var j = 0, colLocalIdx = 0; j < fullRank; j++) { var colTag = 1 << j; if (!(colTag & colMask)) { sum += (colLocalIdx % 2 ? -1 : 1) * rows[rowStart][j] * determinant(rows, rank - 1, subRowStart, subRowMask, colMask | colTag, detCache); colLocalIdx++; } } detCache[cacheKey] = sum; return sum; } function buildTransformer(src, dest) { var mA = [ [src[0], src[1], 1, 0, 0, 0, -dest[0] * src[0], -dest[0] * src[1]], [0, 0, 0, src[0], src[1], 1, -dest[1] * src[0], -dest[1] * src[1]], [src[2], src[3], 1, 0, 0, 0, -dest[2] * src[2], -dest[2] * src[3]], [0, 0, 0, src[2], src[3], 1, -dest[3] * src[2], -dest[3] * src[3]], [src[4], src[5], 1, 0, 0, 0, -dest[4] * src[4], -dest[4] * src[5]], [0, 0, 0, src[4], src[5], 1, -dest[5] * src[4], -dest[5] * src[5]], [src[6], src[7], 1, 0, 0, 0, -dest[6] * src[6], -dest[6] * src[7]], [0, 0, 0, src[6], src[7], 1, -dest[7] * src[6], -dest[7] * src[7]] ]; var detCache = {}; var det = determinant(mA, 8, 0, 0, 0, detCache); if (det === 0) { return; } var vh = []; for (var i = 0; i < 8; i++) { for (var j = 0; j < 8; j++) { vh[j] == null && (vh[j] = 0); vh[j] += ((i + j) % 2 ? -1 : 1) * determinant(mA, 7, i === 0 ? 1 : 0, 1 << i, 1 << j, detCache) / det * dest[i]; } } return function (out, srcPointX, srcPointY) { var pk = srcPointX * vh[6] + srcPointY * vh[7] + 1; out[0] = (srcPointX * vh[0] + srcPointY * vh[1] + vh[2]) / pk; out[1] = (srcPointX * vh[3] + srcPointY * vh[4] + vh[5]) / pk; }; } // CONCATENATED MODULE: ./node_modules/zrender/lib/core/dom.js var EVENT_SAVED_PROP = '___zrEVENTSAVED'; var _calcOut = []; function transformLocalCoord(out, elFrom, elTarget, inX, inY) { return transformCoordWithViewport(_calcOut, elFrom, inX, inY, true) && transformCoordWithViewport(out, elTarget, _calcOut[0], _calcOut[1]); } function transformCoordWithViewport(out, el, inX, inY, inverse) { if (el.getBoundingClientRect && core_env["a" /* default */].domSupported && !isCanvasEl(el)) { var saved = el[EVENT_SAVED_PROP] || (el[EVENT_SAVED_PROP] = {}); var markers = prepareCoordMarkers(el, saved); var transformer = preparePointerTransformer(markers, saved, inverse); if (transformer) { transformer(out, inX, inY); return true; } } return false; } function prepareCoordMarkers(el, saved) { var markers = saved.markers; if (markers) { return markers; } markers = saved.markers = []; var propLR = ['left', 'right']; var propTB = ['top', 'bottom']; for (var i = 0; i < 4; i++) { var marker = document.createElement('div'); var stl = marker.style; var idxLR = i % 2; var idxTB = (i >> 1) % 2; stl.cssText = [ 'position: absolute', 'visibility: hidden', 'padding: 0', 'margin: 0', 'border-width: 0', 'user-select: none', 'width:0', 'height:0', propLR[idxLR] + ':0', propTB[idxTB] + ':0', propLR[1 - idxLR] + ':auto', propTB[1 - idxTB] + ':auto', '' ].join('!important;'); el.appendChild(marker); markers.push(marker); } return markers; } function preparePointerTransformer(markers, saved, inverse) { var transformerName = inverse ? 'invTrans' : 'trans'; var transformer = saved[transformerName]; var oldSrcCoords = saved.srcCoords; var srcCoords = []; var destCoords = []; var oldCoordTheSame = true; for (var i = 0; i < 4; i++) { var rect = markers[i].getBoundingClientRect(); var ii = 2 * i; var x = rect.left; var y = rect.top; srcCoords.push(x, y); oldCoordTheSame = oldCoordTheSame && oldSrcCoords && x === oldSrcCoords[ii] && y === oldSrcCoords[ii + 1]; destCoords.push(markers[i].offsetLeft, markers[i].offsetTop); } return (oldCoordTheSame && transformer) ? transformer : (saved.srcCoords = srcCoords, saved[transformerName] = inverse ? buildTransformer(destCoords, srcCoords) : buildTransformer(srcCoords, destCoords)); } function isCanvasEl(el) { return el.nodeName.toUpperCase() === 'CANVAS'; } var replaceReg = /([&<>"'])/g; var replaceMap = { '&': '&', '<': '<', '>': '>', '"': '"', '\'': ''' }; function encodeHTML(source) { return source == null ? '' : (source + '').replace(replaceReg, function (str, c) { return replaceMap[c]; }); } // CONCATENATED MODULE: ./node_modules/zrender/lib/core/event.js var MOUSE_EVENT_REG = /^(?:mouse|pointer|contextmenu|drag|drop)|click/; var event__calcOut = []; var firefoxNotSupportOffsetXY = core_env["a" /* default */].browser.firefox && +core_env["a" /* default */].browser.version.split('.')[0] < 39; function clientToLocal(el, e, out, calculate) { out = out || {}; if (calculate) { calculateZrXY(el, e, out); } else if (firefoxNotSupportOffsetXY && e.layerX != null && e.layerX !== e.offsetX) { out.zrX = e.layerX; out.zrY = e.layerY; } else if (e.offsetX != null) { out.zrX = e.offsetX; out.zrY = e.offsetY; } else { calculateZrXY(el, e, out); } return out; } function calculateZrXY(el, e, out) { if (core_env["a" /* default */].domSupported && el.getBoundingClientRect) { var ex = e.clientX; var ey = e.clientY; if (isCanvasEl(el)) { var box = el.getBoundingClientRect(); out.zrX = ex - box.left; out.zrY = ey - box.top; return; } else { if (transformCoordWithViewport(event__calcOut, el, ex, ey)) { out.zrX = event__calcOut[0]; out.zrY = event__calcOut[1]; return; } } } out.zrX = out.zrY = 0; } function getNativeEvent(e) { return e || window.event; } function normalizeEvent(el, e, calculate) { e = getNativeEvent(e); if (e.zrX != null) { return e; } var eventType = e.type; var isTouch = eventType && eventType.indexOf('touch') >= 0; if (!isTouch) { clientToLocal(el, e, e, calculate); var wheelDelta = getWheelDeltaMayPolyfill(e); e.zrDelta = wheelDelta ? wheelDelta / 120 : -(e.detail || 0) / 3; } else { var touch = eventType !== 'touchend' ? e.targetTouches[0] : e.changedTouches[0]; touch && clientToLocal(el, touch, e, calculate); } var button = e.button; if (e.which == null && button !== undefined && MOUSE_EVENT_REG.test(e.type)) { e.which = (button & 1 ? 1 : (button & 2 ? 3 : (button & 4 ? 2 : 0))); } return e; } function getWheelDeltaMayPolyfill(e) { var rawWheelDelta = e.wheelDelta; if (rawWheelDelta) { return rawWheelDelta; } var deltaX = e.deltaX; var deltaY = e.deltaY; if (deltaX == null || deltaY == null) { return rawWheelDelta; } var delta = deltaY !== 0 ? Math.abs(deltaY) : Math.abs(deltaX); var sign = deltaY > 0 ? -1 : deltaY < 0 ? 1 : deltaX > 0 ? -1 : 1; return 3 * delta * sign; } function addEventListener(el, name, handler, opt) { el.addEventListener(name, handler, opt); } function removeEventListener(el, name, handler, opt) { el.removeEventListener(name, handler, opt); } var stop = function (e) { e.preventDefault(); e.stopPropagation(); e.cancelBubble = true; }; function isMiddleOrRightButtonOnMouseUpDown(e) { return e.which === 2 || e.which === 3; } // CONCATENATED MODULE: ./node_modules/zrender/lib/core/GestureMgr.js var GestureMgr_GestureMgr = (function () { function GestureMgr() { this._track = []; } GestureMgr.prototype.recognize = function (event, target, root) { this._doTrack(event, target, root); return this._recognize(event); }; GestureMgr.prototype.clear = function () { this._track.length = 0; return this; }; GestureMgr.prototype._doTrack = function (event, target, root) { var touches = event.touches; if (!touches) { return; } var trackItem = { points: [], touches: [], target: target, event: event }; for (var i = 0, len = touches.length; i < len; i++) { var touch = touches[i]; var pos = clientToLocal(root, touch, {}); trackItem.points.push([pos.zrX, pos.zrY]); trackItem.touches.push(touch); } this._track.push(trackItem); }; GestureMgr.prototype._recognize = function (event) { for (var eventName in recognizers) { if (recognizers.hasOwnProperty(eventName)) { var gestureInfo = recognizers[eventName](this._track, event); if (gestureInfo) { return gestureInfo; } } } }; return GestureMgr; }()); function GestureMgr_dist(pointPair) { var dx = pointPair[1][0] - pointPair[0][0]; var dy = pointPair[1][1] - pointPair[0][1]; return Math.sqrt(dx * dx + dy * dy); } function GestureMgr_center(pointPair) { return [ (pointPair[0][0] + pointPair[1][0]) / 2, (pointPair[0][1] + pointPair[1][1]) / 2 ]; } var recognizers = { pinch: function (tracks, event) { var trackLen = tracks.length; if (!trackLen) { return; } var pinchEnd = (tracks[trackLen - 1] || {}).points; var pinchPre = (tracks[trackLen - 2] || {}).points || pinchEnd; if (pinchPre && pinchPre.length > 1 && pinchEnd && pinchEnd.length > 1) { var pinchScale = GestureMgr_dist(pinchEnd) / GestureMgr_dist(pinchPre); !isFinite(pinchScale) && (pinchScale = 1); event.pinchScale = pinchScale; var pinchCenter = GestureMgr_center(pinchEnd); event.pinchX = pinchCenter[0]; event.pinchY = pinchCenter[1]; return { type: 'pinch', target: tracks[0].target, event: event }; } } }; // CONCATENATED MODULE: ./node_modules/zrender/lib/core/matrix.js function matrix_create() { return [1, 0, 0, 1, 0, 0]; } function identity(out) { out[0] = 1; out[1] = 0; out[2] = 0; out[3] = 1; out[4] = 0; out[5] = 0; return out; } function matrix_copy(out, m) { out[0] = m[0]; out[1] = m[1]; out[2] = m[2]; out[3] = m[3]; out[4] = m[4]; out[5] = m[5]; return out; } function matrix_mul(out, m1, m2) { var out0 = m1[0] * m2[0] + m1[2] * m2[1]; var out1 = m1[1] * m2[0] + m1[3] * m2[1]; var out2 = m1[0] * m2[2] + m1[2] * m2[3]; var out3 = m1[1] * m2[2] + m1[3] * m2[3]; var out4 = m1[0] * m2[4] + m1[2] * m2[5] + m1[4]; var out5 = m1[1] * m2[4] + m1[3] * m2[5] + m1[5]; out[0] = out0; out[1] = out1; out[2] = out2; out[3] = out3; out[4] = out4; out[5] = out5; return out; } function matrix_translate(out, a, v) { out[0] = a[0]; out[1] = a[1]; out[2] = a[2]; out[3] = a[3]; out[4] = a[4] + v[0]; out[5] = a[5] + v[1]; return out; } function matrix_rotate(out, a, rad, pivot) { if (pivot === void 0) { pivot = [0, 0]; } var aa = a[0]; var ac = a[2]; var atx = a[4]; var ab = a[1]; var ad = a[3]; var aty = a[5]; var st = Math.sin(rad); var ct = Math.cos(rad); out[0] = aa * ct + ab * st; out[1] = -aa * st + ab * ct; out[2] = ac * ct + ad * st; out[3] = -ac * st + ct * ad; out[4] = ct * (atx - pivot[0]) + st * (aty - pivot[1]) + pivot[0]; out[5] = ct * (aty - pivot[1]) - st * (atx - pivot[0]) + pivot[1]; return out; } function matrix_scale(out, a, v) { var vx = v[0]; var vy = v[1]; out[0] = a[0] * vx; out[1] = a[1] * vy; out[2] = a[2] * vx; out[3] = a[3] * vy; out[4] = a[4] * vx; out[5] = a[5] * vy; return out; } function matrix_invert(out, a) { var aa = a[0]; var ac = a[2]; var atx = a[4]; var ab = a[1]; var ad = a[3]; var aty = a[5]; var det = aa * ad - ab * ac; if (!det) { return null; } det = 1.0 / det; out[0] = ad * det; out[1] = -ab * det; out[2] = -ac * det; out[3] = aa * det; out[4] = (ac * aty - ad * atx) * det; out[5] = (ab * atx - aa * aty) * det; return out; } function matrix_clone(a) { var b = matrix_create(); matrix_copy(b, a); return b; } // CONCATENATED MODULE: ./node_modules/zrender/lib/core/Point.js var Point = (function () { function Point(x, y) { this.x = x || 0; this.y = y || 0; } Point.prototype.copy = function (other) { this.x = other.x; this.y = other.y; return this; }; Point.prototype.clone = function () { return new Point(this.x, this.y); }; Point.prototype.set = function (x, y) { this.x = x; this.y = y; return this; }; Point.prototype.equal = function (other) { return other.x === this.x && other.y === this.y; }; Point.prototype.add = function (other) { this.x += other.x; this.y += other.y; return this; }; Point.prototype.scale = function (scalar) { this.x *= scalar; this.y *= scalar; }; Point.prototype.scaleAndAdd = function (other, scalar) { this.x += other.x * scalar; this.y += other.y * scalar; }; Point.prototype.sub = function (other) { this.x -= other.x; this.y -= other.y; return this; }; Point.prototype.dot = function (other) { return this.x * other.x + this.y * other.y; }; Point.prototype.len = function () { return Math.sqrt(this.x * this.x + this.y * this.y); }; Point.prototype.lenSquare = function () { return this.x * this.x + this.y * this.y; }; Point.prototype.normalize = function () { var len = this.len(); this.x /= len; this.y /= len; return this; }; Point.prototype.distance = function (other) { var dx = this.x - other.x; var dy = this.y - other.y; return Math.sqrt(dx * dx + dy * dy); }; Point.prototype.distanceSquare = function (other) { var dx = this.x - other.x; var dy = this.y - other.y; return dx * dx + dy * dy; }; Point.prototype.negate = function () { this.x = -this.x; this.y = -this.y; return this; }; Point.prototype.transform = function (m) { if (!m) { return; } var x = this.x; var y = this.y; this.x = m[0] * x + m[2] * y + m[4]; this.y = m[1] * x + m[3] * y + m[5]; return this; }; Point.prototype.toArray = function (out) { out[0] = this.x; out[1] = this.y; return out; }; Point.prototype.fromArray = function (input) { this.x = input[0]; this.y = input[1]; }; Point.set = function (p, x, y) { p.x = x; p.y = y; }; Point.copy = function (p, p2) { p.x = p2.x; p.y = p2.y; }; Point.len = function (p) { return Math.sqrt(p.x * p.x + p.y * p.y); }; Point.lenSquare = function (p) { return p.x * p.x + p.y * p.y; }; Point.dot = function (p0, p1) { return p0.x * p1.x + p0.y * p1.y; }; Point.add = function (out, p0, p1) { out.x = p0.x + p1.x; out.y = p0.y + p1.y; }; Point.sub = function (out, p0, p1) { out.x = p0.x - p1.x; out.y = p0.y - p1.y; }; Point.scale = function (out, p0, scalar) { out.x = p0.x * scalar; out.y = p0.y * scalar; }; Point.scaleAndAdd = function (out, p0, p1, scalar) { out.x = p0.x + p1.x * scalar; out.y = p0.y + p1.y * scalar; }; Point.lerp = function (out, p0, p1, t) { var onet = 1 - t; out.x = onet * p0.x + t * p1.x; out.y = onet * p0.y + t * p1.y; }; return Point; }()); /* harmony default export */ var core_Point = (Point); // CONCATENATED MODULE: ./node_modules/zrender/lib/core/BoundingRect.js var BoundingRect_mathMin = Math.min; var BoundingRect_mathMax = Math.max; var BoundingRect_lt = new core_Point(); var BoundingRect_rb = new core_Point(); var lb = new core_Point(); var rt = new core_Point(); var BoundingRect_minTv = new core_Point(); var BoundingRect_maxTv = new core_Point(); var BoundingRect_BoundingRect = (function () { function BoundingRect(x, y, width, height) { if (width < 0) { x = x + width; width = -width; } if (height < 0) { y = y + height; height = -height; } this.x = x; this.y = y; this.width = width; this.height = height; } BoundingRect.prototype.union = function (other) { var x = BoundingRect_mathMin(other.x, this.x); var y = BoundingRect_mathMin(other.y, this.y); if (isFinite(this.x) && isFinite(this.width)) { this.width = BoundingRect_mathMax(other.x + other.width, this.x + this.width) - x; } else { this.width = other.width; } if (isFinite(this.y) && isFinite(this.height)) { this.height = BoundingRect_mathMax(other.y + other.height, this.y + this.height) - y; } else { this.height = other.height; } this.x = x; this.y = y; }; BoundingRect.prototype.applyTransform = function (m) { BoundingRect.applyTransform(this, this, m); }; BoundingRect.prototype.calculateTransform = function (b) { var a = this; var sx = b.width / a.width; var sy = b.height / a.height; var m = matrix_create(); matrix_translate(m, m, [-a.x, -a.y]); matrix_scale(m, m, [sx, sy]); matrix_translate(m, m, [b.x, b.y]); return m; }; BoundingRect.prototype.intersect = function (b, mtv) { if (!b) { return false; } if (!(b instanceof BoundingRect)) { b = BoundingRect.create(b); } var a = this; var ax0 = a.x; var ax1 = a.x + a.width; var ay0 = a.y; var ay1 = a.y + a.height; var bx0 = b.x; var bx1 = b.x + b.width; var by0 = b.y; var by1 = b.y + b.height; var overlap = !(ax1 < bx0 || bx1 < ax0 || ay1 < by0 || by1 < ay0); if (mtv) { var dMin = Infinity; var dMax = 0; var d0 = Math.abs(ax1 - bx0); var d1 = Math.abs(bx1 - ax0); var d2 = Math.abs(ay1 - by0); var d3 = Math.abs(by1 - ay0); var dx = Math.min(d0, d1); var dy = Math.min(d2, d3); if (ax1 < bx0 || bx1 < ax0) { if (dx > dMax) { dMax = dx; if (d0 < d1) { core_Point.set(BoundingRect_maxTv, -d0, 0); } else { core_Point.set(BoundingRect_maxTv, d1, 0); } } } else { if (dx < dMin) { dMin = dx; if (d0 < d1) { core_Point.set(BoundingRect_minTv, d0, 0); } else { core_Point.set(BoundingRect_minTv, -d1, 0); } } } if (ay1 < by0 || by1 < ay0) { if (dy > dMax) { dMax = dy; if (d2 < d3) { core_Point.set(BoundingRect_maxTv, 0, -d2); } else { core_Point.set(BoundingRect_maxTv, 0, d3); } } } else { if (dx < dMin) { dMin = dx; if (d2 < d3) { core_Point.set(BoundingRect_minTv, 0, d2); } else { core_Point.set(BoundingRect_minTv, 0, -d3); } } } } if (mtv) { core_Point.copy(mtv, overlap ? BoundingRect_minTv : BoundingRect_maxTv); } return overlap; }; BoundingRect.prototype.contain = function (x, y) { var rect = this; return x >= rect.x && x <= (rect.x + rect.width) && y >= rect.y && y <= (rect.y + rect.height); }; BoundingRect.prototype.clone = function () { return new BoundingRect(this.x, this.y, this.width, this.height); }; BoundingRect.prototype.copy = function (other) { BoundingRect.copy(this, other); }; BoundingRect.prototype.plain = function () { return { x: this.x, y: this.y, width: this.width, height: this.height }; }; BoundingRect.prototype.isFinite = function () { return isFinite(this.x) && isFinite(this.y) && isFinite(this.width) && isFinite(this.height); }; BoundingRect.prototype.isZero = function () { return this.width === 0 || this.height === 0; }; BoundingRect.create = function (rect) { return new BoundingRect(rect.x, rect.y, rect.width, rect.height); }; BoundingRect.copy = function (target, source) { target.x = source.x; target.y = source.y; target.width = source.width; target.height = source.height; }; BoundingRect.applyTransform = function (target, source, m) { if (!m) { if (target !== source) { BoundingRect.copy(target, source); } return; } if (m[1] < 1e-5 && m[1] > -1e-5 && m[2] < 1e-5 && m[2] > -1e-5) { var sx = m[0]; var sy = m[3]; var tx = m[4]; var ty = m[5]; target.x = source.x * sx + tx; target.y = source.y * sy + ty; target.width = source.width * sx; target.height = source.height * sy; if (target.width < 0) { target.x += target.width; target.width = -target.width; } if (target.height < 0) { target.y += target.height; target.height = -target.height; } return; } BoundingRect_lt.x = lb.x = source.x; BoundingRect_lt.y = rt.y = source.y; BoundingRect_rb.x = rt.x = source.x + source.width; BoundingRect_rb.y = lb.y = source.y + source.height; BoundingRect_lt.transform(m); rt.transform(m); BoundingRect_rb.transform(m); lb.transform(m); target.x = BoundingRect_mathMin(BoundingRect_lt.x, BoundingRect_rb.x, lb.x, rt.x); target.y = BoundingRect_mathMin(BoundingRect_lt.y, BoundingRect_rb.y, lb.y, rt.y); var maxX = BoundingRect_mathMax(BoundingRect_lt.x, BoundingRect_rb.x, lb.x, rt.x); var maxY = BoundingRect_mathMax(BoundingRect_lt.y, BoundingRect_rb.y, lb.y, rt.y); target.width = maxX - target.x; target.height = maxY - target.y; }; return BoundingRect; }()); /* harmony default export */ var core_BoundingRect = (BoundingRect_BoundingRect); // CONCATENATED MODULE: ./node_modules/zrender/lib/Handler.js var SILENT = 'silent'; function makeEventPacket(eveType, targetInfo, event) { return { type: eveType, event: event, target: targetInfo.target, 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() { stop(this.event); } var Handler_EmptyProxy = (function (_super) { Object(tslib_es6["b" /* __extends */])(EmptyProxy, _super); function EmptyProxy() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.handler = null; return _this; } EmptyProxy.prototype.dispose = function () { }; EmptyProxy.prototype.setCursor = function () { }; return EmptyProxy; }(core_Eventful)); var HoveredResult = (function () { function HoveredResult(x, y) { this.x = x; this.y = y; } return HoveredResult; }()); var handlerNames = [ 'click', 'dblclick', 'mousewheel', 'mouseout', 'mouseup', 'mousedown', 'mousemove', 'contextmenu' ]; var Handler_tmpRect = new core_BoundingRect(0, 0, 0, 0); var Handler_Handler = (function (_super) { Object(tslib_es6["b" /* __extends */])(Handler, _super); function Handler(storage, painter, proxy, painterRoot, pointerSize) { var _this = _super.call(this) || this; _this._hovered = new HoveredResult(0, 0); _this.storage = storage; _this.painter = painter; _this.painterRoot = painterRoot; _this._pointerSize = pointerSize; proxy = proxy || new Handler_EmptyProxy(); _this.proxy = null; _this.setHandlerProxy(proxy); _this._draggingMgr = new mixin_Draggable(_this); return _this; } Handler.prototype.setHandlerProxy = function (proxy) { if (this.proxy) { this.proxy.dispose(); } if (proxy) { core_util["each"](handlerNames, function (name) { proxy.on && proxy.on(name, this[name], this); }, this); proxy.handler = this; } this.proxy = proxy; }; Handler.prototype.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 && !lastHoveredTarget.__zr) { lastHovered = this.findHover(lastHovered.x, lastHovered.y); lastHoveredTarget = lastHovered.target; } var hovered = this._hovered = isOutside ? new HoveredResult(x, y) : this.findHover(x, y); var hoveredTarget = hovered.target; var proxy = this.proxy; proxy.setCursor && proxy.setCursor(hoveredTarget ? hoveredTarget.cursor : 'default'); if (lastHoveredTarget && hoveredTarget !== lastHoveredTarget) { this.dispatchToElement(lastHovered, 'mouseout', event); } this.dispatchToElement(hovered, 'mousemove', event); if (hoveredTarget && hoveredTarget !== lastHoveredTarget) { this.dispatchToElement(hovered, 'mouseover', event); } }; Handler.prototype.mouseout = function (event) { var eventControl = event.zrEventControl; if (eventControl !== 'only_globalout') { this.dispatchToElement(this._hovered, 'mouseout', event); } if (eventControl !== 'no_globalout') { this.trigger('globalout', { type: 'globalout', event: event }); } }; Handler.prototype.resize = function () { this._hovered = new HoveredResult(0, 0); }; Handler.prototype.dispatch = function (eventName, eventArgs) { var handler = this[eventName]; handler && handler.call(this, eventArgs); }; Handler.prototype.dispose = function () { this.proxy.dispose(); this.storage = null; this.proxy = null; this.painter = null; }; Handler.prototype.setCursorStyle = function (cursorStyle) { var proxy = this.proxy; proxy.setCursor && proxy.setCursor(cursorStyle); }; Handler.prototype.dispatchToElement = function (targetInfo, eventName, event) { targetInfo = targetInfo || {}; var el = targetInfo.target; if (el && el.silent) { return; } var eventKey = ('on' + eventName); var eventPacket = makeEventPacket(eventName, targetInfo, event); while (el) { el[eventKey] && (eventPacket.cancelBubble = !!el[eventKey].call(el, eventPacket)); el.trigger(eventName, eventPacket); el = el.__hostTarget ? el.__hostTarget : el.parent; if (eventPacket.cancelBubble) { break; } } if (!eventPacket.cancelBubble) { this.trigger(eventName, eventPacket); if (this.painter && this.painter.eachOtherLayer) { this.painter.eachOtherLayer(function (layer) { if (typeof (layer[eventKey]) === 'function') { layer[eventKey].call(layer, eventPacket); } if (layer.trigger) { layer.trigger(eventName, eventPacket); } }); } } }; Handler.prototype.findHover = function (x, y, exclude) { var list = this.storage.getDisplayList(); var out = new HoveredResult(x, y); setHoverTarget(list, out, x, y, exclude); if (this._pointerSize && !out.target) { var candidates = []; var pointerSize = this._pointerSize; var targetSizeHalf = pointerSize / 2; var pointerRect = new core_BoundingRect(x - targetSizeHalf, y - targetSizeHalf, pointerSize, pointerSize); for (var i = list.length - 1; i >= 0; i--) { var el = list[i]; if (el !== exclude && !el.ignore && !el.ignoreCoarsePointer && (!el.parent || !el.parent.ignoreCoarsePointer)) { Handler_tmpRect.copy(el.getBoundingRect()); if (el.transform) { Handler_tmpRect.applyTransform(el.transform); } if (Handler_tmpRect.intersect(pointerRect)) { candidates.push(el); } } } if (candidates.length) { var rStep = 4; var thetaStep = Math.PI / 12; var PI2 = Math.PI * 2; for (var r = 0; r < targetSizeHalf; r += rStep) { for (var theta = 0; theta < PI2; theta += thetaStep) { var x1 = x + r * Math.cos(theta); var y1 = y + r * Math.sin(theta); setHoverTarget(candidates, out, x1, y1, exclude); if (out.target) { return out; } } } } } return out; }; Handler.prototype.processGesture = function (event, stage) { if (!this._gestureMgr) { this._gestureMgr = new GestureMgr_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(); if (gestureInfo) { var type = gestureInfo.type; event.gestureEvent = type; var res = new HoveredResult(); res.target = gestureInfo.target; this.dispatchToElement(res, type, gestureInfo.event); } }; return Handler; }(core_Eventful)); core_util["each"](['click', 'mousedown', 'mouseup', 'mousewheel', 'dblclick', 'contextmenu'], function (name) { Handler_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) { hovered = this.findHover(x, y); hoveredTarget = hovered.target; } if (name === 'mousedown') { this._downEl = hoveredTarget; this._downPoint = [event.zrX, event.zrY]; this._upEl = hoveredTarget; } else if (name === 'mouseup') { this._upEl = hoveredTarget; } else if (name === 'click') { if (this._downEl !== this._upEl || !this._downPoint || vector_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 = void 0; var ignoreClip = false; while (el) { if (el.ignoreClip) { ignoreClip = true; } if (!ignoreClip) { var clipPath = el.getClipPath(); if (clipPath && !clipPath.contain(x, y)) { return false; } } if (el.silent) { isSilent = true; } var hostEl = el.__hostTarget; el = hostEl ? hostEl : el.parent; } return isSilent ? SILENT : true; } return false; } function setHoverTarget(list, out, x, y, exclude) { for (var i = list.length - 1; i >= 0; i--) { var el = list[i]; var hoverCheckResult = void 0; if (el !== exclude && !el.ignore && (hoverCheckResult = isHover(el, x, y))) { !out.topTarget && (out.topTarget = el); if (hoverCheckResult !== SILENT) { out.target = el; break; } } } } function isOutsideBoundary(handlerInstance, x, y) { var painter = handlerInstance.painter; return x < 0 || x > painter.getWidth() || y < 0 || y > painter.getHeight(); } /* harmony default export */ var lib_Handler = (Handler_Handler); // CONCATENATED MODULE: ./node_modules/zrender/lib/core/timsort.js var DEFAULT_MIN_MERGE = 32; var DEFAULT_MIN_GALLOPING = 7; function minRunLength(n) { var r = 0; while (n >= DEFAULT_MIN_MERGE) { r |= n & 1; n >>= 1; } return n + r; } function makeAscendingRun(array, lo, hi, compare) { var runHi = lo + 1; if (runHi === hi) { return 1; } if (compare(array[runHi++], array[lo]) < 0) { while (runHi < hi && compare(array[runHi], array[runHi - 1]) < 0) { runHi++; } reverseRun(array, lo, runHi); } else { while (runHi < hi && compare(array[runHi], array[runHi - 1]) >= 0) { runHi++; } } return runHi - lo; } function reverseRun(array, lo, hi) { hi--; while (lo < hi) { var t = array[lo]; array[lo++] = array[hi]; array[hi--] = t; } } function binaryInsertionSort(array, lo, hi, start, compare) { if (start === lo) { start++; } for (; start < hi; start++) { var pivot = array[start]; var left = lo; var right = start; var mid; while (left < right) { mid = left + right >>> 1; if (compare(pivot, array[mid]) < 0) { right = mid; } else { left = mid + 1; } } var n = start - left; switch (n) { case 3: array[left + 3] = array[left + 2]; case 2: array[left + 2] = array[left + 1]; case 1: array[left + 1] = array[left]; break; default: while (n > 0) { array[left + n] = array[left + n - 1]; n--; } } array[left] = pivot; } } function gallopLeft(value, array, start, length, hint, compare) { var lastOffset = 0; var maxOffset = 0; var offset = 1; if (compare(value, array[start + hint]) > 0) { maxOffset = length - hint; while (offset < maxOffset && compare(value, array[start + hint + offset]) > 0) { lastOffset = offset; offset = (offset << 1) + 1; if (offset <= 0) { offset = maxOffset; } } if (offset > maxOffset) { offset = maxOffset; } lastOffset += hint; offset += hint; } else { maxOffset = hint + 1; while (offset < maxOffset && compare(value, array[start + hint - offset]) <= 0) { lastOffset = offset; offset = (offset << 1) + 1; if (offset <= 0) { offset = maxOffset; } } if (offset > maxOffset) { offset = maxOffset; } var tmp = lastOffset; lastOffset = hint - offset; offset = hint - tmp; } lastOffset++; while (lastOffset < offset) { var m = lastOffset + (offset - lastOffset >>> 1); if (compare(value, array[start + m]) > 0) { lastOffset = m + 1; } else { offset = m; } } return offset; } function gallopRight(value, array, start, length, hint, compare) { var lastOffset = 0; var maxOffset = 0; var offset = 1; if (compare(value, array[start + hint]) < 0) { maxOffset = hint + 1; while (offset < maxOffset && compare(value, array[start + hint - offset]) < 0) { lastOffset = offset; offset = (offset << 1) + 1; if (offset <= 0) { offset = maxOffset; } } if (offset > maxOffset) { offset = maxOffset; } var tmp = lastOffset; lastOffset = hint - offset; offset = hint - tmp; } else { maxOffset = length - hint; while (offset < maxOffset && compare(value, array[start + hint + offset]) >= 0) { lastOffset = offset; offset = (offset << 1) + 1; if (offset <= 0) { offset = maxOffset; } } if (offset > maxOffset) { offset = maxOffset; } lastOffset += hint; offset += hint; } lastOffset++; while (lastOffset < offset) { var m = lastOffset + (offset - lastOffset >>> 1); if (compare(value, array[start + m]) < 0) { offset = m; } else { lastOffset = m + 1; } } return offset; } function TimSort(array, compare) { var minGallop = DEFAULT_MIN_GALLOPING; var runStart; var runLength; var stackSize = 0; var tmp = []; runStart = []; runLength = []; function pushRun(_runStart, _runLength) { runStart[stackSize] = _runStart; runLength[stackSize] = _runLength; stackSize += 1; } function mergeRuns() { while (stackSize > 1) { var n = stackSize - 2; if ((n >= 1 && runLength[n - 1] <= runLength[n] + runLength[n + 1]) || (n >= 2 && runLength[n - 2] <= runLength[n] + runLength[n - 1])) { if (runLength[n - 1] < runLength[n + 1]) { n--; } } else if (runLength[n] > runLength[n + 1]) { break; } mergeAt(n); } } function forceMergeRuns() { while (stackSize > 1) { var n = stackSize - 2; if (n > 0 && runLength[n - 1] < runLength[n + 1]) { n--; } mergeAt(n); } } function mergeAt(i) { var start1 = runStart[i]; var length1 = runLength[i]; var start2 = runStart[i + 1]; var length2 = runLength[i + 1]; runLength[i] = length1 + length2; if (i === stackSize - 3) { runStart[i + 1] = runStart[i + 2]; runLength[i + 1] = runLength[i + 2]; } stackSize--; var k = gallopRight(array[start2], array, start1, length1, 0, compare); start1 += k; length1 -= k; if (length1 === 0) { return; } length2 = gallopLeft(array[start1 + length1 - 1], array, start2, length2, length2 - 1, compare); if (length2 === 0) { return; } if (length1 <= length2) { mergeLow(start1, length1, start2, length2); } else { mergeHigh(start1, length1, start2, length2); } } function mergeLow(start1, length1, start2, length2) { var i = 0; for (i = 0; i < length1; i++) { tmp[i] = array[start1 + i]; } var cursor1 = 0; var cursor2 = start2; var dest = start1; array[dest++] = array[cursor2++]; if (--length2 === 0) { for (i = 0; i < length1; i++) { array[dest + i] = tmp[cursor1 + i]; } return; } if (length1 === 1) { for (i = 0; i < length2; i++) { array[dest + i] = array[cursor2 + i]; } array[dest + length2] = tmp[cursor1]; return; } var _minGallop = minGallop; var count1; var count2; var exit; while (1) { count1 = 0; count2 = 0; exit = false; do { if (compare(array[cursor2], tmp[cursor1]) < 0) { array[dest++] = array[cursor2++]; count2++; count1 = 0; if (--length2 === 0) { exit = true; break; } } else { array[dest++] = tmp[cursor1++]; count1++; count2 = 0; if (--length1 === 1) { exit = true; break; } } } while ((count1 | count2) < _minGallop); if (exit) { break; } do { count1 = gallopRight(array[cursor2], tmp, cursor1, length1, 0, compare); if (count1 !== 0) { for (i = 0; i < count1; i++) { array[dest + i] = tmp[cursor1 + i]; } dest += count1; cursor1 += count1; length1 -= count1; if (length1 <= 1) { exit = true; break; } } array[dest++] = array[cursor2++]; if (--length2 === 0) { exit = true; break; } count2 = gallopLeft(tmp[cursor1], array, cursor2, length2, 0, compare); if (count2 !== 0) { for (i = 0; i < count2; i++) { array[dest + i] = array[cursor2 + i]; } dest += count2; cursor2 += count2; length2 -= count2; if (length2 === 0) { exit = true; break; } } array[dest++] = tmp[cursor1++]; if (--length1 === 1) { exit = true; break; } _minGallop--; } while (count1 >= DEFAULT_MIN_GALLOPING || count2 >= DEFAULT_MIN_GALLOPING); if (exit) { break; } if (_minGallop < 0) { _minGallop = 0; } _minGallop += 2; } minGallop = _minGallop; minGallop < 1 && (minGallop = 1); if (length1 === 1) { for (i = 0; i < length2; i++) { array[dest + i] = array[cursor2 + i]; } array[dest + length2] = tmp[cursor1]; } else if (length1 === 0) { throw new Error(); } else { for (i = 0; i < length1; i++) { array[dest + i] = tmp[cursor1 + i]; } } } function mergeHigh(start1, length1, start2, length2) { var i = 0; for (i = 0; i < length2; i++) { tmp[i] = array[start2 + i]; } var cursor1 = start1 + length1 - 1; var cursor2 = length2 - 1; var dest = start2 + length2 - 1; var customCursor = 0; var customDest = 0; array[dest--] = array[cursor1--]; if (--length1 === 0) { customCursor = dest - (length2 - 1); for (i = 0; i < length2; i++) { array[customCursor + i] = tmp[i]; } return; } if (length2 === 1) { dest -= length1; cursor1 -= length1; customDest = dest + 1; customCursor = cursor1 + 1; for (i = length1 - 1; i >= 0; i--) { array[customDest + i] = array[customCursor + i]; } array[dest] = tmp[cursor2]; return; } var _minGallop = minGallop; while (true) { var count1 = 0; var count2 = 0; var exit = false; do { if (compare(tmp[cursor2], array[cursor1]) < 0) { array[dest--] = array[cursor1--]; count1++; count2 = 0; if (--length1 === 0) { exit = true; break; } } else { array[dest--] = tmp[cursor2--]; count2++; count1 = 0; if (--length2 === 1) { exit = true; break; } } } while ((count1 | count2) < _minGallop); if (exit) { break; } do { count1 = length1 - gallopRight(tmp[cursor2], array, start1, length1, length1 - 1, compare); if (count1 !== 0) { dest -= count1; cursor1 -= count1; length1 -= count1; customDest = dest + 1; customCursor = cursor1 + 1; for (i = count1 - 1; i >= 0; i--) { array[customDest + i] = array[customCursor + i]; } if (length1 === 0) { exit = true; break; } } array[dest--] = tmp[cursor2--]; if (--length2 === 1) { exit = true; break; } count2 = length2 - gallopLeft(array[cursor1], tmp, 0, length2, length2 - 1, compare); if (count2 !== 0) { dest -= count2; cursor2 -= count2; length2 -= count2; customDest = dest + 1; customCursor = cursor2 + 1; for (i = 0; i < count2; i++) { array[customDest + i] = tmp[customCursor + i]; } if (length2 <= 1) { exit = true; break; } } array[dest--] = array[cursor1--]; if (--length1 === 0) { exit = true; break; } _minGallop--; } while (count1 >= DEFAULT_MIN_GALLOPING || count2 >= DEFAULT_MIN_GALLOPING); if (exit) { break; } if (_minGallop < 0) { _minGallop = 0; } _minGallop += 2; } minGallop = _minGallop; if (minGallop < 1) { minGallop = 1; } if (length2 === 1) { dest -= length1; cursor1 -= length1; customDest = dest + 1; customCursor = cursor1 + 1; for (i = length1 - 1; i >= 0; i--) { array[customDest + i] = array[customCursor + i]; } array[dest] = tmp[cursor2]; } else if (length2 === 0) { throw new Error(); } else { customCursor = dest - (length2 - 1); for (i = 0; i < length2; i++) { array[customCursor + i] = tmp[i]; } } } return { mergeRuns: mergeRuns, forceMergeRuns: forceMergeRuns, pushRun: pushRun }; } function timsort_sort(array, compare, lo, hi) { if (!lo) { lo = 0; } if (!hi) { hi = array.length; } var remaining = hi - lo; if (remaining < 2) { return; } var runLength = 0; if (remaining < DEFAULT_MIN_MERGE) { runLength = makeAscendingRun(array, lo, hi, compare); binaryInsertionSort(array, lo, hi, lo + runLength, compare); return; } var ts = TimSort(array, compare); var minRun = minRunLength(remaining); do { runLength = makeAscendingRun(array, lo, hi, compare); if (runLength < minRun) { var force = remaining; if (force > minRun) { force = minRun; } binaryInsertionSort(array, lo, lo + force, lo + runLength, compare); runLength = force; } ts.pushRun(lo, runLength); ts.mergeRuns(); remaining -= runLength; lo += runLength; } while (remaining !== 0); ts.forceMergeRuns(); } // CONCATENATED MODULE: ./node_modules/zrender/lib/graphic/constants.js var REDRAW_BIT = 1; var STYLE_CHANGED_BIT = 2; var SHAPE_CHANGED_BIT = 4; // CONCATENATED MODULE: ./node_modules/zrender/lib/Storage.js var invalidZErrorLogged = false; function logInvalidZError() { if (invalidZErrorLogged) { return; } invalidZErrorLogged = true; console.warn('z / z2 / zlevel of displayable is invalid, which may cause unexpected errors'); } function shapeCompareFunc(a, b) { if (a.zlevel === b.zlevel) { if (a.z === b.z) { return a.z2 - b.z2; } return a.z - b.z; } return a.zlevel - b.zlevel; } var Storage_Storage = (function () { function Storage() { this._roots = []; this._displayList = []; this._displayListLen = 0; this.displayableSortFunc = shapeCompareFunc; } Storage.prototype.traverse = function (cb, context) { for (var i = 0; i < this._roots.length; i++) { this._roots[i].traverse(cb, context); } }; Storage.prototype.getDisplayList = function (update, includeIgnore) { includeIgnore = includeIgnore || false; var displayList = this._displayList; if (update || !displayList.length) { this.updateDisplayList(includeIgnore); } return displayList; }; Storage.prototype.updateDisplayList = function (includeIgnore) { this._displayListLen = 0; var roots = this._roots; var displayList = this._displayList; for (var i = 0, len = roots.length; i < len; i++) { this._updateAndAddDisplayable(roots[i], null, includeIgnore); } displayList.length = this._displayListLen; timsort_sort(displayList, shapeCompareFunc); }; Storage.prototype._updateAndAddDisplayable = function (el, clipPaths, includeIgnore) { if (el.ignore && !includeIgnore) { return; } el.beforeUpdate(); el.update(); el.afterUpdate(); var userSetClipPath = el.getClipPath(); if (el.ignoreClip) { clipPaths = null; } else if (userSetClipPath) { if (clipPaths) { clipPaths = clipPaths.slice(); } else { clipPaths = []; } var currentClipPath = userSetClipPath; var parentClipPath = el; while (currentClipPath) { currentClipPath.parent = parentClipPath; currentClipPath.updateTransform(); clipPaths.push(currentClipPath); parentClipPath = currentClipPath; currentClipPath = currentClipPath.getClipPath(); } } if (el.childrenRef) { var children = el.childrenRef(); for (var i = 0; i < children.length; i++) { var child = children[i]; if (el.__dirty) { child.__dirty |= REDRAW_BIT; } this._updateAndAddDisplayable(child, clipPaths, includeIgnore); } el.__dirty = 0; } else { var disp = el; if (clipPaths && clipPaths.length) { disp.__clipPaths = clipPaths; } else if (disp.__clipPaths && disp.__clipPaths.length > 0) { disp.__clipPaths = []; } if (isNaN(disp.z)) { logInvalidZError(); disp.z = 0; } if (isNaN(disp.z2)) { logInvalidZError(); disp.z2 = 0; } if (isNaN(disp.zlevel)) { logInvalidZError(); disp.zlevel = 0; } this._displayList[this._displayListLen++] = disp; } var decalEl = el.getDecalElement && el.getDecalElement(); if (decalEl) { this._updateAndAddDisplayable(decalEl, clipPaths, includeIgnore); } var textGuide = el.getTextGuideLine(); if (textGuide) { this._updateAndAddDisplayable(textGuide, clipPaths, includeIgnore); } var textEl = el.getTextContent(); if (textEl) { this._updateAndAddDisplayable(textEl, clipPaths, includeIgnore); } }; Storage.prototype.addRoot = function (el) { if (el.__zr && el.__zr.storage === this) { return; } this._roots.push(el); }; Storage.prototype.delRoot = function (el) { if (el instanceof Array) { for (var i = 0, l = el.length; i < l; i++) { this.delRoot(el[i]); } return; } var idx = core_util["indexOf"](this._roots, el); if (idx >= 0) { this._roots.splice(idx, 1); } }; Storage.prototype.delAllRoots = function () { this._roots = []; this._displayList = []; this._displayListLen = 0; return; }; Storage.prototype.getRoots = function () { return this._roots; }; Storage.prototype.dispose = function () { this._displayList = null; this._roots = null; }; return Storage; }()); /* harmony default export */ var lib_Storage = (Storage_Storage); // CONCATENATED MODULE: ./node_modules/zrender/lib/animation/requestAnimationFrame.js var requestAnimationFrame; requestAnimationFrame = (core_env["a" /* default */].hasGlobalWindow && ((window.requestAnimationFrame && window.requestAnimationFrame.bind(window)) || (window.msRequestAnimationFrame && window.msRequestAnimationFrame.bind(window)) || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame)) || function (func) { return setTimeout(func, 16); }; /* harmony default export */ var animation_requestAnimationFrame = (requestAnimationFrame); // CONCATENATED MODULE: ./node_modules/zrender/lib/animation/easing.js var easingFuncs = { linear: function (k) { return k; }, quadraticIn: function (k) { return k * k; }, quadraticOut: function (k) { return k * (2 - k); }, quadraticInOut: function (k) { if ((k *= 2) < 1) { return 0.5 * k * k; } return -0.5 * (--k * (k - 2) - 1); }, cubicIn: function (k) { return k * k * k; }, cubicOut: function (k) { return --k * k * k + 1; }, cubicInOut: function (k) { if ((k *= 2) < 1) { return 0.5 * k * k * k; } return 0.5 * ((k -= 2) * k * k + 2); }, quarticIn: function (k) { return k * k * k * k; }, quarticOut: function (k) { return 1 - (--k * k * k * k); }, quarticInOut: function (k) { if ((k *= 2) < 1) { return 0.5 * k * k * k * k; } return -0.5 * ((k -= 2) * k * k * k - 2); }, quinticIn: function (k) { return k * k * k * k * k; }, quinticOut: function (k) { return --k * k * k * k * k + 1; }, quinticInOut: function (k) { if ((k *= 2) < 1) { return 0.5 * k * k * k * k * k; } return 0.5 * ((k -= 2) * k * k * k * k + 2); }, sinusoidalIn: function (k) { return 1 - Math.cos(k * Math.PI / 2); }, sinusoidalOut: function (k) { return Math.sin(k * Math.PI / 2); }, sinusoidalInOut: function (k) { return 0.5 * (1 - Math.cos(Math.PI * k)); }, exponentialIn: function (k) { return k === 0 ? 0 : Math.pow(1024, k - 1); }, exponentialOut: function (k) { return k === 1 ? 1 : 1 - Math.pow(2, -10 * k); }, exponentialInOut: function (k) { if (k === 0) { return 0; } if (k === 1) { return 1; } if ((k *= 2) < 1) { return 0.5 * Math.pow(1024, k - 1); } return 0.5 * (-Math.pow(2, -10 * (k - 1)) + 2); }, circularIn: function (k) { return 1 - Math.sqrt(1 - k * k); }, circularOut: function (k) { return Math.sqrt(1 - (--k * k)); }, circularInOut: function (k) { if ((k *= 2) < 1) { return -0.5 * (Math.sqrt(1 - k * k) - 1); } return 0.5 * (Math.sqrt(1 - (k -= 2) * k) + 1); }, elasticIn: function (k) { var s; var a = 0.1; var p = 0.4; if (k === 0) { return 0; } if (k === 1) { return 1; } if (!a || a < 1) { a = 1; s = p / 4; } else { s = p * Math.asin(1 / a) / (2 * Math.PI); } return -(a * Math.pow(2, 10 * (k -= 1)) * Math.sin((k - s) * (2 * Math.PI) / p)); }, elasticOut: function (k) { var s; var a = 0.1; var p = 0.4; if (k === 0) { return 0; } if (k === 1) { return 1; } if (!a || a < 1) { a = 1; s = p / 4; } else { s = p * Math.asin(1 / a) / (2 * Math.PI); } return (a * Math.pow(2, -10 * k) * Math.sin((k - s) * (2 * Math.PI) / p) + 1); }, elasticInOut: function (k) { var s; var a = 0.1; var p = 0.4; if (k === 0) { return 0; } if (k === 1) { return 1; } if (!a || a < 1) { a = 1; s = p / 4; } else { s = p * Math.asin(1 / a) / (2 * Math.PI); } if ((k *= 2) < 1) { return -0.5 * (a * Math.pow(2, 10 * (k -= 1)) * Math.sin((k - s) * (2 * Math.PI) / p)); } return a * Math.pow(2, -10 * (k -= 1)) * Math.sin((k - s) * (2 * Math.PI) / p) * 0.5 + 1; }, backIn: function (k) { var s = 1.70158; return k * k * ((s + 1) * k - s); }, backOut: function (k) { var s = 1.70158; return --k * k * ((s + 1) * k + s) + 1; }, backInOut: function (k) { var s = 1.70158 * 1.525; if ((k *= 2) < 1) { return 0.5 * (k * k * ((s + 1) * k - s)); } return 0.5 * ((k -= 2) * k * ((s + 1) * k + s) + 2); }, bounceIn: function (k) { return 1 - easingFuncs.bounceOut(1 - k); }, bounceOut: function (k) { if (k < (1 / 2.75)) { return 7.5625 * k * k; } else if (k < (2 / 2.75)) { return 7.5625 * (k -= (1.5 / 2.75)) * k + 0.75; } else if (k < (2.5 / 2.75)) { return 7.5625 * (k -= (2.25 / 2.75)) * k + 0.9375; } else { return 7.5625 * (k -= (2.625 / 2.75)) * k + 0.984375; } }, bounceInOut: function (k) { if (k < 0.5) { return easingFuncs.bounceIn(k * 2) * 0.5; } return easingFuncs.bounceOut(k * 2 - 1) * 0.5 + 0.5; } }; /* harmony default export */ var animation_easing = (easingFuncs); // CONCATENATED MODULE: ./node_modules/zrender/lib/core/curve.js var mathPow = Math.pow; var mathSqrt = Math.sqrt; var EPSILON = 1e-8; var EPSILON_NUMERIC = 1e-4; var THREE_SQRT = mathSqrt(3); var ONE_THIRD = 1 / 3; var _v0 = vector_create(); var _v1 = vector_create(); var _v2 = vector_create(); function isAroundZero(val) { return val > -EPSILON && val < EPSILON; } function isNotAroundZero(val) { return val > EPSILON || val < -EPSILON; } function curve_cubicAt(p0, p1, p2, p3, t) { var onet = 1 - t; return onet * onet * (onet * p0 + 3 * t * p1) + t * t * (t * p3 + 3 * onet * p2); } function cubicDerivativeAt(p0, p1, p2, p3, t) { var onet = 1 - t; return 3 * (((p1 - p0) * onet + 2 * (p2 - p1) * t) * onet + (p3 - p2) * t * t); } function cubicRootAt(p0, p1, p2, p3, val, roots) { var a = p3 + 3 * (p1 - p2) - p0; var b = 3 * (p2 - p1 * 2 + p0); var c = 3 * (p1 - p0); var d = p0 - val; var A = b * b - 3 * a * c; var B = b * c - 9 * a * d; var C = c * c - 3 * b * d; var n = 0; if (isAroundZero(A) && isAroundZero(B)) { if (isAroundZero(b)) { roots[0] = 0; } else { var t1 = -c / b; if (t1 >= 0 && t1 <= 1) { roots[n++] = t1; } } } else { var disc = B * B - 4 * A * C; if (isAroundZero(disc)) { var K = B / A; var t1 = -b / a + K; var t2 = -K / 2; if (t1 >= 0 && t1 <= 1) { roots[n++] = t1; } if (t2 >= 0 && t2 <= 1) { roots[n++] = t2; } } else if (disc > 0) { var discSqrt = mathSqrt(disc); var Y1 = A * b + 1.5 * a * (-B + discSqrt); var Y2 = A * b + 1.5 * a * (-B - discSqrt); if (Y1 < 0) { Y1 = -mathPow(-Y1, ONE_THIRD); } else { Y1 = mathPow(Y1, ONE_THIRD); } if (Y2 < 0) { Y2 = -mathPow(-Y2, ONE_THIRD); } else { Y2 = mathPow(Y2, ONE_THIRD); } var t1 = (-b - (Y1 + Y2)) / (3 * a); if (t1 >= 0 && t1 <= 1) { roots[n++] = t1; } } else { var T = (2 * A * b - 3 * a * B) / (2 * mathSqrt(A * A * A)); var theta = Math.acos(T) / 3; var ASqrt = mathSqrt(A); var tmp = Math.cos(theta); var t1 = (-b - 2 * ASqrt * tmp) / (3 * a); var t2 = (-b + ASqrt * (tmp + THREE_SQRT * Math.sin(theta))) / (3 * a); var t3 = (-b + ASqrt * (tmp - THREE_SQRT * Math.sin(theta))) / (3 * a); if (t1 >= 0 && t1 <= 1) { roots[n++] = t1; } if (t2 >= 0 && t2 <= 1) { roots[n++] = t2; } if (t3 >= 0 && t3 <= 1) { roots[n++] = t3; } } } return n; } function curve_cubicExtrema(p0, p1, p2, p3, extrema) { var b = 6 * p2 - 12 * p1 + 6 * p0; var a = 9 * p1 + 3 * p3 - 3 * p0 - 9 * p2; var c = 3 * p1 - 3 * p0; var n = 0; if (isAroundZero(a)) { if (isNotAroundZero(b)) { var t1 = -c / b; if (t1 >= 0 && t1 <= 1) { extrema[n++] = t1; } } } else { var disc = b * b - 4 * a * c; if (isAroundZero(disc)) { extrema[0] = -b / (2 * a); } else if (disc > 0) { var discSqrt = mathSqrt(disc); var t1 = (-b + discSqrt) / (2 * a); var t2 = (-b - discSqrt) / (2 * a); if (t1 >= 0 && t1 <= 1) { extrema[n++] = t1; } if (t2 >= 0 && t2 <= 1) { extrema[n++] = t2; } } } return n; } function cubicSubdivide(p0, p1, p2, p3, t, out) { var p01 = (p1 - p0) * t + p0; var p12 = (p2 - p1) * t + p1; var p23 = (p3 - p2) * t + p2; var p012 = (p12 - p01) * t + p01; var p123 = (p23 - p12) * t + p12; var p0123 = (p123 - p012) * t + p012; out[0] = p0; out[1] = p01; out[2] = p012; out[3] = p0123; out[4] = p0123; out[5] = p123; out[6] = p23; out[7] = p3; } function cubicProjectPoint(x0, y0, x1, y1, x2, y2, x3, y3, x, y, out) { var t; var interval = 0.005; var d = Infinity; var prev; var next; var d1; var d2; _v0[0] = x; _v0[1] = y; for (var _t = 0; _t < 1; _t += 0.05) { _v1[0] = curve_cubicAt(x0, x1, x2, x3, _t); _v1[1] = curve_cubicAt(y0, y1, y2, y3, _t); d1 = distSquare(_v0, _v1); if (d1 < d) { t = _t; d = d1; } } d = Infinity; for (var i = 0; i < 32; i++) { if (interval < EPSILON_NUMERIC) { break; } prev = t - interval; next = t + interval; _v1[0] = curve_cubicAt(x0, x1, x2, x3, prev); _v1[1] = curve_cubicAt(y0, y1, y2, y3, prev); d1 = distSquare(_v1, _v0); if (prev >= 0 && d1 < d) { t = prev; d = d1; } else { _v2[0] = curve_cubicAt(x0, x1, x2, x3, next); _v2[1] = curve_cubicAt(y0, y1, y2, y3, next); d2 = distSquare(_v2, _v0); if (next <= 1 && d2 < d) { t = next; d = d2; } else { interval *= 0.5; } } } if (out) { out[0] = curve_cubicAt(x0, x1, x2, x3, t); out[1] = curve_cubicAt(y0, y1, y2, y3, t); } return mathSqrt(d); } function cubicLength(x0, y0, x1, y1, x2, y2, x3, y3, iteration) { var px = x0; var py = y0; var d = 0; var step = 1 / iteration; for (var i = 1; i <= iteration; i++) { var t = i * step; var x = curve_cubicAt(x0, x1, x2, x3, t); var y = curve_cubicAt(y0, y1, y2, y3, t); var dx = x - px; var dy = y - py; d += Math.sqrt(dx * dx + dy * dy); px = x; py = y; } return d; } function curve_quadraticAt(p0, p1, p2, t) { var onet = 1 - t; return onet * (onet * p0 + 2 * t * p1) + t * t * p2; } function curve_quadraticDerivativeAt(p0, p1, p2, t) { return 2 * ((1 - t) * (p1 - p0) + t * (p2 - p1)); } function quadraticRootAt(p0, p1, p2, val, roots) { var a = p0 - 2 * p1 + p2; var b = 2 * (p1 - p0); var c = p0 - val; var n = 0; if (isAroundZero(a)) { if (isNotAroundZero(b)) { var t1 = -c / b; if (t1 >= 0 && t1 <= 1) { roots[n++] = t1; } } } else { var disc = b * b - 4 * a * c; if (isAroundZero(disc)) { var t1 = -b / (2 * a); if (t1 >= 0 && t1 <= 1) { roots[n++] = t1; } } else if (disc > 0) { var discSqrt = mathSqrt(disc); var t1 = (-b + discSqrt) / (2 * a); var t2 = (-b - discSqrt) / (2 * a); if (t1 >= 0 && t1 <= 1) { roots[n++] = t1; } if (t2 >= 0 && t2 <= 1) { roots[n++] = t2; } } } return n; } function curve_quadraticExtremum(p0, p1, p2) { var divider = p0 + p2 - 2 * p1; if (divider === 0) { return 0.5; } else { return (p0 - p1) / divider; } } function curve_quadraticSubdivide(p0, p1, p2, t, out) { var p01 = (p1 - p0) * t + p0; var p12 = (p2 - p1) * t + p1; var p012 = (p12 - p01) * t + p01; out[0] = p0; out[1] = p01; out[2] = p012; out[3] = p012; out[4] = p12; out[5] = p2; } function quadraticProjectPoint(x0, y0, x1, y1, x2, y2, x, y, out) { var t; var interval = 0.005; var d = Infinity; _v0[0] = x; _v0[1] = y; for (var _t = 0; _t < 1; _t += 0.05) { _v1[0] = curve_quadraticAt(x0, x1, x2, _t); _v1[1] = curve_quadraticAt(y0, y1, y2, _t); var d1 = distSquare(_v0, _v1); if (d1 < d) { t = _t; d = d1; } } d = Infinity; for (var i = 0; i < 32; i++) { if (interval < EPSILON_NUMERIC) { break; } var prev = t - interval; var next = t + interval; _v1[0] = curve_quadraticAt(x0, x1, x2, prev); _v1[1] = curve_quadraticAt(y0, y1, y2, prev); var d1 = distSquare(_v1, _v0); if (prev >= 0 && d1 < d) { t = prev; d = d1; } else { _v2[0] = curve_quadraticAt(x0, x1, x2, next); _v2[1] = curve_quadraticAt(y0, y1, y2, next); var d2 = distSquare(_v2, _v0); if (next <= 1 && d2 < d) { t = next; d = d2; } else { interval *= 0.5; } } } if (out) { out[0] = curve_quadraticAt(x0, x1, x2, t); out[1] = curve_quadraticAt(y0, y1, y2, t); } return mathSqrt(d); } function quadraticLength(x0, y0, x1, y1, x2, y2, iteration) { var px = x0; var py = y0; var d = 0; var step = 1 / iteration; for (var i = 1; i <= iteration; i++) { var t = i * step; var x = curve_quadraticAt(x0, x1, x2, t); var y = curve_quadraticAt(y0, y1, y2, t); var dx = x - px; var dy = y - py; d += Math.sqrt(dx * dx + dy * dy); px = x; py = y; } return d; } // CONCATENATED MODULE: ./node_modules/zrender/lib/animation/cubicEasing.js var regexp = /cubic-bezier\(([0-9,\.e ]+)\)/; function createCubicEasingFunc(cubicEasingStr) { var cubic = cubicEasingStr && regexp.exec(cubicEasingStr); if (cubic) { var points = cubic[1].split(','); var a_1 = +Object(core_util["trim"])(points[0]); var b_1 = +Object(core_util["trim"])(points[1]); var c_1 = +Object(core_util["trim"])(points[2]); var d_1 = +Object(core_util["trim"])(points[3]); if (isNaN(a_1 + b_1 + c_1 + d_1)) { return; } var roots_1 = []; return function (p) { return p <= 0 ? 0 : p >= 1 ? 1 : cubicRootAt(0, a_1, c_1, 1, p, roots_1) && curve_cubicAt(0, b_1, d_1, 1, roots_1[0]); }; } } // CONCATENATED MODULE: ./node_modules/zrender/lib/animation/Clip.js var Clip_Clip = (function () { function Clip(opts) { this._inited = false; this._startTime = 0; this._pausedTime = 0; this._paused = false; this._life = opts.life || 1000; this._delay = opts.delay || 0; this.loop = opts.loop || false; this.onframe = opts.onframe || core_util["noop"]; this.ondestroy = opts.ondestroy || core_util["noop"]; this.onrestart = opts.onrestart || core_util["noop"]; opts.easing && this.setEasing(opts.easing); } Clip.prototype.step = function (globalTime, deltaTime) { if (!this._inited) { this._startTime = globalTime + this._delay; this._inited = true; } if (this._paused) { this._pausedTime += deltaTime; return; } var life = this._life; var elapsedTime = globalTime - this._startTime - this._pausedTime; var percent = elapsedTime / life; if (percent < 0) { percent = 0; } percent = Math.min(percent, 1); var easingFunc = this.easingFunc; var schedule = easingFunc ? easingFunc(percent) : percent; this.onframe(schedule); if (percent === 1) { if (this.loop) { var remainder = elapsedTime % life; this._startTime = globalTime - remainder; this._pausedTime = 0; this.onrestart(); } else { return true; } } return false; }; Clip.prototype.pause = function () { this._paused = true; }; Clip.prototype.resume = function () { this._paused = false; }; Clip.prototype.setEasing = function (easing) { this.easing = easing; this.easingFunc = Object(core_util["isFunction"])(easing) ? easing : animation_easing[easing] || createCubicEasingFunc(easing); }; return Clip; }()); /* harmony default export */ var animation_Clip = (Clip_Clip); // EXTERNAL MODULE: ./node_modules/zrender/lib/tool/color.js var tool_color = __webpack_require__("DRaW"); // EXTERNAL MODULE: ./node_modules/zrender/lib/svg/helper.js var helper = __webpack_require__("edjc"); // CONCATENATED MODULE: ./node_modules/zrender/lib/animation/Animator.js ; var arraySlice = Array.prototype.slice; function interpolateNumber(p0, p1, percent) { return (p1 - p0) * percent + p0; } function interpolate1DArray(out, p0, p1, percent) { var len = p0.length; for (var i = 0; i < len; i++) { out[i] = interpolateNumber(p0[i], p1[i], percent); } return out; } function interpolate2DArray(out, p0, p1, percent) { var len = p0.length; var len2 = len && p0[0].length; for (var i = 0; i < len; i++) { if (!out[i]) { out[i] = []; } for (var j = 0; j < len2; j++) { out[i][j] = interpolateNumber(p0[i][j], p1[i][j], percent); } } return out; } function add1DArray(out, p0, p1, sign) { var len = p0.length; for (var i = 0; i < len; i++) { out[i] = p0[i] + p1[i] * sign; } return out; } function add2DArray(out, p0, p1, sign) { var len = p0.length; var len2 = len && p0[0].length; for (var i = 0; i < len; i++) { if (!out[i]) { out[i] = []; } for (var j = 0; j < len2; j++) { out[i][j] = p0[i][j] + p1[i][j] * sign; } } return out; } function fillColorStops(val0, val1) { var len0 = val0.length; var len1 = val1.length; var shorterArr = len0 > len1 ? val1 : val0; var shorterLen = Math.min(len0, len1); var last = shorterArr[shorterLen - 1] || { color: [0, 0, 0, 0], offset: 0 }; for (var i = shorterLen; i < Math.max(len0, len1); i++) { shorterArr.push({ offset: last.offset, color: last.color.slice() }); } } function fillArray(val0, val1, arrDim) { var arr0 = val0; var arr1 = val1; if (!arr0.push || !arr1.push) { return; } var arr0Len = arr0.length; var arr1Len = arr1.length; if (arr0Len !== arr1Len) { var isPreviousLarger = arr0Len > arr1Len; if (isPreviousLarger) { arr0.length = arr1Len; } else { for (var i = arr0Len; i < arr1Len; i++) { arr0.push(arrDim === 1 ? arr1[i] : arraySlice.call(arr1[i])); } } } var len2 = arr0[0] && arr0[0].length; for (var i = 0; i < arr0.length; i++) { if (arrDim === 1) { if (isNaN(arr0[i])) { arr0[i] = arr1[i]; } } else { for (var j = 0; j < len2; j++) { if (isNaN(arr0[i][j])) { arr0[i][j] = arr1[i][j]; } } } } } function cloneValue(value) { if (Object(core_util["isArrayLike"])(value)) { var len = value.length; if (Object(core_util["isArrayLike"])(value[0])) { var ret = []; for (var i = 0; i < len; i++) { ret.push(arraySlice.call(value[i])); } return ret; } return arraySlice.call(value); } return value; } function rgba2String(rgba) { rgba[0] = Math.floor(rgba[0]) || 0; rgba[1] = Math.floor(rgba[1]) || 0; rgba[2] = Math.floor(rgba[2]) || 0; rgba[3] = rgba[3] == null ? 1 : rgba[3]; return 'rgba(' + rgba.join(',') + ')'; } function guessArrayDim(value) { return Object(core_util["isArrayLike"])(value && value[0]) ? 2 : 1; } var VALUE_TYPE_NUMBER = 0; var VALUE_TYPE_1D_ARRAY = 1; var VALUE_TYPE_2D_ARRAY = 2; var VALUE_TYPE_COLOR = 3; var VALUE_TYPE_LINEAR_GRADIENT = 4; var VALUE_TYPE_RADIAL_GRADIENT = 5; var VALUE_TYPE_UNKOWN = 6; function isGradientValueType(valType) { return valType === VALUE_TYPE_LINEAR_GRADIENT || valType === VALUE_TYPE_RADIAL_GRADIENT; } function isArrayValueType(valType) { return valType === VALUE_TYPE_1D_ARRAY || valType === VALUE_TYPE_2D_ARRAY; } var tmpRgba = [0, 0, 0, 0]; var Animator_Track = (function () { function Track(propName) { this.keyframes = []; this.discrete = false; this._invalid = false; this._needsSort = false; this._lastFr = 0; this._lastFrP = 0; this.propName = propName; } Track.prototype.isFinished = function () { return this._finished; }; Track.prototype.setFinished = function () { this._finished = true; if (this._additiveTrack) { this._additiveTrack.setFinished(); } }; Track.prototype.needsAnimate = function () { return this.keyframes.length >= 1; }; Track.prototype.getAdditiveTrack = function () { return this._additiveTrack; }; Track.prototype.addKeyframe = function (time, rawValue, easing) { this._needsSort = true; var keyframes = this.keyframes; var len = keyframes.length; var discrete = false; var valType = VALUE_TYPE_UNKOWN; var value = rawValue; if (Object(core_util["isArrayLike"])(rawValue)) { var arrayDim = guessArrayDim(rawValue); valType = arrayDim; if (arrayDim === 1 && !Object(core_util["isNumber"])(rawValue[0]) || arrayDim === 2 && !Object(core_util["isNumber"])(rawValue[0][0])) { discrete = true; } } else { if (Object(core_util["isNumber"])(rawValue) && !Object(core_util["eqNaN"])(rawValue)) { valType = VALUE_TYPE_NUMBER; } else if (Object(core_util["isString"])(rawValue)) { if (!isNaN(+rawValue)) { valType = VALUE_TYPE_NUMBER; } else { var colorArray = tool_color["parse"](rawValue); if (colorArray) { value = colorArray; valType = VALUE_TYPE_COLOR; } } } else if (Object(core_util["isGradientObject"])(rawValue)) { var parsedGradient = Object(core_util["extend"])({}, value); parsedGradient.colorStops = Object(core_util["map"])(rawValue.colorStops, function (colorStop) { return ({ offset: colorStop.offset, color: tool_color["parse"](colorStop.color) }); }); if (Object(helper["m" /* isLinearGradient */])(rawValue)) { valType = VALUE_TYPE_LINEAR_GRADIENT; } else if (Object(helper["o" /* isRadialGradient */])(rawValue)) { valType = VALUE_TYPE_RADIAL_GRADIENT; } value = parsedGradient; } } if (len === 0) { this.valType = valType; } else if (valType !== this.valType || valType === VALUE_TYPE_UNKOWN) { discrete = true; } this.discrete = this.discrete || discrete; var kf = { time: time, value: value, rawValue: rawValue, percent: 0 }; if (easing) { kf.easing = easing; kf.easingFunc = Object(core_util["isFunction"])(easing) ? easing : animation_easing[easing] || createCubicEasingFunc(easing); } keyframes.push(kf); return kf; }; Track.prototype.prepare = function (maxTime, additiveTrack) { var kfs = this.keyframes; if (this._needsSort) { kfs.sort(function (a, b) { return a.time - b.time; }); } var valType = this.valType; var kfsLen = kfs.length; var lastKf = kfs[kfsLen - 1]; var isDiscrete = this.discrete; var isArr = isArrayValueType(valType); var isGradient = isGradientValueType(valType); for (var i = 0; i < kfsLen; i++) { var kf = kfs[i]; var value = kf.value; var lastValue = lastKf.value; kf.percent = kf.time / maxTime; if (!isDiscrete) { if (isArr && i !== kfsLen - 1) { fillArray(value, lastValue, valType); } else if (isGradient) { fillColorStops(value.colorStops, lastValue.colorStops); } } } if (!isDiscrete && valType !== VALUE_TYPE_RADIAL_GRADIENT && additiveTrack && this.needsAnimate() && additiveTrack.needsAnimate() && valType === additiveTrack.valType && !additiveTrack._finished) { this._additiveTrack = additiveTrack; var startValue = kfs[0].value; for (var i = 0; i < kfsLen; i++) { if (valType === VALUE_TYPE_NUMBER) { kfs[i].additiveValue = kfs[i].value - startValue; } else if (valType === VALUE_TYPE_COLOR) { kfs[i].additiveValue = add1DArray([], kfs[i].value, startValue, -1); } else if (isArrayValueType(valType)) { kfs[i].additiveValue = valType === VALUE_TYPE_1D_ARRAY ? add1DArray([], kfs[i].value, startValue, -1) : add2DArray([], kfs[i].value, startValue, -1); } } } }; Track.prototype.step = function (target, percent) { if (this._finished) { return; } if (this._additiveTrack && this._additiveTrack._finished) { this._additiveTrack = null; } var isAdditive = this._additiveTrack != null; var valueKey = isAdditive ? 'additiveValue' : 'value'; var valType = this.valType; var keyframes = this.keyframes; var kfsNum = keyframes.length; var propName = this.propName; var isValueColor = valType === VALUE_TYPE_COLOR; var frameIdx; var lastFrame = this._lastFr; var mathMin = Math.min; var frame; var nextFrame; if (kfsNum === 1) { frame = nextFrame = keyframes[0]; } else { if (percent < 0) { frameIdx = 0; } else if (percent < this._lastFrP) { var start = mathMin(lastFrame + 1, kfsNum - 1); for (frameIdx = start; frameIdx >= 0; frameIdx--) { if (keyframes[frameIdx].percent <= percent) { break; } } frameIdx = mathMin(frameIdx, kfsNum - 2); } else { for (frameIdx = lastFrame; frameIdx < kfsNum; frameIdx++) { if (keyframes[frameIdx].percent > percent) { break; } } frameIdx = mathMin(frameIdx - 1, kfsNum - 2); } nextFrame = keyframes[frameIdx + 1]; frame = keyframes[frameIdx]; } if (!(frame && nextFrame)) { return; } this._lastFr = frameIdx; this._lastFrP = percent; var interval = (nextFrame.percent - frame.percent); var w = interval === 0 ? 1 : mathMin((percent - frame.percent) / interval, 1); if (nextFrame.easingFunc) { w = nextFrame.easingFunc(w); } var targetArr = isAdditive ? this._additiveValue : (isValueColor ? tmpRgba : target[propName]); if ((isArrayValueType(valType) || isValueColor) && !targetArr) { targetArr = this._additiveValue = []; } if (this.discrete) { target[propName] = w < 1 ? frame.rawValue : nextFrame.rawValue; } else if (isArrayValueType(valType)) { valType === VALUE_TYPE_1D_ARRAY ? interpolate1DArray(targetArr, frame[valueKey], nextFrame[valueKey], w) : interpolate2DArray(targetArr, frame[valueKey], nextFrame[valueKey], w); } else if (isGradientValueType(valType)) { var val = frame[valueKey]; var nextVal_1 = nextFrame[valueKey]; var isLinearGradient_1 = valType === VALUE_TYPE_LINEAR_GRADIENT; target[propName] = { type: isLinearGradient_1 ? 'linear' : 'radial', x: interpolateNumber(val.x, nextVal_1.x, w), y: interpolateNumber(val.y, nextVal_1.y, w), colorStops: Object(core_util["map"])(val.colorStops, function (colorStop, idx) { var nextColorStop = nextVal_1.colorStops[idx]; return { offset: interpolateNumber(colorStop.offset, nextColorStop.offset, w), color: rgba2String(interpolate1DArray([], colorStop.color, nextColorStop.color, w)) }; }), global: nextVal_1.global }; if (isLinearGradient_1) { target[propName].x2 = interpolateNumber(val.x2, nextVal_1.x2, w); target[propName].y2 = interpolateNumber(val.y2, nextVal_1.y2, w); } else { target[propName].r = interpolateNumber(val.r, nextVal_1.r, w); } } else if (isValueColor) { interpolate1DArray(targetArr, frame[valueKey], nextFrame[valueKey], w); if (!isAdditive) { target[propName] = rgba2String(targetArr); } } else { var value = interpolateNumber(frame[valueKey], nextFrame[valueKey], w); if (isAdditive) { this._additiveValue = value; } else { target[propName] = value; } } if (isAdditive) { this._addToTarget(target); } }; Track.prototype._addToTarget = function (target) { var valType = this.valType; var propName = this.propName; var additiveValue = this._additiveValue; if (valType === VALUE_TYPE_NUMBER) { target[propName] = target[propName] + additiveValue; } else if (valType === VALUE_TYPE_COLOR) { tool_color["parse"](target[propName], tmpRgba); add1DArray(tmpRgba, tmpRgba, additiveValue, 1); target[propName] = rgba2String(tmpRgba); } else if (valType === VALUE_TYPE_1D_ARRAY) { add1DArray(target[propName], target[propName], additiveValue, 1); } else if (valType === VALUE_TYPE_2D_ARRAY) { add2DArray(target[propName], target[propName], additiveValue, 1); } }; return Track; }()); var Animator_Animator = (function () { function Animator(target, loop, allowDiscreteAnimation, additiveTo) { this._tracks = {}; this._trackKeys = []; this._maxTime = 0; this._started = 0; this._clip = null; this._target = target; this._loop = loop; if (loop && additiveTo) { Object(core_util["logError"])('Can\' use additive animation on looped animation.'); return; } this._additiveAnimators = additiveTo; this._allowDiscrete = allowDiscreteAnimation; } Animator.prototype.getMaxTime = function () { return this._maxTime; }; Animator.prototype.getDelay = function () { return this._delay; }; Animator.prototype.getLoop = function () { return this._loop; }; Animator.prototype.getTarget = function () { return this._target; }; Animator.prototype.changeTarget = function (target) { this._target = target; }; Animator.prototype.when = function (time, props, easing) { return this.whenWithKeys(time, props, Object(core_util["keys"])(props), easing); }; Animator.prototype.whenWithKeys = function (time, props, propNames, easing) { var tracks = this._tracks; for (var i = 0; i < propNames.length; i++) { var propName = propNames[i]; var track = tracks[propName]; if (!track) { track = tracks[propName] = new Animator_Track(propName); var initialValue = void 0; var additiveTrack = this._getAdditiveTrack(propName); if (additiveTrack) { var addtiveTrackKfs = additiveTrack.keyframes; var lastFinalKf = addtiveTrackKfs[addtiveTrackKfs.length - 1]; initialValue = lastFinalKf && lastFinalKf.value; if (additiveTrack.valType === VALUE_TYPE_COLOR && initialValue) { initialValue = rgba2String(initialValue); } } else { initialValue = this._target[propName]; } if (initialValue == null) { continue; } if (time > 0) { track.addKeyframe(0, cloneValue(initialValue), easing); } this._trackKeys.push(propName); } track.addKeyframe(time, cloneValue(props[propName]), easing); } this._maxTime = Math.max(this._maxTime, time); return this; }; Animator.prototype.pause = function () { this._clip.pause(); this._paused = true; }; Animator.prototype.resume = function () { this._clip.resume(); this._paused = false; }; Animator.prototype.isPaused = function () { return !!this._paused; }; Animator.prototype.duration = function (duration) { this._maxTime = duration; this._force = true; return this; }; Animator.prototype._doneCallback = function () { this._setTracksFinished(); this._clip = null; var doneList = this._doneCbs; if (doneList) { var len = doneList.length; for (var i = 0; i < len; i++) { doneList[i].call(this); } } }; Animator.prototype._abortedCallback = function () { this._setTracksFinished(); var animation = this.animation; var abortedList = this._abortedCbs; if (animation) { animation.removeClip(this._clip); } this._clip = null; if (abortedList) { for (var i = 0; i < abortedList.length; i++) { abortedList[i].call(this); } } }; Animator.prototype._setTracksFinished = function () { var tracks = this._tracks; var tracksKeys = this._trackKeys; for (var i = 0; i < tracksKeys.length; i++) { tracks[tracksKeys[i]].setFinished(); } }; Animator.prototype._getAdditiveTrack = function (trackName) { var additiveTrack; var additiveAnimators = this._additiveAnimators; if (additiveAnimators) { for (var i = 0; i < additiveAnimators.length; i++) { var track = additiveAnimators[i].getTrack(trackName); if (track) { additiveTrack = track; } } } return additiveTrack; }; Animator.prototype.start = function (easing) { if (this._started > 0) { return; } this._started = 1; var self = this; var tracks = []; var maxTime = this._maxTime || 0; for (var i = 0; i < this._trackKeys.length; i++) { var propName = this._trackKeys[i]; var track = this._tracks[propName]; var additiveTrack = this._getAdditiveTrack(propName); var kfs = track.keyframes; var kfsNum = kfs.length; track.prepare(maxTime, additiveTrack); if (track.needsAnimate()) { if (!this._allowDiscrete && track.discrete) { var lastKf = kfs[kfsNum - 1]; if (lastKf) { self._target[track.propName] = lastKf.rawValue; } track.setFinished(); } else { tracks.push(track); } } } if (tracks.length || this._force) { var clip = new animation_Clip({ life: maxTime, loop: this._loop, delay: this._delay || 0, onframe: function (percent) { self._started = 2; var additiveAnimators = self._additiveAnimators; if (additiveAnimators) { var stillHasAdditiveAnimator = false; for (var i = 0; i < additiveAnimators.length; i++) { if (additiveAnimators[i]._clip) { stillHasAdditiveAnimator = true; break; } } if (!stillHasAdditiveAnimator) { self._additiveAnimators = null; } } for (var i = 0; i < tracks.length; i++) { tracks[i].step(self._target, percent); } var onframeList = self._onframeCbs; if (onframeList) { for (var i = 0; i < onframeList.length; i++) { onframeList[i](self._target, percent); } } }, ondestroy: function () { self._doneCallback(); } }); this._clip = clip; if (this.animation) { this.animation.addClip(clip); } if (easing) { clip.setEasing(easing); } } else { this._doneCallback(); } return this; }; Animator.prototype.stop = function (forwardToLast) { if (!this._clip) { return; } var clip = this._clip; if (forwardToLast) { clip.onframe(1); } this._abortedCallback(); }; Animator.prototype.delay = function (time) { this._delay = time; return this; }; Animator.prototype.during = function (cb) { if (cb) { if (!this._onframeCbs) { this._onframeCbs = []; } this._onframeCbs.push(cb); } return this; }; Animator.prototype.done = function (cb) { if (cb) { if (!this._doneCbs) { this._doneCbs = []; } this._doneCbs.push(cb); } return this; }; Animator.prototype.aborted = function (cb) { if (cb) { if (!this._abortedCbs) { this._abortedCbs = []; } this._abortedCbs.push(cb); } return this; }; Animator.prototype.getClip = function () { return this._clip; }; Animator.prototype.getTrack = function (propName) { return this._tracks[propName]; }; Animator.prototype.getTracks = function () { var _this = this; return Object(core_util["map"])(this._trackKeys, function (key) { return _this._tracks[key]; }); }; Animator.prototype.stopTracks = function (propNames, forwardToLast) { if (!propNames.length || !this._clip) { return true; } var tracks = this._tracks; var tracksKeys = this._trackKeys; for (var i = 0; i < propNames.length; i++) { var track = tracks[propNames[i]]; if (track && !track.isFinished()) { if (forwardToLast) { track.step(this._target, 1); } else if (this._started === 1) { track.step(this._target, 0); } track.setFinished(); } } var allAborted = true; for (var i = 0; i < tracksKeys.length; i++) { if (!tracks[tracksKeys[i]].isFinished()) { allAborted = false; break; } } if (allAborted) { this._abortedCallback(); } return allAborted; }; Animator.prototype.saveTo = function (target, trackKeys, firstOrLast) { if (!target) { return; } trackKeys = trackKeys || this._trackKeys; for (var i = 0; i < trackKeys.length; i++) { var propName = trackKeys[i]; var track = this._tracks[propName]; if (!track || track.isFinished()) { continue; } var kfs = track.keyframes; var kf = kfs[firstOrLast ? 0 : kfs.length - 1]; if (kf) { target[propName] = cloneValue(kf.rawValue); } } }; Animator.prototype.__changeFinalValue = function (finalProps, trackKeys) { trackKeys = trackKeys || Object(core_util["keys"])(finalProps); for (var i = 0; i < trackKeys.length; i++) { var propName = trackKeys[i]; var track = this._tracks[propName]; if (!track) { continue; } var kfs = track.keyframes; if (kfs.length > 1) { var lastKf = kfs.pop(); track.addKeyframe(lastKf.time, finalProps[propName]); track.prepare(this._maxTime, track.getAdditiveTrack()); } } }; return Animator; }()); /* harmony default export */ var animation_Animator = (Animator_Animator); // CONCATENATED MODULE: ./node_modules/zrender/lib/animation/Animation.js function getTime() { return new Date().getTime(); } var Animation_Animation = (function (_super) { Object(tslib_es6["b" /* __extends */])(Animation, _super); function Animation(opts) { var _this = _super.call(this) || this; _this._running = false; _this._time = 0; _this._pausedTime = 0; _this._pauseStart = 0; _this._paused = false; opts = opts || {}; _this.stage = opts.stage || {}; return _this; } Animation.prototype.addClip = function (clip) { if (clip.animation) { this.removeClip(clip); } if (!this._head) { this._head = this._tail = clip; } else { this._tail.next = clip; clip.prev = this._tail; clip.next = null; this._tail = clip; } clip.animation = this; }; Animation.prototype.addAnimator = function (animator) { animator.animation = this; var clip = animator.getClip(); if (clip) { this.addClip(clip); } }; Animation.prototype.removeClip = function (clip) { if (!clip.animation) { return; } var prev = clip.prev; var next = clip.next; if (prev) { prev.next = next; } else { this._head = next; } if (next) { next.prev = prev; } else { this._tail = prev; } clip.next = clip.prev = clip.animation = null; }; Animation.prototype.removeAnimator = function (animator) { var clip = animator.getClip(); if (clip) { this.removeClip(clip); } animator.animation = null; }; Animation.prototype.update = function (notTriggerFrameAndStageUpdate) { var time = getTime() - this._pausedTime; var delta = time - this._time; var clip = this._head; while (clip) { var nextClip = clip.next; var finished = clip.step(time, delta); if (finished) { clip.ondestroy(); this.removeClip(clip); clip = nextClip; } else { clip = nextClip; } } this._time = time; if (!notTriggerFrameAndStageUpdate) { this.trigger('frame', delta); this.stage.update && this.stage.update(); } }; Animation.prototype._startLoop = function () { var self = this; this._running = true; function step() { if (self._running) { animation_requestAnimationFrame(step); !self._paused && self.update(); } } animation_requestAnimationFrame(step); }; Animation.prototype.start = function () { if (this._running) { return; } this._time = getTime(); this._pausedTime = 0; this._startLoop(); }; Animation.prototype.stop = function () { this._running = false; }; Animation.prototype.pause = function () { if (!this._paused) { this._pauseStart = getTime(); this._paused = true; } }; Animation.prototype.resume = function () { if (this._paused) { this._pausedTime += getTime() - this._pauseStart; this._paused = false; } }; Animation.prototype.clear = function () { var clip = this._head; while (clip) { var nextClip = clip.next; clip.prev = clip.next = clip.animation = null; clip = nextClip; } this._head = this._tail = null; }; Animation.prototype.isFinished = function () { return this._head == null; }; Animation.prototype.animate = function (target, options) { options = options || {}; this.start(); var animator = new animation_Animator(target, options.loop); this.addAnimator(animator); return animator; }; return Animation; }(core_Eventful)); /* harmony default export */ var animation_Animation = (Animation_Animation); // CONCATENATED MODULE: ./node_modules/zrender/lib/dom/HandlerProxy.js var TOUCH_CLICK_DELAY = 300; var globalEventSupported = core_env["a" /* default */].domSupported; var localNativeListenerNames = (function () { var mouseHandlerNames = [ 'click', 'dblclick', 'mousewheel', 'wheel', 'mouseout', 'mouseup', 'mousedown', 'mousemove', 'contextmenu' ]; var touchHandlerNames = [ 'touchstart', 'touchend', 'touchmove' ]; var pointerEventNameMap = { pointerdown: 1, pointerup: 1, pointermove: 1, pointerout: 1 }; var pointerHandlerNames = core_util["map"](mouseHandlerNames, function (name) { var nm = name.replace('mouse', 'pointer'); return pointerEventNameMap.hasOwnProperty(nm) ? nm : name; }); return { mouse: mouseHandlerNames, touch: touchHandlerNames, pointer: pointerHandlerNames }; })(); var globalNativeListenerNames = { mouse: ['mousemove', 'mouseup'], pointer: ['pointermove', 'pointerup'] }; var wheelEventSupported = false; function isPointerFromTouch(event) { var pointerType = event.pointerType; return pointerType === 'pen' || pointerType === 'touch'; } function setTouchTimer(scope) { scope.touching = true; if (scope.touchTimer != null) { clearTimeout(scope.touchTimer); scope.touchTimer = null; } scope.touchTimer = setTimeout(function () { scope.touching = false; scope.touchTimer = null; }, 700); } function markTouch(event) { event && (event.zrByTouch = true); } function normalizeGlobalEvent(instance, event) { return normalizeEvent(instance.dom, new HandlerProxy_FakeGlobalEvent(instance, event), true); } function isLocalEl(instance, el) { var elTmp = el; var isLocal = false; while (elTmp && elTmp.nodeType !== 9 && !(isLocal = elTmp.domBelongToZr || (elTmp !== el && elTmp === instance.painterRoot))) { elTmp = elTmp.parentNode; } return isLocal; } var HandlerProxy_FakeGlobalEvent = (function () { function FakeGlobalEvent(instance, event) { this.stopPropagation = core_util["noop"]; this.stopImmediatePropagation = core_util["noop"]; this.preventDefault = core_util["noop"]; this.type = event.type; this.target = this.currentTarget = instance.dom; this.pointerType = event.pointerType; this.clientX = event.clientX; this.clientY = event.clientY; } return FakeGlobalEvent; }()); var localDOMHandlers = { mousedown: function (event) { event = normalizeEvent(this.dom, event); this.__mayPointerCapture = [event.zrX, event.zrY]; this.trigger('mousedown', event); }, mousemove: function (event) { event = normalizeEvent(this.dom, event); var downPoint = this.__mayPointerCapture; if (downPoint && (event.zrX !== downPoint[0] || event.zrY !== downPoint[1])) { this.__togglePointerCapture(true); } this.trigger('mousemove', event); }, mouseup: function (event) { event = normalizeEvent(this.dom, event); this.__togglePointerCapture(false); this.trigger('mouseup', event); }, mouseout: function (event) { event = normalizeEvent(this.dom, event); var element = event.toElement || event.relatedTarget; if (!isLocalEl(this, element)) { if (this.__pointerCapturing) { event.zrEventControl = 'no_globalout'; } this.trigger('mouseout', event); } }, wheel: function (event) { wheelEventSupported = true; event = normalizeEvent(this.dom, event); this.trigger('mousewheel', event); }, mousewheel: function (event) { if (wheelEventSupported) { return; } event = normalizeEvent(this.dom, event); this.trigger('mousewheel', event); }, touchstart: function (event) { event = normalizeEvent(this.dom, event); markTouch(event); this.__lastTouchMoment = new Date(); this.handler.processGesture(event, 'start'); localDOMHandlers.mousemove.call(this, event); localDOMHandlers.mousedown.call(this, event); }, touchmove: function (event) { event = normalizeEvent(this.dom, event); markTouch(event); this.handler.processGesture(event, 'change'); localDOMHandlers.mousemove.call(this, event); }, touchend: function (event) { event = normalizeEvent(this.dom, event); markTouch(event); this.handler.processGesture(event, 'end'); localDOMHandlers.mouseup.call(this, event); if (+new Date() - (+this.__lastTouchMoment) < TOUCH_CLICK_DELAY) { localDOMHandlers.click.call(this, event); } }, pointerdown: function (event) { localDOMHandlers.mousedown.call(this, event); }, pointermove: function (event) { if (!isPointerFromTouch(event)) { localDOMHandlers.mousemove.call(this, event); } }, pointerup: function (event) { localDOMHandlers.mouseup.call(this, event); }, pointerout: function (event) { if (!isPointerFromTouch(event)) { localDOMHandlers.mouseout.call(this, event); } } }; core_util["each"](['click', 'dblclick', 'contextmenu'], function (name) { localDOMHandlers[name] = function (event) { event = normalizeEvent(this.dom, event); this.trigger(name, event); }; }); var globalDOMHandlers = { pointermove: function (event) { if (!isPointerFromTouch(event)) { globalDOMHandlers.mousemove.call(this, event); } }, pointerup: function (event) { globalDOMHandlers.mouseup.call(this, event); }, mousemove: function (event) { this.trigger('mousemove', event); }, mouseup: function (event) { var pointerCaptureReleasing = this.__pointerCapturing; this.__togglePointerCapture(false); this.trigger('mouseup', event); if (pointerCaptureReleasing) { event.zrEventControl = 'only_globalout'; this.trigger('mouseout', event); } } }; function mountLocalDOMEventListeners(instance, scope) { var domHandlers = scope.domHandlers; if (core_env["a" /* default */].pointerEventsSupported) { core_util["each"](localNativeListenerNames.pointer, function (nativeEventName) { mountSingleDOMEventListener(scope, nativeEventName, function (event) { domHandlers[nativeEventName].call(instance, event); }); }); } else { if (core_env["a" /* default */].touchEventsSupported) { core_util["each"](localNativeListenerNames.touch, function (nativeEventName) { mountSingleDOMEventListener(scope, nativeEventName, function (event) { domHandlers[nativeEventName].call(instance, event); setTouchTimer(scope); }); }); } core_util["each"](localNativeListenerNames.mouse, function (nativeEventName) { mountSingleDOMEventListener(scope, nativeEventName, function (event) { event = getNativeEvent(event); if (!scope.touching) { domHandlers[nativeEventName].call(instance, event); } }); }); } } function mountGlobalDOMEventListeners(instance, scope) { if (core_env["a" /* default */].pointerEventsSupported) { core_util["each"](globalNativeListenerNames.pointer, mount); } else if (!core_env["a" /* default */].touchEventsSupported) { core_util["each"](globalNativeListenerNames.mouse, mount); } function mount(nativeEventName) { function nativeEventListener(event) { event = getNativeEvent(event); if (!isLocalEl(instance, event.target)) { event = normalizeGlobalEvent(instance, event); scope.domHandlers[nativeEventName].call(instance, event); } } mountSingleDOMEventListener(scope, nativeEventName, nativeEventListener, { capture: true }); } } function mountSingleDOMEventListener(scope, nativeEventName, listener, opt) { scope.mounted[nativeEventName] = listener; scope.listenerOpts[nativeEventName] = opt; addEventListener(scope.domTarget, nativeEventName, listener, opt); } function unmountDOMEventListeners(scope) { var mounted = scope.mounted; for (var nativeEventName in mounted) { if (mounted.hasOwnProperty(nativeEventName)) { removeEventListener(scope.domTarget, nativeEventName, mounted[nativeEventName], scope.listenerOpts[nativeEventName]); } } scope.mounted = {}; } var DOMHandlerScope = (function () { function DOMHandlerScope(domTarget, domHandlers) { this.mounted = {}; this.listenerOpts = {}; this.touching = false; this.domTarget = domTarget; this.domHandlers = domHandlers; } return DOMHandlerScope; }()); var HandlerProxy_HandlerDomProxy = (function (_super) { Object(tslib_es6["b" /* __extends */])(HandlerDomProxy, _super); function HandlerDomProxy(dom, painterRoot) { var _this = _super.call(this) || this; _this.__pointerCapturing = false; _this.dom = dom; _this.painterRoot = painterRoot; _this._localHandlerScope = new DOMHandlerScope(dom, localDOMHandlers); if (globalEventSupported) { _this._globalHandlerScope = new DOMHandlerScope(document, globalDOMHandlers); } mountLocalDOMEventListeners(_this, _this._localHandlerScope); return _this; } HandlerDomProxy.prototype.dispose = function () { unmountDOMEventListeners(this._localHandlerScope); if (globalEventSupported) { unmountDOMEventListeners(this._globalHandlerScope); } }; HandlerDomProxy.prototype.setCursor = function (cursorStyle) { this.dom.style && (this.dom.style.cursor = cursorStyle || 'default'); }; HandlerDomProxy.prototype.__togglePointerCapture = function (isPointerCapturing) { this.__mayPointerCapture = null; if (globalEventSupported && ((+this.__pointerCapturing) ^ (+isPointerCapturing))) { this.__pointerCapturing = isPointerCapturing; var globalHandlerScope = this._globalHandlerScope; isPointerCapturing ? mountGlobalDOMEventListeners(this, globalHandlerScope) : unmountDOMEventListeners(globalHandlerScope); } }; return HandlerDomProxy; }(core_Eventful)); /* harmony default export */ var HandlerProxy = (HandlerProxy_HandlerDomProxy); // CONCATENATED MODULE: ./node_modules/zrender/lib/config.js var config_dpr = 1; if (core_env["a" /* default */].hasGlobalWindow) { config_dpr = Math.max(window.devicePixelRatio || (window.screen && window.screen.deviceXDPI / window.screen.logicalXDPI) || 1, 1); } var debugMode = 0; var devicePixelRatio = config_dpr; var DARK_MODE_THRESHOLD = 0.4; var DARK_LABEL_COLOR = '#333'; var LIGHT_LABEL_COLOR = '#ccc'; var LIGHTER_LABEL_COLOR = '#eee'; // CONCATENATED MODULE: ./node_modules/zrender/lib/core/Transformable.js var mIdentity = identity; var Transformable_EPSILON = 5e-5; function Transformable_isNotAroundZero(val) { return val > Transformable_EPSILON || val < -Transformable_EPSILON; } var scaleTmp = []; var tmpTransform = []; var originTransform = matrix_create(); var Transformable_abs = Math.abs; var Transformable_Transformable = (function () { function Transformable() { } Transformable.prototype.getLocalTransform = function (m) { return Transformable.getLocalTransform(this, m); }; Transformable.prototype.setPosition = function (arr) { this.x = arr[0]; this.y = arr[1]; }; Transformable.prototype.setScale = function (arr) { this.scaleX = arr[0]; this.scaleY = arr[1]; }; Transformable.prototype.setSkew = function (arr) { this.skewX = arr[0]; this.skewY = arr[1]; }; Transformable.prototype.setOrigin = function (arr) { this.originX = arr[0]; this.originY = arr[1]; }; Transformable.prototype.needLocalTransform = function () { return Transformable_isNotAroundZero(this.rotation) || Transformable_isNotAroundZero(this.x) || Transformable_isNotAroundZero(this.y) || Transformable_isNotAroundZero(this.scaleX - 1) || Transformable_isNotAroundZero(this.scaleY - 1) || Transformable_isNotAroundZero(this.skewX) || Transformable_isNotAroundZero(this.skewY); }; Transformable.prototype.updateTransform = function () { var parentTransform = this.parent && this.parent.transform; var needLocalTransform = this.needLocalTransform(); var m = this.transform; if (!(needLocalTransform || parentTransform)) { if (m) { mIdentity(m); this.invTransform = null; } return; } m = m || matrix_create(); if (needLocalTransform) { this.getLocalTransform(m); } else { mIdentity(m); } if (parentTransform) { if (needLocalTransform) { matrix_mul(m, parentTransform, m); } else { matrix_copy(m, parentTransform); } } this.transform = m; this._resolveGlobalScaleRatio(m); }; Transformable.prototype._resolveGlobalScaleRatio = function (m) { var globalScaleRatio = this.globalScaleRatio; if (globalScaleRatio != null && globalScaleRatio !== 1) { this.getGlobalScale(scaleTmp); var relX = scaleTmp[0] < 0 ? -1 : 1; var relY = scaleTmp[1] < 0 ? -1 : 1; var sx = ((scaleTmp[0] - relX) * globalScaleRatio + relX) / scaleTmp[0] || 0; var sy = ((scaleTmp[1] - relY) * globalScaleRatio + relY) / scaleTmp[1] || 0; m[0] *= sx; m[1] *= sx; m[2] *= sy; m[3] *= sy; } this.invTransform = this.invTransform || matrix_create(); matrix_invert(this.invTransform, m); }; Transformable.prototype.getComputedTransform = function () { var transformNode = this; var ancestors = []; while (transformNode) { ancestors.push(transformNode); transformNode = transformNode.parent; } while (transformNode = ancestors.pop()) { transformNode.updateTransform(); } return this.transform; }; Transformable.prototype.setLocalTransform = function (m) { if (!m) { return; } var sx = m[0] * m[0] + m[1] * m[1]; var sy = m[2] * m[2] + m[3] * m[3]; var rotation = Math.atan2(m[1], m[0]); var shearX = Math.PI / 2 + rotation - Math.atan2(m[3], m[2]); sy = Math.sqrt(sy) * Math.cos(shearX); sx = Math.sqrt(sx); this.skewX = shearX; this.skewY = 0; this.rotation = -rotation; this.x = +m[4]; this.y = +m[5]; this.scaleX = sx; this.scaleY = sy; this.originX = 0; this.originY = 0; }; Transformable.prototype.decomposeTransform = function () { if (!this.transform) { return; } var parent = this.parent; var m = this.transform; if (parent && parent.transform) { parent.invTransform = parent.invTransform || matrix_create(); matrix_mul(tmpTransform, parent.invTransform, m); m = tmpTransform; } var ox = this.originX; var oy = this.originY; if (ox || oy) { originTransform[4] = ox; originTransform[5] = oy; matrix_mul(tmpTransform, m, originTransform); tmpTransform[4] -= ox; tmpTransform[5] -= oy; m = tmpTransform; } this.setLocalTransform(m); }; Transformable.prototype.getGlobalScale = function (out) { var m = this.transform; out = out || []; if (!m) { out[0] = 1; out[1] = 1; return out; } out[0] = Math.sqrt(m[0] * m[0] + m[1] * m[1]); out[1] = Math.sqrt(m[2] * m[2] + m[3] * m[3]); if (m[0] < 0) { out[0] = -out[0]; } if (m[3] < 0) { out[1] = -out[1]; } return out; }; Transformable.prototype.transformCoordToLocal = function (x, y) { var v2 = [x, y]; var invTransform = this.invTransform; if (invTransform) { applyTransform(v2, v2, invTransform); } return v2; }; Transformable.prototype.transformCoordToGlobal = function (x, y) { var v2 = [x, y]; var transform = this.transform; if (transform) { applyTransform(v2, v2, transform); } return v2; }; Transformable.prototype.getLineScale = function () { var m = this.transform; return m && Transformable_abs(m[0] - 1) > 1e-10 && Transformable_abs(m[3] - 1) > 1e-10 ? Math.sqrt(Transformable_abs(m[0] * m[3] - m[2] * m[1])) : 1; }; Transformable.prototype.copyTransform = function (source) { copyTransform(this, source); }; Transformable.getLocalTransform = function (target, m) { m = m || []; var ox = target.originX || 0; var oy = target.originY || 0; var sx = target.scaleX; var sy = target.scaleY; var ax = target.anchorX; var ay = target.anchorY; var rotation = target.rotation || 0; var x = target.x; var y = target.y; var skewX = target.skewX ? Math.tan(target.skewX) : 0; var skewY = target.skewY ? Math.tan(-target.skewY) : 0; if (ox || oy || ax || ay) { var dx = ox + ax; var dy = oy + ay; m[4] = -dx * sx - skewX * dy * sy; m[5] = -dy * sy - skewY * dx * sx; } else { m[4] = m[5] = 0; } m[0] = sx; m[3] = sy; m[1] = skewY * sx; m[2] = skewX * sy; rotation && matrix_rotate(m, m, rotation); m[4] += ox + x; m[5] += oy + y; return m; }; Transformable.initDefaultProps = (function () { var proto = Transformable.prototype; proto.scaleX = proto.scaleY = proto.globalScaleRatio = 1; proto.x = proto.y = proto.originX = proto.originY = proto.skewX = proto.skewY = proto.rotation = proto.anchorX = proto.anchorY = 0; })(); return Transformable; }()); ; var TRANSFORMABLE_PROPS = [ 'x', 'y', 'originX', 'originY', 'anchorX', 'anchorY', 'rotation', 'scaleX', 'scaleY', 'skewX', 'skewY' ]; function copyTransform(target, source) { for (var i = 0; i < TRANSFORMABLE_PROPS.length; i++) { var propName = TRANSFORMABLE_PROPS[i]; target[propName] = source[propName]; } } /* harmony default export */ var core_Transformable = (Transformable_Transformable); // EXTERNAL MODULE: ./node_modules/zrender/lib/core/LRU.js var LRU = __webpack_require__("zMj2"); // EXTERNAL MODULE: ./node_modules/zrender/lib/core/platform.js var platform = __webpack_require__("OwOc"); // CONCATENATED MODULE: ./node_modules/zrender/lib/contain/text.js var textWidthCache = {}; function getWidth(text, font) { font = font || platform["a" /* DEFAULT_FONT */]; var cacheOfFont = textWidthCache[font]; if (!cacheOfFont) { cacheOfFont = textWidthCache[font] = new LRU["a" /* default */](500); } var width = cacheOfFont.get(text); if (width == null) { width = platform["d" /* platformApi */].measureText(text, font).width; cacheOfFont.put(text, width); } return width; } function innerGetBoundingRect(text, font, textAlign, textBaseline) { var width = getWidth(text, font); var height = getLineHeight(font); var x = adjustTextX(0, width, textAlign); var y = adjustTextY(0, height, textBaseline); var rect = new core_BoundingRect(x, y, width, height); return rect; } function getBoundingRect(text, font, textAlign, textBaseline) { var textLines = ((text || '') + '').split('\n'); var len = textLines.length; if (len === 1) { return innerGetBoundingRect(textLines[0], font, textAlign, textBaseline); } else { var uniondRect = new core_BoundingRect(0, 0, 0, 0); for (var i = 0; i < textLines.length; i++) { var rect = innerGetBoundingRect(textLines[i], font, textAlign, textBaseline); i === 0 ? uniondRect.copy(rect) : uniondRect.union(rect); } return uniondRect; } } function adjustTextX(x, width, textAlign) { if (textAlign === 'right') { x -= width; } else if (textAlign === 'center') { x -= width / 2; } return x; } function adjustTextY(y, height, verticalAlign) { if (verticalAlign === 'middle') { y -= height / 2; } else if (verticalAlign === 'bottom') { y -= height; } return y; } function getLineHeight(font) { return getWidth('国', font); } function measureText(text, font) { return platform["d" /* platformApi */].measureText(text, font); } function parsePercent(value, maxValue) { if (typeof value === 'string') { if (value.lastIndexOf('%') >= 0) { return parseFloat(value) / 100 * maxValue; } return parseFloat(value); } return value; } function calculateTextPosition(out, opts, rect) { var textPosition = opts.position || 'inside'; var distance = opts.distance != null ? opts.distance : 5; var height = rect.height; var width = rect.width; var halfHeight = height / 2; var x = rect.x; var y = rect.y; var textAlign = 'left'; var textVerticalAlign = 'top'; if (textPosition instanceof Array) { x += parsePercent(textPosition[0], rect.width); y += parsePercent(textPosition[1], rect.height); textAlign = null; textVerticalAlign = null; } else { switch (textPosition) { case 'left': x -= distance; y += halfHeight; textAlign = 'right'; textVerticalAlign = 'middle'; break; case 'right': x += distance + width; y += halfHeight; textVerticalAlign = 'middle'; break; case 'top': x += width / 2; y -= distance; textAlign = 'center'; textVerticalAlign = 'bottom'; break; case 'bottom': x += width / 2; y += height + distance; textAlign = 'center'; break; case 'inside': x += width / 2; y += halfHeight; textAlign = 'center'; textVerticalAlign = 'middle'; break; case 'insideLeft': x += distance; y += halfHeight; textVerticalAlign = 'middle'; break; case 'insideRight': x += width - distance; y += halfHeight; textAlign = 'right'; textVerticalAlign = 'middle'; break; case 'insideTop': x += width / 2; y += distance; textAlign = 'center'; break; case 'insideBottom': x += width / 2; y += height - distance; textAlign = 'center'; textVerticalAlign = 'bottom'; break; case 'insideTopLeft': x += distance; y += distance; break; case 'insideTopRight': x += width - distance; y += distance; textAlign = 'right'; break; case 'insideBottomLeft': x += distance; y += height - distance; textVerticalAlign = 'bottom'; break; case 'insideBottomRight': x += width - distance; y += height - distance; textAlign = 'right'; textVerticalAlign = 'bottom'; break; } } out = out || {}; out.x = x; out.y = y; out.align = textAlign; out.verticalAlign = textVerticalAlign; return out; } // CONCATENATED MODULE: ./node_modules/zrender/lib/Element.js var PRESERVED_NORMAL_STATE = '__zr_normal__'; var PRIMARY_STATES_KEYS = TRANSFORMABLE_PROPS.concat(['ignore']); var DEFAULT_ANIMATABLE_MAP = Object(core_util["reduce"])(TRANSFORMABLE_PROPS, function (obj, key) { obj[key] = true; return obj; }, { ignore: false }); var tmpTextPosCalcRes = {}; var tmpBoundingRect = new core_BoundingRect(0, 0, 0, 0); var Element_Element = (function () { function Element(props) { this.id = Object(core_util["guid"])(); this.animators = []; this.currentStates = []; this.states = {}; this._init(props); } Element.prototype._init = function (props) { this.attr(props); }; Element.prototype.drift = function (dx, dy, e) { switch (this.draggable) { case 'horizontal': dy = 0; break; case 'vertical': dx = 0; break; } var m = this.transform; if (!m) { m = this.transform = [1, 0, 0, 1, 0, 0]; } m[4] += dx; m[5] += dy; this.decomposeTransform(); this.markRedraw(); }; Element.prototype.beforeUpdate = function () { }; Element.prototype.afterUpdate = function () { }; Element.prototype.update = function () { this.updateTransform(); if (this.__dirty) { this.updateInnerText(); } }; Element.prototype.updateInnerText = function (forceUpdate) { var textEl = this._textContent; if (textEl && (!textEl.ignore || forceUpdate)) { if (!this.textConfig) { this.textConfig = {}; } var textConfig = this.textConfig; var isLocal = textConfig.local; var innerTransformable = textEl.innerTransformable; var textAlign = void 0; var textVerticalAlign = void 0; var textStyleChanged = false; innerTransformable.parent = isLocal ? this : null; var innerOrigin = false; innerTransformable.copyTransform(textEl); if (textConfig.position != null) { var layoutRect = tmpBoundingRect; if (textConfig.layoutRect) { layoutRect.copy(textConfig.layoutRect); } else { layoutRect.copy(this.getBoundingRect()); } if (!isLocal) { layoutRect.applyTransform(this.transform); } if (this.calculateTextPosition) { this.calculateTextPosition(tmpTextPosCalcRes, textConfig, layoutRect); } else { calculateTextPosition(tmpTextPosCalcRes, textConfig, layoutRect); } innerTransformable.x = tmpTextPosCalcRes.x; innerTransformable.y = tmpTextPosCalcRes.y; textAlign = tmpTextPosCalcRes.align; textVerticalAlign = tmpTextPosCalcRes.verticalAlign; var textOrigin = textConfig.origin; if (textOrigin && textConfig.rotation != null) { var relOriginX = void 0; var relOriginY = void 0; if (textOrigin === 'center') { relOriginX = layoutRect.width * 0.5; relOriginY = layoutRect.height * 0.5; } else { relOriginX = parsePercent(textOrigin[0], layoutRect.width); relOriginY = parsePercent(textOrigin[1], layoutRect.height); } innerOrigin = true; innerTransformable.originX = -innerTransformable.x + relOriginX + (isLocal ? 0 : layoutRect.x); innerTransformable.originY = -innerTransformable.y + relOriginY + (isLocal ? 0 : layoutRect.y); } } if (textConfig.rotation != null) { innerTransformable.rotation = textConfig.rotation; } var textOffset = textConfig.offset; if (textOffset) { innerTransformable.x += textOffset[0]; innerTransformable.y += textOffset[1]; if (!innerOrigin) { innerTransformable.originX = -textOffset[0]; innerTransformable.originY = -textOffset[1]; } } var isInside = textConfig.inside == null ? (typeof textConfig.position === 'string' && textConfig.position.indexOf('inside') >= 0) : textConfig.inside; var innerTextDefaultStyle = this._innerTextDefaultStyle || (this._innerTextDefaultStyle = {}); var textFill = void 0; var textStroke = void 0; var autoStroke = void 0; if (isInside && this.canBeInsideText()) { textFill = textConfig.insideFill; textStroke = textConfig.insideStroke; if (textFill == null || textFill === 'auto') { textFill = this.getInsideTextFill(); } if (textStroke == null || textStroke === 'auto') { textStroke = this.getInsideTextStroke(textFill); autoStroke = true; } } else { textFill = textConfig.outsideFill; textStroke = textConfig.outsideStroke; if (textFill == null || textFill === 'auto') { textFill = this.getOutsideFill(); } if (textStroke == null || textStroke === 'auto') { textStroke = this.getOutsideStroke(textFill); autoStroke = true; } } textFill = textFill || '#000'; if (textFill !== innerTextDefaultStyle.fill || textStroke !== innerTextDefaultStyle.stroke || autoStroke !== innerTextDefaultStyle.autoStroke || textAlign !== innerTextDefaultStyle.align || textVerticalAlign !== innerTextDefaultStyle.verticalAlign) { textStyleChanged = true; innerTextDefaultStyle.fill = textFill; innerTextDefaultStyle.stroke = textStroke; innerTextDefaultStyle.autoStroke = autoStroke; innerTextDefaultStyle.align = textAlign; innerTextDefaultStyle.verticalAlign = textVerticalAlign; textEl.setDefaultTextStyle(innerTextDefaultStyle); } textEl.__dirty |= REDRAW_BIT; if (textStyleChanged) { textEl.dirtyStyle(true); } } }; Element.prototype.canBeInsideText = function () { return true; }; Element.prototype.getInsideTextFill = function () { return '#fff'; }; Element.prototype.getInsideTextStroke = function (textFill) { return '#000'; }; Element.prototype.getOutsideFill = function () { return this.__zr && this.__zr.isDarkMode() ? LIGHT_LABEL_COLOR : DARK_LABEL_COLOR; }; Element.prototype.getOutsideStroke = function (textFill) { var backgroundColor = this.__zr && this.__zr.getBackgroundColor(); var colorArr = typeof backgroundColor === 'string' && Object(tool_color["parse"])(backgroundColor); if (!colorArr) { colorArr = [255, 255, 255, 1]; } var alpha = colorArr[3]; var isDark = this.__zr.isDarkMode(); for (var i = 0; i < 3; i++) { colorArr[i] = colorArr[i] * alpha + (isDark ? 0 : 255) * (1 - alpha); } colorArr[3] = 1; return Object(tool_color["stringify"])(colorArr, 'rgba'); }; Element.prototype.traverse = function (cb, context) { }; Element.prototype.attrKV = function (key, value) { if (key === 'textConfig') { this.setTextConfig(value); } else if (key === 'textContent') { this.setTextContent(value); } else if (key === 'clipPath') { this.setClipPath(value); } else if (key === 'extra') { this.extra = this.extra || {}; Object(core_util["extend"])(this.extra, value); } else { this[key] = value; } }; Element.prototype.hide = function () { this.ignore = true; this.markRedraw(); }; Element.prototype.show = function () { this.ignore = false; this.markRedraw(); }; Element.prototype.attr = function (keyOrObj, value) { if (typeof keyOrObj === 'string') { this.attrKV(keyOrObj, value); } else if (Object(core_util["isObject"])(keyOrObj)) { var obj = keyOrObj; var keysArr = Object(core_util["keys"])(obj); for (var i = 0; i < keysArr.length; i++) { var key = keysArr[i]; this.attrKV(key, keyOrObj[key]); } } this.markRedraw(); return this; }; Element.prototype.saveCurrentToNormalState = function (toState) { this._innerSaveToNormal(toState); var normalState = this._normalState; for (var i = 0; i < this.animators.length; i++) { var animator = this.animators[i]; var fromStateTransition = animator.__fromStateTransition; if (animator.getLoop() || fromStateTransition && fromStateTransition !== PRESERVED_NORMAL_STATE) { continue; } var targetName = animator.targetName; var target = targetName ? normalState[targetName] : normalState; animator.saveTo(target); } }; Element.prototype._innerSaveToNormal = function (toState) { var normalState = this._normalState; if (!normalState) { normalState = this._normalState = {}; } if (toState.textConfig && !normalState.textConfig) { normalState.textConfig = this.textConfig; } this._savePrimaryToNormal(toState, normalState, PRIMARY_STATES_KEYS); }; Element.prototype._savePrimaryToNormal = function (toState, normalState, primaryKeys) { for (var i = 0; i < primaryKeys.length; i++) { var key = primaryKeys[i]; if (toState[key] != null && !(key in normalState)) { normalState[key] = this[key]; } } }; Element.prototype.hasState = function () { return this.currentStates.length > 0; }; Element.prototype.getState = function (name) { return this.states[name]; }; Element.prototype.ensureState = function (name) { var states = this.states; if (!states[name]) { states[name] = {}; } return states[name]; }; Element.prototype.clearStates = function (noAnimation) { this.useState(PRESERVED_NORMAL_STATE, false, noAnimation); }; Element.prototype.useState = function (stateName, keepCurrentStates, noAnimation, forceUseHoverLayer) { var toNormalState = stateName === PRESERVED_NORMAL_STATE; var hasStates = this.hasState(); if (!hasStates && toNormalState) { return; } var currentStates = this.currentStates; var animationCfg = this.stateTransition; if (Object(core_util["indexOf"])(currentStates, stateName) >= 0 && (keepCurrentStates || currentStates.length === 1)) { return; } var state; if (this.stateProxy && !toNormalState) { state = this.stateProxy(stateName); } if (!state) { state = (this.states && this.states[stateName]); } if (!state && !toNormalState) { Object(core_util["logError"])("State " + stateName + " not exists."); return; } if (!toNormalState) { this.saveCurrentToNormalState(state); } var useHoverLayer = !!((state && state.hoverLayer) || forceUseHoverLayer); if (useHoverLayer) { this._toggleHoverLayerFlag(true); } this._applyStateObj(stateName, state, this._normalState, keepCurrentStates, !noAnimation && !this.__inHover && animationCfg && animationCfg.duration > 0, animationCfg); var textContent = this._textContent; var textGuide = this._textGuide; if (textContent) { textContent.useState(stateName, keepCurrentStates, noAnimation, useHoverLayer); } if (textGuide) { textGuide.useState(stateName, keepCurrentStates, noAnimation, useHoverLayer); } if (toNormalState) { this.currentStates = []; this._normalState = {}; } else { if (!keepCurrentStates) { this.currentStates = [stateName]; } else { this.currentStates.push(stateName); } } this._updateAnimationTargets(); this.markRedraw(); if (!useHoverLayer && this.__inHover) { this._toggleHoverLayerFlag(false); this.__dirty &= ~REDRAW_BIT; } return state; }; Element.prototype.useStates = function (states, noAnimation, forceUseHoverLayer) { if (!states.length) { this.clearStates(); } else { var stateObjects = []; var currentStates = this.currentStates; var len = states.length; var notChange = len === currentStates.length; if (notChange) { for (var i = 0; i < len; i++) { if (states[i] !== currentStates[i]) { notChange = false; break; } } } if (notChange) { return; } for (var i = 0; i < len; i++) { var stateName = states[i]; var stateObj = void 0; if (this.stateProxy) { stateObj = this.stateProxy(stateName, states); } if (!stateObj) { stateObj = this.states[stateName]; } if (stateObj) { stateObjects.push(stateObj); } } var lastStateObj = stateObjects[len - 1]; var useHoverLayer = !!((lastStateObj && lastStateObj.hoverLayer) || forceUseHoverLayer); if (useHoverLayer) { this._toggleHoverLayerFlag(true); } var mergedState = this._mergeStates(stateObjects); var animationCfg = this.stateTransition; this.saveCurrentToNormalState(mergedState); this._applyStateObj(states.join(','), mergedState, this._normalState, false, !noAnimation && !this.__inHover && animationCfg && animationCfg.duration > 0, animationCfg); var textContent = this._textContent; var textGuide = this._textGuide; if (textContent) { textContent.useStates(states, noAnimation, useHoverLayer); } if (textGuide) { textGuide.useStates(states, noAnimation, useHoverLayer); } this._updateAnimationTargets(); this.currentStates = states.slice(); this.markRedraw(); if (!useHoverLayer && this.__inHover) { this._toggleHoverLayerFlag(false); this.__dirty &= ~REDRAW_BIT; } } }; Element.prototype.isSilent = function () { var isSilent = this.silent; var ancestor = this.parent; while (!isSilent && ancestor) { if (ancestor.silent) { isSilent = true; break; } ancestor = ancestor.parent; } return isSilent; }; Element.prototype._updateAnimationTargets = function () { for (var i = 0; i < this.animators.length; i++) { var animator = this.animators[i]; if (animator.targetName) { animator.changeTarget(this[animator.targetName]); } } }; Element.prototype.removeState = function (state) { var idx = Object(core_util["indexOf"])(this.currentStates, state); if (idx >= 0) { var currentStates = this.currentStates.slice(); currentStates.splice(idx, 1); this.useStates(currentStates); } }; Element.prototype.replaceState = function (oldState, newState, forceAdd) { var currentStates = this.currentStates.slice(); var idx = Object(core_util["indexOf"])(currentStates, oldState); var newStateExists = Object(core_util["indexOf"])(currentStates, newState) >= 0; if (idx >= 0) { if (!newStateExists) { currentStates[idx] = newState; } else { currentStates.splice(idx, 1); } } else if (forceAdd && !newStateExists) { currentStates.push(newState); } this.useStates(currentStates); }; Element.prototype.toggleState = function (state, enable) { if (enable) { this.useState(state, true); } else { this.removeState(state); } }; Element.prototype._mergeStates = function (states) { var mergedState = {}; var mergedTextConfig; for (var i = 0; i < states.length; i++) { var state = states[i]; Object(core_util["extend"])(mergedState, state); if (state.textConfig) { mergedTextConfig = mergedTextConfig || {}; Object(core_util["extend"])(mergedTextConfig, state.textConfig); } } if (mergedTextConfig) { mergedState.textConfig = mergedTextConfig; } return mergedState; }; Element.prototype._applyStateObj = function (stateName, state, normalState, keepCurrentStates, transition, animationCfg) { var needsRestoreToNormal = !(state && keepCurrentStates); if (state && state.textConfig) { this.textConfig = Object(core_util["extend"])({}, keepCurrentStates ? this.textConfig : normalState.textConfig); Object(core_util["extend"])(this.textConfig, state.textConfig); } else if (needsRestoreToNormal) { if (normalState.textConfig) { this.textConfig = normalState.textConfig; } } var transitionTarget = {}; var hasTransition = false; for (var i = 0; i < PRIMARY_STATES_KEYS.length; i++) { var key = PRIMARY_STATES_KEYS[i]; var propNeedsTransition = transition && DEFAULT_ANIMATABLE_MAP[key]; if (state && state[key] != null) { if (propNeedsTransition) { hasTransition = true; transitionTarget[key] = state[key]; } else { this[key] = state[key]; } } else if (needsRestoreToNormal) { if (normalState[key] != null) { if (propNeedsTransition) { hasTransition = true; transitionTarget[key] = normalState[key]; } else { this[key] = normalState[key]; } } } } if (!transition) { for (var i = 0; i < this.animators.length; i++) { var animator = this.animators[i]; var targetName = animator.targetName; if (!animator.getLoop()) { animator.__changeFinalValue(targetName ? (state || normalState)[targetName] : (state || normalState)); } } } if (hasTransition) { this._transitionState(stateName, transitionTarget, animationCfg); } }; Element.prototype._attachComponent = function (componentEl) { if (componentEl.__zr && !componentEl.__hostTarget) { if (false) { throw new Error('Text element has been added to zrender.'); } return; } if (componentEl === this) { if (false) { throw new Error('Recursive component attachment.'); } return; } var zr = this.__zr; if (zr) { componentEl.addSelfToZr(zr); } componentEl.__zr = zr; componentEl.__hostTarget = this; }; Element.prototype._detachComponent = function (componentEl) { if (componentEl.__zr) { componentEl.removeSelfFromZr(componentEl.__zr); } componentEl.__zr = null; componentEl.__hostTarget = null; }; Element.prototype.getClipPath = function () { return this._clipPath; }; Element.prototype.setClipPath = function (clipPath) { if (this._clipPath && this._clipPath !== clipPath) { this.removeClipPath(); } this._attachComponent(clipPath); this._clipPath = clipPath; this.markRedraw(); }; Element.prototype.removeClipPath = function () { var clipPath = this._clipPath; if (clipPath) { this._detachComponent(clipPath); this._clipPath = null; this.markRedraw(); } }; Element.prototype.getTextContent = function () { return this._textContent; }; Element.prototype.setTextContent = function (textEl) { var previousTextContent = this._textContent; if (previousTextContent === textEl) { return; } if (previousTextContent && previousTextContent !== textEl) { this.removeTextContent(); } if (false) { if (textEl.__zr && !textEl.__hostTarget) { throw new Error('Text element has been added to zrender.'); } } textEl.innerTransformable = new core_Transformable(); this._attachComponent(textEl); this._textContent = textEl; this.markRedraw(); }; Element.prototype.setTextConfig = function (cfg) { if (!this.textConfig) { this.textConfig = {}; } Object(core_util["extend"])(this.textConfig, cfg); this.markRedraw(); }; Element.prototype.removeTextConfig = function () { this.textConfig = null; this.markRedraw(); }; Element.prototype.removeTextContent = function () { var textEl = this._textContent; if (textEl) { textEl.innerTransformable = null; this._detachComponent(textEl); this._textContent = null; this._innerTextDefaultStyle = null; this.markRedraw(); } }; Element.prototype.getTextGuideLine = function () { return this._textGuide; }; Element.prototype.setTextGuideLine = function (guideLine) { if (this._textGuide && this._textGuide !== guideLine) { this.removeTextGuideLine(); } this._attachComponent(guideLine); this._textGuide = guideLine; this.markRedraw(); }; Element.prototype.removeTextGuideLine = function () { var textGuide = this._textGuide; if (textGuide) { this._detachComponent(textGuide); this._textGuide = null; this.markRedraw(); } }; Element.prototype.markRedraw = function () { this.__dirty |= REDRAW_BIT; var zr = this.__zr; if (zr) { if (this.__inHover) { zr.refreshHover(); } else { zr.refresh(); } } if (this.__hostTarget) { this.__hostTarget.markRedraw(); } }; Element.prototype.dirty = function () { this.markRedraw(); }; Element.prototype._toggleHoverLayerFlag = function (inHover) { this.__inHover = inHover; var textContent = this._textContent; var textGuide = this._textGuide; if (textContent) { textContent.__inHover = inHover; } if (textGuide) { textGuide.__inHover = inHover; } }; Element.prototype.addSelfToZr = function (zr) { if (this.__zr === zr) { return; } this.__zr = zr; var animators = this.animators; if (animators) { for (var i = 0; i < animators.length; i++) { zr.animation.addAnimator(animators[i]); } } if (this._clipPath) { this._clipPath.addSelfToZr(zr); } if (this._textContent) { this._textContent.addSelfToZr(zr); } if (this._textGuide) { this._textGuide.addSelfToZr(zr); } }; Element.prototype.removeSelfFromZr = function (zr) { if (!this.__zr) { return; } this.__zr = null; var animators = this.animators; if (animators) { for (var i = 0; i < animators.length; i++) { zr.animation.removeAnimator(animators[i]); } } if (this._clipPath) { this._clipPath.removeSelfFromZr(zr); } if (this._textContent) { this._textContent.removeSelfFromZr(zr); } if (this._textGuide) { this._textGuide.removeSelfFromZr(zr); } }; Element.prototype.animate = function (key, loop, allowDiscreteAnimation) { var target = key ? this[key] : this; if (false) { if (!target) { logError('Property "' + key + '" is not existed in element ' + this.id); return; } } var animator = new animation_Animator(target, loop, allowDiscreteAnimation); key && (animator.targetName = key); this.addAnimator(animator, key); return animator; }; Element.prototype.addAnimator = function (animator, key) { var zr = this.__zr; var el = this; animator.during(function () { el.updateDuringAnimation(key); }).done(function () { var animators = el.animators; var idx = Object(core_util["indexOf"])(animators, animator); if (idx >= 0) { animators.splice(idx, 1); } }); this.animators.push(animator); if (zr) { zr.animation.addAnimator(animator); } zr && zr.wakeUp(); }; Element.prototype.updateDuringAnimation = function (key) { this.markRedraw(); }; Element.prototype.stopAnimation = function (scope, forwardToLast) { var animators = this.animators; var len = animators.length; var leftAnimators = []; for (var i = 0; i < len; i++) { var animator = animators[i]; if (!scope || scope === animator.scope) { animator.stop(forwardToLast); } else { leftAnimators.push(animator); } } this.animators = leftAnimators; return this; }; Element.prototype.animateTo = function (target, cfg, animationProps) { animateTo(this, target, cfg, animationProps); }; Element.prototype.animateFrom = function (target, cfg, animationProps) { animateTo(this, target, cfg, animationProps, true); }; Element.prototype._transitionState = function (stateName, target, cfg, animationProps) { var animators = animateTo(this, target, cfg, animationProps); for (var i = 0; i < animators.length; i++) { animators[i].__fromStateTransition = stateName; } }; Element.prototype.getBoundingRect = function () { return null; }; Element.prototype.getPaintRect = function () { return null; }; Element.initDefaultProps = (function () { var elProto = Element.prototype; elProto.type = 'element'; elProto.name = ''; elProto.ignore = elProto.silent = elProto.isGroup = elProto.draggable = elProto.dragging = elProto.ignoreClip = elProto.__inHover = false; elProto.__dirty = REDRAW_BIT; var logs = {}; function logDeprecatedError(key, xKey, yKey) { if (!logs[key + xKey + yKey]) { console.warn("DEPRECATED: '" + key + "' has been deprecated. use '" + xKey + "', '" + yKey + "' instead"); logs[key + xKey + yKey] = true; } } function createLegacyProperty(key, privateKey, xKey, yKey) { Object.defineProperty(elProto, key, { get: function () { if (false) { logDeprecatedError(key, xKey, yKey); } if (!this[privateKey]) { var pos = this[privateKey] = []; enhanceArray(this, pos); } return this[privateKey]; }, set: function (pos) { if (false) { logDeprecatedError(key, xKey, yKey); } this[xKey] = pos[0]; this[yKey] = pos[1]; this[privateKey] = pos; enhanceArray(this, pos); } }); function enhanceArray(self, pos) { Object.defineProperty(pos, 0, { get: function () { return self[xKey]; }, set: function (val) { self[xKey] = val; } }); Object.defineProperty(pos, 1, { get: function () { return self[yKey]; }, set: function (val) { self[yKey] = val; } }); } } if (Object.defineProperty) { createLegacyProperty('position', '_legacyPos', 'x', 'y'); createLegacyProperty('scale', '_legacyScale', 'scaleX', 'scaleY'); createLegacyProperty('origin', '_legacyOrigin', 'originX', 'originY'); } })(); return Element; }()); Object(core_util["mixin"])(Element_Element, core_Eventful); Object(core_util["mixin"])(Element_Element, core_Transformable); function animateTo(animatable, target, cfg, animationProps, reverse) { cfg = cfg || {}; var animators = []; animateToShallow(animatable, '', animatable, target, cfg, animationProps, animators, reverse); var finishCount = animators.length; var doneHappened = false; var cfgDone = cfg.done; var cfgAborted = cfg.aborted; var doneCb = function () { doneHappened = true; finishCount--; if (finishCount <= 0) { doneHappened ? (cfgDone && cfgDone()) : (cfgAborted && cfgAborted()); } }; var abortedCb = function () { finishCount--; if (finishCount <= 0) { doneHappened ? (cfgDone && cfgDone()) : (cfgAborted && cfgAborted()); } }; if (!finishCount) { cfgDone && cfgDone(); } if (animators.length > 0 && cfg.during) { animators[0].during(function (target, percent) { cfg.during(percent); }); } for (var i = 0; i < animators.length; i++) { var animator = animators[i]; if (doneCb) { animator.done(doneCb); } if (abortedCb) { animator.aborted(abortedCb); } if (cfg.force) { animator.duration(cfg.duration); } animator.start(cfg.easing); } return animators; } function copyArrShallow(source, target, len) { for (var i = 0; i < len; i++) { source[i] = target[i]; } } function is2DArray(value) { return Object(core_util["isArrayLike"])(value[0]); } function copyValue(target, source, key) { if (Object(core_util["isArrayLike"])(source[key])) { if (!Object(core_util["isArrayLike"])(target[key])) { target[key] = []; } if (Object(core_util["isTypedArray"])(source[key])) { var len = source[key].length; if (target[key].length !== len) { target[key] = new (source[key].constructor)(len); copyArrShallow(target[key], source[key], len); } } else { var sourceArr = source[key]; var targetArr = target[key]; var len0 = sourceArr.length; if (is2DArray(sourceArr)) { var len1 = sourceArr[0].length; for (var i = 0; i < len0; i++) { if (!targetArr[i]) { targetArr[i] = Array.prototype.slice.call(sourceArr[i]); } else { copyArrShallow(targetArr[i], sourceArr[i], len1); } } } else { copyArrShallow(targetArr, sourceArr, len0); } targetArr.length = sourceArr.length; } } else { target[key] = source[key]; } } function isValueSame(val1, val2) { return val1 === val2 || Object(core_util["isArrayLike"])(val1) && Object(core_util["isArrayLike"])(val2) && is1DArraySame(val1, val2); } function is1DArraySame(arr0, arr1) { var len = arr0.length; if (len !== arr1.length) { return false; } for (var i = 0; i < len; i++) { if (arr0[i] !== arr1[i]) { return false; } } return true; } function animateToShallow(animatable, topKey, animateObj, target, cfg, animationProps, animators, reverse) { var targetKeys = Object(core_util["keys"])(target); var duration = cfg.duration; var delay = cfg.delay; var additive = cfg.additive; var setToFinal = cfg.setToFinal; var animateAll = !Object(core_util["isObject"])(animationProps); var existsAnimators = animatable.animators; var animationKeys = []; for (var k = 0; k < targetKeys.length; k++) { var innerKey = targetKeys[k]; var targetVal = target[innerKey]; if (targetVal != null && animateObj[innerKey] != null && (animateAll || animationProps[innerKey])) { if (Object(core_util["isObject"])(targetVal) && !Object(core_util["isArrayLike"])(targetVal) && !Object(core_util["isGradientObject"])(targetVal)) { if (topKey) { if (!reverse) { animateObj[innerKey] = targetVal; animatable.updateDuringAnimation(topKey); } continue; } animateToShallow(animatable, innerKey, animateObj[innerKey], targetVal, cfg, animationProps && animationProps[innerKey], animators, reverse); } else { animationKeys.push(innerKey); } } else if (!reverse) { animateObj[innerKey] = targetVal; animatable.updateDuringAnimation(topKey); animationKeys.push(innerKey); } } var keyLen = animationKeys.length; if (!additive && keyLen) { for (var i = 0; i < existsAnimators.length; i++) { var animator = existsAnimators[i]; if (animator.targetName === topKey) { var allAborted = animator.stopTracks(animationKeys); if (allAborted) { var idx = Object(core_util["indexOf"])(existsAnimators, animator); existsAnimators.splice(idx, 1); } } } } if (!cfg.force) { animationKeys = Object(core_util["filter"])(animationKeys, function (key) { return !isValueSame(target[key], animateObj[key]); }); keyLen = animationKeys.length; } if (keyLen > 0 || (cfg.force && !animators.length)) { var revertedSource = void 0; var reversedTarget = void 0; var sourceClone = void 0; if (reverse) { reversedTarget = {}; if (setToFinal) { revertedSource = {}; } for (var i = 0; i < keyLen; i++) { var innerKey = animationKeys[i]; reversedTarget[innerKey] = animateObj[innerKey]; if (setToFinal) { revertedSource[innerKey] = target[innerKey]; } else { animateObj[innerKey] = target[innerKey]; } } } else if (setToFinal) { sourceClone = {}; for (var i = 0; i < keyLen; i++) { var innerKey = animationKeys[i]; sourceClone[innerKey] = cloneValue(animateObj[innerKey]); copyValue(animateObj, target, innerKey); } } var animator = new animation_Animator(animateObj, false, false, additive ? Object(core_util["filter"])(existsAnimators, function (animator) { return animator.targetName === topKey; }) : null); animator.targetName = topKey; if (cfg.scope) { animator.scope = cfg.scope; } if (setToFinal && revertedSource) { animator.whenWithKeys(0, revertedSource, animationKeys); } if (sourceClone) { animator.whenWithKeys(0, sourceClone, animationKeys); } animator.whenWithKeys(duration == null ? 500 : duration, reverse ? reversedTarget : target, animationKeys).delay(delay || 0); animatable.addAnimator(animator, topKey); animators.push(animator); } } /* harmony default export */ var lib_Element = (Element_Element); // CONCATENATED MODULE: ./node_modules/zrender/lib/graphic/Group.js var Group_Group = (function (_super) { Object(tslib_es6["b" /* __extends */])(Group, _super); function Group(opts) { var _this = _super.call(this) || this; _this.isGroup = true; _this._children = []; _this.attr(opts); return _this; } Group.prototype.childrenRef = function () { return this._children; }; Group.prototype.children = function () { return this._children.slice(); }; Group.prototype.childAt = function (idx) { return this._children[idx]; }; Group.prototype.childOfName = function (name) { var children = this._children; for (var i = 0; i < children.length; i++) { if (children[i].name === name) { return children[i]; } } }; Group.prototype.childCount = function () { return this._children.length; }; Group.prototype.add = function (child) { if (child) { if (child !== this && child.parent !== this) { this._children.push(child); this._doAdd(child); } if (false) { if (child.__hostTarget) { throw 'This elemenet has been used as an attachment'; } } } return this; }; Group.prototype.addBefore = function (child, nextSibling) { if (child && child !== this && child.parent !== this && nextSibling && nextSibling.parent === this) { var children = this._children; var idx = children.indexOf(nextSibling); if (idx >= 0) { children.splice(idx, 0, child); this._doAdd(child); } } return this; }; Group.prototype.replace = function (oldChild, newChild) { var idx = core_util["indexOf"](this._children, oldChild); if (idx >= 0) { this.replaceAt(newChild, idx); } return this; }; Group.prototype.replaceAt = function (child, index) { var children = this._children; var old = children[index]; if (child && child !== this && child.parent !== this && child !== old) { children[index] = child; old.parent = null; var zr = this.__zr; if (zr) { old.removeSelfFromZr(zr); } this._doAdd(child); } return this; }; Group.prototype._doAdd = function (child) { if (child.parent) { child.parent.remove(child); } child.parent = this; var zr = this.__zr; if (zr && zr !== child.__zr) { child.addSelfToZr(zr); } zr && zr.refresh(); }; Group.prototype.remove = function (child) { var zr = this.__zr; var children = this._children; var idx = core_util["indexOf"](children, child); if (idx < 0) { return this; } children.splice(idx, 1); child.parent = null; if (zr) { child.removeSelfFromZr(zr); } zr && zr.refresh(); return this; }; Group.prototype.removeAll = function () { var children = this._children; var zr = this.__zr; for (var i = 0; i < children.length; i++) { var child = children[i]; if (zr) { child.removeSelfFromZr(zr); } child.parent = null; } children.length = 0; return this; }; Group.prototype.eachChild = function (cb, context) { var children = this._children; for (var i = 0; i < children.length; i++) { var child = children[i]; cb.call(context, child, i); } return this; }; Group.prototype.traverse = function (cb, context) { for (var i = 0; i < this._children.length; i++) { var child = this._children[i]; var stopped = cb.call(context, child); if (child.isGroup && !stopped) { child.traverse(cb, context); } } return this; }; Group.prototype.addSelfToZr = function (zr) { _super.prototype.addSelfToZr.call(this, zr); for (var i = 0; i < this._children.length; i++) { var child = this._children[i]; child.addSelfToZr(zr); } }; Group.prototype.removeSelfFromZr = function (zr) { _super.prototype.removeSelfFromZr.call(this, zr); for (var i = 0; i < this._children.length; i++) { var child = this._children[i]; child.removeSelfFromZr(zr); } }; Group.prototype.getBoundingRect = function (includeChildren) { var tmpRect = new core_BoundingRect(0, 0, 0, 0); var children = includeChildren || this._children; var tmpMat = []; var rect = null; for (var i = 0; i < children.length; i++) { var child = children[i]; if (child.ignore || child.invisible) { continue; } var childRect = child.getBoundingRect(); var transform = child.getLocalTransform(tmpMat); if (transform) { core_BoundingRect.applyTransform(tmpRect, childRect, transform); rect = rect || tmpRect.clone(); rect.union(tmpRect); } else { rect = rect || childRect.clone(); rect.union(childRect); } } return rect || tmpRect; }; return Group; }(lib_Element)); Group_Group.prototype.type = 'group'; /* harmony default export */ var graphic_Group = (Group_Group); // CONCATENATED MODULE: ./node_modules/zrender/lib/zrender.js /*! * ZRender, a high performance 2d drawing library. * * Copyright (c) 2013, Baidu Inc. * All rights reserved. * * LICENSE * https://github.com/ecomfe/zrender/blob/master/LICENSE.txt */ var painterCtors = {}; var instances = {}; function delInstance(id) { delete instances[id]; } function zrender_isDarkMode(backgroundColor) { if (!backgroundColor) { return false; } if (typeof backgroundColor === 'string') { return Object(tool_color["lum"])(backgroundColor, 1) < DARK_MODE_THRESHOLD; } else if (backgroundColor.colorStops) { var colorStops = backgroundColor.colorStops; var totalLum = 0; var len = colorStops.length; for (var i = 0; i < len; i++) { totalLum += Object(tool_color["lum"])(colorStops[i].color, 1); } totalLum /= len; return totalLum < DARK_MODE_THRESHOLD; } return false; } var zrender_ZRender = (function () { function ZRender(id, dom, opts) { var _this = this; this._sleepAfterStill = 10; this._stillFrameAccum = 0; this._needsRefresh = true; this._needsRefreshHover = true; this._darkMode = false; opts = opts || {}; this.dom = dom; this.id = id; var storage = new lib_Storage(); var rendererType = opts.renderer || 'canvas'; if (!painterCtors[rendererType]) { rendererType = core_util["keys"](painterCtors)[0]; } if (false) { if (!painterCtors[rendererType]) { throw new Error("Renderer '" + rendererType + "' is not imported. Please import it first."); } } opts.useDirtyRect = opts.useDirtyRect == null ? false : opts.useDirtyRect; var painter = new painterCtors[rendererType](dom, storage, opts, id); var ssrMode = opts.ssr || painter.ssrOnly; this.storage = storage; this.painter = painter; var handlerProxy = (!core_env["a" /* default */].node && !core_env["a" /* default */].worker && !ssrMode) ? new HandlerProxy(painter.getViewportRoot(), painter.root) : null; var useCoarsePointer = opts.useCoarsePointer; var usePointerSize = (useCoarsePointer == null || useCoarsePointer === 'auto') ? core_env["a" /* default */].touchEventsSupported : !!useCoarsePointer; var defaultPointerSize = 44; var pointerSize; if (usePointerSize) { pointerSize = core_util["retrieve2"](opts.pointerSize, defaultPointerSize); } this.handler = new lib_Handler(storage, painter, handlerProxy, painter.root, pointerSize); this.animation = new animation_Animation({ stage: { update: ssrMode ? null : function () { return _this._flush(true); } } }); if (!ssrMode) { this.animation.start(); } } ZRender.prototype.add = function (el) { if (this._disposed || !el) { return; } this.storage.addRoot(el); el.addSelfToZr(this); this.refresh(); }; ZRender.prototype.remove = function (el) { if (this._disposed || !el) { return; } this.storage.delRoot(el); el.removeSelfFromZr(this); this.refresh(); }; ZRender.prototype.configLayer = function (zLevel, config) { if (this._disposed) { return; } if (this.painter.configLayer) { this.painter.configLayer(zLevel, config); } this.refresh(); }; ZRender.prototype.setBackgroundColor = function (backgroundColor) { if (this._disposed) { return; } if (this.painter.setBackgroundColor) { this.painter.setBackgroundColor(backgroundColor); } this.refresh(); this._backgroundColor = backgroundColor; this._darkMode = zrender_isDarkMode(backgroundColor); }; ZRender.prototype.getBackgroundColor = function () { return this._backgroundColor; }; ZRender.prototype.setDarkMode = function (darkMode) { this._darkMode = darkMode; }; ZRender.prototype.isDarkMode = function () { return this._darkMode; }; ZRender.prototype.refreshImmediately = function (fromInside) { if (this._disposed) { return; } if (!fromInside) { this.animation.update(true); } this._needsRefresh = false; this.painter.refresh(); this._needsRefresh = false; }; ZRender.prototype.refresh = function () { if (this._disposed) { return; } this._needsRefresh = true; this.animation.start(); }; ZRender.prototype.flush = function () { if (this._disposed) { return; } this._flush(false); }; ZRender.prototype._flush = function (fromInside) { var triggerRendered; var start = getTime(); if (this._needsRefresh) { triggerRendered = true; this.refreshImmediately(fromInside); } if (this._needsRefreshHover) { triggerRendered = true; this.refreshHoverImmediately(); } var end = getTime(); if (triggerRendered) { this._stillFrameAccum = 0; this.trigger('rendered', { elapsedTime: end - start }); } else if (this._sleepAfterStill > 0) { this._stillFrameAccum++; if (this._stillFrameAccum > this._sleepAfterStill) { this.animation.stop(); } } }; ZRender.prototype.setSleepAfterStill = function (stillFramesCount) { this._sleepAfterStill = stillFramesCount; }; ZRender.prototype.wakeUp = function () { if (this._disposed) { return; } this.animation.start(); this._stillFrameAccum = 0; }; ZRender.prototype.refreshHover = function () { this._needsRefreshHover = true; }; ZRender.prototype.refreshHoverImmediately = function () { if (this._disposed) { return; } this._needsRefreshHover = false; if (this.painter.refreshHover && this.painter.getType() === 'canvas') { this.painter.refreshHover(); } }; ZRender.prototype.resize = function (opts) { if (this._disposed) { return; } opts = opts || {}; this.painter.resize(opts.width, opts.height); this.handler.resize(); }; ZRender.prototype.clearAnimation = function () { if (this._disposed) { return; } this.animation.clear(); }; ZRender.prototype.getWidth = function () { if (this._disposed) { return; } return this.painter.getWidth(); }; ZRender.prototype.getHeight = function () { if (this._disposed) { return; } return this.painter.getHeight(); }; ZRender.prototype.setCursorStyle = function (cursorStyle) { if (this._disposed) { return; } this.handler.setCursorStyle(cursorStyle); }; ZRender.prototype.findHover = function (x, y) { if (this._disposed) { return; } return this.handler.findHover(x, y); }; ZRender.prototype.on = function (eventName, eventHandler, context) { if (!this._disposed) { this.handler.on(eventName, eventHandler, context); } return this; }; ZRender.prototype.off = function (eventName, eventHandler) { if (this._disposed) { return; } this.handler.off(eventName, eventHandler); }; ZRender.prototype.trigger = function (eventName, event) { if (this._disposed) { return; } this.handler.trigger(eventName, event); }; ZRender.prototype.clear = function () { if (this._disposed) { return; } var roots = this.storage.getRoots(); for (var i = 0; i < roots.length; i++) { if (roots[i] instanceof graphic_Group) { roots[i].removeSelfFromZr(this); } } this.storage.delAllRoots(); this.painter.clear(); }; ZRender.prototype.dispose = function () { if (this._disposed) { return; } this.animation.stop(); this.clear(); this.storage.dispose(); this.painter.dispose(); this.handler.dispose(); this.animation = this.storage = this.painter = this.handler = null; this._disposed = true; delInstance(this.id); }; return ZRender; }()); function init(dom, opts) { var zr = new zrender_ZRender(core_util["guid"](), dom, opts); instances[zr.id] = zr; return zr; } function dispose(zr) { zr.dispose(); } function disposeAll() { for (var key in instances) { if (instances.hasOwnProperty(key)) { instances[key].dispose(); } } instances = {}; } function getInstance(id) { return instances[id]; } function registerPainter(name, Ctor) { painterCtors[name] = Ctor; } var ssrDataGetter; function getElementSSRData(el) { if (typeof ssrDataGetter === 'function') { return ssrDataGetter(el); } } function registerSSRDataGetter(getter) { ssrDataGetter = getter; } var version = '5.6.1'; ; // CONCATENATED MODULE: ./node_modules/echarts/lib/util/number.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ /* * A third-party license is embedded for some of the code in this file: * The method "quantile" was copied from "d3.js". * (See more details in the comment of the method below.) * The use of the source code of this file is also subject to the terms * and consitions of the license of "d3.js" (BSD-3Clause, see * ). */ var RADIAN_EPSILON = 1e-4; // Although chrome already enlarge this number to 100 for `toFixed`, but // we sill follow the spec for compatibility. var ROUND_SUPPORTED_PRECISION_MAX = 20; function _trim(str) { return str.replace(/^\s+|\s+$/g, ''); } /** * Linear mapping a value from domain to range * @param val * @param domain Domain extent domain[0] can be bigger than domain[1] * @param range Range extent range[0] can be bigger than range[1] * @param clamp Default to be false */ function linearMap(val, domain, range, clamp) { var d0 = domain[0]; var d1 = domain[1]; var r0 = range[0]; var r1 = range[1]; var subDomain = d1 - d0; var subRange = r1 - r0; if (subDomain === 0) { return subRange === 0 ? r0 : (r0 + r1) / 2; } // Avoid accuracy problem in edge, such as // 146.39 - 62.83 === 83.55999999999999. // See echarts/test/ut/spec/util/number.js#linearMap#accuracyError // It is a little verbose for efficiency considering this method // is a hotspot. if (clamp) { if (subDomain > 0) { if (val <= d0) { return r0; } else if (val >= d1) { return r1; } } else { if (val >= d0) { return r0; } else if (val <= d1) { return r1; } } } else { if (val === d0) { return r0; } if (val === d1) { return r1; } } return (val - d0) / subDomain * subRange + r0; } /** * Convert a percent string to absolute number. * Returns NaN if percent is not a valid string or number */ function number_parsePercent(percent, all) { switch (percent) { case 'center': case 'middle': percent = '50%'; break; case 'left': case 'top': percent = '0%'; break; case 'right': case 'bottom': percent = '100%'; break; } if (core_util["isString"](percent)) { if (_trim(percent).match(/%$/)) { return parseFloat(percent) / 100 * all; } return parseFloat(percent); } return percent == null ? NaN : +percent; } function round(x, precision, returnStr) { if (precision == null) { precision = 10; } // Avoid range error precision = Math.min(Math.max(0, precision), ROUND_SUPPORTED_PRECISION_MAX); // PENDING: 1.005.toFixed(2) is '1.00' rather than '1.01' x = (+x).toFixed(precision); return returnStr ? x : +x; } /** * Inplacd asc sort arr. * The input arr will be modified. */ function asc(arr) { arr.sort(function (a, b) { return a - b; }); return arr; } /** * Get precision. */ function getPrecision(val) { val = +val; if (isNaN(val)) { return 0; } // It is much faster than methods converting number to string as follows // let tmp = val.toString(); // return tmp.length - 1 - tmp.indexOf('.'); // especially when precision is low // Notice: // (1) If the loop count is over about 20, it is slower than `getPrecisionSafe`. // (see https://jsbench.me/2vkpcekkvw/1) // (2) If the val is less than for example 1e-15, the result may be incorrect. // (see test/ut/spec/util/number.test.ts `getPrecision_equal_random`) if (val > 1e-14) { var e = 1; for (var i = 0; i < 15; i++, e *= 10) { if (Math.round(val * e) / e === val) { return i; } } } return number_getPrecisionSafe(val); } /** * Get precision with slow but safe method */ function number_getPrecisionSafe(val) { // toLowerCase for: '3.4E-12' var str = val.toString().toLowerCase(); // Consider scientific notation: '3.4e-12' '3.4e+12' var eIndex = str.indexOf('e'); var exp = eIndex > 0 ? +str.slice(eIndex + 1) : 0; var significandPartLen = eIndex > 0 ? eIndex : str.length; var dotIndex = str.indexOf('.'); var decimalPartLen = dotIndex < 0 ? 0 : significandPartLen - 1 - dotIndex; return Math.max(0, decimalPartLen - exp); } /** * Minimal dicernible data precisioin according to a single pixel. */ function getPixelPrecision(dataExtent, pixelExtent) { var log = Math.log; var LN10 = Math.LN10; var dataQuantity = Math.floor(log(dataExtent[1] - dataExtent[0]) / LN10); var sizeQuantity = Math.round(log(Math.abs(pixelExtent[1] - pixelExtent[0])) / LN10); // toFixed() digits argument must be between 0 and 20. var precision = Math.min(Math.max(-dataQuantity + sizeQuantity, 0), 20); return !isFinite(precision) ? 20 : precision; } /** * Get a data of given precision, assuring the sum of percentages * in valueList is 1. * The largest remainder method is used. * https://en.wikipedia.org/wiki/Largest_remainder_method * * @param valueList a list of all data * @param idx index of the data to be processed in valueList * @param precision integer number showing digits of precision * @return percent ranging from 0 to 100 */ function getPercentWithPrecision(valueList, idx, precision) { if (!valueList[idx]) { return 0; } var seats = getPercentSeats(valueList, precision); return seats[idx] || 0; } /** * Get a data of given precision, assuring the sum of percentages * in valueList is 1. * The largest remainder method is used. * https://en.wikipedia.org/wiki/Largest_remainder_method * * @param valueList a list of all data * @param precision integer number showing digits of precision * @return {Array} */ function getPercentSeats(valueList, precision) { var sum = core_util["reduce"](valueList, function (acc, val) { return acc + (isNaN(val) ? 0 : val); }, 0); if (sum === 0) { return []; } var digits = Math.pow(10, precision); var votesPerQuota = core_util["map"](valueList, function (val) { return (isNaN(val) ? 0 : val) / sum * digits * 100; }); var targetSeats = digits * 100; var seats = core_util["map"](votesPerQuota, function (votes) { // Assign automatic seats. return Math.floor(votes); }); var currentSum = core_util["reduce"](seats, function (acc, val) { return acc + val; }, 0); var remainder = core_util["map"](votesPerQuota, function (votes, idx) { return votes - seats[idx]; }); // Has remainding votes. while (currentSum < targetSeats) { // Find next largest remainder. var max = Number.NEGATIVE_INFINITY; var maxId = null; for (var i = 0, len = remainder.length; i < len; ++i) { if (remainder[i] > max) { max = remainder[i]; maxId = i; } } // Add a vote to max remainder. ++seats[maxId]; remainder[maxId] = 0; ++currentSum; } return core_util["map"](seats, function (seat) { return seat / digits; }); } /** * Solve the floating point adding problem like 0.1 + 0.2 === 0.30000000000000004 * See */ function addSafe(val0, val1) { var maxPrecision = Math.max(getPrecision(val0), getPrecision(val1)); // const multiplier = Math.pow(10, maxPrecision); // return (Math.round(val0 * multiplier) + Math.round(val1 * multiplier)) / multiplier; var sum = val0 + val1; // // PENDING: support more? return maxPrecision > ROUND_SUPPORTED_PRECISION_MAX ? sum : round(sum, maxPrecision); } // Number.MAX_SAFE_INTEGER, ie do not support. var MAX_SAFE_INTEGER = 9007199254740991; /** * To 0 - 2 * PI, considering negative radian. */ function remRadian(radian) { var pi2 = Math.PI * 2; return (radian % pi2 + pi2) % pi2; } /** * @param {type} radian * @return {boolean} */ function isRadianAroundZero(val) { return val > -RADIAN_EPSILON && val < RADIAN_EPSILON; } // eslint-disable-next-line var TIME_REG = /^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/; // jshint ignore:line /** * @param value valid type: number | string | Date, otherwise return `new Date(NaN)` * These values can be accepted: * + An instance of Date, represent a time in its own time zone. * + Or string in a subset of ISO 8601, only including: * + only year, month, date: '2012-03', '2012-03-01', '2012-03-01 05', '2012-03-01 05:06', * + separated with T or space: '2012-03-01T12:22:33.123', '2012-03-01 12:22:33.123', * + time zone: '2012-03-01T12:22:33Z', '2012-03-01T12:22:33+8000', '2012-03-01T12:22:33-05:00', * all of which will be treated as local time if time zone is not specified * (see ). * + Or other string format, including (all of which will be treated as local time): * '2012', '2012-3-1', '2012/3/1', '2012/03/01', * '2009/6/12 2:00', '2009/6/12 2:05:08', '2009/6/12 2:05:08.123' * + a timestamp, which represent a time in UTC. * @return date Never be null/undefined. If invalid, return `new Date(NaN)`. */ function parseDate(value) { if (value instanceof Date) { return value; } else if (core_util["isString"](value)) { // Different browsers parse date in different way, so we parse it manually. // Some other issues: // new Date('1970-01-01') is UTC, // new Date('1970/01/01') and new Date('1970-1-01') is local. // See issue #3623 var match = TIME_REG.exec(value); if (!match) { // return Invalid Date. return new Date(NaN); } // Use local time when no timezone offset is specified. if (!match[8]) { // match[n] can only be string or undefined. // But take care of '12' + 1 => '121'. return new Date(+match[1], +(match[2] || 1) - 1, +match[3] || 1, +match[4] || 0, +(match[5] || 0), +match[6] || 0, match[7] ? +match[7].substring(0, 3) : 0); } // Timezoneoffset of Javascript Date has considered DST (Daylight Saving Time, // https://tc39.github.io/ecma262/#sec-daylight-saving-time-adjustment). // For example, system timezone is set as "Time Zone: America/Toronto", // then these code will get different result: // `new Date(1478411999999).getTimezoneOffset(); // get 240` // `new Date(1478412000000).getTimezoneOffset(); // get 300` // So we should not use `new Date`, but use `Date.UTC`. else { var hour = +match[4] || 0; if (match[8].toUpperCase() !== 'Z') { hour -= +match[8].slice(0, 3); } return new Date(Date.UTC(+match[1], +(match[2] || 1) - 1, +match[3] || 1, hour, +(match[5] || 0), +match[6] || 0, match[7] ? +match[7].substring(0, 3) : 0)); } } else if (value == null) { return new Date(NaN); } return new Date(Math.round(value)); } /** * Quantity of a number. e.g. 0.1, 1, 10, 100 * * @param val * @return */ function quantity(val) { return Math.pow(10, quantityExponent(val)); } /** * Exponent of the quantity of a number * e.g., 1234 equals to 1.234*10^3, so quantityExponent(1234) is 3 * * @param val non-negative value * @return */ function quantityExponent(val) { if (val === 0) { return 0; } var exp = Math.floor(Math.log(val) / Math.LN10); /** * exp is expected to be the rounded-down result of the base-10 log of val. * But due to the precision loss with Math.log(val), we need to restore it * using 10^exp to make sure we can get val back from exp. #11249 */ if (val / Math.pow(10, exp) >= 10) { exp++; } return exp; } /** * find a “nice” number approximately equal to x. Round the number if round = true, * take ceiling if round = false. The primary observation is that the “nicest” * numbers in decimal are 1, 2, and 5, and all power-of-ten multiples of these numbers. * * See "Nice Numbers for Graph Labels" of Graphic Gems. * * @param val Non-negative value. * @param round * @return Niced number */ function nice(val, round) { var exponent = quantityExponent(val); var exp10 = Math.pow(10, exponent); var f = val / exp10; // 1 <= f < 10 var nf; if (round) { if (f < 1.5) { nf = 1; } else if (f < 2.5) { nf = 2; } else if (f < 4) { nf = 3; } else if (f < 7) { nf = 5; } else { nf = 10; } } else { if (f < 1) { nf = 1; } else if (f < 2) { nf = 2; } else if (f < 3) { nf = 3; } else if (f < 5) { nf = 5; } else { nf = 10; } } val = nf * exp10; // Fix 3 * 0.1 === 0.30000000000000004 issue (see IEEE 754). // 20 is the uppper bound of toFixed. return exponent >= -20 ? +val.toFixed(exponent < 0 ? -exponent : 0) : val; } /** * This code was copied from "d3.js" * . * See the license statement at the head of this file. * @param ascArr */ function quantile(ascArr, p) { var H = (ascArr.length - 1) * p + 1; var h = Math.floor(H); var v = +ascArr[h - 1]; var e = H - h; return e ? v + e * (ascArr[h] - v) : v; } /** * Order intervals asc, and split them when overlap. * expect(numberUtil.reformIntervals([ * {interval: [18, 62], close: [1, 1]}, * {interval: [-Infinity, -70], close: [0, 0]}, * {interval: [-70, -26], close: [1, 1]}, * {interval: [-26, 18], close: [1, 1]}, * {interval: [62, 150], close: [1, 1]}, * {interval: [106, 150], close: [1, 1]}, * {interval: [150, Infinity], close: [0, 0]} * ])).toEqual([ * {interval: [-Infinity, -70], close: [0, 0]}, * {interval: [-70, -26], close: [1, 1]}, * {interval: [-26, 18], close: [0, 1]}, * {interval: [18, 62], close: [0, 1]}, * {interval: [62, 150], close: [0, 1]}, * {interval: [150, Infinity], close: [0, 0]} * ]); * @param list, where `close` mean open or close * of the interval, and Infinity can be used. * @return The origin list, which has been reformed. */ function reformIntervals(list) { list.sort(function (a, b) { return littleThan(a, b, 0) ? -1 : 1; }); var curr = -Infinity; var currClose = 1; for (var i = 0; i < list.length;) { var interval = list[i].interval; var close_1 = list[i].close; for (var lg = 0; lg < 2; lg++) { if (interval[lg] <= curr) { interval[lg] = curr; close_1[lg] = !lg ? 1 - currClose : 1; } curr = interval[lg]; currClose = close_1[lg]; } if (interval[0] === interval[1] && close_1[0] * close_1[1] !== 1) { list.splice(i, 1); } else { i++; } } return list; function littleThan(a, b, lg) { return a.interval[lg] < b.interval[lg] || a.interval[lg] === b.interval[lg] && (a.close[lg] - b.close[lg] === (!lg ? 1 : -1) || !lg && littleThan(a, b, 1)); } } /** * [Numeric is defined as]: * `parseFloat(val) == val` * For example: * numeric: * typeof number except NaN, '-123', '123', '2e3', '-2e3', '011', 'Infinity', Infinity, * and they rounded by white-spaces or line-terminal like ' -123 \n ' (see es spec) * not-numeric: * null, undefined, [], {}, true, false, 'NaN', NaN, '123ab', * empty string, string with only white-spaces or line-terminal (see es spec), * 0x12, '0x12', '-0x12', 012, '012', '-012', * non-string, ... * * @test See full test cases in `test/ut/spec/util/number.js`. * @return Must be a typeof number. If not numeric, return NaN. */ function numericToNumber(val) { var valFloat = parseFloat(val); return valFloat == val // eslint-disable-line eqeqeq && (valFloat !== 0 || !core_util["isString"](val) || val.indexOf('x') <= 0) // For case ' 0x0 '. ? valFloat : NaN; } /** * Definition of "numeric": see `numericToNumber`. */ function isNumeric(val) { return !isNaN(numericToNumber(val)); } /** * Use random base to prevent users hard code depending on * this auto generated marker id. * @return An positive integer. */ function getRandomIdBase() { return Math.round(Math.random() * 9); } /** * Get the greatest common divisor. * * @param {number} a one number * @param {number} b the other number */ function getGreatestCommonDividor(a, b) { if (b === 0) { return a; } return getGreatestCommonDividor(b, a % b); } /** * Get the least common multiple. * * @param {number} a one number * @param {number} b the other number */ function getLeastCommonMultiple(a, b) { if (a == null) { return b; } if (b == null) { return a; } return a * b / getGreatestCommonDividor(a, b); } // CONCATENATED MODULE: ./node_modules/echarts/lib/util/log.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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_PREFIX = '[ECharts] '; var storedLogs = {}; var hasConsole = typeof console !== 'undefined' // eslint-disable-next-line && console.warn && console.log; function outputLog(type, str, onlyOnce) { if (hasConsole) { if (onlyOnce) { if (storedLogs[str]) { return; } storedLogs[str] = true; } // eslint-disable-next-line console[type](ECHARTS_PREFIX + str); } } function log_log(str, onlyOnce) { outputLog('log', str, onlyOnce); } function log_warn(str, onlyOnce) { outputLog('warn', str, onlyOnce); } function log_error(str, onlyOnce) { outputLog('error', str, onlyOnce); } function log_deprecateLog(str) { if (false) { // Not display duplicate message. outputLog('warn', 'DEPRECATED: ' + str, true); } } function log_deprecateReplaceLog(oldOpt, newOpt, scope) { if (false) { log_deprecateLog((scope ? "[" + scope + "]" : '') + (oldOpt + " is deprecated, use " + newOpt + " instead.")); } } /** * If in __DEV__ environment, get console printable message for users hint. * Parameters are separated by ' '. * @usage * makePrintable('This is an error on', someVar, someObj); * * @param hintInfo anything about the current execution context to hint users. * @throws Error */ function log_makePrintable() { var hintInfo = []; for (var _i = 0; _i < arguments.length; _i++) { hintInfo[_i] = arguments[_i]; } var msg = ''; if (false) { // Fuzzy stringify for print. // This code only exist in dev environment. var makePrintableStringIfPossible_1 = function (val) { return val === void 0 ? 'undefined' : val === Infinity ? 'Infinity' : val === -Infinity ? '-Infinity' : eqNaN(val) ? 'NaN' : val instanceof Date ? 'Date(' + val.toISOString() + ')' : isFunction(val) ? 'function () { ... }' : isRegExp(val) ? val + '' : null; }; msg = map(hintInfo, function (arg) { if (isString(arg)) { // Print without quotation mark for some statement. return arg; } else { var printableStr = makePrintableStringIfPossible_1(arg); if (printableStr != null) { return printableStr; } else if (typeof JSON !== 'undefined' && JSON.stringify) { try { return JSON.stringify(arg, function (n, val) { var printableStr = makePrintableStringIfPossible_1(val); return printableStr == null ? val : printableStr; }); // In most cases the info object is small, so do not line break. } catch (err) { return '?'; } } else { return '?'; } } }).join(' '); } return msg; } /** * @throws Error */ function throwError(msg) { throw new Error(msg); } // CONCATENATED MODULE: ./node_modules/echarts/lib/util/model.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 model_interpolateNumber(p0, p1, percent) { return (p1 - p0) * percent + p0; } /** * Make the name displayable. But we should * make sure it is not duplicated with user * specified name, so use '\0'; */ var DUMMY_COMPONENT_NAME_PREFIX = 'series\0'; var INTERNAL_COMPONENT_ID_PREFIX = '\0_ec_\0'; /** * If value is not array, then translate it to array. * @param {*} value * @return {Array} [value] or value */ function normalizeToArray(value) { return value instanceof Array ? value : value == null ? [] : [value]; } /** * Sync default option between normal and emphasis like `position` and `show` * In case some one will write code like * label: { * show: false, * position: 'outside', * fontSize: 18 * }, * emphasis: { * label: { show: true } * } */ function defaultEmphasis(opt, key, subOpts) { // Caution: performance sensitive. if (opt) { opt[key] = opt[key] || {}; opt.emphasis = opt.emphasis || {}; opt.emphasis[key] = opt.emphasis[key] || {}; // Default emphasis option from normal for (var i = 0, len = subOpts.length; i < len; i++) { var subOptName = subOpts[i]; if (!opt.emphasis[key].hasOwnProperty(subOptName) && opt[key].hasOwnProperty(subOptName)) { opt.emphasis[key][subOptName] = opt[key][subOptName]; } } } } var TEXT_STYLE_OPTIONS = ['fontStyle', 'fontWeight', 'fontSize', 'fontFamily', 'rich', 'tag', 'color', 'textBorderColor', 'textBorderWidth', 'width', 'height', 'lineHeight', 'align', 'verticalAlign', 'baseline', 'shadowColor', 'shadowBlur', 'shadowOffsetX', 'shadowOffsetY', 'textShadowColor', 'textShadowBlur', 'textShadowOffsetX', 'textShadowOffsetY', 'backgroundColor', 'borderColor', 'borderWidth', 'borderRadius', 'padding']; // modelUtil.LABEL_OPTIONS = modelUtil.TEXT_STYLE_OPTIONS.concat([ // 'position', 'offset', 'rotate', 'origin', 'show', 'distance', 'formatter', // 'fontStyle', 'fontWeight', 'fontSize', 'fontFamily', // // FIXME: deprecated, check and remove it. // 'textStyle' // ]); /** * The method does not ensure performance. * data could be [12, 2323, {value: 223}, [1221, 23], {value: [2, 23]}] * This helper method retrieves value from data. */ function getDataItemValue(dataItem) { return Object(core_util["isObject"])(dataItem) && !Object(core_util["isArray"])(dataItem) && !(dataItem instanceof Date) ? dataItem.value : dataItem; } /** * data could be [12, 2323, {value: 223}, [1221, 23], {value: [2, 23]}] * This helper method determine if dataItem has extra option besides value */ function isDataItemOption(dataItem) { return Object(core_util["isObject"])(dataItem) && !(dataItem instanceof Array); // // markLine data can be array // && !(dataItem[0] && isObject(dataItem[0]) && !(dataItem[0] instanceof Array)); } ; /** * Mapping to existings for merge. * * Mode "normalMege": * The mapping result (merge result) will keep the order of the existing * component, rather than the order of new option. Because we should ensure * some specified index reference (like xAxisIndex) keep work. * And in most cases, "merge option" is used to update partial option but not * be expected to change the order. * * Mode "replaceMege": * (1) Only the id mapped components will be merged. * (2) Other existing components (except internal components) will be removed. * (3) Other new options will be used to create new component. * (4) The index of the existing components will not be modified. * That means their might be "hole" after the removal. * The new components are created first at those available index. * * Mode "replaceAll": * This mode try to support that reproduce an echarts instance from another * echarts instance (via `getOption`) in some simple cases. * In this scenario, the `result` index are exactly the consistent with the `newCmptOptions`, * which ensures the component index referring (like `xAxisIndex: ?`) corrent. That is, * the "hole" in `newCmptOptions` will also be kept. * On the contrary, other modes try best to eliminate holes. * PENDING: This is an experimental mode yet. * * @return See the comment of . */ function mappingToExists(existings, newCmptOptions, mode) { var isNormalMergeMode = mode === 'normalMerge'; var isReplaceMergeMode = mode === 'replaceMerge'; var isReplaceAllMode = mode === 'replaceAll'; existings = existings || []; newCmptOptions = (newCmptOptions || []).slice(); var existingIdIdxMap = Object(core_util["createHashMap"])(); // Validate id and name on user input option. Object(core_util["each"])(newCmptOptions, function (cmptOption, index) { if (!Object(core_util["isObject"])(cmptOption)) { newCmptOptions[index] = null; return; } if (false) { // There is some legacy case that name is set as `false`. // But should work normally rather than throw error. if (cmptOption.id != null && !isValidIdOrName(cmptOption.id)) { warnInvalidateIdOrName(cmptOption.id); } if (cmptOption.name != null && !isValidIdOrName(cmptOption.name)) { warnInvalidateIdOrName(cmptOption.name); } } }); var result = model_prepareResult(existings, existingIdIdxMap, mode); if (isNormalMergeMode || isReplaceMergeMode) { mappingById(result, existings, existingIdIdxMap, newCmptOptions); } if (isNormalMergeMode) { mappingByName(result, newCmptOptions); } if (isNormalMergeMode || isReplaceMergeMode) { mappingByIndex(result, newCmptOptions, isReplaceMergeMode); } else if (isReplaceAllMode) { mappingInReplaceAllMode(result, newCmptOptions); } makeIdAndName(result); // The array `result` MUST NOT contain elided items, otherwise the // forEach will omit those items and result in incorrect result. return result; } function model_prepareResult(existings, existingIdIdxMap, mode) { var result = []; if (mode === 'replaceAll') { return result; } // Do not use native `map` to in case that the array `existings` // contains elided items, which will be omitted. for (var index = 0; index < existings.length; index++) { var existing = existings[index]; // Because of replaceMerge, `existing` may be null/undefined. if (existing && existing.id != null) { existingIdIdxMap.set(existing.id, index); } // For non-internal-componnets: // Mode "normalMerge": all existings kept. // Mode "replaceMerge": all existing removed unless mapped by id. // For internal-components: // go with "replaceMerge" approach in both mode. result.push({ existing: mode === 'replaceMerge' || model_isComponentIdInternal(existing) ? null : existing, newOption: null, keyInfo: null, brandNew: null }); } return result; } function mappingById(result, existings, existingIdIdxMap, newCmptOptions) { // Mapping by id if specified. Object(core_util["each"])(newCmptOptions, function (cmptOption, index) { if (!cmptOption || cmptOption.id == null) { return; } var optionId = makeComparableKey(cmptOption.id); var existingIdx = existingIdIdxMap.get(optionId); if (existingIdx != null) { var resultItem = result[existingIdx]; Object(core_util["assert"])(!resultItem.newOption, 'Duplicated option on id "' + optionId + '".'); resultItem.newOption = cmptOption; // In both mode, if id matched, new option will be merged to // the existings rather than creating new component model. resultItem.existing = existings[existingIdx]; newCmptOptions[index] = null; } }); } function mappingByName(result, newCmptOptions) { // Mapping by name if specified. Object(core_util["each"])(newCmptOptions, function (cmptOption, index) { if (!cmptOption || cmptOption.name == null) { return; } for (var i = 0; i < result.length; i++) { var existing = result[i].existing; if (!result[i].newOption // Consider name: two map to one. // Can not match when both ids existing but different. && existing && (existing.id == null || cmptOption.id == null) && !model_isComponentIdInternal(cmptOption) && !model_isComponentIdInternal(existing) && keyExistAndEqual('name', existing, cmptOption)) { result[i].newOption = cmptOption; newCmptOptions[index] = null; return; } } }); } function mappingByIndex(result, newCmptOptions, brandNew) { Object(core_util["each"])(newCmptOptions, function (cmptOption) { if (!cmptOption) { return; } // Find the first place that not mapped by id and not internal component (consider the "hole"). var resultItem; var nextIdx = 0; while ( // Be `!resultItem` only when `nextIdx >= result.length`. (resultItem = result[nextIdx] // (1) Existing models that already have id should be able to mapped to. Because // after mapping performed, model will always be assigned with an id if user not given. // After that all models have id. // (2) If new option has id, it can only set to a hole or append to the last. It should // not be merged to the existings with different id. Because id should not be overwritten. // (3) Name can be overwritten, because axis use name as 'show label text'. ) && (resultItem.newOption || model_isComponentIdInternal(resultItem.existing) || // In mode "replaceMerge", here no not-mapped-non-internal-existing. resultItem.existing && cmptOption.id != null && !keyExistAndEqual('id', cmptOption, resultItem.existing))) { nextIdx++; } if (resultItem) { resultItem.newOption = cmptOption; resultItem.brandNew = brandNew; } else { result.push({ newOption: cmptOption, brandNew: brandNew, existing: null, keyInfo: null }); } nextIdx++; }); } function mappingInReplaceAllMode(result, newCmptOptions) { Object(core_util["each"])(newCmptOptions, function (cmptOption) { // The feature "reproduce" requires "hole" will also reproduced // in case that component index referring are broken. result.push({ newOption: cmptOption, brandNew: true, existing: null, keyInfo: null }); }); } /** * Make id and name for mapping result (result of mappingToExists) * into `keyInfo` field. */ function makeIdAndName(mapResult) { // We use this id to hash component models and view instances // in echarts. id can be specified by user, or auto generated. // The id generation rule ensures new view instance are able // to mapped to old instance when setOption are called in // no-merge mode. So we generate model id by name and plus // type in view id. // name can be duplicated among components, which is convenient // to specify multi components (like series) by one name. // Ensure that each id is distinct. var idMap = Object(core_util["createHashMap"])(); Object(core_util["each"])(mapResult, function (item) { var existing = item.existing; existing && idMap.set(existing.id, item); }); Object(core_util["each"])(mapResult, function (item) { var opt = item.newOption; // Force ensure id not duplicated. Object(core_util["assert"])(!opt || opt.id == null || !idMap.get(opt.id) || idMap.get(opt.id) === item, 'id duplicates: ' + (opt && opt.id)); opt && opt.id != null && idMap.set(opt.id, item); !item.keyInfo && (item.keyInfo = {}); }); // Make name and id. Object(core_util["each"])(mapResult, function (item, index) { var existing = item.existing; var opt = item.newOption; var keyInfo = item.keyInfo; if (!Object(core_util["isObject"])(opt)) { return; } // Name can be overwritten. Consider case: axis.name = '20km'. // But id generated by name will not be changed, which affect // only in that case: setOption with 'not merge mode' and view // instance will be recreated, which can be accepted. keyInfo.name = opt.name != null ? makeComparableKey(opt.name) : existing ? existing.name // Avoid that different series has the same name, // because name may be used like in color pallet. : DUMMY_COMPONENT_NAME_PREFIX + index; if (existing) { keyInfo.id = makeComparableKey(existing.id); } else if (opt.id != null) { keyInfo.id = makeComparableKey(opt.id); } else { // Consider this situatoin: // optionA: [{name: 'a'}, {name: 'a'}, {..}] // optionB [{..}, {name: 'a'}, {name: 'a'}] // Series with the same name between optionA and optionB // should be mapped. var idNum = 0; do { keyInfo.id = '\0' + keyInfo.name + '\0' + idNum++; } while (idMap.get(keyInfo.id)); } idMap.set(keyInfo.id, item); }); } function keyExistAndEqual(attr, obj1, obj2) { var key1 = convertOptionIdName(obj1[attr], null); var key2 = convertOptionIdName(obj2[attr], null); // See `MappingExistingItem`. `id` and `name` trade string equals to number. return key1 != null && key2 != null && key1 === key2; } /** * @return return null if not exist. */ function makeComparableKey(val) { if (false) { if (val == null) { throw new Error(); } } return convertOptionIdName(val, ''); } function convertOptionIdName(idOrName, defaultValue) { if (idOrName == null) { return defaultValue; } return Object(core_util["isString"])(idOrName) ? idOrName : Object(core_util["isNumber"])(idOrName) || Object(core_util["isStringSafe"])(idOrName) ? idOrName + '' : defaultValue; } function warnInvalidateIdOrName(idOrName) { if (false) { warn('`' + idOrName + '` is invalid id or name. Must be a string or number.'); } } function isValidIdOrName(idOrName) { return Object(core_util["isStringSafe"])(idOrName) || isNumeric(idOrName); } function isNameSpecified(componentModel) { var name = componentModel.name; // Is specified when `indexOf` get -1 or > 0. return !!(name && name.indexOf(DUMMY_COMPONENT_NAME_PREFIX)); } /** * @public * @param {Object} cmptOption * @return {boolean} */ function model_isComponentIdInternal(cmptOption) { return cmptOption && cmptOption.id != null && makeComparableKey(cmptOption.id).indexOf(INTERNAL_COMPONENT_ID_PREFIX) === 0; } function makeInternalComponentId(idSuffix) { return INTERNAL_COMPONENT_ID_PREFIX + idSuffix; } function setComponentTypeToKeyInfo(mappingResult, mainType, componentModelCtor) { // Set mainType and complete subType. Object(core_util["each"])(mappingResult, function (item) { var newOption = item.newOption; if (Object(core_util["isObject"])(newOption)) { item.keyInfo.mainType = mainType; item.keyInfo.subType = determineSubType(mainType, newOption, item.existing, componentModelCtor); } }); } function determineSubType(mainType, newCmptOption, existComponent, componentModelCtor) { var subType = newCmptOption.type ? newCmptOption.type : existComponent ? existComponent.subType // Use determineSubType only when there is no existComponent. : componentModelCtor.determineSubType(mainType, newCmptOption); // tooltip, markline, markpoint may always has no subType return subType; } /** * A helper for removing duplicate items between batchA and batchB, * and in themselves, and categorize by series. * * @param batchA Like: [{seriesId: 2, dataIndex: [32, 4, 5]}, ...] * @param batchB Like: [{seriesId: 2, dataIndex: [32, 4, 5]}, ...] * @return result: [resultBatchA, resultBatchB] */ function compressBatches(batchA, batchB) { var mapA = {}; var mapB = {}; makeMap(batchA || [], mapA); makeMap(batchB || [], mapB, mapA); return [mapToArray(mapA), mapToArray(mapB)]; function makeMap(sourceBatch, map, otherMap) { for (var i = 0, len = sourceBatch.length; i < len; i++) { var seriesId = convertOptionIdName(sourceBatch[i].seriesId, null); if (seriesId == null) { return; } var dataIndices = normalizeToArray(sourceBatch[i].dataIndex); var otherDataIndices = otherMap && otherMap[seriesId]; for (var j = 0, lenj = dataIndices.length; j < lenj; j++) { var dataIndex = dataIndices[j]; if (otherDataIndices && otherDataIndices[dataIndex]) { otherDataIndices[dataIndex] = null; } else { (map[seriesId] || (map[seriesId] = {}))[dataIndex] = 1; } } } } function mapToArray(map, isData) { var result = []; for (var i in map) { if (map.hasOwnProperty(i) && map[i] != null) { if (isData) { result.push(+i); } else { var dataIndices = mapToArray(map[i], true); dataIndices.length && result.push({ seriesId: i, dataIndex: dataIndices }); } } } return result; } } /** * @param payload Contains dataIndex (means rawIndex) / dataIndexInside / name * each of which can be Array or primary type. * @return dataIndex If not found, return undefined/null. */ function queryDataIndex(data, payload) { if (payload.dataIndexInside != null) { return payload.dataIndexInside; } else if (payload.dataIndex != null) { return Object(core_util["isArray"])(payload.dataIndex) ? Object(core_util["map"])(payload.dataIndex, function (value) { return data.indexOfRawIndex(value); }) : data.indexOfRawIndex(payload.dataIndex); } else if (payload.name != null) { return Object(core_util["isArray"])(payload.name) ? Object(core_util["map"])(payload.name, function (value) { return data.indexOfName(value); }) : data.indexOfName(payload.name); } } /** * Enable property storage to any host object. * Notice: Serialization is not supported. * * For example: * let inner = zrUitl.makeInner(); * * function some1(hostObj) { * inner(hostObj).someProperty = 1212; * ... * } * function some2() { * let fields = inner(this); * fields.someProperty1 = 1212; * fields.someProperty2 = 'xx'; * ... * } * * @return {Function} */ function makeInner() { var key = '__ec_inner_' + innerUniqueIndex++; return function (hostObj) { return hostObj[key] || (hostObj[key] = {}); }; } var innerUniqueIndex = getRandomIdBase(); /** * The same behavior as `component.getReferringComponents`. */ function parseFinder(ecModel, finderInput, opt) { var _a = preParseFinder(finderInput, opt), mainTypeSpecified = _a.mainTypeSpecified, queryOptionMap = _a.queryOptionMap, others = _a.others; var result = others; var defaultMainType = opt ? opt.defaultMainType : null; if (!mainTypeSpecified && defaultMainType) { queryOptionMap.set(defaultMainType, {}); } queryOptionMap.each(function (queryOption, mainType) { var queryResult = queryReferringComponents(ecModel, mainType, queryOption, { useDefault: defaultMainType === mainType, enableAll: opt && opt.enableAll != null ? opt.enableAll : true, enableNone: opt && opt.enableNone != null ? opt.enableNone : true }); result[mainType + 'Models'] = queryResult.models; result[mainType + 'Model'] = queryResult.models[0]; }); return result; } function preParseFinder(finderInput, opt) { var finder; if (Object(core_util["isString"])(finderInput)) { var obj = {}; obj[finderInput + 'Index'] = 0; finder = obj; } else { finder = finderInput; } var queryOptionMap = Object(core_util["createHashMap"])(); var others = {}; var mainTypeSpecified = false; Object(core_util["each"])(finder, function (value, key) { // Exclude 'dataIndex' and other illgal keys. if (key === 'dataIndex' || key === 'dataIndexInside') { others[key] = value; return; } var parsedKey = key.match(/^(\w+)(Index|Id|Name)$/) || []; var mainType = parsedKey[1]; var queryType = (parsedKey[2] || '').toLowerCase(); if (!mainType || !queryType || opt && opt.includeMainTypes && Object(core_util["indexOf"])(opt.includeMainTypes, mainType) < 0) { return; } mainTypeSpecified = mainTypeSpecified || !!mainType; var queryOption = queryOptionMap.get(mainType) || queryOptionMap.set(mainType, {}); queryOption[queryType] = value; }); return { mainTypeSpecified: mainTypeSpecified, queryOptionMap: queryOptionMap, others: others }; } var SINGLE_REFERRING = { useDefault: true, enableAll: false, enableNone: false }; var MULTIPLE_REFERRING = { useDefault: false, enableAll: true, enableNone: true }; function queryReferringComponents(ecModel, mainType, userOption, opt) { opt = opt || SINGLE_REFERRING; var indexOption = userOption.index; var idOption = userOption.id; var nameOption = userOption.name; var result = { models: null, specified: indexOption != null || idOption != null || nameOption != null }; if (!result.specified) { // Use the first as default if `useDefault`. var firstCmpt = void 0; result.models = opt.useDefault && (firstCmpt = ecModel.getComponent(mainType)) ? [firstCmpt] : []; return result; } if (indexOption === 'none' || indexOption === false) { Object(core_util["assert"])(opt.enableNone, '`"none"` or `false` is not a valid value on index option.'); result.models = []; return result; } // `queryComponents` will return all components if // both all of index/id/name are null/undefined. if (indexOption === 'all') { Object(core_util["assert"])(opt.enableAll, '`"all"` is not a valid value on index option.'); indexOption = idOption = nameOption = null; } result.models = ecModel.queryComponents({ mainType: mainType, index: indexOption, id: idOption, name: nameOption }); return result; } function setAttribute(dom, key, value) { dom.setAttribute ? dom.setAttribute(key, value) : dom[key] = value; } function getAttribute(dom, key) { return dom.getAttribute ? dom.getAttribute(key) : dom[key]; } function getTooltipRenderMode(renderModeOption) { if (renderModeOption === 'auto') { // Using html when `document` exists, use richText otherwise return core_env["a" /* default */].domSupported ? 'html' : 'richText'; } else { return renderModeOption || 'html'; } } /** * Group a list by key. */ function groupData(array, getKey // return key ) { var buckets = Object(core_util["createHashMap"])(); var keys = []; Object(core_util["each"])(array, function (item) { var key = getKey(item); (buckets.get(key) || (keys.push(key), buckets.set(key, []))).push(item); }); return { keys: keys, buckets: buckets }; } /** * Interpolate raw values of a series with percent * * @param data data * @param labelModel label model of the text element * @param sourceValue start value. May be null/undefined when init. * @param targetValue end value * @param percent 0~1 percentage; 0 uses start value while 1 uses end value * @return interpolated values * If `sourceValue` and `targetValue` are `number`, return `number`. * If `sourceValue` and `targetValue` are `string`, return `string`. * If `sourceValue` and `targetValue` are `(string | number)[]`, return `(string | number)[]`. * Other cases do not supported. */ function interpolateRawValues(data, precision, sourceValue, targetValue, percent) { var isAutoPrecision = precision == null || precision === 'auto'; if (targetValue == null) { return targetValue; } if (Object(core_util["isNumber"])(targetValue)) { var value = model_interpolateNumber(sourceValue || 0, targetValue, percent); return round(value, isAutoPrecision ? Math.max(getPrecision(sourceValue || 0), getPrecision(targetValue)) : precision); } else if (Object(core_util["isString"])(targetValue)) { return percent < 1 ? sourceValue : targetValue; } else { var interpolated = []; var leftArr = sourceValue; var rightArr = targetValue; var length_1 = Math.max(leftArr ? leftArr.length : 0, rightArr.length); for (var i = 0; i < length_1; ++i) { var info = data.getDimensionInfo(i); // Don't interpolate ordinal dims if (info && info.type === 'ordinal') { // In init, there is no `sourceValue`, but should better not to get undefined result. interpolated[i] = (percent < 1 && leftArr ? leftArr : rightArr)[i]; } else { var leftVal = leftArr && leftArr[i] ? leftArr[i] : 0; var rightVal = rightArr[i]; var value = model_interpolateNumber(leftVal, rightVal, percent); interpolated[i] = round(value, isAutoPrecision ? Math.max(getPrecision(leftVal), getPrecision(rightVal)) : precision); } } return interpolated; } } // CONCATENATED MODULE: ./node_modules/echarts/lib/util/clazz.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 TYPE_DELIMITER = '.'; var IS_CONTAINER = '___EC__COMPONENT__CONTAINER___'; var IS_EXTENDED_CLASS = '___EC__EXTENDED_CLASS___'; /** * Notice, parseClassType('') should returns {main: '', sub: ''} * @public */ function parseClassType(componentType) { var ret = { main: '', sub: '' }; if (componentType) { var typeArr = componentType.split(TYPE_DELIMITER); ret.main = typeArr[0] || ''; ret.sub = typeArr[1] || ''; } return ret; } /** * @public */ function checkClassType(componentType) { core_util["assert"](/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(componentType), 'componentType "' + componentType + '" illegal'); } function isExtendedClass(clz) { return !!(clz && clz[IS_EXTENDED_CLASS]); } /** * Implements `ExtendableConstructor` for `rootClz`. * * @usage * ```ts * class Xxx {} * type XxxConstructor = typeof Xxx & ExtendableConstructor * enableClassExtend(Xxx as XxxConstructor); * ``` */ function enableClassExtend(rootClz, mandatoryMethods) { rootClz.$constructor = rootClz; // FIXME: not necessary? rootClz.extend = function (proto) { if (false) { zrUtil.each(mandatoryMethods, function (method) { if (!proto[method]) { console.warn('Method `' + method + '` should be implemented' + (proto.type ? ' in ' + proto.type : '') + '.'); } }); } var superClass = this; var ExtendedClass; if (isESClass(superClass)) { ExtendedClass = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(class_1, _super); function class_1() { return _super.apply(this, arguments) || this; } return class_1; }(superClass); } else { // For backward compat, we both support ts class inheritance and this // "extend" approach. // The constructor should keep the same behavior as ts class inheritance: // If this constructor/$constructor is not declared, auto invoke the super // constructor. // If this constructor/$constructor is declared, it is responsible for // calling the super constructor. ExtendedClass = function () { (proto.$constructor || superClass).apply(this, arguments); }; core_util["inherits"](ExtendedClass, this); } core_util["extend"](ExtendedClass.prototype, proto); ExtendedClass[IS_EXTENDED_CLASS] = true; ExtendedClass.extend = this.extend; ExtendedClass.superCall = superCall; ExtendedClass.superApply = superApply; ExtendedClass.superClass = superClass; return ExtendedClass; }; } function isESClass(fn) { return core_util["isFunction"](fn) && /^class\s/.test(Function.prototype.toString.call(fn)); } /** * A work around to both support ts extend and this extend mechanism. * on sub-class. * @usage * ```ts * class Component { ... } * classUtil.enableClassExtend(Component); * classUtil.enableClassManagement(Component, {registerWhenExtend: true}); * * class Series extends Component { ... } * // Without calling `markExtend`, `registerWhenExtend` will not work. * Component.markExtend(Series); * ``` */ function mountExtend(SubClz, SupperClz) { SubClz.extend = SupperClz.extend; } // A random offset. var classBase = Math.round(Math.random() * 10); /** * Implements `CheckableConstructor` for `target`. * Can not use instanceof, consider different scope by * cross domain or es module import in ec extensions. * Mount a method "isInstance()" to Clz. * * @usage * ```ts * class Xxx {} * type XxxConstructor = typeof Xxx & CheckableConstructor; * enableClassCheck(Xxx as XxxConstructor) * ``` */ function enableClassCheck(target) { var classAttr = ['__\0is_clz', classBase++].join('_'); target.prototype[classAttr] = true; if (false) { zrUtil.assert(!target.isInstance, 'The method "is" can not be defined.'); } target.isInstance = function (obj) { return !!(obj && obj[classAttr]); }; } // superCall should have class info, which can not be fetched from 'this'. // Consider this case: // class A has method f, // class B inherits class A, overrides method f, f call superApply('f'), // class C inherits class B, does not override method f, // then when method of class C is called, dead loop occurred. function superCall(context, methodName) { var args = []; for (var _i = 2; _i < arguments.length; _i++) { args[_i - 2] = arguments[_i]; } return this.superClass.prototype[methodName].apply(context, args); } function superApply(context, methodName, args) { return this.superClass.prototype[methodName].apply(context, args); } /** * Implements `ClassManager` for `target` * * @usage * ```ts * class Xxx {} * type XxxConstructor = typeof Xxx & ClassManager * enableClassManagement(Xxx as XxxConstructor); * ``` */ function enableClassManagement(target) { /** * Component model classes * key: componentType, * value: * componentClass, when componentType is 'a' * or Object., when componentType is 'a.b' */ var storage = {}; target.registerClass = function (clz) { // `type` should not be a "instance member". // If using TS class, should better declared as `static type = 'series.pie'`. // otherwise users have to mount `type` on prototype manually. // For backward compat and enable instance visit type via `this.type`, // we still support fetch `type` from prototype. var componentFullType = clz.type || clz.prototype.type; if (componentFullType) { checkClassType(componentFullType); // If only static type declared, we assign it to prototype mandatorily. clz.prototype.type = componentFullType; var componentTypeInfo = parseClassType(componentFullType); if (!componentTypeInfo.sub) { if (false) { if (storage[componentTypeInfo.main]) { console.warn(componentTypeInfo.main + ' exists.'); } } storage[componentTypeInfo.main] = clz; } else if (componentTypeInfo.sub !== IS_CONTAINER) { var container = makeContainer(componentTypeInfo); container[componentTypeInfo.sub] = clz; } } return clz; }; target.getClass = function (mainType, subType, throwWhenNotFound) { var clz = storage[mainType]; if (clz && clz[IS_CONTAINER]) { clz = subType ? clz[subType] : null; } if (throwWhenNotFound && !clz) { throw new Error(!subType ? mainType + '.' + 'type should be specified.' : 'Component ' + mainType + '.' + (subType || '') + ' is used but not imported.'); } return clz; }; target.getClassesByMainType = function (componentType) { var componentTypeInfo = parseClassType(componentType); var result = []; var obj = storage[componentTypeInfo.main]; if (obj && obj[IS_CONTAINER]) { core_util["each"](obj, function (o, type) { type !== IS_CONTAINER && result.push(o); }); } else { result.push(obj); } return result; }; target.hasClass = function (componentType) { // Just consider componentType.main. var componentTypeInfo = parseClassType(componentType); return !!storage[componentTypeInfo.main]; }; /** * @return Like ['aa', 'bb'], but can not be ['aa.xx'] */ target.getAllClassMainTypes = function () { var types = []; core_util["each"](storage, function (obj, type) { types.push(type); }); return types; }; /** * If a main type is container and has sub types */ target.hasSubTypes = function (componentType) { var componentTypeInfo = parseClassType(componentType); var obj = storage[componentTypeInfo.main]; return obj && obj[IS_CONTAINER]; }; function makeContainer(componentTypeInfo) { var container = storage[componentTypeInfo.main]; if (!container || !container[IS_CONTAINER]) { container = storage[componentTypeInfo.main] = {}; container[IS_CONTAINER] = true; } return container; } } // /** // * @param {string|Array.} properties // */ // export function setReadOnly(obj, properties) { // FIXME It seems broken in IE8 simulation of IE11 // if (!zrUtil.isArray(properties)) { // properties = properties != null ? [properties] : []; // } // zrUtil.each(properties, function (prop) { // let value = obj[prop]; // Object.defineProperty // && Object.defineProperty(obj, prop, { // value: value, writable: false // }); // zrUtil.isArray(obj[prop]) // && Object.freeze // && Object.freeze(obj[prop]); // }); // } // CONCATENATED MODULE: ./node_modules/echarts/lib/model/mixin/makeStyleMapper.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 Parse shadow style // TODO Only shallow path support function makeStyleMapper(properties, ignoreParent) { // Normalize for (var i = 0; i < properties.length; i++) { if (!properties[i][1]) { properties[i][1] = properties[i][0]; } } ignoreParent = ignoreParent || false; return function (model, excludes, includes) { var style = {}; for (var i = 0; i < properties.length; i++) { var propName = properties[i][1]; if (excludes && core_util["indexOf"](excludes, propName) >= 0 || includes && core_util["indexOf"](includes, propName) < 0) { continue; } var val = model.getShallow(propName, ignoreParent); if (val != null) { style[properties[i][0]] = val; } } // TODO Text or image? return style; }; } // CONCATENATED MODULE: ./node_modules/echarts/lib/model/mixin/areaStyle.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 AREA_STYLE_KEY_MAP = [['fill', 'color'], ['shadowBlur'], ['shadowOffsetX'], ['shadowOffsetY'], ['opacity'], ['shadowColor'] // Option decal is in `DecalObject` but style.decal is in `PatternObject`. // So do not transfer decal directly. ]; var getAreaStyle = makeStyleMapper(AREA_STYLE_KEY_MAP); var AreaStyleMixin = /** @class */function () { function AreaStyleMixin() {} AreaStyleMixin.prototype.getAreaStyle = function (excludes, includes) { return getAreaStyle(this, excludes, includes); }; return AreaStyleMixin; }(); ; // CONCATENATED MODULE: ./node_modules/zrender/lib/graphic/helper/image.js var globalImageCache = new LRU["a" /* default */](50); function findExistImage(newImageOrSrc) { if (typeof newImageOrSrc === 'string') { var cachedImgObj = globalImageCache.get(newImageOrSrc); return cachedImgObj && cachedImgObj.image; } else { return newImageOrSrc; } } function createOrUpdateImage(newImageOrSrc, image, hostEl, onload, cbPayload) { if (!newImageOrSrc) { return image; } else if (typeof newImageOrSrc === 'string') { if ((image && image.__zrImageSrc === newImageOrSrc) || !hostEl) { return image; } var cachedImgObj = globalImageCache.get(newImageOrSrc); var pendingWrap = { hostEl: hostEl, cb: onload, cbPayload: cbPayload }; if (cachedImgObj) { image = cachedImgObj.image; !isImageReady(image) && cachedImgObj.pending.push(pendingWrap); } else { image = platform["d" /* platformApi */].loadImage(newImageOrSrc, imageOnLoad, imageOnLoad); image.__zrImageSrc = newImageOrSrc; globalImageCache.put(newImageOrSrc, image.__cachedImgObj = { image: image, pending: [pendingWrap] }); } return image; } else { return newImageOrSrc; } } function imageOnLoad() { var cachedImgObj = this.__cachedImgObj; this.onload = this.onerror = this.__cachedImgObj = null; for (var i = 0; i < cachedImgObj.pending.length; i++) { var pendingWrap = cachedImgObj.pending[i]; var cb = pendingWrap.cb; cb && cb(this, pendingWrap.cbPayload); pendingWrap.hostEl.dirty(); } cachedImgObj.pending.length = 0; } function isImageReady(image) { return image && image.width && image.height; } // CONCATENATED MODULE: ./node_modules/zrender/lib/graphic/helper/parseText.js var STYLE_REG = /\{([a-zA-Z0-9_]+)\|([^}]*)\}/g; function truncateText(text, containerWidth, font, ellipsis, options) { var out = {}; truncateText2(out, text, containerWidth, font, ellipsis, options); return out.text; } function truncateText2(out, text, containerWidth, font, ellipsis, options) { if (!containerWidth) { out.text = ''; out.isTruncated = false; return; } var textLines = (text + '').split('\n'); options = prepareTruncateOptions(containerWidth, font, ellipsis, options); var isTruncated = false; var truncateOut = {}; for (var i = 0, len = textLines.length; i < len; i++) { truncateSingleLine(truncateOut, textLines[i], options); textLines[i] = truncateOut.textLine; isTruncated = isTruncated || truncateOut.isTruncated; } out.text = textLines.join('\n'); out.isTruncated = isTruncated; } function prepareTruncateOptions(containerWidth, font, ellipsis, options) { options = options || {}; var preparedOpts = Object(core_util["extend"])({}, options); preparedOpts.font = font; ellipsis = Object(core_util["retrieve2"])(ellipsis, '...'); preparedOpts.maxIterations = Object(core_util["retrieve2"])(options.maxIterations, 2); var minChar = preparedOpts.minChar = Object(core_util["retrieve2"])(options.minChar, 0); preparedOpts.cnCharWidth = getWidth('国', font); var ascCharWidth = preparedOpts.ascCharWidth = getWidth('a', font); preparedOpts.placeholder = Object(core_util["retrieve2"])(options.placeholder, ''); var contentWidth = containerWidth = Math.max(0, containerWidth - 1); for (var i = 0; i < minChar && contentWidth >= ascCharWidth; i++) { contentWidth -= ascCharWidth; } var ellipsisWidth = getWidth(ellipsis, font); if (ellipsisWidth > contentWidth) { ellipsis = ''; ellipsisWidth = 0; } contentWidth = containerWidth - ellipsisWidth; preparedOpts.ellipsis = ellipsis; preparedOpts.ellipsisWidth = ellipsisWidth; preparedOpts.contentWidth = contentWidth; preparedOpts.containerWidth = containerWidth; return preparedOpts; } function truncateSingleLine(out, textLine, options) { var containerWidth = options.containerWidth; var font = options.font; var contentWidth = options.contentWidth; if (!containerWidth) { out.textLine = ''; out.isTruncated = false; return; } var lineWidth = getWidth(textLine, font); if (lineWidth <= containerWidth) { out.textLine = textLine; out.isTruncated = false; return; } for (var j = 0;; j++) { if (lineWidth <= contentWidth || j >= options.maxIterations) { textLine += options.ellipsis; break; } var subLength = j === 0 ? estimateLength(textLine, contentWidth, options.ascCharWidth, options.cnCharWidth) : lineWidth > 0 ? Math.floor(textLine.length * contentWidth / lineWidth) : 0; textLine = textLine.substr(0, subLength); lineWidth = getWidth(textLine, font); } if (textLine === '') { textLine = options.placeholder; } out.textLine = textLine; out.isTruncated = true; } function estimateLength(text, contentWidth, ascCharWidth, cnCharWidth) { var width = 0; var i = 0; for (var len = text.length; i < len && width < contentWidth; i++) { var charCode = text.charCodeAt(i); width += (0 <= charCode && charCode <= 127) ? ascCharWidth : cnCharWidth; } return i; } function parsePlainText(text, style) { text != null && (text += ''); var overflow = style.overflow; var padding = style.padding; var font = style.font; var truncate = overflow === 'truncate'; var calculatedLineHeight = getLineHeight(font); var lineHeight = Object(core_util["retrieve2"])(style.lineHeight, calculatedLineHeight); var bgColorDrawn = !!(style.backgroundColor); var truncateLineOverflow = style.lineOverflow === 'truncate'; var isTruncated = false; var width = style.width; var lines; if (width != null && (overflow === 'break' || overflow === 'breakAll')) { lines = text ? wrapText(text, style.font, width, overflow === 'breakAll', 0).lines : []; } else { lines = text ? text.split('\n') : []; } var contentHeight = lines.length * lineHeight; var height = Object(core_util["retrieve2"])(style.height, contentHeight); if (contentHeight > height && truncateLineOverflow) { var lineCount = Math.floor(height / lineHeight); isTruncated = isTruncated || (lines.length > lineCount); lines = lines.slice(0, lineCount); } if (text && truncate && width != null) { var options = prepareTruncateOptions(width, font, style.ellipsis, { minChar: style.truncateMinChar, placeholder: style.placeholder }); var singleOut = {}; for (var i = 0; i < lines.length; i++) { truncateSingleLine(singleOut, lines[i], options); lines[i] = singleOut.textLine; isTruncated = isTruncated || singleOut.isTruncated; } } var outerHeight = height; var contentWidth = 0; for (var i = 0; i < lines.length; i++) { contentWidth = Math.max(getWidth(lines[i], font), contentWidth); } if (width == null) { width = contentWidth; } var outerWidth = contentWidth; if (padding) { outerHeight += padding[0] + padding[2]; outerWidth += padding[1] + padding[3]; width += padding[1] + padding[3]; } if (bgColorDrawn) { outerWidth = width; } return { lines: lines, height: height, outerWidth: outerWidth, outerHeight: outerHeight, lineHeight: lineHeight, calculatedLineHeight: calculatedLineHeight, contentWidth: contentWidth, contentHeight: contentHeight, width: width, isTruncated: isTruncated }; } var RichTextToken = (function () { function RichTextToken() { } return RichTextToken; }()); var RichTextLine = (function () { function RichTextLine(tokens) { this.tokens = []; if (tokens) { this.tokens = tokens; } } return RichTextLine; }()); var RichTextContentBlock = (function () { function RichTextContentBlock() { this.width = 0; this.height = 0; this.contentWidth = 0; this.contentHeight = 0; this.outerWidth = 0; this.outerHeight = 0; this.lines = []; this.isTruncated = false; } return RichTextContentBlock; }()); function parseRichText(text, style) { var contentBlock = new RichTextContentBlock(); text != null && (text += ''); if (!text) { return contentBlock; } var topWidth = style.width; var topHeight = style.height; var overflow = style.overflow; var wrapInfo = (overflow === 'break' || overflow === 'breakAll') && topWidth != null ? { width: topWidth, accumWidth: 0, breakAll: overflow === 'breakAll' } : null; var lastIndex = STYLE_REG.lastIndex = 0; var result; while ((result = STYLE_REG.exec(text)) != null) { var matchedIndex = result.index; if (matchedIndex > lastIndex) { pushTokens(contentBlock, text.substring(lastIndex, matchedIndex), style, wrapInfo); } pushTokens(contentBlock, result[2], style, wrapInfo, result[1]); lastIndex = STYLE_REG.lastIndex; } if (lastIndex < text.length) { pushTokens(contentBlock, text.substring(lastIndex, text.length), style, wrapInfo); } var pendingList = []; var calculatedHeight = 0; var calculatedWidth = 0; var stlPadding = style.padding; var truncate = overflow === 'truncate'; var truncateLine = style.lineOverflow === 'truncate'; var tmpTruncateOut = {}; function finishLine(line, lineWidth, lineHeight) { line.width = lineWidth; line.lineHeight = lineHeight; calculatedHeight += lineHeight; calculatedWidth = Math.max(calculatedWidth, lineWidth); } outer: for (var i = 0; i < contentBlock.lines.length; i++) { var line = contentBlock.lines[i]; var lineHeight = 0; var lineWidth = 0; for (var j = 0; j < line.tokens.length; j++) { var token = line.tokens[j]; var tokenStyle = token.styleName && style.rich[token.styleName] || {}; var textPadding = token.textPadding = tokenStyle.padding; var paddingH = textPadding ? textPadding[1] + textPadding[3] : 0; var font = token.font = tokenStyle.font || style.font; token.contentHeight = getLineHeight(font); var tokenHeight = Object(core_util["retrieve2"])(tokenStyle.height, token.contentHeight); token.innerHeight = tokenHeight; textPadding && (tokenHeight += textPadding[0] + textPadding[2]); token.height = tokenHeight; token.lineHeight = Object(core_util["retrieve3"])(tokenStyle.lineHeight, style.lineHeight, tokenHeight); token.align = tokenStyle && tokenStyle.align || style.align; token.verticalAlign = tokenStyle && tokenStyle.verticalAlign || 'middle'; if (truncateLine && topHeight != null && calculatedHeight + token.lineHeight > topHeight) { var originalLength = contentBlock.lines.length; if (j > 0) { line.tokens = line.tokens.slice(0, j); finishLine(line, lineWidth, lineHeight); contentBlock.lines = contentBlock.lines.slice(0, i + 1); } else { contentBlock.lines = contentBlock.lines.slice(0, i); } contentBlock.isTruncated = contentBlock.isTruncated || (contentBlock.lines.length < originalLength); break outer; } var styleTokenWidth = tokenStyle.width; var tokenWidthNotSpecified = styleTokenWidth == null || styleTokenWidth === 'auto'; if (typeof styleTokenWidth === 'string' && styleTokenWidth.charAt(styleTokenWidth.length - 1) === '%') { token.percentWidth = styleTokenWidth; pendingList.push(token); token.contentWidth = getWidth(token.text, font); } else { if (tokenWidthNotSpecified) { var textBackgroundColor = tokenStyle.backgroundColor; var bgImg = textBackgroundColor && textBackgroundColor.image; if (bgImg) { bgImg = findExistImage(bgImg); if (isImageReady(bgImg)) { token.width = Math.max(token.width, bgImg.width * tokenHeight / bgImg.height); } } } var remainTruncWidth = truncate && topWidth != null ? topWidth - lineWidth : null; if (remainTruncWidth != null && remainTruncWidth < token.width) { if (!tokenWidthNotSpecified || remainTruncWidth < paddingH) { token.text = ''; token.width = token.contentWidth = 0; } else { truncateText2(tmpTruncateOut, token.text, remainTruncWidth - paddingH, font, style.ellipsis, { minChar: style.truncateMinChar }); token.text = tmpTruncateOut.text; contentBlock.isTruncated = contentBlock.isTruncated || tmpTruncateOut.isTruncated; token.width = token.contentWidth = getWidth(token.text, font); } } else { token.contentWidth = getWidth(token.text, font); } } token.width += paddingH; lineWidth += token.width; tokenStyle && (lineHeight = Math.max(lineHeight, token.lineHeight)); } finishLine(line, lineWidth, lineHeight); } contentBlock.outerWidth = contentBlock.width = Object(core_util["retrieve2"])(topWidth, calculatedWidth); contentBlock.outerHeight = contentBlock.height = Object(core_util["retrieve2"])(topHeight, calculatedHeight); contentBlock.contentHeight = calculatedHeight; contentBlock.contentWidth = calculatedWidth; if (stlPadding) { contentBlock.outerWidth += stlPadding[1] + stlPadding[3]; contentBlock.outerHeight += stlPadding[0] + stlPadding[2]; } for (var i = 0; i < pendingList.length; i++) { var token = pendingList[i]; var percentWidth = token.percentWidth; token.width = parseInt(percentWidth, 10) / 100 * contentBlock.width; } return contentBlock; } function pushTokens(block, str, style, wrapInfo, styleName) { var isEmptyStr = str === ''; var tokenStyle = styleName && style.rich[styleName] || {}; var lines = block.lines; var font = tokenStyle.font || style.font; var newLine = false; var strLines; var linesWidths; if (wrapInfo) { var tokenPadding = tokenStyle.padding; var tokenPaddingH = tokenPadding ? tokenPadding[1] + tokenPadding[3] : 0; if (tokenStyle.width != null && tokenStyle.width !== 'auto') { var outerWidth_1 = parsePercent(tokenStyle.width, wrapInfo.width) + tokenPaddingH; if (lines.length > 0) { if (outerWidth_1 + wrapInfo.accumWidth > wrapInfo.width) { strLines = str.split('\n'); newLine = true; } } wrapInfo.accumWidth = outerWidth_1; } else { var res = wrapText(str, font, wrapInfo.width, wrapInfo.breakAll, wrapInfo.accumWidth); wrapInfo.accumWidth = res.accumWidth + tokenPaddingH; linesWidths = res.linesWidths; strLines = res.lines; } } else { strLines = str.split('\n'); } for (var i = 0; i < strLines.length; i++) { var text = strLines[i]; var token = new RichTextToken(); token.styleName = styleName; token.text = text; token.isLineHolder = !text && !isEmptyStr; if (typeof tokenStyle.width === 'number') { token.width = tokenStyle.width; } else { token.width = linesWidths ? linesWidths[i] : getWidth(text, font); } if (!i && !newLine) { var tokens = (lines[lines.length - 1] || (lines[0] = new RichTextLine())).tokens; var tokensLen = tokens.length; (tokensLen === 1 && tokens[0].isLineHolder) ? (tokens[0] = token) : ((text || !tokensLen || isEmptyStr) && tokens.push(token)); } else { lines.push(new RichTextLine([token])); } } } function isAlphabeticLetter(ch) { var code = ch.charCodeAt(0); return code >= 0x20 && code <= 0x24F || code >= 0x370 && code <= 0x10FF || code >= 0x1200 && code <= 0x13FF || code >= 0x1E00 && code <= 0x206F; } var breakCharMap = Object(core_util["reduce"])(',&?/;] '.split(''), function (obj, ch) { obj[ch] = true; return obj; }, {}); function isWordBreakChar(ch) { if (isAlphabeticLetter(ch)) { if (breakCharMap[ch]) { return true; } return false; } return true; } function wrapText(text, font, lineWidth, isBreakAll, lastAccumWidth) { var lines = []; var linesWidths = []; var line = ''; var currentWord = ''; var currentWordWidth = 0; var accumWidth = 0; for (var i = 0; i < text.length; i++) { var ch = text.charAt(i); if (ch === '\n') { if (currentWord) { line += currentWord; accumWidth += currentWordWidth; } lines.push(line); linesWidths.push(accumWidth); line = ''; currentWord = ''; currentWordWidth = 0; accumWidth = 0; continue; } var chWidth = getWidth(ch, font); var inWord = isBreakAll ? false : !isWordBreakChar(ch); if (!lines.length ? lastAccumWidth + accumWidth + chWidth > lineWidth : accumWidth + chWidth > lineWidth) { if (!accumWidth) { if (inWord) { lines.push(currentWord); linesWidths.push(currentWordWidth); currentWord = ch; currentWordWidth = chWidth; } else { lines.push(ch); linesWidths.push(chWidth); } } else if (line || currentWord) { if (inWord) { if (!line) { line = currentWord; currentWord = ''; currentWordWidth = 0; accumWidth = currentWordWidth; } lines.push(line); linesWidths.push(accumWidth - currentWordWidth); currentWord += ch; currentWordWidth += chWidth; line = ''; accumWidth = currentWordWidth; } else { if (currentWord) { line += currentWord; currentWord = ''; currentWordWidth = 0; } lines.push(line); linesWidths.push(accumWidth); line = ch; accumWidth = chWidth; } } continue; } accumWidth += chWidth; if (inWord) { currentWord += ch; currentWordWidth += chWidth; } else { if (currentWord) { line += currentWord; currentWord = ''; currentWordWidth = 0; } line += ch; } } if (!lines.length && !line) { line = text; currentWord = ''; currentWordWidth = 0; } if (currentWord) { line += currentWord; } if (line) { lines.push(line); linesWidths.push(accumWidth); } if (lines.length === 1) { accumWidth += lastAccumWidth; } return { accumWidth: accumWidth, lines: lines, linesWidths: linesWidths }; } // CONCATENATED MODULE: ./node_modules/zrender/lib/graphic/Displayable.js var STYLE_MAGIC_KEY = '__zr_style_' + Math.round((Math.random() * 10)); var DEFAULT_COMMON_STYLE = { shadowBlur: 0, shadowOffsetX: 0, shadowOffsetY: 0, shadowColor: '#000', opacity: 1, blend: 'source-over' }; var DEFAULT_COMMON_ANIMATION_PROPS = { style: { shadowBlur: true, shadowOffsetX: true, shadowOffsetY: true, shadowColor: true, opacity: true } }; DEFAULT_COMMON_STYLE[STYLE_MAGIC_KEY] = true; var Displayable_PRIMARY_STATES_KEYS = ['z', 'z2', 'invisible']; var PRIMARY_STATES_KEYS_IN_HOVER_LAYER = ['invisible']; var Displayable_Displayable = (function (_super) { Object(tslib_es6["b" /* __extends */])(Displayable, _super); function Displayable(props) { return _super.call(this, props) || this; } Displayable.prototype._init = function (props) { var keysArr = Object(core_util["keys"])(props); for (var i = 0; i < keysArr.length; i++) { var key = keysArr[i]; if (key === 'style') { this.useStyle(props[key]); } else { _super.prototype.attrKV.call(this, key, props[key]); } } if (!this.style) { this.useStyle({}); } }; Displayable.prototype.beforeBrush = function () { }; Displayable.prototype.afterBrush = function () { }; Displayable.prototype.innerBeforeBrush = function () { }; Displayable.prototype.innerAfterBrush = function () { }; Displayable.prototype.shouldBePainted = function (viewWidth, viewHeight, considerClipPath, considerAncestors) { var m = this.transform; if (this.ignore || this.invisible || this.style.opacity === 0 || (this.culling && isDisplayableCulled(this, viewWidth, viewHeight)) || (m && !m[0] && !m[3])) { return false; } if (considerClipPath && this.__clipPaths) { for (var i = 0; i < this.__clipPaths.length; ++i) { if (this.__clipPaths[i].isZeroArea()) { return false; } } } if (considerAncestors && this.parent) { var parent_1 = this.parent; while (parent_1) { if (parent_1.ignore) { return false; } parent_1 = parent_1.parent; } } return true; }; Displayable.prototype.contain = function (x, y) { return this.rectContain(x, y); }; Displayable.prototype.traverse = function (cb, context) { cb.call(context, this); }; Displayable.prototype.rectContain = function (x, y) { var coord = this.transformCoordToLocal(x, y); var rect = this.getBoundingRect(); return rect.contain(coord[0], coord[1]); }; Displayable.prototype.getPaintRect = function () { var rect = this._paintRect; if (!this._paintRect || this.__dirty) { var transform = this.transform; var elRect = this.getBoundingRect(); var style = this.style; var shadowSize = style.shadowBlur || 0; var shadowOffsetX = style.shadowOffsetX || 0; var shadowOffsetY = style.shadowOffsetY || 0; rect = this._paintRect || (this._paintRect = new core_BoundingRect(0, 0, 0, 0)); if (transform) { core_BoundingRect.applyTransform(rect, elRect, transform); } else { rect.copy(elRect); } if (shadowSize || shadowOffsetX || shadowOffsetY) { rect.width += shadowSize * 2 + Math.abs(shadowOffsetX); rect.height += shadowSize * 2 + Math.abs(shadowOffsetY); rect.x = Math.min(rect.x, rect.x + shadowOffsetX - shadowSize); rect.y = Math.min(rect.y, rect.y + shadowOffsetY - shadowSize); } var tolerance = this.dirtyRectTolerance; if (!rect.isZero()) { rect.x = Math.floor(rect.x - tolerance); rect.y = Math.floor(rect.y - tolerance); rect.width = Math.ceil(rect.width + 1 + tolerance * 2); rect.height = Math.ceil(rect.height + 1 + tolerance * 2); } } return rect; }; Displayable.prototype.setPrevPaintRect = function (paintRect) { if (paintRect) { this._prevPaintRect = this._prevPaintRect || new core_BoundingRect(0, 0, 0, 0); this._prevPaintRect.copy(paintRect); } else { this._prevPaintRect = null; } }; Displayable.prototype.getPrevPaintRect = function () { return this._prevPaintRect; }; Displayable.prototype.animateStyle = function (loop) { return this.animate('style', loop); }; Displayable.prototype.updateDuringAnimation = function (targetKey) { if (targetKey === 'style') { this.dirtyStyle(); } else { this.markRedraw(); } }; Displayable.prototype.attrKV = function (key, value) { if (key !== 'style') { _super.prototype.attrKV.call(this, key, value); } else { if (!this.style) { this.useStyle(value); } else { this.setStyle(value); } } }; Displayable.prototype.setStyle = function (keyOrObj, value) { if (typeof keyOrObj === 'string') { this.style[keyOrObj] = value; } else { Object(core_util["extend"])(this.style, keyOrObj); } this.dirtyStyle(); return this; }; Displayable.prototype.dirtyStyle = function (notRedraw) { if (!notRedraw) { this.markRedraw(); } this.__dirty |= STYLE_CHANGED_BIT; if (this._rect) { this._rect = null; } }; Displayable.prototype.dirty = function () { this.dirtyStyle(); }; Displayable.prototype.styleChanged = function () { return !!(this.__dirty & STYLE_CHANGED_BIT); }; Displayable.prototype.styleUpdated = function () { this.__dirty &= ~STYLE_CHANGED_BIT; }; Displayable.prototype.createStyle = function (obj) { return Object(core_util["createObject"])(DEFAULT_COMMON_STYLE, obj); }; Displayable.prototype.useStyle = function (obj) { if (!obj[STYLE_MAGIC_KEY]) { obj = this.createStyle(obj); } if (this.__inHover) { this.__hoverStyle = obj; } else { this.style = obj; } this.dirtyStyle(); }; Displayable.prototype.isStyleObject = function (obj) { return obj[STYLE_MAGIC_KEY]; }; Displayable.prototype._innerSaveToNormal = function (toState) { _super.prototype._innerSaveToNormal.call(this, toState); var normalState = this._normalState; if (toState.style && !normalState.style) { normalState.style = this._mergeStyle(this.createStyle(), this.style); } this._savePrimaryToNormal(toState, normalState, Displayable_PRIMARY_STATES_KEYS); }; Displayable.prototype._applyStateObj = function (stateName, state, normalState, keepCurrentStates, transition, animationCfg) { _super.prototype._applyStateObj.call(this, stateName, state, normalState, keepCurrentStates, transition, animationCfg); var needsRestoreToNormal = !(state && keepCurrentStates); var targetStyle; if (state && state.style) { if (transition) { if (keepCurrentStates) { targetStyle = state.style; } else { targetStyle = this._mergeStyle(this.createStyle(), normalState.style); this._mergeStyle(targetStyle, state.style); } } else { targetStyle = this._mergeStyle(this.createStyle(), keepCurrentStates ? this.style : normalState.style); this._mergeStyle(targetStyle, state.style); } } else if (needsRestoreToNormal) { targetStyle = normalState.style; } if (targetStyle) { if (transition) { var sourceStyle = this.style; this.style = this.createStyle(needsRestoreToNormal ? {} : sourceStyle); if (needsRestoreToNormal) { var changedKeys = Object(core_util["keys"])(sourceStyle); for (var i = 0; i < changedKeys.length; i++) { var key = changedKeys[i]; if (key in targetStyle) { targetStyle[key] = targetStyle[key]; this.style[key] = sourceStyle[key]; } } } var targetKeys = Object(core_util["keys"])(targetStyle); for (var i = 0; i < targetKeys.length; i++) { var key = targetKeys[i]; this.style[key] = this.style[key]; } this._transitionState(stateName, { style: targetStyle }, animationCfg, this.getAnimationStyleProps()); } else { this.useStyle(targetStyle); } } var statesKeys = this.__inHover ? PRIMARY_STATES_KEYS_IN_HOVER_LAYER : Displayable_PRIMARY_STATES_KEYS; for (var i = 0; i < statesKeys.length; i++) { var key = statesKeys[i]; if (state && state[key] != null) { this[key] = state[key]; } else if (needsRestoreToNormal) { if (normalState[key] != null) { this[key] = normalState[key]; } } } }; Displayable.prototype._mergeStates = function (states) { var mergedState = _super.prototype._mergeStates.call(this, states); var mergedStyle; for (var i = 0; i < states.length; i++) { var state = states[i]; if (state.style) { mergedStyle = mergedStyle || {}; this._mergeStyle(mergedStyle, state.style); } } if (mergedStyle) { mergedState.style = mergedStyle; } return mergedState; }; Displayable.prototype._mergeStyle = function (targetStyle, sourceStyle) { Object(core_util["extend"])(targetStyle, sourceStyle); return targetStyle; }; Displayable.prototype.getAnimationStyleProps = function () { return DEFAULT_COMMON_ANIMATION_PROPS; }; Displayable.initDefaultProps = (function () { var dispProto = Displayable.prototype; dispProto.type = 'displayable'; dispProto.invisible = false; dispProto.z = 0; dispProto.z2 = 0; dispProto.zlevel = 0; dispProto.culling = false; dispProto.cursor = 'pointer'; dispProto.rectHover = false; dispProto.incremental = false; dispProto._rect = null; dispProto.dirtyRectTolerance = 0; dispProto.__dirty = REDRAW_BIT | STYLE_CHANGED_BIT; })(); return Displayable; }(lib_Element)); var Displayable_tmpRect = new core_BoundingRect(0, 0, 0, 0); var Displayable_viewRect = new core_BoundingRect(0, 0, 0, 0); function isDisplayableCulled(el, width, height) { Displayable_tmpRect.copy(el.getBoundingRect()); if (el.transform) { Displayable_tmpRect.applyTransform(el.transform); } Displayable_viewRect.width = width; Displayable_viewRect.height = height; return !Displayable_tmpRect.intersect(Displayable_viewRect); } /* harmony default export */ var graphic_Displayable = (Displayable_Displayable); // CONCATENATED MODULE: ./node_modules/zrender/lib/core/bbox.js var bbox_mathMin = Math.min; var bbox_mathMax = Math.max; var bbox_mathSin = Math.sin; var bbox_mathCos = Math.cos; var bbox_PI2 = Math.PI * 2; var bbox_start = vector_create(); var bbox_end = vector_create(); var extremity = vector_create(); function fromPoints(points, min, max) { if (points.length === 0) { return; } var p = points[0]; var left = p[0]; var right = p[0]; var top = p[1]; var bottom = p[1]; for (var i = 1; i < points.length; i++) { p = points[i]; left = bbox_mathMin(left, p[0]); right = bbox_mathMax(right, p[0]); top = bbox_mathMin(top, p[1]); bottom = bbox_mathMax(bottom, p[1]); } min[0] = left; min[1] = top; max[0] = right; max[1] = bottom; } function fromLine(x0, y0, x1, y1, min, max) { min[0] = bbox_mathMin(x0, x1); min[1] = bbox_mathMin(y0, y1); max[0] = bbox_mathMax(x0, x1); max[1] = bbox_mathMax(y0, y1); } var xDim = []; var yDim = []; function fromCubic(x0, y0, x1, y1, x2, y2, x3, y3, min, max) { var cubicExtrema = curve_cubicExtrema; var cubicAt = curve_cubicAt; var n = cubicExtrema(x0, x1, x2, x3, xDim); min[0] = Infinity; min[1] = Infinity; max[0] = -Infinity; max[1] = -Infinity; for (var i = 0; i < n; i++) { var x = cubicAt(x0, x1, x2, x3, xDim[i]); min[0] = bbox_mathMin(x, min[0]); max[0] = bbox_mathMax(x, max[0]); } n = cubicExtrema(y0, y1, y2, y3, yDim); for (var i = 0; i < n; i++) { var y = cubicAt(y0, y1, y2, y3, yDim[i]); min[1] = bbox_mathMin(y, min[1]); max[1] = bbox_mathMax(y, max[1]); } min[0] = bbox_mathMin(x0, min[0]); max[0] = bbox_mathMax(x0, max[0]); min[0] = bbox_mathMin(x3, min[0]); max[0] = bbox_mathMax(x3, max[0]); min[1] = bbox_mathMin(y0, min[1]); max[1] = bbox_mathMax(y0, max[1]); min[1] = bbox_mathMin(y3, min[1]); max[1] = bbox_mathMax(y3, max[1]); } function fromQuadratic(x0, y0, x1, y1, x2, y2, min, max) { var quadraticExtremum = curve_quadraticExtremum; var quadraticAt = curve_quadraticAt; var tx = bbox_mathMax(bbox_mathMin(quadraticExtremum(x0, x1, x2), 1), 0); var ty = bbox_mathMax(bbox_mathMin(quadraticExtremum(y0, y1, y2), 1), 0); var x = quadraticAt(x0, x1, x2, tx); var y = quadraticAt(y0, y1, y2, ty); min[0] = bbox_mathMin(x0, x2, x); min[1] = bbox_mathMin(y0, y2, y); max[0] = bbox_mathMax(x0, x2, x); max[1] = bbox_mathMax(y0, y2, y); } function fromArc(x, y, rx, ry, startAngle, endAngle, anticlockwise, min, max) { var vec2Min = vector_min; var vec2Max = vector_max; var diff = Math.abs(startAngle - endAngle); if (diff % bbox_PI2 < 1e-4 && diff > 1e-4) { min[0] = x - rx; min[1] = y - ry; max[0] = x + rx; max[1] = y + ry; return; } bbox_start[0] = bbox_mathCos(startAngle) * rx + x; bbox_start[1] = bbox_mathSin(startAngle) * ry + y; bbox_end[0] = bbox_mathCos(endAngle) * rx + x; bbox_end[1] = bbox_mathSin(endAngle) * ry + y; vec2Min(min, bbox_start, bbox_end); vec2Max(max, bbox_start, bbox_end); startAngle = startAngle % (bbox_PI2); if (startAngle < 0) { startAngle = startAngle + bbox_PI2; } endAngle = endAngle % (bbox_PI2); if (endAngle < 0) { endAngle = endAngle + bbox_PI2; } if (startAngle > endAngle && !anticlockwise) { endAngle += bbox_PI2; } else if (startAngle < endAngle && anticlockwise) { startAngle += bbox_PI2; } if (anticlockwise) { var tmp = endAngle; endAngle = startAngle; startAngle = tmp; } for (var angle = 0; angle < endAngle; angle += Math.PI / 2) { if (angle > startAngle) { extremity[0] = bbox_mathCos(angle) * rx + x; extremity[1] = bbox_mathSin(angle) * ry + y; vec2Min(min, extremity, min); vec2Max(max, extremity, max); } } } // CONCATENATED MODULE: ./node_modules/zrender/lib/core/PathProxy.js var PathProxy_CMD = { M: 1, L: 2, C: 3, Q: 4, A: 5, Z: 6, R: 7 }; var tmpOutX = []; var tmpOutY = []; var PathProxy_min = []; var PathProxy_max = []; var PathProxy_min2 = []; var PathProxy_max2 = []; var PathProxy_mathMin = Math.min; var PathProxy_mathMax = Math.max; var PathProxy_mathCos = Math.cos; var PathProxy_mathSin = Math.sin; var mathAbs = Math.abs; var PathProxy_PI = Math.PI; var PathProxy_PI2 = PathProxy_PI * 2; var hasTypedArray = typeof Float32Array !== 'undefined'; var tmpAngles = []; function modPI2(radian) { var n = Math.round(radian / PathProxy_PI * 1e8) / 1e8; return (n % 2) * PathProxy_PI; } function normalizeArcAngles(angles, anticlockwise) { var newStartAngle = modPI2(angles[0]); if (newStartAngle < 0) { newStartAngle += PathProxy_PI2; } var delta = newStartAngle - angles[0]; var newEndAngle = angles[1]; newEndAngle += delta; if (!anticlockwise && newEndAngle - newStartAngle >= PathProxy_PI2) { newEndAngle = newStartAngle + PathProxy_PI2; } else if (anticlockwise && newStartAngle - newEndAngle >= PathProxy_PI2) { newEndAngle = newStartAngle - PathProxy_PI2; } else if (!anticlockwise && newStartAngle > newEndAngle) { newEndAngle = newStartAngle + (PathProxy_PI2 - modPI2(newStartAngle - newEndAngle)); } else if (anticlockwise && newStartAngle < newEndAngle) { newEndAngle = newStartAngle - (PathProxy_PI2 - modPI2(newEndAngle - newStartAngle)); } angles[0] = newStartAngle; angles[1] = newEndAngle; } var PathProxy_PathProxy = (function () { function PathProxy(notSaveData) { this.dpr = 1; this._xi = 0; this._yi = 0; this._x0 = 0; this._y0 = 0; this._len = 0; if (notSaveData) { this._saveData = false; } if (this._saveData) { this.data = []; } } PathProxy.prototype.increaseVersion = function () { this._version++; }; PathProxy.prototype.getVersion = function () { return this._version; }; PathProxy.prototype.setScale = function (sx, sy, segmentIgnoreThreshold) { segmentIgnoreThreshold = segmentIgnoreThreshold || 0; if (segmentIgnoreThreshold > 0) { this._ux = mathAbs(segmentIgnoreThreshold / devicePixelRatio / sx) || 0; this._uy = mathAbs(segmentIgnoreThreshold / devicePixelRatio / sy) || 0; } }; PathProxy.prototype.setDPR = function (dpr) { this.dpr = dpr; }; PathProxy.prototype.setContext = function (ctx) { this._ctx = ctx; }; PathProxy.prototype.getContext = function () { return this._ctx; }; PathProxy.prototype.beginPath = function () { this._ctx && this._ctx.beginPath(); this.reset(); return this; }; PathProxy.prototype.reset = function () { if (this._saveData) { this._len = 0; } if (this._pathSegLen) { this._pathSegLen = null; this._pathLen = 0; } this._version++; }; PathProxy.prototype.moveTo = function (x, y) { this._drawPendingPt(); this.addData(PathProxy_CMD.M, x, y); this._ctx && this._ctx.moveTo(x, y); this._x0 = x; this._y0 = y; this._xi = x; this._yi = y; return this; }; PathProxy.prototype.lineTo = function (x, y) { var dx = mathAbs(x - this._xi); var dy = mathAbs(y - this._yi); var exceedUnit = dx > this._ux || dy > this._uy; this.addData(PathProxy_CMD.L, x, y); if (this._ctx && exceedUnit) { this._ctx.lineTo(x, y); } if (exceedUnit) { this._xi = x; this._yi = y; this._pendingPtDist = 0; } else { var d2 = dx * dx + dy * dy; if (d2 > this._pendingPtDist) { this._pendingPtX = x; this._pendingPtY = y; this._pendingPtDist = d2; } } return this; }; PathProxy.prototype.bezierCurveTo = function (x1, y1, x2, y2, x3, y3) { this._drawPendingPt(); this.addData(PathProxy_CMD.C, x1, y1, x2, y2, x3, y3); if (this._ctx) { this._ctx.bezierCurveTo(x1, y1, x2, y2, x3, y3); } this._xi = x3; this._yi = y3; return this; }; PathProxy.prototype.quadraticCurveTo = function (x1, y1, x2, y2) { this._drawPendingPt(); this.addData(PathProxy_CMD.Q, x1, y1, x2, y2); if (this._ctx) { this._ctx.quadraticCurveTo(x1, y1, x2, y2); } this._xi = x2; this._yi = y2; return this; }; PathProxy.prototype.arc = function (cx, cy, r, startAngle, endAngle, anticlockwise) { this._drawPendingPt(); tmpAngles[0] = startAngle; tmpAngles[1] = endAngle; normalizeArcAngles(tmpAngles, anticlockwise); startAngle = tmpAngles[0]; endAngle = tmpAngles[1]; var delta = endAngle - startAngle; this.addData(PathProxy_CMD.A, cx, cy, r, r, startAngle, delta, 0, anticlockwise ? 0 : 1); this._ctx && this._ctx.arc(cx, cy, r, startAngle, endAngle, anticlockwise); this._xi = PathProxy_mathCos(endAngle) * r + cx; this._yi = PathProxy_mathSin(endAngle) * r + cy; return this; }; PathProxy.prototype.arcTo = function (x1, y1, x2, y2, radius) { this._drawPendingPt(); if (this._ctx) { this._ctx.arcTo(x1, y1, x2, y2, radius); } return this; }; PathProxy.prototype.rect = function (x, y, w, h) { this._drawPendingPt(); this._ctx && this._ctx.rect(x, y, w, h); this.addData(PathProxy_CMD.R, x, y, w, h); return this; }; PathProxy.prototype.closePath = function () { this._drawPendingPt(); this.addData(PathProxy_CMD.Z); var ctx = this._ctx; var x0 = this._x0; var y0 = this._y0; if (ctx) { ctx.closePath(); } this._xi = x0; this._yi = y0; return this; }; PathProxy.prototype.fill = function (ctx) { ctx && ctx.fill(); this.toStatic(); }; PathProxy.prototype.stroke = function (ctx) { ctx && ctx.stroke(); this.toStatic(); }; PathProxy.prototype.len = function () { return this._len; }; PathProxy.prototype.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; }; PathProxy.prototype.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; }; PathProxy.prototype.addData = function (cmd, a, b, c, d, e, f, g, h) { if (!this._saveData) { return; } var data = this.data; if (this._len + arguments.length > data.length) { this._expandData(); data = this.data; } for (var i = 0; i < arguments.length; i++) { data[this._len++] = arguments[i]; } }; PathProxy.prototype._drawPendingPt = function () { if (this._pendingPtDist > 0) { this._ctx && this._ctx.lineTo(this._pendingPtX, this._pendingPtY); this._pendingPtDist = 0; } }; PathProxy.prototype._expandData = function () { if (!(this.data instanceof Array)) { var newData = []; for (var i = 0; i < this._len; i++) { newData[i] = this.data[i]; } this.data = newData; } }; PathProxy.prototype.toStatic = function () { if (!this._saveData) { return; } this._drawPendingPt(); var data = this.data; if (data instanceof Array) { data.length = this._len; if (hasTypedArray && this._len > 11) { this.data = new Float32Array(data); } } }; PathProxy.prototype.getBoundingRect = function () { PathProxy_min[0] = PathProxy_min[1] = PathProxy_min2[0] = PathProxy_min2[1] = Number.MAX_VALUE; PathProxy_max[0] = PathProxy_max[1] = PathProxy_max2[0] = PathProxy_max2[1] = -Number.MAX_VALUE; var data = this.data; var xi = 0; var yi = 0; var x0 = 0; var y0 = 0; var i; for (i = 0; i < this._len;) { var cmd = data[i++]; var isFirst = i === 1; if (isFirst) { xi = data[i]; yi = data[i + 1]; x0 = xi; y0 = yi; } switch (cmd) { case PathProxy_CMD.M: xi = x0 = data[i++]; yi = y0 = data[i++]; PathProxy_min2[0] = x0; PathProxy_min2[1] = y0; PathProxy_max2[0] = x0; PathProxy_max2[1] = y0; break; case PathProxy_CMD.L: fromLine(xi, yi, data[i], data[i + 1], PathProxy_min2, PathProxy_max2); xi = data[i++]; yi = data[i++]; break; case PathProxy_CMD.C: fromCubic(xi, yi, data[i++], data[i++], data[i++], data[i++], data[i], data[i + 1], PathProxy_min2, PathProxy_max2); xi = data[i++]; yi = data[i++]; break; case PathProxy_CMD.Q: fromQuadratic(xi, yi, data[i++], data[i++], data[i], data[i + 1], PathProxy_min2, PathProxy_max2); xi = data[i++]; yi = data[i++]; break; case PathProxy_CMD.A: 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; i += 1; var anticlockwise = !data[i++]; if (isFirst) { x0 = PathProxy_mathCos(startAngle) * rx + cx; y0 = PathProxy_mathSin(startAngle) * ry + cy; } fromArc(cx, cy, rx, ry, startAngle, endAngle, anticlockwise, PathProxy_min2, PathProxy_max2); xi = PathProxy_mathCos(endAngle) * rx + cx; yi = PathProxy_mathSin(endAngle) * ry + cy; break; case PathProxy_CMD.R: x0 = xi = data[i++]; y0 = yi = data[i++]; var width = data[i++]; var height = data[i++]; fromLine(x0, y0, x0 + width, y0 + height, PathProxy_min2, PathProxy_max2); break; case PathProxy_CMD.Z: xi = x0; yi = y0; break; } vector_min(PathProxy_min, PathProxy_min, PathProxy_min2); vector_max(PathProxy_max, PathProxy_max, PathProxy_max2); } if (i === 0) { PathProxy_min[0] = PathProxy_min[1] = PathProxy_max[0] = PathProxy_max[1] = 0; } return new core_BoundingRect(PathProxy_min[0], PathProxy_min[1], PathProxy_max[0] - PathProxy_min[0], PathProxy_max[1] - PathProxy_min[1]); }; PathProxy.prototype._calculateLength = function () { var data = this.data; var len = this._len; var ux = this._ux; var uy = this._uy; var xi = 0; var yi = 0; var x0 = 0; var y0 = 0; if (!this._pathSegLen) { this._pathSegLen = []; } var pathSegLen = this._pathSegLen; var pathTotalLen = 0; var segCount = 0; for (var i = 0; i < len;) { var cmd = data[i++]; var isFirst = i === 1; if (isFirst) { xi = data[i]; yi = data[i + 1]; x0 = xi; y0 = yi; } var l = -1; switch (cmd) { case PathProxy_CMD.M: xi = x0 = data[i++]; yi = y0 = data[i++]; break; case PathProxy_CMD.L: { var x2 = data[i++]; var y2 = data[i++]; var dx = x2 - xi; var dy = y2 - yi; if (mathAbs(dx) > ux || mathAbs(dy) > uy || i === len - 1) { l = Math.sqrt(dx * dx + dy * dy); xi = x2; yi = y2; } break; } case PathProxy_CMD.C: { var x1 = data[i++]; var y1 = data[i++]; var x2 = data[i++]; var y2 = data[i++]; var x3 = data[i++]; var y3 = data[i++]; l = cubicLength(xi, yi, x1, y1, x2, y2, x3, y3, 10); xi = x3; yi = y3; break; } case PathProxy_CMD.Q: { var x1 = data[i++]; var y1 = data[i++]; var x2 = data[i++]; var y2 = data[i++]; l = quadraticLength(xi, yi, x1, y1, x2, y2, 10); xi = x2; yi = y2; break; } case PathProxy_CMD.A: var cx = data[i++]; var cy = data[i++]; var rx = data[i++]; var ry = data[i++]; var startAngle = data[i++]; var delta = data[i++]; var endAngle = delta + startAngle; i += 1; if (isFirst) { x0 = PathProxy_mathCos(startAngle) * rx + cx; y0 = PathProxy_mathSin(startAngle) * ry + cy; } l = PathProxy_mathMax(rx, ry) * PathProxy_mathMin(PathProxy_PI2, Math.abs(delta)); xi = PathProxy_mathCos(endAngle) * rx + cx; yi = PathProxy_mathSin(endAngle) * ry + cy; break; case PathProxy_CMD.R: { x0 = xi = data[i++]; y0 = yi = data[i++]; var width = data[i++]; var height = data[i++]; l = width * 2 + height * 2; break; } case PathProxy_CMD.Z: { var dx = x0 - xi; var dy = y0 - yi; l = Math.sqrt(dx * dx + dy * dy); xi = x0; yi = y0; break; } } if (l >= 0) { pathSegLen[segCount++] = l; pathTotalLen += l; } } this._pathLen = pathTotalLen; return pathTotalLen; }; PathProxy.prototype.rebuildPath = function (ctx, percent) { var d = this.data; var ux = this._ux; var uy = this._uy; var len = this._len; var x0; var y0; var xi; var yi; var x; var y; var drawPart = percent < 1; var pathSegLen; var pathTotalLen; var accumLength = 0; var segCount = 0; var displayedLength; var pendingPtDist = 0; var pendingPtX; var pendingPtY; if (drawPart) { if (!this._pathSegLen) { this._calculateLength(); } pathSegLen = this._pathSegLen; pathTotalLen = this._pathLen; displayedLength = percent * pathTotalLen; if (!displayedLength) { return; } } lo: for (var i = 0; i < len;) { var cmd = d[i++]; var isFirst = i === 1; if (isFirst) { xi = d[i]; yi = d[i + 1]; x0 = xi; y0 = yi; } if (cmd !== PathProxy_CMD.L && pendingPtDist > 0) { ctx.lineTo(pendingPtX, pendingPtY); pendingPtDist = 0; } switch (cmd) { case PathProxy_CMD.M: x0 = xi = d[i++]; y0 = yi = d[i++]; ctx.moveTo(xi, yi); break; case PathProxy_CMD.L: { x = d[i++]; y = d[i++]; var dx = mathAbs(x - xi); var dy = mathAbs(y - yi); if (dx > ux || dy > uy) { if (drawPart) { var l = pathSegLen[segCount++]; if (accumLength + l > displayedLength) { var t = (displayedLength - accumLength) / l; ctx.lineTo(xi * (1 - t) + x * t, yi * (1 - t) + y * t); break lo; } accumLength += l; } ctx.lineTo(x, y); xi = x; yi = y; pendingPtDist = 0; } else { var d2 = dx * dx + dy * dy; if (d2 > pendingPtDist) { pendingPtX = x; pendingPtY = y; pendingPtDist = d2; } } break; } case PathProxy_CMD.C: { var x1 = d[i++]; var y1 = d[i++]; var x2 = d[i++]; var y2 = d[i++]; var x3 = d[i++]; var y3 = d[i++]; if (drawPart) { var l = pathSegLen[segCount++]; if (accumLength + l > displayedLength) { var t = (displayedLength - accumLength) / l; cubicSubdivide(xi, x1, x2, x3, t, tmpOutX); cubicSubdivide(yi, y1, y2, y3, t, tmpOutY); ctx.bezierCurveTo(tmpOutX[1], tmpOutY[1], tmpOutX[2], tmpOutY[2], tmpOutX[3], tmpOutY[3]); break lo; } accumLength += l; } ctx.bezierCurveTo(x1, y1, x2, y2, x3, y3); xi = x3; yi = y3; break; } case PathProxy_CMD.Q: { var x1 = d[i++]; var y1 = d[i++]; var x2 = d[i++]; var y2 = d[i++]; if (drawPart) { var l = pathSegLen[segCount++]; if (accumLength + l > displayedLength) { var t = (displayedLength - accumLength) / l; curve_quadraticSubdivide(xi, x1, x2, t, tmpOutX); curve_quadraticSubdivide(yi, y1, y2, t, tmpOutY); ctx.quadraticCurveTo(tmpOutX[1], tmpOutY[1], tmpOutX[2], tmpOutY[2]); break lo; } accumLength += l; } ctx.quadraticCurveTo(x1, y1, x2, y2); xi = x2; yi = y2; break; } case PathProxy_CMD.A: var cx = d[i++]; var cy = d[i++]; var rx = d[i++]; var ry = d[i++]; var startAngle = d[i++]; var delta = d[i++]; var psi = d[i++]; var anticlockwise = !d[i++]; var r = (rx > ry) ? rx : ry; var isEllipse = mathAbs(rx - ry) > 1e-3; var endAngle = startAngle + delta; var breakBuild = false; if (drawPart) { var l = pathSegLen[segCount++]; if (accumLength + l > displayedLength) { endAngle = startAngle + delta * (displayedLength - accumLength) / l; breakBuild = true; } accumLength += l; } if (isEllipse && ctx.ellipse) { ctx.ellipse(cx, cy, rx, ry, psi, startAngle, endAngle, anticlockwise); } else { ctx.arc(cx, cy, r, startAngle, endAngle, anticlockwise); } if (breakBuild) { break lo; } if (isFirst) { x0 = PathProxy_mathCos(startAngle) * rx + cx; y0 = PathProxy_mathSin(startAngle) * ry + cy; } xi = PathProxy_mathCos(endAngle) * rx + cx; yi = PathProxy_mathSin(endAngle) * ry + cy; break; case PathProxy_CMD.R: x0 = xi = d[i]; y0 = yi = d[i + 1]; x = d[i++]; y = d[i++]; var width = d[i++]; var height = d[i++]; if (drawPart) { var l = pathSegLen[segCount++]; if (accumLength + l > displayedLength) { var d_1 = displayedLength - accumLength; ctx.moveTo(x, y); ctx.lineTo(x + PathProxy_mathMin(d_1, width), y); d_1 -= width; if (d_1 > 0) { ctx.lineTo(x + width, y + PathProxy_mathMin(d_1, height)); } d_1 -= height; if (d_1 > 0) { ctx.lineTo(x + PathProxy_mathMax(width - d_1, 0), y + height); } d_1 -= width; if (d_1 > 0) { ctx.lineTo(x, y + PathProxy_mathMax(height - d_1, 0)); } break lo; } accumLength += l; } ctx.rect(x, y, width, height); break; case PathProxy_CMD.Z: if (drawPart) { var l = pathSegLen[segCount++]; if (accumLength + l > displayedLength) { var t = (displayedLength - accumLength) / l; ctx.lineTo(xi * (1 - t) + x0 * t, yi * (1 - t) + y0 * t); break lo; } accumLength += l; } ctx.closePath(); xi = x0; yi = y0; } } }; PathProxy.prototype.clone = function () { var newProxy = new PathProxy(); var data = this.data; newProxy.data = data.slice ? data.slice() : Array.prototype.slice.call(data); newProxy._len = this._len; return newProxy; }; PathProxy.CMD = PathProxy_CMD; PathProxy.initDefaultProps = (function () { var proto = PathProxy.prototype; proto._saveData = true; proto._ux = 0; proto._uy = 0; proto._pendingPtDist = 0; proto._version = 0; })(); return PathProxy; }()); /* harmony default export */ var core_PathProxy = (PathProxy_PathProxy); // CONCATENATED MODULE: ./node_modules/zrender/lib/contain/line.js function containStroke(x0, y0, x1, y1, lineWidth, x, y) { if (lineWidth === 0) { return false; } var _l = lineWidth; var _a = 0; var _b = x0; if ((y > y0 + _l && y > y1 + _l) || (y < y0 - _l && y < y1 - _l) || (x > x0 + _l && x > x1 + _l) || (x < x0 - _l && x < x1 - _l)) { return false; } if (x0 !== x1) { _a = (y0 - y1) / (x0 - x1); _b = (x0 * y1 - x1 * y0) / (x0 - x1); } else { return Math.abs(x - x0) <= _l / 2; } var tmp = _a * x - y + _b; var _s = tmp * tmp / (_a * _a + 1); return _s <= _l / 2 * _l / 2; } // CONCATENATED MODULE: ./node_modules/zrender/lib/contain/cubic.js function cubic_containStroke(x0, y0, x1, y1, x2, y2, x3, y3, lineWidth, x, y) { if (lineWidth === 0) { return false; } var _l = lineWidth; if ((y > y0 + _l && y > y1 + _l && y > y2 + _l && y > y3 + _l) || (y < y0 - _l && y < y1 - _l && y < y2 - _l && y < y3 - _l) || (x > x0 + _l && x > x1 + _l && x > x2 + _l && x > x3 + _l) || (x < x0 - _l && x < x1 - _l && x < x2 - _l && x < x3 - _l)) { return false; } var d = cubicProjectPoint(x0, y0, x1, y1, x2, y2, x3, y3, x, y, null); return d <= _l / 2; } // CONCATENATED MODULE: ./node_modules/zrender/lib/contain/quadratic.js function quadratic_containStroke(x0, y0, x1, y1, x2, y2, lineWidth, x, y) { if (lineWidth === 0) { return false; } var _l = lineWidth; if ((y > y0 + _l && y > y1 + _l && y > y2 + _l) || (y < y0 - _l && y < y1 - _l && y < y2 - _l) || (x > x0 + _l && x > x1 + _l && x > x2 + _l) || (x < x0 - _l && x < x1 - _l && x < x2 - _l)) { return false; } var d = quadraticProjectPoint(x0, y0, x1, y1, x2, y2, x, y, null); return d <= _l / 2; } // CONCATENATED MODULE: ./node_modules/zrender/lib/contain/util.js var util_PI2 = Math.PI * 2; function normalizeRadian(angle) { angle %= util_PI2; if (angle < 0) { angle += util_PI2; } return angle; } // CONCATENATED MODULE: ./node_modules/zrender/lib/contain/arc.js var arc_PI2 = Math.PI * 2; function arc_containStroke(cx, cy, r, startAngle, endAngle, anticlockwise, lineWidth, x, y) { if (lineWidth === 0) { return false; } var _l = lineWidth; x -= cx; y -= cy; var d = Math.sqrt(x * x + y * y); if ((d - _l > r) || (d + _l < r)) { return false; } if (Math.abs(startAngle - endAngle) % arc_PI2 < 1e-4) { return true; } if (anticlockwise) { var tmp = startAngle; startAngle = normalizeRadian(endAngle); endAngle = normalizeRadian(tmp); } else { startAngle = normalizeRadian(startAngle); endAngle = normalizeRadian(endAngle); } if (startAngle > endAngle) { endAngle += arc_PI2; } var angle = Math.atan2(y, x); if (angle < 0) { angle += arc_PI2; } return (angle >= startAngle && angle <= endAngle) || (angle + arc_PI2 >= startAngle && angle + arc_PI2 <= endAngle); } // CONCATENATED MODULE: ./node_modules/zrender/lib/contain/windingLine.js function windingLine(x0, y0, x1, y1, x, y) { if ((y > y0 && y > y1) || (y < y0 && y < y1)) { return 0; } if (y1 === y0) { return 0; } var t = (y - y0) / (y1 - y0); var dir = y1 < y0 ? 1 : -1; if (t === 1 || t === 0) { dir = y1 < y0 ? 0.5 : -0.5; } var x_ = t * (x1 - x0) + x0; return x_ === x ? Infinity : x_ > x ? dir : 0; } // CONCATENATED MODULE: ./node_modules/zrender/lib/contain/path.js var path_CMD = core_PathProxy.CMD; var path_PI2 = Math.PI * 2; var path_EPSILON = 1e-4; function isAroundEqual(a, b) { return Math.abs(a - b) < path_EPSILON; } var path_roots = [-1, -1, -1]; var extrema = [-1, -1]; function swapExtrema() { var tmp = extrema[0]; extrema[0] = extrema[1]; extrema[1] = tmp; } function windingCubic(x0, y0, x1, y1, x2, y2, x3, y3, x, y) { if ((y > y0 && y > y1 && y > y2 && y > y3) || (y < y0 && y < y1 && y < y2 && y < y3)) { return 0; } var nRoots = cubicRootAt(y0, y1, y2, y3, y, path_roots); if (nRoots === 0) { return 0; } else { var w = 0; var nExtrema = -1; var y0_ = void 0; var y1_ = void 0; for (var i = 0; i < nRoots; i++) { var t = path_roots[i]; var unit = (t === 0 || t === 1) ? 0.5 : 1; var x_ = curve_cubicAt(x0, x1, x2, x3, t); if (x_ < x) { continue; } if (nExtrema < 0) { nExtrema = curve_cubicExtrema(y0, y1, y2, y3, extrema); if (extrema[1] < extrema[0] && nExtrema > 1) { swapExtrema(); } y0_ = curve_cubicAt(y0, y1, y2, y3, extrema[0]); if (nExtrema > 1) { y1_ = curve_cubicAt(y0, y1, y2, y3, extrema[1]); } } if (nExtrema === 2) { if (t < extrema[0]) { w += y0_ < y0 ? unit : -unit; } else if (t < extrema[1]) { w += y1_ < y0_ ? unit : -unit; } else { w += y3 < y1_ ? unit : -unit; } } else { if (t < extrema[0]) { w += y0_ < y0 ? unit : -unit; } else { w += y3 < y0_ ? unit : -unit; } } } return w; } } function windingQuadratic(x0, y0, x1, y1, x2, y2, x, y) { if ((y > y0 && y > y1 && y > y2) || (y < y0 && y < y1 && y < y2)) { return 0; } var nRoots = quadraticRootAt(y0, y1, y2, y, path_roots); if (nRoots === 0) { return 0; } else { var t = curve_quadraticExtremum(y0, y1, y2); if (t >= 0 && t <= 1) { var w = 0; var y_ = curve_quadraticAt(y0, y1, y2, t); for (var i = 0; i < nRoots; i++) { var unit = (path_roots[i] === 0 || path_roots[i] === 1) ? 0.5 : 1; var x_ = curve_quadraticAt(x0, x1, x2, path_roots[i]); if (x_ < x) { continue; } if (path_roots[i] < t) { w += y_ < y0 ? unit : -unit; } else { w += y2 < y_ ? unit : -unit; } } return w; } else { var unit = (path_roots[0] === 0 || path_roots[0] === 1) ? 0.5 : 1; var x_ = curve_quadraticAt(x0, x1, x2, path_roots[0]); if (x_ < x) { return 0; } return y2 < y0 ? unit : -unit; } } } function windingArc(cx, cy, r, startAngle, endAngle, anticlockwise, x, y) { y -= cy; if (y > r || y < -r) { return 0; } var tmp = Math.sqrt(r * r - y * y); path_roots[0] = -tmp; path_roots[1] = tmp; var dTheta = Math.abs(startAngle - endAngle); if (dTheta < 1e-4) { return 0; } if (dTheta >= path_PI2 - 1e-4) { startAngle = 0; endAngle = path_PI2; var dir = anticlockwise ? 1 : -1; if (x >= path_roots[0] + cx && x <= path_roots[1] + cx) { return dir; } else { return 0; } } if (startAngle > endAngle) { var tmp_1 = startAngle; startAngle = endAngle; endAngle = tmp_1; } if (startAngle < 0) { startAngle += path_PI2; endAngle += path_PI2; } var w = 0; for (var i = 0; i < 2; i++) { var x_ = path_roots[i]; if (x_ + cx > x) { var angle = Math.atan2(y, x_); var dir = anticlockwise ? 1 : -1; if (angle < 0) { angle = path_PI2 + angle; } if ((angle >= startAngle && angle <= endAngle) || (angle + path_PI2 >= startAngle && angle + path_PI2 <= endAngle)) { if (angle > Math.PI / 2 && angle < Math.PI * 1.5) { dir = -dir; } w += dir; } } } return w; } function containPath(path, lineWidth, isStroke, x, y) { var data = path.data; var len = path.len(); var w = 0; var xi = 0; var yi = 0; var x0 = 0; var y0 = 0; var x1; var y1; for (var i = 0; i < len;) { var cmd = data[i++]; var isFirst = i === 1; if (cmd === path_CMD.M && i > 1) { if (!isStroke) { w += windingLine(xi, yi, x0, y0, x, y); } } if (isFirst) { xi = data[i]; yi = data[i + 1]; x0 = xi; y0 = yi; } switch (cmd) { case path_CMD.M: x0 = data[i++]; y0 = data[i++]; xi = x0; yi = y0; break; case path_CMD.L: if (isStroke) { if (containStroke(xi, yi, data[i], data[i + 1], lineWidth, x, y)) { return true; } } else { w += windingLine(xi, yi, data[i], data[i + 1], x, y) || 0; } xi = data[i++]; yi = data[i++]; break; case path_CMD.C: if (isStroke) { if (cubic_containStroke(xi, yi, data[i++], data[i++], data[i++], data[i++], data[i], data[i + 1], lineWidth, x, y)) { return true; } } else { w += windingCubic(xi, yi, data[i++], data[i++], data[i++], data[i++], data[i], data[i + 1], x, y) || 0; } xi = data[i++]; yi = data[i++]; break; case path_CMD.Q: if (isStroke) { if (quadratic_containStroke(xi, yi, data[i++], data[i++], data[i], data[i + 1], lineWidth, x, y)) { return true; } } else { w += windingQuadratic(xi, yi, data[i++], data[i++], data[i], data[i + 1], x, y) || 0; } xi = data[i++]; yi = data[i++]; break; case path_CMD.A: var cx = data[i++]; var cy = data[i++]; var rx = data[i++]; var ry = data[i++]; var theta = data[i++]; var dTheta = data[i++]; i += 1; var anticlockwise = !!(1 - data[i++]); x1 = Math.cos(theta) * rx + cx; y1 = Math.sin(theta) * ry + cy; if (!isFirst) { w += windingLine(xi, yi, x1, y1, x, y); } else { x0 = x1; y0 = y1; } var _x = (x - cx) * ry / rx + cx; if (isStroke) { if (arc_containStroke(cx, cy, ry, theta, theta + dTheta, anticlockwise, lineWidth, _x, y)) { return true; } } else { w += windingArc(cx, cy, ry, theta, theta + dTheta, anticlockwise, _x, y); } xi = Math.cos(theta + dTheta) * rx + cx; yi = Math.sin(theta + dTheta) * ry + cy; break; case path_CMD.R: x0 = xi = data[i++]; y0 = yi = data[i++]; var width = data[i++]; var height = data[i++]; x1 = x0 + width; y1 = y0 + height; if (isStroke) { if (containStroke(x0, y0, x1, y0, lineWidth, x, y) || containStroke(x1, y0, x1, y1, lineWidth, x, y) || containStroke(x1, y1, x0, y1, lineWidth, x, y) || containStroke(x0, y1, x0, y0, lineWidth, x, y)) { return true; } } else { w += windingLine(x1, y0, x1, y1, x, y); w += windingLine(x0, y1, x0, y0, x, y); } break; case path_CMD.Z: if (isStroke) { if (containStroke(xi, yi, x0, y0, lineWidth, x, y)) { return true; } } else { w += windingLine(xi, yi, x0, y0, x, y); } xi = x0; yi = y0; break; } } if (!isStroke && !isAroundEqual(yi, y0)) { w += windingLine(xi, yi, x0, y0, x, y) || 0; } return w !== 0; } function contain(pathProxy, x, y) { return containPath(pathProxy, 0, false, x, y); } function path_containStroke(pathProxy, lineWidth, x, y) { return containPath(pathProxy, lineWidth, true, x, y); } // CONCATENATED MODULE: ./node_modules/zrender/lib/graphic/Path.js var DEFAULT_PATH_STYLE = Object(core_util["defaults"])({ fill: '#000', stroke: null, strokePercent: 1, fillOpacity: 1, strokeOpacity: 1, lineDashOffset: 0, lineWidth: 1, lineCap: 'butt', miterLimit: 10, strokeNoScale: false, strokeFirst: false }, DEFAULT_COMMON_STYLE); var DEFAULT_PATH_ANIMATION_PROPS = { style: Object(core_util["defaults"])({ fill: true, stroke: true, strokePercent: true, fillOpacity: true, strokeOpacity: true, lineDashOffset: true, lineWidth: true, miterLimit: true }, DEFAULT_COMMON_ANIMATION_PROPS.style) }; var pathCopyParams = TRANSFORMABLE_PROPS.concat(['invisible', 'culling', 'z', 'z2', 'zlevel', 'parent' ]); var Path_Path = (function (_super) { Object(tslib_es6["b" /* __extends */])(Path, _super); function Path(opts) { return _super.call(this, opts) || this; } Path.prototype.update = function () { var _this = this; _super.prototype.update.call(this); var style = this.style; if (style.decal) { var decalEl = this._decalEl = this._decalEl || new Path(); if (decalEl.buildPath === Path.prototype.buildPath) { decalEl.buildPath = function (ctx) { _this.buildPath(ctx, _this.shape); }; } decalEl.silent = true; var decalElStyle = decalEl.style; for (var key in style) { if (decalElStyle[key] !== style[key]) { decalElStyle[key] = style[key]; } } decalElStyle.fill = style.fill ? style.decal : null; decalElStyle.decal = null; decalElStyle.shadowColor = null; style.strokeFirst && (decalElStyle.stroke = null); for (var i = 0; i < pathCopyParams.length; ++i) { decalEl[pathCopyParams[i]] = this[pathCopyParams[i]]; } decalEl.__dirty |= REDRAW_BIT; } else if (this._decalEl) { this._decalEl = null; } }; Path.prototype.getDecalElement = function () { return this._decalEl; }; Path.prototype._init = function (props) { var keysArr = Object(core_util["keys"])(props); this.shape = this.getDefaultShape(); var defaultStyle = this.getDefaultStyle(); if (defaultStyle) { this.useStyle(defaultStyle); } for (var i = 0; i < keysArr.length; i++) { var key = keysArr[i]; var value = props[key]; if (key === 'style') { if (!this.style) { this.useStyle(value); } else { Object(core_util["extend"])(this.style, value); } } else if (key === 'shape') { Object(core_util["extend"])(this.shape, value); } else { _super.prototype.attrKV.call(this, key, value); } } if (!this.style) { this.useStyle({}); } }; Path.prototype.getDefaultStyle = function () { return null; }; Path.prototype.getDefaultShape = function () { return {}; }; Path.prototype.canBeInsideText = function () { return this.hasFill(); }; Path.prototype.getInsideTextFill = function () { var pathFill = this.style.fill; if (pathFill !== 'none') { if (Object(core_util["isString"])(pathFill)) { var fillLum = Object(tool_color["lum"])(pathFill, 0); if (fillLum > 0.5) { return DARK_LABEL_COLOR; } else if (fillLum > 0.2) { return LIGHTER_LABEL_COLOR; } return LIGHT_LABEL_COLOR; } else if (pathFill) { return LIGHT_LABEL_COLOR; } } return DARK_LABEL_COLOR; }; Path.prototype.getInsideTextStroke = function (textFill) { var pathFill = this.style.fill; if (Object(core_util["isString"])(pathFill)) { var zr = this.__zr; var isDarkMode = !!(zr && zr.isDarkMode()); var isDarkLabel = Object(tool_color["lum"])(textFill, 0) < DARK_MODE_THRESHOLD; if (isDarkMode === isDarkLabel) { return pathFill; } } }; Path.prototype.buildPath = function (ctx, shapeCfg, inBatch) { }; Path.prototype.pathUpdated = function () { this.__dirty &= ~SHAPE_CHANGED_BIT; }; Path.prototype.getUpdatedPathProxy = function (inBatch) { !this.path && this.createPathProxy(); this.path.beginPath(); this.buildPath(this.path, this.shape, inBatch); return this.path; }; Path.prototype.createPathProxy = function () { this.path = new core_PathProxy(false); }; Path.prototype.hasStroke = function () { var style = this.style; var stroke = style.stroke; return !(stroke == null || stroke === 'none' || !(style.lineWidth > 0)); }; Path.prototype.hasFill = function () { var style = this.style; var fill = style.fill; return fill != null && fill !== 'none'; }; Path.prototype.getBoundingRect = function () { var rect = this._rect; var style = this.style; var needsUpdateRect = !rect; if (needsUpdateRect) { var firstInvoke = false; if (!this.path) { firstInvoke = true; this.createPathProxy(); } var path = this.path; if (firstInvoke || (this.__dirty & SHAPE_CHANGED_BIT)) { path.beginPath(); this.buildPath(path, this.shape, false); this.pathUpdated(); } rect = path.getBoundingRect(); } this._rect = rect; if (this.hasStroke() && this.path && this.path.len() > 0) { var rectStroke = this._rectStroke || (this._rectStroke = rect.clone()); if (this.__dirty || needsUpdateRect) { rectStroke.copy(rect); var lineScale = style.strokeNoScale ? this.getLineScale() : 1; var w = style.lineWidth; if (!this.hasFill()) { var strokeContainThreshold = this.strokeContainThreshold; w = Math.max(w, strokeContainThreshold == null ? 4 : strokeContainThreshold); } if (lineScale > 1e-10) { rectStroke.width += w / lineScale; rectStroke.height += w / lineScale; rectStroke.x -= w / lineScale / 2; rectStroke.y -= w / lineScale / 2; } } return rectStroke; } return rect; }; Path.prototype.contain = function (x, y) { var localPos = this.transformCoordToLocal(x, y); var rect = this.getBoundingRect(); var style = this.style; x = localPos[0]; y = localPos[1]; if (rect.contain(x, y)) { var pathProxy = this.path; if (this.hasStroke()) { var lineWidth = style.lineWidth; var lineScale = style.strokeNoScale ? this.getLineScale() : 1; if (lineScale > 1e-10) { if (!this.hasFill()) { lineWidth = Math.max(lineWidth, this.strokeContainThreshold); } if (path_containStroke(pathProxy, lineWidth / lineScale, x, y)) { return true; } } } if (this.hasFill()) { return contain(pathProxy, x, y); } } return false; }; Path.prototype.dirtyShape = function () { this.__dirty |= SHAPE_CHANGED_BIT; if (this._rect) { this._rect = null; } if (this._decalEl) { this._decalEl.dirtyShape(); } this.markRedraw(); }; Path.prototype.dirty = function () { this.dirtyStyle(); this.dirtyShape(); }; Path.prototype.animateShape = function (loop) { return this.animate('shape', loop); }; Path.prototype.updateDuringAnimation = function (targetKey) { if (targetKey === 'style') { this.dirtyStyle(); } else if (targetKey === 'shape') { this.dirtyShape(); } else { this.markRedraw(); } }; Path.prototype.attrKV = function (key, value) { if (key === 'shape') { this.setShape(value); } else { _super.prototype.attrKV.call(this, key, value); } }; Path.prototype.setShape = function (keyOrObj, value) { var shape = this.shape; if (!shape) { shape = this.shape = {}; } if (typeof keyOrObj === 'string') { shape[keyOrObj] = value; } else { Object(core_util["extend"])(shape, keyOrObj); } this.dirtyShape(); return this; }; Path.prototype.shapeChanged = function () { return !!(this.__dirty & SHAPE_CHANGED_BIT); }; Path.prototype.createStyle = function (obj) { return Object(core_util["createObject"])(DEFAULT_PATH_STYLE, obj); }; Path.prototype._innerSaveToNormal = function (toState) { _super.prototype._innerSaveToNormal.call(this, toState); var normalState = this._normalState; if (toState.shape && !normalState.shape) { normalState.shape = Object(core_util["extend"])({}, this.shape); } }; Path.prototype._applyStateObj = function (stateName, state, normalState, keepCurrentStates, transition, animationCfg) { _super.prototype._applyStateObj.call(this, stateName, state, normalState, keepCurrentStates, transition, animationCfg); var needsRestoreToNormal = !(state && keepCurrentStates); var targetShape; if (state && state.shape) { if (transition) { if (keepCurrentStates) { targetShape = state.shape; } else { targetShape = Object(core_util["extend"])({}, normalState.shape); Object(core_util["extend"])(targetShape, state.shape); } } else { targetShape = Object(core_util["extend"])({}, keepCurrentStates ? this.shape : normalState.shape); Object(core_util["extend"])(targetShape, state.shape); } } else if (needsRestoreToNormal) { targetShape = normalState.shape; } if (targetShape) { if (transition) { this.shape = Object(core_util["extend"])({}, this.shape); var targetShapePrimaryProps = {}; var shapeKeys = Object(core_util["keys"])(targetShape); for (var i = 0; i < shapeKeys.length; i++) { var key = shapeKeys[i]; if (typeof targetShape[key] === 'object') { this.shape[key] = targetShape[key]; } else { targetShapePrimaryProps[key] = targetShape[key]; } } this._transitionState(stateName, { shape: targetShapePrimaryProps }, animationCfg); } else { this.shape = targetShape; this.dirtyShape(); } } }; Path.prototype._mergeStates = function (states) { var mergedState = _super.prototype._mergeStates.call(this, states); var mergedShape; for (var i = 0; i < states.length; i++) { var state = states[i]; if (state.shape) { mergedShape = mergedShape || {}; this._mergeStyle(mergedShape, state.shape); } } if (mergedShape) { mergedState.shape = mergedShape; } return mergedState; }; Path.prototype.getAnimationStyleProps = function () { return DEFAULT_PATH_ANIMATION_PROPS; }; Path.prototype.isZeroArea = function () { return false; }; Path.extend = function (defaultProps) { var Sub = (function (_super) { Object(tslib_es6["b" /* __extends */])(Sub, _super); function Sub(opts) { var _this = _super.call(this, opts) || this; defaultProps.init && defaultProps.init.call(_this, opts); return _this; } Sub.prototype.getDefaultStyle = function () { return Object(core_util["clone"])(defaultProps.style); }; Sub.prototype.getDefaultShape = function () { return Object(core_util["clone"])(defaultProps.shape); }; return Sub; }(Path)); for (var key in defaultProps) { if (typeof defaultProps[key] === 'function') { Sub.prototype[key] = defaultProps[key]; } } return Sub; }; Path.initDefaultProps = (function () { var pathProto = Path.prototype; pathProto.type = 'path'; pathProto.strokeContainThreshold = 5; pathProto.segmentIgnoreThreshold = 0; pathProto.subPixelOptimize = false; pathProto.autoBatch = false; pathProto.__dirty = REDRAW_BIT | STYLE_CHANGED_BIT | SHAPE_CHANGED_BIT; })(); return Path; }(graphic_Displayable)); /* harmony default export */ var graphic_Path = (Path_Path); // CONCATENATED MODULE: ./node_modules/zrender/lib/graphic/TSpan.js var DEFAULT_TSPAN_STYLE = Object(core_util["defaults"])({ strokeFirst: true, font: platform["a" /* DEFAULT_FONT */], x: 0, y: 0, textAlign: 'left', textBaseline: 'top', miterLimit: 2 }, DEFAULT_PATH_STYLE); var TSpan_TSpan = (function (_super) { Object(tslib_es6["b" /* __extends */])(TSpan, _super); function TSpan() { return _super !== null && _super.apply(this, arguments) || this; } TSpan.prototype.hasStroke = function () { var style = this.style; var stroke = style.stroke; return stroke != null && stroke !== 'none' && style.lineWidth > 0; }; TSpan.prototype.hasFill = function () { var style = this.style; var fill = style.fill; return fill != null && fill !== 'none'; }; TSpan.prototype.createStyle = function (obj) { return Object(core_util["createObject"])(DEFAULT_TSPAN_STYLE, obj); }; TSpan.prototype.setBoundingRect = function (rect) { this._rect = rect; }; TSpan.prototype.getBoundingRect = function () { var style = this.style; if (!this._rect) { var text = style.text; text != null ? (text += '') : (text = ''); var rect = getBoundingRect(text, style.font, style.textAlign, style.textBaseline); rect.x += style.x || 0; rect.y += style.y || 0; if (this.hasStroke()) { var w = style.lineWidth; rect.x -= w / 2; rect.y -= w / 2; rect.width += w; rect.height += w; } this._rect = rect; } return this._rect; }; TSpan.initDefaultProps = (function () { var tspanProto = TSpan.prototype; tspanProto.dirtyRectTolerance = 10; })(); return TSpan; }(graphic_Displayable)); TSpan_TSpan.prototype.type = 'tspan'; /* harmony default export */ var graphic_TSpan = (TSpan_TSpan); // CONCATENATED MODULE: ./node_modules/zrender/lib/graphic/Image.js var DEFAULT_IMAGE_STYLE = Object(core_util["defaults"])({ x: 0, y: 0 }, DEFAULT_COMMON_STYLE); var DEFAULT_IMAGE_ANIMATION_PROPS = { style: Object(core_util["defaults"])({ x: true, y: true, width: true, height: true, sx: true, sy: true, sWidth: true, sHeight: true }, DEFAULT_COMMON_ANIMATION_PROPS.style) }; function isImageLike(source) { return !!(source && typeof source !== 'string' && source.width && source.height); } var Image_ZRImage = (function (_super) { Object(tslib_es6["b" /* __extends */])(ZRImage, _super); function ZRImage() { return _super !== null && _super.apply(this, arguments) || this; } ZRImage.prototype.createStyle = function (obj) { return Object(core_util["createObject"])(DEFAULT_IMAGE_STYLE, obj); }; ZRImage.prototype._getSize = function (dim) { var style = this.style; var size = style[dim]; if (size != null) { return size; } var imageSource = isImageLike(style.image) ? style.image : this.__image; if (!imageSource) { return 0; } var otherDim = dim === 'width' ? 'height' : 'width'; var otherDimSize = style[otherDim]; if (otherDimSize == null) { return imageSource[dim]; } else { return imageSource[dim] / imageSource[otherDim] * otherDimSize; } }; ZRImage.prototype.getWidth = function () { return this._getSize('width'); }; ZRImage.prototype.getHeight = function () { return this._getSize('height'); }; ZRImage.prototype.getAnimationStyleProps = function () { return DEFAULT_IMAGE_ANIMATION_PROPS; }; ZRImage.prototype.getBoundingRect = function () { var style = this.style; if (!this._rect) { this._rect = new core_BoundingRect(style.x || 0, style.y || 0, this.getWidth(), this.getHeight()); } return this._rect; }; return ZRImage; }(graphic_Displayable)); Image_ZRImage.prototype.type = 'image'; /* harmony default export */ var graphic_Image = (Image_ZRImage); // CONCATENATED MODULE: ./node_modules/zrender/lib/graphic/helper/roundRect.js function buildPath(ctx, shape) { var x = shape.x; var y = shape.y; var width = shape.width; var height = shape.height; var r = shape.r; var r1; var r2; var r3; var r4; if (width < 0) { x = x + width; width = -width; } if (height < 0) { y = y + height; height = -height; } if (typeof r === 'number') { r1 = r2 = r3 = r4 = r; } else if (r instanceof Array) { if (r.length === 1) { r1 = r2 = r3 = r4 = r[0]; } else if (r.length === 2) { r1 = r3 = r[0]; r2 = r4 = r[1]; } else if (r.length === 3) { r1 = r[0]; r2 = r4 = r[1]; r3 = r[2]; } else { r1 = r[0]; r2 = r[1]; r3 = r[2]; r4 = r[3]; } } else { r1 = r2 = r3 = r4 = 0; } var total; if (r1 + r2 > width) { total = r1 + r2; r1 *= width / total; r2 *= width / total; } if (r3 + r4 > width) { total = r3 + r4; r3 *= width / total; r4 *= width / total; } if (r2 + r3 > height) { total = r2 + r3; r2 *= height / total; r3 *= height / total; } if (r1 + r4 > height) { total = r1 + r4; r1 *= height / total; r4 *= height / total; } ctx.moveTo(x + r1, y); ctx.lineTo(x + width - r2, y); r2 !== 0 && ctx.arc(x + width - r2, y + r2, r2, -Math.PI / 2, 0); ctx.lineTo(x + width, y + height - r3); r3 !== 0 && ctx.arc(x + width - r3, y + height - r3, r3, 0, Math.PI / 2); ctx.lineTo(x + r4, y + height); r4 !== 0 && ctx.arc(x + r4, y + height - r4, r4, Math.PI / 2, Math.PI); ctx.lineTo(x, y + r1); r1 !== 0 && ctx.arc(x + r1, y + r1, r1, Math.PI, Math.PI * 1.5); } // CONCATENATED MODULE: ./node_modules/zrender/lib/graphic/helper/subPixelOptimize.js var subPixelOptimize_round = Math.round; function subPixelOptimizeLine(outputShape, inputShape, style) { if (!inputShape) { return; } var x1 = inputShape.x1; var x2 = inputShape.x2; var y1 = inputShape.y1; var y2 = inputShape.y2; outputShape.x1 = x1; outputShape.x2 = x2; outputShape.y1 = y1; outputShape.y2 = y2; var lineWidth = style && style.lineWidth; if (!lineWidth) { return outputShape; } if (subPixelOptimize_round(x1 * 2) === subPixelOptimize_round(x2 * 2)) { outputShape.x1 = outputShape.x2 = subPixelOptimize(x1, lineWidth, true); } if (subPixelOptimize_round(y1 * 2) === subPixelOptimize_round(y2 * 2)) { outputShape.y1 = outputShape.y2 = subPixelOptimize(y1, lineWidth, true); } return outputShape; } function subPixelOptimizeRect(outputShape, inputShape, style) { if (!inputShape) { return; } var originX = inputShape.x; var originY = inputShape.y; var originWidth = inputShape.width; var originHeight = inputShape.height; outputShape.x = originX; outputShape.y = originY; outputShape.width = originWidth; outputShape.height = originHeight; var lineWidth = style && style.lineWidth; if (!lineWidth) { return outputShape; } outputShape.x = subPixelOptimize(originX, lineWidth, true); outputShape.y = subPixelOptimize(originY, lineWidth, true); outputShape.width = Math.max(subPixelOptimize(originX + originWidth, lineWidth, false) - outputShape.x, originWidth === 0 ? 0 : 1); outputShape.height = Math.max(subPixelOptimize(originY + originHeight, lineWidth, false) - outputShape.y, originHeight === 0 ? 0 : 1); return outputShape; } function subPixelOptimize(position, lineWidth, positiveOrNegative) { if (!lineWidth) { return position; } var doubledPosition = subPixelOptimize_round(position * 2); return (doubledPosition + subPixelOptimize_round(lineWidth)) % 2 === 0 ? doubledPosition / 2 : (doubledPosition + (positiveOrNegative ? 1 : -1)) / 2; } // CONCATENATED MODULE: ./node_modules/zrender/lib/graphic/shape/Rect.js var RectShape = (function () { function RectShape() { this.x = 0; this.y = 0; this.width = 0; this.height = 0; } return RectShape; }()); var subPixelOptimizeOutputShape = {}; var Rect_Rect = (function (_super) { Object(tslib_es6["b" /* __extends */])(Rect, _super); function Rect(opts) { return _super.call(this, opts) || this; } Rect.prototype.getDefaultShape = function () { return new RectShape(); }; Rect.prototype.buildPath = function (ctx, shape) { var x; var y; var width; var height; if (this.subPixelOptimize) { var optimizedShape = subPixelOptimizeRect(subPixelOptimizeOutputShape, shape, this.style); x = optimizedShape.x; y = optimizedShape.y; width = optimizedShape.width; height = optimizedShape.height; optimizedShape.r = shape.r; shape = optimizedShape; } else { x = shape.x; y = shape.y; width = shape.width; height = shape.height; } if (!shape.r) { ctx.rect(x, y, width, height); } else { buildPath(ctx, shape); } }; Rect.prototype.isZeroArea = function () { return !this.shape.width || !this.shape.height; }; return Rect; }(graphic_Path)); Rect_Rect.prototype.type = 'rect'; /* harmony default export */ var shape_Rect = (Rect_Rect); // CONCATENATED MODULE: ./node_modules/zrender/lib/graphic/Text.js var DEFAULT_RICH_TEXT_COLOR = { fill: '#000' }; var DEFAULT_STROKE_LINE_WIDTH = 2; var DEFAULT_TEXT_ANIMATION_PROPS = { style: Object(core_util["defaults"])({ fill: true, stroke: true, fillOpacity: true, strokeOpacity: true, lineWidth: true, fontSize: true, lineHeight: true, width: true, height: true, textShadowColor: true, textShadowBlur: true, textShadowOffsetX: true, textShadowOffsetY: true, backgroundColor: true, padding: true, borderColor: true, borderWidth: true, borderRadius: true }, DEFAULT_COMMON_ANIMATION_PROPS.style) }; var Text_ZRText = (function (_super) { Object(tslib_es6["b" /* __extends */])(ZRText, _super); function ZRText(opts) { var _this = _super.call(this) || this; _this.type = 'text'; _this._children = []; _this._defaultStyle = DEFAULT_RICH_TEXT_COLOR; _this.attr(opts); return _this; } ZRText.prototype.childrenRef = function () { return this._children; }; ZRText.prototype.update = function () { _super.prototype.update.call(this); if (this.styleChanged()) { this._updateSubTexts(); } for (var i = 0; i < this._children.length; i++) { var child = this._children[i]; child.zlevel = this.zlevel; child.z = this.z; child.z2 = this.z2; child.culling = this.culling; child.cursor = this.cursor; child.invisible = this.invisible; } }; ZRText.prototype.updateTransform = function () { var innerTransformable = this.innerTransformable; if (innerTransformable) { innerTransformable.updateTransform(); if (innerTransformable.transform) { this.transform = innerTransformable.transform; } } else { _super.prototype.updateTransform.call(this); } }; ZRText.prototype.getLocalTransform = function (m) { var innerTransformable = this.innerTransformable; return innerTransformable ? innerTransformable.getLocalTransform(m) : _super.prototype.getLocalTransform.call(this, m); }; ZRText.prototype.getComputedTransform = function () { if (this.__hostTarget) { this.__hostTarget.getComputedTransform(); this.__hostTarget.updateInnerText(true); } return _super.prototype.getComputedTransform.call(this); }; ZRText.prototype._updateSubTexts = function () { this._childCursor = 0; normalizeTextStyle(this.style); this.style.rich ? this._updateRichTexts() : this._updatePlainTexts(); this._children.length = this._childCursor; this.styleUpdated(); }; ZRText.prototype.addSelfToZr = function (zr) { _super.prototype.addSelfToZr.call(this, zr); for (var i = 0; i < this._children.length; i++) { this._children[i].__zr = zr; } }; ZRText.prototype.removeSelfFromZr = function (zr) { _super.prototype.removeSelfFromZr.call(this, zr); for (var i = 0; i < this._children.length; i++) { this._children[i].__zr = null; } }; ZRText.prototype.getBoundingRect = function () { if (this.styleChanged()) { this._updateSubTexts(); } if (!this._rect) { var tmpRect = new core_BoundingRect(0, 0, 0, 0); var children = this._children; var tmpMat = []; var rect = null; for (var i = 0; i < children.length; i++) { var child = children[i]; var childRect = child.getBoundingRect(); var transform = child.getLocalTransform(tmpMat); if (transform) { tmpRect.copy(childRect); tmpRect.applyTransform(transform); rect = rect || tmpRect.clone(); rect.union(tmpRect); } else { rect = rect || childRect.clone(); rect.union(childRect); } } this._rect = rect || tmpRect; } return this._rect; }; ZRText.prototype.setDefaultTextStyle = function (defaultTextStyle) { this._defaultStyle = defaultTextStyle || DEFAULT_RICH_TEXT_COLOR; }; ZRText.prototype.setTextContent = function (textContent) { if (false) { throw new Error('Can\'t attach text on another text'); } }; ZRText.prototype._mergeStyle = function (targetStyle, sourceStyle) { if (!sourceStyle) { return targetStyle; } var sourceRich = sourceStyle.rich; var targetRich = targetStyle.rich || (sourceRich && {}); Object(core_util["extend"])(targetStyle, sourceStyle); if (sourceRich && targetRich) { this._mergeRich(targetRich, sourceRich); targetStyle.rich = targetRich; } else if (targetRich) { targetStyle.rich = targetRich; } return targetStyle; }; ZRText.prototype._mergeRich = function (targetRich, sourceRich) { var richNames = Object(core_util["keys"])(sourceRich); for (var i = 0; i < richNames.length; i++) { var richName = richNames[i]; targetRich[richName] = targetRich[richName] || {}; Object(core_util["extend"])(targetRich[richName], sourceRich[richName]); } }; ZRText.prototype.getAnimationStyleProps = function () { return DEFAULT_TEXT_ANIMATION_PROPS; }; ZRText.prototype._getOrCreateChild = function (Ctor) { var child = this._children[this._childCursor]; if (!child || !(child instanceof Ctor)) { child = new Ctor(); } this._children[this._childCursor++] = child; child.__zr = this.__zr; child.parent = this; return child; }; ZRText.prototype._updatePlainTexts = function () { var style = this.style; var textFont = style.font || platform["a" /* DEFAULT_FONT */]; var textPadding = style.padding; var text = getStyleText(style); var contentBlock = parsePlainText(text, style); var needDrawBg = needDrawBackground(style); var bgColorDrawn = !!(style.backgroundColor); var outerHeight = contentBlock.outerHeight; var outerWidth = contentBlock.outerWidth; var contentWidth = contentBlock.contentWidth; var textLines = contentBlock.lines; var lineHeight = contentBlock.lineHeight; var defaultStyle = this._defaultStyle; this.isTruncated = !!contentBlock.isTruncated; var baseX = style.x || 0; var baseY = style.y || 0; var textAlign = style.align || defaultStyle.align || 'left'; var verticalAlign = style.verticalAlign || defaultStyle.verticalAlign || 'top'; var textX = baseX; var textY = adjustTextY(baseY, contentBlock.contentHeight, verticalAlign); if (needDrawBg || textPadding) { var boxX = adjustTextX(baseX, outerWidth, textAlign); var boxY = adjustTextY(baseY, outerHeight, verticalAlign); needDrawBg && this._renderBackground(style, style, boxX, boxY, outerWidth, outerHeight); } textY += lineHeight / 2; if (textPadding) { textX = getTextXForPadding(baseX, textAlign, textPadding); if (verticalAlign === 'top') { textY += textPadding[0]; } else if (verticalAlign === 'bottom') { textY -= textPadding[2]; } } var defaultLineWidth = 0; var useDefaultFill = false; var textFill = getFill('fill' in style ? style.fill : (useDefaultFill = true, defaultStyle.fill)); var textStroke = getStroke('stroke' in style ? style.stroke : (!bgColorDrawn && (!defaultStyle.autoStroke || useDefaultFill)) ? (defaultLineWidth = DEFAULT_STROKE_LINE_WIDTH, defaultStyle.stroke) : null); var hasShadow = style.textShadowBlur > 0; var fixedBoundingRect = style.width != null && (style.overflow === 'truncate' || style.overflow === 'break' || style.overflow === 'breakAll'); var calculatedLineHeight = contentBlock.calculatedLineHeight; for (var i = 0; i < textLines.length; i++) { var el = this._getOrCreateChild(graphic_TSpan); var subElStyle = el.createStyle(); el.useStyle(subElStyle); subElStyle.text = textLines[i]; subElStyle.x = textX; subElStyle.y = textY; if (textAlign) { subElStyle.textAlign = textAlign; } subElStyle.textBaseline = 'middle'; subElStyle.opacity = style.opacity; subElStyle.strokeFirst = true; if (hasShadow) { subElStyle.shadowBlur = style.textShadowBlur || 0; subElStyle.shadowColor = style.textShadowColor || 'transparent'; subElStyle.shadowOffsetX = style.textShadowOffsetX || 0; subElStyle.shadowOffsetY = style.textShadowOffsetY || 0; } subElStyle.stroke = textStroke; subElStyle.fill = textFill; if (textStroke) { subElStyle.lineWidth = style.lineWidth || defaultLineWidth; subElStyle.lineDash = style.lineDash; subElStyle.lineDashOffset = style.lineDashOffset || 0; } subElStyle.font = textFont; setSeparateFont(subElStyle, style); textY += lineHeight; if (fixedBoundingRect) { el.setBoundingRect(new core_BoundingRect(adjustTextX(subElStyle.x, contentWidth, subElStyle.textAlign), adjustTextY(subElStyle.y, calculatedLineHeight, subElStyle.textBaseline), contentWidth, calculatedLineHeight)); } } }; ZRText.prototype._updateRichTexts = function () { var style = this.style; var text = getStyleText(style); var contentBlock = parseRichText(text, style); var contentWidth = contentBlock.width; var outerWidth = contentBlock.outerWidth; var outerHeight = contentBlock.outerHeight; var textPadding = style.padding; var baseX = style.x || 0; var baseY = style.y || 0; var defaultStyle = this._defaultStyle; var textAlign = style.align || defaultStyle.align; var verticalAlign = style.verticalAlign || defaultStyle.verticalAlign; this.isTruncated = !!contentBlock.isTruncated; var boxX = adjustTextX(baseX, outerWidth, textAlign); var boxY = adjustTextY(baseY, outerHeight, verticalAlign); var xLeft = boxX; var lineTop = boxY; if (textPadding) { xLeft += textPadding[3]; lineTop += textPadding[0]; } var xRight = xLeft + contentWidth; if (needDrawBackground(style)) { this._renderBackground(style, style, boxX, boxY, outerWidth, outerHeight); } var bgColorDrawn = !!(style.backgroundColor); for (var i = 0; i < contentBlock.lines.length; i++) { var line = contentBlock.lines[i]; var tokens = line.tokens; var tokenCount = tokens.length; var lineHeight = line.lineHeight; var remainedWidth = line.width; var leftIndex = 0; var lineXLeft = xLeft; var lineXRight = xRight; var rightIndex = tokenCount - 1; var token = void 0; while (leftIndex < tokenCount && (token = tokens[leftIndex], !token.align || token.align === 'left')) { this._placeToken(token, style, lineHeight, lineTop, lineXLeft, 'left', bgColorDrawn); remainedWidth -= token.width; lineXLeft += token.width; leftIndex++; } while (rightIndex >= 0 && (token = tokens[rightIndex], token.align === 'right')) { this._placeToken(token, style, lineHeight, lineTop, lineXRight, 'right', bgColorDrawn); remainedWidth -= token.width; lineXRight -= token.width; rightIndex--; } lineXLeft += (contentWidth - (lineXLeft - xLeft) - (xRight - lineXRight) - remainedWidth) / 2; while (leftIndex <= rightIndex) { token = tokens[leftIndex]; this._placeToken(token, style, lineHeight, lineTop, lineXLeft + token.width / 2, 'center', bgColorDrawn); lineXLeft += token.width; leftIndex++; } lineTop += lineHeight; } }; ZRText.prototype._placeToken = function (token, style, lineHeight, lineTop, x, textAlign, parentBgColorDrawn) { var tokenStyle = style.rich[token.styleName] || {}; tokenStyle.text = token.text; var verticalAlign = token.verticalAlign; var y = lineTop + lineHeight / 2; if (verticalAlign === 'top') { y = lineTop + token.height / 2; } else if (verticalAlign === 'bottom') { y = lineTop + lineHeight - token.height / 2; } var needDrawBg = !token.isLineHolder && needDrawBackground(tokenStyle); needDrawBg && this._renderBackground(tokenStyle, style, textAlign === 'right' ? x - token.width : textAlign === 'center' ? x - token.width / 2 : x, y - token.height / 2, token.width, token.height); var bgColorDrawn = !!tokenStyle.backgroundColor; var textPadding = token.textPadding; if (textPadding) { x = getTextXForPadding(x, textAlign, textPadding); y -= token.height / 2 - textPadding[0] - token.innerHeight / 2; } var el = this._getOrCreateChild(graphic_TSpan); var subElStyle = el.createStyle(); el.useStyle(subElStyle); var defaultStyle = this._defaultStyle; var useDefaultFill = false; var defaultLineWidth = 0; var textFill = getFill('fill' in tokenStyle ? tokenStyle.fill : 'fill' in style ? style.fill : (useDefaultFill = true, defaultStyle.fill)); var textStroke = getStroke('stroke' in tokenStyle ? tokenStyle.stroke : 'stroke' in style ? style.stroke : (!bgColorDrawn && !parentBgColorDrawn && (!defaultStyle.autoStroke || useDefaultFill)) ? (defaultLineWidth = DEFAULT_STROKE_LINE_WIDTH, defaultStyle.stroke) : null); var hasShadow = tokenStyle.textShadowBlur > 0 || style.textShadowBlur > 0; subElStyle.text = token.text; subElStyle.x = x; subElStyle.y = y; if (hasShadow) { subElStyle.shadowBlur = tokenStyle.textShadowBlur || style.textShadowBlur || 0; subElStyle.shadowColor = tokenStyle.textShadowColor || style.textShadowColor || 'transparent'; subElStyle.shadowOffsetX = tokenStyle.textShadowOffsetX || style.textShadowOffsetX || 0; subElStyle.shadowOffsetY = tokenStyle.textShadowOffsetY || style.textShadowOffsetY || 0; } subElStyle.textAlign = textAlign; subElStyle.textBaseline = 'middle'; subElStyle.font = token.font || platform["a" /* DEFAULT_FONT */]; subElStyle.opacity = Object(core_util["retrieve3"])(tokenStyle.opacity, style.opacity, 1); setSeparateFont(subElStyle, tokenStyle); if (textStroke) { subElStyle.lineWidth = Object(core_util["retrieve3"])(tokenStyle.lineWidth, style.lineWidth, defaultLineWidth); subElStyle.lineDash = Object(core_util["retrieve2"])(tokenStyle.lineDash, style.lineDash); subElStyle.lineDashOffset = style.lineDashOffset || 0; subElStyle.stroke = textStroke; } if (textFill) { subElStyle.fill = textFill; } var textWidth = token.contentWidth; var textHeight = token.contentHeight; el.setBoundingRect(new core_BoundingRect(adjustTextX(subElStyle.x, textWidth, subElStyle.textAlign), adjustTextY(subElStyle.y, textHeight, subElStyle.textBaseline), textWidth, textHeight)); }; ZRText.prototype._renderBackground = function (style, topStyle, x, y, width, height) { var textBackgroundColor = style.backgroundColor; var textBorderWidth = style.borderWidth; var textBorderColor = style.borderColor; var isImageBg = textBackgroundColor && textBackgroundColor.image; var isPlainOrGradientBg = textBackgroundColor && !isImageBg; var textBorderRadius = style.borderRadius; var self = this; var rectEl; var imgEl; if (isPlainOrGradientBg || style.lineHeight || (textBorderWidth && textBorderColor)) { rectEl = this._getOrCreateChild(shape_Rect); rectEl.useStyle(rectEl.createStyle()); rectEl.style.fill = null; var rectShape = rectEl.shape; rectShape.x = x; rectShape.y = y; rectShape.width = width; rectShape.height = height; rectShape.r = textBorderRadius; rectEl.dirtyShape(); } if (isPlainOrGradientBg) { var rectStyle = rectEl.style; rectStyle.fill = textBackgroundColor || null; rectStyle.fillOpacity = Object(core_util["retrieve2"])(style.fillOpacity, 1); } else if (isImageBg) { imgEl = this._getOrCreateChild(graphic_Image); imgEl.onload = function () { self.dirtyStyle(); }; var imgStyle = imgEl.style; imgStyle.image = textBackgroundColor.image; imgStyle.x = x; imgStyle.y = y; imgStyle.width = width; imgStyle.height = height; } if (textBorderWidth && textBorderColor) { var rectStyle = rectEl.style; rectStyle.lineWidth = textBorderWidth; rectStyle.stroke = textBorderColor; rectStyle.strokeOpacity = Object(core_util["retrieve2"])(style.strokeOpacity, 1); rectStyle.lineDash = style.borderDash; rectStyle.lineDashOffset = style.borderDashOffset || 0; rectEl.strokeContainThreshold = 0; if (rectEl.hasFill() && rectEl.hasStroke()) { rectStyle.strokeFirst = true; rectStyle.lineWidth *= 2; } } var commonStyle = (rectEl || imgEl).style; commonStyle.shadowBlur = style.shadowBlur || 0; commonStyle.shadowColor = style.shadowColor || 'transparent'; commonStyle.shadowOffsetX = style.shadowOffsetX || 0; commonStyle.shadowOffsetY = style.shadowOffsetY || 0; commonStyle.opacity = Object(core_util["retrieve3"])(style.opacity, topStyle.opacity, 1); }; ZRText.makeFont = function (style) { var font = ''; if (hasSeparateFont(style)) { font = [ style.fontStyle, style.fontWeight, parseFontSize(style.fontSize), style.fontFamily || 'sans-serif' ].join(' '); } return font && Object(core_util["trim"])(font) || style.textFont || style.font; }; return ZRText; }(graphic_Displayable)); var VALID_TEXT_ALIGN = { left: true, right: 1, center: 1 }; var VALID_TEXT_VERTICAL_ALIGN = { top: 1, bottom: 1, middle: 1 }; var FONT_PARTS = ['fontStyle', 'fontWeight', 'fontSize', 'fontFamily']; function parseFontSize(fontSize) { if (typeof fontSize === 'string' && (fontSize.indexOf('px') !== -1 || fontSize.indexOf('rem') !== -1 || fontSize.indexOf('em') !== -1)) { return fontSize; } else if (!isNaN(+fontSize)) { return fontSize + 'px'; } else { return platform["c" /* DEFAULT_FONT_SIZE */] + 'px'; } } function setSeparateFont(targetStyle, sourceStyle) { for (var i = 0; i < FONT_PARTS.length; i++) { var fontProp = FONT_PARTS[i]; var val = sourceStyle[fontProp]; if (val != null) { targetStyle[fontProp] = val; } } } function hasSeparateFont(style) { return style.fontSize != null || style.fontFamily || style.fontWeight; } function normalizeTextStyle(style) { normalizeStyle(style); Object(core_util["each"])(style.rich, normalizeStyle); return style; } function normalizeStyle(style) { if (style) { style.font = Text_ZRText.makeFont(style); var textAlign = style.align; textAlign === 'middle' && (textAlign = 'center'); style.align = (textAlign == null || VALID_TEXT_ALIGN[textAlign]) ? textAlign : 'left'; var verticalAlign = style.verticalAlign; verticalAlign === 'center' && (verticalAlign = 'middle'); style.verticalAlign = (verticalAlign == null || VALID_TEXT_VERTICAL_ALIGN[verticalAlign]) ? verticalAlign : 'top'; var textPadding = style.padding; if (textPadding) { style.padding = Object(core_util["normalizeCssArray"])(style.padding); } } } function getStroke(stroke, lineWidth) { return (stroke == null || lineWidth <= 0 || stroke === 'transparent' || stroke === 'none') ? null : (stroke.image || stroke.colorStops) ? '#000' : stroke; } function getFill(fill) { return (fill == null || fill === 'none') ? null : (fill.image || fill.colorStops) ? '#000' : fill; } function getTextXForPadding(x, textAlign, textPadding) { return textAlign === 'right' ? (x - textPadding[1]) : textAlign === 'center' ? (x + textPadding[3] / 2 - textPadding[1] / 2) : (x + textPadding[3]); } function getStyleText(style) { var text = style.text; text != null && (text += ''); return text; } function needDrawBackground(style) { return !!(style.backgroundColor || style.lineHeight || (style.borderWidth && style.borderColor)); } /* harmony default export */ var Text = (Text_ZRText); // CONCATENATED MODULE: ./node_modules/echarts/lib/util/innerStore.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 getECData = makeInner(); var setCommonECData = function (seriesIndex, dataType, dataIdx, el) { if (el) { var ecData = getECData(el); // Add data index and series index for indexing the data by element // Useful in tooltip ecData.dataIndex = dataIdx; ecData.dataType = dataType; ecData.seriesIndex = seriesIndex; ecData.ssrType = 'chart'; // TODO: not store dataIndex on children. if (el.type === 'group') { el.traverse(function (child) { var childECData = getECData(child); childECData.seriesIndex = seriesIndex; childECData.dataIndex = dataIdx; childECData.dataType = dataType; childECData.ssrType = 'chart'; }); } } }; // CONCATENATED MODULE: ./node_modules/echarts/lib/util/states.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ // Reserve 0 as default. var _highlightNextDigit = 1; var _highlightKeyMap = {}; var getSavedStates = makeInner(); var getComponentStates = makeInner(); var HOVER_STATE_NORMAL = 0; var HOVER_STATE_BLUR = 1; var HOVER_STATE_EMPHASIS = 2; var SPECIAL_STATES = ['emphasis', 'blur', 'select']; var DISPLAY_STATES = ['normal', 'emphasis', 'blur', 'select']; var Z2_EMPHASIS_LIFT = 10; var Z2_SELECT_LIFT = 9; var HIGHLIGHT_ACTION_TYPE = 'highlight'; var DOWNPLAY_ACTION_TYPE = 'downplay'; var SELECT_ACTION_TYPE = 'select'; var UNSELECT_ACTION_TYPE = 'unselect'; var TOGGLE_SELECT_ACTION_TYPE = 'toggleSelect'; function hasFillOrStroke(fillOrStroke) { return fillOrStroke != null && fillOrStroke !== 'none'; } function doChangeHoverState(el, stateName, hoverStateEnum) { if (el.onHoverStateChange && (el.hoverState || 0) !== hoverStateEnum) { el.onHoverStateChange(stateName); } el.hoverState = hoverStateEnum; } function singleEnterEmphasis(el) { // Only mark the flag. // States will be applied in the echarts.ts in next frame. doChangeHoverState(el, 'emphasis', HOVER_STATE_EMPHASIS); } function singleLeaveEmphasis(el) { // Only mark the flag. // States will be applied in the echarts.ts in next frame. if (el.hoverState === HOVER_STATE_EMPHASIS) { doChangeHoverState(el, 'normal', HOVER_STATE_NORMAL); } } function singleEnterBlur(el) { doChangeHoverState(el, 'blur', HOVER_STATE_BLUR); } function singleLeaveBlur(el) { if (el.hoverState === HOVER_STATE_BLUR) { doChangeHoverState(el, 'normal', HOVER_STATE_NORMAL); } } function singleEnterSelect(el) { el.selected = true; } function singleLeaveSelect(el) { el.selected = false; } function updateElementState(el, updater, commonParam) { updater(el, commonParam); } function traverseUpdateState(el, updater, commonParam) { updateElementState(el, updater, commonParam); el.isGroup && el.traverse(function (child) { updateElementState(child, updater, commonParam); }); } function setStatesFlag(el, stateName) { switch (stateName) { case 'emphasis': el.hoverState = HOVER_STATE_EMPHASIS; break; case 'normal': el.hoverState = HOVER_STATE_NORMAL; break; case 'blur': el.hoverState = HOVER_STATE_BLUR; break; case 'select': el.selected = true; } } /** * If we reuse elements when rerender. * DON'T forget to clearStates before we update the style and shape. * Or we may update on the wrong state instead of normal state. */ function states_clearStates(el) { if (el.isGroup) { el.traverse(function (child) { child.clearStates(); }); } else { el.clearStates(); } } function getFromStateStyle(el, props, toStateName, defaultValue) { var style = el.style; var fromState = {}; for (var i = 0; i < props.length; i++) { var propName = props[i]; var val = style[propName]; fromState[propName] = val == null ? defaultValue && defaultValue[propName] : val; } for (var i = 0; i < el.animators.length; i++) { var animator = el.animators[i]; if (animator.__fromStateTransition // Don't consider the animation to emphasis state. && animator.__fromStateTransition.indexOf(toStateName) < 0 && animator.targetName === 'style') { animator.saveTo(fromState, props); } } return fromState; } function createEmphasisDefaultState(el, stateName, targetStates, state) { var hasSelect = targetStates && Object(core_util["indexOf"])(targetStates, 'select') >= 0; var cloned = false; if (el instanceof graphic_Path) { var store = getSavedStates(el); var fromFill = hasSelect ? store.selectFill || store.normalFill : store.normalFill; var fromStroke = hasSelect ? store.selectStroke || store.normalStroke : store.normalStroke; if (hasFillOrStroke(fromFill) || hasFillOrStroke(fromStroke)) { state = state || {}; var emphasisStyle = state.style || {}; // inherit case if (emphasisStyle.fill === 'inherit') { cloned = true; state = Object(core_util["extend"])({}, state); emphasisStyle = Object(core_util["extend"])({}, emphasisStyle); emphasisStyle.fill = fromFill; } // Apply default color lift else if (!hasFillOrStroke(emphasisStyle.fill) && hasFillOrStroke(fromFill)) { cloned = true; // Not modify the original value. state = Object(core_util["extend"])({}, state); emphasisStyle = Object(core_util["extend"])({}, emphasisStyle); // Already being applied 'emphasis'. DON'T lift color multiple times. emphasisStyle.fill = Object(tool_color["liftColor"])(fromFill); } // Not highlight stroke if fill has been highlighted. else if (!hasFillOrStroke(emphasisStyle.stroke) && hasFillOrStroke(fromStroke)) { if (!cloned) { state = Object(core_util["extend"])({}, state); emphasisStyle = Object(core_util["extend"])({}, emphasisStyle); } emphasisStyle.stroke = Object(tool_color["liftColor"])(fromStroke); } state.style = emphasisStyle; } } if (state) { // TODO Share with textContent? if (state.z2 == null) { if (!cloned) { state = Object(core_util["extend"])({}, state); } var z2EmphasisLift = el.z2EmphasisLift; state.z2 = el.z2 + (z2EmphasisLift != null ? z2EmphasisLift : Z2_EMPHASIS_LIFT); } } return state; } function createSelectDefaultState(el, stateName, state) { // const hasSelect = indexOf(el.currentStates, stateName) >= 0; if (state) { // TODO Share with textContent? if (state.z2 == null) { state = Object(core_util["extend"])({}, state); var z2SelectLift = el.z2SelectLift; state.z2 = el.z2 + (z2SelectLift != null ? z2SelectLift : Z2_SELECT_LIFT); } } return state; } function createBlurDefaultState(el, stateName, state) { var hasBlur = Object(core_util["indexOf"])(el.currentStates, stateName) >= 0; var currentOpacity = el.style.opacity; var fromState = !hasBlur ? getFromStateStyle(el, ['opacity'], stateName, { opacity: 1 }) : null; state = state || {}; var blurStyle = state.style || {}; if (blurStyle.opacity == null) { // clone state state = Object(core_util["extend"])({}, state); blurStyle = Object(core_util["extend"])({ // Already being applied 'emphasis'. DON'T mul opacity multiple times. opacity: hasBlur ? currentOpacity : fromState.opacity * 0.1 }, blurStyle); state.style = blurStyle; } return state; } function elementStateProxy(stateName, targetStates) { var state = this.states[stateName]; if (this.style) { if (stateName === 'emphasis') { return createEmphasisDefaultState(this, stateName, targetStates, state); } else if (stateName === 'blur') { return createBlurDefaultState(this, stateName, state); } else if (stateName === 'select') { return createSelectDefaultState(this, stateName, state); } } return state; } /** * Set hover style (namely "emphasis style") of element. * @param el Should not be `zrender/graphic/Group`. * @param focus 'self' | 'selfInSeries' | 'series' */ function setDefaultStateProxy(el) { el.stateProxy = elementStateProxy; var textContent = el.getTextContent(); var textGuide = el.getTextGuideLine(); if (textContent) { textContent.stateProxy = elementStateProxy; } if (textGuide) { textGuide.stateProxy = elementStateProxy; } } function enterEmphasisWhenMouseOver(el, e) { !shouldSilent(el, e) // "emphasis" event highlight has higher priority than mouse highlight. && !el.__highByOuter && traverseUpdateState(el, singleEnterEmphasis); } function leaveEmphasisWhenMouseOut(el, e) { !shouldSilent(el, e) // "emphasis" event highlight has higher priority than mouse highlight. && !el.__highByOuter && traverseUpdateState(el, singleLeaveEmphasis); } function enterEmphasis(el, highlightDigit) { el.__highByOuter |= 1 << (highlightDigit || 0); traverseUpdateState(el, singleEnterEmphasis); } function leaveEmphasis(el, highlightDigit) { !(el.__highByOuter &= ~(1 << (highlightDigit || 0))) && traverseUpdateState(el, singleLeaveEmphasis); } function enterBlur(el) { traverseUpdateState(el, singleEnterBlur); } function leaveBlur(el) { traverseUpdateState(el, singleLeaveBlur); } function enterSelect(el) { traverseUpdateState(el, singleEnterSelect); } function leaveSelect(el) { traverseUpdateState(el, singleLeaveSelect); } function shouldSilent(el, e) { return el.__highDownSilentOnTouch && e.zrByTouch; } function allLeaveBlur(api) { var model = api.getModel(); var leaveBlurredSeries = []; var allComponentViews = []; model.eachComponent(function (componentType, componentModel) { var componentStates = getComponentStates(componentModel); var isSeries = componentType === 'series'; var view = isSeries ? api.getViewOfSeriesModel(componentModel) : api.getViewOfComponentModel(componentModel); !isSeries && allComponentViews.push(view); if (componentStates.isBlured) { // Leave blur anyway view.group.traverse(function (child) { singleLeaveBlur(child); }); isSeries && leaveBlurredSeries.push(componentModel); } componentStates.isBlured = false; }); Object(core_util["each"])(allComponentViews, function (view) { if (view && view.toggleBlurSeries) { view.toggleBlurSeries(leaveBlurredSeries, false, model); } }); } function blurSeries(targetSeriesIndex, focus, blurScope, api) { var ecModel = api.getModel(); blurScope = blurScope || 'coordinateSystem'; function leaveBlurOfIndices(data, dataIndices) { for (var i = 0; i < dataIndices.length; i++) { var itemEl = data.getItemGraphicEl(dataIndices[i]); itemEl && leaveBlur(itemEl); } } if (targetSeriesIndex == null) { return; } if (!focus || focus === 'none') { return; } var targetSeriesModel = ecModel.getSeriesByIndex(targetSeriesIndex); var targetCoordSys = targetSeriesModel.coordinateSystem; if (targetCoordSys && targetCoordSys.master) { targetCoordSys = targetCoordSys.master; } var blurredSeries = []; ecModel.eachSeries(function (seriesModel) { var sameSeries = targetSeriesModel === seriesModel; var coordSys = seriesModel.coordinateSystem; if (coordSys && coordSys.master) { coordSys = coordSys.master; } var sameCoordSys = coordSys && targetCoordSys ? coordSys === targetCoordSys : sameSeries; // If there is no coordinate system. use sameSeries instead. if (!( // Not blur other series if blurScope series blurScope === 'series' && !sameSeries // Not blur other coordinate system if blurScope is coordinateSystem || blurScope === 'coordinateSystem' && !sameCoordSys // Not blur self series if focus is series. || focus === 'series' && sameSeries // TODO blurScope: coordinate system )) { var view = api.getViewOfSeriesModel(seriesModel); view.group.traverse(function (child) { // For the elements that have been triggered by other components, // and are still required to be highlighted, // because the current is directly forced to blur the element, // it will cause the focus self to be unable to highlight, so skip the blur of this element. if (child.__highByOuter && sameSeries && focus === 'self') { return; } singleEnterBlur(child); }); if (Object(core_util["isArrayLike"])(focus)) { leaveBlurOfIndices(seriesModel.getData(), focus); } else if (Object(core_util["isObject"])(focus)) { var dataTypes = Object(core_util["keys"])(focus); for (var d = 0; d < dataTypes.length; d++) { leaveBlurOfIndices(seriesModel.getData(dataTypes[d]), focus[dataTypes[d]]); } } blurredSeries.push(seriesModel); getComponentStates(seriesModel).isBlured = true; } }); ecModel.eachComponent(function (componentType, componentModel) { if (componentType === 'series') { return; } var view = api.getViewOfComponentModel(componentModel); if (view && view.toggleBlurSeries) { view.toggleBlurSeries(blurredSeries, true, ecModel); } }); } function blurComponent(componentMainType, componentIndex, api) { if (componentMainType == null || componentIndex == null) { return; } var componentModel = api.getModel().getComponent(componentMainType, componentIndex); if (!componentModel) { return; } getComponentStates(componentModel).isBlured = true; var view = api.getViewOfComponentModel(componentModel); if (!view || !view.focusBlurEnabled) { return; } view.group.traverse(function (child) { singleEnterBlur(child); }); } function blurSeriesFromHighlightPayload(seriesModel, payload, api) { var seriesIndex = seriesModel.seriesIndex; var data = seriesModel.getData(payload.dataType); if (!data) { if (false) { error("Unknown dataType " + payload.dataType); } return; } var dataIndex = queryDataIndex(data, payload); // Pick the first one if there is multiple/none exists. dataIndex = (Object(core_util["isArray"])(dataIndex) ? dataIndex[0] : dataIndex) || 0; var el = data.getItemGraphicEl(dataIndex); if (!el) { var count = data.count(); var current = 0; // If data on dataIndex is NaN. while (!el && current < count) { el = data.getItemGraphicEl(current++); } } if (el) { var ecData = getECData(el); blurSeries(seriesIndex, ecData.focus, ecData.blurScope, api); } else { // If there is no element put on the data. Try getting it from raw option // TODO Should put it on seriesModel? var focus_1 = seriesModel.get(['emphasis', 'focus']); var blurScope = seriesModel.get(['emphasis', 'blurScope']); if (focus_1 != null) { blurSeries(seriesIndex, focus_1, blurScope, api); } } } function findComponentHighDownDispatchers(componentMainType, componentIndex, name, api) { var ret = { focusSelf: false, dispatchers: null }; if (componentMainType == null || componentMainType === 'series' || componentIndex == null || name == null) { return ret; } var componentModel = api.getModel().getComponent(componentMainType, componentIndex); if (!componentModel) { return ret; } var view = api.getViewOfComponentModel(componentModel); if (!view || !view.findHighDownDispatchers) { return ret; } var dispatchers = view.findHighDownDispatchers(name); // At presnet, the component (like Geo) only blur inside itself. // So we do not use `blurScope` in component. var focusSelf; for (var i = 0; i < dispatchers.length; i++) { if (false) { error('param should be highDownDispatcher'); } if (getECData(dispatchers[i]).focus === 'self') { focusSelf = true; break; } } return { focusSelf: focusSelf, dispatchers: dispatchers }; } function handleGlobalMouseOverForHighDown(dispatcher, e, api) { if (false) { error('param should be highDownDispatcher'); } var ecData = getECData(dispatcher); var _a = findComponentHighDownDispatchers(ecData.componentMainType, ecData.componentIndex, ecData.componentHighDownName, api), dispatchers = _a.dispatchers, focusSelf = _a.focusSelf; // If `findHighDownDispatchers` is supported on the component, // highlight/downplay elements with the same name. if (dispatchers) { if (focusSelf) { blurComponent(ecData.componentMainType, ecData.componentIndex, api); } Object(core_util["each"])(dispatchers, function (dispatcher) { return enterEmphasisWhenMouseOver(dispatcher, e); }); } else { // Try blur all in the related series. Then emphasis the hoverred. // TODO. progressive mode. blurSeries(ecData.seriesIndex, ecData.focus, ecData.blurScope, api); if (ecData.focus === 'self') { blurComponent(ecData.componentMainType, ecData.componentIndex, api); } // Other than series, component that not support `findHighDownDispatcher` will // also use it. But in this case, highlight/downplay are only supported in // mouse hover but not in dispatchAction. enterEmphasisWhenMouseOver(dispatcher, e); } } function handleGlobalMouseOutForHighDown(dispatcher, e, api) { if (false) { error('param should be highDownDispatcher'); } allLeaveBlur(api); var ecData = getECData(dispatcher); var dispatchers = findComponentHighDownDispatchers(ecData.componentMainType, ecData.componentIndex, ecData.componentHighDownName, api).dispatchers; if (dispatchers) { Object(core_util["each"])(dispatchers, function (dispatcher) { return leaveEmphasisWhenMouseOut(dispatcher, e); }); } else { leaveEmphasisWhenMouseOut(dispatcher, e); } } function toggleSelectionFromPayload(seriesModel, payload, api) { if (!isSelectChangePayload(payload)) { return; } var dataType = payload.dataType; var data = seriesModel.getData(dataType); var dataIndex = queryDataIndex(data, payload); if (!Object(core_util["isArray"])(dataIndex)) { dataIndex = [dataIndex]; } seriesModel[payload.type === TOGGLE_SELECT_ACTION_TYPE ? 'toggleSelect' : payload.type === SELECT_ACTION_TYPE ? 'select' : 'unselect'](dataIndex, dataType); } function updateSeriesElementSelection(seriesModel) { var allData = seriesModel.getAllData(); Object(core_util["each"])(allData, function (_a) { var data = _a.data, type = _a.type; data.eachItemGraphicEl(function (el, idx) { seriesModel.isSelected(idx, type) ? enterSelect(el) : leaveSelect(el); }); }); } function getAllSelectedIndices(ecModel) { var ret = []; ecModel.eachSeries(function (seriesModel) { var allData = seriesModel.getAllData(); Object(core_util["each"])(allData, function (_a) { var data = _a.data, type = _a.type; var dataIndices = seriesModel.getSelectedDataIndices(); if (dataIndices.length > 0) { var item = { dataIndex: dataIndices, seriesIndex: seriesModel.seriesIndex }; if (type != null) { item.dataType = type; } ret.push(item); } }); }); return ret; } /** * Enable the function that mouseover will trigger the emphasis state. * * NOTE: * This function should be used on the element with dataIndex, seriesIndex. * */ function enableHoverEmphasis(el, focus, blurScope) { setAsHighDownDispatcher(el, true); traverseUpdateState(el, setDefaultStateProxy); enableHoverFocus(el, focus, blurScope); } function disableHoverEmphasis(el) { setAsHighDownDispatcher(el, false); } function toggleHoverEmphasis(el, focus, blurScope, isDisabled) { isDisabled ? disableHoverEmphasis(el) : enableHoverEmphasis(el, focus, blurScope); } function enableHoverFocus(el, focus, blurScope) { var ecData = getECData(el); if (focus != null) { // TODO dataIndex may be set after this function. This check is not useful. // if (ecData.dataIndex == null) { // if (__DEV__) { // console.warn('focus can only been set on element with dataIndex'); // } // } // else { ecData.focus = focus; ecData.blurScope = blurScope; // } } else if (ecData.focus) { ecData.focus = null; } } var OTHER_STATES = ['emphasis', 'blur', 'select']; var defaultStyleGetterMap = { itemStyle: 'getItemStyle', lineStyle: 'getLineStyle', areaStyle: 'getAreaStyle' }; /** * Set emphasis/blur/selected states of element. */ function setStatesStylesFromModel(el, itemModel, styleType, // default itemStyle getter) { styleType = styleType || 'itemStyle'; for (var i = 0; i < OTHER_STATES.length; i++) { var stateName = OTHER_STATES[i]; var model = itemModel.getModel([stateName, styleType]); var state = el.ensureState(stateName); // Let it throw error if getterType is not found. state.style = getter ? getter(model) : model[defaultStyleGetterMap[styleType]](); } } /** * * Set element as highlight / downplay dispatcher. * It will be checked when element received mouseover event or from highlight action. * It's in change of all highlight/downplay behavior of it's children. * * @param el * @param el.highDownSilentOnTouch * In touch device, mouseover event will be trigger on touchstart event * (see module:zrender/dom/HandlerProxy). By this mechanism, we can * conveniently use hoverStyle when tap on touch screen without additional * code for compatibility. * But if the chart/component has select feature, which usually also use * hoverStyle, there might be conflict between 'select-highlight' and * 'hover-highlight' especially when roam is enabled (see geo for example). * In this case, `highDownSilentOnTouch` should be used to disable * hover-highlight on touch device. * @param asDispatcher If `false`, do not set as "highDownDispatcher". */ function setAsHighDownDispatcher(el, asDispatcher) { var disable = asDispatcher === false; var extendedEl = el; // Make `highDownSilentOnTouch` and `onStateChange` only work after // `setAsHighDownDispatcher` called. Avoid it is modified by user unexpectedly. if (el.highDownSilentOnTouch) { extendedEl.__highDownSilentOnTouch = el.highDownSilentOnTouch; } // Simple optimize, since this method might be // called for each elements of a group in some cases. if (!disable || extendedEl.__highDownDispatcher) { // Emphasis, normal can be triggered manually by API or other components like hover link. // el[method]('emphasis', onElementEmphasisEvent)[method]('normal', onElementNormalEvent); // Also keep previous record. extendedEl.__highByOuter = extendedEl.__highByOuter || 0; extendedEl.__highDownDispatcher = !disable; } } function isHighDownDispatcher(el) { return !!(el && el.__highDownDispatcher); } /** * Enable component highlight/downplay features: * + hover link (within the same name) * + focus blur in component */ function enableComponentHighDownFeatures(el, componentModel, componentHighDownName) { var ecData = getECData(el); ecData.componentMainType = componentModel.mainType; ecData.componentIndex = componentModel.componentIndex; ecData.componentHighDownName = componentHighDownName; } /** * Support highlight/downplay record on each elements. * For the case: hover highlight/downplay (legend, visualMap, ...) and * user triggered highlight/downplay should not conflict. * Only all of the highlightDigit cleared, return to normal. * @param {string} highlightKey * @return {number} highlightDigit */ function getHighlightDigit(highlightKey) { var highlightDigit = _highlightKeyMap[highlightKey]; if (highlightDigit == null && _highlightNextDigit <= 32) { highlightDigit = _highlightKeyMap[highlightKey] = _highlightNextDigit++; } return highlightDigit; } function isSelectChangePayload(payload) { var payloadType = payload.type; return payloadType === SELECT_ACTION_TYPE || payloadType === UNSELECT_ACTION_TYPE || payloadType === TOGGLE_SELECT_ACTION_TYPE; } function isHighDownPayload(payload) { var payloadType = payload.type; return payloadType === HIGHLIGHT_ACTION_TYPE || payloadType === DOWNPLAY_ACTION_TYPE; } function savePathStates(el) { var store = getSavedStates(el); store.normalFill = el.style.fill; store.normalStroke = el.style.stroke; var selectState = el.states.select || {}; store.selectFill = selectState.style && selectState.style.fill || null; store.selectStroke = selectState.style && selectState.style.stroke || null; } // CONCATENATED MODULE: ./node_modules/zrender/lib/tool/transformPath.js var transformPath_CMD = core_PathProxy.CMD; var transformPath_points = [[], [], []]; var transformPath_mathSqrt = Math.sqrt; var mathAtan2 = Math.atan2; function transformPath(path, m) { if (!m) { return; } var data = path.data; var len = path.len(); var cmd; var nPoint; var i; var j; var k; var p; var M = transformPath_CMD.M; var C = transformPath_CMD.C; var L = transformPath_CMD.L; var R = transformPath_CMD.R; var A = transformPath_CMD.A; var Q = transformPath_CMD.Q; for (i = 0, j = 0; i < len;) { cmd = data[i++]; j = i; nPoint = 0; switch (cmd) { case M: nPoint = 1; break; case L: nPoint = 1; break; case C: nPoint = 3; break; case Q: nPoint = 2; break; case A: var x = m[4]; var y = m[5]; var sx = transformPath_mathSqrt(m[0] * m[0] + m[1] * m[1]); var sy = transformPath_mathSqrt(m[2] * m[2] + m[3] * m[3]); var angle = mathAtan2(-m[1] / sy, m[0] / sx); data[i] *= sx; data[i++] += x; data[i] *= sy; data[i++] += y; data[i++] *= sx; data[i++] *= sy; data[i++] += angle; data[i++] += angle; i += 2; j = i; break; case R: p[0] = data[i++]; p[1] = data[i++]; applyTransform(p, p, m); data[j++] = p[0]; data[j++] = p[1]; p[0] += data[i++]; p[1] += data[i++]; applyTransform(p, p, m); data[j++] = p[0]; data[j++] = p[1]; } for (k = 0; k < nPoint; k++) { var p_1 = transformPath_points[k]; p_1[0] = data[i++]; p_1[1] = data[i++]; applyTransform(p_1, p_1, m); data[j++] = p_1[0]; data[j++] = p_1[1]; } } path.increaseVersion(); } // CONCATENATED MODULE: ./node_modules/zrender/lib/tool/path.js var path_mathSqrt = Math.sqrt; var path_mathSin = Math.sin; var path_mathCos = Math.cos; var path_PI = Math.PI; function vMag(v) { return Math.sqrt(v[0] * v[0] + v[1] * v[1]); } ; function vRatio(u, v) { return (u[0] * v[0] + u[1] * v[1]) / (vMag(u) * vMag(v)); } ; function vAngle(u, v) { return (u[0] * v[1] < u[1] * v[0] ? -1 : 1) * Math.acos(vRatio(u, v)); } ; function processArc(x1, y1, x2, y2, fa, fs, rx, ry, psiDeg, cmd, path) { var psi = psiDeg * (path_PI / 180.0); var xp = path_mathCos(psi) * (x1 - x2) / 2.0 + path_mathSin(psi) * (y1 - y2) / 2.0; var yp = -1 * path_mathSin(psi) * (x1 - x2) / 2.0 + path_mathCos(psi) * (y1 - y2) / 2.0; var lambda = (xp * xp) / (rx * rx) + (yp * yp) / (ry * ry); if (lambda > 1) { rx *= path_mathSqrt(lambda); ry *= path_mathSqrt(lambda); } var f = (fa === fs ? -1 : 1) * path_mathSqrt((((rx * rx) * (ry * ry)) - ((rx * rx) * (yp * yp)) - ((ry * ry) * (xp * xp))) / ((rx * rx) * (yp * yp) + (ry * ry) * (xp * xp))) || 0; var cxp = f * rx * yp / ry; var cyp = f * -ry * xp / rx; var cx = (x1 + x2) / 2.0 + path_mathCos(psi) * cxp - path_mathSin(psi) * cyp; var cy = (y1 + y2) / 2.0 + path_mathSin(psi) * cxp + path_mathCos(psi) * cyp; var theta = vAngle([1, 0], [(xp - cxp) / rx, (yp - cyp) / ry]); var u = [(xp - cxp) / rx, (yp - cyp) / ry]; var v = [(-1 * xp - cxp) / rx, (-1 * yp - cyp) / ry]; var dTheta = vAngle(u, v); if (vRatio(u, v) <= -1) { dTheta = path_PI; } if (vRatio(u, v) >= 1) { dTheta = 0; } if (dTheta < 0) { var n = Math.round(dTheta / path_PI * 1e6) / 1e6; dTheta = path_PI * 2 + (n % 2) * path_PI; } path.addData(cmd, cx, cy, rx, ry, theta, dTheta, psi, fs); } var commandReg = /([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig; var numberReg = /-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g; function createPathProxyFromString(data) { var path = new core_PathProxy(); if (!data) { return path; } var cpx = 0; var cpy = 0; var subpathX = cpx; var subpathY = cpy; var prevCmd; var CMD = core_PathProxy.CMD; var cmdList = data.match(commandReg); if (!cmdList) { return path; } for (var l = 0; l < cmdList.length; l++) { var cmdText = cmdList[l]; var cmdStr = cmdText.charAt(0); var cmd = void 0; var p = cmdText.match(numberReg) || []; var pLen = p.length; for (var i = 0; i < pLen; i++) { p[i] = parseFloat(p[i]); } var off = 0; while (off < pLen) { var ctlPtx = void 0; var ctlPty = void 0; var rx = void 0; var ry = void 0; var psi = void 0; var fa = void 0; var fs = void 0; var x1 = cpx; var y1 = cpy; var len = void 0; var pathData = void 0; switch (cmdStr) { case 'l': cpx += p[off++]; cpy += p[off++]; cmd = CMD.L; path.addData(cmd, cpx, cpy); break; case 'L': cpx = p[off++]; cpy = p[off++]; cmd = CMD.L; path.addData(cmd, cpx, cpy); break; case 'm': cpx += p[off++]; cpy += p[off++]; cmd = CMD.M; path.addData(cmd, cpx, cpy); subpathX = cpx; subpathY = cpy; cmdStr = 'l'; break; case 'M': cpx = p[off++]; cpy = p[off++]; cmd = CMD.M; path.addData(cmd, cpx, cpy); subpathX = cpx; subpathY = cpy; cmdStr = 'L'; break; case 'h': cpx += p[off++]; cmd = CMD.L; path.addData(cmd, cpx, cpy); break; case 'H': cpx = p[off++]; cmd = CMD.L; path.addData(cmd, cpx, cpy); break; case 'v': cpy += p[off++]; cmd = CMD.L; path.addData(cmd, cpx, cpy); break; case 'V': cpy = p[off++]; cmd = CMD.L; path.addData(cmd, cpx, cpy); break; case 'C': cmd = CMD.C; path.addData(cmd, p[off++], p[off++], p[off++], p[off++], p[off++], p[off++]); cpx = p[off - 2]; cpy = p[off - 1]; break; case 'c': cmd = CMD.C; path.addData(cmd, p[off++] + cpx, p[off++] + cpy, p[off++] + cpx, p[off++] + cpy, p[off++] + cpx, p[off++] + cpy); cpx += p[off - 2]; cpy += p[off - 1]; break; case 'S': ctlPtx = cpx; ctlPty = cpy; len = path.len(); pathData = path.data; if (prevCmd === CMD.C) { ctlPtx += cpx - pathData[len - 4]; ctlPty += cpy - pathData[len - 3]; } cmd = CMD.C; x1 = p[off++]; y1 = p[off++]; cpx = p[off++]; cpy = p[off++]; path.addData(cmd, ctlPtx, ctlPty, x1, y1, cpx, cpy); break; case 's': ctlPtx = cpx; ctlPty = cpy; len = path.len(); pathData = path.data; if (prevCmd === CMD.C) { ctlPtx += cpx - pathData[len - 4]; ctlPty += cpy - pathData[len - 3]; } cmd = CMD.C; x1 = cpx + p[off++]; y1 = cpy + p[off++]; cpx += p[off++]; cpy += p[off++]; path.addData(cmd, ctlPtx, ctlPty, x1, y1, cpx, cpy); break; case 'Q': x1 = p[off++]; y1 = p[off++]; cpx = p[off++]; cpy = p[off++]; cmd = CMD.Q; path.addData(cmd, x1, y1, cpx, cpy); break; case 'q': x1 = p[off++] + cpx; y1 = p[off++] + cpy; cpx += p[off++]; cpy += p[off++]; cmd = CMD.Q; path.addData(cmd, x1, y1, cpx, cpy); break; case 'T': ctlPtx = cpx; ctlPty = cpy; len = path.len(); pathData = path.data; if (prevCmd === CMD.Q) { ctlPtx += cpx - pathData[len - 4]; ctlPty += cpy - pathData[len - 3]; } cpx = p[off++]; cpy = p[off++]; cmd = CMD.Q; path.addData(cmd, ctlPtx, ctlPty, cpx, cpy); break; case 't': ctlPtx = cpx; ctlPty = cpy; len = path.len(); pathData = path.data; if (prevCmd === CMD.Q) { ctlPtx += cpx - pathData[len - 4]; ctlPty += cpy - pathData[len - 3]; } cpx += p[off++]; cpy += p[off++]; cmd = CMD.Q; path.addData(cmd, ctlPtx, ctlPty, cpx, cpy); break; case 'A': rx = p[off++]; ry = p[off++]; psi = p[off++]; fa = p[off++]; fs = p[off++]; x1 = cpx, y1 = cpy; cpx = p[off++]; cpy = p[off++]; cmd = CMD.A; processArc(x1, y1, cpx, cpy, fa, fs, rx, ry, psi, cmd, path); break; case 'a': rx = p[off++]; ry = p[off++]; psi = p[off++]; fa = p[off++]; fs = p[off++]; x1 = cpx, y1 = cpy; cpx += p[off++]; cpy += p[off++]; cmd = CMD.A; processArc(x1, y1, cpx, cpy, fa, fs, rx, ry, psi, cmd, path); break; } } if (cmdStr === 'z' || cmdStr === 'Z') { cmd = CMD.Z; path.addData(cmd); cpx = subpathX; cpy = subpathY; } prevCmd = cmd; } path.toStatic(); return path; } var path_SVGPath = (function (_super) { Object(tslib_es6["b" /* __extends */])(SVGPath, _super); function SVGPath() { return _super !== null && _super.apply(this, arguments) || this; } SVGPath.prototype.applyTransform = function (m) { }; return SVGPath; }(graphic_Path)); function isPathProxy(path) { return path.setData != null; } function createPathOptions(str, opts) { var pathProxy = createPathProxyFromString(str); var innerOpts = Object(core_util["extend"])({}, opts); innerOpts.buildPath = function (path) { if (isPathProxy(path)) { path.setData(pathProxy.data); var ctx = path.getContext(); if (ctx) { path.rebuildPath(ctx, 1); } } else { var ctx = path; pathProxy.rebuildPath(ctx, 1); } }; innerOpts.applyTransform = function (m) { transformPath(pathProxy, m); this.dirtyShape(); }; return innerOpts; } function createFromString(str, opts) { return new path_SVGPath(createPathOptions(str, opts)); } function extendFromString(str, defaultOpts) { var innerOpts = createPathOptions(str, defaultOpts); var Sub = (function (_super) { Object(tslib_es6["b" /* __extends */])(Sub, _super); function Sub(opts) { var _this = _super.call(this, opts) || this; _this.applyTransform = innerOpts.applyTransform; _this.buildPath = innerOpts.buildPath; return _this; } return Sub; }(path_SVGPath)); return Sub; } function mergePath(pathEls, opts) { var pathList = []; var len = pathEls.length; for (var i = 0; i < len; i++) { var pathEl = pathEls[i]; pathList.push(pathEl.getUpdatedPathProxy(true)); } var pathBundle = new graphic_Path(opts); pathBundle.createPathProxy(); pathBundle.buildPath = function (path) { if (isPathProxy(path)) { path.appendPath(pathList); var ctx = path.getContext(); if (ctx) { path.rebuildPath(ctx, 1); } } }; return pathBundle; } function clonePath(sourcePath, opts) { opts = opts || {}; var path = new graphic_Path(); if (sourcePath.shape) { path.setShape(sourcePath.shape); } path.setStyle(sourcePath.style); if (opts.bakeTransform) { transformPath(path.path, sourcePath.getComputedTransform()); } else { if (opts.toLocal) { path.setLocalTransform(sourcePath.getComputedTransform()); } else { path.copyTransform(sourcePath); } } path.buildPath = sourcePath.buildPath; path.applyTransform = path.applyTransform; path.z = sourcePath.z; path.z2 = sourcePath.z2; path.zlevel = sourcePath.zlevel; return path; } // CONCATENATED MODULE: ./node_modules/zrender/lib/graphic/shape/Circle.js var CircleShape = (function () { function CircleShape() { this.cx = 0; this.cy = 0; this.r = 0; } return CircleShape; }()); var Circle_Circle = (function (_super) { Object(tslib_es6["b" /* __extends */])(Circle, _super); function Circle(opts) { return _super.call(this, opts) || this; } Circle.prototype.getDefaultShape = function () { return new CircleShape(); }; Circle.prototype.buildPath = function (ctx, shape) { ctx.moveTo(shape.cx + shape.r, shape.cy); ctx.arc(shape.cx, shape.cy, shape.r, 0, Math.PI * 2); }; return Circle; }(graphic_Path)); ; Circle_Circle.prototype.type = 'circle'; /* harmony default export */ var shape_Circle = (Circle_Circle); // CONCATENATED MODULE: ./node_modules/zrender/lib/graphic/shape/Ellipse.js var EllipseShape = (function () { function EllipseShape() { this.cx = 0; this.cy = 0; this.rx = 0; this.ry = 0; } return EllipseShape; }()); var Ellipse_Ellipse = (function (_super) { Object(tslib_es6["b" /* __extends */])(Ellipse, _super); function Ellipse(opts) { return _super.call(this, opts) || this; } Ellipse.prototype.getDefaultShape = function () { return new EllipseShape(); }; Ellipse.prototype.buildPath = function (ctx, shape) { var k = 0.5522848; var x = shape.cx; var y = shape.cy; var a = shape.rx; var b = shape.ry; var ox = a * k; var oy = b * k; ctx.moveTo(x - a, y); ctx.bezierCurveTo(x - a, y - oy, x - ox, y - b, x, y - b); ctx.bezierCurveTo(x + ox, y - b, x + a, y - oy, x + a, y); ctx.bezierCurveTo(x + a, y + oy, x + ox, y + b, x, y + b); ctx.bezierCurveTo(x - ox, y + b, x - a, y + oy, x - a, y); ctx.closePath(); }; return Ellipse; }(graphic_Path)); Ellipse_Ellipse.prototype.type = 'ellipse'; /* harmony default export */ var shape_Ellipse = (Ellipse_Ellipse); // CONCATENATED MODULE: ./node_modules/zrender/lib/graphic/helper/roundSector.js var roundSector_PI = Math.PI; var roundSector_PI2 = roundSector_PI * 2; var roundSector_mathSin = Math.sin; var roundSector_mathCos = Math.cos; var mathACos = Math.acos; var mathATan2 = Math.atan2; var roundSector_mathAbs = Math.abs; var roundSector_mathSqrt = Math.sqrt; var roundSector_mathMax = Math.max; var roundSector_mathMin = Math.min; var roundSector_e = 1e-4; function intersect(x0, y0, x1, y1, x2, y2, x3, y3) { var dx10 = x1 - x0; var dy10 = y1 - y0; var dx32 = x3 - x2; var dy32 = y3 - y2; var t = dy32 * dx10 - dx32 * dy10; if (t * t < roundSector_e) { return; } t = (dx32 * (y0 - y2) - dy32 * (x0 - x2)) / t; return [x0 + t * dx10, y0 + t * dy10]; } function computeCornerTangents(x0, y0, x1, y1, radius, cr, clockwise) { var x01 = x0 - x1; var y01 = y0 - y1; var lo = (clockwise ? cr : -cr) / roundSector_mathSqrt(x01 * x01 + y01 * y01); var ox = lo * y01; var oy = -lo * x01; var x11 = x0 + ox; var y11 = y0 + oy; var x10 = x1 + ox; var y10 = y1 + oy; var x00 = (x11 + x10) / 2; var y00 = (y11 + y10) / 2; var dx = x10 - x11; var dy = y10 - y11; var d2 = dx * dx + dy * dy; var r = radius - cr; var s = x11 * y10 - x10 * y11; var d = (dy < 0 ? -1 : 1) * roundSector_mathSqrt(roundSector_mathMax(0, r * r * d2 - s * s)); var cx0 = (s * dy - dx * d) / d2; var cy0 = (-s * dx - dy * d) / d2; var cx1 = (s * dy + dx * d) / d2; var cy1 = (-s * dx + dy * d) / d2; var dx0 = cx0 - x00; var dy0 = cy0 - y00; var dx1 = cx1 - x00; var dy1 = cy1 - y00; if (dx0 * dx0 + dy0 * dy0 > dx1 * dx1 + dy1 * dy1) { cx0 = cx1; cy0 = cy1; } return { cx: cx0, cy: cy0, x0: -ox, y0: -oy, x1: cx0 * (radius / r - 1), y1: cy0 * (radius / r - 1) }; } function normalizeCornerRadius(cr) { var arr; if (Object(core_util["isArray"])(cr)) { var len = cr.length; if (!len) { return cr; } if (len === 1) { arr = [cr[0], cr[0], 0, 0]; } else if (len === 2) { arr = [cr[0], cr[0], cr[1], cr[1]]; } else if (len === 3) { arr = cr.concat(cr[2]); } else { arr = cr; } } else { arr = [cr, cr, cr, cr]; } return arr; } function roundSector_buildPath(ctx, shape) { var _a; var radius = roundSector_mathMax(shape.r, 0); var innerRadius = roundSector_mathMax(shape.r0 || 0, 0); var hasRadius = radius > 0; var hasInnerRadius = innerRadius > 0; if (!hasRadius && !hasInnerRadius) { return; } if (!hasRadius) { radius = innerRadius; innerRadius = 0; } if (innerRadius > radius) { var tmp = radius; radius = innerRadius; innerRadius = tmp; } var startAngle = shape.startAngle, endAngle = shape.endAngle; if (isNaN(startAngle) || isNaN(endAngle)) { return; } var cx = shape.cx, cy = shape.cy; var clockwise = !!shape.clockwise; var arc = roundSector_mathAbs(endAngle - startAngle); var mod = arc > roundSector_PI2 && arc % roundSector_PI2; mod > roundSector_e && (arc = mod); if (!(radius > roundSector_e)) { ctx.moveTo(cx, cy); } else if (arc > roundSector_PI2 - roundSector_e) { ctx.moveTo(cx + radius * roundSector_mathCos(startAngle), cy + radius * roundSector_mathSin(startAngle)); ctx.arc(cx, cy, radius, startAngle, endAngle, !clockwise); if (innerRadius > roundSector_e) { ctx.moveTo(cx + innerRadius * roundSector_mathCos(endAngle), cy + innerRadius * roundSector_mathSin(endAngle)); ctx.arc(cx, cy, innerRadius, endAngle, startAngle, clockwise); } } else { var icrStart = void 0; var icrEnd = void 0; var ocrStart = void 0; var ocrEnd = void 0; var ocrs = void 0; var ocre = void 0; var icrs = void 0; var icre = void 0; var ocrMax = void 0; var icrMax = void 0; var limitedOcrMax = void 0; var limitedIcrMax = void 0; var xre = void 0; var yre = void 0; var xirs = void 0; var yirs = void 0; var xrs = radius * roundSector_mathCos(startAngle); var yrs = radius * roundSector_mathSin(startAngle); var xire = innerRadius * roundSector_mathCos(endAngle); var yire = innerRadius * roundSector_mathSin(endAngle); var hasArc = arc > roundSector_e; if (hasArc) { var cornerRadius = shape.cornerRadius; if (cornerRadius) { _a = normalizeCornerRadius(cornerRadius), icrStart = _a[0], icrEnd = _a[1], ocrStart = _a[2], ocrEnd = _a[3]; } var halfRd = roundSector_mathAbs(radius - innerRadius) / 2; ocrs = roundSector_mathMin(halfRd, ocrStart); ocre = roundSector_mathMin(halfRd, ocrEnd); icrs = roundSector_mathMin(halfRd, icrStart); icre = roundSector_mathMin(halfRd, icrEnd); limitedOcrMax = ocrMax = roundSector_mathMax(ocrs, ocre); limitedIcrMax = icrMax = roundSector_mathMax(icrs, icre); if (ocrMax > roundSector_e || icrMax > roundSector_e) { xre = radius * roundSector_mathCos(endAngle); yre = radius * roundSector_mathSin(endAngle); xirs = innerRadius * roundSector_mathCos(startAngle); yirs = innerRadius * roundSector_mathSin(startAngle); if (arc < roundSector_PI) { var it_1 = intersect(xrs, yrs, xirs, yirs, xre, yre, xire, yire); if (it_1) { var x0 = xrs - it_1[0]; var y0 = yrs - it_1[1]; var x1 = xre - it_1[0]; var y1 = yre - it_1[1]; var a = 1 / roundSector_mathSin(mathACos((x0 * x1 + y0 * y1) / (roundSector_mathSqrt(x0 * x0 + y0 * y0) * roundSector_mathSqrt(x1 * x1 + y1 * y1))) / 2); var b = roundSector_mathSqrt(it_1[0] * it_1[0] + it_1[1] * it_1[1]); limitedOcrMax = roundSector_mathMin(ocrMax, (radius - b) / (a + 1)); limitedIcrMax = roundSector_mathMin(icrMax, (innerRadius - b) / (a - 1)); } } } } if (!hasArc) { ctx.moveTo(cx + xrs, cy + yrs); } else if (limitedOcrMax > roundSector_e) { var crStart = roundSector_mathMin(ocrStart, limitedOcrMax); var crEnd = roundSector_mathMin(ocrEnd, limitedOcrMax); var ct0 = computeCornerTangents(xirs, yirs, xrs, yrs, radius, crStart, clockwise); var ct1 = computeCornerTangents(xre, yre, xire, yire, radius, crEnd, clockwise); ctx.moveTo(cx + ct0.cx + ct0.x0, cy + ct0.cy + ct0.y0); if (limitedOcrMax < ocrMax && crStart === crEnd) { ctx.arc(cx + ct0.cx, cy + ct0.cy, limitedOcrMax, mathATan2(ct0.y0, ct0.x0), mathATan2(ct1.y0, ct1.x0), !clockwise); } else { crStart > 0 && ctx.arc(cx + ct0.cx, cy + ct0.cy, crStart, mathATan2(ct0.y0, ct0.x0), mathATan2(ct0.y1, ct0.x1), !clockwise); ctx.arc(cx, cy, radius, mathATan2(ct0.cy + ct0.y1, ct0.cx + ct0.x1), mathATan2(ct1.cy + ct1.y1, ct1.cx + ct1.x1), !clockwise); crEnd > 0 && ctx.arc(cx + ct1.cx, cy + ct1.cy, crEnd, mathATan2(ct1.y1, ct1.x1), mathATan2(ct1.y0, ct1.x0), !clockwise); } } else { ctx.moveTo(cx + xrs, cy + yrs); ctx.arc(cx, cy, radius, startAngle, endAngle, !clockwise); } if (!(innerRadius > roundSector_e) || !hasArc) { ctx.lineTo(cx + xire, cy + yire); } else if (limitedIcrMax > roundSector_e) { var crStart = roundSector_mathMin(icrStart, limitedIcrMax); var crEnd = roundSector_mathMin(icrEnd, limitedIcrMax); var ct0 = computeCornerTangents(xire, yire, xre, yre, innerRadius, -crEnd, clockwise); var ct1 = computeCornerTangents(xrs, yrs, xirs, yirs, innerRadius, -crStart, clockwise); ctx.lineTo(cx + ct0.cx + ct0.x0, cy + ct0.cy + ct0.y0); if (limitedIcrMax < icrMax && crStart === crEnd) { ctx.arc(cx + ct0.cx, cy + ct0.cy, limitedIcrMax, mathATan2(ct0.y0, ct0.x0), mathATan2(ct1.y0, ct1.x0), !clockwise); } else { crEnd > 0 && ctx.arc(cx + ct0.cx, cy + ct0.cy, crEnd, mathATan2(ct0.y0, ct0.x0), mathATan2(ct0.y1, ct0.x1), !clockwise); ctx.arc(cx, cy, innerRadius, mathATan2(ct0.cy + ct0.y1, ct0.cx + ct0.x1), mathATan2(ct1.cy + ct1.y1, ct1.cx + ct1.x1), clockwise); crStart > 0 && ctx.arc(cx + ct1.cx, cy + ct1.cy, crStart, mathATan2(ct1.y1, ct1.x1), mathATan2(ct1.y0, ct1.x0), !clockwise); } } else { ctx.lineTo(cx + xire, cy + yire); ctx.arc(cx, cy, innerRadius, endAngle, startAngle, clockwise); } } ctx.closePath(); } // CONCATENATED MODULE: ./node_modules/zrender/lib/graphic/shape/Sector.js var SectorShape = (function () { function SectorShape() { this.cx = 0; this.cy = 0; this.r0 = 0; this.r = 0; this.startAngle = 0; this.endAngle = Math.PI * 2; this.clockwise = true; this.cornerRadius = 0; } return SectorShape; }()); var Sector_Sector = (function (_super) { Object(tslib_es6["b" /* __extends */])(Sector, _super); function Sector(opts) { return _super.call(this, opts) || this; } Sector.prototype.getDefaultShape = function () { return new SectorShape(); }; Sector.prototype.buildPath = function (ctx, shape) { roundSector_buildPath(ctx, shape); }; Sector.prototype.isZeroArea = function () { return this.shape.startAngle === this.shape.endAngle || this.shape.r === this.shape.r0; }; return Sector; }(graphic_Path)); Sector_Sector.prototype.type = 'sector'; /* harmony default export */ var shape_Sector = (Sector_Sector); // CONCATENATED MODULE: ./node_modules/zrender/lib/graphic/shape/Ring.js var RingShape = (function () { function RingShape() { this.cx = 0; this.cy = 0; this.r = 0; this.r0 = 0; } return RingShape; }()); var Ring_Ring = (function (_super) { Object(tslib_es6["b" /* __extends */])(Ring, _super); function Ring(opts) { return _super.call(this, opts) || this; } Ring.prototype.getDefaultShape = function () { return new RingShape(); }; Ring.prototype.buildPath = function (ctx, shape) { var x = shape.cx; var y = shape.cy; var PI2 = Math.PI * 2; ctx.moveTo(x + shape.r, y); ctx.arc(x, y, shape.r, 0, PI2, false); ctx.moveTo(x + shape.r0, y); ctx.arc(x, y, shape.r0, 0, PI2, true); }; return Ring; }(graphic_Path)); Ring_Ring.prototype.type = 'ring'; /* harmony default export */ var shape_Ring = (Ring_Ring); // CONCATENATED MODULE: ./node_modules/zrender/lib/graphic/helper/smoothBezier.js function smoothBezier(points, smooth, isLoop, constraint) { var cps = []; var v = []; var v1 = []; var v2 = []; var prevPoint; var nextPoint; var min; var max; if (constraint) { min = [Infinity, Infinity]; max = [-Infinity, -Infinity]; for (var i = 0, len = points.length; i < len; i++) { vector_min(min, min, points[i]); vector_max(max, max, points[i]); } vector_min(min, min, constraint[0]); vector_max(max, max, constraint[1]); } for (var i = 0, len = points.length; i < len; i++) { var point = points[i]; if (isLoop) { prevPoint = points[i ? i - 1 : len - 1]; nextPoint = points[(i + 1) % len]; } else { if (i === 0 || i === len - 1) { cps.push(clone(points[i])); continue; } else { prevPoint = points[i - 1]; nextPoint = points[i + 1]; } } sub(v, nextPoint, prevPoint); vector_scale(v, v, smooth); var d0 = vector_distance(point, prevPoint); var d1 = vector_distance(point, nextPoint); var sum = d0 + d1; if (sum !== 0) { d0 /= sum; d1 /= sum; } vector_scale(v1, v, -d0); vector_scale(v2, v, d1); var cp0 = vector_add([], point, v1); var cp1 = vector_add([], point, v2); if (constraint) { vector_max(cp0, cp0, min); vector_min(cp0, cp0, max); vector_max(cp1, cp1, min); vector_min(cp1, cp1, max); } cps.push(cp0); cps.push(cp1); } if (isLoop) { cps.push(cps.shift()); } return cps; } // CONCATENATED MODULE: ./node_modules/zrender/lib/graphic/helper/poly.js function poly_buildPath(ctx, shape, closePath) { var smooth = shape.smooth; var points = shape.points; if (points && points.length >= 2) { if (smooth) { var controlPoints = smoothBezier(points, smooth, closePath, shape.smoothConstraint); ctx.moveTo(points[0][0], points[0][1]); var len = points.length; for (var i = 0; i < (closePath ? len : len - 1); i++) { var cp1 = controlPoints[i * 2]; var cp2 = controlPoints[i * 2 + 1]; var p = points[(i + 1) % len]; ctx.bezierCurveTo(cp1[0], cp1[1], cp2[0], cp2[1], p[0], p[1]); } } else { ctx.moveTo(points[0][0], points[0][1]); for (var i = 1, l = points.length; i < l; i++) { ctx.lineTo(points[i][0], points[i][1]); } } closePath && ctx.closePath(); } } // CONCATENATED MODULE: ./node_modules/zrender/lib/graphic/shape/Polygon.js var PolygonShape = (function () { function PolygonShape() { this.points = null; this.smooth = 0; this.smoothConstraint = null; } return PolygonShape; }()); var Polygon_Polygon = (function (_super) { Object(tslib_es6["b" /* __extends */])(Polygon, _super); function Polygon(opts) { return _super.call(this, opts) || this; } Polygon.prototype.getDefaultShape = function () { return new PolygonShape(); }; Polygon.prototype.buildPath = function (ctx, shape) { poly_buildPath(ctx, shape, true); }; return Polygon; }(graphic_Path)); ; Polygon_Polygon.prototype.type = 'polygon'; /* harmony default export */ var shape_Polygon = (Polygon_Polygon); // CONCATENATED MODULE: ./node_modules/zrender/lib/graphic/shape/Polyline.js var PolylineShape = (function () { function PolylineShape() { this.points = null; this.percent = 1; this.smooth = 0; this.smoothConstraint = null; } return PolylineShape; }()); var Polyline_Polyline = (function (_super) { Object(tslib_es6["b" /* __extends */])(Polyline, _super); function Polyline(opts) { return _super.call(this, opts) || this; } Polyline.prototype.getDefaultStyle = function () { return { stroke: '#000', fill: null }; }; Polyline.prototype.getDefaultShape = function () { return new PolylineShape(); }; Polyline.prototype.buildPath = function (ctx, shape) { poly_buildPath(ctx, shape, false); }; return Polyline; }(graphic_Path)); Polyline_Polyline.prototype.type = 'polyline'; /* harmony default export */ var shape_Polyline = (Polyline_Polyline); // CONCATENATED MODULE: ./node_modules/zrender/lib/graphic/shape/Line.js var Line_subPixelOptimizeOutputShape = {}; var LineShape = (function () { function LineShape() { this.x1 = 0; this.y1 = 0; this.x2 = 0; this.y2 = 0; this.percent = 1; } return LineShape; }()); var Line_Line = (function (_super) { Object(tslib_es6["b" /* __extends */])(Line, _super); function Line(opts) { return _super.call(this, opts) || this; } Line.prototype.getDefaultStyle = function () { return { stroke: '#000', fill: null }; }; Line.prototype.getDefaultShape = function () { return new LineShape(); }; Line.prototype.buildPath = function (ctx, shape) { var x1; var y1; var x2; var y2; if (this.subPixelOptimize) { var optimizedShape = subPixelOptimizeLine(Line_subPixelOptimizeOutputShape, shape, this.style); x1 = optimizedShape.x1; y1 = optimizedShape.y1; x2 = optimizedShape.x2; y2 = optimizedShape.y2; } else { x1 = shape.x1; y1 = shape.y1; x2 = shape.x2; y2 = shape.y2; } var percent = shape.percent; if (percent === 0) { return; } ctx.moveTo(x1, y1); if (percent < 1) { x2 = x1 * (1 - percent) + x2 * percent; y2 = y1 * (1 - percent) + y2 * percent; } ctx.lineTo(x2, y2); }; Line.prototype.pointAt = function (p) { var shape = this.shape; return [ shape.x1 * (1 - p) + shape.x2 * p, shape.y1 * (1 - p) + shape.y2 * p ]; }; return Line; }(graphic_Path)); Line_Line.prototype.type = 'line'; /* harmony default export */ var shape_Line = (Line_Line); // CONCATENATED MODULE: ./node_modules/zrender/lib/graphic/shape/BezierCurve.js var BezierCurve_out = []; var BezierCurveShape = (function () { function BezierCurveShape() { this.x1 = 0; this.y1 = 0; this.x2 = 0; this.y2 = 0; this.cpx1 = 0; this.cpy1 = 0; this.percent = 1; } return BezierCurveShape; }()); function someVectorAt(shape, t, isTangent) { var cpx2 = shape.cpx2; var cpy2 = shape.cpy2; if (cpx2 != null || cpy2 != null) { return [ (isTangent ? cubicDerivativeAt : curve_cubicAt)(shape.x1, shape.cpx1, shape.cpx2, shape.x2, t), (isTangent ? cubicDerivativeAt : curve_cubicAt)(shape.y1, shape.cpy1, shape.cpy2, shape.y2, t) ]; } else { return [ (isTangent ? curve_quadraticDerivativeAt : curve_quadraticAt)(shape.x1, shape.cpx1, shape.x2, t), (isTangent ? curve_quadraticDerivativeAt : curve_quadraticAt)(shape.y1, shape.cpy1, shape.y2, t) ]; } } var BezierCurve_BezierCurve = (function (_super) { Object(tslib_es6["b" /* __extends */])(BezierCurve, _super); function BezierCurve(opts) { return _super.call(this, opts) || this; } BezierCurve.prototype.getDefaultStyle = function () { return { stroke: '#000', fill: null }; }; BezierCurve.prototype.getDefaultShape = function () { return new BezierCurveShape(); }; BezierCurve.prototype.buildPath = function (ctx, shape) { var x1 = shape.x1; var y1 = shape.y1; var x2 = shape.x2; var y2 = shape.y2; var cpx1 = shape.cpx1; var cpy1 = shape.cpy1; var cpx2 = shape.cpx2; var cpy2 = shape.cpy2; var percent = shape.percent; if (percent === 0) { return; } ctx.moveTo(x1, y1); if (cpx2 == null || cpy2 == null) { if (percent < 1) { curve_quadraticSubdivide(x1, cpx1, x2, percent, BezierCurve_out); cpx1 = BezierCurve_out[1]; x2 = BezierCurve_out[2]; curve_quadraticSubdivide(y1, cpy1, y2, percent, BezierCurve_out); cpy1 = BezierCurve_out[1]; y2 = BezierCurve_out[2]; } ctx.quadraticCurveTo(cpx1, cpy1, x2, y2); } else { if (percent < 1) { cubicSubdivide(x1, cpx1, cpx2, x2, percent, BezierCurve_out); cpx1 = BezierCurve_out[1]; cpx2 = BezierCurve_out[2]; x2 = BezierCurve_out[3]; cubicSubdivide(y1, cpy1, cpy2, y2, percent, BezierCurve_out); cpy1 = BezierCurve_out[1]; cpy2 = BezierCurve_out[2]; y2 = BezierCurve_out[3]; } ctx.bezierCurveTo(cpx1, cpy1, cpx2, cpy2, x2, y2); } }; BezierCurve.prototype.pointAt = function (t) { return someVectorAt(this.shape, t, false); }; BezierCurve.prototype.tangentAt = function (t) { var p = someVectorAt(this.shape, t, true); return normalize(p, p); }; return BezierCurve; }(graphic_Path)); ; BezierCurve_BezierCurve.prototype.type = 'bezier-curve'; /* harmony default export */ var shape_BezierCurve = (BezierCurve_BezierCurve); // CONCATENATED MODULE: ./node_modules/zrender/lib/graphic/shape/Arc.js var ArcShape = (function () { function ArcShape() { this.cx = 0; this.cy = 0; this.r = 0; this.startAngle = 0; this.endAngle = Math.PI * 2; this.clockwise = true; } return ArcShape; }()); var Arc_Arc = (function (_super) { Object(tslib_es6["b" /* __extends */])(Arc, _super); function Arc(opts) { return _super.call(this, opts) || this; } Arc.prototype.getDefaultStyle = function () { return { stroke: '#000', fill: null }; }; Arc.prototype.getDefaultShape = function () { return new ArcShape(); }; Arc.prototype.buildPath = function (ctx, shape) { var x = shape.cx; var y = shape.cy; var r = Math.max(shape.r, 0); var startAngle = shape.startAngle; var endAngle = shape.endAngle; var clockwise = shape.clockwise; var unitX = Math.cos(startAngle); var unitY = Math.sin(startAngle); ctx.moveTo(unitX * r + x, unitY * r + y); ctx.arc(x, y, r, startAngle, endAngle, !clockwise); }; return Arc; }(graphic_Path)); Arc_Arc.prototype.type = 'arc'; /* harmony default export */ var shape_Arc = (Arc_Arc); // CONCATENATED MODULE: ./node_modules/zrender/lib/graphic/CompoundPath.js var CompoundPath_CompoundPath = (function (_super) { Object(tslib_es6["b" /* __extends */])(CompoundPath, _super); function CompoundPath() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = 'compound'; return _this; } CompoundPath.prototype._updatePathDirty = function () { var paths = this.shape.paths; var dirtyPath = this.shapeChanged(); for (var i = 0; i < paths.length; i++) { dirtyPath = dirtyPath || paths[i].shapeChanged(); } if (dirtyPath) { this.dirtyShape(); } }; CompoundPath.prototype.beforeBrush = function () { this._updatePathDirty(); var paths = this.shape.paths || []; var scale = this.getGlobalScale(); 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); } }; CompoundPath.prototype.buildPath = function (ctx, shape) { var paths = shape.paths || []; for (var i = 0; i < paths.length; i++) { paths[i].buildPath(ctx, paths[i].shape, true); } }; CompoundPath.prototype.afterBrush = function () { var paths = this.shape.paths || []; for (var i = 0; i < paths.length; i++) { paths[i].pathUpdated(); } }; CompoundPath.prototype.getBoundingRect = function () { this._updatePathDirty.call(this); return graphic_Path.prototype.getBoundingRect.call(this); }; return CompoundPath; }(graphic_Path)); /* harmony default export */ var graphic_CompoundPath = (CompoundPath_CompoundPath); // CONCATENATED MODULE: ./node_modules/zrender/lib/graphic/Gradient.js var Gradient = (function () { function Gradient(colorStops) { this.colorStops = colorStops || []; } Gradient.prototype.addColorStop = function (offset, color) { this.colorStops.push({ offset: offset, color: color }); }; return Gradient; }()); /* harmony default export */ var graphic_Gradient = (Gradient); // CONCATENATED MODULE: ./node_modules/zrender/lib/graphic/LinearGradient.js var LinearGradient_LinearGradient = (function (_super) { Object(tslib_es6["b" /* __extends */])(LinearGradient, _super); function LinearGradient(x, y, x2, y2, colorStops, globalCoord) { var _this = _super.call(this, colorStops) || this; _this.x = x == null ? 0 : x; _this.y = y == null ? 0 : y; _this.x2 = x2 == null ? 1 : x2; _this.y2 = y2 == null ? 0 : y2; _this.type = 'linear'; _this.global = globalCoord || false; return _this; } return LinearGradient; }(graphic_Gradient)); /* harmony default export */ var graphic_LinearGradient = (LinearGradient_LinearGradient); ; // CONCATENATED MODULE: ./node_modules/zrender/lib/graphic/RadialGradient.js var RadialGradient_RadialGradient = (function (_super) { Object(tslib_es6["b" /* __extends */])(RadialGradient, _super); function RadialGradient(x, y, r, colorStops, globalCoord) { var _this = _super.call(this, colorStops) || this; _this.x = x == null ? 0.5 : x; _this.y = y == null ? 0.5 : y; _this.r = r == null ? 0.5 : r; _this.type = 'radial'; _this.global = globalCoord || false; return _this; } return RadialGradient; }(graphic_Gradient)); /* harmony default export */ var graphic_RadialGradient = (RadialGradient_RadialGradient); // CONCATENATED MODULE: ./node_modules/zrender/lib/core/OrientedBoundingRect.js var OrientedBoundingRect_extent = [0, 0]; var extent2 = [0, 0]; var OrientedBoundingRect_minTv = new core_Point(); var OrientedBoundingRect_maxTv = new core_Point(); var OrientedBoundingRect_OrientedBoundingRect = (function () { function OrientedBoundingRect(rect, transform) { this._corners = []; this._axes = []; this._origin = [0, 0]; for (var i = 0; i < 4; i++) { this._corners[i] = new core_Point(); } for (var i = 0; i < 2; i++) { this._axes[i] = new core_Point(); } if (rect) { this.fromBoundingRect(rect, transform); } } OrientedBoundingRect.prototype.fromBoundingRect = function (rect, transform) { var corners = this._corners; var axes = this._axes; var x = rect.x; var y = rect.y; var x2 = x + rect.width; var y2 = y + rect.height; corners[0].set(x, y); corners[1].set(x2, y); corners[2].set(x2, y2); corners[3].set(x, y2); if (transform) { for (var i = 0; i < 4; i++) { corners[i].transform(transform); } } core_Point.sub(axes[0], corners[1], corners[0]); core_Point.sub(axes[1], corners[3], corners[0]); axes[0].normalize(); axes[1].normalize(); for (var i = 0; i < 2; i++) { this._origin[i] = axes[i].dot(corners[0]); } }; OrientedBoundingRect.prototype.intersect = function (other, mtv) { var overlapped = true; var noMtv = !mtv; OrientedBoundingRect_minTv.set(Infinity, Infinity); OrientedBoundingRect_maxTv.set(0, 0); if (!this._intersectCheckOneSide(this, other, OrientedBoundingRect_minTv, OrientedBoundingRect_maxTv, noMtv, 1)) { overlapped = false; if (noMtv) { return overlapped; } } if (!this._intersectCheckOneSide(other, this, OrientedBoundingRect_minTv, OrientedBoundingRect_maxTv, noMtv, -1)) { overlapped = false; if (noMtv) { return overlapped; } } if (!noMtv) { core_Point.copy(mtv, overlapped ? OrientedBoundingRect_minTv : OrientedBoundingRect_maxTv); } return overlapped; }; OrientedBoundingRect.prototype._intersectCheckOneSide = function (self, other, minTv, maxTv, noMtv, inverse) { var overlapped = true; for (var i = 0; i < 2; i++) { var axis = this._axes[i]; this._getProjMinMaxOnAxis(i, self._corners, OrientedBoundingRect_extent); this._getProjMinMaxOnAxis(i, other._corners, extent2); if (OrientedBoundingRect_extent[1] < extent2[0] || OrientedBoundingRect_extent[0] > extent2[1]) { overlapped = false; if (noMtv) { return overlapped; } var dist0 = Math.abs(extent2[0] - OrientedBoundingRect_extent[1]); var dist1 = Math.abs(OrientedBoundingRect_extent[0] - extent2[1]); if (Math.min(dist0, dist1) > maxTv.len()) { if (dist0 < dist1) { core_Point.scale(maxTv, axis, -dist0 * inverse); } else { core_Point.scale(maxTv, axis, dist1 * inverse); } } } else if (minTv) { var dist0 = Math.abs(extent2[0] - OrientedBoundingRect_extent[1]); var dist1 = Math.abs(OrientedBoundingRect_extent[0] - extent2[1]); if (Math.min(dist0, dist1) < minTv.len()) { if (dist0 < dist1) { core_Point.scale(minTv, axis, dist0 * inverse); } else { core_Point.scale(minTv, axis, -dist1 * inverse); } } } } return overlapped; }; OrientedBoundingRect.prototype._getProjMinMaxOnAxis = function (dim, corners, out) { var axis = this._axes[dim]; var origin = this._origin; var proj = corners[0].dot(axis) + origin[dim]; var min = proj; var max = proj; for (var i = 1; i < corners.length; i++) { var proj_1 = corners[i].dot(axis) + origin[dim]; min = Math.min(proj_1, min); max = Math.max(proj_1, max); } out[0] = min; out[1] = max; }; return OrientedBoundingRect; }()); /* harmony default export */ var core_OrientedBoundingRect = (OrientedBoundingRect_OrientedBoundingRect); // CONCATENATED MODULE: ./node_modules/zrender/lib/graphic/IncrementalDisplayable.js var IncrementalDisplayable_m = []; var IncrementalDisplayable_IncrementalDisplayable = (function (_super) { Object(tslib_es6["b" /* __extends */])(IncrementalDisplayable, _super); function IncrementalDisplayable() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.notClear = true; _this.incremental = true; _this._displayables = []; _this._temporaryDisplayables = []; _this._cursor = 0; return _this; } IncrementalDisplayable.prototype.traverse = function (cb, context) { cb.call(context, this); }; IncrementalDisplayable.prototype.useStyle = function () { this.style = {}; }; IncrementalDisplayable.prototype.getCursor = function () { return this._cursor; }; IncrementalDisplayable.prototype.innerAfterBrush = function () { this._cursor = this._displayables.length; }; IncrementalDisplayable.prototype.clearDisplaybles = function () { this._displayables = []; this._temporaryDisplayables = []; this._cursor = 0; this.markRedraw(); this.notClear = false; }; IncrementalDisplayable.prototype.clearTemporalDisplayables = function () { this._temporaryDisplayables = []; }; IncrementalDisplayable.prototype.addDisplayable = function (displayable, notPersistent) { if (notPersistent) { this._temporaryDisplayables.push(displayable); } else { this._displayables.push(displayable); } this.markRedraw(); }; IncrementalDisplayable.prototype.addDisplayables = function (displayables, notPersistent) { notPersistent = notPersistent || false; for (var i = 0; i < displayables.length; i++) { this.addDisplayable(displayables[i], notPersistent); } }; IncrementalDisplayable.prototype.getDisplayables = function () { return this._displayables; }; IncrementalDisplayable.prototype.getTemporalDisplayables = function () { return this._temporaryDisplayables; }; IncrementalDisplayable.prototype.eachPendingDisplayable = function (cb) { for (var i = this._cursor; i < this._displayables.length; i++) { cb && cb(this._displayables[i]); } for (var i = 0; i < this._temporaryDisplayables.length; i++) { cb && cb(this._temporaryDisplayables[i]); } }; IncrementalDisplayable.prototype.update = function () { this.updateTransform(); for (var i = this._cursor; i < this._displayables.length; i++) { var displayable = this._displayables[i]; displayable.parent = this; displayable.update(); displayable.parent = null; } for (var i = 0; i < this._temporaryDisplayables.length; i++) { var displayable = this._temporaryDisplayables[i]; displayable.parent = this; displayable.update(); displayable.parent = null; } }; IncrementalDisplayable.prototype.getBoundingRect = function () { if (!this._rect) { var rect = new core_BoundingRect(Infinity, Infinity, -Infinity, -Infinity); for (var i = 0; i < this._displayables.length; i++) { var displayable = this._displayables[i]; var childRect = displayable.getBoundingRect().clone(); if (displayable.needLocalTransform()) { childRect.applyTransform(displayable.getLocalTransform(IncrementalDisplayable_m)); } rect.union(childRect); } this._rect = rect; } return this._rect; }; IncrementalDisplayable.prototype.contain = function (x, y) { var localPos = this.transformCoordToLocal(x, y); var rect = this.getBoundingRect(); if (rect.contain(localPos[0], localPos[1])) { for (var i = 0; i < this._displayables.length; i++) { var displayable = this._displayables[i]; if (displayable.contain(x, y)) { return true; } } } return false; }; return IncrementalDisplayable; }(graphic_Displayable)); /* harmony default export */ var graphic_IncrementalDisplayable = (IncrementalDisplayable_IncrementalDisplayable); // CONCATENATED MODULE: ./node_modules/echarts/lib/animation/basicTransition.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ // Stored properties for further transition. var transitionStore = makeInner(); /** * Return null if animation is disabled. */ function getAnimationConfig(animationType, animatableModel, dataIndex, // Extra opts can override the option in animatable model. extraOpts, // TODO It's only for pictorial bar now. extraDelayParams) { var animationPayload; // Check if there is global animation configuration from dataZoom/resize can override the config in option. // If animation is enabled. Will use this animation config in payload. // If animation is disabled. Just ignore it. if (animatableModel && animatableModel.ecModel) { var updatePayload = animatableModel.ecModel.getUpdatePayload(); animationPayload = updatePayload && updatePayload.animation; } var animationEnabled = animatableModel && animatableModel.isAnimationEnabled(); var isUpdate = animationType === 'update'; if (animationEnabled) { var duration = void 0; var easing = void 0; var delay = void 0; if (extraOpts) { duration = Object(core_util["retrieve2"])(extraOpts.duration, 200); easing = Object(core_util["retrieve2"])(extraOpts.easing, 'cubicOut'); delay = 0; } else { duration = animatableModel.getShallow(isUpdate ? 'animationDurationUpdate' : 'animationDuration'); easing = animatableModel.getShallow(isUpdate ? 'animationEasingUpdate' : 'animationEasing'); delay = animatableModel.getShallow(isUpdate ? 'animationDelayUpdate' : 'animationDelay'); } // animation from payload has highest priority. if (animationPayload) { animationPayload.duration != null && (duration = animationPayload.duration); animationPayload.easing != null && (easing = animationPayload.easing); animationPayload.delay != null && (delay = animationPayload.delay); } if (Object(core_util["isFunction"])(delay)) { delay = delay(dataIndex, extraDelayParams); } if (Object(core_util["isFunction"])(duration)) { duration = duration(dataIndex); } var config = { duration: duration || 0, delay: delay, easing: easing }; return config; } else { return null; } } function animateOrSetProps(animationType, el, props, animatableModel, dataIndex, cb, during) { var isFrom = false; var removeOpt; if (Object(core_util["isFunction"])(dataIndex)) { during = cb; cb = dataIndex; dataIndex = null; } else if (Object(core_util["isObject"])(dataIndex)) { cb = dataIndex.cb; during = dataIndex.during; isFrom = dataIndex.isFrom; removeOpt = dataIndex.removeOpt; dataIndex = dataIndex.dataIndex; } var isRemove = animationType === 'leave'; if (!isRemove) { // Must stop the remove animation. el.stopAnimation('leave'); } var animationConfig = getAnimationConfig(animationType, animatableModel, dataIndex, isRemove ? removeOpt || {} : null, animatableModel && animatableModel.getAnimationDelayParams ? animatableModel.getAnimationDelayParams(el, dataIndex) : null); if (animationConfig && animationConfig.duration > 0) { var duration = animationConfig.duration; var animationDelay = animationConfig.delay; var animationEasing = animationConfig.easing; var animateConfig = { duration: duration, delay: animationDelay || 0, easing: animationEasing, done: cb, force: !!cb || !!during, // Set to final state in update/init animation. // So the post processing based on the path shape can be done correctly. setToFinal: !isRemove, scope: animationType, during: during }; isFrom ? el.animateFrom(props, animateConfig) : el.animateTo(props, animateConfig); } else { el.stopAnimation(); // If `isFrom`, the props is the "from" props. !isFrom && el.attr(props); // Call during at least once. during && during(1); cb && cb(); } } /** * Update graphic element properties with or without animation according to the * configuration in series. * * Caution: this method will stop previous animation. * So do not use this method to one element twice before * animation starts, unless you know what you are doing. * @example * graphic.updateProps(el, { * position: [100, 100] * }, seriesModel, dataIndex, function () { console.log('Animation done!'); }); * // Or * graphic.updateProps(el, { * position: [100, 100] * }, seriesModel, function () { console.log('Animation done!'); }); */ function updateProps(el, props, // TODO: TYPE AnimatableModel animatableModel, dataIndex, cb, during) { animateOrSetProps('update', el, props, animatableModel, dataIndex, cb, during); } /** * Init graphic element properties with or without animation according to the * configuration in series. * * Caution: this method will stop previous animation. * So do not use this method to one element twice before * animation starts, unless you know what you are doing. */ function initProps(el, props, animatableModel, dataIndex, cb, during) { animateOrSetProps('enter', el, props, animatableModel, dataIndex, cb, during); } /** * If element is removed. * It can determine if element is having remove animation. */ function isElementRemoved(el) { if (!el.__zr) { return true; } for (var i = 0; i < el.animators.length; i++) { var animator = el.animators[i]; if (animator.scope === 'leave') { return true; } } return false; } /** * Remove graphic element */ function removeElement(el, props, animatableModel, dataIndex, cb, during) { // Don't do remove animation twice. if (isElementRemoved(el)) { return; } animateOrSetProps('leave', el, props, animatableModel, dataIndex, cb, during); } function fadeOutDisplayable(el, animatableModel, dataIndex, done) { el.removeTextContent(); el.removeTextGuideLine(); removeElement(el, { style: { opacity: 0 } }, animatableModel, dataIndex, done); } function removeElementWithFadeOut(el, animatableModel, dataIndex) { function doRemove() { el.parent && el.parent.remove(el); } // Hide label and labelLine first // TODO Also use fade out animation? if (!el.isGroup) { fadeOutDisplayable(el, animatableModel, dataIndex, doRemove); } else { el.traverse(function (disp) { if (!disp.isGroup) { // Can invoke doRemove multiple times. fadeOutDisplayable(disp, animatableModel, dataIndex, doRemove); } }); } } /** * Save old style for style transition in universalTransition module. * It's used when element will be reused in each render. * For chart like map, heatmap, which will always create new element. * We don't need to save this because universalTransition can get old style from the old element */ function saveOldStyle(el) { transitionStore(el).oldStyle = el.style; } function getOldStyle(el) { return transitionStore(el).oldStyle; } // CONCATENATED MODULE: ./node_modules/echarts/lib/util/graphic.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ /** * @deprecated export for compatitable reason */ var graphic_mathMax = Math.max; var graphic_mathMin = Math.min; var _customShapeMap = {}; /** * Extend shape with parameters */ function extendShape(opts) { return graphic_Path.extend(opts); } var extendPathFromString = extendFromString; /** * Extend path */ function extendPath(pathData, opts) { return extendPathFromString(pathData, opts); } /** * Register a user defined shape. * The shape class can be fetched by `getShapeClass` * This method will overwrite the registered shapes, including * the registered built-in shapes, if using the same `name`. * The shape can be used in `custom series` and * `graphic component` by declaring `{type: name}`. * * @param name * @param ShapeClass Can be generated by `extendShape`. */ function registerShape(name, ShapeClass) { _customShapeMap[name] = ShapeClass; } /** * Find shape class registered by `registerShape`. Usually used in * fetching user defined shape. * * [Caution]: * (1) This method **MUST NOT be used inside echarts !!!**, unless it is prepared * to use user registered shapes. * Because the built-in shape (see `getBuiltInShape`) will be registered by * `registerShape` by default. That enables users to get both built-in * shapes as well as the shapes belonging to themsleves. But users can overwrite * the built-in shapes by using names like 'circle', 'rect' via calling * `registerShape`. So the echarts inner featrues should not fetch shapes from here * in case that it is overwritten by users, except that some features, like * `custom series`, `graphic component`, do it deliberately. * * (2) In the features like `custom series`, `graphic component`, the user input * `{tpye: 'xxx'}` does not only specify shapes but also specify other graphic * elements like `'group'`, `'text'`, `'image'` or event `'path'`. Those names * are reserved names, that is, if some user registers a shape named `'image'`, * the shape will not be used. If we intending to add some more reserved names * in feature, that might bring break changes (disable some existing user shape * names). But that case probably rarely happens. So we don't make more mechanism * to resolve this issue here. * * @param name * @return The shape class. If not found, return nothing. */ function getShapeClass(name) { if (_customShapeMap.hasOwnProperty(name)) { return _customShapeMap[name]; } } /** * Create a path element from path data string * @param pathData * @param opts * @param rect * @param layout 'center' or 'cover' default to be cover */ function makePath(pathData, opts, rect, layout) { var path = createFromString(pathData, opts); if (rect) { if (layout === 'center') { rect = centerGraphic(rect, path.getBoundingRect()); } resizePath(path, rect); } return path; } /** * Create a image element from image url * @param imageUrl image url * @param opts options * @param rect constrain rect * @param layout 'center' or 'cover'. Default to be 'cover' */ function makeImage(imageUrl, rect, layout) { var zrImg = new graphic_Image({ style: { image: imageUrl, x: rect.x, y: rect.y, width: rect.width, height: rect.height }, onload: function (img) { if (layout === 'center') { var boundingRect = { width: img.width, height: img.height }; zrImg.setStyle(centerGraphic(rect, boundingRect)); } } }); return zrImg; } /** * Get position of centered element in bounding box. * * @param rect element local bounding box * @param boundingRect constraint bounding box * @return element position containing x, y, width, and height */ function centerGraphic(rect, boundingRect) { // Set rect to center, keep width / height ratio. var aspect = boundingRect.width / boundingRect.height; var width = rect.height * aspect; var height; if (width <= rect.width) { height = rect.height; } else { width = rect.width; height = width / aspect; } var cx = rect.x + rect.width / 2; var cy = rect.y + rect.height / 2; return { x: cx - width / 2, y: cy - height / 2, width: width, height: height }; } var graphic_mergePath = mergePath; /** * Resize a path to fit the rect * @param path * @param rect */ function resizePath(path, rect) { if (!path.applyTransform) { return; } var pathRect = path.getBoundingRect(); var m = pathRect.calculateTransform(rect); path.applyTransform(m); } /** * Sub pixel optimize line for canvas */ function graphic_subPixelOptimizeLine(shape, lineWidth) { subPixelOptimizeLine(shape, shape, { lineWidth: lineWidth }); return shape; } /** * Sub pixel optimize rect for canvas */ function graphic_subPixelOptimizeRect(param) { subPixelOptimizeRect(param.shape, param.shape, param.style); return param; } /** * Sub pixel optimize for canvas * * @param position Coordinate, such as x, y * @param lineWidth Should be nonnegative integer. * @param positiveOrNegative Default false (negative). * @return Optimized position. */ var graphic_subPixelOptimize = subPixelOptimize; /** * Get transform matrix of target (param target), * in coordinate of its ancestor (param ancestor) * * @param target * @param [ancestor] */ function getTransform(target, ancestor) { var mat = identity([]); while (target && target !== ancestor) { matrix_mul(mat, target.getLocalTransform(), mat); target = target.parent; } return mat; } /** * Apply transform to an vertex. * @param target [x, y] * @param transform Can be: * + Transform matrix: like [1, 0, 0, 1, 0, 0] * + {position, rotation, scale}, the same as `zrender/Transformable`. * @param invert Whether use invert matrix. * @return [x, y] */ function graphic_applyTransform(target, transform, invert) { if (transform && !Object(core_util["isArrayLike"])(transform)) { transform = core_Transformable.getLocalTransform(transform); } if (invert) { transform = matrix_invert([], transform); } return applyTransform([], target, transform); } /** * @param direction 'left' 'right' 'top' 'bottom' * @param transform Transform matrix: like [1, 0, 0, 1, 0, 0] * @param invert Whether use invert matrix. * @return Transformed direction. 'left' 'right' 'top' 'bottom' */ function transformDirection(direction, transform, invert) { // Pick a base, ensure that transform result will not be (0, 0). var hBase = transform[4] === 0 || transform[5] === 0 || transform[0] === 0 ? 1 : Math.abs(2 * transform[4] / transform[0]); var vBase = transform[4] === 0 || transform[5] === 0 || transform[2] === 0 ? 1 : Math.abs(2 * transform[4] / transform[2]); var vertex = [direction === 'left' ? -hBase : direction === 'right' ? hBase : 0, direction === 'top' ? -vBase : direction === 'bottom' ? vBase : 0]; vertex = graphic_applyTransform(vertex, transform, invert); return Math.abs(vertex[0]) > Math.abs(vertex[1]) ? vertex[0] > 0 ? 'right' : 'left' : vertex[1] > 0 ? 'bottom' : 'top'; } function isNotGroup(el) { return !el.isGroup; } function isPath(el) { return el.shape != null; } /** * Apply group transition animation from g1 to g2. * If no animatableModel, no animation. */ function groupTransition(g1, g2, animatableModel) { if (!g1 || !g2) { return; } function getElMap(g) { var elMap = {}; g.traverse(function (el) { if (isNotGroup(el) && el.anid) { elMap[el.anid] = el; } }); return elMap; } function getAnimatableProps(el) { var obj = { x: el.x, y: el.y, rotation: el.rotation }; if (isPath(el)) { obj.shape = Object(core_util["extend"])({}, el.shape); } return obj; } var elMap1 = getElMap(g1); g2.traverse(function (el) { if (isNotGroup(el) && el.anid) { var oldEl = elMap1[el.anid]; if (oldEl) { var newProp = getAnimatableProps(el); el.attr(getAnimatableProps(oldEl)); updateProps(el, newProp, animatableModel, getECData(el).dataIndex); } } }); } function clipPointsByRect(points, rect) { // FIXME: This way might be incorrect when graphic clipped by a corner // and when element has a border. return Object(core_util["map"])(points, function (point) { var x = point[0]; x = graphic_mathMax(x, rect.x); x = graphic_mathMin(x, rect.x + rect.width); var y = point[1]; y = graphic_mathMax(y, rect.y); y = graphic_mathMin(y, rect.y + rect.height); return [x, y]; }); } /** * Return a new clipped rect. If rect size are negative, return undefined. */ function clipRectByRect(targetRect, rect) { var x = graphic_mathMax(targetRect.x, rect.x); var x2 = graphic_mathMin(targetRect.x + targetRect.width, rect.x + rect.width); var y = graphic_mathMax(targetRect.y, rect.y); var y2 = graphic_mathMin(targetRect.y + targetRect.height, rect.y + rect.height); // If the total rect is cliped, nothing, including the border, // should be painted. So return undefined. if (x2 >= x && y2 >= y) { return { x: x, y: y, width: x2 - x, height: y2 - y }; } } function createIcon(iconStr, // Support 'image://' or 'path://' or direct svg path. opt, rect) { var innerOpts = Object(core_util["extend"])({ rectHover: true }, opt); var style = innerOpts.style = { strokeNoScale: true }; rect = rect || { x: -1, y: -1, width: 2, height: 2 }; if (iconStr) { return iconStr.indexOf('image://') === 0 ? (style.image = iconStr.slice(8), Object(core_util["defaults"])(style, rect), new graphic_Image(innerOpts)) : makePath(iconStr.replace('path://', ''), innerOpts, rect, 'center'); } } /** * Return `true` if the given line (line `a`) and the given polygon * are intersect. * Note that we do not count colinear as intersect here because no * requirement for that. We could do that if required in future. */ function linePolygonIntersect(a1x, a1y, a2x, a2y, points) { for (var i = 0, p2 = points[points.length - 1]; i < points.length; i++) { var p = points[i]; if (lineLineIntersect(a1x, a1y, a2x, a2y, p[0], p[1], p2[0], p2[1])) { return true; } p2 = p; } } /** * Return `true` if the given two lines (line `a` and line `b`) * are intersect. * Note that we do not count colinear as intersect here because no * requirement for that. We could do that if required in future. */ function lineLineIntersect(a1x, a1y, a2x, a2y, b1x, b1y, b2x, b2y) { // let `vec_m` to be `vec_a2 - vec_a1` and `vec_n` to be `vec_b2 - vec_b1`. var mx = a2x - a1x; var my = a2y - a1y; var nx = b2x - b1x; var ny = b2y - b1y; // `vec_m` and `vec_n` are parallel iff // existing `k` such that `vec_m = k · vec_n`, equivalent to `vec_m X vec_n = 0`. var nmCrossProduct = crossProduct2d(nx, ny, mx, my); if (nearZero(nmCrossProduct)) { return false; } // `vec_m` and `vec_n` are intersect iff // existing `p` and `q` in [0, 1] such that `vec_a1 + p * vec_m = vec_b1 + q * vec_n`, // such that `q = ((vec_a1 - vec_b1) X vec_m) / (vec_n X vec_m)` // and `p = ((vec_a1 - vec_b1) X vec_n) / (vec_n X vec_m)`. var b1a1x = a1x - b1x; var b1a1y = a1y - b1y; var q = crossProduct2d(b1a1x, b1a1y, mx, my) / nmCrossProduct; if (q < 0 || q > 1) { return false; } var p = crossProduct2d(b1a1x, b1a1y, nx, ny) / nmCrossProduct; if (p < 0 || p > 1) { return false; } return true; } /** * Cross product of 2-dimension vector. */ function crossProduct2d(x1, y1, x2, y2) { return x1 * y2 - x2 * y1; } function nearZero(val) { return val <= 1e-6 && val >= -1e-6; } function setTooltipConfig(opt) { var itemTooltipOption = opt.itemTooltipOption; var componentModel = opt.componentModel; var itemName = opt.itemName; var itemTooltipOptionObj = Object(core_util["isString"])(itemTooltipOption) ? { formatter: itemTooltipOption } : itemTooltipOption; var mainType = componentModel.mainType; var componentIndex = componentModel.componentIndex; var formatterParams = { componentType: mainType, name: itemName, $vars: ['name'] }; formatterParams[mainType + 'Index'] = componentIndex; var formatterParamsExtra = opt.formatterParamsExtra; if (formatterParamsExtra) { Object(core_util["each"])(Object(core_util["keys"])(formatterParamsExtra), function (key) { if (!Object(core_util["hasOwn"])(formatterParams, key)) { formatterParams[key] = formatterParamsExtra[key]; formatterParams.$vars.push(key); } }); } var ecData = getECData(opt.el); ecData.componentMainType = mainType; ecData.componentIndex = componentIndex; ecData.tooltipConfig = { name: itemName, option: Object(core_util["defaults"])({ content: itemName, encodeHTMLContent: true, formatterParams: formatterParams }, itemTooltipOptionObj) }; } function traverseElement(el, cb) { var stopped; // TODO // Polyfill for fixing zrender group traverse don't visit it's root issue. if (el.isGroup) { stopped = cb(el); } if (!stopped) { el.traverse(cb); } } function traverseElements(els, cb) { if (els) { if (Object(core_util["isArray"])(els)) { for (var i = 0; i < els.length; i++) { traverseElement(els[i], cb); } } else { traverseElement(els, cb); } } } // Register built-in shapes. These shapes might be overwritten // by users, although we do not recommend that. registerShape('circle', shape_Circle); registerShape('ellipse', shape_Ellipse); registerShape('sector', shape_Sector); registerShape('ring', shape_Ring); registerShape('polygon', shape_Polygon); registerShape('polyline', shape_Polyline); registerShape('rect', shape_Rect); registerShape('line', shape_Line); registerShape('bezierCurve', shape_BezierCurve); registerShape('arc', shape_Arc); // CONCATENATED MODULE: ./node_modules/echarts/lib/label/labelStyle.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 EMPTY_OBJ = {}; function setLabelText(label, labelTexts) { for (var i = 0; i < SPECIAL_STATES.length; i++) { var stateName = SPECIAL_STATES[i]; var text = labelTexts[stateName]; var state = label.ensureState(stateName); state.style = state.style || {}; state.style.text = text; } var oldStates = label.currentStates.slice(); label.clearStates(true); label.setStyle({ text: labelTexts.normal }); label.useStates(oldStates, true); } function getLabelText(opt, stateModels, interpolatedValue) { var labelFetcher = opt.labelFetcher; var labelDataIndex = opt.labelDataIndex; var labelDimIndex = opt.labelDimIndex; var normalModel = stateModels.normal; var baseText; if (labelFetcher) { baseText = labelFetcher.getFormattedLabel(labelDataIndex, 'normal', null, labelDimIndex, normalModel && normalModel.get('formatter'), interpolatedValue != null ? { interpolatedValue: interpolatedValue } : null); } if (baseText == null) { baseText = Object(core_util["isFunction"])(opt.defaultText) ? opt.defaultText(labelDataIndex, opt, interpolatedValue) : opt.defaultText; } var statesText = { normal: baseText }; for (var i = 0; i < SPECIAL_STATES.length; i++) { var stateName = SPECIAL_STATES[i]; var stateModel = stateModels[stateName]; statesText[stateName] = Object(core_util["retrieve2"])(labelFetcher ? labelFetcher.getFormattedLabel(labelDataIndex, stateName, null, labelDimIndex, stateModel && stateModel.get('formatter')) : null, baseText); } return statesText; } function setLabelStyle(targetEl, labelStatesModels, opt, stateSpecified // TODO specified position? ) { opt = opt || EMPTY_OBJ; var isSetOnText = targetEl instanceof Text; var needsCreateText = false; for (var i = 0; i < DISPLAY_STATES.length; i++) { var stateModel = labelStatesModels[DISPLAY_STATES[i]]; if (stateModel && stateModel.getShallow('show')) { needsCreateText = true; break; } } var textContent = isSetOnText ? targetEl : targetEl.getTextContent(); if (needsCreateText) { if (!isSetOnText) { // Reuse the previous if (!textContent) { textContent = new Text(); targetEl.setTextContent(textContent); } // Use same state proxy if (targetEl.stateProxy) { textContent.stateProxy = targetEl.stateProxy; } } var labelStatesTexts = getLabelText(opt, labelStatesModels); var normalModel = labelStatesModels.normal; var showNormal = !!normalModel.getShallow('show'); var normalStyle = createTextStyle(normalModel, stateSpecified && stateSpecified.normal, opt, false, !isSetOnText); normalStyle.text = labelStatesTexts.normal; if (!isSetOnText) { // Always create new targetEl.setTextConfig(createTextConfig(normalModel, opt, false)); } for (var i = 0; i < SPECIAL_STATES.length; i++) { var stateName = SPECIAL_STATES[i]; var stateModel = labelStatesModels[stateName]; if (stateModel) { var stateObj = textContent.ensureState(stateName); var stateShow = !!Object(core_util["retrieve2"])(stateModel.getShallow('show'), showNormal); if (stateShow !== showNormal) { stateObj.ignore = !stateShow; } stateObj.style = createTextStyle(stateModel, stateSpecified && stateSpecified[stateName], opt, true, !isSetOnText); stateObj.style.text = labelStatesTexts[stateName]; if (!isSetOnText) { var targetElEmphasisState = targetEl.ensureState(stateName); targetElEmphasisState.textConfig = createTextConfig(stateModel, opt, true); } } } // PENDING: if there is many requirements that emphasis position // need to be different from normal position, we might consider // auto silent is those cases. textContent.silent = !!normalModel.getShallow('silent'); // Keep x and y if (textContent.style.x != null) { normalStyle.x = textContent.style.x; } if (textContent.style.y != null) { normalStyle.y = textContent.style.y; } textContent.ignore = !showNormal; // Always create new style. textContent.useStyle(normalStyle); textContent.dirty(); if (opt.enableTextSetter) { labelInner(textContent).setLabelText = function (interpolatedValue) { var labelStatesTexts = getLabelText(opt, labelStatesModels, interpolatedValue); setLabelText(textContent, labelStatesTexts); }; } } else if (textContent) { // Not display rich text. textContent.ignore = true; } targetEl.dirty(); } function getLabelStatesModels(itemModel, labelName) { labelName = labelName || 'label'; var statesModels = { normal: itemModel.getModel(labelName) }; for (var i = 0; i < SPECIAL_STATES.length; i++) { var stateName = SPECIAL_STATES[i]; statesModels[stateName] = itemModel.getModel([stateName, labelName]); } return statesModels; } /** * Set basic textStyle properties. */ function createTextStyle(textStyleModel, specifiedTextStyle, // Fixed style in the code. Can't be set by model. opt, isNotNormal, isAttached // If text is attached on an element. If so, auto color will handling in zrender. ) { var textStyle = {}; setTextStyleCommon(textStyle, textStyleModel, opt, isNotNormal, isAttached); specifiedTextStyle && Object(core_util["extend"])(textStyle, specifiedTextStyle); // textStyle.host && textStyle.host.dirty && textStyle.host.dirty(false); return textStyle; } function createTextConfig(textStyleModel, opt, isNotNormal) { opt = opt || {}; var textConfig = {}; var labelPosition; var labelRotate = textStyleModel.getShallow('rotate'); var labelDistance = Object(core_util["retrieve2"])(textStyleModel.getShallow('distance'), isNotNormal ? null : 5); var labelOffset = textStyleModel.getShallow('offset'); labelPosition = textStyleModel.getShallow('position') || (isNotNormal ? null : 'inside'); // 'outside' is not a valid zr textPostion value, but used // in bar series, and magric type should be considered. labelPosition === 'outside' && (labelPosition = opt.defaultOutsidePosition || 'top'); if (labelPosition != null) { textConfig.position = labelPosition; } if (labelOffset != null) { textConfig.offset = labelOffset; } if (labelRotate != null) { labelRotate *= Math.PI / 180; textConfig.rotation = labelRotate; } if (labelDistance != null) { textConfig.distance = labelDistance; } // fill and auto is determined by the color of path fill if it's not specified by developers. textConfig.outsideFill = textStyleModel.get('color') === 'inherit' ? opt.inheritColor || null : 'auto'; return textConfig; } /** * The uniform entry of set text style, that is, retrieve style definitions * from `model` and set to `textStyle` object. * * Never in merge mode, but in overwrite mode, that is, all of the text style * properties will be set. (Consider the states of normal and emphasis and * default value can be adopted, merge would make the logic too complicated * to manage.) */ function setTextStyleCommon(textStyle, textStyleModel, opt, isNotNormal, isAttached) { // Consider there will be abnormal when merge hover style to normal style if given default value. opt = opt || EMPTY_OBJ; var ecModel = textStyleModel.ecModel; var globalTextStyle = ecModel && ecModel.option.textStyle; // Consider case: // { // data: [{ // value: 12, // label: { // rich: { // // no 'a' here but using parent 'a'. // } // } // }], // rich: { // a: { ... } // } // } var richItemNames = getRichItemNames(textStyleModel); var richResult; if (richItemNames) { richResult = {}; for (var name_1 in richItemNames) { if (richItemNames.hasOwnProperty(name_1)) { // Cascade is supported in rich. var richTextStyle = textStyleModel.getModel(['rich', name_1]); // In rich, never `disableBox`. // FIXME: consider `label: {formatter: '{a|xx}', color: 'blue', rich: {a: {}}}`, // the default color `'blue'` will not be adopted if no color declared in `rich`. // That might confuses users. So probably we should put `textStyleModel` as the // root ancestor of the `richTextStyle`. But that would be a break change. setTokenTextStyle(richResult[name_1] = {}, richTextStyle, globalTextStyle, opt, isNotNormal, isAttached, false, true); } } } if (richResult) { textStyle.rich = richResult; } var overflow = textStyleModel.get('overflow'); if (overflow) { textStyle.overflow = overflow; } var margin = textStyleModel.get('minMargin'); if (margin != null) { textStyle.margin = margin; } setTokenTextStyle(textStyle, textStyleModel, globalTextStyle, opt, isNotNormal, isAttached, true, false); } // Consider case: // { // data: [{ // value: 12, // label: { // rich: { // // no 'a' here but using parent 'a'. // } // } // }], // rich: { // a: { ... } // } // } // TODO TextStyleModel function getRichItemNames(textStyleModel) { // Use object to remove duplicated names. var richItemNameMap; while (textStyleModel && textStyleModel !== textStyleModel.ecModel) { var rich = (textStyleModel.option || EMPTY_OBJ).rich; if (rich) { richItemNameMap = richItemNameMap || {}; var richKeys = Object(core_util["keys"])(rich); for (var i = 0; i < richKeys.length; i++) { var richKey = richKeys[i]; richItemNameMap[richKey] = 1; } } textStyleModel = textStyleModel.parentModel; } return richItemNameMap; } var TEXT_PROPS_WITH_GLOBAL = ['fontStyle', 'fontWeight', 'fontSize', 'fontFamily', 'textShadowColor', 'textShadowBlur', 'textShadowOffsetX', 'textShadowOffsetY']; var TEXT_PROPS_SELF = ['align', 'lineHeight', 'width', 'height', 'tag', 'verticalAlign', 'ellipsis']; var TEXT_PROPS_BOX = ['padding', 'borderWidth', 'borderRadius', 'borderDashOffset', 'backgroundColor', 'borderColor', 'shadowColor', 'shadowBlur', 'shadowOffsetX', 'shadowOffsetY']; function setTokenTextStyle(textStyle, textStyleModel, globalTextStyle, opt, isNotNormal, isAttached, isBlock, inRich) { // In merge mode, default value should not be given. globalTextStyle = !isNotNormal && globalTextStyle || EMPTY_OBJ; var inheritColor = opt && opt.inheritColor; var fillColor = textStyleModel.getShallow('color'); var strokeColor = textStyleModel.getShallow('textBorderColor'); var opacity = Object(core_util["retrieve2"])(textStyleModel.getShallow('opacity'), globalTextStyle.opacity); if (fillColor === 'inherit' || fillColor === 'auto') { if (false) { if (fillColor === 'auto') { deprecateReplaceLog('color: \'auto\'', 'color: \'inherit\''); } } if (inheritColor) { fillColor = inheritColor; } else { fillColor = null; } } if (strokeColor === 'inherit' || strokeColor === 'auto') { if (false) { if (strokeColor === 'auto') { deprecateReplaceLog('color: \'auto\'', 'color: \'inherit\''); } } if (inheritColor) { strokeColor = inheritColor; } else { strokeColor = null; } } if (!isAttached) { // Only use default global textStyle.color if text is individual. // Otherwise it will use the strategy of attached text color because text may be on a path. fillColor = fillColor || globalTextStyle.color; strokeColor = strokeColor || globalTextStyle.textBorderColor; } if (fillColor != null) { textStyle.fill = fillColor; } if (strokeColor != null) { textStyle.stroke = strokeColor; } var textBorderWidth = Object(core_util["retrieve2"])(textStyleModel.getShallow('textBorderWidth'), globalTextStyle.textBorderWidth); if (textBorderWidth != null) { textStyle.lineWidth = textBorderWidth; } var textBorderType = Object(core_util["retrieve2"])(textStyleModel.getShallow('textBorderType'), globalTextStyle.textBorderType); if (textBorderType != null) { textStyle.lineDash = textBorderType; } var textBorderDashOffset = Object(core_util["retrieve2"])(textStyleModel.getShallow('textBorderDashOffset'), globalTextStyle.textBorderDashOffset); if (textBorderDashOffset != null) { textStyle.lineDashOffset = textBorderDashOffset; } if (!isNotNormal && opacity == null && !inRich) { opacity = opt && opt.defaultOpacity; } if (opacity != null) { textStyle.opacity = opacity; } // TODO if (!isNotNormal && !isAttached) { // Set default finally. if (textStyle.fill == null && opt.inheritColor) { textStyle.fill = opt.inheritColor; } } // Do not use `getFont` here, because merge should be supported, where // part of these properties may be changed in emphasis style, and the // others should remain their original value got from normal style. for (var i = 0; i < TEXT_PROPS_WITH_GLOBAL.length; i++) { var key = TEXT_PROPS_WITH_GLOBAL[i]; var val = Object(core_util["retrieve2"])(textStyleModel.getShallow(key), globalTextStyle[key]); if (val != null) { textStyle[key] = val; } } for (var i = 0; i < TEXT_PROPS_SELF.length; i++) { var key = TEXT_PROPS_SELF[i]; var val = textStyleModel.getShallow(key); if (val != null) { textStyle[key] = val; } } if (textStyle.verticalAlign == null) { var baseline = textStyleModel.getShallow('baseline'); if (baseline != null) { textStyle.verticalAlign = baseline; } } if (!isBlock || !opt.disableBox) { for (var i = 0; i < TEXT_PROPS_BOX.length; i++) { var key = TEXT_PROPS_BOX[i]; var val = textStyleModel.getShallow(key); if (val != null) { textStyle[key] = val; } } var borderType = textStyleModel.getShallow('borderType'); if (borderType != null) { textStyle.borderDash = borderType; } if ((textStyle.backgroundColor === 'auto' || textStyle.backgroundColor === 'inherit') && inheritColor) { if (false) { if (textStyle.backgroundColor === 'auto') { deprecateReplaceLog('backgroundColor: \'auto\'', 'backgroundColor: \'inherit\''); } } textStyle.backgroundColor = inheritColor; } if ((textStyle.borderColor === 'auto' || textStyle.borderColor === 'inherit') && inheritColor) { if (false) { if (textStyle.borderColor === 'auto') { deprecateReplaceLog('borderColor: \'auto\'', 'borderColor: \'inherit\''); } } textStyle.borderColor = inheritColor; } } } function getFont(opt, ecModel) { var gTextStyleModel = ecModel && ecModel.getModel('textStyle'); return Object(core_util["trim"])([ // FIXME in node-canvas fontWeight is before fontStyle opt.fontStyle || gTextStyleModel && gTextStyleModel.getShallow('fontStyle') || '', opt.fontWeight || gTextStyleModel && gTextStyleModel.getShallow('fontWeight') || '', (opt.fontSize || gTextStyleModel && gTextStyleModel.getShallow('fontSize') || 12) + 'px', opt.fontFamily || gTextStyleModel && gTextStyleModel.getShallow('fontFamily') || 'sans-serif'].join(' ')); } var labelInner = makeInner(); function setLabelValueAnimation(label, labelStatesModels, value, getDefaultText) { if (!label) { return; } var obj = labelInner(label); obj.prevValue = obj.value; obj.value = value; var normalLabelModel = labelStatesModels.normal; obj.valueAnimation = normalLabelModel.get('valueAnimation'); if (obj.valueAnimation) { obj.precision = normalLabelModel.get('precision'); obj.defaultInterpolatedText = getDefaultText; obj.statesModels = labelStatesModels; } } function animateLabelValue(textEl, dataIndex, data, animatableModel, labelFetcher) { var labelInnerStore = labelInner(textEl); if (!labelInnerStore.valueAnimation || labelInnerStore.prevValue === labelInnerStore.value) { // Value not changed, no new label animation return; } var defaultInterpolatedText = labelInnerStore.defaultInterpolatedText; // Consider the case that being animating, do not use the `obj.value`, // Otherwise it will jump to the `obj.value` when this new animation started. var currValue = Object(core_util["retrieve2"])(labelInnerStore.interpolatedValue, labelInnerStore.prevValue); var targetValue = labelInnerStore.value; function during(percent) { var interpolated = interpolateRawValues(data, labelInnerStore.precision, currValue, targetValue, percent); labelInnerStore.interpolatedValue = percent === 1 ? null : interpolated; var labelText = getLabelText({ labelDataIndex: dataIndex, labelFetcher: labelFetcher, defaultText: defaultInterpolatedText ? defaultInterpolatedText(interpolated) : interpolated + '' }, labelInnerStore.statesModels, interpolated); setLabelText(textEl, labelText); } textEl.percent = 0; (labelInnerStore.prevValue == null ? initProps : updateProps)(textEl, { // percent is used to prevent animation from being aborted #15916 percent: 1 }, animatableModel, dataIndex, null, during); } // CONCATENATED MODULE: ./node_modules/echarts/lib/model/mixin/textStyle.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 PATH_COLOR = ['textStyle', 'color']; var textStyleParams = ['fontStyle', 'fontWeight', 'fontSize', 'fontFamily', 'padding', 'lineHeight', 'rich', 'width', 'height', 'overflow']; // TODO Performance improvement? var tmpText = new Text(); var textStyle_TextStyleMixin = /** @class */function () { function TextStyleMixin() {} /** * Get color property or get color from option.textStyle.color */ // TODO Callback TextStyleMixin.prototype.getTextColor = function (isEmphasis) { var ecModel = this.ecModel; return this.getShallow('color') || (!isEmphasis && ecModel ? ecModel.get(PATH_COLOR) : null); }; /** * Create font string from fontStyle, fontWeight, fontSize, fontFamily * @return {string} */ TextStyleMixin.prototype.getFont = function () { return getFont({ fontStyle: this.getShallow('fontStyle'), fontWeight: this.getShallow('fontWeight'), fontSize: this.getShallow('fontSize'), fontFamily: this.getShallow('fontFamily') }, this.ecModel); }; TextStyleMixin.prototype.getTextRect = function (text) { var style = { text: text, verticalAlign: this.getShallow('verticalAlign') || this.getShallow('baseline') }; for (var i = 0; i < textStyleParams.length; i++) { style[textStyleParams[i]] = this.getShallow(textStyleParams[i]); } tmpText.useStyle(style); tmpText.update(); return tmpText.getBoundingRect(); }; return TextStyleMixin; }(); ; /* harmony default export */ var mixin_textStyle = (textStyle_TextStyleMixin); // CONCATENATED MODULE: ./node_modules/echarts/lib/model/mixin/lineStyle.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 LINE_STYLE_KEY_MAP = [['lineWidth', 'width'], ['stroke', 'color'], ['opacity'], ['shadowBlur'], ['shadowOffsetX'], ['shadowOffsetY'], ['shadowColor'], ['lineDash', 'type'], ['lineDashOffset', 'dashOffset'], ['lineCap', 'cap'], ['lineJoin', 'join'], ['miterLimit'] // Option decal is in `DecalObject` but style.decal is in `PatternObject`. // So do not transfer decal directly. ]; var getLineStyle = makeStyleMapper(LINE_STYLE_KEY_MAP); var LineStyleMixin = /** @class */function () { function LineStyleMixin() {} LineStyleMixin.prototype.getLineStyle = function (excludes) { return getLineStyle(this, excludes); }; return LineStyleMixin; }(); ; // CONCATENATED MODULE: ./node_modules/echarts/lib/model/mixin/itemStyle.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 ITEM_STYLE_KEY_MAP = [['fill', 'color'], ['stroke', 'borderColor'], ['lineWidth', 'borderWidth'], ['opacity'], ['shadowBlur'], ['shadowOffsetX'], ['shadowOffsetY'], ['shadowColor'], ['lineDash', 'borderType'], ['lineDashOffset', 'borderDashOffset'], ['lineCap', 'borderCap'], ['lineJoin', 'borderJoin'], ['miterLimit', 'borderMiterLimit'] // Option decal is in `DecalObject` but style.decal is in `PatternObject`. // So do not transfer decal directly. ]; var getItemStyle = makeStyleMapper(ITEM_STYLE_KEY_MAP); var ItemStyleMixin = /** @class */function () { function ItemStyleMixin() {} ItemStyleMixin.prototype.getItemStyle = function (excludes, includes) { return getItemStyle(this, excludes, includes); }; return ItemStyleMixin; }(); // CONCATENATED MODULE: ./node_modules/echarts/lib/model/Model.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 Model_Model = /** @class */function () { function Model(option, parentModel, ecModel) { this.parentModel = parentModel; this.ecModel = ecModel; this.option = option; // Simple optimization // if (this.init) { // if (arguments.length <= 4) { // this.init(option, parentModel, ecModel, extraOpt); // } // else { // this.init.apply(this, arguments); // } // } } Model.prototype.init = function (option, parentModel, ecModel) { var rest = []; for (var _i = 3; _i < arguments.length; _i++) { rest[_i - 3] = arguments[_i]; } }; /** * Merge the input option to me. */ Model.prototype.mergeOption = function (option, ecModel) { Object(core_util["merge"])(this.option, option, true); }; // `path` can be 'a.b.c', so the return value type have to be `ModelOption` // TODO: TYPE strict key check? // get(path: string | string[], ignoreParent?: boolean): ModelOption; Model.prototype.get = function (path, ignoreParent) { if (path == null) { return this.option; } return this._doGet(this.parsePath(path), !ignoreParent && this.parentModel); }; Model.prototype.getShallow = function (key, ignoreParent) { var option = this.option; var val = option == null ? option : option[key]; if (val == null && !ignoreParent) { var parentModel = this.parentModel; if (parentModel) { // FIXME:TS do not know how to make it works val = parentModel.getShallow(key); } } return val; }; // `path` can be 'a.b.c', so the return value type have to be `Model` // getModel(path: string | string[], parentModel?: Model): Model; // TODO 'a.b.c' is deprecated Model.prototype.getModel = function (path, parentModel) { var hasPath = path != null; var pathFinal = hasPath ? this.parsePath(path) : null; var obj = hasPath ? this._doGet(pathFinal) : this.option; parentModel = parentModel || this.parentModel && this.parentModel.getModel(this.resolveParentPath(pathFinal)); return new Model(obj, parentModel, this.ecModel); }; /** * If model has option */ Model.prototype.isEmpty = function () { return this.option == null; }; Model.prototype.restoreData = function () {}; // Pending Model.prototype.clone = function () { var Ctor = this.constructor; return new Ctor(Object(core_util["clone"])(this.option)); }; // setReadOnly(properties): void { // clazzUtil.setReadOnly(this, properties); // } // If path is null/undefined, return null/undefined. Model.prototype.parsePath = function (path) { if (typeof path === 'string') { return path.split('.'); } return path; }; // Resolve path for parent. Perhaps useful when parent use a different property. // Default to be a identity resolver. // Can be modified to a different resolver. Model.prototype.resolveParentPath = function (path) { return path; }; // FIXME:TS check whether put this method here Model.prototype.isAnimationEnabled = function () { if (!core_env["a" /* default */].node && this.option) { if (this.option.animation != null) { return !!this.option.animation; } else if (this.parentModel) { return this.parentModel.isAnimationEnabled(); } } }; Model.prototype._doGet = function (pathArr, parentModel) { var obj = this.option; if (!pathArr) { return obj; } for (var i = 0; i < pathArr.length; i++) { // Ignore empty if (!pathArr[i]) { continue; } // obj could be number/string/... (like 0) obj = obj && typeof obj === 'object' ? obj[pathArr[i]] : null; if (obj == null) { break; } } if (obj == null && parentModel) { obj = parentModel._doGet(this.resolveParentPath(pathArr), parentModel.parentModel); } return obj; }; return Model; }(); ; // Enable Model.extend. enableClassExtend(Model_Model); enableClassCheck(Model_Model); Object(core_util["mixin"])(Model_Model, LineStyleMixin); Object(core_util["mixin"])(Model_Model, ItemStyleMixin); Object(core_util["mixin"])(Model_Model, AreaStyleMixin); Object(core_util["mixin"])(Model_Model, mixin_textStyle); /* harmony default export */ var model_Model = (Model_Model); // CONCATENATED MODULE: ./node_modules/echarts/lib/util/component.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ // A random offset var component_base = Math.round(Math.random() * 10); /** * @public * @param {string} type * @return {string} */ function getUID(type) { // Considering the case of crossing js context, // use Math.random to make id as unique as possible. return [type || '', component_base++].join('_'); } /** * Implements `SubTypeDefaulterManager` for `target`. */ function enableSubTypeDefaulter(target) { var subTypeDefaulters = {}; target.registerSubTypeDefaulter = function (componentType, defaulter) { var componentTypeInfo = parseClassType(componentType); subTypeDefaulters[componentTypeInfo.main] = defaulter; }; target.determineSubType = function (componentType, option) { var type = option.type; if (!type) { var componentTypeMain = parseClassType(componentType).main; if (target.hasSubTypes(componentType) && subTypeDefaulters[componentTypeMain]) { type = subTypeDefaulters[componentTypeMain](option); } } return type; }; } /** * Implements `TopologicalTravelable` for `entity`. * * Topological travel on Activity Network (Activity On Vertices). * Dependencies is defined in Model.prototype.dependencies, like ['xAxis', 'yAxis']. * If 'xAxis' or 'yAxis' is absent in componentTypeList, just ignore it in topology. * If there is circular dependencey, Error will be thrown. */ function enableTopologicalTravel(entity, dependencyGetter) { /** * @param targetNameList Target Component type list. * Can be ['aa', 'bb', 'aa.xx'] * @param fullNameList By which we can build dependency graph. * @param callback Params: componentType, dependencies. * @param context Scope of callback. */ entity.topologicalTravel = function (targetNameList, fullNameList, callback, context) { if (!targetNameList.length) { return; } var result = makeDepndencyGraph(fullNameList); var graph = result.graph; var noEntryList = result.noEntryList; var targetNameSet = {}; core_util["each"](targetNameList, function (name) { targetNameSet[name] = true; }); while (noEntryList.length) { var currComponentType = noEntryList.pop(); var currVertex = graph[currComponentType]; var isInTargetNameSet = !!targetNameSet[currComponentType]; if (isInTargetNameSet) { callback.call(context, currComponentType, currVertex.originalDeps.slice()); delete targetNameSet[currComponentType]; } core_util["each"](currVertex.successor, isInTargetNameSet ? removeEdgeAndAdd : removeEdge); } core_util["each"](targetNameSet, function () { var errMsg = ''; if (false) { errMsg = makePrintable('Circular dependency may exists: ', targetNameSet, targetNameList, fullNameList); } throw new Error(errMsg); }); function removeEdge(succComponentType) { graph[succComponentType].entryCount--; if (graph[succComponentType].entryCount === 0) { noEntryList.push(succComponentType); } } // Consider this case: legend depends on series, and we call // chart.setOption({series: [...]}), where only series is in option. // If we do not have 'removeEdgeAndAdd', legendModel.mergeOption will // not be called, but only sereis.mergeOption is called. Thus legend // have no chance to update its local record about series (like which // name of series is available in legend). function removeEdgeAndAdd(succComponentType) { targetNameSet[succComponentType] = true; removeEdge(succComponentType); } }; function makeDepndencyGraph(fullNameList) { var graph = {}; var noEntryList = []; core_util["each"](fullNameList, function (name) { var thisItem = createDependencyGraphItem(graph, name); var originalDeps = thisItem.originalDeps = dependencyGetter(name); var availableDeps = getAvailableDependencies(originalDeps, fullNameList); thisItem.entryCount = availableDeps.length; if (thisItem.entryCount === 0) { noEntryList.push(name); } core_util["each"](availableDeps, function (dependentName) { if (core_util["indexOf"](thisItem.predecessor, dependentName) < 0) { thisItem.predecessor.push(dependentName); } var thatItem = createDependencyGraphItem(graph, dependentName); if (core_util["indexOf"](thatItem.successor, dependentName) < 0) { thatItem.successor.push(name); } }); }); return { graph: graph, noEntryList: noEntryList }; } function createDependencyGraphItem(graph, name) { if (!graph[name]) { graph[name] = { predecessor: [], successor: [] }; } return graph[name]; } function getAvailableDependencies(originalDeps, fullNameList) { var availableDeps = []; core_util["each"](originalDeps, function (dep) { core_util["indexOf"](fullNameList, dep) >= 0 && availableDeps.push(dep); }); return availableDeps; } } function inheritDefaultOption(superOption, subOption) { // See also `model/Component.ts#getDefaultOption` return core_util["merge"](core_util["merge"]({}, superOption, true), subOption, true); } // CONCATENATED MODULE: ./node_modules/echarts/lib/i18n/langEN.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ /** * Language: English. */ /* harmony default export */ var langEN = ({ time: { month: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'], monthAbbr: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], dayOfWeek: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], dayOfWeekAbbr: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'] }, legend: { selector: { all: 'All', inverse: 'Inv' } }, toolbox: { brush: { title: { rect: 'Box Select', polygon: 'Lasso Select', lineX: 'Horizontally Select', lineY: 'Vertically Select', keep: 'Keep Selections', clear: 'Clear Selections' } }, dataView: { title: 'Data View', lang: ['Data View', 'Close', 'Refresh'] }, dataZoom: { title: { zoom: 'Zoom', back: 'Zoom Reset' } }, magicType: { title: { line: 'Switch to Line Chart', bar: 'Switch to Bar Chart', stack: 'Stack', tiled: 'Tile' } }, restore: { title: 'Restore' }, saveAsImage: { title: 'Save as Image', lang: ['Right Click to Save Image'] } }, series: { typeNames: { pie: 'Pie chart', bar: 'Bar chart', line: 'Line chart', scatter: 'Scatter plot', effectScatter: 'Ripple scatter plot', radar: 'Radar chart', tree: 'Tree', treemap: 'Treemap', boxplot: 'Boxplot', candlestick: 'Candlestick', k: 'K line chart', heatmap: 'Heat map', map: 'Map', parallel: 'Parallel coordinate map', lines: 'Line graph', graph: 'Relationship graph', sankey: 'Sankey diagram', funnel: 'Funnel chart', gauge: 'Gauge', pictorialBar: 'Pictorial bar', themeRiver: 'Theme River Map', sunburst: 'Sunburst', custom: 'Custom chart', chart: 'Chart' } }, aria: { general: { withTitle: 'This is a chart about "{title}"', withoutTitle: 'This is a chart' }, series: { single: { prefix: '', withName: ' with type {seriesType} named {seriesName}.', withoutName: ' with type {seriesType}.' }, multiple: { prefix: '. It consists of {seriesCount} series count.', withName: ' The {seriesId} series is a {seriesType} representing {seriesName}.', withoutName: ' The {seriesId} series is a {seriesType}.', separator: { middle: '', end: '' } } }, data: { allData: 'The data is as follows: ', partialData: 'The first {displayCnt} items are: ', withName: 'the data for {name} is {value}', withoutName: '{value}', separator: { middle: ', ', end: '. ' } } } }); // CONCATENATED MODULE: ./node_modules/echarts/lib/i18n/langZH.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ /* harmony default export */ var langZH = ({ time: { month: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'], monthAbbr: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'], dayOfWeek: ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'], dayOfWeekAbbr: ['日', '一', '二', '三', '四', '五', '六'] }, legend: { selector: { all: '全选', inverse: '反选' } }, toolbox: { brush: { title: { rect: '矩形选择', polygon: '圈选', lineX: '横向选择', lineY: '纵向选择', keep: '保持选择', clear: '清除选择' } }, dataView: { title: '数据视图', lang: ['数据视图', '关闭', '刷新'] }, dataZoom: { title: { zoom: '区域缩放', back: '区域缩放还原' } }, magicType: { title: { line: '切换为折线图', bar: '切换为柱状图', stack: '切换为堆叠', tiled: '切换为平铺' } }, restore: { title: '还原' }, saveAsImage: { title: '保存为图片', lang: ['右键另存为图片'] } }, series: { typeNames: { pie: '饼图', bar: '柱状图', line: '折线图', scatter: '散点图', effectScatter: '涟漪散点图', radar: '雷达图', tree: '树图', treemap: '矩形树图', boxplot: '箱型图', candlestick: 'K线图', k: 'K线图', heatmap: '热力图', map: '地图', parallel: '平行坐标图', lines: '线图', graph: '关系图', sankey: '桑基图', funnel: '漏斗图', gauge: '仪表盘图', pictorialBar: '象形柱图', themeRiver: '主题河流图', sunburst: '旭日图', custom: '自定义图表', chart: '图表' } }, aria: { general: { withTitle: '这是一个关于“{title}”的图表。', withoutTitle: '这是一个图表,' }, series: { single: { prefix: '', withName: '图表类型是{seriesType},表示{seriesName}。', withoutName: '图表类型是{seriesType}。' }, multiple: { prefix: '它由{seriesCount}个图表系列组成。', withName: '第{seriesId}个系列是一个表示{seriesName}的{seriesType},', withoutName: '第{seriesId}个系列是一个{seriesType},', separator: { middle: ';', end: '。' } } }, data: { allData: '其数据是——', partialData: '其中,前{displayCnt}项是——', withName: '{name}的数据是{value}', withoutName: '{value}', separator: { middle: ',', end: '' } } } }); // CONCATENATED MODULE: ./node_modules/echarts/lib/core/locale.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ // default import ZH and EN lang var LOCALE_ZH = 'ZH'; var LOCALE_EN = 'EN'; var DEFAULT_LOCALE = LOCALE_EN; var localeStorage = {}; var localeModels = {}; var SYSTEM_LANG = !core_env["a" /* default */].domSupported ? DEFAULT_LOCALE : function () { var langStr = (/* eslint-disable-next-line */ document.documentElement.lang || navigator.language || navigator.browserLanguage || DEFAULT_LOCALE).toUpperCase(); return langStr.indexOf(LOCALE_ZH) > -1 ? LOCALE_ZH : DEFAULT_LOCALE; }(); function registerLocale(locale, localeObj) { locale = locale.toUpperCase(); localeModels[locale] = new model_Model(localeObj); localeStorage[locale] = localeObj; } // export function getLocale(locale: string) { // return localeStorage[locale]; // } function createLocaleObject(locale) { if (Object(core_util["isString"])(locale)) { var localeObj = localeStorage[locale.toUpperCase()] || {}; if (locale === LOCALE_ZH || locale === LOCALE_EN) { return Object(core_util["clone"])(localeObj); } else { return Object(core_util["merge"])(Object(core_util["clone"])(localeObj), Object(core_util["clone"])(localeStorage[DEFAULT_LOCALE]), false); } } else { return Object(core_util["merge"])(Object(core_util["clone"])(locale), Object(core_util["clone"])(localeStorage[DEFAULT_LOCALE]), false); } } function getLocaleModel(lang) { return localeModels[lang]; } function getDefaultLocaleModel() { return localeModels[DEFAULT_LOCALE]; } // Default locale registerLocale(LOCALE_EN, langEN); registerLocale(LOCALE_ZH, langZH); // CONCATENATED MODULE: ./node_modules/echarts/lib/util/time.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 ONE_SECOND = 1000; var ONE_MINUTE = ONE_SECOND * 60; var ONE_HOUR = ONE_MINUTE * 60; var ONE_DAY = ONE_HOUR * 24; var ONE_YEAR = ONE_DAY * 365; var defaultLeveledFormatter = { year: '{yyyy}', month: '{MMM}', day: '{d}', hour: '{HH}:{mm}', minute: '{HH}:{mm}', second: '{HH}:{mm}:{ss}', millisecond: '{HH}:{mm}:{ss} {SSS}', none: '{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}' }; var fullDayFormatter = '{yyyy}-{MM}-{dd}'; var fullLeveledFormatter = { year: '{yyyy}', month: '{yyyy}-{MM}', day: fullDayFormatter, hour: fullDayFormatter + ' ' + defaultLeveledFormatter.hour, minute: fullDayFormatter + ' ' + defaultLeveledFormatter.minute, second: fullDayFormatter + ' ' + defaultLeveledFormatter.second, millisecond: defaultLeveledFormatter.none }; var primaryTimeUnits = ['year', 'month', 'day', 'hour', 'minute', 'second', 'millisecond']; var timeUnits = ['year', 'half-year', 'quarter', 'month', 'week', 'half-week', 'day', 'half-day', 'quarter-day', 'hour', 'minute', 'second', 'millisecond']; function pad(str, len) { str += ''; return '0000'.substr(0, len - str.length) + str; } function getPrimaryTimeUnit(timeUnit) { switch (timeUnit) { case 'half-year': case 'quarter': return 'month'; case 'week': case 'half-week': return 'day'; case 'half-day': case 'quarter-day': return 'hour'; default: // year, minutes, second, milliseconds return timeUnit; } } function isPrimaryTimeUnit(timeUnit) { return timeUnit === getPrimaryTimeUnit(timeUnit); } function getDefaultFormatPrecisionOfInterval(timeUnit) { switch (timeUnit) { case 'year': case 'month': return 'day'; case 'millisecond': return 'millisecond'; default: // Also for day, hour, minute, second return 'second'; } } function format( // Note: The result based on `isUTC` are totally different, which can not be just simply // substituted by the result without `isUTC`. So we make the param `isUTC` mandatory. time, template, isUTC, lang) { var date = parseDate(time); var y = date[fullYearGetterName(isUTC)](); var M = date[monthGetterName(isUTC)]() + 1; var q = Math.floor((M - 1) / 3) + 1; var d = date[dateGetterName(isUTC)](); var e = date['get' + (isUTC ? 'UTC' : '') + 'Day'](); var H = date[hoursGetterName(isUTC)](); var h = (H - 1) % 12 + 1; var m = date[minutesGetterName(isUTC)](); var s = date[secondsGetterName(isUTC)](); var S = date[millisecondsGetterName(isUTC)](); var a = H >= 12 ? 'pm' : 'am'; var A = a.toUpperCase(); var localeModel = lang instanceof model_Model ? lang : getLocaleModel(lang || SYSTEM_LANG) || getDefaultLocaleModel(); var timeModel = localeModel.getModel('time'); var month = timeModel.get('month'); var monthAbbr = timeModel.get('monthAbbr'); var dayOfWeek = timeModel.get('dayOfWeek'); var dayOfWeekAbbr = timeModel.get('dayOfWeekAbbr'); return (template || '').replace(/{a}/g, a + '').replace(/{A}/g, A + '').replace(/{yyyy}/g, y + '').replace(/{yy}/g, pad(y % 100 + '', 2)).replace(/{Q}/g, q + '').replace(/{MMMM}/g, month[M - 1]).replace(/{MMM}/g, monthAbbr[M - 1]).replace(/{MM}/g, pad(M, 2)).replace(/{M}/g, M + '').replace(/{dd}/g, pad(d, 2)).replace(/{d}/g, d + '').replace(/{eeee}/g, dayOfWeek[e]).replace(/{ee}/g, dayOfWeekAbbr[e]).replace(/{e}/g, e + '').replace(/{HH}/g, pad(H, 2)).replace(/{H}/g, H + '').replace(/{hh}/g, pad(h + '', 2)).replace(/{h}/g, h + '').replace(/{mm}/g, pad(m, 2)).replace(/{m}/g, m + '').replace(/{ss}/g, pad(s, 2)).replace(/{s}/g, s + '').replace(/{SSS}/g, pad(S, 3)).replace(/{S}/g, S + ''); } function leveledFormat(tick, idx, formatter, lang, isUTC) { var template = null; if (core_util["isString"](formatter)) { // Single formatter for all units at all levels template = formatter; } else if (core_util["isFunction"](formatter)) { // Callback formatter template = formatter(tick.value, idx, { level: tick.level }); } else { var defaults = core_util["extend"]({}, defaultLeveledFormatter); if (tick.level > 0) { for (var i = 0; i < primaryTimeUnits.length; ++i) { defaults[primaryTimeUnits[i]] = "{primary|" + defaults[primaryTimeUnits[i]] + "}"; } } var mergedFormatter = formatter ? formatter.inherit === false ? formatter // Use formatter with bigger units : core_util["defaults"](formatter, defaults) : defaults; var unit = getUnitFromValue(tick.value, isUTC); if (mergedFormatter[unit]) { template = mergedFormatter[unit]; } else if (mergedFormatter.inherit) { // Unit formatter is not defined and should inherit from bigger units var targetId = timeUnits.indexOf(unit); for (var i = targetId - 1; i >= 0; --i) { if (mergedFormatter[unit]) { template = mergedFormatter[unit]; break; } } template = template || defaults.none; } if (core_util["isArray"](template)) { var levelId = tick.level == null ? 0 : tick.level >= 0 ? tick.level : template.length + tick.level; levelId = Math.min(levelId, template.length - 1); template = template[levelId]; } } return format(new Date(tick.value), template, isUTC, lang); } function getUnitFromValue(value, isUTC) { var date = parseDate(value); var M = date[monthGetterName(isUTC)]() + 1; var d = date[dateGetterName(isUTC)](); var h = date[hoursGetterName(isUTC)](); var m = date[minutesGetterName(isUTC)](); var s = date[secondsGetterName(isUTC)](); var S = date[millisecondsGetterName(isUTC)](); var isSecond = S === 0; var isMinute = isSecond && s === 0; var isHour = isMinute && m === 0; var isDay = isHour && h === 0; var isMonth = isDay && d === 1; var isYear = isMonth && M === 1; if (isYear) { return 'year'; } else if (isMonth) { return 'month'; } else if (isDay) { return 'day'; } else if (isHour) { return 'hour'; } else if (isMinute) { return 'minute'; } else if (isSecond) { return 'second'; } else { return 'millisecond'; } } function getUnitValue(value, unit, isUTC) { var date = core_util["isNumber"](value) ? parseDate(value) : value; unit = unit || getUnitFromValue(value, isUTC); switch (unit) { case 'year': return date[fullYearGetterName(isUTC)](); case 'half-year': return date[monthGetterName(isUTC)]() >= 6 ? 1 : 0; case 'quarter': return Math.floor((date[monthGetterName(isUTC)]() + 1) / 4); case 'month': return date[monthGetterName(isUTC)](); case 'day': return date[dateGetterName(isUTC)](); case 'half-day': return date[hoursGetterName(isUTC)]() / 24; case 'hour': return date[hoursGetterName(isUTC)](); case 'minute': return date[minutesGetterName(isUTC)](); case 'second': return date[secondsGetterName(isUTC)](); case 'millisecond': return date[millisecondsGetterName(isUTC)](); } } function fullYearGetterName(isUTC) { return isUTC ? 'getUTCFullYear' : 'getFullYear'; } function monthGetterName(isUTC) { return isUTC ? 'getUTCMonth' : 'getMonth'; } function dateGetterName(isUTC) { return isUTC ? 'getUTCDate' : 'getDate'; } function hoursGetterName(isUTC) { return isUTC ? 'getUTCHours' : 'getHours'; } function minutesGetterName(isUTC) { return isUTC ? 'getUTCMinutes' : 'getMinutes'; } function secondsGetterName(isUTC) { return isUTC ? 'getUTCSeconds' : 'getSeconds'; } function millisecondsGetterName(isUTC) { return isUTC ? 'getUTCMilliseconds' : 'getMilliseconds'; } function fullYearSetterName(isUTC) { return isUTC ? 'setUTCFullYear' : 'setFullYear'; } function monthSetterName(isUTC) { return isUTC ? 'setUTCMonth' : 'setMonth'; } function dateSetterName(isUTC) { return isUTC ? 'setUTCDate' : 'setDate'; } function hoursSetterName(isUTC) { return isUTC ? 'setUTCHours' : 'setHours'; } function minutesSetterName(isUTC) { return isUTC ? 'setUTCMinutes' : 'setMinutes'; } function secondsSetterName(isUTC) { return isUTC ? 'setUTCSeconds' : 'setSeconds'; } function millisecondsSetterName(isUTC) { return isUTC ? 'setUTCMilliseconds' : 'setMilliseconds'; } // CONCATENATED MODULE: ./node_modules/echarts/lib/legacy/getTextRect.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 getTextRect(text, font, align, verticalAlign, padding, rich, truncate, lineHeight) { var textEl = new Text({ style: { text: text, font: font, align: align, verticalAlign: verticalAlign, padding: padding, rich: rich, overflow: truncate ? 'truncate' : null, lineHeight: lineHeight } }); return textEl.getBoundingRect(); } // CONCATENATED MODULE: ./node_modules/echarts/lib/util/format.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ /** * Add a comma each three digit. */ function addCommas(x) { if (!isNumeric(x)) { return core_util["isString"](x) ? x : '-'; } var parts = (x + '').split('.'); return parts[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g, '$1,') + (parts.length > 1 ? '.' + parts[1] : ''); } function toCamelCase(str, upperCaseFirst) { str = (str || '').toLowerCase().replace(/-(.)/g, function (match, group1) { return group1.toUpperCase(); }); if (upperCaseFirst && str) { str = str.charAt(0).toUpperCase() + str.slice(1); } return str; } var normalizeCssArray = core_util["normalizeCssArray"]; /** * Make value user readable for tooltip and label. * "User readable": * Try to not print programmer-specific text like NaN, Infinity, null, undefined. * Avoid to display an empty string, which users can not recognize there is * a value and it might look like a bug. */ function makeValueReadable(value, valueType, useUTC) { var USER_READABLE_DEFUALT_TIME_PATTERN = '{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}'; function stringToUserReadable(str) { return str && core_util["trim"](str) ? str : '-'; } function isNumberUserReadable(num) { return !!(num != null && !isNaN(num) && isFinite(num)); } var isTypeTime = valueType === 'time'; var isValueDate = value instanceof Date; if (isTypeTime || isValueDate) { var date = isTypeTime ? parseDate(value) : value; if (!isNaN(+date)) { return format(date, USER_READABLE_DEFUALT_TIME_PATTERN, useUTC); } else if (isValueDate) { return '-'; } // In other cases, continue to try to display the value in the following code. } if (valueType === 'ordinal') { return core_util["isStringSafe"](value) ? stringToUserReadable(value) : core_util["isNumber"](value) ? isNumberUserReadable(value) ? value + '' : '-' : '-'; } // By default. var numericResult = numericToNumber(value); return isNumberUserReadable(numericResult) ? addCommas(numericResult) : core_util["isStringSafe"](value) ? stringToUserReadable(value) : typeof value === 'boolean' ? value + '' : '-'; } var TPL_VAR_ALIAS = ['a', 'b', 'c', 'd', 'e', 'f', 'g']; var wrapVar = function (varName, seriesIdx) { return '{' + varName + (seriesIdx == null ? '' : seriesIdx) + '}'; }; /** * Template formatter * @param {Array.|Object} paramsList */ function formatTpl(tpl, paramsList, encode) { if (!core_util["isArray"](paramsList)) { paramsList = [paramsList]; } var seriesLen = paramsList.length; if (!seriesLen) { return ''; } var $vars = paramsList[0].$vars || []; for (var i = 0; i < $vars.length; i++) { var alias = TPL_VAR_ALIAS[i]; tpl = tpl.replace(wrapVar(alias), wrapVar(alias, 0)); } for (var seriesIdx = 0; seriesIdx < seriesLen; seriesIdx++) { for (var k = 0; k < $vars.length; k++) { var val = paramsList[seriesIdx][$vars[k]]; tpl = tpl.replace(wrapVar(TPL_VAR_ALIAS[k], seriesIdx), encode ? encodeHTML(val) : val); } } return tpl; } /** * simple Template formatter */ function formatTplSimple(tpl, param, encode) { core_util["each"](param, function (value, key) { tpl = tpl.replace('{' + key + '}', encode ? encodeHTML(value) : value); }); return tpl; } function getTooltipMarker(inOpt, extraCssText) { var opt = core_util["isString"](inOpt) ? { color: inOpt, extraCssText: extraCssText } : inOpt || {}; var color = opt.color; var type = opt.type; extraCssText = opt.extraCssText; var renderMode = opt.renderMode || 'html'; if (!color) { return ''; } if (renderMode === 'html') { return type === 'subItem' ? '' : ''; } else { // Should better not to auto generate style name by auto-increment number here. // Because this util is usually called in tooltip formatter, which is probably // called repeatedly when mouse move and the auto-increment number increases fast. // Users can make their own style name by theirselves, make it unique and readable. var markerId = opt.markerId || 'markerX'; return { renderMode: renderMode, content: '{' + markerId + '|} ', style: type === 'subItem' ? { width: 4, height: 4, borderRadius: 2, backgroundColor: color } : { width: 10, height: 10, borderRadius: 5, backgroundColor: color } }; } } /** * @deprecated Use `time/format` instead. * ISO Date format * @param {string} tpl * @param {number} value * @param {boolean} [isUTC=false] Default in local time. * see `module:echarts/scale/Time` * and `module:echarts/util/number#parseDate`. * @inner */ function formatTime(tpl, value, isUTC) { if (false) { deprecateReplaceLog('echarts.format.formatTime', 'echarts.time.format'); } if (tpl === 'week' || tpl === 'month' || tpl === 'quarter' || tpl === 'half-year' || tpl === 'year') { tpl = 'MM-dd\nyyyy'; } var date = parseDate(value); var getUTC = isUTC ? 'getUTC' : 'get'; var y = date[getUTC + 'FullYear'](); var M = date[getUTC + 'Month']() + 1; var d = date[getUTC + 'Date'](); var h = date[getUTC + 'Hours'](); var m = date[getUTC + 'Minutes'](); var s = date[getUTC + 'Seconds'](); var S = date[getUTC + 'Milliseconds'](); tpl = tpl.replace('MM', pad(M, 2)).replace('M', M).replace('yyyy', y).replace('yy', pad(y % 100 + '', 2)).replace('dd', pad(d, 2)).replace('d', d).replace('hh', pad(h, 2)).replace('h', h).replace('mm', pad(m, 2)).replace('m', m).replace('ss', pad(s, 2)).replace('s', s).replace('SSS', pad(S, 3)); return tpl; } /** * Capital first * @param {string} str * @return {string} */ function capitalFirst(str) { return str ? str.charAt(0).toUpperCase() + str.substr(1) : str; } /** * @return Never be null/undefined. */ function convertToColorString(color, defaultColor) { defaultColor = defaultColor || 'transparent'; return core_util["isString"](color) ? color : core_util["isObject"](color) ? color.colorStops && (color.colorStops[0] || {}).color || defaultColor : defaultColor; } /** * open new tab * @param link url * @param target blank or self */ function windowOpen(link, target) { /* global window */ if (target === '_blank' || target === 'blank') { var blank = window.open(); blank.opener = null; blank.location.href = link; } else { window.open(link, target); } } // CONCATENATED MODULE: ./node_modules/echarts/lib/util/layout.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ // Layout helpers for each component positioning var layout_each = core_util["each"]; /** * @public */ var LOCATION_PARAMS = ['left', 'right', 'top', 'bottom', 'width', 'height']; /** * @public */ var HV_NAMES = [['width', 'left', 'right'], ['height', 'top', 'bottom']]; function boxLayout(orient, group, gap, maxWidth, maxHeight) { var x = 0; var y = 0; if (maxWidth == null) { maxWidth = Infinity; } if (maxHeight == null) { maxHeight = Infinity; } var currentLineMaxSize = 0; group.eachChild(function (child, idx) { var rect = child.getBoundingRect(); var nextChild = group.childAt(idx + 1); var nextChildRect = nextChild && nextChild.getBoundingRect(); var nextX; var nextY; if (orient === 'horizontal') { var moveX = rect.width + (nextChildRect ? -nextChildRect.x + rect.x : 0); nextX = x + moveX; // Wrap when width exceeds maxWidth or meet a `newline` group // FIXME compare before adding gap? if (nextX > maxWidth || child.newline) { x = 0; nextX = moveX; y += currentLineMaxSize + gap; currentLineMaxSize = rect.height; } else { // FIXME: consider rect.y is not `0`? currentLineMaxSize = Math.max(currentLineMaxSize, rect.height); } } else { var moveY = rect.height + (nextChildRect ? -nextChildRect.y + rect.y : 0); nextY = y + moveY; // Wrap when width exceeds maxHeight or meet a `newline` group if (nextY > maxHeight || child.newline) { x += currentLineMaxSize + gap; y = 0; nextY = moveY; currentLineMaxSize = rect.width; } else { currentLineMaxSize = Math.max(currentLineMaxSize, rect.width); } } if (child.newline) { return; } child.x = x; child.y = y; child.markRedraw(); orient === 'horizontal' ? x = nextX + gap : y = nextY + gap; }); } /** * VBox or HBox layouting * @param {string} orient * @param {module:zrender/graphic/Group} group * @param {number} gap * @param {number} [width=Infinity] * @param {number} [height=Infinity] */ var layout_box = boxLayout; /** * VBox layouting * @param {module:zrender/graphic/Group} group * @param {number} gap * @param {number} [width=Infinity] * @param {number} [height=Infinity] */ var vbox = core_util["curry"](boxLayout, 'vertical'); /** * HBox layouting * @param {module:zrender/graphic/Group} group * @param {number} gap * @param {number} [width=Infinity] * @param {number} [height=Infinity] */ var hbox = core_util["curry"](boxLayout, 'horizontal'); /** * If x or x2 is not specified or 'center' 'left' 'right', * the width would be as long as possible. * If y or y2 is not specified or 'middle' 'top' 'bottom', * the height would be as long as possible. */ function getAvailableSize(positionInfo, containerRect, margin) { var containerWidth = containerRect.width; var containerHeight = containerRect.height; var x = number_parsePercent(positionInfo.left, containerWidth); var y = number_parsePercent(positionInfo.top, containerHeight); var x2 = number_parsePercent(positionInfo.right, containerWidth); var y2 = number_parsePercent(positionInfo.bottom, containerHeight); (isNaN(x) || isNaN(parseFloat(positionInfo.left))) && (x = 0); (isNaN(x2) || isNaN(parseFloat(positionInfo.right))) && (x2 = containerWidth); (isNaN(y) || isNaN(parseFloat(positionInfo.top))) && (y = 0); (isNaN(y2) || isNaN(parseFloat(positionInfo.bottom))) && (y2 = containerHeight); margin = normalizeCssArray(margin || 0); return { width: Math.max(x2 - x - margin[1] - margin[3], 0), height: Math.max(y2 - y - margin[0] - margin[2], 0) }; } /** * Parse position info. */ function getLayoutRect(positionInfo, containerRect, margin) { margin = normalizeCssArray(margin || 0); var containerWidth = containerRect.width; var containerHeight = containerRect.height; var left = number_parsePercent(positionInfo.left, containerWidth); var top = number_parsePercent(positionInfo.top, containerHeight); var right = number_parsePercent(positionInfo.right, containerWidth); var bottom = number_parsePercent(positionInfo.bottom, containerHeight); var width = number_parsePercent(positionInfo.width, containerWidth); var height = number_parsePercent(positionInfo.height, containerHeight); var verticalMargin = margin[2] + margin[0]; var horizontalMargin = margin[1] + margin[3]; var aspect = positionInfo.aspect; // If width is not specified, calculate width from left and right if (isNaN(width)) { width = containerWidth - right - horizontalMargin - left; } if (isNaN(height)) { height = containerHeight - bottom - verticalMargin - top; } if (aspect != null) { // If width and height are not given // 1. Graph should not exceeds the container // 2. Aspect must be keeped // 3. Graph should take the space as more as possible // FIXME // Margin is not considered, because there is no case that both // using margin and aspect so far. if (isNaN(width) && isNaN(height)) { if (aspect > containerWidth / containerHeight) { width = containerWidth * 0.8; } else { height = containerHeight * 0.8; } } // Calculate width or height with given aspect if (isNaN(width)) { width = aspect * height; } if (isNaN(height)) { height = width / aspect; } } // If left is not specified, calculate left from right and width if (isNaN(left)) { left = containerWidth - right - width - horizontalMargin; } if (isNaN(top)) { top = containerHeight - bottom - height - verticalMargin; } // Align left and top switch (positionInfo.left || positionInfo.right) { case 'center': left = containerWidth / 2 - width / 2 - margin[3]; break; case 'right': left = containerWidth - width - horizontalMargin; break; } switch (positionInfo.top || positionInfo.bottom) { case 'middle': case 'center': top = containerHeight / 2 - height / 2 - margin[0]; break; case 'bottom': top = containerHeight - height - verticalMargin; break; } // If something is wrong and left, top, width, height are calculated as NaN left = left || 0; top = top || 0; if (isNaN(width)) { // Width may be NaN if only one value is given except width width = containerWidth - horizontalMargin - left - (right || 0); } if (isNaN(height)) { // Height may be NaN if only one value is given except height height = containerHeight - verticalMargin - top - (bottom || 0); } var rect = new core_BoundingRect(left + margin[3], top + margin[0], width, height); rect.margin = margin; return rect; } /** * Position a zr element in viewport * Group position is specified by either * {left, top}, {right, bottom} * If all properties exists, right and bottom will be igonred. * * Logic: * 1. Scale (against origin point in parent coord) * 2. Rotate (against origin point in parent coord) * 3. Translate (with el.position by this method) * So this method only fixes the last step 'Translate', which does not affect * scaling and rotating. * * If be called repeatedly with the same input el, the same result will be gotten. * * Return true if the layout happened. * * @param el Should have `getBoundingRect` method. * @param positionInfo * @param positionInfo.left * @param positionInfo.top * @param positionInfo.right * @param positionInfo.bottom * @param positionInfo.width Only for opt.boundingModel: 'raw' * @param positionInfo.height Only for opt.boundingModel: 'raw' * @param containerRect * @param margin * @param opt * @param opt.hv Only horizontal or only vertical. Default to be [1, 1] * @param opt.boundingMode * Specify how to calculate boundingRect when locating. * 'all': Position the boundingRect that is transformed and uioned * both itself and its descendants. * This mode simplies confine the elements in the bounding * of their container (e.g., using 'right: 0'). * 'raw': Position the boundingRect that is not transformed and only itself. * This mode is useful when you want a element can overflow its * container. (Consider a rotated circle needs to be located in a corner.) * In this mode positionInfo.width/height can only be number. */ function positionElement(el, positionInfo, containerRect, margin, opt, out) { var h = !opt || !opt.hv || opt.hv[0]; var v = !opt || !opt.hv || opt.hv[1]; var boundingMode = opt && opt.boundingMode || 'all'; out = out || el; out.x = el.x; out.y = el.y; if (!h && !v) { return false; } var rect; if (boundingMode === 'raw') { rect = el.type === 'group' ? new core_BoundingRect(0, 0, +positionInfo.width || 0, +positionInfo.height || 0) : el.getBoundingRect(); } else { rect = el.getBoundingRect(); if (el.needLocalTransform()) { var transform = el.getLocalTransform(); // Notice: raw rect may be inner object of el, // which should not be modified. rect = rect.clone(); rect.applyTransform(transform); } } // The real width and height can not be specified but calculated by the given el. var layoutRect = getLayoutRect(core_util["defaults"]({ width: rect.width, height: rect.height }, positionInfo), containerRect, margin); // Because 'tranlate' is the last step in transform // (see zrender/core/Transformable#getLocalTransform), // we can just only modify el.position to get final result. var dx = h ? layoutRect.x - rect.x : 0; var dy = v ? layoutRect.y - rect.y : 0; if (boundingMode === 'raw') { out.x = dx; out.y = dy; } else { out.x += dx; out.y += dy; } if (out === el) { el.markRedraw(); } return true; } /** * @param option Contains some of the properties in HV_NAMES. * @param hvIdx 0: horizontal; 1: vertical. */ function sizeCalculable(option, hvIdx) { return option[HV_NAMES[hvIdx][0]] != null || option[HV_NAMES[hvIdx][1]] != null && option[HV_NAMES[hvIdx][2]] != null; } function fetchLayoutMode(ins) { var layoutMode = ins.layoutMode || ins.constructor.layoutMode; return core_util["isObject"](layoutMode) ? layoutMode : layoutMode ? { type: layoutMode } : null; } /** * Consider Case: * When default option has {left: 0, width: 100}, and we set {right: 0} * through setOption or media query, using normal zrUtil.merge will cause * {right: 0} does not take effect. * * @example * ComponentModel.extend({ * init: function () { * ... * let inputPositionParams = layout.getLayoutParams(option); * this.mergeOption(inputPositionParams); * }, * mergeOption: function (newOption) { * newOption && zrUtil.merge(thisOption, newOption, true); * layout.mergeLayoutParam(thisOption, newOption); * } * }); * * @param targetOption * @param newOption * @param opt */ function mergeLayoutParam(targetOption, newOption, opt) { var ignoreSize = opt && opt.ignoreSize; !core_util["isArray"](ignoreSize) && (ignoreSize = [ignoreSize, ignoreSize]); var hResult = merge(HV_NAMES[0], 0); var vResult = merge(HV_NAMES[1], 1); copy(HV_NAMES[0], targetOption, hResult); copy(HV_NAMES[1], targetOption, vResult); function merge(names, hvIdx) { var newParams = {}; var newValueCount = 0; var merged = {}; var mergedValueCount = 0; var enoughParamNumber = 2; layout_each(names, function (name) { merged[name] = targetOption[name]; }); layout_each(names, function (name) { // Consider case: newOption.width is null, which is // set by user for removing width setting. hasProp(newOption, name) && (newParams[name] = merged[name] = newOption[name]); hasValue(newParams, name) && newValueCount++; hasValue(merged, name) && mergedValueCount++; }); if (ignoreSize[hvIdx]) { // Only one of left/right is premitted to exist. if (hasValue(newOption, names[1])) { merged[names[2]] = null; } else if (hasValue(newOption, names[2])) { merged[names[1]] = null; } return merged; } // Case: newOption: {width: ..., right: ...}, // or targetOption: {right: ...} and newOption: {width: ...}, // There is no conflict when merged only has params count // little than enoughParamNumber. if (mergedValueCount === enoughParamNumber || !newValueCount) { return merged; } // Case: newOption: {width: ..., right: ...}, // Than we can make sure user only want those two, and ignore // all origin params in targetOption. else if (newValueCount >= enoughParamNumber) { return newParams; } else { // Chose another param from targetOption by priority. for (var i = 0; i < names.length; i++) { var name_1 = names[i]; if (!hasProp(newParams, name_1) && hasProp(targetOption, name_1)) { newParams[name_1] = targetOption[name_1]; break; } } return newParams; } } function hasProp(obj, name) { return obj.hasOwnProperty(name); } function hasValue(obj, name) { return obj[name] != null && obj[name] !== 'auto'; } function copy(names, target, source) { layout_each(names, function (name) { target[name] = source[name]; }); } } /** * Retrieve 'left', 'right', 'top', 'bottom', 'width', 'height' from object. */ function getLayoutParams(source) { return copyLayoutParams({}, source); } /** * Retrieve 'left', 'right', 'top', 'bottom', 'width', 'height' from object. * @param {Object} source * @return {Object} Result contains those props. */ function copyLayoutParams(target, source) { source && target && layout_each(LOCATION_PARAMS, function (name) { source.hasOwnProperty(name) && (target[name] = source[name]); }); return target; } // CONCATENATED MODULE: ./node_modules/echarts/lib/model/Component.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 Component_inner = makeInner(); var Component_ComponentModel = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(ComponentModel, _super); function ComponentModel(option, parentModel, ecModel) { var _this = _super.call(this, option, parentModel, ecModel) || this; _this.uid = getUID('ec_cpt_model'); return _this; } ComponentModel.prototype.init = function (option, parentModel, ecModel) { this.mergeDefaultAndTheme(option, ecModel); }; ComponentModel.prototype.mergeDefaultAndTheme = function (option, ecModel) { var layoutMode = fetchLayoutMode(this); var inputPositionParams = layoutMode ? getLayoutParams(option) : {}; var themeModel = ecModel.getTheme(); core_util["merge"](option, themeModel.get(this.mainType)); core_util["merge"](option, this.getDefaultOption()); if (layoutMode) { mergeLayoutParam(option, inputPositionParams, layoutMode); } }; ComponentModel.prototype.mergeOption = function (option, ecModel) { core_util["merge"](this.option, option, true); var layoutMode = fetchLayoutMode(this); if (layoutMode) { mergeLayoutParam(this.option, option, layoutMode); } }; /** * Called immediately after `init` or `mergeOption` of this instance called. */ ComponentModel.prototype.optionUpdated = function (newCptOption, isInit) {}; /** * [How to declare defaultOption]: * * (A) If using class declaration in typescript (since echarts 5): * ```ts * import {ComponentOption} from '../model/option.js'; * export interface XxxOption extends ComponentOption { * aaa: number * } * export class XxxModel extends Component { * static type = 'xxx'; * static defaultOption: XxxOption = { * aaa: 123 * } * } * Component.registerClass(XxxModel); * ``` * ```ts * import {inheritDefaultOption} from '../util/component.js'; * import {XxxModel, XxxOption} from './XxxModel.js'; * export interface XxxSubOption extends XxxOption { * bbb: number * } * class XxxSubModel extends XxxModel { * static defaultOption: XxxSubOption = inheritDefaultOption(XxxModel.defaultOption, { * bbb: 456 * }) * fn() { * let opt = this.getDefaultOption(); * // opt is {aaa: 123, bbb: 456} * } * } * ``` * * (B) If using class extend (previous approach in echarts 3 & 4): * ```js * let XxxComponent = Component.extend({ * defaultOption: { * xx: 123 * } * }) * ``` * ```js * let XxxSubComponent = XxxComponent.extend({ * defaultOption: { * yy: 456 * }, * fn: function () { * let opt = this.getDefaultOption(); * // opt is {xx: 123, yy: 456} * } * }) * ``` */ ComponentModel.prototype.getDefaultOption = function () { var ctor = this.constructor; // If using class declaration, it is different to travel super class // in legacy env and auto merge defaultOption. So if using class // declaration, defaultOption should be merged manually. if (!isExtendedClass(ctor)) { // When using ts class, defaultOption must be declared as static. return ctor.defaultOption; } // FIXME: remove this approach? var fields = Component_inner(this); if (!fields.defaultOption) { var optList = []; var clz = ctor; while (clz) { var opt = clz.prototype.defaultOption; opt && optList.push(opt); clz = clz.superClass; } var defaultOption = {}; for (var i = optList.length - 1; i >= 0; i--) { defaultOption = core_util["merge"](defaultOption, optList[i], true); } fields.defaultOption = defaultOption; } return fields.defaultOption; }; /** * Notice: always force to input param `useDefault` in case that forget to consider it. * The same behavior as `modelUtil.parseFinder`. * * @param useDefault In many cases like series refer axis and axis refer grid, * If axis index / axis id not specified, use the first target as default. * In other cases like dataZoom refer axis, if not specified, measn no refer. */ ComponentModel.prototype.getReferringComponents = function (mainType, opt) { var indexKey = mainType + 'Index'; var idKey = mainType + 'Id'; return queryReferringComponents(this.ecModel, mainType, { index: this.get(indexKey, true), id: this.get(idKey, true) }, opt); }; ComponentModel.prototype.getBoxLayoutParams = function () { // Consider itself having box layout configs. var boxLayoutModel = this; return { left: boxLayoutModel.get('left'), top: boxLayoutModel.get('top'), right: boxLayoutModel.get('right'), bottom: boxLayoutModel.get('bottom'), width: boxLayoutModel.get('width'), height: boxLayoutModel.get('height') }; }; /** * Get key for zlevel. * If developers don't configure zlevel. We will assign zlevel to series based on the key. * For example, lines with trail effect and progressive series will in an individual zlevel. */ ComponentModel.prototype.getZLevelKey = function () { return ''; }; ComponentModel.prototype.setZLevel = function (zlevel) { this.option.zlevel = zlevel; }; ComponentModel.protoInitialize = function () { var proto = ComponentModel.prototype; proto.type = 'component'; proto.id = ''; proto.name = ''; proto.mainType = ''; proto.subType = ''; proto.componentIndex = 0; }(); return ComponentModel; }(model_Model); mountExtend(Component_ComponentModel, model_Model); enableClassManagement(Component_ComponentModel); enableSubTypeDefaulter(Component_ComponentModel); enableTopologicalTravel(Component_ComponentModel, getDependencies); function getDependencies(componentType) { var deps = []; core_util["each"](Component_ComponentModel.getClassesByMainType(componentType), function (clz) { deps = deps.concat(clz.dependencies || clz.prototype.dependencies || []); }); // Ensure main type. deps = core_util["map"](deps, function (type) { return parseClassType(type).main; }); // Hack dataset for convenience. if (componentType !== 'dataset' && core_util["indexOf"](deps, 'dataset') <= 0) { deps.unshift('dataset'); } return deps; } /* harmony default export */ var Component = (Component_ComponentModel); // CONCATENATED MODULE: ./node_modules/echarts/lib/model/globalDefault.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 globalDefault_platform = ''; // Navigator not exists in node if (typeof navigator !== 'undefined') { /* global navigator */ globalDefault_platform = navigator.platform || ''; } var decalColor = 'rgba(0, 0, 0, 0.2)'; /* harmony default export */ var globalDefault = ({ darkMode: 'auto', // backgroundColor: 'rgba(0,0,0,0)', colorBy: 'series', color: ['#5470c6', '#91cc75', '#fac858', '#ee6666', '#73c0de', '#3ba272', '#fc8452', '#9a60b4', '#ea7ccc'], gradientColor: ['#f6efa6', '#d88273', '#bf444c'], aria: { decal: { decals: [{ color: decalColor, dashArrayX: [1, 0], dashArrayY: [2, 5], symbolSize: 1, rotation: Math.PI / 6 }, { color: decalColor, symbol: 'circle', dashArrayX: [[8, 8], [0, 8, 8, 0]], dashArrayY: [6, 0], symbolSize: 0.8 }, { color: decalColor, dashArrayX: [1, 0], dashArrayY: [4, 3], rotation: -Math.PI / 4 }, { color: decalColor, dashArrayX: [[6, 6], [0, 6, 6, 0]], dashArrayY: [6, 0] }, { color: decalColor, dashArrayX: [[1, 0], [1, 6]], dashArrayY: [1, 0, 6, 0], rotation: Math.PI / 4 }, { color: decalColor, symbol: 'triangle', dashArrayX: [[9, 9], [0, 9, 9, 0]], dashArrayY: [7, 2], symbolSize: 0.75 }] } }, // If xAxis and yAxis declared, grid is created by default. // grid: {}, textStyle: { // color: '#000', // decoration: 'none', // PENDING fontFamily: globalDefault_platform.match(/^Win/) ? 'Microsoft YaHei' : 'sans-serif', // fontFamily: 'Arial, Verdana, sans-serif', fontSize: 12, fontStyle: 'normal', fontWeight: 'normal' }, // http://blogs.adobe.com/webplatform/2014/02/24/using-blend-modes-in-html-canvas/ // https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/globalCompositeOperation // Default is source-over blendMode: null, stateAnimation: { duration: 300, easing: 'cubicOut' }, animation: 'auto', animationDuration: 1000, animationDurationUpdate: 500, animationEasing: 'cubicInOut', animationEasingUpdate: 'cubicInOut', animationThreshold: 2000, // Configuration for progressive/incremental rendering progressiveThreshold: 3000, progressive: 400, // Threshold of if use single hover layer to optimize. // It is recommended that `hoverLayerThreshold` is equivalent to or less than // `progressiveThreshold`, otherwise hover will cause restart of progressive, // which is unexpected. // see example . hoverLayerThreshold: 3000, // See: module:echarts/scale/Time useUTC: false }); // CONCATENATED MODULE: ./node_modules/echarts/lib/util/types.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 types_VISUAL_DIMENSIONS = Object(core_util["createHashMap"])(['tooltip', 'label', 'itemName', 'itemId', 'itemGroupId', 'itemChildGroupId', 'seriesName']); 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_TYPED_ARRAY = 'typedArray'; var SOURCE_FORMAT_UNKNOWN = 'unknown'; var SERIES_LAYOUT_BY_COLUMN = 'column'; var SERIES_LAYOUT_BY_ROW = 'row'; ; ; ; ; // CONCATENATED MODULE: ./node_modules/echarts/lib/data/helper/sourceHelper.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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, Might: 2, Not: 3 // Other cases }; var innerGlobalModel = makeInner(); /** * MUST be called before mergeOption of all series. */ function resetSourceDefaulter(ecModel) { // `datasetMap` is used to make default encode. innerGlobalModel(ecModel).datasetMap = Object(core_util["createHashMap"])(); } /** * [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 | * * @return encode Never be `null/undefined`. */ function makeSeriesEncodeForAxisCoordSys(coordDimensions, seriesModel, source) { var encode = {}; var datasetModel = querySeriesUpstreamDatasetModel(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 = innerGlobalModel(ecModel).datasetMap; var key = datasetModel.uid + '_' + source.seriesLayoutBy; var baseCategoryDimIndex; var categoryWayValueDimStart; coordDimensions = coordDimensions.slice(); Object(core_util["each"])(coordDimensions, function (coordDimInfoLoose, coordDimIdx) { var coordDimInfo = Object(core_util["isObject"])(coordDimInfoLoose) ? coordDimInfoLoose : coordDimensions[coordDimIdx] = { name: coordDimInfoLoose }; if (coordDimInfo.type === 'ordinal' && baseCategoryDimIndex == null) { baseCategoryDimIndex = coordDimIdx; categoryWayValueDimStart = getDataDimCountOnCoordDim(coordDimInfo); } encode[coordDimInfo.name] = []; }); var datasetRecord = datasetMap.get(key) || datasetMap.set(key, { categoryWayDim: categoryWayValueDimStart, valueWayDim: 0 }); // TODO // Auto detect first time axis and do arrangement. Object(core_util["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 multiple series share one dimension // category axis, series name should better use // the other dimension 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: ...}, ...]. * * @return encode Never be `null/undefined`. */ function makeSeriesEncodeForNameBased(seriesModel, source, dimCount) { var encode = {}; var datasetModel = querySeriesUpstreamDatasetModel(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) { Object(core_util["each"])(dimensionsDefine, function (dim, idx) { if ((Object(core_util["isObject"])(dim) ? dim.name : dim) === 'name') { potentialNameDimIndex = idx; } }); } 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 uses itemName in charts. // So we don't set encodeLabel here. encode.itemName = [nameDimIndex]; encode.seriesName = [nameDimIndex]; } return encode; } /** * @return If return null/undefined, indicate that should not use datasetModel. */ function querySeriesUpstreamDatasetModel(seriesModel) { // 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 = seriesModel.get('data', true); if (!thisData) { return queryReferringComponents(seriesModel.ecModel, 'dataset', { index: seriesModel.get('datasetIndex', true), id: seriesModel.get('datasetId', true) }, SINGLE_REFERRING).models[0]; } } /** * @return Always return an array event empty. */ function queryDatasetUpstreamDatasetModels(datasetModel) { // Only these attributes declared, we by default reference to `datasetIndex: 0`. // Otherwise, no reference. if (!datasetModel.get('transform', true) && !datasetModel.get('fromTransformResult', true)) { return []; } return queryReferringComponents(datasetModel.ecModel, 'dataset', { index: datasetModel.get('fromDatasetIndex', true), id: datasetModel.get('fromDatasetId', true) }, SINGLE_REFERRING).models; } /** * 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? */ 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 (Object(core_util["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 (Object(core_util["isObject"])(dimDefItem)) { dimName = dimDefItem.name; dimType = dimDefItem.type; } else if (Object(core_util["isString"])(dimDefItem)) { dimName = dimDefItem; } } if (dimType != null) { return dimType === 'ordinal' ? BE_ORDINAL.Must : BE_ORDINAL.Not; } if (sourceFormat === SOURCE_FORMAT_ARRAY_ROWS) { var dataArrayRows = data; if (seriesLayoutBy === SERIES_LAYOUT_BY_ROW) { var sample = dataArrayRows[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 < dataArrayRows.length && i < maxLoop; i++) { var row = dataArrayRows[startIndex + i]; if (row && (result = detectValue(row[dimIndex])) != null) { return result; } } } } else if (sourceFormat === SOURCE_FORMAT_OBJECT_ROWS) { var dataObjectRows = data; if (!dimName) { return BE_ORDINAL.Not; } for (var i = 0; i < dataObjectRows.length && i < maxLoop; i++) { var item = dataObjectRows[i]; if (item && (result = detectValue(item[dimName])) != null) { return result; } } } else if (sourceFormat === SOURCE_FORMAT_KEYED_COLUMNS) { var dataKeyedColumns = data; if (!dimName) { return BE_ORDINAL.Not; } var sample = dataKeyedColumns[dimName]; if (!sample || Object(core_util["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) { var dataOriginal = data; for (var i = 0; i < dataOriginal.length && i < maxLoop; i++) { var item = dataOriginal[i]; var val = getDataItemValue(item); if (!Object(core_util["isArray"])(val)) { return BE_ORDINAL.Not; } if ((result = detectValue(val[dimIndex])) != null) { return result; } } } function detectValue(val) { var beStr = Object(core_util["isString"])(val); // Consider usage convenience, '1', '2' will be treated as "number". // `Number('')` (or any whitespace) is `0`. if (val != null && Number.isFinite(Number(val)) && val !== '') { return beStr ? BE_ORDINAL.Might : BE_ORDINAL.Not; } else if (beStr && val !== '-') { return BE_ORDINAL.Must; } } return BE_ORDINAL.Not; } // CONCATENATED MODULE: ./node_modules/echarts/lib/model/internalComponentCreator.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 internalOptionCreatorMap = Object(core_util["createHashMap"])(); function registerInternalOptionCreator(mainType, creator) { Object(core_util["assert"])(internalOptionCreatorMap.get(mainType) == null && creator); internalOptionCreatorMap.set(mainType, creator); } function concatInternalOptions(ecModel, mainType, newCmptOptionList) { var internalOptionCreator = internalOptionCreatorMap.get(mainType); if (!internalOptionCreator) { return newCmptOptionList; } var internalOptions = internalOptionCreator(ecModel); if (!internalOptions) { return newCmptOptionList; } if (false) { for (var i = 0; i < internalOptions.length; i++) { assert(isComponentIdInternal(internalOptions[i])); } } return newCmptOptionList.concat(internalOptions); } // CONCATENATED MODULE: ./node_modules/echarts/lib/model/mixin/palette.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 innerColor = makeInner(); var innerDecal = makeInner(); var palette_PaletteMixin = /** @class */function () { function PaletteMixin() {} PaletteMixin.prototype.getColorFromPalette = function (name, scope, requestNum) { var defaultPalette = normalizeToArray(this.get('color', true)); var layeredPalette = this.get('colorLayer', true); return getFromPalette(this, innerColor, defaultPalette, layeredPalette, name, scope, requestNum); }; PaletteMixin.prototype.clearColorPalette = function () { clearPalette(this, innerColor); }; return PaletteMixin; }(); function getDecalFromPalette(ecModel, name, scope, requestNum) { var defaultDecals = normalizeToArray(ecModel.get(['aria', 'decal', 'decals'])); return getFromPalette(ecModel, innerDecal, defaultDecals, null, name, scope, requestNum); } function getNearestPalette(palettes, requestColorNum) { var paletteNum = palettes.length; // TODO palettes must be in order for (var i = 0; i < paletteNum; i++) { if (palettes[i].length > requestColorNum) { return palettes[i]; } } return palettes[paletteNum - 1]; } /** * @param name MUST NOT be null/undefined. Otherwise call this function * twise with the same parameters will get different result. * @param scope default this. * @return Can be null/undefined */ function getFromPalette(that, inner, defaultPalette, layeredPalette, name, scope, requestNum) { scope = scope || that; var scopeFields = inner(scope); var paletteIdx = scopeFields.paletteIdx || 0; var paletteNameMap = scopeFields.paletteNameMap = scopeFields.paletteNameMap || {}; // Use `hasOwnProperty` to avoid conflict with Object.prototype. if (paletteNameMap.hasOwnProperty(name)) { return paletteNameMap[name]; } var palette = requestNum == null || !layeredPalette ? defaultPalette : getNearestPalette(layeredPalette, requestNum); // In case can't find in layered color palette. palette = palette || defaultPalette; if (!palette || !palette.length) { return; } var pickedPaletteItem = palette[paletteIdx]; if (name) { paletteNameMap[name] = pickedPaletteItem; } scopeFields.paletteIdx = (paletteIdx + 1) % palette.length; return pickedPaletteItem; } function clearPalette(that, inner) { inner(that).paletteIdx = 0; inner(that).paletteNameMap = {}; } // CONCATENATED MODULE: ./node_modules/echarts/lib/model/Global.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ /** * Caution: If the mechanism should be changed some day, these cases * should be considered: * * (1) In `merge option` mode, if using the same option to call `setOption` * many times, the result should be the same (try our best to ensure that). * (2) In `merge option` mode, if a component has no id/name specified, it * will be merged by index, and the result sequence of the components is * consistent to the original sequence. * (3) In `replaceMerge` mode, keep the result sequence of the components is * consistent to the original sequence, even though there might result in "hole". * (4) `reset` feature (in toolbox). Find detailed info in comments about * `mergeOption` in module:echarts/model/OptionManager. */ // ----------------------- // Internal method names: // ----------------------- var reCreateSeriesIndices; var assertSeriesInitialized; var initBase; var OPTION_INNER_KEY = '\0_ec_inner'; var OPTION_INNER_VALUE = 1; var BUITIN_COMPONENTS_MAP = { grid: 'GridComponent', polar: 'PolarComponent', geo: 'GeoComponent', singleAxis: 'SingleAxisComponent', parallel: 'ParallelComponent', calendar: 'CalendarComponent', graphic: 'GraphicComponent', toolbox: 'ToolboxComponent', tooltip: 'TooltipComponent', axisPointer: 'AxisPointerComponent', brush: 'BrushComponent', title: 'TitleComponent', timeline: 'TimelineComponent', markPoint: 'MarkPointComponent', markLine: 'MarkLineComponent', markArea: 'MarkAreaComponent', legend: 'LegendComponent', dataZoom: 'DataZoomComponent', visualMap: 'VisualMapComponent', // aria: 'AriaComponent', // dataset: 'DatasetComponent', // Dependencies xAxis: 'GridComponent', yAxis: 'GridComponent', angleAxis: 'PolarComponent', radiusAxis: 'PolarComponent' }; var BUILTIN_CHARTS_MAP = { line: 'LineChart', bar: 'BarChart', pie: 'PieChart', scatter: 'ScatterChart', radar: 'RadarChart', map: 'MapChart', tree: 'TreeChart', treemap: 'TreemapChart', graph: 'GraphChart', gauge: 'GaugeChart', funnel: 'FunnelChart', parallel: 'ParallelChart', sankey: 'SankeyChart', boxplot: 'BoxplotChart', candlestick: 'CandlestickChart', effectScatter: 'EffectScatterChart', lines: 'LinesChart', heatmap: 'HeatmapChart', pictorialBar: 'PictorialBarChart', themeRiver: 'ThemeRiverChart', sunburst: 'SunburstChart', custom: 'CustomChart' }; var componetsMissingLogPrinted = {}; function checkMissingComponents(option) { Object(core_util["each"])(option, function (componentOption, mainType) { if (!Component.hasClass(mainType)) { var componentImportName = BUITIN_COMPONENTS_MAP[mainType]; if (componentImportName && !componetsMissingLogPrinted[componentImportName]) { log_error("Component " + mainType + " is used but not imported.\nimport { " + componentImportName + " } from 'echarts/components';\necharts.use([" + componentImportName + "]);"); componetsMissingLogPrinted[componentImportName] = true; } } }); } var Global_GlobalModel = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(GlobalModel, _super); function GlobalModel() { return _super !== null && _super.apply(this, arguments) || this; } GlobalModel.prototype.init = function (option, parentModel, ecModel, theme, locale, optionManager) { theme = theme || {}; this.option = null; // Mark as not initialized. this._theme = new model_Model(theme); this._locale = new model_Model(locale); this._optionManager = optionManager; }; GlobalModel.prototype.setOption = function (option, opts, optionPreprocessorFuncs) { if (false) { assert(option != null, 'option is null/undefined'); assert(option[OPTION_INNER_KEY] !== OPTION_INNER_VALUE, 'please use chart.getOption()'); } var innerOpt = normalizeSetOptionInput(opts); this._optionManager.setOption(option, optionPreprocessorFuncs, innerOpt); this._resetOption(null, innerOpt); }; /** * @param type null/undefined: reset all. * 'recreate': force recreate all. * 'timeline': only reset timeline option * 'media': only reset media query option * @return Whether option changed. */ GlobalModel.prototype.resetOption = function (type, opt) { return this._resetOption(type, normalizeSetOptionInput(opt)); }; GlobalModel.prototype._resetOption = function (type, opt) { var optionChanged = false; var optionManager = this._optionManager; if (!type || type === 'recreate') { var baseOption = optionManager.mountOption(type === 'recreate'); if (false) { checkMissingComponents(baseOption); } if (!this.option || type === 'recreate') { initBase(this, baseOption); } else { this.restoreData(); this._mergeOption(baseOption, opt); } optionChanged = true; } if (type === 'timeline' || type === 'media') { this.restoreData(); } // By design, if `setOption(option2)` at the second time, and `option2` is a `ECUnitOption`, // it should better not have the same props with `MediaUnit['option']`. // Because either `option2` or `MediaUnit['option']` will be always merged to "current option" // rather than original "baseOption". If they both override a prop, the result might be // unexpected when media state changed after `setOption` called. // If we really need to modify a props in each `MediaUnit['option']`, use the full version // (`{baseOption, media}`) in `setOption`. // For `timeline`, the case is the same. if (!type || type === 'recreate' || type === 'timeline') { var timelineOption = optionManager.getTimelineOption(this); if (timelineOption) { optionChanged = true; this._mergeOption(timelineOption, opt); } } if (!type || type === 'recreate' || type === 'media') { var mediaOptions = optionManager.getMediaOption(this); if (mediaOptions.length) { Object(core_util["each"])(mediaOptions, function (mediaOption) { optionChanged = true; this._mergeOption(mediaOption, opt); }, this); } } return optionChanged; }; GlobalModel.prototype.mergeOption = function (option) { this._mergeOption(option, null); }; GlobalModel.prototype._mergeOption = function (newOption, opt) { var option = this.option; var componentsMap = this._componentsMap; var componentsCount = this._componentsCount; var newCmptTypes = []; var newCmptTypeMap = Object(core_util["createHashMap"])(); var replaceMergeMainTypeMap = opt && opt.replaceMergeMainTypeMap; resetSourceDefaulter(this); // If no component class, merge directly. // For example: color, animaiton options, etc. Object(core_util["each"])(newOption, function (componentOption, mainType) { if (componentOption == null) { return; } if (!Component.hasClass(mainType)) { // globalSettingTask.dirty(); option[mainType] = option[mainType] == null ? Object(core_util["clone"])(componentOption) : Object(core_util["merge"])(option[mainType], componentOption, true); } else if (mainType) { newCmptTypes.push(mainType); newCmptTypeMap.set(mainType, true); } }); if (replaceMergeMainTypeMap) { // If there is a mainType `xxx` in `replaceMerge` but not declared in option, // we trade it as it is declared in option as `{xxx: []}`. Because: // (1) for normal merge, `{xxx: null/undefined}` are the same meaning as `{xxx: []}`. // (2) some preprocessor may convert some of `{xxx: null/undefined}` to `{xxx: []}`. replaceMergeMainTypeMap.each(function (val, mainTypeInReplaceMerge) { if (Component.hasClass(mainTypeInReplaceMerge) && !newCmptTypeMap.get(mainTypeInReplaceMerge)) { newCmptTypes.push(mainTypeInReplaceMerge); newCmptTypeMap.set(mainTypeInReplaceMerge, true); } }); } Component.topologicalTravel(newCmptTypes, Component.getAllClassMainTypes(), visitComponent, this); function visitComponent(mainType) { var newCmptOptionList = concatInternalOptions(this, mainType, normalizeToArray(newOption[mainType])); var oldCmptList = componentsMap.get(mainType); var mergeMode = // `!oldCmptList` means init. See the comment in `mappingToExists` !oldCmptList ? 'replaceAll' : replaceMergeMainTypeMap && replaceMergeMainTypeMap.get(mainType) ? 'replaceMerge' : 'normalMerge'; var mappingResult = mappingToExists(oldCmptList, newCmptOptionList, mergeMode); // Set mainType and complete subType. setComponentTypeToKeyInfo(mappingResult, mainType, Component); // Empty it before the travel, in order to prevent `this._componentsMap` // from being used in the `init`/`mergeOption`/`optionUpdated` of some // components, which is probably incorrect logic. option[mainType] = null; componentsMap.set(mainType, null); componentsCount.set(mainType, 0); var optionsByMainType = []; var cmptsByMainType = []; var cmptsCountByMainType = 0; var tooltipExists; var tooltipWarningLogged; Object(core_util["each"])(mappingResult, function (resultItem, index) { var componentModel = resultItem.existing; var newCmptOption = resultItem.newOption; if (!newCmptOption) { if (componentModel) { // Consider where is no new option and should be merged using {}, // see removeEdgeAndAdd in topologicalTravel and // ComponentModel.getAllClassMainTypes. componentModel.mergeOption({}, this); componentModel.optionUpdated({}, false); } // If no both `resultItem.exist` and `resultItem.option`, // either it is in `replaceMerge` and not matched by any id, // or it has been removed in previous `replaceMerge` and left a "hole" in this component index. } else { var isSeriesType = mainType === 'series'; var ComponentModelClass = Component.getClass(mainType, resultItem.keyInfo.subType, !isSeriesType // Give a more detailed warn later if series don't exists ); if (!ComponentModelClass) { if (false) { var subType = resultItem.keyInfo.subType; var seriesImportName = BUILTIN_CHARTS_MAP[subType]; if (!componetsMissingLogPrinted[subType]) { componetsMissingLogPrinted[subType] = true; if (seriesImportName) { error("Series " + subType + " is used but not imported.\nimport { " + seriesImportName + " } from 'echarts/charts';\necharts.use([" + seriesImportName + "]);"); } else { error("Unknown series " + subType); } } } return; } // TODO Before multiple tooltips get supported, we do this check to avoid unexpected exception. if (mainType === 'tooltip') { if (tooltipExists) { if (false) { if (!tooltipWarningLogged) { warn('Currently only one tooltip component is allowed.'); tooltipWarningLogged = true; } } return; } tooltipExists = true; } if (componentModel && componentModel.constructor === ComponentModelClass) { componentModel.name = resultItem.keyInfo.name; // componentModel.settingTask && componentModel.settingTask.dirty(); componentModel.mergeOption(newCmptOption, this); componentModel.optionUpdated(newCmptOption, false); } else { // PENDING Global as parent ? var extraOpt = Object(core_util["extend"])({ componentIndex: index }, resultItem.keyInfo); componentModel = new ComponentModelClass(newCmptOption, this, this, extraOpt); // Assign `keyInfo` Object(core_util["extend"])(componentModel, extraOpt); if (resultItem.brandNew) { componentModel.__requireNewView = true; } componentModel.init(newCmptOption, this, this); // Call optionUpdated after init. // newCmptOption has been used as componentModel.option // and may be merged with theme and default, so pass null // to avoid confusion. componentModel.optionUpdated(null, true); } } if (componentModel) { optionsByMainType.push(componentModel.option); cmptsByMainType.push(componentModel); cmptsCountByMainType++; } else { // Always do assign to avoid elided item in array. optionsByMainType.push(void 0); cmptsByMainType.push(void 0); } }, this); option[mainType] = optionsByMainType; componentsMap.set(mainType, cmptsByMainType); componentsCount.set(mainType, cmptsCountByMainType); // Backup series for filtering. if (mainType === 'series') { reCreateSeriesIndices(this); } } // If no series declared, ensure `_seriesIndices` initialized. if (!this._seriesIndices) { reCreateSeriesIndices(this); } }; /** * Get option for output (cloned option and inner info removed) */ GlobalModel.prototype.getOption = function () { var option = Object(core_util["clone"])(this.option); Object(core_util["each"])(option, function (optInMainType, mainType) { if (Component.hasClass(mainType)) { var opts = normalizeToArray(optInMainType); // Inner cmpts need to be removed. // Inner cmpts might not be at last since ec5.0, but still // compatible for users: if inner cmpt at last, splice the returned array. var realLen = opts.length; var metNonInner = false; for (var i = realLen - 1; i >= 0; i--) { // Remove options with inner id. if (opts[i] && !model_isComponentIdInternal(opts[i])) { metNonInner = true; } else { opts[i] = null; !metNonInner && realLen--; } } opts.length = realLen; option[mainType] = opts; } }); delete option[OPTION_INNER_KEY]; return option; }; GlobalModel.prototype.getTheme = function () { return this._theme; }; GlobalModel.prototype.getLocaleModel = function () { return this._locale; }; GlobalModel.prototype.setUpdatePayload = function (payload) { this._payload = payload; }; GlobalModel.prototype.getUpdatePayload = function () { return this._payload; }; /** * @param idx If not specified, return the first one. */ GlobalModel.prototype.getComponent = function (mainType, idx) { var list = this._componentsMap.get(mainType); if (list) { var cmpt = list[idx || 0]; if (cmpt) { return cmpt; } else if (idx == null) { for (var i = 0; i < list.length; i++) { if (list[i]) { return list[i]; } } } } }; /** * @return Never be null/undefined. */ GlobalModel.prototype.queryComponents = function (condition) { var mainType = condition.mainType; if (!mainType) { return []; } var index = condition.index; var id = condition.id; var name = condition.name; var cmpts = this._componentsMap.get(mainType); if (!cmpts || !cmpts.length) { return []; } var result; if (index != null) { result = []; Object(core_util["each"])(normalizeToArray(index), function (idx) { cmpts[idx] && result.push(cmpts[idx]); }); } else if (id != null) { result = queryByIdOrName('id', id, cmpts); } else if (name != null) { result = queryByIdOrName('name', name, cmpts); } else { // Return all non-empty components in that mainType result = Object(core_util["filter"])(cmpts, function (cmpt) { return !!cmpt; }); } return filterBySubType(result, condition); }; /** * The interface is different from queryComponents, * which is convenient for inner usage. * * @usage * let result = findComponents( * {mainType: 'dataZoom', query: {dataZoomId: 'abc'}} * ); * let result = findComponents( * {mainType: 'series', subType: 'pie', query: {seriesName: 'uio'}} * ); * let result = findComponents( * {mainType: 'series', * filter: function (model, index) {...}} * ); * // result like [component0, componnet1, ...] */ GlobalModel.prototype.findComponents = function (condition) { var query = condition.query; var mainType = condition.mainType; var queryCond = getQueryCond(query); var result = queryCond ? this.queryComponents(queryCond) // Retrieve all non-empty components. : Object(core_util["filter"])(this._componentsMap.get(mainType), function (cmpt) { return !!cmpt; }); return doFilter(filterBySubType(result, condition)); function getQueryCond(q) { var indexAttr = mainType + 'Index'; var idAttr = mainType + 'Id'; var nameAttr = mainType + 'Name'; return q && (q[indexAttr] != null || q[idAttr] != null || q[nameAttr] != null) ? { mainType: mainType, // subType will be filtered finally. index: q[indexAttr], id: q[idAttr], name: q[nameAttr] } : null; } function doFilter(res) { return condition.filter ? Object(core_util["filter"])(res, condition.filter) : res; } }; GlobalModel.prototype.eachComponent = function (mainType, cb, context) { var componentsMap = this._componentsMap; if (Object(core_util["isFunction"])(mainType)) { var ctxForAll_1 = cb; var cbForAll_1 = mainType; componentsMap.each(function (cmpts, componentType) { for (var i = 0; cmpts && i < cmpts.length; i++) { var cmpt = cmpts[i]; cmpt && cbForAll_1.call(ctxForAll_1, componentType, cmpt, cmpt.componentIndex); } }); } else { var cmpts = Object(core_util["isString"])(mainType) ? componentsMap.get(mainType) : Object(core_util["isObject"])(mainType) ? this.findComponents(mainType) : null; for (var i = 0; cmpts && i < cmpts.length; i++) { var cmpt = cmpts[i]; cmpt && cb.call(context, cmpt, cmpt.componentIndex); } } }; /** * Get series list before filtered by name. */ GlobalModel.prototype.getSeriesByName = function (name) { var nameStr = convertOptionIdName(name, null); return Object(core_util["filter"])(this._componentsMap.get('series'), function (oneSeries) { return !!oneSeries && nameStr != null && oneSeries.name === nameStr; }); }; /** * Get series list before filtered by index. */ GlobalModel.prototype.getSeriesByIndex = function (seriesIndex) { return this._componentsMap.get('series')[seriesIndex]; }; /** * Get series list before filtered by type. * FIXME: rename to getRawSeriesByType? */ GlobalModel.prototype.getSeriesByType = function (subType) { return Object(core_util["filter"])(this._componentsMap.get('series'), function (oneSeries) { return !!oneSeries && oneSeries.subType === subType; }); }; /** * Get all series before filtered. */ GlobalModel.prototype.getSeries = function () { return Object(core_util["filter"])(this._componentsMap.get('series'), function (oneSeries) { return !!oneSeries; }); }; /** * Count series before filtered. */ GlobalModel.prototype.getSeriesCount = function () { return this._componentsCount.get('series'); }; /** * After filtering, series may be different * from raw series. */ GlobalModel.prototype.eachSeries = function (cb, context) { assertSeriesInitialized(this); Object(core_util["each"])(this._seriesIndices, function (rawSeriesIndex) { var series = this._componentsMap.get('series')[rawSeriesIndex]; cb.call(context, series, rawSeriesIndex); }, this); }; /** * Iterate raw series before filtered. * * @param {Function} cb * @param {*} context */ GlobalModel.prototype.eachRawSeries = function (cb, context) { Object(core_util["each"])(this._componentsMap.get('series'), function (series) { series && cb.call(context, series, series.componentIndex); }); }; /** * After filtering, series may be different. * from raw series. */ GlobalModel.prototype.eachSeriesByType = function (subType, cb, context) { assertSeriesInitialized(this); Object(core_util["each"])(this._seriesIndices, function (rawSeriesIndex) { var series = this._componentsMap.get('series')[rawSeriesIndex]; if (series.subType === subType) { cb.call(context, series, rawSeriesIndex); } }, this); }; /** * Iterate raw series before filtered of given type. */ GlobalModel.prototype.eachRawSeriesByType = function (subType, cb, context) { return Object(core_util["each"])(this.getSeriesByType(subType), cb, context); }; GlobalModel.prototype.isSeriesFiltered = function (seriesModel) { assertSeriesInitialized(this); return this._seriesIndicesMap.get(seriesModel.componentIndex) == null; }; GlobalModel.prototype.getCurrentSeriesIndices = function () { return (this._seriesIndices || []).slice(); }; GlobalModel.prototype.filterSeries = function (cb, context) { assertSeriesInitialized(this); var newSeriesIndices = []; Object(core_util["each"])(this._seriesIndices, function (seriesRawIdx) { var series = this._componentsMap.get('series')[seriesRawIdx]; cb.call(context, series, seriesRawIdx) && newSeriesIndices.push(seriesRawIdx); }, this); this._seriesIndices = newSeriesIndices; this._seriesIndicesMap = Object(core_util["createHashMap"])(newSeriesIndices); }; GlobalModel.prototype.restoreData = function (payload) { reCreateSeriesIndices(this); var componentsMap = this._componentsMap; var componentTypes = []; componentsMap.each(function (components, componentType) { if (Component.hasClass(componentType)) { componentTypes.push(componentType); } }); Component.topologicalTravel(componentTypes, Component.getAllClassMainTypes(), function (componentType) { Object(core_util["each"])(componentsMap.get(componentType), function (component) { if (component && (componentType !== 'series' || !isNotTargetSeries(component, payload))) { component.restoreData(); } }); }); }; GlobalModel.internalField = function () { reCreateSeriesIndices = function (ecModel) { var seriesIndices = ecModel._seriesIndices = []; Object(core_util["each"])(ecModel._componentsMap.get('series'), function (series) { // series may have been removed by `replaceMerge`. series && seriesIndices.push(series.componentIndex); }); ecModel._seriesIndicesMap = Object(core_util["createHashMap"])(seriesIndices); }; assertSeriesInitialized = function (ecModel) { // Components that use _seriesIndices should depends on series component, // which make sure that their initialization is after series. if (false) { if (!ecModel._seriesIndices) { throw new Error('Option should contains series.'); } } }; initBase = function (ecModel, baseOption) { // Using OPTION_INNER_KEY to mark that this option cannot be used outside, // i.e. `chart.setOption(chart.getModel().option);` is forbidden. ecModel.option = {}; ecModel.option[OPTION_INNER_KEY] = OPTION_INNER_VALUE; // Init with series: [], in case of calling findSeries method // before series initialized. ecModel._componentsMap = Object(core_util["createHashMap"])({ series: [] }); ecModel._componentsCount = Object(core_util["createHashMap"])(); // If user spefied `option.aria`, aria will be enable. This detection should be // performed before theme and globalDefault merge. var airaOption = baseOption.aria; if (Object(core_util["isObject"])(airaOption) && airaOption.enabled == null) { airaOption.enabled = true; } mergeTheme(baseOption, ecModel._theme.option); // TODO Needs clone when merging to the unexisted property Object(core_util["merge"])(baseOption, globalDefault, false); ecModel._mergeOption(baseOption, null); }; }(); return GlobalModel; }(model_Model); function isNotTargetSeries(seriesModel, payload) { if (payload) { var index = payload.seriesIndex; var id = payload.seriesId; var name_1 = payload.seriesName; return index != null && seriesModel.componentIndex !== index || id != null && seriesModel.id !== id || name_1 != null && seriesModel.name !== name_1; } } function mergeTheme(option, theme) { // PENDING // NOT use `colorLayer` in theme if option has `color` var notMergeColorLayer = option.color && !option.colorLayer; Object(core_util["each"])(theme, function (themeItem, name) { if (name === 'colorLayer' && notMergeColorLayer) { return; } // If it is component model mainType, the model handles that merge later. // otherwise, merge them here. if (!Component.hasClass(name)) { if (typeof themeItem === 'object') { option[name] = !option[name] ? Object(core_util["clone"])(themeItem) : Object(core_util["merge"])(option[name], themeItem, false); } else { if (option[name] == null) { option[name] = themeItem; } } } }); } function queryByIdOrName(attr, idOrName, cmpts) { // Here is a break from echarts4: string and number are // treated as equal. if (Object(core_util["isArray"])(idOrName)) { var keyMap_1 = Object(core_util["createHashMap"])(); Object(core_util["each"])(idOrName, function (idOrNameItem) { if (idOrNameItem != null) { var idName = convertOptionIdName(idOrNameItem, null); idName != null && keyMap_1.set(idOrNameItem, true); } }); return Object(core_util["filter"])(cmpts, function (cmpt) { return cmpt && keyMap_1.get(cmpt[attr]); }); } else { var idName_1 = convertOptionIdName(idOrName, null); return Object(core_util["filter"])(cmpts, function (cmpt) { return cmpt && idName_1 != null && cmpt[attr] === idName_1; }); } } function filterBySubType(components, condition) { // Using hasOwnProperty for restrict. Consider // subType is undefined in user payload. return condition.hasOwnProperty('subType') ? Object(core_util["filter"])(components, function (cmpt) { return cmpt && cmpt.subType === condition.subType; }) : components; } function normalizeSetOptionInput(opts) { var replaceMergeMainTypeMap = Object(core_util["createHashMap"])(); opts && Object(core_util["each"])(normalizeToArray(opts.replaceMerge), function (mainType) { if (false) { assert(ComponentModel.hasClass(mainType), '"' + mainType + '" is not valid component main type in "replaceMerge"'); } replaceMergeMainTypeMap.set(mainType, true); }); return { replaceMergeMainTypeMap: replaceMergeMainTypeMap }; } Object(core_util["mixin"])(Global_GlobalModel, palette_PaletteMixin); /* harmony default export */ var Global = (Global_GlobalModel); // CONCATENATED MODULE: ./node_modules/echarts/lib/core/ExtensionAPI.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 availableMethods = ['getDom', 'getZr', 'getWidth', 'getHeight', 'getDevicePixelRatio', 'dispatchAction', 'isSSR', 'isDisposed', 'on', 'off', 'getDataURL', 'getConnectedDataURL', // 'getModel', 'getOption', // 'getViewOfComponentModel', // 'getViewOfSeriesModel', 'getId', 'updateLabelLayout']; var ExtensionAPI_ExtensionAPI = /** @class */function () { function ExtensionAPI(ecInstance) { core_util["each"](availableMethods, function (methodName) { this[methodName] = core_util["bind"](ecInstance[methodName], ecInstance); }, this); } return ExtensionAPI; }(); /* harmony default export */ var core_ExtensionAPI = (ExtensionAPI_ExtensionAPI); // CONCATENATED MODULE: ./node_modules/echarts/lib/core/CoordinateSystem.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 coordinateSystemCreators = {}; var CoordinateSystem_CoordinateSystemManager = /** @class */function () { function CoordinateSystemManager() { this._coordinateSystems = []; } CoordinateSystemManager.prototype.create = function (ecModel, api) { var coordinateSystems = []; core_util["each"](coordinateSystemCreators, function (creator, type) { var list = creator.create(ecModel, api); coordinateSystems = coordinateSystems.concat(list || []); }); this._coordinateSystems = coordinateSystems; }; CoordinateSystemManager.prototype.update = function (ecModel, api) { core_util["each"](this._coordinateSystems, function (coordSys) { coordSys.update && coordSys.update(ecModel, api); }); }; CoordinateSystemManager.prototype.getCoordinateSystems = function () { return this._coordinateSystems.slice(); }; CoordinateSystemManager.register = function (type, creator) { coordinateSystemCreators[type] = creator; }; CoordinateSystemManager.get = function (type) { return coordinateSystemCreators[type]; }; return CoordinateSystemManager; }(); /* harmony default export */ var core_CoordinateSystem = (CoordinateSystem_CoordinateSystemManager); // CONCATENATED MODULE: ./node_modules/echarts/lib/model/OptionManager.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 QUERY_REG = /^(min|max)?(.+)$/; // Key: mainType // type FakeComponentsMap = HashMap<(MappingExistingItem & { subType: string })[]>; /** * TERM EXPLANATIONS: * See `ECOption` and `ECUnitOption` in `src/util/types.ts`. */ var OptionManager_OptionManager = /** @class */function () { // timeline.notMerge is not supported in ec3. Firstly there is rearly // case that notMerge is needed. Secondly supporting 'notMerge' requires // rawOption cloned and backuped when timeline changed, which does no // good to performance. What's more, that both timeline and setOption // method supply 'notMerge' brings complex and some problems. // Consider this case: // (step1) chart.setOption({timeline: {notMerge: false}, ...}, false); // (step2) chart.setOption({timeline: {notMerge: true}, ...}, false); function OptionManager(api) { this._timelineOptions = []; this._mediaList = []; /** * -1, means default. * empty means no media. */ this._currentMediaIndices = []; this._api = api; } OptionManager.prototype.setOption = function (rawOption, optionPreprocessorFuncs, opt) { if (rawOption) { // That set dat primitive is dangerous if user reuse the data when setOption again. Object(core_util["each"])(normalizeToArray(rawOption.series), function (series) { series && series.data && Object(core_util["isTypedArray"])(series.data) && Object(core_util["setAsPrimitive"])(series.data); }); Object(core_util["each"])(normalizeToArray(rawOption.dataset), function (dataset) { dataset && dataset.source && Object(core_util["isTypedArray"])(dataset.source) && Object(core_util["setAsPrimitive"])(dataset.source); }); } // Caution: some series modify option data, if do not clone, // it should ensure that the repeat modify correctly // (create a new object when modify itself). rawOption = Object(core_util["clone"])(rawOption); // FIXME // If some property is set in timeline options or media option but // not set in baseOption, a warning should be given. var optionBackup = this._optionBackup; var newParsedOption = parseRawOption(rawOption, optionPreprocessorFuncs, !optionBackup); this._newBaseOption = newParsedOption.baseOption; // For setOption at second time (using merge mode); if (optionBackup) { // FIXME // the restore merge solution is essentially incorrect. // the mapping can not be 100% consistent with ecModel, which probably brings // potential bug! // The first merge is delayed, because in most cases, users do not call `setOption` twice. // let fakeCmptsMap = this._fakeCmptsMap; // if (!fakeCmptsMap) { // fakeCmptsMap = this._fakeCmptsMap = createHashMap(); // mergeToBackupOption(fakeCmptsMap, null, optionBackup.baseOption, null); // } // mergeToBackupOption( // fakeCmptsMap, optionBackup.baseOption, newParsedOption.baseOption, opt // ); // For simplicity, timeline options and media options do not support merge, // that is, if you `setOption` twice and both has timeline options, the latter // timeline options will not be merged to the former, but just substitute them. if (newParsedOption.timelineOptions.length) { optionBackup.timelineOptions = newParsedOption.timelineOptions; } if (newParsedOption.mediaList.length) { optionBackup.mediaList = newParsedOption.mediaList; } if (newParsedOption.mediaDefault) { optionBackup.mediaDefault = newParsedOption.mediaDefault; } } else { this._optionBackup = newParsedOption; } }; OptionManager.prototype.mountOption = function (isRecreate) { var optionBackup = this._optionBackup; this._timelineOptions = optionBackup.timelineOptions; this._mediaList = optionBackup.mediaList; this._mediaDefault = optionBackup.mediaDefault; this._currentMediaIndices = []; return Object(core_util["clone"])(isRecreate // this._optionBackup.baseOption, which is created at the first `setOption` // called, and is merged into every new option by inner method `mergeToBackupOption` // each time `setOption` called, can be only used in `isRecreate`, because // its reliability is under suspicion. In other cases option merge is // performed by `model.mergeOption`. ? optionBackup.baseOption : this._newBaseOption); }; OptionManager.prototype.getTimelineOption = function (ecModel) { var option; var timelineOptions = this._timelineOptions; if (timelineOptions.length) { // getTimelineOption can only be called after ecModel inited, // so we can get currentIndex from timelineModel. var timelineModel = ecModel.getComponent('timeline'); if (timelineModel) { option = Object(core_util["clone"])( // FIXME:TS as TimelineModel or quivlant interface timelineOptions[timelineModel.getCurrentIndex()]); } } return option; }; OptionManager.prototype.getMediaOption = function (ecModel) { var ecWidth = this._api.getWidth(); var ecHeight = this._api.getHeight(); var mediaList = this._mediaList; var mediaDefault = this._mediaDefault; var indices = []; var result = []; // No media defined. if (!mediaList.length && !mediaDefault) { return result; } // Multi media may be applied, the latter defined media has higher priority. for (var i = 0, len = mediaList.length; i < len; i++) { if (applyMediaQuery(mediaList[i].query, ecWidth, ecHeight)) { indices.push(i); } } // FIXME // Whether mediaDefault should force users to provide? Otherwise // the change by media query can not be recorvered. if (!indices.length && mediaDefault) { indices = [-1]; } if (indices.length && !indicesEquals(indices, this._currentMediaIndices)) { result = Object(core_util["map"])(indices, function (index) { return Object(core_util["clone"])(index === -1 ? mediaDefault.option : mediaList[index].option); }); } // Otherwise return nothing. this._currentMediaIndices = indices; return result; }; return OptionManager; }(); /** * [RAW_OPTION_PATTERNS] * (Note: "series: []" represents all other props in `ECUnitOption`) * * (1) No prop "baseOption" declared: * Root option is used as "baseOption" (except prop "options" and "media"). * ```js * option = { * series: [], * timeline: {}, * options: [], * }; * option = { * series: [], * media: {}, * }; * option = { * series: [], * timeline: {}, * options: [], * media: {}, * } * ``` * * (2) Prop "baseOption" declared: * If "baseOption" declared, `ECUnitOption` props can only be declared * inside "baseOption" except prop "timeline" (compat ec2). * ```js * option = { * baseOption: { * timeline: {}, * series: [], * }, * options: [] * }; * option = { * baseOption: { * series: [], * }, * media: [] * }; * option = { * baseOption: { * timeline: {}, * series: [], * }, * options: [] * media: [] * }; * option = { * // ec3 compat ec2: allow (only) `timeline` declared * // outside baseOption. Keep this setting for compat. * timeline: {}, * baseOption: { * series: [], * }, * options: [], * media: [] * }; * ``` */ function parseRawOption( // `rawOption` May be modified rawOption, optionPreprocessorFuncs, isNew) { var mediaList = []; var mediaDefault; var baseOption; var declaredBaseOption = rawOption.baseOption; // Compatible with ec2, [RAW_OPTION_PATTERNS] above. var timelineOnRoot = rawOption.timeline; var timelineOptionsOnRoot = rawOption.options; var mediaOnRoot = rawOption.media; var hasMedia = !!rawOption.media; var hasTimeline = !!(timelineOptionsOnRoot || timelineOnRoot || declaredBaseOption && declaredBaseOption.timeline); if (declaredBaseOption) { baseOption = declaredBaseOption; // For merge option. if (!baseOption.timeline) { baseOption.timeline = timelineOnRoot; } } // For convenience, enable to use the root option as the `baseOption`: // `{ ...normalOptionProps, media: [{ ... }, { ... }] }` else { if (hasTimeline || hasMedia) { rawOption.options = rawOption.media = null; } baseOption = rawOption; } if (hasMedia) { if (Object(core_util["isArray"])(mediaOnRoot)) { Object(core_util["each"])(mediaOnRoot, function (singleMedia) { if (false) { // Real case of wrong config. if (singleMedia && !singleMedia.option && isObject(singleMedia.query) && isObject(singleMedia.query.option)) { error('Illegal media option. Must be like { media: [ { query: {}, option: {} } ] }'); } } if (singleMedia && singleMedia.option) { if (singleMedia.query) { mediaList.push(singleMedia); } else if (!mediaDefault) { // Use the first media default. mediaDefault = singleMedia; } } }); } else { if (false) { // Real case of wrong config. error('Illegal media option. Must be an array. Like { media: [ {...}, {...} ] }'); } } } doPreprocess(baseOption); Object(core_util["each"])(timelineOptionsOnRoot, function (option) { return doPreprocess(option); }); Object(core_util["each"])(mediaList, function (media) { return doPreprocess(media.option); }); function doPreprocess(option) { Object(core_util["each"])(optionPreprocessorFuncs, function (preProcess) { preProcess(option, isNew); }); } return { baseOption: baseOption, timelineOptions: timelineOptionsOnRoot || [], mediaDefault: mediaDefault, mediaList: mediaList }; } /** * @see * Support: width, height, aspectRatio * Can use max or min as prefix. */ function applyMediaQuery(query, ecWidth, ecHeight) { var realMap = { width: ecWidth, height: ecHeight, aspectratio: ecWidth / ecHeight // lower case for convenience. }; var applicable = true; Object(core_util["each"])(query, function (value, attr) { var matched = attr.match(QUERY_REG); if (!matched || !matched[1] || !matched[2]) { return; } var operator = matched[1]; var realAttr = matched[2].toLowerCase(); if (!compare(realMap[realAttr], value, operator)) { applicable = false; } }); return applicable; } function compare(real, expect, operator) { if (operator === 'min') { return real >= expect; } else if (operator === 'max') { return real <= expect; } else { // Equals return real === expect; } } function indicesEquals(indices1, indices2) { // indices is always order by asc and has only finite number. return indices1.join(',') === indices2.join(','); } /** * Consider case: * `chart.setOption(opt1);` * Then user do some interaction like dataZoom, dataView changing. * `chart.setOption(opt2);` * Then user press 'reset button' in toolbox. * * After doing that all of the interaction effects should be reset, the * chart should be the same as the result of invoke * `chart.setOption(opt1); chart.setOption(opt2);`. * * Although it is not able ensure that * `chart.setOption(opt1); chart.setOption(opt2);` is equivalents to * `chart.setOption(merge(opt1, opt2));` exactly, * this might be the only simple way to implement that feature. * * MEMO: We've considered some other approaches: * 1. Each model handles its self restoration but not uniform treatment. * (Too complex in logic and error-prone) * 2. Use a shadow ecModel. (Performance expensive) * * FIXME: A possible solution: * Add a extra level of model for each component model. The inheritance chain would be: * ecModel <- componentModel <- componentActionModel <- dataItemModel * And all of the actions can only modify the `componentActionModel` rather than * `componentModel`. `setOption` will only modify the `ecModel` and `componentModel`. * When "resotre" action triggered, model from `componentActionModel` will be discarded * instead of recreating the "ecModel" from the "_optionBackup". */ // function mergeToBackupOption( // fakeCmptsMap: FakeComponentsMap, // // `tarOption` Can be null/undefined, means init // tarOption: ECUnitOption, // newOption: ECUnitOption, // // Can be null/undefined // opt: InnerSetOptionOpts // ): void { // newOption = newOption || {} as ECUnitOption; // const notInit = !!tarOption; // each(newOption, function (newOptsInMainType, mainType) { // if (newOptsInMainType == null) { // return; // } // if (!ComponentModel.hasClass(mainType)) { // if (tarOption) { // tarOption[mainType] = merge(tarOption[mainType], newOptsInMainType, true); // } // } // else { // const oldTarOptsInMainType = notInit ? normalizeToArray(tarOption[mainType]) : null; // const oldFakeCmptsInMainType = fakeCmptsMap.get(mainType) || []; // const resultTarOptsInMainType = notInit ? (tarOption[mainType] = [] as ComponentOption[]) : null; // const resultFakeCmptsInMainType = fakeCmptsMap.set(mainType, []); // const mappingResult = mappingToExists( // oldFakeCmptsInMainType, // normalizeToArray(newOptsInMainType), // (opt && opt.replaceMergeMainTypeMap.get(mainType)) ? 'replaceMerge' : 'normalMerge' // ); // setComponentTypeToKeyInfo(mappingResult, mainType, ComponentModel as ComponentModelConstructor); // each(mappingResult, function (resultItem, index) { // // The same logic as `Global.ts#_mergeOption`. // let fakeCmpt = resultItem.existing; // const newOption = resultItem.newOption; // const keyInfo = resultItem.keyInfo; // let fakeCmptOpt; // if (!newOption) { // fakeCmptOpt = oldTarOptsInMainType[index]; // } // else { // if (fakeCmpt && fakeCmpt.subType === keyInfo.subType) { // fakeCmpt.name = keyInfo.name; // if (notInit) { // fakeCmptOpt = merge(oldTarOptsInMainType[index], newOption, true); // } // } // else { // fakeCmpt = extend({}, keyInfo); // if (notInit) { // fakeCmptOpt = clone(newOption); // } // } // } // if (fakeCmpt) { // notInit && resultTarOptsInMainType.push(fakeCmptOpt); // resultFakeCmptsInMainType.push(fakeCmpt); // } // else { // notInit && resultTarOptsInMainType.push(void 0); // resultFakeCmptsInMainType.push(void 0); // } // }); // } // }); // } /* harmony default export */ var model_OptionManager = (OptionManager_OptionManager); // CONCATENATED MODULE: ./node_modules/echarts/lib/preprocessor/helper/compatStyle.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 compatStyle_each = core_util["each"]; var compatStyle_isObject = core_util["isObject"]; var POSSIBLE_STYLES = ['areaStyle', 'lineStyle', 'nodeStyle', 'linkStyle', 'chordStyle', 'label', 'labelLine']; function compatEC2ItemStyle(opt) { var itemStyleOpt = opt && opt.itemStyle; if (!itemStyleOpt) { return; } for (var i = 0, len = POSSIBLE_STYLES.length; i < len; i++) { var styleName = POSSIBLE_STYLES[i]; var normalItemStyleOpt = itemStyleOpt.normal; var emphasisItemStyleOpt = itemStyleOpt.emphasis; if (normalItemStyleOpt && normalItemStyleOpt[styleName]) { if (false) { deprecateReplaceLog("itemStyle.normal." + styleName, styleName); } opt[styleName] = opt[styleName] || {}; if (!opt[styleName].normal) { opt[styleName].normal = normalItemStyleOpt[styleName]; } else { core_util["merge"](opt[styleName].normal, normalItemStyleOpt[styleName]); } normalItemStyleOpt[styleName] = null; } if (emphasisItemStyleOpt && emphasisItemStyleOpt[styleName]) { if (false) { deprecateReplaceLog("itemStyle.emphasis." + styleName, "emphasis." + styleName); } opt[styleName] = opt[styleName] || {}; if (!opt[styleName].emphasis) { opt[styleName].emphasis = emphasisItemStyleOpt[styleName]; } else { core_util["merge"](opt[styleName].emphasis, emphasisItemStyleOpt[styleName]); } emphasisItemStyleOpt[styleName] = null; } } } function convertNormalEmphasis(opt, optType, useExtend) { if (opt && opt[optType] && (opt[optType].normal || opt[optType].emphasis)) { var normalOpt = opt[optType].normal; var emphasisOpt = opt[optType].emphasis; if (normalOpt) { if (false) { // eslint-disable-next-line max-len deprecateLog("'normal' hierarchy in " + optType + " has been removed since 4.0. All style properties are configured in " + optType + " directly now."); } // Timeline controlStyle has other properties besides normal and emphasis if (useExtend) { opt[optType].normal = opt[optType].emphasis = null; core_util["defaults"](opt[optType], normalOpt); } else { opt[optType] = normalOpt; } } if (emphasisOpt) { if (false) { deprecateLog(optType + ".emphasis has been changed to emphasis." + optType + " since 4.0"); } opt.emphasis = opt.emphasis || {}; opt.emphasis[optType] = emphasisOpt; // Also compat the case user mix the style and focus together in ec3 style // for example: { itemStyle: { normal: {}, emphasis: {focus, shadowBlur} } } if (emphasisOpt.focus) { opt.emphasis.focus = emphasisOpt.focus; } if (emphasisOpt.blurScope) { opt.emphasis.blurScope = emphasisOpt.blurScope; } } } } function removeEC3NormalStatus(opt) { convertNormalEmphasis(opt, 'itemStyle'); convertNormalEmphasis(opt, 'lineStyle'); convertNormalEmphasis(opt, 'areaStyle'); convertNormalEmphasis(opt, 'label'); convertNormalEmphasis(opt, 'labelLine'); // treemap convertNormalEmphasis(opt, 'upperLabel'); // graph convertNormalEmphasis(opt, 'edgeLabel'); } function compatTextStyle(opt, propName) { // Check whether is not object (string\null\undefined ...) var labelOptSingle = compatStyle_isObject(opt) && opt[propName]; var textStyle = compatStyle_isObject(labelOptSingle) && labelOptSingle.textStyle; if (textStyle) { if (false) { // eslint-disable-next-line max-len deprecateLog("textStyle hierarchy in " + propName + " has been removed since 4.0. All textStyle properties are configured in " + propName + " directly now."); } for (var i = 0, len = TEXT_STYLE_OPTIONS.length; i < len; i++) { var textPropName = TEXT_STYLE_OPTIONS[i]; if (textStyle.hasOwnProperty(textPropName)) { labelOptSingle[textPropName] = textStyle[textPropName]; } } } } function compatEC3CommonStyles(opt) { if (opt) { removeEC3NormalStatus(opt); compatTextStyle(opt, 'label'); opt.emphasis && compatTextStyle(opt.emphasis, 'label'); } } function processSeries(seriesOpt) { if (!compatStyle_isObject(seriesOpt)) { return; } compatEC2ItemStyle(seriesOpt); removeEC3NormalStatus(seriesOpt); compatTextStyle(seriesOpt, 'label'); // treemap compatTextStyle(seriesOpt, 'upperLabel'); // graph compatTextStyle(seriesOpt, 'edgeLabel'); if (seriesOpt.emphasis) { compatTextStyle(seriesOpt.emphasis, 'label'); // treemap compatTextStyle(seriesOpt.emphasis, 'upperLabel'); // graph compatTextStyle(seriesOpt.emphasis, 'edgeLabel'); } var markPoint = seriesOpt.markPoint; if (markPoint) { compatEC2ItemStyle(markPoint); compatEC3CommonStyles(markPoint); } var markLine = seriesOpt.markLine; if (markLine) { compatEC2ItemStyle(markLine); compatEC3CommonStyles(markLine); } var markArea = seriesOpt.markArea; if (markArea) { compatEC3CommonStyles(markArea); } var data = seriesOpt.data; // Break with ec3: if `setOption` again, there may be no `type` in option, // then the backward compat based on option type will not be performed. if (seriesOpt.type === 'graph') { data = data || seriesOpt.nodes; var edgeData = seriesOpt.links || seriesOpt.edges; if (edgeData && !core_util["isTypedArray"](edgeData)) { for (var i = 0; i < edgeData.length; i++) { compatEC3CommonStyles(edgeData[i]); } } core_util["each"](seriesOpt.categories, function (opt) { removeEC3NormalStatus(opt); }); } if (data && !core_util["isTypedArray"](data)) { for (var i = 0; i < data.length; i++) { compatEC3CommonStyles(data[i]); } } // mark point data markPoint = seriesOpt.markPoint; if (markPoint && markPoint.data) { var mpData = markPoint.data; for (var i = 0; i < mpData.length; i++) { compatEC3CommonStyles(mpData[i]); } } // mark line data markLine = seriesOpt.markLine; if (markLine && markLine.data) { var mlData = markLine.data; for (var i = 0; i < mlData.length; i++) { if (core_util["isArray"](mlData[i])) { compatEC3CommonStyles(mlData[i][0]); compatEC3CommonStyles(mlData[i][1]); } else { compatEC3CommonStyles(mlData[i]); } } } // Series if (seriesOpt.type === 'gauge') { compatTextStyle(seriesOpt, 'axisLabel'); compatTextStyle(seriesOpt, 'title'); compatTextStyle(seriesOpt, 'detail'); } else if (seriesOpt.type === 'treemap') { convertNormalEmphasis(seriesOpt.breadcrumb, 'itemStyle'); core_util["each"](seriesOpt.levels, function (opt) { removeEC3NormalStatus(opt); }); } else if (seriesOpt.type === 'tree') { removeEC3NormalStatus(seriesOpt.leaves); } // sunburst starts from ec4, so it does not need to compat levels. } function toArr(o) { return core_util["isArray"](o) ? o : o ? [o] : []; } function toObj(o) { return (core_util["isArray"](o) ? o[0] : o) || {}; } function globalCompatStyle(option, isTheme) { compatStyle_each(toArr(option.series), function (seriesOpt) { compatStyle_isObject(seriesOpt) && processSeries(seriesOpt); }); var axes = ['xAxis', 'yAxis', 'radiusAxis', 'angleAxis', 'singleAxis', 'parallelAxis', 'radar']; isTheme && axes.push('valueAxis', 'categoryAxis', 'logAxis', 'timeAxis'); compatStyle_each(axes, function (axisName) { compatStyle_each(toArr(option[axisName]), function (axisOpt) { if (axisOpt) { compatTextStyle(axisOpt, 'axisLabel'); compatTextStyle(axisOpt.axisPointer, 'label'); } }); }); compatStyle_each(toArr(option.parallel), function (parallelOpt) { var parallelAxisDefault = parallelOpt && parallelOpt.parallelAxisDefault; compatTextStyle(parallelAxisDefault, 'axisLabel'); compatTextStyle(parallelAxisDefault && parallelAxisDefault.axisPointer, 'label'); }); compatStyle_each(toArr(option.calendar), function (calendarOpt) { convertNormalEmphasis(calendarOpt, 'itemStyle'); compatTextStyle(calendarOpt, 'dayLabel'); compatTextStyle(calendarOpt, 'monthLabel'); compatTextStyle(calendarOpt, 'yearLabel'); }); // radar.name.textStyle compatStyle_each(toArr(option.radar), function (radarOpt) { compatTextStyle(radarOpt, 'name'); // Use axisName instead of name because component has name property if (radarOpt.name && radarOpt.axisName == null) { radarOpt.axisName = radarOpt.name; delete radarOpt.name; if (false) { deprecateLog('name property in radar component has been changed to axisName'); } } if (radarOpt.nameGap != null && radarOpt.axisNameGap == null) { radarOpt.axisNameGap = radarOpt.nameGap; delete radarOpt.nameGap; if (false) { deprecateLog('nameGap property in radar component has been changed to axisNameGap'); } } if (false) { compatStyle_each(radarOpt.indicator, function (indicatorOpt) { if (indicatorOpt.text) { deprecateReplaceLog('text', 'name', 'radar.indicator'); } }); } }); compatStyle_each(toArr(option.geo), function (geoOpt) { if (compatStyle_isObject(geoOpt)) { compatEC3CommonStyles(geoOpt); compatStyle_each(toArr(geoOpt.regions), function (regionObj) { compatEC3CommonStyles(regionObj); }); } }); compatStyle_each(toArr(option.timeline), function (timelineOpt) { compatEC3CommonStyles(timelineOpt); convertNormalEmphasis(timelineOpt, 'label'); convertNormalEmphasis(timelineOpt, 'itemStyle'); convertNormalEmphasis(timelineOpt, 'controlStyle', true); var data = timelineOpt.data; core_util["isArray"](data) && core_util["each"](data, function (item) { if (core_util["isObject"](item)) { convertNormalEmphasis(item, 'label'); convertNormalEmphasis(item, 'itemStyle'); } }); }); compatStyle_each(toArr(option.toolbox), function (toolboxOpt) { convertNormalEmphasis(toolboxOpt, 'iconStyle'); compatStyle_each(toolboxOpt.feature, function (featureOpt) { convertNormalEmphasis(featureOpt, 'iconStyle'); }); }); compatTextStyle(toObj(option.axisPointer), 'label'); compatTextStyle(toObj(option.tooltip).axisPointer, 'label'); // Clean logs // storedLogs = {}; } // CONCATENATED MODULE: ./node_modules/echarts/lib/preprocessor/backwardCompat.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 get(opt, path) { var pathArr = path.split(','); var obj = opt; for (var i = 0; i < pathArr.length; i++) { obj = obj && obj[pathArr[i]]; if (obj == null) { break; } } return obj; } function backwardCompat_set(opt, path, val, overwrite) { var pathArr = path.split(','); var obj = opt; var key; var i = 0; for (; i < pathArr.length - 1; i++) { key = pathArr[i]; if (obj[key] == null) { obj[key] = {}; } obj = obj[key]; } if (overwrite || obj[pathArr[i]] == null) { obj[pathArr[i]] = val; } } function compatLayoutProperties(option) { option && Object(core_util["each"])(LAYOUT_PROPERTIES, function (prop) { if (prop[0] in option && !(prop[1] in option)) { option[prop[1]] = option[prop[0]]; } }); } var LAYOUT_PROPERTIES = [['x', 'left'], ['y', 'top'], ['x2', 'right'], ['y2', 'bottom']]; var COMPATITABLE_COMPONENTS = ['grid', 'geo', 'parallel', 'legend', 'toolbox', 'title', 'visualMap', 'dataZoom', 'timeline']; var BAR_ITEM_STYLE_MAP = [['borderRadius', 'barBorderRadius'], ['borderColor', 'barBorderColor'], ['borderWidth', 'barBorderWidth']]; function compatBarItemStyle(option) { var itemStyle = option && option.itemStyle; if (itemStyle) { for (var i = 0; i < BAR_ITEM_STYLE_MAP.length; i++) { var oldName = BAR_ITEM_STYLE_MAP[i][1]; var newName = BAR_ITEM_STYLE_MAP[i][0]; if (itemStyle[oldName] != null) { itemStyle[newName] = itemStyle[oldName]; if (false) { deprecateReplaceLog(oldName, newName); } } } } } function compatPieLabel(option) { if (!option) { return; } if (option.alignTo === 'edge' && option.margin != null && option.edgeDistance == null) { if (false) { deprecateReplaceLog('label.margin', 'label.edgeDistance', 'pie'); } option.edgeDistance = option.margin; } } function compatSunburstState(option) { if (!option) { return; } if (option.downplay && !option.blur) { option.blur = option.downplay; if (false) { deprecateReplaceLog('downplay', 'blur', 'sunburst'); } } } function compatGraphFocus(option) { if (!option) { return; } if (option.focusNodeAdjacency != null) { option.emphasis = option.emphasis || {}; if (option.emphasis.focus == null) { if (false) { deprecateReplaceLog('focusNodeAdjacency', 'emphasis: { focus: \'adjacency\'}', 'graph/sankey'); } option.emphasis.focus = 'adjacency'; } } } function traverseTree(data, cb) { if (data) { for (var i = 0; i < data.length; i++) { cb(data[i]); data[i] && traverseTree(data[i].children, cb); } } } function globalBackwardCompat(option, isTheme) { globalCompatStyle(option, isTheme); // Make sure series array for model initialization. option.series = normalizeToArray(option.series); Object(core_util["each"])(option.series, function (seriesOpt) { if (!Object(core_util["isObject"])(seriesOpt)) { return; } var seriesType = seriesOpt.type; if (seriesType === 'line') { if (seriesOpt.clipOverflow != null) { seriesOpt.clip = seriesOpt.clipOverflow; if (false) { deprecateReplaceLog('clipOverflow', 'clip', 'line'); } } } else if (seriesType === 'pie' || seriesType === 'gauge') { if (seriesOpt.clockWise != null) { seriesOpt.clockwise = seriesOpt.clockWise; if (false) { deprecateReplaceLog('clockWise', 'clockwise'); } } compatPieLabel(seriesOpt.label); var data = seriesOpt.data; if (data && !Object(core_util["isTypedArray"])(data)) { for (var i = 0; i < data.length; i++) { compatPieLabel(data[i]); } } if (seriesOpt.hoverOffset != null) { seriesOpt.emphasis = seriesOpt.emphasis || {}; if (seriesOpt.emphasis.scaleSize = null) { if (false) { deprecateReplaceLog('hoverOffset', 'emphasis.scaleSize'); } seriesOpt.emphasis.scaleSize = seriesOpt.hoverOffset; } } } else if (seriesType === 'gauge') { var pointerColor = get(seriesOpt, 'pointer.color'); pointerColor != null && backwardCompat_set(seriesOpt, 'itemStyle.color', pointerColor); } else if (seriesType === 'bar') { compatBarItemStyle(seriesOpt); compatBarItemStyle(seriesOpt.backgroundStyle); compatBarItemStyle(seriesOpt.emphasis); var data = seriesOpt.data; if (data && !Object(core_util["isTypedArray"])(data)) { for (var i = 0; i < data.length; i++) { if (typeof data[i] === 'object') { compatBarItemStyle(data[i]); compatBarItemStyle(data[i] && data[i].emphasis); } } } } else if (seriesType === 'sunburst') { var highlightPolicy = seriesOpt.highlightPolicy; if (highlightPolicy) { seriesOpt.emphasis = seriesOpt.emphasis || {}; if (!seriesOpt.emphasis.focus) { seriesOpt.emphasis.focus = highlightPolicy; if (false) { deprecateReplaceLog('highlightPolicy', 'emphasis.focus', 'sunburst'); } } } compatSunburstState(seriesOpt); traverseTree(seriesOpt.data, compatSunburstState); } else if (seriesType === 'graph' || seriesType === 'sankey') { compatGraphFocus(seriesOpt); // TODO nodes, edges? } else if (seriesType === 'map') { if (seriesOpt.mapType && !seriesOpt.map) { if (false) { deprecateReplaceLog('mapType', 'map', 'map'); } seriesOpt.map = seriesOpt.mapType; } if (seriesOpt.mapLocation) { if (false) { deprecateLog('`mapLocation` is not used anymore.'); } Object(core_util["defaults"])(seriesOpt, seriesOpt.mapLocation); } } if (seriesOpt.hoverAnimation != null) { seriesOpt.emphasis = seriesOpt.emphasis || {}; if (seriesOpt.emphasis && seriesOpt.emphasis.scale == null) { if (false) { deprecateReplaceLog('hoverAnimation', 'emphasis.scale'); } seriesOpt.emphasis.scale = seriesOpt.hoverAnimation; } } compatLayoutProperties(seriesOpt); }); // dataRange has changed to visualMap if (option.dataRange) { option.visualMap = option.dataRange; } Object(core_util["each"])(COMPATITABLE_COMPONENTS, function (componentName) { var options = option[componentName]; if (options) { if (!Object(core_util["isArray"])(options)) { options = [options]; } Object(core_util["each"])(options, function (option) { compatLayoutProperties(option); }); } }); } // CONCATENATED MODULE: ./node_modules/echarts/lib/processor/dataStack.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ // (1) [Caution]: the logic is correct based on the premises: // data processing stage is blocked in stream. // See // (2) Only register once when import repeatedly. // Should be executed after series is filtered and before stack calculation. function dataStack(ecModel) { var stackInfoMap = Object(core_util["createHashMap"])(); ecModel.eachSeries(function (seriesModel) { var stack = seriesModel.get('stack'); // Compatible: when `stack` is set as '', do not stack. if (stack) { var stackInfoList = stackInfoMap.get(stack) || stackInfoMap.set(stack, []); var data = seriesModel.getData(); var stackInfo = { // Used for calculate axis extent automatically. // TODO: Type getCalculationInfo return more specific type? stackResultDimension: data.getCalculationInfo('stackResultDimension'), stackedOverDimension: data.getCalculationInfo('stackedOverDimension'), stackedDimension: data.getCalculationInfo('stackedDimension'), stackedByDimension: data.getCalculationInfo('stackedByDimension'), isStackedByIndex: data.getCalculationInfo('isStackedByIndex'), data: data, seriesModel: seriesModel }; // If stacked on axis that do not support data stack. if (!stackInfo.stackedDimension || !(stackInfo.isStackedByIndex || stackInfo.stackedByDimension)) { return; } stackInfoList.length && data.setCalculationInfo('stackedOnSeries', stackInfoList[stackInfoList.length - 1].seriesModel); stackInfoList.push(stackInfo); } }); stackInfoMap.each(calculateStack); } function calculateStack(stackInfoList) { Object(core_util["each"])(stackInfoList, function (targetStackInfo, idxInStack) { var resultVal = []; var resultNaN = [NaN, NaN]; var dims = [targetStackInfo.stackResultDimension, targetStackInfo.stackedOverDimension]; var targetData = targetStackInfo.data; var isStackedByIndex = targetStackInfo.isStackedByIndex; var stackStrategy = targetStackInfo.seriesModel.get('stackStrategy') || 'samesign'; // Should not write on raw data, because stack series model list changes // depending on legend selection. targetData.modify(dims, function (v0, v1, dataIndex) { var sum = targetData.get(targetStackInfo.stackedDimension, dataIndex); // Consider `connectNulls` of line area, if value is NaN, stackedOver // should also be NaN, to draw a appropriate belt area. if (isNaN(sum)) { return resultNaN; } var byValue; var stackedDataRawIndex; if (isStackedByIndex) { stackedDataRawIndex = targetData.getRawIndex(dataIndex); } else { byValue = targetData.get(targetStackInfo.stackedByDimension, dataIndex); } // If stackOver is NaN, chart view will render point on value start. var stackedOver = NaN; for (var j = idxInStack - 1; j >= 0; j--) { var stackInfo = stackInfoList[j]; // Has been optimized by inverted indices on `stackedByDimension`. if (!isStackedByIndex) { stackedDataRawIndex = stackInfo.data.rawIndexOf(stackInfo.stackedByDimension, byValue); } if (stackedDataRawIndex >= 0) { var val = stackInfo.data.getByRawIndex(stackInfo.stackResultDimension, stackedDataRawIndex); // Considering positive stack, negative stack and empty data if (stackStrategy === 'all' // single stack group || stackStrategy === 'positive' && val > 0 || stackStrategy === 'negative' && val < 0 || stackStrategy === 'samesign' && sum >= 0 && val > 0 // All positive stack || stackStrategy === 'samesign' && sum <= 0 && val < 0 // All negative stack ) { // The sum has to be very small to be affected by the // floating arithmetic problem. An incorrect result will probably // cause axis min/max to be filtered incorrectly. sum = addSafe(sum, val); stackedOver = val; break; } } } resultVal[0] = sum; resultVal[1] = stackedOver; return resultVal; }); }); } // CONCATENATED MODULE: ./node_modules/echarts/lib/data/Source.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ ; // @inner var Source_SourceImpl = /** @class */function () { function SourceImpl(fields) { this.data = fields.data || (fields.sourceFormat === SOURCE_FORMAT_KEYED_COLUMNS ? {} : []); this.sourceFormat = fields.sourceFormat || SOURCE_FORMAT_UNKNOWN; // Visit config this.seriesLayoutBy = fields.seriesLayoutBy || SERIES_LAYOUT_BY_COLUMN; this.startIndex = fields.startIndex || 0; this.dimensionsDetectedCount = fields.dimensionsDetectedCount; this.metaRawOption = fields.metaRawOption; var dimensionsDefine = this.dimensionsDefine = fields.dimensionsDefine; if (dimensionsDefine) { for (var i = 0; i < dimensionsDefine.length; i++) { var dim = dimensionsDefine[i]; if (dim.type == null) { if (guessOrdinal(this, i) === BE_ORDINAL.Must) { dim.type = 'ordinal'; } } } } } return SourceImpl; }(); function isSourceInstance(val) { return val instanceof Source_SourceImpl; } /** * Create a source from option. * NOTE: Created source is immutable. Don't change any properties in it. */ function createSource(sourceData, thisMetaRawOption, // can be null. If not provided, auto detect it from `sourceData`. sourceFormat) { sourceFormat = sourceFormat || detectSourceFormat(sourceData); var seriesLayoutBy = thisMetaRawOption.seriesLayoutBy; var determined = determineSourceDimensions(sourceData, sourceFormat, seriesLayoutBy, thisMetaRawOption.sourceHeader, thisMetaRawOption.dimensions); var source = new Source_SourceImpl({ data: sourceData, sourceFormat: sourceFormat, seriesLayoutBy: seriesLayoutBy, dimensionsDefine: determined.dimensionsDefine, startIndex: determined.startIndex, dimensionsDetectedCount: determined.dimensionsDetectedCount, metaRawOption: Object(core_util["clone"])(thisMetaRawOption) }); return source; } /** * Wrap original series data for some compatibility cases. */ function createSourceFromSeriesDataOption(data) { return new Source_SourceImpl({ data: data, sourceFormat: Object(core_util["isTypedArray"])(data) ? SOURCE_FORMAT_TYPED_ARRAY : SOURCE_FORMAT_ORIGINAL }); } /** * Clone source but excludes source data. */ function cloneSourceShallow(source) { return new Source_SourceImpl({ data: source.data, sourceFormat: source.sourceFormat, seriesLayoutBy: source.seriesLayoutBy, dimensionsDefine: Object(core_util["clone"])(source.dimensionsDefine), startIndex: source.startIndex, dimensionsDetectedCount: source.dimensionsDetectedCount }); } /** * Note: An empty array will be detected as `SOURCE_FORMAT_ARRAY_ROWS`. */ function detectSourceFormat(data) { var sourceFormat = SOURCE_FORMAT_UNKNOWN; if (Object(core_util["isTypedArray"])(data)) { sourceFormat = SOURCE_FORMAT_TYPED_ARRAY; } else if (Object(core_util["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 (Object(core_util["isArray"])(item) || Object(core_util["isTypedArray"])(item)) { sourceFormat = SOURCE_FORMAT_ARRAY_ROWS; break; } else if (Object(core_util["isObject"])(item)) { sourceFormat = SOURCE_FORMAT_OBJECT_ROWS; break; } } } else if (Object(core_util["isObject"])(data)) { for (var key in data) { if (Object(core_util["hasOwn"])(data, key) && Object(core_util["isArrayLike"])(data[key])) { sourceFormat = SOURCE_FORMAT_KEYED_COLUMNS; break; } } } return sourceFormat; } /** * Determine the source definitions from data standalone dimensions definitions * are not specified. */ function determineSourceDimensions(data, sourceFormat, seriesLayoutBy, sourceHeader, // standalone raw dimensions definition, like: // { // dimensions: ['aa', 'bb', { name: 'cc', type: 'time' }] // } // in `dataset` or `series` dimensionsDefine) { var dimensionsDetectedCount; var startIndex; // PENDING: Could data be null/undefined here? // currently, if `dataset.source` not specified, error thrown. // if `series.data` not specified, nothing rendered without error thrown. // Should test these cases. if (!data) { return { dimensionsDefine: normalizeDimensionsOption(dimensionsDefine), startIndex: startIndex, dimensionsDetectedCount: dimensionsDetectedCount }; } if (sourceFormat === SOURCE_FORMAT_ARRAY_ROWS) { var dataArrayRows = data; // 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 (Object(core_util["isString"])(val)) { startIndex == null && (startIndex = 1); } else { startIndex = 0; } } // 10 is an experience number, avoid long loop. }, seriesLayoutBy, dataArrayRows, 10); } else { startIndex = Object(core_util["isNumber"])(sourceHeader) ? sourceHeader : sourceHeader ? 1 : 0; } if (!dimensionsDefine && startIndex === 1) { dimensionsDefine = []; arrayRowsTravelFirst(function (val, index) { dimensionsDefine[index] = val != null ? val + '' : ''; }, seriesLayoutBy, dataArrayRows, Infinity); } dimensionsDetectedCount = dimensionsDefine ? dimensionsDefine.length : seriesLayoutBy === SERIES_LAYOUT_BY_ROW ? dataArrayRows.length : dataArrayRows[0] ? dataArrayRows[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 = []; Object(core_util["each"])(data, function (colArr, key) { dimensionsDefine.push(key); }); } } else if (sourceFormat === SOURCE_FORMAT_ORIGINAL) { var value0 = getDataItemValue(data[0]); dimensionsDetectedCount = Object(core_util["isArray"])(value0) && value0.length || 1; } else if (sourceFormat === SOURCE_FORMAT_TYPED_ARRAY) { if (false) { assert(!!dimensionsDefine, 'dimensions must be given if data is TypedArray.'); } } return { startIndex: startIndex, dimensionsDefine: normalizeDimensionsOption(dimensionsDefine), dimensionsDetectedCount: dimensionsDetectedCount }; } function objectRowsCollectDimensions(data) { var firstIndex = 0; var obj; while (firstIndex < data.length && !(obj = data[firstIndex++])) {} // jshint ignore: line if (obj) { return Object(core_util["keys"])(obj); } } // 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/undefined or string. function normalizeDimensionsOption(dimensionsDefine) { if (!dimensionsDefine) { // The meaning of null/undefined is different from empty array. return; } var nameMap = Object(core_util["createHashMap"])(); return Object(core_util["map"])(dimensionsDefine, function (rawItem, index) { rawItem = Object(core_util["isObject"])(rawItem) ? rawItem : { name: rawItem }; // Other fields will be discarded. var item = { name: rawItem.name, displayName: rawItem.displayName, type: rawItem.type }; // User can set null in dimensions. // We don't auto specify name, otherwise a given name may // cause it to be referred 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) { 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 shouldRetrieveDataByName(source) { var sourceFormat = source.sourceFormat; return sourceFormat === SOURCE_FORMAT_OBJECT_ROWS || sourceFormat === SOURCE_FORMAT_KEYED_COLUMNS; } // CONCATENATED MODULE: ./node_modules/echarts/lib/data/helper/dataProvider.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 dataProvider__a, dataProvider__b, _c; // TODO // ??? refactor? check the outer usage of data provider. // merge with defaultDimValueGetter? var providerMethods; var mountMethods; /** * If normal array used, mutable chunk size is supported. * If typed array used, chunk size must be fixed. */ var dataProvider_DefaultDataProvider = /** @class */function () { function DefaultDataProvider(sourceParam, dimSize) { // let source: Source; var source = !isSourceInstance(sourceParam) ? createSourceFromSeriesDataOption(sourceParam) : sourceParam; // declare source is Source; this._source = source; var data = this._data = source.data; // Typed array. TODO IE10+? if (source.sourceFormat === SOURCE_FORMAT_TYPED_ARRAY) { if (false) { if (dimSize == null) { throw new Error('Typed array data must specify dimension size'); } } this._offset = 0; this._dimSize = dimSize; this._data = data; } mountMethods(this, data, source); } DefaultDataProvider.prototype.getSource = function () { return this._source; }; DefaultDataProvider.prototype.count = function () { return 0; }; DefaultDataProvider.prototype.getItem = function (idx, out) { return; }; DefaultDataProvider.prototype.appendData = function (newData) {}; DefaultDataProvider.prototype.clean = function () {}; DefaultDataProvider.protoInitialize = function () { // PENDING: To avoid potential incompat (e.g., prototype // is visited somewhere), still init them on prototype. var proto = DefaultDataProvider.prototype; proto.pure = false; proto.persistent = true; }(); DefaultDataProvider.internalField = function () { var _a; mountMethods = function (provider, data, source) { var sourceFormat = source.sourceFormat; var seriesLayoutBy = source.seriesLayoutBy; var startIndex = source.startIndex; var dimsDef = source.dimensionsDefine; var methods = providerMethods[getMethodMapKey(sourceFormat, seriesLayoutBy)]; if (false) { assert(methods, 'Invalide sourceFormat: ' + sourceFormat); } Object(core_util["extend"])(provider, methods); if (sourceFormat === SOURCE_FORMAT_TYPED_ARRAY) { provider.getItem = getItemForTypedArray; provider.count = countForTypedArray; provider.fillStorage = fillStorageForTypedArray; } else { var rawItemGetter = getRawSourceItemGetter(sourceFormat, seriesLayoutBy); provider.getItem = Object(core_util["bind"])(rawItemGetter, null, data, startIndex, dimsDef); var rawCounter = getRawSourceDataCounter(sourceFormat, seriesLayoutBy); provider.count = Object(core_util["bind"])(rawCounter, null, data, startIndex, dimsDef); } }; var getItemForTypedArray = function (idx, out) { idx = idx - this._offset; out = out || []; var data = this._data; var dimSize = this._dimSize; var offset = dimSize * idx; for (var i = 0; i < dimSize; i++) { out[i] = data[offset + i]; } return out; }; var fillStorageForTypedArray = function (start, end, storage, extent) { var data = this._data; var dimSize = this._dimSize; for (var dim = 0; dim < dimSize; dim++) { var dimExtent = extent[dim]; var min = dimExtent[0] == null ? Infinity : dimExtent[0]; var max = dimExtent[1] == null ? -Infinity : dimExtent[1]; var count = end - start; var arr = storage[dim]; for (var i = 0; i < count; i++) { // appendData with TypedArray will always do replace in provider. var val = data[i * dimSize + dim]; arr[start + i] = val; val < min && (min = val); val > max && (max = val); } dimExtent[0] = min; dimExtent[1] = max; } }; var countForTypedArray = function () { return this._data ? this._data.length / this._dimSize : 0; }; providerMethods = (_a = {}, _a[SOURCE_FORMAT_ARRAY_ROWS + '_' + SERIES_LAYOUT_BY_COLUMN] = { pure: true, appendData: appendDataSimply }, _a[SOURCE_FORMAT_ARRAY_ROWS + '_' + SERIES_LAYOUT_BY_ROW] = { pure: true, appendData: function () { throw new Error('Do not support appendData when set seriesLayoutBy: "row".'); } }, _a[SOURCE_FORMAT_OBJECT_ROWS] = { pure: true, appendData: appendDataSimply }, _a[SOURCE_FORMAT_KEYED_COLUMNS] = { pure: true, appendData: function (newData) { var data = this._data; Object(core_util["each"])(newData, function (newCol, key) { var oldCol = data[key] || (data[key] = []); for (var i = 0; i < (newCol || []).length; i++) { oldCol.push(newCol[i]); } }); } }, _a[SOURCE_FORMAT_ORIGINAL] = { appendData: appendDataSimply }, _a[SOURCE_FORMAT_TYPED_ARRAY] = { persistent: false, pure: true, appendData: function (newData) { if (false) { assert(isTypedArray(newData), 'Added data must be TypedArray if data in initialization is TypedArray'); } this._data = newData; }, // Clean self if data is already used. clean: function () { // PENDING this._offset += this.count(); this._data = null; } }, _a); function appendDataSimply(newData) { for (var i = 0; i < newData.length; i++) { this._data.push(newData[i]); } } }(); return DefaultDataProvider; }(); var getItemSimply = function (rawData, startIndex, dimsDef, idx) { return rawData[idx]; }; var rawSourceItemGetterMap = (dataProvider__a = {}, dataProvider__a[SOURCE_FORMAT_ARRAY_ROWS + '_' + SERIES_LAYOUT_BY_COLUMN] = function (rawData, startIndex, dimsDef, idx) { return rawData[idx + startIndex]; }, dataProvider__a[SOURCE_FORMAT_ARRAY_ROWS + '_' + SERIES_LAYOUT_BY_ROW] = function (rawData, startIndex, dimsDef, idx, out) { idx += startIndex; var item = out || []; var data = rawData; for (var i = 0; i < data.length; i++) { var row = data[i]; item[i] = row ? row[idx] : null; } return item; }, dataProvider__a[SOURCE_FORMAT_OBJECT_ROWS] = getItemSimply, dataProvider__a[SOURCE_FORMAT_KEYED_COLUMNS] = function (rawData, startIndex, dimsDef, idx, out) { var item = out || []; for (var i = 0; i < dimsDef.length; i++) { var dimName = dimsDef[i].name; if (false) { if (dimName == null) { throw new Error(); } } var col = rawData[dimName]; item[i] = col ? col[idx] : null; } return item; }, dataProvider__a[SOURCE_FORMAT_ORIGINAL] = getItemSimply, dataProvider__a); function getRawSourceItemGetter(sourceFormat, seriesLayoutBy) { var method = rawSourceItemGetterMap[getMethodMapKey(sourceFormat, seriesLayoutBy)]; if (false) { assert(method, 'Do not support get item on "' + sourceFormat + '", "' + seriesLayoutBy + '".'); } return method; } var countSimply = function (rawData, startIndex, dimsDef) { return rawData.length; }; var rawSourceDataCounterMap = (dataProvider__b = {}, dataProvider__b[SOURCE_FORMAT_ARRAY_ROWS + '_' + SERIES_LAYOUT_BY_COLUMN] = function (rawData, startIndex, dimsDef) { return Math.max(0, rawData.length - startIndex); }, dataProvider__b[SOURCE_FORMAT_ARRAY_ROWS + '_' + SERIES_LAYOUT_BY_ROW] = function (rawData, startIndex, dimsDef) { var row = rawData[0]; return row ? Math.max(0, row.length - startIndex) : 0; }, dataProvider__b[SOURCE_FORMAT_OBJECT_ROWS] = countSimply, dataProvider__b[SOURCE_FORMAT_KEYED_COLUMNS] = function (rawData, startIndex, dimsDef) { var dimName = dimsDef[0].name; if (false) { if (dimName == null) { throw new Error(); } } var col = rawData[dimName]; return col ? col.length : 0; }, dataProvider__b[SOURCE_FORMAT_ORIGINAL] = countSimply, dataProvider__b); function getRawSourceDataCounter(sourceFormat, seriesLayoutBy) { var method = rawSourceDataCounterMap[getMethodMapKey(sourceFormat, seriesLayoutBy)]; if (false) { assert(method, 'Do not support count on "' + sourceFormat + '", "' + seriesLayoutBy + '".'); } return method; } var getRawValueSimply = function (dataItem, dimIndex, property) { return dataItem[dimIndex]; }; var rawSourceValueGetterMap = (_c = {}, _c[SOURCE_FORMAT_ARRAY_ROWS] = getRawValueSimply, _c[SOURCE_FORMAT_OBJECT_ROWS] = function (dataItem, dimIndex, property) { return dataItem[property]; }, _c[SOURCE_FORMAT_KEYED_COLUMNS] = getRawValueSimply, _c[SOURCE_FORMAT_ORIGINAL] = function (dataItem, dimIndex, property) { // FIXME: In some case (markpoint in geo (geo-map.html)), // dataItem is {coord: [...]} var value = getDataItemValue(dataItem); return !(value instanceof Array) ? value : value[dimIndex]; }, _c[SOURCE_FORMAT_TYPED_ARRAY] = getRawValueSimply, _c); function getRawSourceValueGetter(sourceFormat) { var method = rawSourceValueGetterMap[sourceFormat]; if (false) { assert(method, 'Do not support get value on "' + sourceFormat + '".'); } return method; } function getMethodMapKey(sourceFormat, seriesLayoutBy) { return sourceFormat === SOURCE_FORMAT_ARRAY_ROWS ? sourceFormat + '_' + seriesLayoutBy : sourceFormat; } // ??? FIXME can these logic be more neat: getRawValue, getRawDataItem, // Consider persistent. // Caution: why use raw value to display on label or tooltip? // A reason is to avoid format. For example time value we do not know // how to format is expected. More over, if stack is used, calculated // value may be 0.91000000001, which have brings trouble to display. // TODO: consider how to treat null/undefined/NaN when display? function retrieveRawValue(data, dataIndex, // If dimIndex is null/undefined, return OptionDataItem. // Otherwise, return OptionDataValue. dim) { if (!data) { return; } // Consider data may be not persistent. var dataItem = data.getRawDataItem(dataIndex); if (dataItem == null) { return; } var store = data.getStore(); var sourceFormat = store.getSource().sourceFormat; if (dim != null) { var dimIndex = data.getDimensionIndex(dim); var property = store.getDimensionProperty(dimIndex); return getRawSourceValueGetter(sourceFormat)(dataItem, dimIndex, property); } else { var result = dataItem; if (sourceFormat === SOURCE_FORMAT_ORIGINAL) { result = getDataItemValue(dataItem); } return result; } } /** * Compatible with some cases (in pie, map) like: * data: [{name: 'xx', value: 5, selected: true}, ...] * where only sourceFormat is 'original' and 'objectRows' supported. * * // TODO * Supported detail options in data item when using 'arrayRows'. * * @param data * @param dataIndex * @param attr like 'selected' */ function retrieveRawAttr(data, dataIndex, attr) { if (!data) { return; } var sourceFormat = data.getStore().getSource().sourceFormat; if (sourceFormat !== SOURCE_FORMAT_ORIGINAL && sourceFormat !== SOURCE_FORMAT_OBJECT_ROWS) { return; } var dataItem = data.getRawDataItem(dataIndex); if (sourceFormat === SOURCE_FORMAT_ORIGINAL && !Object(core_util["isObject"])(dataItem)) { dataItem = null; } if (dataItem) { return dataItem[attr]; } } // CONCATENATED MODULE: ./node_modules/echarts/lib/model/mixin/dataFormat.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 DIMENSION_LABEL_REG = /\{@(.+?)\}/g; var dataFormat_DataFormatMixin = /** @class */function () { function DataFormatMixin() {} /** * Get params for formatter */ DataFormatMixin.prototype.getDataParams = function (dataIndex, dataType) { var data = this.getData(dataType); var rawValue = this.getRawValue(dataIndex, dataType); var rawDataIndex = data.getRawIndex(dataIndex); var name = data.getName(dataIndex); var itemOpt = data.getRawDataItem(dataIndex); var style = data.getItemVisual(dataIndex, 'style'); var color = style && style[data.getItemVisual(dataIndex, 'drawType') || 'fill']; var borderColor = style && style.stroke; var mainType = this.mainType; var isSeries = mainType === 'series'; var userOutput = data.userOutput && data.userOutput.get(); return { componentType: mainType, componentSubType: this.subType, componentIndex: this.componentIndex, seriesType: isSeries ? this.subType : null, seriesIndex: this.seriesIndex, seriesId: isSeries ? this.id : null, seriesName: isSeries ? this.name : null, name: name, dataIndex: rawDataIndex, data: itemOpt, dataType: dataType, value: rawValue, color: color, borderColor: borderColor, dimensionNames: userOutput ? userOutput.fullDimensions : null, encode: userOutput ? userOutput.encode : null, // Param name list for mapping `a`, `b`, `c`, `d`, `e` $vars: ['seriesName', 'name', 'value'] }; }; /** * Format label * @param dataIndex * @param status 'normal' by default * @param dataType * @param labelDimIndex Only used in some chart that * use formatter in different dimensions, like radar. * @param formatter Formatter given outside. * @return return null/undefined if no formatter */ DataFormatMixin.prototype.getFormattedLabel = function (dataIndex, status, dataType, labelDimIndex, formatter, extendParams) { status = status || 'normal'; var data = this.getData(dataType); var params = this.getDataParams(dataIndex, dataType); if (extendParams) { params.value = extendParams.interpolatedValue; } if (labelDimIndex != null && core_util["isArray"](params.value)) { params.value = params.value[labelDimIndex]; } if (!formatter) { var itemModel = data.getItemModel(dataIndex); // @ts-ignore formatter = itemModel.get(status === 'normal' ? ['label', 'formatter'] : [status, 'label', 'formatter']); } if (core_util["isFunction"](formatter)) { params.status = status; params.dimensionIndex = labelDimIndex; return formatter(params); } else if (core_util["isString"](formatter)) { var str = formatTpl(formatter, params); // Support 'aaa{@[3]}bbb{@product}ccc'. // Do not support '}' in dim name util have to. return str.replace(DIMENSION_LABEL_REG, function (origin, dimStr) { var len = dimStr.length; var dimLoose = dimStr; if (dimLoose.charAt(0) === '[' && dimLoose.charAt(len - 1) === ']') { dimLoose = +dimLoose.slice(1, len - 1); // Also support: '[]' => 0 if (false) { if (isNaN(dimLoose)) { error("Invalide label formatter: @" + dimStr + ", only support @[0], @[1], @[2], ..."); } } } var val = retrieveRawValue(data, dataIndex, dimLoose); if (extendParams && core_util["isArray"](extendParams.interpolatedValue)) { var dimIndex = data.getDimensionIndex(dimLoose); if (dimIndex >= 0) { val = extendParams.interpolatedValue[dimIndex]; } } return val != null ? val + '' : ''; }); } }; /** * Get raw value in option */ DataFormatMixin.prototype.getRawValue = function (idx, dataType) { return retrieveRawValue(this.getData(dataType), idx); }; /** * Should be implemented. * @param {number} dataIndex * @param {boolean} [multipleSeries=false] * @param {string} [dataType] */ DataFormatMixin.prototype.formatTooltip = function (dataIndex, multipleSeries, dataType) { // Empty function return; }; return DataFormatMixin; }(); ; // PENDING: previously we accept this type when calling `formatTooltip`, // but guess little chance has been used outside. Do we need to backward // compat it? // type TooltipFormatResultLegacyObject = { // // `html` means the markup language text, either in 'html' or 'richText'. // // The name `html` is not appropriate because in 'richText' it is not a HTML // // string. But still support it for backward compatibility. // html: string; // markers: Dictionary; // }; /** * For backward compat, normalize the return from `formatTooltip`. */ function normalizeTooltipFormatResult(result) { var markupText; // let markers: Dictionary; var markupFragment; if (core_util["isObject"](result)) { if (result.type) { markupFragment = result; } else { if (false) { console.warn('The return type of `formatTooltip` is not supported: ' + makePrintable(result)); } } // else { // markupText = (result as TooltipFormatResultLegacyObject).html; // markers = (result as TooltipFormatResultLegacyObject).markers; // if (markersExisting) { // markers = zrUtil.merge(markersExisting, markers); // } // } } else { markupText = result; } return { text: markupText, // markers: markers || markersExisting, frag: markupFragment }; } // CONCATENATED MODULE: ./node_modules/echarts/lib/core/task.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ ; /** * @param {Object} define * @return See the return of `createTask`. */ function createTask(define) { return new task_Task(define); } var task_Task = /** @class */function () { function Task(define) { define = define || {}; this._reset = define.reset; this._plan = define.plan; this._count = define.count; this._onDirty = define.onDirty; this._dirty = true; } /** * @param step Specified step. * @param skip Skip customer perform call. * @param modBy Sampling window size. * @param modDataCount Sampling count. * @return whether unfinished. */ Task.prototype.perform = function (performArgs) { var upTask = this._upstream; var skip = performArgs && performArgs.skip; // TODO some refactor. // Pull data. Must pull data each time, because context.data // may be updated by Series.setData. if (this._dirty && upTask) { var context = this.context; context.data = context.outputData = upTask.context.outputData; } if (this.__pipeline) { this.__pipeline.currentTask = this; } var planResult; if (this._plan && !skip) { planResult = this._plan(this.context); } // Support sharding by mod, which changes the render sequence and makes the rendered graphic // elements uniformed distributed when progress, especially when moving or zooming. var lastModBy = normalizeModBy(this._modBy); var lastModDataCount = this._modDataCount || 0; var modBy = normalizeModBy(performArgs && performArgs.modBy); var modDataCount = performArgs && performArgs.modDataCount || 0; if (lastModBy !== modBy || lastModDataCount !== modDataCount) { planResult = 'reset'; } function normalizeModBy(val) { !(val >= 1) && (val = 1); // jshint ignore:line return val; } var forceFirstProgress; if (this._dirty || planResult === 'reset') { this._dirty = false; forceFirstProgress = this._doReset(skip); } this._modBy = modBy; this._modDataCount = modDataCount; var step = performArgs && performArgs.step; if (upTask) { if (false) { assert(upTask._outputDueEnd != null); } this._dueEnd = upTask._outputDueEnd; } // DataTask or overallTask else { if (false) { assert(!this._progress || this._count); } this._dueEnd = this._count ? this._count(this.context) : Infinity; } // Note: Stubs, that its host overall task let it has progress, has progress. // If no progress, pass index from upstream to downstream each time plan called. if (this._progress) { var start = this._dueIndex; var end = Math.min(step != null ? this._dueIndex + step : Infinity, this._dueEnd); if (!skip && (forceFirstProgress || start < end)) { var progress = this._progress; if (Object(core_util["isArray"])(progress)) { for (var i = 0; i < progress.length; i++) { this._doProgress(progress[i], start, end, modBy, modDataCount); } } else { this._doProgress(progress, start, end, modBy, modDataCount); } } this._dueIndex = end; // If no `outputDueEnd`, assume that output data and // input data is the same, so use `dueIndex` as `outputDueEnd`. var outputDueEnd = this._settedOutputEnd != null ? this._settedOutputEnd : end; if (false) { // ??? Can not rollback. assert(outputDueEnd >= this._outputDueEnd); } this._outputDueEnd = outputDueEnd; } else { // (1) Some overall task has no progress. // (2) Stubs, that its host overall task do not let it has progress, has no progress. // This should always be performed so it can be passed to downstream. this._dueIndex = this._outputDueEnd = this._settedOutputEnd != null ? this._settedOutputEnd : this._dueEnd; } return this.unfinished(); }; Task.prototype.dirty = function () { this._dirty = true; this._onDirty && this._onDirty(this.context); }; Task.prototype._doProgress = function (progress, start, end, modBy, modDataCount) { iterator.reset(start, end, modBy, modDataCount); this._callingProgress = progress; this._callingProgress({ start: start, end: end, count: end - start, next: iterator.next }, this.context); }; Task.prototype._doReset = function (skip) { this._dueIndex = this._outputDueEnd = this._dueEnd = 0; this._settedOutputEnd = null; var progress; var forceFirstProgress; if (!skip && this._reset) { progress = this._reset(this.context); if (progress && progress.progress) { forceFirstProgress = progress.forceFirstProgress; progress = progress.progress; } // To simplify no progress checking, array must has item. if (Object(core_util["isArray"])(progress) && !progress.length) { progress = null; } } this._progress = progress; this._modBy = this._modDataCount = null; var downstream = this._downstream; downstream && downstream.dirty(); return forceFirstProgress; }; Task.prototype.unfinished = function () { return this._progress && this._dueIndex < this._dueEnd; }; /** * @param downTask The downstream task. * @return The downstream task. */ Task.prototype.pipe = function (downTask) { if (false) { assert(downTask && !downTask._disposed && downTask !== this); } // If already downstream, do not dirty downTask. if (this._downstream !== downTask || this._dirty) { this._downstream = downTask; downTask._upstream = this; downTask.dirty(); } }; Task.prototype.dispose = function () { if (this._disposed) { return; } this._upstream && (this._upstream._downstream = null); this._downstream && (this._downstream._upstream = null); this._dirty = false; this._disposed = true; }; Task.prototype.getUpstream = function () { return this._upstream; }; Task.prototype.getDownstream = function () { return this._downstream; }; Task.prototype.setOutputEnd = function (end) { // This only happens in dataTask, dataZoom, map, currently. // where dataZoom do not set end each time, but only set // when reset. So we should record the set end, in case // that the stub of dataZoom perform again and earse the // set end by upstream. this._outputDueEnd = this._settedOutputEnd = end; }; return Task; }(); var iterator = function () { var end; var current; var modBy; var modDataCount; var winCount; var it = { reset: function (s, e, sStep, sCount) { current = s; end = e; modBy = sStep; modDataCount = sCount; winCount = Math.ceil(modDataCount / modBy); it.next = modBy > 1 && modDataCount > 0 ? modNext : sequentialNext; } }; return it; function sequentialNext() { return current < end ? current++ : null; } function modNext() { var dataIndex = current % winCount * modBy + Math.ceil(current / winCount); var result = current >= end ? null : dataIndex < modDataCount ? dataIndex // If modDataCount is smaller than data.count() (consider `appendData` case), // Use normal linear rendering mode. : current; current++; return result; } }(); // ----------------------------------------------------------------------------- // For stream debug (Should be commented out after used!) // @usage: printTask(this, 'begin'); // @usage: printTask(this, null, {someExtraProp}); // @usage: Use `__idxInPipeline` as conditional breakpiont. // // window.printTask = function (task: any, prefix: string, extra: { [key: string]: unknown }): void { // window.ecTaskUID == null && (window.ecTaskUID = 0); // task.uidDebug == null && (task.uidDebug = `task_${window.ecTaskUID++}`); // task.agent && task.agent.uidDebug == null && (task.agent.uidDebug = `task_${window.ecTaskUID++}`); // let props = []; // if (task.__pipeline) { // let val = `${task.__idxInPipeline}/${task.__pipeline.tail.__idxInPipeline} ${task.agent ? '(stub)' : ''}`; // props.push({text: '__idxInPipeline/total', value: val}); // } else { // let stubCount = 0; // task.agentStubMap.each(() => stubCount++); // props.push({text: 'idx', value: `overall (stubs: ${stubCount})`}); // } // props.push({text: 'uid', value: task.uidDebug}); // if (task.__pipeline) { // props.push({text: 'pipelineId', value: task.__pipeline.id}); // task.agent && props.push( // {text: 'stubFor', value: task.agent.uidDebug} // ); // } // props.push( // {text: 'dirty', value: task._dirty}, // {text: 'dueIndex', value: task._dueIndex}, // {text: 'dueEnd', value: task._dueEnd}, // {text: 'outputDueEnd', value: task._outputDueEnd} // ); // if (extra) { // Object.keys(extra).forEach(key => { // props.push({text: key, value: extra[key]}); // }); // } // let args = ['color: blue']; // let msg = `%c[${prefix || 'T'}] %c` + props.map(item => ( // args.push('color: green', 'color: red'), // `${item.text}: %c${item.value}` // )).join('%c, '); // console.log.apply(console, [msg].concat(args)); // // console.log(this); // }; // window.printPipeline = function (task: any, prefix: string) { // const pipeline = task.__pipeline; // let currTask = pipeline.head; // while (currTask) { // window.printTask(currTask, prefix); // currTask = currTask._downstream; // } // }; // window.showChain = function (chainHeadTask) { // var chain = []; // var task = chainHeadTask; // while (task) { // chain.push({ // task: task, // up: task._upstream, // down: task._downstream, // idxInPipeline: task.__idxInPipeline // }); // task = task._downstream; // } // return chain; // }; // window.findTaskInChain = function (task, chainHeadTask) { // let chain = window.showChain(chainHeadTask); // let result = []; // for (let i = 0; i < chain.length; i++) { // let chainItem = chain[i]; // if (chainItem.task === task) { // result.push(i); // } // } // return result; // }; // window.printChainAEachInChainB = function (chainHeadTaskA, chainHeadTaskB) { // let chainA = window.showChain(chainHeadTaskA); // for (let i = 0; i < chainA.length; i++) { // console.log('chainAIdx:', i, 'inChainB:', window.findTaskInChain(chainA[i].task, chainHeadTaskB)); // } // }; // CONCATENATED MODULE: ./node_modules/echarts/lib/data/helper/dataValueHelper.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ /** * Convert raw the value in to inner value in List. * * [Performance sensitive] * * [Caution]: this is the key logic of user value parser. * For backward compatibility, do not modify it until you have to! */ function parseDataValue(value, // For high performance, do not omit the second param. opt) { // Performance sensitive. var dimType = opt && opt.type; if (dimType === 'ordinal') { // If given value is a category string return value; } if (dimType === 'time' // spead up when using timestamp && !Object(core_util["isNumber"])(value) && value != null && value !== '-') { value = +parseDate(value); } // dimType defaults 'number'. // If dimType is not ordinal and value is null or undefined or NaN or '-', // parse to NaN. // number-like string (like ' 123 ') can be converted to a number. // where null/undefined or other string will be converted to NaN. return value == null || value === '' ? NaN // If string (like '-'), using '+' parse to NaN // If object, also parse to NaN : Number(value); } ; var valueParserMap = Object(core_util["createHashMap"])({ 'number': function (val) { // Do not use `numericToNumber` here. We have `numericToNumber` by default. // Here the number parser can have loose rule: // enable to cut suffix: "120px" => 120, "14%" => 14. return parseFloat(val); }, 'time': function (val) { // return timestamp. return +parseDate(val); }, 'trim': function (val) { return Object(core_util["isString"])(val) ? Object(core_util["trim"])(val) : val; } }); function getRawValueParser(type) { return valueParserMap.get(type); } var ORDER_COMPARISON_OP_MAP = { lt: function (lval, rval) { return lval < rval; }, lte: function (lval, rval) { return lval <= rval; }, gt: function (lval, rval) { return lval > rval; }, gte: function (lval, rval) { return lval >= rval; } }; var dataValueHelper_FilterOrderComparator = /** @class */function () { function FilterOrderComparator(op, rval) { if (!Object(core_util["isNumber"])(rval)) { var errMsg = ''; if (false) { errMsg = 'rvalue of "<", ">", "<=", ">=" can only be number in filter.'; } throwError(errMsg); } this._opFn = ORDER_COMPARISON_OP_MAP[op]; this._rvalFloat = numericToNumber(rval); } // Performance sensitive. FilterOrderComparator.prototype.evaluate = function (lval) { // Most cases is 'number', and typeof maybe 10 times faseter than parseFloat. return Object(core_util["isNumber"])(lval) ? this._opFn(lval, this._rvalFloat) : this._opFn(numericToNumber(lval), this._rvalFloat); }; return FilterOrderComparator; }(); var dataValueHelper_SortOrderComparator = /** @class */function () { /** * @param order by default: 'asc' * @param incomparable by default: Always on the tail. * That is, if 'asc' => 'max', if 'desc' => 'min' * See the definition of "incomparable" in [SORT_COMPARISON_RULE]. */ function SortOrderComparator(order, incomparable) { var isDesc = order === 'desc'; this._resultLT = isDesc ? 1 : -1; if (incomparable == null) { incomparable = isDesc ? 'min' : 'max'; } this._incomparable = incomparable === 'min' ? -Infinity : Infinity; } // See [SORT_COMPARISON_RULE]. // Performance sensitive. SortOrderComparator.prototype.evaluate = function (lval, rval) { // Most cases is 'number', and typeof maybe 10 times faseter than parseFloat. var lvalFloat = Object(core_util["isNumber"])(lval) ? lval : numericToNumber(lval); var rvalFloat = Object(core_util["isNumber"])(rval) ? rval : numericToNumber(rval); var lvalNotNumeric = isNaN(lvalFloat); var rvalNotNumeric = isNaN(rvalFloat); if (lvalNotNumeric) { lvalFloat = this._incomparable; } if (rvalNotNumeric) { rvalFloat = this._incomparable; } if (lvalNotNumeric && rvalNotNumeric) { var lvalIsStr = Object(core_util["isString"])(lval); var rvalIsStr = Object(core_util["isString"])(rval); if (lvalIsStr) { lvalFloat = rvalIsStr ? lval : 0; } if (rvalIsStr) { rvalFloat = lvalIsStr ? rval : 0; } } return lvalFloat < rvalFloat ? this._resultLT : lvalFloat > rvalFloat ? -this._resultLT : 0; }; return SortOrderComparator; }(); var dataValueHelper_FilterEqualityComparator = /** @class */function () { function FilterEqualityComparator(isEq, rval) { this._rval = rval; this._isEQ = isEq; this._rvalTypeof = typeof rval; this._rvalFloat = numericToNumber(rval); } // Performance sensitive. FilterEqualityComparator.prototype.evaluate = function (lval) { var eqResult = lval === this._rval; if (!eqResult) { var lvalTypeof = typeof lval; if (lvalTypeof !== this._rvalTypeof && (lvalTypeof === 'number' || this._rvalTypeof === 'number')) { eqResult = numericToNumber(lval) === this._rvalFloat; } } return this._isEQ ? eqResult : !eqResult; }; return FilterEqualityComparator; }(); /** * [FILTER_COMPARISON_RULE] * `lt`|`lte`|`gt`|`gte`: * + rval must be a number. And lval will be converted to number (`numericToNumber`) to compare. * `eq`: * + If same type, compare with `===`. * + If there is one number, convert to number (`numericToNumber`) to compare. * + Else return `false`. * `ne`: * + Not `eq`. * * * [SORT_COMPARISON_RULE] * All the values are grouped into three categories: * + "numeric" (number and numeric string) * + "non-numeric-string" (string that excluding numeric string) * + "others" * "numeric" vs "numeric": values are ordered by number order. * "non-numeric-string" vs "non-numeric-string": values are ordered by ES spec (#sec-abstract-relational-comparison). * "others" vs "others": do not change order (always return 0). * "numeric" vs "non-numeric-string": "non-numeric-string" is treated as "incomparable". * "number" vs "others": "others" is treated as "incomparable". * "non-numeric-string" vs "others": "others" is treated as "incomparable". * "incomparable" will be seen as -Infinity or Infinity (depends on the settings). * MEMO: * Non-numeric string sort makes sense when we need to put the items with the same tag together. * But if we support string sort, we still need to avoid the misleading like `'2' > '12'`, * So we treat "numeric-string" sorted by number order rather than string comparison. * * * [CHECK_LIST_OF_THE_RULE_DESIGN] * + Do not support string comparison until required. And also need to * avoid the misleading of "2" > "12". * + Should avoid the misleading case: * `" 22 " gte "22"` is `true` but `" 22 " eq "22"` is `false`. * + JS bad case should be avoided: null <= 0, [] <= 0, ' ' <= 0, ... * + Only "numeric" can be converted to comparable number, otherwise converted to NaN. * See `util/number.ts#numericToNumber`. * * @return If `op` is not `RelationalOperator`, return null; */ function createFilterComparator(op, rval) { return op === 'eq' || op === 'ne' ? new dataValueHelper_FilterEqualityComparator(op === 'eq', rval) : Object(core_util["hasOwn"])(ORDER_COMPARISON_OP_MAP, op) ? new dataValueHelper_FilterOrderComparator(op, rval) : null; } // CONCATENATED MODULE: ./node_modules/echarts/lib/data/helper/transform.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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: disable writable. * This structure will be exposed to users. */ var transform_ExternalSource = /** @class */function () { function ExternalSource() {} ExternalSource.prototype.getRawData = function () { // Only built-in transform available. throw new Error('not supported'); }; ExternalSource.prototype.getRawDataItem = function (dataIndex) { // Only built-in transform available. throw new Error('not supported'); }; ExternalSource.prototype.cloneRawData = function () { return; }; /** * @return If dimension not found, return null/undefined. */ ExternalSource.prototype.getDimensionInfo = function (dim) { return; }; /** * dimensions defined if and only if either: * (a) dataset.dimensions are declared. * (b) dataset data include dimensions definitions in data (detected or via specified `sourceHeader`). * If dimensions are defined, `dimensionInfoAll` is corresponding to * the defined dimensions. * Otherwise, `dimensionInfoAll` is determined by data columns. * @return Always return an array (even empty array). */ ExternalSource.prototype.cloneAllDimensionInfo = function () { return; }; ExternalSource.prototype.count = function () { return; }; /** * Only support by dimension index. * No need to support by dimension name in transform function, * because transform function is not case-specific, no need to use name literally. */ ExternalSource.prototype.retrieveValue = function (dataIndex, dimIndex) { return; }; ExternalSource.prototype.retrieveValueFromItem = function (dataItem, dimIndex) { return; }; ExternalSource.prototype.convertValue = function (rawVal, dimInfo) { return parseDataValue(rawVal, dimInfo); }; return ExternalSource; }(); function createExternalSource(internalSource, externalTransform) { var extSource = new transform_ExternalSource(); var data = internalSource.data; var sourceFormat = extSource.sourceFormat = internalSource.sourceFormat; var sourceHeaderCount = internalSource.startIndex; var errMsg = ''; if (internalSource.seriesLayoutBy !== SERIES_LAYOUT_BY_COLUMN) { // For the logic simplicity in transformer, only 'culumn' is // supported in data transform. Otherwise, the `dimensionsDefine` // might be detected by 'row', which probably confuses users. if (false) { errMsg = '`seriesLayoutBy` of upstream dataset can only be "column" in data transform.'; } throwError(errMsg); } // [MEMO] // Create a new dimensions structure for exposing. // Do not expose all dimension info to users directly. // Because the dimension is probably auto detected from data and not might reliable. // Should not lead the transformers to think that is reliable and return it. // See [DIMENSION_INHERIT_RULE] in `sourceManager.ts`. var dimensions = []; var dimsByName = {}; var dimsDef = internalSource.dimensionsDefine; if (dimsDef) { Object(core_util["each"])(dimsDef, function (dimDef, idx) { var name = dimDef.name; var dimDefExt = { index: idx, name: name, displayName: dimDef.displayName }; dimensions.push(dimDefExt); // Users probably do not specify dimension name. For simplicity, data transform // does not generate dimension name. if (name != null) { // Dimension name should not be duplicated. // For simplicity, data transform forbids name duplication, do not generate // new name like module `completeDimensions.ts` did, but just tell users. var errMsg_1 = ''; if (Object(core_util["hasOwn"])(dimsByName, name)) { if (false) { errMsg_1 = 'dimension name "' + name + '" duplicated.'; } throwError(errMsg_1); } dimsByName[name] = dimDefExt; } }); } // If dimension definitions are not defined and can not be detected. // e.g., pure data `[[11, 22], ...]`. else { for (var i = 0; i < internalSource.dimensionsDetectedCount || 0; i++) { // Do not generete name or anything others. The consequence process in // `transform` or `series` probably have there own name generation strategry. dimensions.push({ index: i }); } } // Implement public methods: var rawItemGetter = getRawSourceItemGetter(sourceFormat, SERIES_LAYOUT_BY_COLUMN); if (externalTransform.__isBuiltIn) { extSource.getRawDataItem = function (dataIndex) { return rawItemGetter(data, sourceHeaderCount, dimensions, dataIndex); }; extSource.getRawData = Object(core_util["bind"])(getRawData, null, internalSource); } extSource.cloneRawData = Object(core_util["bind"])(cloneRawData, null, internalSource); var rawCounter = getRawSourceDataCounter(sourceFormat, SERIES_LAYOUT_BY_COLUMN); extSource.count = Object(core_util["bind"])(rawCounter, null, data, sourceHeaderCount, dimensions); var rawValueGetter = getRawSourceValueGetter(sourceFormat); extSource.retrieveValue = function (dataIndex, dimIndex) { var rawItem = rawItemGetter(data, sourceHeaderCount, dimensions, dataIndex); return retrieveValueFromItem(rawItem, dimIndex); }; var retrieveValueFromItem = extSource.retrieveValueFromItem = function (dataItem, dimIndex) { if (dataItem == null) { return; } var dimDef = dimensions[dimIndex]; // When `dimIndex` is `null`, `rawValueGetter` return the whole item. if (dimDef) { return rawValueGetter(dataItem, dimIndex, dimDef.name); } }; extSource.getDimensionInfo = Object(core_util["bind"])(getDimensionInfo, null, dimensions, dimsByName); extSource.cloneAllDimensionInfo = Object(core_util["bind"])(cloneAllDimensionInfo, null, dimensions); return extSource; } function getRawData(upstream) { var sourceFormat = upstream.sourceFormat; if (!isSupportedSourceFormat(sourceFormat)) { var errMsg = ''; if (false) { errMsg = '`getRawData` is not supported in source format ' + sourceFormat; } throwError(errMsg); } return upstream.data; } function cloneRawData(upstream) { var sourceFormat = upstream.sourceFormat; var data = upstream.data; if (!isSupportedSourceFormat(sourceFormat)) { var errMsg = ''; if (false) { errMsg = '`cloneRawData` is not supported in source format ' + sourceFormat; } throwError(errMsg); } if (sourceFormat === SOURCE_FORMAT_ARRAY_ROWS) { var result = []; for (var i = 0, len = data.length; i < len; i++) { // Not strictly clone for performance result.push(data[i].slice()); } return result; } else if (sourceFormat === SOURCE_FORMAT_OBJECT_ROWS) { var result = []; for (var i = 0, len = data.length; i < len; i++) { // Not strictly clone for performance result.push(Object(core_util["extend"])({}, data[i])); } return result; } } function getDimensionInfo(dimensions, dimsByName, dim) { if (dim == null) { return; } // Keep the same logic as `List::getDimension` did. if (Object(core_util["isNumber"])(dim) // If being a number-like string but not being defined a dimension name. || !isNaN(dim) && !Object(core_util["hasOwn"])(dimsByName, dim)) { return dimensions[dim]; } else if (Object(core_util["hasOwn"])(dimsByName, dim)) { return dimsByName[dim]; } } function cloneAllDimensionInfo(dimensions) { return Object(core_util["clone"])(dimensions); } var externalTransformMap = Object(core_util["createHashMap"])(); function registerExternalTransform(externalTransform) { externalTransform = Object(core_util["clone"])(externalTransform); var type = externalTransform.type; var errMsg = ''; if (!type) { if (false) { errMsg = 'Must have a `type` when `registerTransform`.'; } throwError(errMsg); } var typeParsed = type.split(':'); if (typeParsed.length !== 2) { if (false) { errMsg = 'Name must include namespace like "ns:regression".'; } throwError(errMsg); } // Namespace 'echarts:xxx' is official namespace, where the transforms should // be called directly via 'xxx' rather than 'echarts:xxx'. var isBuiltIn = false; if (typeParsed[0] === 'echarts') { type = typeParsed[1]; isBuiltIn = true; } externalTransform.__isBuiltIn = isBuiltIn; externalTransformMap.set(type, externalTransform); } function applyDataTransform(rawTransOption, sourceList, infoForPrint) { var pipedTransOption = normalizeToArray(rawTransOption); var pipeLen = pipedTransOption.length; var errMsg = ''; if (!pipeLen) { if (false) { errMsg = 'If `transform` declared, it should at least contain one transform.'; } throwError(errMsg); } for (var i = 0, len = pipeLen; i < len; i++) { var transOption = pipedTransOption[i]; sourceList = applySingleDataTransform(transOption, sourceList, infoForPrint, pipeLen === 1 ? null : i); // piped transform only support single input, except the fist one. // piped transform only support single output, except the last one. if (i !== len - 1) { sourceList.length = Math.max(sourceList.length, 1); } } return sourceList; } function applySingleDataTransform(transOption, upSourceList, infoForPrint, // If `pipeIndex` is null/undefined, no piped transform. pipeIndex) { var errMsg = ''; if (!upSourceList.length) { if (false) { errMsg = 'Must have at least one upstream dataset.'; } throwError(errMsg); } if (!Object(core_util["isObject"])(transOption)) { if (false) { errMsg = 'transform declaration must be an object rather than ' + typeof transOption + '.'; } throwError(errMsg); } var transType = transOption.type; var externalTransform = externalTransformMap.get(transType); if (!externalTransform) { if (false) { errMsg = 'Can not find transform on type "' + transType + '".'; } throwError(errMsg); } // Prepare source var extUpSourceList = Object(core_util["map"])(upSourceList, function (upSource) { return createExternalSource(upSource, externalTransform); }); var resultList = normalizeToArray(externalTransform.transform({ upstream: extUpSourceList[0], upstreamList: extUpSourceList, config: Object(core_util["clone"])(transOption.config) })); if (false) { if (transOption.print) { var printStrArr = map(resultList, function (extSource) { var pipeIndexStr = pipeIndex != null ? ' === pipe index: ' + pipeIndex : ''; return ['=== dataset index: ' + infoForPrint.datasetIndex + pipeIndexStr + ' ===', '- transform result data:', makePrintable(extSource.data), '- transform result dimensions:', makePrintable(extSource.dimensions)].join('\n'); }).join('\n'); log(printStrArr); } } return Object(core_util["map"])(resultList, function (result, resultIndex) { var errMsg = ''; if (!Object(core_util["isObject"])(result)) { if (false) { errMsg = 'A transform should not return some empty results.'; } throwError(errMsg); } if (!result.data) { if (false) { errMsg = 'Transform result data should be not be null or undefined'; } throwError(errMsg); } var sourceFormat = detectSourceFormat(result.data); if (!isSupportedSourceFormat(sourceFormat)) { if (false) { errMsg = 'Transform result data should be array rows or object rows.'; } throwError(errMsg); } var resultMetaRawOption; var firstUpSource = upSourceList[0]; /** * Intuitively, the end users known the content of the original `dataset.source`, * calucating the transform result in mind. * Suppose the original `dataset.source` is: * ```js * [ * ['product', '2012', '2013', '2014', '2015'], * ['AAA', 41.1, 30.4, 65.1, 53.3], * ['BBB', 86.5, 92.1, 85.7, 83.1], * ['CCC', 24.1, 67.2, 79.5, 86.4] * ] * ``` * The dimension info have to be detected from the source data. * Some of the transformers (like filter, sort) will follow the dimension info * of upstream, while others use new dimensions (like aggregate). * Transformer can output a field `dimensions` to define the its own output dimensions. * We also allow transformers to ignore the output `dimensions` field, and * inherit the upstream dimensions definition. It can reduce the burden of handling * dimensions in transformers. * * See also [DIMENSION_INHERIT_RULE] in `sourceManager.ts`. */ if (firstUpSource && resultIndex === 0 // If transformer returns `dimensions`, it means that the transformer has different // dimensions definitions. We do not inherit anything from upstream. && !result.dimensions) { var startIndex = firstUpSource.startIndex; // We copy the header of upstream to the result, because: // (1) The returned data always does not contain header line and can not be used // as dimension-detection. In this case we can not use "detected dimensions" of // upstream directly, because it might be detected based on different `seriesLayoutBy`. // (2) We should support that the series read the upstream source in `seriesLayoutBy: 'row'`. // So the original detected header should be add to the result, otherwise they can not be read. if (startIndex) { result.data = firstUpSource.data.slice(0, startIndex).concat(result.data); } resultMetaRawOption = { seriesLayoutBy: SERIES_LAYOUT_BY_COLUMN, sourceHeader: startIndex, dimensions: firstUpSource.metaRawOption.dimensions }; } else { resultMetaRawOption = { seriesLayoutBy: SERIES_LAYOUT_BY_COLUMN, sourceHeader: 0, dimensions: result.dimensions }; } return createSource(result.data, resultMetaRawOption, null); }); } function isSupportedSourceFormat(sourceFormat) { return sourceFormat === SOURCE_FORMAT_ARRAY_ROWS || sourceFormat === SOURCE_FORMAT_OBJECT_ROWS; } // CONCATENATED MODULE: ./node_modules/echarts/lib/data/DataStore.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 UNDEFINED = 'undefined'; /* global Float64Array, Int32Array, Uint32Array, Uint16Array */ // Caution: MUST not use `new CtorUint32Array(arr, 0, len)`, because the Ctor of array is // different from the Ctor of typed array. var CtorUint32Array = typeof Uint32Array === UNDEFINED ? Array : Uint32Array; var CtorUint16Array = typeof Uint16Array === UNDEFINED ? Array : Uint16Array; var CtorInt32Array = typeof Int32Array === UNDEFINED ? Array : Int32Array; var CtorFloat64Array = typeof Float64Array === UNDEFINED ? Array : Float64Array; /** * Multi dimensional data store */ var dataCtors = { 'float': CtorFloat64Array, 'int': CtorInt32Array, // Ordinal data type can be string or int 'ordinal': Array, 'number': Array, 'time': CtorFloat64Array }; var defaultDimValueGetters; function getIndicesCtor(rawCount) { // The possible max value in this._indicies is always this._rawCount despite of filtering. return rawCount > 65535 ? CtorUint32Array : CtorUint16Array; } ; function getInitialExtent() { return [Infinity, -Infinity]; } ; function cloneChunk(originalChunk) { var Ctor = originalChunk.constructor; // Only shallow clone is enough when Array. return Ctor === Array ? originalChunk.slice() : new Ctor(originalChunk); } function prepareStore(store, dimIdx, dimType, end, append) { var DataCtor = dataCtors[dimType || 'float']; if (append) { var oldStore = store[dimIdx]; var oldLen = oldStore && oldStore.length; if (!(oldLen === end)) { var newStore = new DataCtor(end); // The cost of the copy is probably inconsiderable // within the initial chunkSize. for (var j = 0; j < oldLen; j++) { newStore[j] = oldStore[j]; } store[dimIdx] = newStore; } } else { store[dimIdx] = new DataCtor(end); } } ; /** * Basically, DataStore API keep immutable. */ var DataStore_DataStore = /** @class */function () { function DataStore() { this._chunks = []; // It will not be calculated until needed. this._rawExtent = []; this._extent = []; this._count = 0; this._rawCount = 0; this._calcDimNameToIdx = Object(core_util["createHashMap"])(); } /** * Initialize from data */ DataStore.prototype.initData = function (provider, inputDimensions, dimValueGetter) { if (false) { assert(isFunction(provider.getItem) && isFunction(provider.count), 'Invalid data provider.'); } this._provider = provider; // Clear this._chunks = []; this._indices = null; this.getRawIndex = this._getRawIdxIdentity; var source = provider.getSource(); var defaultGetter = this.defaultDimValueGetter = defaultDimValueGetters[source.sourceFormat]; // Default dim value getter this._dimValueGetter = dimValueGetter || defaultGetter; // Reset raw extent. this._rawExtent = []; var willRetrieveDataByName = shouldRetrieveDataByName(source); this._dimensions = Object(core_util["map"])(inputDimensions, function (dim) { if (false) { if (willRetrieveDataByName) { assert(dim.property != null); } } return { // Only pick these two props. Not leak other properties like orderMeta. type: dim.type, property: dim.property }; }); this._initDataFromProvider(0, provider.count()); }; DataStore.prototype.getProvider = function () { return this._provider; }; /** * Caution: even when a `source` instance owned by a series, the created data store * may still be shared by different sereis (the source hash does not use all `source` * props, see `sourceManager`). In this case, the `source` props that are not used in * hash (like `source.dimensionDefine`) probably only belongs to a certain series and * thus should not be fetch here. */ DataStore.prototype.getSource = function () { return this._provider.getSource(); }; /** * @caution Only used in dataStack. */ DataStore.prototype.ensureCalculationDimension = function (dimName, type) { var calcDimNameToIdx = this._calcDimNameToIdx; var dimensions = this._dimensions; var calcDimIdx = calcDimNameToIdx.get(dimName); if (calcDimIdx != null) { if (dimensions[calcDimIdx].type === type) { return calcDimIdx; } } else { calcDimIdx = dimensions.length; } dimensions[calcDimIdx] = { type: type }; calcDimNameToIdx.set(dimName, calcDimIdx); this._chunks[calcDimIdx] = new dataCtors[type || 'float'](this._rawCount); this._rawExtent[calcDimIdx] = getInitialExtent(); return calcDimIdx; }; DataStore.prototype.collectOrdinalMeta = function (dimIdx, ordinalMeta) { var chunk = this._chunks[dimIdx]; var dim = this._dimensions[dimIdx]; var rawExtents = this._rawExtent; var offset = dim.ordinalOffset || 0; var len = chunk.length; if (offset === 0) { // We need to reset the rawExtent if collect is from start. // Because this dimension may be guessed as number and calcuating a wrong extent. rawExtents[dimIdx] = getInitialExtent(); } var dimRawExtent = rawExtents[dimIdx]; // Parse from previous data offset. len may be changed after appendData for (var i = offset; i < len; i++) { var val = chunk[i] = ordinalMeta.parseAndCollect(chunk[i]); if (!isNaN(val)) { dimRawExtent[0] = Math.min(val, dimRawExtent[0]); dimRawExtent[1] = Math.max(val, dimRawExtent[1]); } } dim.ordinalMeta = ordinalMeta; dim.ordinalOffset = len; dim.type = 'ordinal'; // Force to be ordinal }; DataStore.prototype.getOrdinalMeta = function (dimIdx) { var dimInfo = this._dimensions[dimIdx]; var ordinalMeta = dimInfo.ordinalMeta; return ordinalMeta; }; DataStore.prototype.getDimensionProperty = function (dimIndex) { var item = this._dimensions[dimIndex]; return item && item.property; }; /** * Caution: Can be only called on raw data (before `this._indices` created). */ DataStore.prototype.appendData = function (data) { if (false) { assert(!this._indices, 'appendData can only be called on raw data.'); } var provider = this._provider; var start = this.count(); provider.appendData(data); var end = provider.count(); if (!provider.persistent) { end += start; } if (start < end) { this._initDataFromProvider(start, end, true); } return [start, end]; }; DataStore.prototype.appendValues = function (values, minFillLen) { var chunks = this._chunks; var dimensions = this._dimensions; var dimLen = dimensions.length; var rawExtent = this._rawExtent; var start = this.count(); var end = start + Math.max(values.length, minFillLen || 0); for (var i = 0; i < dimLen; i++) { var dim = dimensions[i]; prepareStore(chunks, i, dim.type, end, true); } var emptyDataItem = []; for (var idx = start; idx < end; idx++) { var sourceIdx = idx - start; // Store the data by dimensions for (var dimIdx = 0; dimIdx < dimLen; dimIdx++) { var dim = dimensions[dimIdx]; var val = defaultDimValueGetters.arrayRows.call(this, values[sourceIdx] || emptyDataItem, dim.property, sourceIdx, dimIdx); chunks[dimIdx][idx] = val; var dimRawExtent = rawExtent[dimIdx]; val < dimRawExtent[0] && (dimRawExtent[0] = val); val > dimRawExtent[1] && (dimRawExtent[1] = val); } } this._rawCount = this._count = end; return { start: start, end: end }; }; DataStore.prototype._initDataFromProvider = function (start, end, append) { var provider = this._provider; var chunks = this._chunks; var dimensions = this._dimensions; var dimLen = dimensions.length; var rawExtent = this._rawExtent; var dimNames = Object(core_util["map"])(dimensions, function (dim) { return dim.property; }); for (var i = 0; i < dimLen; i++) { var dim = dimensions[i]; if (!rawExtent[i]) { rawExtent[i] = getInitialExtent(); } prepareStore(chunks, i, dim.type, end, append); } if (provider.fillStorage) { provider.fillStorage(start, end, chunks, rawExtent); } else { var dataItem = []; for (var idx = start; idx < end; idx++) { // NOTICE: Try not to write things into dataItem dataItem = provider.getItem(idx, dataItem); // Each data item is value // [1, 2] // 2 // Bar chart, line chart which uses category axis // only gives the 'y' value. 'x' value is the indices of category // Use a tempValue to normalize the value to be a (x, y) value // Store the data by dimensions for (var dimIdx = 0; dimIdx < dimLen; dimIdx++) { var dimStorage = chunks[dimIdx]; // PENDING NULL is empty or zero var val = this._dimValueGetter(dataItem, dimNames[dimIdx], idx, dimIdx); dimStorage[idx] = val; var dimRawExtent = rawExtent[dimIdx]; val < dimRawExtent[0] && (dimRawExtent[0] = val); val > dimRawExtent[1] && (dimRawExtent[1] = val); } } } if (!provider.persistent && provider.clean) { // Clean unused data if data source is typed array. provider.clean(); } this._rawCount = this._count = end; // Reset data extent this._extent = []; }; DataStore.prototype.count = function () { return this._count; }; /** * Get value. Return NaN if idx is out of range. */ DataStore.prototype.get = function (dim, idx) { if (!(idx >= 0 && idx < this._count)) { return NaN; } var dimStore = this._chunks[dim]; return dimStore ? dimStore[this.getRawIndex(idx)] : NaN; }; DataStore.prototype.getValues = function (dimensions, idx) { var values = []; var dimArr = []; if (idx == null) { idx = dimensions; // TODO get all from store? dimensions = []; // All dimensions for (var i = 0; i < this._dimensions.length; i++) { dimArr.push(i); } } else { dimArr = dimensions; } for (var i = 0, len = dimArr.length; i < len; i++) { values.push(this.get(dimArr[i], idx)); } return values; }; /** * @param dim concrete dim */ DataStore.prototype.getByRawIndex = function (dim, rawIdx) { if (!(rawIdx >= 0 && rawIdx < this._rawCount)) { return NaN; } var dimStore = this._chunks[dim]; return dimStore ? dimStore[rawIdx] : NaN; }; /** * Get sum of data in one dimension */ DataStore.prototype.getSum = function (dim) { var dimData = this._chunks[dim]; var sum = 0; if (dimData) { for (var i = 0, len = this.count(); i < len; i++) { var value = this.get(dim, i); if (!isNaN(value)) { sum += value; } } } return sum; }; /** * Get median of data in one dimension */ DataStore.prototype.getMedian = function (dim) { var dimDataArray = []; // map all data of one dimension this.each([dim], function (val) { if (!isNaN(val)) { dimDataArray.push(val); } }); // TODO // Use quick select? var sortedDimDataArray = dimDataArray.sort(function (a, b) { return a - b; }); var len = this.count(); // calculate median return len === 0 ? 0 : len % 2 === 1 ? sortedDimDataArray[(len - 1) / 2] : (sortedDimDataArray[len / 2] + sortedDimDataArray[len / 2 - 1]) / 2; }; /** * Retrieve the index with given raw data index. */ DataStore.prototype.indexOfRawIndex = function (rawIndex) { if (rawIndex >= this._rawCount || rawIndex < 0) { return -1; } if (!this._indices) { return rawIndex; } // Indices are ascending var indices = this._indices; // If rawIndex === dataIndex var rawDataIndex = indices[rawIndex]; if (rawDataIndex != null && rawDataIndex < this._count && rawDataIndex === rawIndex) { return rawIndex; } var left = 0; var right = this._count - 1; while (left <= right) { var mid = (left + right) / 2 | 0; if (indices[mid] < rawIndex) { left = mid + 1; } else if (indices[mid] > rawIndex) { right = mid - 1; } else { return mid; } } return -1; }; /** * Retrieve the index of nearest value. * @param dim * @param value * @param [maxDistance=Infinity] * @return If and only if multiple indices have * the same value, they are put to the result. */ DataStore.prototype.indicesOfNearest = function (dim, value, maxDistance) { var chunks = this._chunks; var dimData = chunks[dim]; var nearestIndices = []; if (!dimData) { return nearestIndices; } if (maxDistance == null) { maxDistance = Infinity; } var minDist = Infinity; var minDiff = -1; var nearestIndicesLen = 0; // Check the test case of `test/ut/spec/data/SeriesData.js`. for (var i = 0, len = this.count(); i < len; i++) { var dataIndex = this.getRawIndex(i); var diff = value - dimData[dataIndex]; var dist = Math.abs(diff); if (dist <= maxDistance) { // When the `value` is at the middle of `this.get(dim, i)` and `this.get(dim, i+1)`, // we'd better not push both of them to `nearestIndices`, otherwise it is easy to // get more than one item in `nearestIndices` (more specifically, in `tooltip`). // So we choose the one that `diff >= 0` in this case. // But if `this.get(dim, i)` and `this.get(dim, j)` get the same value, both of them // should be push to `nearestIndices`. if (dist < minDist || dist === minDist && diff >= 0 && minDiff < 0) { minDist = dist; minDiff = diff; nearestIndicesLen = 0; } if (diff === minDiff) { nearestIndices[nearestIndicesLen++] = i; } } } nearestIndices.length = nearestIndicesLen; return nearestIndices; }; DataStore.prototype.getIndices = function () { var newIndices; var indices = this._indices; if (indices) { var Ctor = indices.constructor; var thisCount = this._count; // `new Array(a, b, c)` is different from `new Uint32Array(a, b, c)`. if (Ctor === Array) { newIndices = new Ctor(thisCount); for (var i = 0; i < thisCount; i++) { newIndices[i] = indices[i]; } } else { newIndices = new Ctor(indices.buffer, 0, thisCount); } } else { var Ctor = getIndicesCtor(this._rawCount); newIndices = new Ctor(this.count()); for (var i = 0; i < newIndices.length; i++) { newIndices[i] = i; } } return newIndices; }; /** * Data filter. */ DataStore.prototype.filter = function (dims, cb) { if (!this._count) { return this; } var newStore = this.clone(); var count = newStore.count(); var Ctor = getIndicesCtor(newStore._rawCount); var newIndices = new Ctor(count); var value = []; var dimSize = dims.length; var offset = 0; var dim0 = dims[0]; var chunks = newStore._chunks; for (var i = 0; i < count; i++) { var keep = void 0; var rawIdx = newStore.getRawIndex(i); // Simple optimization if (dimSize === 0) { keep = cb(i); } else if (dimSize === 1) { var val = chunks[dim0][rawIdx]; keep = cb(val, i); } else { var k = 0; for (; k < dimSize; k++) { value[k] = chunks[dims[k]][rawIdx]; } value[k] = i; keep = cb.apply(null, value); } if (keep) { newIndices[offset++] = rawIdx; } } // Set indices after filtered. if (offset < count) { newStore._indices = newIndices; } newStore._count = offset; // Reset data extent newStore._extent = []; newStore._updateGetRawIdx(); return newStore; }; /** * Select data in range. (For optimization of filter) * (Manually inline code, support 5 million data filtering in data zoom.) */ DataStore.prototype.selectRange = function (range) { var newStore = this.clone(); var len = newStore._count; if (!len) { return this; } var dims = Object(core_util["keys"])(range); var dimSize = dims.length; if (!dimSize) { return this; } var originalCount = newStore.count(); var Ctor = getIndicesCtor(newStore._rawCount); var newIndices = new Ctor(originalCount); var offset = 0; var dim0 = dims[0]; var min = range[dim0][0]; var max = range[dim0][1]; var storeArr = newStore._chunks; var quickFinished = false; if (!newStore._indices) { // Extreme optimization for common case. About 2x faster in chrome. var idx = 0; if (dimSize === 1) { var dimStorage = storeArr[dims[0]]; for (var i = 0; i < len; i++) { var val = dimStorage[i]; // NaN will not be filtered. Consider the case, in line chart, empty // value indicates the line should be broken. But for the case like // scatter plot, a data item with empty value will not be rendered, // but the axis extent may be effected if some other dim of the data // item has value. Fortunately it is not a significant negative effect. if (val >= min && val <= max || isNaN(val)) { newIndices[offset++] = idx; } idx++; } quickFinished = true; } else if (dimSize === 2) { var dimStorage = storeArr[dims[0]]; var dimStorage2 = storeArr[dims[1]]; var min2 = range[dims[1]][0]; var max2 = range[dims[1]][1]; for (var i = 0; i < len; i++) { var val = dimStorage[i]; var val2 = dimStorage2[i]; // Do not filter NaN, see comment above. if ((val >= min && val <= max || isNaN(val)) && (val2 >= min2 && val2 <= max2 || isNaN(val2))) { newIndices[offset++] = idx; } idx++; } quickFinished = true; } } if (!quickFinished) { if (dimSize === 1) { for (var i = 0; i < originalCount; i++) { var rawIndex = newStore.getRawIndex(i); var val = storeArr[dims[0]][rawIndex]; // Do not filter NaN, see comment above. if (val >= min && val <= max || isNaN(val)) { newIndices[offset++] = rawIndex; } } } else { for (var i = 0; i < originalCount; i++) { var keep = true; var rawIndex = newStore.getRawIndex(i); for (var k = 0; k < dimSize; k++) { var dimk = dims[k]; var val = storeArr[dimk][rawIndex]; // Do not filter NaN, see comment above. if (val < range[dimk][0] || val > range[dimk][1]) { keep = false; } } if (keep) { newIndices[offset++] = newStore.getRawIndex(i); } } } } // Set indices after filtered. if (offset < originalCount) { newStore._indices = newIndices; } newStore._count = offset; // Reset data extent newStore._extent = []; newStore._updateGetRawIdx(); return newStore; }; // /** // * Data mapping to a plain array // */ // mapArray(dims: DimensionIndex[], cb: MapArrayCb): any[] { // const result: any[] = []; // this.each(dims, function () { // result.push(cb && (cb as MapArrayCb).apply(null, arguments)); // }); // return result; // } /** * Data mapping to a new List with given dimensions */ DataStore.prototype.map = function (dims, cb) { // TODO only clone picked chunks. var target = this.clone(dims); this._updateDims(target, dims, cb); return target; }; /** * @caution Danger!! Only used in dataStack. */ DataStore.prototype.modify = function (dims, cb) { this._updateDims(this, dims, cb); }; DataStore.prototype._updateDims = function (target, dims, cb) { var targetChunks = target._chunks; var tmpRetValue = []; var dimSize = dims.length; var dataCount = target.count(); var values = []; var rawExtent = target._rawExtent; for (var i = 0; i < dims.length; i++) { rawExtent[dims[i]] = getInitialExtent(); } for (var dataIndex = 0; dataIndex < dataCount; dataIndex++) { var rawIndex = target.getRawIndex(dataIndex); for (var k = 0; k < dimSize; k++) { values[k] = targetChunks[dims[k]][rawIndex]; } values[dimSize] = dataIndex; var retValue = cb && cb.apply(null, values); if (retValue != null) { // a number or string (in oridinal dimension)? if (typeof retValue !== 'object') { tmpRetValue[0] = retValue; retValue = tmpRetValue; } for (var i = 0; i < retValue.length; i++) { var dim = dims[i]; var val = retValue[i]; var rawExtentOnDim = rawExtent[dim]; var dimStore = targetChunks[dim]; if (dimStore) { dimStore[rawIndex] = val; } if (val < rawExtentOnDim[0]) { rawExtentOnDim[0] = val; } if (val > rawExtentOnDim[1]) { rawExtentOnDim[1] = val; } } } } }; /** * Large data down sampling using largest-triangle-three-buckets * @param {string} valueDimension * @param {number} targetCount */ DataStore.prototype.lttbDownSample = function (valueDimension, rate) { var target = this.clone([valueDimension], true); var targetStorage = target._chunks; var dimStore = targetStorage[valueDimension]; var len = this.count(); var sampledIndex = 0; var frameSize = Math.floor(1 / rate); var currentRawIndex = this.getRawIndex(0); var maxArea; var area; var nextRawIndex; var newIndices = new (getIndicesCtor(this._rawCount))(Math.min((Math.ceil(len / frameSize) + 2) * 2, len)); // First frame use the first data. newIndices[sampledIndex++] = currentRawIndex; for (var i = 1; i < len - 1; i += frameSize) { var nextFrameStart = Math.min(i + frameSize, len - 1); var nextFrameEnd = Math.min(i + frameSize * 2, len); var avgX = (nextFrameEnd + nextFrameStart) / 2; var avgY = 0; for (var idx = nextFrameStart; idx < nextFrameEnd; idx++) { var rawIndex = this.getRawIndex(idx); var y = dimStore[rawIndex]; if (isNaN(y)) { continue; } avgY += y; } avgY /= nextFrameEnd - nextFrameStart; var frameStart = i; var frameEnd = Math.min(i + frameSize, len); var pointAX = i - 1; var pointAY = dimStore[currentRawIndex]; maxArea = -1; nextRawIndex = frameStart; var firstNaNIndex = -1; var countNaN = 0; // Find a point from current frame that construct a triangle with largest area with previous selected point // And the average of next frame. for (var idx = frameStart; idx < frameEnd; idx++) { var rawIndex = this.getRawIndex(idx); var y = dimStore[rawIndex]; if (isNaN(y)) { countNaN++; if (firstNaNIndex < 0) { firstNaNIndex = rawIndex; } continue; } // Calculate triangle area over three buckets area = Math.abs((pointAX - avgX) * (y - pointAY) - (pointAX - idx) * (avgY - pointAY)); if (area > maxArea) { maxArea = area; nextRawIndex = rawIndex; // Next a is this b } } if (countNaN > 0 && countNaN < frameEnd - frameStart) { // Append first NaN point in every bucket. // It is necessary to ensure the correct order of indices. newIndices[sampledIndex++] = Math.min(firstNaNIndex, nextRawIndex); nextRawIndex = Math.max(firstNaNIndex, nextRawIndex); } newIndices[sampledIndex++] = nextRawIndex; currentRawIndex = nextRawIndex; // This a is the next a (chosen b) } // First frame use the last data. newIndices[sampledIndex++] = this.getRawIndex(len - 1); target._count = sampledIndex; target._indices = newIndices; target.getRawIndex = this._getRawIdx; return target; }; /** * Large data down sampling using min-max * @param {string} valueDimension * @param {number} rate */ DataStore.prototype.minmaxDownSample = function (valueDimension, rate) { var target = this.clone([valueDimension], true); var targetStorage = target._chunks; var frameSize = Math.floor(1 / rate); var dimStore = targetStorage[valueDimension]; var len = this.count(); // Each frame results in 2 data points, one for min and one for max var newIndices = new (getIndicesCtor(this._rawCount))(Math.ceil(len / frameSize) * 2); var offset = 0; for (var i = 0; i < len; i += frameSize) { var minIndex = i; var minValue = dimStore[this.getRawIndex(minIndex)]; var maxIndex = i; var maxValue = dimStore[this.getRawIndex(maxIndex)]; var thisFrameSize = frameSize; // Handle final smaller frame if (i + frameSize > len) { thisFrameSize = len - i; } // Determine min and max within the current frame for (var k = 0; k < thisFrameSize; k++) { var rawIndex = this.getRawIndex(i + k); var value = dimStore[rawIndex]; if (value < minValue) { minValue = value; minIndex = i + k; } if (value > maxValue) { maxValue = value; maxIndex = i + k; } } var rawMinIndex = this.getRawIndex(minIndex); var rawMaxIndex = this.getRawIndex(maxIndex); // Set the order of the min and max values, based on their ordering in the frame if (minIndex < maxIndex) { newIndices[offset++] = rawMinIndex; newIndices[offset++] = rawMaxIndex; } else { newIndices[offset++] = rawMaxIndex; newIndices[offset++] = rawMinIndex; } } target._count = offset; target._indices = newIndices; target._updateGetRawIdx(); return target; }; /** * Large data down sampling on given dimension * @param sampleIndex Sample index for name and id */ DataStore.prototype.downSample = function (dimension, rate, sampleValue, sampleIndex) { var target = this.clone([dimension], true); var targetStorage = target._chunks; var frameValues = []; var frameSize = Math.floor(1 / rate); var dimStore = targetStorage[dimension]; var len = this.count(); var rawExtentOnDim = target._rawExtent[dimension] = getInitialExtent(); var newIndices = new (getIndicesCtor(this._rawCount))(Math.ceil(len / frameSize)); var offset = 0; for (var i = 0; i < len; i += frameSize) { // Last frame if (frameSize > len - i) { frameSize = len - i; frameValues.length = frameSize; } for (var k = 0; k < frameSize; k++) { var dataIdx = this.getRawIndex(i + k); frameValues[k] = dimStore[dataIdx]; } var value = sampleValue(frameValues); var sampleFrameIdx = this.getRawIndex(Math.min(i + sampleIndex(frameValues, value) || 0, len - 1)); // Only write value on the filtered data dimStore[sampleFrameIdx] = value; if (value < rawExtentOnDim[0]) { rawExtentOnDim[0] = value; } if (value > rawExtentOnDim[1]) { rawExtentOnDim[1] = value; } newIndices[offset++] = sampleFrameIdx; } target._count = offset; target._indices = newIndices; target._updateGetRawIdx(); return target; }; /** * Data iteration * @param ctx default this * @example * list.each('x', function (x, idx) {}); * list.each(['x', 'y'], function (x, y, idx) {}); * list.each(function (idx) {}) */ DataStore.prototype.each = function (dims, cb) { if (!this._count) { return; } var dimSize = dims.length; var chunks = this._chunks; for (var i = 0, len = this.count(); i < len; i++) { var rawIdx = this.getRawIndex(i); // Simple optimization switch (dimSize) { case 0: cb(i); break; case 1: cb(chunks[dims[0]][rawIdx], i); break; case 2: cb(chunks[dims[0]][rawIdx], chunks[dims[1]][rawIdx], i); break; default: var k = 0; var value = []; for (; k < dimSize; k++) { value[k] = chunks[dims[k]][rawIdx]; } // Index value[k] = i; cb.apply(null, value); } } }; /** * Get extent of data in one dimension */ DataStore.prototype.getDataExtent = function (dim) { // Make sure use concrete dim as cache name. var dimData = this._chunks[dim]; var initialExtent = getInitialExtent(); if (!dimData) { return initialExtent; } // Make more strict checkings to ensure hitting cache. var currEnd = this.count(); // Consider the most cases when using data zoom, `getDataExtent` // happened before filtering. We cache raw extent, which is not // necessary to be cleared and recalculated when restore data. var useRaw = !this._indices; var dimExtent; if (useRaw) { return this._rawExtent[dim].slice(); } dimExtent = this._extent[dim]; if (dimExtent) { return dimExtent.slice(); } dimExtent = initialExtent; var min = dimExtent[0]; var max = dimExtent[1]; for (var i = 0; i < currEnd; i++) { var rawIdx = this.getRawIndex(i); var value = dimData[rawIdx]; value < min && (min = value); value > max && (max = value); } dimExtent = [min, max]; this._extent[dim] = dimExtent; return dimExtent; }; /** * Get raw data item */ DataStore.prototype.getRawDataItem = function (idx) { var rawIdx = this.getRawIndex(idx); if (!this._provider.persistent) { var val = []; var chunks = this._chunks; for (var i = 0; i < chunks.length; i++) { val.push(chunks[i][rawIdx]); } return val; } else { return this._provider.getItem(rawIdx); } }; /** * Clone shallow. * * @param clonedDims Determine which dims to clone. Will share the data if not specified. */ DataStore.prototype.clone = function (clonedDims, ignoreIndices) { var target = new DataStore(); var chunks = this._chunks; var clonedDimsMap = clonedDims && Object(core_util["reduce"])(clonedDims, function (obj, dimIdx) { obj[dimIdx] = true; return obj; }, {}); if (clonedDimsMap) { for (var i = 0; i < chunks.length; i++) { // Not clone if dim is not picked. target._chunks[i] = !clonedDimsMap[i] ? chunks[i] : cloneChunk(chunks[i]); } } else { target._chunks = chunks; } this._copyCommonProps(target); if (!ignoreIndices) { target._indices = this._cloneIndices(); } target._updateGetRawIdx(); return target; }; DataStore.prototype._copyCommonProps = function (target) { target._count = this._count; target._rawCount = this._rawCount; target._provider = this._provider; target._dimensions = this._dimensions; target._extent = Object(core_util["clone"])(this._extent); target._rawExtent = Object(core_util["clone"])(this._rawExtent); }; DataStore.prototype._cloneIndices = function () { if (this._indices) { var Ctor = this._indices.constructor; var indices = void 0; if (Ctor === Array) { var thisCount = this._indices.length; indices = new Ctor(thisCount); for (var i = 0; i < thisCount; i++) { indices[i] = this._indices[i]; } } else { indices = new Ctor(this._indices); } return indices; } return null; }; DataStore.prototype._getRawIdxIdentity = function (idx) { return idx; }; DataStore.prototype._getRawIdx = function (idx) { if (idx < this._count && idx >= 0) { return this._indices[idx]; } return -1; }; DataStore.prototype._updateGetRawIdx = function () { this.getRawIndex = this._indices ? this._getRawIdx : this._getRawIdxIdentity; }; DataStore.internalField = function () { function getDimValueSimply(dataItem, property, dataIndex, dimIndex) { return parseDataValue(dataItem[dimIndex], this._dimensions[dimIndex]); } defaultDimValueGetters = { arrayRows: getDimValueSimply, objectRows: function (dataItem, property, dataIndex, dimIndex) { return parseDataValue(dataItem[property], this._dimensions[dimIndex]); }, keyedColumns: getDimValueSimply, original: function (dataItem, property, dataIndex, dimIndex) { // Performance sensitive, do not use modelUtil.getDataItemValue. // If dataItem is an plain object with no value field, the let `value` // will be assigned with the object, but it will be tread correctly // in the `convertValue`. var value = dataItem && (dataItem.value == null ? dataItem : dataItem.value); return parseDataValue(value instanceof Array ? value[dimIndex] // If value is a single number or something else not array. : value, this._dimensions[dimIndex]); }, typedArray: function (dataItem, property, dataIndex, dimIndex) { return dataItem[dimIndex]; } }; }(); return DataStore; }(); /* harmony default export */ var data_DataStore = (DataStore_DataStore); // CONCATENATED MODULE: ./node_modules/echarts/lib/data/helper/sourceManager.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ /** * [REQUIREMENT_MEMO]: * (0) `metaRawOption` means `dimensions`/`sourceHeader`/`seriesLayoutBy` in raw option. * (1) Keep support the feature: `metaRawOption` can be specified both on `series` and * `root-dataset`. Them on `series` has higher priority. * (2) Do not support to set `metaRawOption` on a `non-root-dataset`, because it might * confuse users: whether those props indicate how to visit the upstream source or visit * the transform result source, and some transforms has nothing to do with these props, * and some transforms might have multiple upstream. * (3) Transforms should specify `metaRawOption` in each output, just like they can be * declared in `root-dataset`. * (4) At present only support visit source in `SERIES_LAYOUT_BY_COLUMN` in transforms. * That is for reducing complexity in transforms. * PENDING: Whether to provide transposition transform? * * [IMPLEMENTAION_MEMO]: * "sourceVisitConfig" are calculated from `metaRawOption` and `data`. * They will not be calculated until `source` is about to be visited (to prevent from * duplicate calcuation). `source` is visited only in series and input to transforms. * * [DIMENSION_INHERIT_RULE]: * By default the dimensions are inherited from ancestors, unless a transform return * a new dimensions definition. * Consider the case: * ```js * dataset: [{ * source: [ ['Product', 'Sales', 'Prise'], ['Cookies', 321, 44.21], ...] * }, { * transform: { type: 'filter', ... } * }] * dataset: [{ * dimension: ['Product', 'Sales', 'Prise'], * source: [ ['Cookies', 321, 44.21], ...] * }, { * transform: { type: 'filter', ... } * }] * ``` * The two types of option should have the same behavior after transform. * * * [SCENARIO]: * (1) Provide source data directly: * ```js * series: { * encode: {...}, * dimensions: [...] * seriesLayoutBy: 'row', * data: [[...]] * } * ``` * (2) Series refer to dataset. * ```js * series: [{ * encode: {...} * // Ignore datasetIndex means `datasetIndex: 0` * // and the dimensions defination in dataset is used * }, { * encode: {...}, * seriesLayoutBy: 'column', * datasetIndex: 1 * }] * ``` * (3) dataset transform * ```js * dataset: [{ * source: [...] * }, { * source: [...] * }, { * // By default from 0. * transform: { type: 'filter', config: {...} } * }, { * // Piped. * transform: [ * { type: 'filter', config: {...} }, * { type: 'sort', config: {...} } * ] * }, { * id: 'regressionData', * fromDatasetIndex: 1, * // Third-party transform * transform: { type: 'ecStat:regression', config: {...} } * }, { * // retrieve the extra result. * id: 'regressionFormula', * fromDatasetId: 'regressionData', * fromTransformResult: 1 * }] * ``` */ var sourceManager_SourceManager = /** @class */function () { function SourceManager(sourceHost) { // Cached source. Do not repeat calculating if not dirty. this._sourceList = []; this._storeList = []; // version sign of each upstream source manager. this._upstreamSignList = []; this._versionSignBase = 0; this._dirty = true; this._sourceHost = sourceHost; } /** * Mark dirty. */ SourceManager.prototype.dirty = function () { this._setLocalSource([], []); this._storeList = []; this._dirty = true; }; SourceManager.prototype._setLocalSource = function (sourceList, upstreamSignList) { this._sourceList = sourceList; this._upstreamSignList = upstreamSignList; this._versionSignBase++; if (this._versionSignBase > 9e10) { this._versionSignBase = 0; } }; /** * For detecting whether the upstream source is dirty, so that * the local cached source (in `_sourceList`) should be discarded. */ SourceManager.prototype._getVersionSign = function () { return this._sourceHost.uid + '_' + this._versionSignBase; }; /** * Always return a source instance. Otherwise throw error. */ SourceManager.prototype.prepareSource = function () { // For the case that call `setOption` multiple time but no data changed, // cache the result source to prevent from repeating transform. if (this._isDirty()) { this._createSource(); this._dirty = false; } }; SourceManager.prototype._createSource = function () { this._setLocalSource([], []); var sourceHost = this._sourceHost; var upSourceMgrList = this._getUpstreamSourceManagers(); var hasUpstream = !!upSourceMgrList.length; var resultSourceList; var upstreamSignList; if (isSeries(sourceHost)) { var seriesModel = sourceHost; var data = void 0; var sourceFormat = void 0; var upSource = void 0; // Has upstream dataset if (hasUpstream) { var upSourceMgr = upSourceMgrList[0]; upSourceMgr.prepareSource(); upSource = upSourceMgr.getSource(); data = upSource.data; sourceFormat = upSource.sourceFormat; upstreamSignList = [upSourceMgr._getVersionSign()]; } // Series data is from own. else { data = seriesModel.get('data', true); sourceFormat = Object(core_util["isTypedArray"])(data) ? SOURCE_FORMAT_TYPED_ARRAY : SOURCE_FORMAT_ORIGINAL; upstreamSignList = []; } // See [REQUIREMENT_MEMO], merge settings on series and parent dataset if it is root. var newMetaRawOption = this._getSourceMetaRawOption() || {}; var upMetaRawOption = upSource && upSource.metaRawOption || {}; var seriesLayoutBy = Object(core_util["retrieve2"])(newMetaRawOption.seriesLayoutBy, upMetaRawOption.seriesLayoutBy) || null; var sourceHeader = Object(core_util["retrieve2"])(newMetaRawOption.sourceHeader, upMetaRawOption.sourceHeader); // Note here we should not use `upSource.dimensionsDefine`. Consider the case: // `upSource.dimensionsDefine` is detected by `seriesLayoutBy: 'column'`, // but series need `seriesLayoutBy: 'row'`. var dimensions = Object(core_util["retrieve2"])(newMetaRawOption.dimensions, upMetaRawOption.dimensions); // We share source with dataset as much as possible // to avoid extra memory cost of high dimensional data. var needsCreateSource = seriesLayoutBy !== upMetaRawOption.seriesLayoutBy || !!sourceHeader !== !!upMetaRawOption.sourceHeader || dimensions; resultSourceList = needsCreateSource ? [createSource(data, { seriesLayoutBy: seriesLayoutBy, sourceHeader: sourceHeader, dimensions: dimensions }, sourceFormat)] : []; } else { var datasetModel = sourceHost; // Has upstream dataset. if (hasUpstream) { var result = this._applyTransform(upSourceMgrList); resultSourceList = result.sourceList; upstreamSignList = result.upstreamSignList; } // Is root dataset. else { var sourceData = datasetModel.get('source', true); resultSourceList = [createSource(sourceData, this._getSourceMetaRawOption(), null)]; upstreamSignList = []; } } if (false) { assert(resultSourceList && upstreamSignList); } this._setLocalSource(resultSourceList, upstreamSignList); }; SourceManager.prototype._applyTransform = function (upMgrList) { var datasetModel = this._sourceHost; var transformOption = datasetModel.get('transform', true); var fromTransformResult = datasetModel.get('fromTransformResult', true); if (false) { assert(fromTransformResult != null || transformOption != null); } if (fromTransformResult != null) { var errMsg = ''; if (upMgrList.length !== 1) { if (false) { errMsg = 'When using `fromTransformResult`, there should be only one upstream dataset'; } doThrow(errMsg); } } var sourceList; var upSourceList = []; var upstreamSignList = []; Object(core_util["each"])(upMgrList, function (upMgr) { upMgr.prepareSource(); var upSource = upMgr.getSource(fromTransformResult || 0); var errMsg = ''; if (fromTransformResult != null && !upSource) { if (false) { errMsg = 'Can not retrieve result by `fromTransformResult`: ' + fromTransformResult; } doThrow(errMsg); } upSourceList.push(upSource); upstreamSignList.push(upMgr._getVersionSign()); }); if (transformOption) { sourceList = applyDataTransform(transformOption, upSourceList, { datasetIndex: datasetModel.componentIndex }); } else if (fromTransformResult != null) { sourceList = [cloneSourceShallow(upSourceList[0])]; } return { sourceList: sourceList, upstreamSignList: upstreamSignList }; }; SourceManager.prototype._isDirty = function () { if (this._dirty) { return true; } // All sourceList is from the some upstream. var upSourceMgrList = this._getUpstreamSourceManagers(); for (var i = 0; i < upSourceMgrList.length; i++) { var upSrcMgr = upSourceMgrList[i]; if ( // Consider the case that there is ancestor diry, call it recursively. // The performance is probably not an issue because usually the chain is not long. upSrcMgr._isDirty() || this._upstreamSignList[i] !== upSrcMgr._getVersionSign()) { return true; } } }; /** * @param sourceIndex By default 0, means "main source". * In most cases there is only one source. */ SourceManager.prototype.getSource = function (sourceIndex) { sourceIndex = sourceIndex || 0; var source = this._sourceList[sourceIndex]; if (!source) { // Series may share source instance with dataset. var upSourceMgrList = this._getUpstreamSourceManagers(); return upSourceMgrList[0] && upSourceMgrList[0].getSource(sourceIndex); } return source; }; /** * * Get a data store which can be shared across series. * Only available for series. * * @param seriesDimRequest Dimensions that are generated in series. * Should have been sorted by `storeDimIndex` asc. */ SourceManager.prototype.getSharedDataStore = function (seriesDimRequest) { if (false) { assert(isSeries(this._sourceHost), 'Can only call getDataStore on series source manager.'); } var schema = seriesDimRequest.makeStoreSchema(); return this._innerGetDataStore(schema.dimensions, seriesDimRequest.source, schema.hash); }; SourceManager.prototype._innerGetDataStore = function (storeDims, seriesSource, sourceReadKey) { // TODO Can use other sourceIndex? var sourceIndex = 0; var storeList = this._storeList; var cachedStoreMap = storeList[sourceIndex]; if (!cachedStoreMap) { cachedStoreMap = storeList[sourceIndex] = {}; } var cachedStore = cachedStoreMap[sourceReadKey]; if (!cachedStore) { var upSourceMgr = this._getUpstreamSourceManagers()[0]; if (isSeries(this._sourceHost) && upSourceMgr) { cachedStore = upSourceMgr._innerGetDataStore(storeDims, seriesSource, sourceReadKey); } else { cachedStore = new data_DataStore(); // Always create store from source of series. cachedStore.initData(new dataProvider_DefaultDataProvider(seriesSource, storeDims.length), storeDims); } cachedStoreMap[sourceReadKey] = cachedStore; } return cachedStore; }; /** * PENDING: Is it fast enough? * If no upstream, return empty array. */ SourceManager.prototype._getUpstreamSourceManagers = function () { // Always get the relationship from the raw option. // Do not cache the link of the dependency graph, so that // there is no need to update them when change happens. var sourceHost = this._sourceHost; if (isSeries(sourceHost)) { var datasetModel = querySeriesUpstreamDatasetModel(sourceHost); return !datasetModel ? [] : [datasetModel.getSourceManager()]; } else { return Object(core_util["map"])(queryDatasetUpstreamDatasetModels(sourceHost), function (datasetModel) { return datasetModel.getSourceManager(); }); } }; SourceManager.prototype._getSourceMetaRawOption = function () { var sourceHost = this._sourceHost; var seriesLayoutBy; var sourceHeader; var dimensions; if (isSeries(sourceHost)) { seriesLayoutBy = sourceHost.get('seriesLayoutBy', true); sourceHeader = sourceHost.get('sourceHeader', true); dimensions = sourceHost.get('dimensions', true); } // See [REQUIREMENT_MEMO], `non-root-dataset` do not support them. else if (!this._getUpstreamSourceManagers().length) { var model = sourceHost; seriesLayoutBy = model.get('seriesLayoutBy', true); sourceHeader = model.get('sourceHeader', true); dimensions = model.get('dimensions', true); } return { seriesLayoutBy: seriesLayoutBy, sourceHeader: sourceHeader, dimensions: dimensions }; }; return SourceManager; }(); // Call this method after `super.init` and `super.mergeOption` to // disable the transform merge, but do not disable transform clone from rawOption. function disableTransformOptionMerge(datasetModel) { var transformOption = datasetModel.option.transform; transformOption && Object(core_util["setAsPrimitive"])(datasetModel.option.transform); } function isSeries(sourceHost) { // Avoid circular dependency with Series.ts return sourceHost.mainType === 'series'; } function doThrow(errMsg) { throw new Error(errMsg); } // CONCATENATED MODULE: ./node_modules/echarts/lib/component/tooltip/tooltipMarkup.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 TOOLTIP_LINE_HEIGHT_CSS = 'line-height:1'; function getTooltipLineHeight(textStyle) { var lineHeight = textStyle.lineHeight; if (lineHeight == null) { return TOOLTIP_LINE_HEIGHT_CSS; } else { return "line-height:" + encodeHTML(lineHeight + '') + "px"; } } // TODO: more textStyle option function getTooltipTextStyle(textStyle, renderMode) { var nameFontColor = textStyle.color || '#6e7079'; var nameFontSize = textStyle.fontSize || 12; var nameFontWeight = textStyle.fontWeight || '400'; var valueFontColor = textStyle.color || '#464646'; var valueFontSize = textStyle.fontSize || 14; var valueFontWeight = textStyle.fontWeight || '900'; if (renderMode === 'html') { // `textStyle` is probably from user input, should be encoded to reduce security risk. return { // eslint-disable-next-line max-len nameStyle: "font-size:" + encodeHTML(nameFontSize + '') + "px;color:" + encodeHTML(nameFontColor) + ";font-weight:" + encodeHTML(nameFontWeight + ''), // eslint-disable-next-line max-len valueStyle: "font-size:" + encodeHTML(valueFontSize + '') + "px;color:" + encodeHTML(valueFontColor) + ";font-weight:" + encodeHTML(valueFontWeight + '') }; } else { return { nameStyle: { fontSize: nameFontSize, fill: nameFontColor, fontWeight: nameFontWeight }, valueStyle: { fontSize: valueFontSize, fill: valueFontColor, fontWeight: valueFontWeight } }; } } // See `TooltipMarkupLayoutIntent['innerGapLevel']`. // (value from UI design) var HTML_GAPS = [0, 10, 20, 30]; var RICH_TEXT_GAPS = ['', '\n', '\n\n', '\n\n\n']; // eslint-disable-next-line max-len function createTooltipMarkup(type, option) { option.type = type; return option; } function isSectionFragment(frag) { return frag.type === 'section'; } function getBuilder(frag) { return isSectionFragment(frag) ? buildSection : buildNameValue; } function getBlockGapLevel(frag) { if (isSectionFragment(frag)) { var gapLevel_1 = 0; var subBlockLen = frag.blocks.length; var hasInnerGap_1 = subBlockLen > 1 || subBlockLen > 0 && !frag.noHeader; Object(core_util["each"])(frag.blocks, function (subBlock) { var subGapLevel = getBlockGapLevel(subBlock); // If the some of the sub-blocks have some gaps (like 10px) inside, this block // should use a larger gap (like 20px) to distinguish those sub-blocks. if (subGapLevel >= gapLevel_1) { gapLevel_1 = subGapLevel + +(hasInnerGap_1 && ( // 0 always can not be readable gap level. !subGapLevel // If no header, always keep the sub gap level. Otherwise // look weird in case `multipleSeries`. || isSectionFragment(subBlock) && !subBlock.noHeader)); } }); return gapLevel_1; } return 0; } function buildSection(ctx, fragment, topMarginForOuterGap, toolTipTextStyle) { var noHeader = fragment.noHeader; var gaps = getGap(getBlockGapLevel(fragment)); var subMarkupTextList = []; var subBlocks = fragment.blocks || []; Object(core_util["assert"])(!subBlocks || Object(core_util["isArray"])(subBlocks)); subBlocks = subBlocks || []; var orderMode = ctx.orderMode; if (fragment.sortBlocks && orderMode) { subBlocks = subBlocks.slice(); var orderMap = { valueAsc: 'asc', valueDesc: 'desc' }; if (Object(core_util["hasOwn"])(orderMap, orderMode)) { var comparator_1 = new dataValueHelper_SortOrderComparator(orderMap[orderMode], null); subBlocks.sort(function (a, b) { return comparator_1.evaluate(a.sortParam, b.sortParam); }); } // FIXME 'seriesDesc' necessary? else if (orderMode === 'seriesDesc') { subBlocks.reverse(); } } Object(core_util["each"])(subBlocks, function (subBlock, idx) { var valueFormatter = fragment.valueFormatter; var subMarkupText = getBuilder(subBlock)( // Inherit valueFormatter valueFormatter ? Object(core_util["extend"])(Object(core_util["extend"])({}, ctx), { valueFormatter: valueFormatter }) : ctx, subBlock, idx > 0 ? gaps.html : 0, toolTipTextStyle); subMarkupText != null && subMarkupTextList.push(subMarkupText); }); var subMarkupText = ctx.renderMode === 'richText' ? subMarkupTextList.join(gaps.richText) : wrapBlockHTML(toolTipTextStyle, subMarkupTextList.join(''), noHeader ? topMarginForOuterGap : gaps.html); if (noHeader) { return subMarkupText; } var displayableHeader = makeValueReadable(fragment.header, 'ordinal', ctx.useUTC); var nameStyle = getTooltipTextStyle(toolTipTextStyle, ctx.renderMode).nameStyle; var tooltipLineHeight = getTooltipLineHeight(toolTipTextStyle); if (ctx.renderMode === 'richText') { return wrapInlineNameRichText(ctx, displayableHeader, nameStyle) + gaps.richText + subMarkupText; } else { return wrapBlockHTML(toolTipTextStyle, "
    " + encodeHTML(displayableHeader) + '
    ' + subMarkupText, topMarginForOuterGap); } } function buildNameValue(ctx, fragment, topMarginForOuterGap, toolTipTextStyle) { var renderMode = ctx.renderMode; var noName = fragment.noName; var noValue = fragment.noValue; var noMarker = !fragment.markerType; var name = fragment.name; var useUTC = ctx.useUTC; var valueFormatter = fragment.valueFormatter || ctx.valueFormatter || function (value) { value = Object(core_util["isArray"])(value) ? value : [value]; return Object(core_util["map"])(value, function (val, idx) { return makeValueReadable(val, Object(core_util["isArray"])(valueTypeOption) ? valueTypeOption[idx] : valueTypeOption, useUTC); }); }; if (noName && noValue) { return; } var markerStr = noMarker ? '' : ctx.markupStyleCreator.makeTooltipMarker(fragment.markerType, fragment.markerColor || '#333', renderMode); var readableName = noName ? '' : makeValueReadable(name, 'ordinal', useUTC); var valueTypeOption = fragment.valueType; var readableValueList = noValue ? [] : valueFormatter(fragment.value, fragment.dataIndex); var valueAlignRight = !noMarker || !noName; // It little weird if only value next to marker but far from marker. var valueCloseToMarker = !noMarker && noName; var _a = getTooltipTextStyle(toolTipTextStyle, renderMode), nameStyle = _a.nameStyle, valueStyle = _a.valueStyle; return renderMode === 'richText' ? (noMarker ? '' : markerStr) + (noName ? '' : wrapInlineNameRichText(ctx, readableName, nameStyle)) // Value has commas inside, so use ' ' as delimiter for multiple values. + (noValue ? '' : wrapInlineValueRichText(ctx, readableValueList, valueAlignRight, valueCloseToMarker, valueStyle)) : wrapBlockHTML(toolTipTextStyle, (noMarker ? '' : markerStr) + (noName ? '' : wrapInlineNameHTML(readableName, !noMarker, nameStyle)) + (noValue ? '' : wrapInlineValueHTML(readableValueList, valueAlignRight, valueCloseToMarker, valueStyle)), topMarginForOuterGap); } /** * @return markupText. null/undefined means no content. */ function buildTooltipMarkup(fragment, markupStyleCreator, renderMode, orderMode, useUTC, toolTipTextStyle) { if (!fragment) { return; } var builder = getBuilder(fragment); var ctx = { useUTC: useUTC, renderMode: renderMode, orderMode: orderMode, markupStyleCreator: markupStyleCreator, valueFormatter: fragment.valueFormatter }; return builder(ctx, fragment, 0, toolTipTextStyle); } function getGap(gapLevel) { return { html: HTML_GAPS[gapLevel], richText: RICH_TEXT_GAPS[gapLevel] }; } function wrapBlockHTML(textStyle, encodedContent, topGap) { var clearfix = '
    '; var marginCSS = "margin: " + topGap + "px 0 0"; var tooltipLineHeight = getTooltipLineHeight(textStyle); return "
    " + encodedContent + clearfix + '
    '; } function wrapInlineNameHTML(name, leftHasMarker, style) { var marginCss = leftHasMarker ? 'margin-left:2px' : ''; return "" + encodeHTML(name) + ''; } function wrapInlineValueHTML(valueList, alignRight, valueCloseToMarker, style) { // Do not too close to marker, considering there are multiple values separated by spaces. var paddingStr = valueCloseToMarker ? '10px' : '20px'; var alignCSS = alignRight ? "float:right;margin-left:" + paddingStr : ''; valueList = Object(core_util["isArray"])(valueList) ? valueList : [valueList]; return "" // Value has commas inside, so use ' ' as delimiter for multiple values. + Object(core_util["map"])(valueList, function (value) { return encodeHTML(value); }).join('  ') + ''; } function wrapInlineNameRichText(ctx, name, style) { return ctx.markupStyleCreator.wrapRichTextStyle(name, style); } function wrapInlineValueRichText(ctx, values, alignRight, valueCloseToMarker, style) { var styles = [style]; var paddingLeft = valueCloseToMarker ? 10 : 20; alignRight && styles.push({ padding: [0, 0, 0, paddingLeft], align: 'right' }); // Value has commas inside, so use ' ' as delimiter for multiple values. return ctx.markupStyleCreator.wrapRichTextStyle(Object(core_util["isArray"])(values) ? values.join(' ') : values, styles); } function retrieveVisualColorForTooltipMarker(series, dataIndex) { var style = series.getData().getItemVisual(dataIndex, 'style'); var color = style[series.visualDrawType]; return convertToColorString(color); } function getPaddingFromTooltipModel(model, renderMode) { var padding = model.get('padding'); return padding != null ? padding // We give slightly different to look pretty. : renderMode === 'richText' ? [8, 10] : 10; } /** * The major feature is generate styles for `renderMode: 'richText'`. * But it also serves `renderMode: 'html'` to provide * "renderMode-independent" API. */ var tooltipMarkup_TooltipMarkupStyleCreator = /** @class */function () { function TooltipMarkupStyleCreator() { this.richTextStyles = {}; // Notice that "generate a style name" usually happens repeatedly when mouse is moving and // a tooltip is displayed. So we put the `_nextStyleNameId` as a member of each creator // rather than static shared by all creators (which will cause it increase to fast). this._nextStyleNameId = getRandomIdBase(); } TooltipMarkupStyleCreator.prototype._generateStyleName = function () { return '__EC_aUTo_' + this._nextStyleNameId++; }; TooltipMarkupStyleCreator.prototype.makeTooltipMarker = function (markerType, colorStr, renderMode) { var markerId = renderMode === 'richText' ? this._generateStyleName() : null; var marker = getTooltipMarker({ color: colorStr, type: markerType, renderMode: renderMode, markerId: markerId }); if (Object(core_util["isString"])(marker)) { return marker; } else { if (false) { assert(markerId); } this.richTextStyles[markerId] = marker.style; return marker.content; } }; /** * @usage * ```ts * const styledText = markupStyleCreator.wrapRichTextStyle([ * // The styles will be auto merged. * { * fontSize: 12, * color: 'blue' * }, * { * padding: 20 * } * ]); * ``` */ TooltipMarkupStyleCreator.prototype.wrapRichTextStyle = function (text, styles) { var finalStl = {}; if (Object(core_util["isArray"])(styles)) { Object(core_util["each"])(styles, function (stl) { return Object(core_util["extend"])(finalStl, stl); }); } else { Object(core_util["extend"])(finalStl, styles); } var styleName = this._generateStyleName(); this.richTextStyles[styleName] = finalStl; return "{" + styleName + "|" + text + "}"; }; return TooltipMarkupStyleCreator; }(); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/tooltip/seriesFormatTooltip.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 defaultSeriesFormatTooltip(opt) { var series = opt.series; var dataIndex = opt.dataIndex; var multipleSeries = opt.multipleSeries; var data = series.getData(); var tooltipDims = data.mapDimensionsAll('defaultedTooltip'); var tooltipDimLen = tooltipDims.length; var value = series.getRawValue(dataIndex); var isValueArr = Object(core_util["isArray"])(value); var markerColor = retrieveVisualColorForTooltipMarker(series, dataIndex); // Complicated rule for pretty tooltip. var inlineValue; var inlineValueType; var subBlocks; var sortParam; if (tooltipDimLen > 1 || isValueArr && !tooltipDimLen) { var formatArrResult = formatTooltipArrayValue(value, series, dataIndex, tooltipDims, markerColor); inlineValue = formatArrResult.inlineValues; inlineValueType = formatArrResult.inlineValueTypes; subBlocks = formatArrResult.blocks; // Only support tooltip sort by the first inline value. It's enough in most cases. sortParam = formatArrResult.inlineValues[0]; } else if (tooltipDimLen) { var dimInfo = data.getDimensionInfo(tooltipDims[0]); sortParam = inlineValue = retrieveRawValue(data, dataIndex, tooltipDims[0]); inlineValueType = dimInfo.type; } else { sortParam = inlineValue = isValueArr ? value[0] : value; } // Do not show generated series name. It might not be readable. var seriesNameSpecified = isNameSpecified(series); var seriesName = seriesNameSpecified && series.name || ''; var itemName = data.getName(dataIndex); var inlineName = multipleSeries ? seriesName : itemName; return createTooltipMarkup('section', { header: seriesName, // When series name is not specified, do not show a header line with only '-'. // This case always happens in tooltip.trigger: 'item'. noHeader: multipleSeries || !seriesNameSpecified, sortParam: sortParam, blocks: [createTooltipMarkup('nameValue', { markerType: 'item', markerColor: markerColor, // Do not mix display seriesName and itemName in one tooltip, // which might confuses users. name: inlineName, // name dimension might be auto assigned, where the name might // be not readable. So we check trim here. noName: !Object(core_util["trim"])(inlineName), value: inlineValue, valueType: inlineValueType, dataIndex: dataIndex })].concat(subBlocks || []) }); } function formatTooltipArrayValue(value, series, dataIndex, tooltipDims, colorStr) { // check: category-no-encode-has-axis-data in dataset.html var data = series.getData(); var isValueMultipleLine = Object(core_util["reduce"])(value, function (isValueMultipleLine, val, idx) { var dimItem = data.getDimensionInfo(idx); return isValueMultipleLine = isValueMultipleLine || dimItem && dimItem.tooltip !== false && dimItem.displayName != null; }, false); var inlineValues = []; var inlineValueTypes = []; var blocks = []; tooltipDims.length ? Object(core_util["each"])(tooltipDims, function (dim) { setEachItem(retrieveRawValue(data, dataIndex, dim), dim); }) // By default, all dims is used on tooltip. : Object(core_util["each"])(value, setEachItem); function setEachItem(val, dim) { var dimInfo = data.getDimensionInfo(dim); // If `dimInfo.tooltip` is not set, show tooltip. if (!dimInfo || dimInfo.otherDims.tooltip === false) { return; } if (isValueMultipleLine) { blocks.push(createTooltipMarkup('nameValue', { markerType: 'subItem', markerColor: colorStr, name: dimInfo.displayName, value: val, valueType: dimInfo.type })); } else { inlineValues.push(val); inlineValueTypes.push(dimInfo.type); } } return { inlineValues: inlineValues, inlineValueTypes: inlineValueTypes, blocks: blocks }; } // CONCATENATED MODULE: ./node_modules/echarts/lib/model/Series.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 Series_inner = makeInner(); function getSelectionKey(data, dataIndex) { return data.getName(dataIndex) || data.getId(dataIndex); } var SERIES_UNIVERSAL_TRANSITION_PROP = '__universalTransitionEnabled'; var Series_SeriesModel = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(SeriesModel, _super); function SeriesModel() { // [Caution]: Because this class or desecendants can be used as `XXX.extend(subProto)`, // the class members must not be initialized in constructor or declaration place. // Otherwise there is bad case: // class A {xxx = 1;} // enableClassExtend(A); // class B extends A {} // var C = B.extend({xxx: 5}); // var c = new C(); // console.log(c.xxx); // expect 5 but always 1. var _this = _super !== null && _super.apply(this, arguments) || this; // --------------------------------------- // Props about data selection // --------------------------------------- _this._selectedDataIndicesMap = {}; return _this; } SeriesModel.prototype.init = function (option, parentModel, ecModel) { this.seriesIndex = this.componentIndex; this.dataTask = createTask({ count: dataTaskCount, reset: dataTaskReset }); this.dataTask.context = { model: this }; this.mergeDefaultAndTheme(option, ecModel); var sourceManager = Series_inner(this).sourceManager = new sourceManager_SourceManager(this); sourceManager.prepareSource(); var data = this.getInitialData(option, ecModel); wrapData(data, this); this.dataTask.context.data = data; if (false) { zrUtil.assert(data, 'getInitialData returned invalid data.'); } Series_inner(this).dataBeforeProcessed = data; // If we reverse the order (make data firstly, and then make // dataBeforeProcessed by cloneShallow), cloneShallow will // cause data.graph.data !== data when using // module:echarts/data/Graph or module:echarts/data/Tree. // See module:echarts/data/helper/linkSeriesData // Theoretically, it is unreasonable to call `seriesModel.getData()` in the model // init or merge stage, because the data can be restored. So we do not `restoreData` // and `setData` here, which forbids calling `seriesModel.getData()` in this stage. // Call `seriesModel.getRawData()` instead. // this.restoreData(); autoSeriesName(this); this._initSelectedMapFromData(data); }; /** * Util for merge default and theme to option */ SeriesModel.prototype.mergeDefaultAndTheme = function (option, ecModel) { var layoutMode = fetchLayoutMode(this); var inputPositionParams = layoutMode ? getLayoutParams(option) : {}; // Backward compat: using subType on theme. // But if name duplicate between series subType // (for example: parallel) add component mainType, // add suffix 'Series'. var themeSubType = this.subType; if (Component.hasClass(themeSubType)) { themeSubType += 'Series'; } core_util["merge"](option, ecModel.getTheme().get(this.subType)); core_util["merge"](option, this.getDefaultOption()); // Default label emphasis `show` defaultEmphasis(option, 'label', ['show']); this.fillDataTextStyle(option.data); if (layoutMode) { mergeLayoutParam(option, inputPositionParams, layoutMode); } }; SeriesModel.prototype.mergeOption = function (newSeriesOption, ecModel) { // this.settingTask.dirty(); newSeriesOption = core_util["merge"](this.option, newSeriesOption, true); this.fillDataTextStyle(newSeriesOption.data); var layoutMode = fetchLayoutMode(this); if (layoutMode) { mergeLayoutParam(this.option, newSeriesOption, layoutMode); } var sourceManager = Series_inner(this).sourceManager; sourceManager.dirty(); sourceManager.prepareSource(); var data = this.getInitialData(newSeriesOption, ecModel); wrapData(data, this); this.dataTask.dirty(); this.dataTask.context.data = data; Series_inner(this).dataBeforeProcessed = data; autoSeriesName(this); this._initSelectedMapFromData(data); }; SeriesModel.prototype.fillDataTextStyle = function (data) { // Default data label emphasis `show` // FIXME Tree structure data ? // FIXME Performance ? if (data && !core_util["isTypedArray"](data)) { var props = ['show']; for (var i = 0; i < data.length; i++) { if (data[i] && data[i].label) { defaultEmphasis(data[i], 'label', props); } } } }; /** * Init a data structure from data related option in series * Must be overridden. */ SeriesModel.prototype.getInitialData = function (option, ecModel) { return; }; /** * Append data to list */ SeriesModel.prototype.appendData = function (params) { // FIXME ??? // (1) If data from dataset, forbidden append. // (2) support append data of dataset. var data = this.getRawData(); data.appendData(params.data); }; /** * Consider some method like `filter`, `map` need make new data, * We should make sure that `seriesModel.getData()` get correct * data in the stream procedure. So we fetch data from upstream * each time `task.perform` called. */ SeriesModel.prototype.getData = function (dataType) { var task = getCurrentTask(this); if (task) { var data = task.context.data; return dataType == null || !data.getLinkedData ? data : data.getLinkedData(dataType); } else { // When series is not alive (that may happen when click toolbox // restore or setOption with not merge mode), series data may // be still need to judge animation or something when graphic // elements want to know whether fade out. return Series_inner(this).data; } }; SeriesModel.prototype.getAllData = function () { var mainData = this.getData(); return mainData && mainData.getLinkedDataAll ? mainData.getLinkedDataAll() : [{ data: mainData }]; }; SeriesModel.prototype.setData = function (data) { var task = getCurrentTask(this); if (task) { var context = task.context; // Consider case: filter, data sample. // FIXME:TS never used, so comment it // if (context.data !== data && task.modifyOutputEnd) { // task.setOutputEnd(data.count()); // } context.outputData = data; // Caution: setData should update context.data, // Because getData may be called multiply in a // single stage and expect to get the data just // set. (For example, AxisProxy, x y both call // getData and setDate sequentially). // So the context.data should be fetched from // upstream each time when a stage starts to be // performed. if (task !== this.dataTask) { context.data = data; } } Series_inner(this).data = data; }; SeriesModel.prototype.getEncode = function () { var encode = this.get('encode', true); if (encode) { return core_util["createHashMap"](encode); } }; SeriesModel.prototype.getSourceManager = function () { return Series_inner(this).sourceManager; }; SeriesModel.prototype.getSource = function () { return this.getSourceManager().getSource(); }; /** * Get data before processed */ SeriesModel.prototype.getRawData = function () { return Series_inner(this).dataBeforeProcessed; }; SeriesModel.prototype.getColorBy = function () { var colorBy = this.get('colorBy'); return colorBy || 'series'; }; SeriesModel.prototype.isColorBySeries = function () { return this.getColorBy() === 'series'; }; /** * Get base axis if has coordinate system and has axis. * By default use coordSys.getBaseAxis(); * Can be overridden for some chart. * @return {type} description */ SeriesModel.prototype.getBaseAxis = function () { var coordSys = this.coordinateSystem; // @ts-ignore return coordSys && coordSys.getBaseAxis && coordSys.getBaseAxis(); }; /** * Default tooltip formatter * * @param dataIndex * @param multipleSeries * @param dataType * @param renderMode valid values: 'html'(by default) and 'richText'. * 'html' is used for rendering tooltip in extra DOM form, and the result * string is used as DOM HTML content. * 'richText' is used for rendering tooltip in rich text form, for those where * DOM operation is not supported. * @return formatted tooltip with `html` and `markers` * Notice: The override method can also return string */ SeriesModel.prototype.formatTooltip = function (dataIndex, multipleSeries, dataType) { return defaultSeriesFormatTooltip({ series: this, dataIndex: dataIndex, multipleSeries: multipleSeries }); }; SeriesModel.prototype.isAnimationEnabled = function () { var ecModel = this.ecModel; // Disable animation if using echarts in node but not give ssr flag. // In ssr mode, renderToString will generate svg with css animation. if (core_env["a" /* default */].node && !(ecModel && ecModel.ssr)) { return false; } var animationEnabled = this.getShallow('animation'); if (animationEnabled) { if (this.getData().count() > this.getShallow('animationThreshold')) { animationEnabled = false; } } return !!animationEnabled; }; SeriesModel.prototype.restoreData = function () { this.dataTask.dirty(); }; SeriesModel.prototype.getColorFromPalette = function (name, scope, requestColorNum) { var ecModel = this.ecModel; // PENDING var color = palette_PaletteMixin.prototype.getColorFromPalette.call(this, name, scope, requestColorNum); if (!color) { color = ecModel.getColorFromPalette(name, scope, requestColorNum); } return color; }; /** * Use `data.mapDimensionsAll(coordDim)` instead. * @deprecated */ SeriesModel.prototype.coordDimToDataDim = function (coordDim) { return this.getRawData().mapDimensionsAll(coordDim); }; /** * Get progressive rendering count each step */ SeriesModel.prototype.getProgressive = function () { return this.get('progressive'); }; /** * Get progressive rendering count each step */ SeriesModel.prototype.getProgressiveThreshold = function () { return this.get('progressiveThreshold'); }; // PENGING If selectedMode is null ? SeriesModel.prototype.select = function (innerDataIndices, dataType) { this._innerSelect(this.getData(dataType), innerDataIndices); }; SeriesModel.prototype.unselect = function (innerDataIndices, dataType) { var selectedMap = this.option.selectedMap; if (!selectedMap) { return; } var selectedMode = this.option.selectedMode; var data = this.getData(dataType); if (selectedMode === 'series' || selectedMap === 'all') { this.option.selectedMap = {}; this._selectedDataIndicesMap = {}; return; } for (var i = 0; i < innerDataIndices.length; i++) { var dataIndex = innerDataIndices[i]; var nameOrId = getSelectionKey(data, dataIndex); selectedMap[nameOrId] = false; this._selectedDataIndicesMap[nameOrId] = -1; } }; SeriesModel.prototype.toggleSelect = function (innerDataIndices, dataType) { var tmpArr = []; for (var i = 0; i < innerDataIndices.length; i++) { tmpArr[0] = innerDataIndices[i]; this.isSelected(innerDataIndices[i], dataType) ? this.unselect(tmpArr, dataType) : this.select(tmpArr, dataType); } }; SeriesModel.prototype.getSelectedDataIndices = function () { if (this.option.selectedMap === 'all') { return [].slice.call(this.getData().getIndices()); } var selectedDataIndicesMap = this._selectedDataIndicesMap; var nameOrIds = core_util["keys"](selectedDataIndicesMap); var dataIndices = []; for (var i = 0; i < nameOrIds.length; i++) { var dataIndex = selectedDataIndicesMap[nameOrIds[i]]; if (dataIndex >= 0) { dataIndices.push(dataIndex); } } return dataIndices; }; SeriesModel.prototype.isSelected = function (dataIndex, dataType) { var selectedMap = this.option.selectedMap; if (!selectedMap) { return false; } var data = this.getData(dataType); return (selectedMap === 'all' || selectedMap[getSelectionKey(data, dataIndex)]) && !data.getItemModel(dataIndex).get(['select', 'disabled']); }; SeriesModel.prototype.isUniversalTransitionEnabled = function () { if (this[SERIES_UNIVERSAL_TRANSITION_PROP]) { return true; } var universalTransitionOpt = this.option.universalTransition; // Quick reject if (!universalTransitionOpt) { return false; } if (universalTransitionOpt === true) { return true; } // Can be simply 'universalTransition: true' return universalTransitionOpt && universalTransitionOpt.enabled; }; SeriesModel.prototype._innerSelect = function (data, innerDataIndices) { var _a, _b; var option = this.option; var selectedMode = option.selectedMode; var len = innerDataIndices.length; if (!selectedMode || !len) { return; } if (selectedMode === 'series') { option.selectedMap = 'all'; } else if (selectedMode === 'multiple') { if (!core_util["isObject"](option.selectedMap)) { option.selectedMap = {}; } var selectedMap = option.selectedMap; for (var i = 0; i < len; i++) { var dataIndex = innerDataIndices[i]; // TODO different types of data share same object. var nameOrId = getSelectionKey(data, dataIndex); selectedMap[nameOrId] = true; this._selectedDataIndicesMap[nameOrId] = data.getRawIndex(dataIndex); } } else if (selectedMode === 'single' || selectedMode === true) { var lastDataIndex = innerDataIndices[len - 1]; var nameOrId = getSelectionKey(data, lastDataIndex); option.selectedMap = (_a = {}, _a[nameOrId] = true, _a); this._selectedDataIndicesMap = (_b = {}, _b[nameOrId] = data.getRawIndex(lastDataIndex), _b); } }; SeriesModel.prototype._initSelectedMapFromData = function (data) { // Ignore select info in data if selectedMap exists. // NOTE It's only for legacy usage. edge data is not supported. if (this.option.selectedMap) { return; } var dataIndices = []; if (data.hasItemOption) { data.each(function (idx) { var rawItem = data.getRawDataItem(idx); if (rawItem && rawItem.selected) { dataIndices.push(idx); } }); } if (dataIndices.length > 0) { this._innerSelect(data, dataIndices); } }; // /** // * @see {module:echarts/stream/Scheduler} // */ // abstract pipeTask: null SeriesModel.registerClass = function (clz) { return Component.registerClass(clz); }; SeriesModel.protoInitialize = function () { var proto = SeriesModel.prototype; proto.type = 'series.__base__'; proto.seriesIndex = 0; proto.ignoreStyleOnData = false; proto.hasSymbolVisual = false; proto.defaultSymbol = 'circle'; // Make sure the values can be accessed! proto.visualStyleAccessPath = 'itemStyle'; proto.visualDrawType = 'fill'; }(); return SeriesModel; }(Component); core_util["mixin"](Series_SeriesModel, dataFormat_DataFormatMixin); core_util["mixin"](Series_SeriesModel, palette_PaletteMixin); mountExtend(Series_SeriesModel, Component); /** * MUST be called after `prepareSource` called * Here we need to make auto series, especially for auto legend. But we * do not modify series.name in option to avoid side effects. */ function autoSeriesName(seriesModel) { // User specified name has higher priority, otherwise it may cause // series can not be queried unexpectedly. var name = seriesModel.name; if (!isNameSpecified(seriesModel)) { seriesModel.name = getSeriesAutoName(seriesModel) || name; } } function getSeriesAutoName(seriesModel) { var data = seriesModel.getRawData(); var dataDims = data.mapDimensionsAll('seriesName'); var nameArr = []; core_util["each"](dataDims, function (dataDim) { var dimInfo = data.getDimensionInfo(dataDim); dimInfo.displayName && nameArr.push(dimInfo.displayName); }); return nameArr.join(' '); } function dataTaskCount(context) { return context.model.getRawData().count(); } function dataTaskReset(context) { var seriesModel = context.model; seriesModel.setData(seriesModel.getRawData().cloneShallow()); return dataTaskProgress; } function dataTaskProgress(param, context) { // Avoid repeat cloneShallow when data just created in reset. if (context.outputData && param.end > context.outputData.count()) { context.model.getRawData().cloneShallow(context.outputData); } } // TODO refactor function wrapData(data, seriesModel) { core_util["each"](core_util["concatArray"](data.CHANGABLE_METHODS, data.DOWNSAMPLE_METHODS), function (methodName) { data.wrapMethod(methodName, core_util["curry"](onDataChange, seriesModel)); }); } function onDataChange(seriesModel, newList) { var task = getCurrentTask(seriesModel); if (task) { // Consider case: filter, selectRange task.setOutputEnd((newList || this).count()); } return newList; } function getCurrentTask(seriesModel) { var scheduler = (seriesModel.ecModel || {}).scheduler; var pipeline = scheduler && scheduler.getPipeline(seriesModel.uid); if (pipeline) { // When pipline finished, the currrentTask keep the last // task (renderTask). var task = pipeline.currentTask; if (task) { var agentStubMap = task.agentStubMap; if (agentStubMap) { task = agentStubMap.get(seriesModel.uid); } } return task; } } /* harmony default export */ var Series = (Series_SeriesModel); // CONCATENATED MODULE: ./node_modules/echarts/lib/view/Component.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 Component_ComponentView = /** @class */function () { function ComponentView() { this.group = new graphic_Group(); this.uid = getUID('viewComponent'); } ComponentView.prototype.init = function (ecModel, api) {}; ComponentView.prototype.render = function (model, ecModel, api, payload) {}; ComponentView.prototype.dispose = function (ecModel, api) {}; ComponentView.prototype.updateView = function (model, ecModel, api, payload) { // Do nothing; }; ComponentView.prototype.updateLayout = function (model, ecModel, api, payload) { // Do nothing; }; ComponentView.prototype.updateVisual = function (model, ecModel, api, payload) { // Do nothing; }; /** * Hook for toggle blur target series. * Can be used in marker for blur or leave blur the markers */ ComponentView.prototype.toggleBlurSeries = function (seriesModels, isBlur, ecModel) { // Do nothing; }; /** * Traverse the new rendered elements. * * It will traverse the new added element in progressive rendering. * And traverse all in normal rendering. */ ComponentView.prototype.eachRendered = function (cb) { var group = this.group; if (group) { group.traverse(cb); } }; return ComponentView; }(); ; enableClassExtend(Component_ComponentView); enableClassManagement(Component_ComponentView); /* harmony default export */ var view_Component = (Component_ComponentView); // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/helper/createRenderPlanner.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ /** * @return {string} If large mode changed, return string 'reset'; */ function createRenderPlanner() { var inner = makeInner(); return function (seriesModel) { var fields = inner(seriesModel); var pipelineContext = seriesModel.pipelineContext; var originalLarge = !!fields.large; var originalProgressive = !!fields.progressiveRender; // FIXME: if the planner works on a filtered series, `pipelineContext` does not // exists. See #11611 . Probably we need to modify this structure, see the comment // on `performRawSeries` in `Schedular.js`. var large = fields.large = !!(pipelineContext && pipelineContext.large); var progressive = fields.progressiveRender = !!(pipelineContext && pipelineContext.progressiveRender); return !!(originalLarge !== large || originalProgressive !== progressive) && 'reset'; }; } // CONCATENATED MODULE: ./node_modules/echarts/lib/view/Chart.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 Chart_inner = makeInner(); var renderPlanner = createRenderPlanner(); var Chart_ChartView = /** @class */function () { function ChartView() { this.group = new graphic_Group(); this.uid = getUID('viewChart'); this.renderTask = createTask({ plan: renderTaskPlan, reset: renderTaskReset }); this.renderTask.context = { view: this }; } ChartView.prototype.init = function (ecModel, api) {}; ChartView.prototype.render = function (seriesModel, ecModel, api, payload) { if (false) { throw new Error('render method must been implemented'); } }; /** * Highlight series or specified data item. */ ChartView.prototype.highlight = function (seriesModel, ecModel, api, payload) { var data = seriesModel.getData(payload && payload.dataType); if (!data) { if (false) { error("Unknown dataType " + payload.dataType); } return; } toggleHighlight(data, payload, 'emphasis'); }; /** * Downplay series or specified data item. */ ChartView.prototype.downplay = function (seriesModel, ecModel, api, payload) { var data = seriesModel.getData(payload && payload.dataType); if (!data) { if (false) { error("Unknown dataType " + payload.dataType); } return; } toggleHighlight(data, payload, 'normal'); }; /** * Remove self. */ ChartView.prototype.remove = function (ecModel, api) { this.group.removeAll(); }; /** * Dispose self. */ ChartView.prototype.dispose = function (ecModel, api) {}; ChartView.prototype.updateView = function (seriesModel, ecModel, api, payload) { this.render(seriesModel, ecModel, api, payload); }; // FIXME never used? ChartView.prototype.updateLayout = function (seriesModel, ecModel, api, payload) { this.render(seriesModel, ecModel, api, payload); }; // FIXME never used? ChartView.prototype.updateVisual = function (seriesModel, ecModel, api, payload) { this.render(seriesModel, ecModel, api, payload); }; /** * Traverse the new rendered elements. * * It will traverse the new added element in progressive rendering. * And traverse all in normal rendering. */ ChartView.prototype.eachRendered = function (cb) { traverseElements(this.group, cb); }; ChartView.markUpdateMethod = function (payload, methodName) { Chart_inner(payload).updateMethod = methodName; }; ChartView.protoInitialize = function () { var proto = ChartView.prototype; proto.type = 'chart'; }(); return ChartView; }(); ; /** * Set state of single element */ function elSetState(el, state, highlightDigit) { if (el && isHighDownDispatcher(el)) { (state === 'emphasis' ? enterEmphasis : leaveEmphasis)(el, highlightDigit); } } function toggleHighlight(data, payload, state) { var dataIndex = queryDataIndex(data, payload); var highlightDigit = payload && payload.highlightKey != null ? getHighlightDigit(payload.highlightKey) : null; if (dataIndex != null) { Object(core_util["each"])(normalizeToArray(dataIndex), function (dataIdx) { elSetState(data.getItemGraphicEl(dataIdx), state, highlightDigit); }); } else { data.eachItemGraphicEl(function (el) { elSetState(el, state, highlightDigit); }); } } enableClassExtend(Chart_ChartView, ['dispose']); enableClassManagement(Chart_ChartView); function renderTaskPlan(context) { return renderPlanner(context.model); } function renderTaskReset(context) { var seriesModel = context.model; var ecModel = context.ecModel; var api = context.api; var payload = context.payload; // FIXME: remove updateView updateVisual var progressiveRender = seriesModel.pipelineContext.progressiveRender; var view = context.view; var updateMethod = payload && Chart_inner(payload).updateMethod; var methodName = progressiveRender ? 'incrementalPrepareRender' : updateMethod && view[updateMethod] ? updateMethod // `appendData` is also supported when data amount // is less than progressive threshold. : 'render'; if (methodName !== 'render') { view[methodName](seriesModel, ecModel, api, payload); } return progressMethodMap[methodName]; } var progressMethodMap = { incrementalPrepareRender: { progress: function (params, context) { context.view.incrementalRender(params, context.model, context.ecModel, context.api, context.payload); } }, render: { // Put view.render in `progress` to support appendData. But in this case // view.render should not be called in reset, otherwise it will be called // twise. Use `forceFirstProgress` to make sure that view.render is called // in any cases. forceFirstProgress: true, progress: function (params, context) { context.view.render(context.model, context.ecModel, context.api, context.payload); } } }; /* harmony default export */ var Chart = (Chart_ChartView); // CONCATENATED MODULE: ./node_modules/echarts/lib/util/throttle.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 ORIGIN_METHOD = '\0__throttleOriginMethod'; var RATE = '\0__throttleRate'; var THROTTLE_TYPE = '\0__throttleType'; ; /** * @public * @param {(Function)} fn * @param {number} [delay=0] Unit: ms. * @param {boolean} [debounce=false] * true: If call interval less than `delay`, only the last call works. * false: If call interval less than `delay, call works on fixed rate. * @return {(Function)} throttled fn. */ function throttle(fn, delay, debounce) { var currCall; var lastCall = 0; var lastExec = 0; var timer = null; var diff; var scope; var args; var debounceNextCall; delay = delay || 0; function exec() { lastExec = new Date().getTime(); timer = null; fn.apply(scope, args || []); } var cb = function () { var cbArgs = []; for (var _i = 0; _i < arguments.length; _i++) { cbArgs[_i] = arguments[_i]; } currCall = new Date().getTime(); scope = this; args = cbArgs; var thisDelay = debounceNextCall || delay; var thisDebounce = debounceNextCall || debounce; debounceNextCall = null; diff = currCall - (thisDebounce ? lastCall : lastExec) - thisDelay; clearTimeout(timer); // Here we should make sure that: the `exec` SHOULD NOT be called later // than a new call of `cb`, that is, preserving the command order. Consider // calculating "scale rate" when roaming as an example. When a call of `cb` // happens, either the `exec` is called dierectly, or the call is delayed. // But the delayed call should never be later than next call of `cb`. Under // this assurance, we can simply update view state each time `dispatchAction` // triggered by user roaming, but not need to add extra code to avoid the // state being "rolled-back". if (thisDebounce) { timer = setTimeout(exec, thisDelay); } else { if (diff >= 0) { exec(); } else { timer = setTimeout(exec, -diff); } } lastCall = currCall; }; /** * Clear throttle. * @public */ cb.clear = function () { if (timer) { clearTimeout(timer); timer = null; } }; /** * Enable debounce once. */ cb.debounceNextCall = function (debounceDelay) { debounceNextCall = debounceDelay; }; return cb; } /** * Create throttle method or update throttle rate. * * @example * ComponentView.prototype.render = function () { * ... * throttle.createOrUpdate( * this, * '_dispatchAction', * this.model.get('throttle'), * 'fixRate' * ); * }; * ComponentView.prototype.remove = function () { * throttle.clear(this, '_dispatchAction'); * }; * ComponentView.prototype.dispose = function () { * throttle.clear(this, '_dispatchAction'); * }; * */ function createOrUpdate(obj, fnAttr, rate, throttleType) { var fn = obj[fnAttr]; if (!fn) { return; } var originFn = fn[ORIGIN_METHOD] || fn; var lastThrottleType = fn[THROTTLE_TYPE]; var lastRate = fn[RATE]; if (lastRate !== rate || lastThrottleType !== throttleType) { if (rate == null || !throttleType) { return obj[fnAttr] = originFn; } fn = obj[fnAttr] = throttle(originFn, rate, throttleType === 'debounce'); fn[ORIGIN_METHOD] = originFn; fn[THROTTLE_TYPE] = throttleType; fn[RATE] = rate; } return fn; } /** * Clear throttle. Example see throttle.createOrUpdate. */ function clear(obj, fnAttr) { var fn = obj[fnAttr]; if (fn && fn[ORIGIN_METHOD]) { // Clear throttle fn.clear && fn.clear(); obj[fnAttr] = fn[ORIGIN_METHOD]; } } // CONCATENATED MODULE: ./node_modules/echarts/lib/visual/style.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 style_inner = makeInner(); var defaultStyleMappers = { itemStyle: makeStyleMapper(ITEM_STYLE_KEY_MAP, true), lineStyle: makeStyleMapper(LINE_STYLE_KEY_MAP, true) }; var defaultColorKey = { lineStyle: 'stroke', itemStyle: 'fill' }; function getStyleMapper(seriesModel, stylePath) { var styleMapper = seriesModel.visualStyleMapper || defaultStyleMappers[stylePath]; if (!styleMapper) { console.warn("Unknown style type '" + stylePath + "'."); return defaultStyleMappers.itemStyle; } return styleMapper; } function getDefaultColorKey(seriesModel, stylePath) { // return defaultColorKey[stylePath] || var colorKey = seriesModel.visualDrawType || defaultColorKey[stylePath]; if (!colorKey) { console.warn("Unknown style type '" + stylePath + "'."); return 'fill'; } return colorKey; } var seriesStyleTask = { createOnAllSeries: true, performRawSeries: true, reset: function (seriesModel, ecModel) { var data = seriesModel.getData(); var stylePath = seriesModel.visualStyleAccessPath || 'itemStyle'; // Set in itemStyle var styleModel = seriesModel.getModel(stylePath); var getStyle = getStyleMapper(seriesModel, stylePath); var globalStyle = getStyle(styleModel); var decalOption = styleModel.getShallow('decal'); if (decalOption) { data.setVisual('decal', decalOption); decalOption.dirty = true; } // TODO var colorKey = getDefaultColorKey(seriesModel, stylePath); var color = globalStyle[colorKey]; // TODO style callback var colorCallback = Object(core_util["isFunction"])(color) ? color : null; var hasAutoColor = globalStyle.fill === 'auto' || globalStyle.stroke === 'auto'; // Get from color palette by default. if (!globalStyle[colorKey] || colorCallback || hasAutoColor) { // Note: If some series has color specified (e.g., by itemStyle.color), we DO NOT // make it effect palette. Because some scenarios users need to make some series // transparent or as background, which should better not effect the palette. var colorPalette = seriesModel.getColorFromPalette( // TODO series count changed. seriesModel.name, null, ecModel.getSeriesCount()); if (!globalStyle[colorKey]) { globalStyle[colorKey] = colorPalette; data.setVisual('colorFromPalette', true); } globalStyle.fill = globalStyle.fill === 'auto' || Object(core_util["isFunction"])(globalStyle.fill) ? colorPalette : globalStyle.fill; globalStyle.stroke = globalStyle.stroke === 'auto' || Object(core_util["isFunction"])(globalStyle.stroke) ? colorPalette : globalStyle.stroke; } data.setVisual('style', globalStyle); data.setVisual('drawType', colorKey); // Only visible series has each data be visual encoded if (!ecModel.isSeriesFiltered(seriesModel) && colorCallback) { data.setVisual('colorFromPalette', false); return { dataEach: function (data, idx) { var dataParams = seriesModel.getDataParams(idx); var itemStyle = Object(core_util["extend"])({}, globalStyle); itemStyle[colorKey] = colorCallback(dataParams); data.setItemVisual(idx, 'style', itemStyle); } }; } } }; var sharedModel = new model_Model(); var dataStyleTask = { createOnAllSeries: true, performRawSeries: true, reset: function (seriesModel, ecModel) { if (seriesModel.ignoreStyleOnData || ecModel.isSeriesFiltered(seriesModel)) { return; } var data = seriesModel.getData(); var stylePath = seriesModel.visualStyleAccessPath || 'itemStyle'; // Set in itemStyle var getStyle = getStyleMapper(seriesModel, stylePath); var colorKey = data.getVisual('drawType'); return { dataEach: data.hasItemOption ? function (data, idx) { // Not use getItemModel for performance considuration var rawItem = data.getRawDataItem(idx); if (rawItem && rawItem[stylePath]) { sharedModel.option = rawItem[stylePath]; var style = getStyle(sharedModel); var existsStyle = data.ensureUniqueItemVisual(idx, 'style'); Object(core_util["extend"])(existsStyle, style); if (sharedModel.option.decal) { data.setItemVisual(idx, 'decal', sharedModel.option.decal); sharedModel.option.decal.dirty = true; } if (colorKey in style) { data.setItemVisual(idx, 'colorFromPalette', false); } } } : null }; } }; // Pick color from palette for the data which has not been set with color yet. // Note: do not support stream rendering. No such cases yet. var dataColorPaletteTask = { performRawSeries: true, overallReset: function (ecModel) { // Each type of series uses one scope. // Pie and funnel are using different scopes. var paletteScopeGroupByType = Object(core_util["createHashMap"])(); ecModel.eachSeries(function (seriesModel) { var colorBy = seriesModel.getColorBy(); if (seriesModel.isColorBySeries()) { return; } var key = seriesModel.type + '-' + colorBy; var colorScope = paletteScopeGroupByType.get(key); if (!colorScope) { colorScope = {}; paletteScopeGroupByType.set(key, colorScope); } style_inner(seriesModel).scope = colorScope; }); ecModel.eachSeries(function (seriesModel) { if (seriesModel.isColorBySeries() || ecModel.isSeriesFiltered(seriesModel)) { return; } var dataAll = seriesModel.getRawData(); var idxMap = {}; var data = seriesModel.getData(); var colorScope = style_inner(seriesModel).scope; var stylePath = seriesModel.visualStyleAccessPath || 'itemStyle'; var colorKey = getDefaultColorKey(seriesModel, stylePath); data.each(function (idx) { var rawIdx = data.getRawIndex(idx); idxMap[rawIdx] = idx; }); // Iterate on data before filtered. To make sure color from palette can be // Consistent when toggling legend. dataAll.each(function (rawIdx) { var idx = idxMap[rawIdx]; var fromPalette = data.getItemVisual(idx, 'colorFromPalette'); // Get color from palette for each data only when the color is inherited from series color, which is // also picked from color palette. So following situation is not in the case: // 1. series.itemStyle.color is set // 2. color is encoded by visualMap if (fromPalette) { var itemStyle = data.ensureUniqueItemVisual(idx, 'style'); var name_1 = dataAll.getName(rawIdx) || rawIdx + ''; var dataCount = dataAll.count(); itemStyle[colorKey] = seriesModel.getColorFromPalette(name_1, colorScope, dataCount); } }); }); } }; // CONCATENATED MODULE: ./node_modules/echarts/lib/loading/default.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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_PI = Math.PI; /** * @param {module:echarts/ExtensionAPI} api * @param {Object} [opts] * @param {string} [opts.text] * @param {string} [opts.color] * @param {string} [opts.textColor] * @return {module:zrender/Element} */ function defaultLoading(api, opts) { opts = opts || {}; core_util["defaults"](opts, { text: 'loading', textColor: '#000', fontSize: 12, fontWeight: 'normal', fontStyle: 'normal', fontFamily: 'sans-serif', maskColor: 'rgba(255, 255, 255, 0.8)', showSpinner: true, color: '#5470c6', spinnerRadius: 10, lineWidth: 5, zlevel: 0 }); var group = new graphic_Group(); var mask = new shape_Rect({ style: { fill: opts.maskColor }, zlevel: opts.zlevel, z: 10000 }); group.add(mask); var textContent = new Text({ style: { text: opts.text, fill: opts.textColor, fontSize: opts.fontSize, fontWeight: opts.fontWeight, fontStyle: opts.fontStyle, fontFamily: opts.fontFamily }, zlevel: opts.zlevel, z: 10001 }); var labelRect = new shape_Rect({ style: { fill: 'none' }, textContent: textContent, textConfig: { position: 'right', distance: 10 }, zlevel: opts.zlevel, z: 10001 }); group.add(labelRect); var arc; if (opts.showSpinner) { arc = new shape_Arc({ shape: { startAngle: -default_PI / 2, endAngle: -default_PI / 2 + 0.1, r: opts.spinnerRadius }, style: { stroke: opts.color, lineCap: 'round', lineWidth: opts.lineWidth }, zlevel: opts.zlevel, z: 10001 }); arc.animateShape(true).when(1000, { endAngle: default_PI * 3 / 2 }).start('circularInOut'); arc.animateShape(true).when(1000, { startAngle: default_PI * 3 / 2 }).delay(300).start('circularInOut'); group.add(arc); } // Inject resize group.resize = function () { var textWidth = textContent.getBoundingRect().width; var r = opts.showSpinner ? opts.spinnerRadius : 0; // cx = (containerWidth - arcDiameter - textDistance - textWidth) / 2 // textDistance needs to be calculated when both animation and text exist var cx = (api.getWidth() - r * 2 - (opts.showSpinner && textWidth ? 10 : 0) - textWidth) / 2 - (opts.showSpinner && textWidth ? 0 : 5 + textWidth / 2) // only show the text + (opts.showSpinner ? 0 : textWidth / 2) // only show the spinner + (textWidth ? 0 : r); var cy = api.getHeight() / 2; opts.showSpinner && arc.setShape({ cx: cx, cy: cy }); labelRect.setShape({ x: cx - r, y: cy - r, width: r * 2, height: r * 2 }); mask.setShape({ x: 0, y: 0, width: api.getWidth(), height: api.getHeight() }); }; group.resize(); return group; } // CONCATENATED MODULE: ./node_modules/echarts/lib/core/Scheduler.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 Scheduler_Scheduler = /** @class */function () { function Scheduler(ecInstance, api, dataProcessorHandlers, visualHandlers) { // key: handlerUID this._stageTaskMap = Object(core_util["createHashMap"])(); this.ecInstance = ecInstance; this.api = api; // Fix current processors in case that in some rear cases that // processors might be registered after echarts instance created. // Register processors incrementally for a echarts instance is // not supported by this stream architecture. dataProcessorHandlers = this._dataProcessorHandlers = dataProcessorHandlers.slice(); visualHandlers = this._visualHandlers = visualHandlers.slice(); this._allHandlers = dataProcessorHandlers.concat(visualHandlers); } Scheduler.prototype.restoreData = function (ecModel, payload) { // TODO: Only restore needed series and components, but not all components. // Currently `restoreData` of all of the series and component will be called. // But some independent components like `title`, `legend`, `graphic`, `toolbox`, // `tooltip`, `axisPointer`, etc, do not need series refresh when `setOption`, // and some components like coordinate system, axes, dataZoom, visualMap only // need their target series refresh. // (1) If we are implementing this feature some day, we should consider these cases: // if a data processor depends on a component (e.g., dataZoomProcessor depends // on the settings of `dataZoom`), it should be re-performed if the component // is modified by `setOption`. // (2) If a processor depends on sevral series, speicified by its `getTargetSeries`, // it should be re-performed when the result array of `getTargetSeries` changed. // We use `dependencies` to cover these issues. // (3) How to update target series when coordinate system related components modified. // TODO: simply the dirty mechanism? Check whether only the case here can set tasks dirty, // and this case all of the tasks will be set as dirty. ecModel.restoreData(payload); // Theoretically an overall task not only depends on each of its target series, but also // depends on all of the series. // The overall task is not in pipeline, and `ecModel.restoreData` only set pipeline tasks // dirty. If `getTargetSeries` of an overall task returns nothing, we should also ensure // that the overall task is set as dirty and to be performed, otherwise it probably cause // state chaos. So we have to set dirty of all of the overall tasks manually, otherwise it // probably cause state chaos (consider `dataZoomProcessor`). this._stageTaskMap.each(function (taskRecord) { var overallTask = taskRecord.overallTask; overallTask && overallTask.dirty(); }); }; // If seriesModel provided, incremental threshold is check by series data. Scheduler.prototype.getPerformArgs = function (task, isBlock) { // For overall task if (!task.__pipeline) { return; } var pipeline = this._pipelineMap.get(task.__pipeline.id); var pCtx = pipeline.context; var incremental = !isBlock && pipeline.progressiveEnabled && (!pCtx || pCtx.progressiveRender) && task.__idxInPipeline > pipeline.blockIndex; var step = incremental ? pipeline.step : null; var modDataCount = pCtx && pCtx.modDataCount; var modBy = modDataCount != null ? Math.ceil(modDataCount / step) : null; return { step: step, modBy: modBy, modDataCount: modDataCount }; }; Scheduler.prototype.getPipeline = function (pipelineId) { return this._pipelineMap.get(pipelineId); }; /** * Current, progressive rendering starts from visual and layout. * Always detect render mode in the same stage, avoiding that incorrect * detection caused by data filtering. * Caution: * `updateStreamModes` use `seriesModel.getData()`. */ Scheduler.prototype.updateStreamModes = function (seriesModel, view) { var pipeline = this._pipelineMap.get(seriesModel.uid); var data = seriesModel.getData(); var dataLen = data.count(); // `progressiveRender` means that can render progressively in each // animation frame. Note that some types of series do not provide // `view.incrementalPrepareRender` but support `chart.appendData`. We // use the term `incremental` but not `progressive` to describe the // case that `chart.appendData`. var progressiveRender = pipeline.progressiveEnabled && view.incrementalPrepareRender && dataLen >= pipeline.threshold; var large = seriesModel.get('large') && dataLen >= seriesModel.get('largeThreshold'); // TODO: modDataCount should not updated if `appendData`, otherwise cause whole repaint. // see `test/candlestick-large3.html` var modDataCount = seriesModel.get('progressiveChunkMode') === 'mod' ? dataLen : null; seriesModel.pipelineContext = pipeline.context = { progressiveRender: progressiveRender, modDataCount: modDataCount, large: large }; }; Scheduler.prototype.restorePipelines = function (ecModel) { var scheduler = this; var pipelineMap = scheduler._pipelineMap = Object(core_util["createHashMap"])(); ecModel.eachSeries(function (seriesModel) { var progressive = seriesModel.getProgressive(); var pipelineId = seriesModel.uid; pipelineMap.set(pipelineId, { id: pipelineId, head: null, tail: null, threshold: seriesModel.getProgressiveThreshold(), progressiveEnabled: progressive && !(seriesModel.preventIncremental && seriesModel.preventIncremental()), blockIndex: -1, step: Math.round(progressive || 700), count: 0 }); scheduler._pipe(seriesModel, seriesModel.dataTask); }); }; Scheduler.prototype.prepareStageTasks = function () { var stageTaskMap = this._stageTaskMap; var ecModel = this.api.getModel(); var api = this.api; Object(core_util["each"])(this._allHandlers, function (handler) { var record = stageTaskMap.get(handler.uid) || stageTaskMap.set(handler.uid, {}); var errMsg = ''; if (false) { // Currently do not need to support to sepecify them both. errMsg = '"reset" and "overallReset" must not be both specified.'; } Object(core_util["assert"])(!(handler.reset && handler.overallReset), errMsg); handler.reset && this._createSeriesStageTask(handler, record, ecModel, api); handler.overallReset && this._createOverallStageTask(handler, record, ecModel, api); }, this); }; Scheduler.prototype.prepareView = function (view, model, ecModel, api) { var renderTask = view.renderTask; var context = renderTask.context; context.model = model; context.ecModel = ecModel; context.api = api; renderTask.__block = !view.incrementalPrepareRender; this._pipe(model, renderTask); }; Scheduler.prototype.performDataProcessorTasks = function (ecModel, payload) { // If we do not use `block` here, it should be considered when to update modes. this._performStageTasks(this._dataProcessorHandlers, ecModel, payload, { block: true }); }; Scheduler.prototype.performVisualTasks = function (ecModel, payload, opt) { this._performStageTasks(this._visualHandlers, ecModel, payload, opt); }; Scheduler.prototype._performStageTasks = function (stageHandlers, ecModel, payload, opt) { opt = opt || {}; var unfinished = false; var scheduler = this; Object(core_util["each"])(stageHandlers, function (stageHandler, idx) { if (opt.visualType && opt.visualType !== stageHandler.visualType) { return; } var stageHandlerRecord = scheduler._stageTaskMap.get(stageHandler.uid); var seriesTaskMap = stageHandlerRecord.seriesTaskMap; var overallTask = stageHandlerRecord.overallTask; if (overallTask) { var overallNeedDirty_1; var agentStubMap = overallTask.agentStubMap; agentStubMap.each(function (stub) { if (needSetDirty(opt, stub)) { stub.dirty(); overallNeedDirty_1 = true; } }); overallNeedDirty_1 && overallTask.dirty(); scheduler.updatePayload(overallTask, payload); var performArgs_1 = scheduler.getPerformArgs(overallTask, opt.block); // Execute stubs firstly, which may set the overall task dirty, // then execute the overall task. And stub will call seriesModel.setData, // which ensures that in the overallTask seriesModel.getData() will not // return incorrect data. agentStubMap.each(function (stub) { stub.perform(performArgs_1); }); if (overallTask.perform(performArgs_1)) { unfinished = true; } } else if (seriesTaskMap) { seriesTaskMap.each(function (task, pipelineId) { if (needSetDirty(opt, task)) { task.dirty(); } var performArgs = scheduler.getPerformArgs(task, opt.block); // FIXME // if intending to declare `performRawSeries` in handlers, only // stream-independent (specifically, data item independent) operations can be // performed. Because if a series is filtered, most of the tasks will not // be performed. A stream-dependent operation probably cause wrong biz logic. // Perhaps we should not provide a separate callback for this case instead // of providing the config `performRawSeries`. The stream-dependent operations // and stream-independent operations should better not be mixed. performArgs.skip = !stageHandler.performRawSeries && ecModel.isSeriesFiltered(task.context.model); scheduler.updatePayload(task, payload); if (task.perform(performArgs)) { unfinished = true; } }); } }); function needSetDirty(opt, task) { return opt.setDirty && (!opt.dirtyMap || opt.dirtyMap.get(task.__pipeline.id)); } this.unfinished = unfinished || this.unfinished; }; Scheduler.prototype.performSeriesTasks = function (ecModel) { var unfinished; ecModel.eachSeries(function (seriesModel) { // Progress to the end for dataInit and dataRestore. unfinished = seriesModel.dataTask.perform() || unfinished; }); this.unfinished = unfinished || this.unfinished; }; Scheduler.prototype.plan = function () { // Travel pipelines, check block. this._pipelineMap.each(function (pipeline) { var task = pipeline.tail; do { if (task.__block) { pipeline.blockIndex = task.__idxInPipeline; break; } task = task.getUpstream(); } while (task); }); }; Scheduler.prototype.updatePayload = function (task, payload) { payload !== 'remain' && (task.context.payload = payload); }; Scheduler.prototype._createSeriesStageTask = function (stageHandler, stageHandlerRecord, ecModel, api) { var scheduler = this; var oldSeriesTaskMap = stageHandlerRecord.seriesTaskMap; // The count of stages are totally about only several dozen, so // do not need to reuse the map. var newSeriesTaskMap = stageHandlerRecord.seriesTaskMap = Object(core_util["createHashMap"])(); var seriesType = stageHandler.seriesType; var getTargetSeries = stageHandler.getTargetSeries; // If a stageHandler should cover all series, `createOnAllSeries` should be declared mandatorily, // to avoid some typo or abuse. Otherwise if an extension do not specify a `seriesType`, // it works but it may cause other irrelevant charts blocked. if (stageHandler.createOnAllSeries) { ecModel.eachRawSeries(create); } else if (seriesType) { ecModel.eachRawSeriesByType(seriesType, create); } else if (getTargetSeries) { getTargetSeries(ecModel, api).each(create); } function create(seriesModel) { var pipelineId = seriesModel.uid; // Init tasks for each seriesModel only once. // Reuse original task instance. var task = newSeriesTaskMap.set(pipelineId, oldSeriesTaskMap && oldSeriesTaskMap.get(pipelineId) || createTask({ plan: seriesTaskPlan, reset: seriesTaskReset, count: seriesTaskCount })); task.context = { model: seriesModel, ecModel: ecModel, api: api, // PENDING: `useClearVisual` not used? useClearVisual: stageHandler.isVisual && !stageHandler.isLayout, plan: stageHandler.plan, reset: stageHandler.reset, scheduler: scheduler }; scheduler._pipe(seriesModel, task); } }; Scheduler.prototype._createOverallStageTask = function (stageHandler, stageHandlerRecord, ecModel, api) { var scheduler = this; var overallTask = stageHandlerRecord.overallTask = stageHandlerRecord.overallTask // For overall task, the function only be called on reset stage. || createTask({ reset: overallTaskReset }); overallTask.context = { ecModel: ecModel, api: api, overallReset: stageHandler.overallReset, scheduler: scheduler }; var oldAgentStubMap = overallTask.agentStubMap; // The count of stages are totally about only several dozen, so // do not need to reuse the map. var newAgentStubMap = overallTask.agentStubMap = Object(core_util["createHashMap"])(); var seriesType = stageHandler.seriesType; var getTargetSeries = stageHandler.getTargetSeries; var overallProgress = true; var shouldOverallTaskDirty = false; // FIXME:TS never used, so comment it // let modifyOutputEnd = stageHandler.modifyOutputEnd; // An overall task with seriesType detected or has `getTargetSeries`, we add // stub in each pipelines, it will set the overall task dirty when the pipeline // progress. Moreover, to avoid call the overall task each frame (too frequent), // we set the pipeline block. var errMsg = ''; if (false) { errMsg = '"createOnAllSeries" is not supported for "overallReset", ' + 'because it will block all streams.'; } Object(core_util["assert"])(!stageHandler.createOnAllSeries, errMsg); if (seriesType) { ecModel.eachRawSeriesByType(seriesType, createStub); } else if (getTargetSeries) { getTargetSeries(ecModel, api).each(createStub); } // Otherwise, (usually it is legacy case), the overall task will only be // executed when upstream is dirty. Otherwise the progressive rendering of all // pipelines will be disabled unexpectedly. But it still needs stubs to receive // dirty info from upstream. else { overallProgress = false; Object(core_util["each"])(ecModel.getSeries(), createStub); } function createStub(seriesModel) { var pipelineId = seriesModel.uid; var stub = newAgentStubMap.set(pipelineId, oldAgentStubMap && oldAgentStubMap.get(pipelineId) || ( // When the result of `getTargetSeries` changed, the overallTask // should be set as dirty and re-performed. shouldOverallTaskDirty = true, createTask({ reset: stubReset, onDirty: stubOnDirty }))); stub.context = { model: seriesModel, overallProgress: overallProgress // FIXME:TS never used, so comment it // modifyOutputEnd: modifyOutputEnd }; stub.agent = overallTask; stub.__block = overallProgress; scheduler._pipe(seriesModel, stub); } if (shouldOverallTaskDirty) { overallTask.dirty(); } }; Scheduler.prototype._pipe = function (seriesModel, task) { var pipelineId = seriesModel.uid; var pipeline = this._pipelineMap.get(pipelineId); !pipeline.head && (pipeline.head = task); pipeline.tail && pipeline.tail.pipe(task); pipeline.tail = task; task.__idxInPipeline = pipeline.count++; task.__pipeline = pipeline; }; Scheduler.wrapStageHandler = function (stageHandler, visualType) { if (Object(core_util["isFunction"])(stageHandler)) { stageHandler = { overallReset: stageHandler, seriesType: detectSeriseType(stageHandler) }; } stageHandler.uid = getUID('stageHandler'); visualType && (stageHandler.visualType = visualType); return stageHandler; }; ; return Scheduler; }(); function overallTaskReset(context) { context.overallReset(context.ecModel, context.api, context.payload); } function stubReset(context) { return context.overallProgress && stubProgress; } function stubProgress() { this.agent.dirty(); this.getDownstream().dirty(); } function stubOnDirty() { this.agent && this.agent.dirty(); } function seriesTaskPlan(context) { return context.plan ? context.plan(context.model, context.ecModel, context.api, context.payload) : null; } function seriesTaskReset(context) { if (context.useClearVisual) { context.data.clearAllVisual(); } var resetDefines = context.resetDefines = normalizeToArray(context.reset(context.model, context.ecModel, context.api, context.payload)); return resetDefines.length > 1 ? Object(core_util["map"])(resetDefines, function (v, idx) { return makeSeriesTaskProgress(idx); }) : singleSeriesTaskProgress; } var singleSeriesTaskProgress = makeSeriesTaskProgress(0); function makeSeriesTaskProgress(resetDefineIdx) { return function (params, context) { var data = context.data; var resetDefine = context.resetDefines[resetDefineIdx]; if (resetDefine && resetDefine.dataEach) { for (var i = params.start; i < params.end; i++) { resetDefine.dataEach(data, i); } } else if (resetDefine && resetDefine.progress) { resetDefine.progress(params, data); } }; } function seriesTaskCount(context) { return context.data.count(); } /** * Only some legacy stage handlers (usually in echarts extensions) are pure function. * To ensure that they can work normally, they should work in block mode, that is, * they should not be started util the previous tasks finished. So they cause the * progressive rendering disabled. We try to detect the series type, to narrow down * the block range to only the series type they concern, but not all series. */ function detectSeriseType(legacyFunc) { Scheduler_seriesType = null; try { // Assume there is no async when calling `eachSeriesByType`. legacyFunc(ecModelMock, apiMock); } catch (e) {} return Scheduler_seriesType; } var ecModelMock = {}; var apiMock = {}; var Scheduler_seriesType; mockMethods(ecModelMock, Global); mockMethods(apiMock, core_ExtensionAPI); ecModelMock.eachSeriesByType = ecModelMock.eachRawSeriesByType = function (type) { Scheduler_seriesType = type; }; ecModelMock.eachComponent = function (cond) { if (cond.mainType === 'series' && cond.subType) { Scheduler_seriesType = cond.subType; } }; function mockMethods(target, Clz) { /* eslint-disable */ for (var name_1 in Clz.prototype) { // Do not use hasOwnProperty target[name_1] = core_util["noop"]; } /* eslint-enable */ } /* harmony default export */ var core_Scheduler = (Scheduler_Scheduler); // CONCATENATED MODULE: ./node_modules/echarts/lib/theme/light.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 colorAll = ['#37A2DA', '#32C5E9', '#67E0E3', '#9FE6B8', '#FFDB5C', '#ff9f7f', '#fb7293', '#E062AE', '#E690D1', '#e7bcf3', '#9d96f5', '#8378EA', '#96BFFF']; /* harmony default export */ var light = ({ color: colorAll, colorLayer: [['#37A2DA', '#ffd85c', '#fd7b5f'], ['#37A2DA', '#67E0E3', '#FFDB5C', '#ff9f7f', '#E062AE', '#9d96f5'], ['#37A2DA', '#32C5E9', '#9FE6B8', '#FFDB5C', '#ff9f7f', '#fb7293', '#e7bcf3', '#8378EA', '#96BFFF'], colorAll] }); // CONCATENATED MODULE: ./node_modules/echarts/lib/theme/dark.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 contrastColor = '#B9B8CE'; var dark_backgroundColor = '#100C2A'; var axisCommon = function () { return { axisLine: { lineStyle: { color: contrastColor } }, splitLine: { lineStyle: { color: '#484753' } }, splitArea: { areaStyle: { color: ['rgba(255,255,255,0.02)', 'rgba(255,255,255,0.05)'] } }, minorSplitLine: { lineStyle: { color: '#20203B' } } }; }; var dark_colorPalette = ['#4992ff', '#7cffb2', '#fddd60', '#ff6e76', '#58d9f9', '#05c091', '#ff8a45', '#8d48e3', '#dd79ff']; var dark_theme = { darkMode: true, color: dark_colorPalette, backgroundColor: dark_backgroundColor, axisPointer: { lineStyle: { color: '#817f91' }, crossStyle: { color: '#817f91' }, label: { // TODO Contrast of label backgorundColor color: '#fff' } }, legend: { textStyle: { color: contrastColor }, pageTextStyle: { color: contrastColor } }, textStyle: { color: contrastColor }, title: { textStyle: { color: '#EEF1FA' }, subtextStyle: { color: '#B9B8CE' } }, toolbox: { iconStyle: { borderColor: contrastColor } }, dataZoom: { borderColor: '#71708A', textStyle: { color: contrastColor }, brushStyle: { color: 'rgba(135,163,206,0.3)' }, handleStyle: { color: '#353450', borderColor: '#C5CBE3' }, moveHandleStyle: { color: '#B0B6C3', opacity: 0.3 }, fillerColor: 'rgba(135,163,206,0.2)', emphasis: { handleStyle: { borderColor: '#91B7F2', color: '#4D587D' }, moveHandleStyle: { color: '#636D9A', opacity: 0.7 } }, dataBackground: { lineStyle: { color: '#71708A', width: 1 }, areaStyle: { color: '#71708A' } }, selectedDataBackground: { lineStyle: { color: '#87A3CE' }, areaStyle: { color: '#87A3CE' } } }, visualMap: { textStyle: { color: contrastColor } }, timeline: { lineStyle: { color: contrastColor }, label: { color: contrastColor }, controlStyle: { color: contrastColor, borderColor: contrastColor } }, calendar: { itemStyle: { color: dark_backgroundColor }, dayLabel: { color: contrastColor }, monthLabel: { color: contrastColor }, yearLabel: { color: contrastColor } }, timeAxis: axisCommon(), logAxis: axisCommon(), valueAxis: axisCommon(), categoryAxis: axisCommon(), line: { symbol: 'circle' }, graph: { color: dark_colorPalette }, gauge: { title: { color: contrastColor }, axisLine: { lineStyle: { color: [[1, 'rgba(207,212,219,0.2)']] } }, axisLabel: { color: contrastColor }, detail: { color: '#EEF1FA' } }, candlestick: { itemStyle: { color: '#f64e56', color0: '#54ea92', borderColor: '#f64e56', borderColor0: '#54ea92' // borderColor: '#ca2824', // borderColor0: '#09a443' } } }; dark_theme.categoryAxis.splitLine.show = false; /* harmony default export */ var dark = (dark_theme); // CONCATENATED MODULE: ./node_modules/echarts/lib/util/ECEventProcessor.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ /** * Usage of query: * `chart.on('click', query, handler);` * The `query` can be: * + The component type query string, only `mainType` or `mainType.subType`, * like: 'xAxis', 'series', 'xAxis.category' or 'series.line'. * + The component query object, like: * `{seriesIndex: 2}`, `{seriesName: 'xx'}`, `{seriesId: 'some'}`, * `{xAxisIndex: 2}`, `{xAxisName: 'xx'}`, `{xAxisId: 'some'}`. * + The data query object, like: * `{dataIndex: 123}`, `{dataType: 'link'}`, `{name: 'some'}`. * + The other query object (cmponent customized query), like: * `{element: 'some'}` (only available in custom series). * * Caveat: If a prop in the `query` object is `null/undefined`, it is the * same as there is no such prop in the `query` object. */ var ECEventProcessor_ECEventProcessor = /** @class */function () { function ECEventProcessor() {} ECEventProcessor.prototype.normalizeQuery = function (query) { var cptQuery = {}; var dataQuery = {}; var otherQuery = {}; // `query` is `mainType` or `mainType.subType` of component. if (core_util["isString"](query)) { var condCptType = parseClassType(query); // `.main` and `.sub` may be ''. cptQuery.mainType = condCptType.main || null; cptQuery.subType = condCptType.sub || null; } // `query` is an object, convert to {mainType, index, name, id}. else { // `xxxIndex`, `xxxName`, `xxxId`, `name`, `dataIndex`, `dataType` is reserved, // can not be used in `compomentModel.filterForExposedEvent`. var suffixes_1 = ['Index', 'Name', 'Id']; var dataKeys_1 = { name: 1, dataIndex: 1, dataType: 1 }; core_util["each"](query, function (val, key) { var reserved = false; for (var i = 0; i < suffixes_1.length; i++) { var propSuffix = suffixes_1[i]; var suffixPos = key.lastIndexOf(propSuffix); if (suffixPos > 0 && suffixPos === key.length - propSuffix.length) { var mainType = key.slice(0, suffixPos); // Consider `dataIndex`. if (mainType !== 'data') { cptQuery.mainType = mainType; cptQuery[propSuffix.toLowerCase()] = val; reserved = true; } } } if (dataKeys_1.hasOwnProperty(key)) { dataQuery[key] = val; reserved = true; } if (!reserved) { otherQuery[key] = val; } }); } return { cptQuery: cptQuery, dataQuery: dataQuery, otherQuery: otherQuery }; }; ECEventProcessor.prototype.filter = function (eventType, query) { // They should be assigned before each trigger call. var eventInfo = this.eventInfo; if (!eventInfo) { return true; } var targetEl = eventInfo.targetEl; var packedEvent = eventInfo.packedEvent; var model = eventInfo.model; var view = eventInfo.view; // For event like 'globalout'. if (!model || !view) { return true; } var cptQuery = query.cptQuery; var dataQuery = query.dataQuery; return check(cptQuery, model, 'mainType') && check(cptQuery, model, 'subType') && check(cptQuery, model, 'index', 'componentIndex') && check(cptQuery, model, 'name') && check(cptQuery, model, 'id') && check(dataQuery, packedEvent, 'name') && check(dataQuery, packedEvent, 'dataIndex') && check(dataQuery, packedEvent, 'dataType') && (!view.filterForExposedEvent || view.filterForExposedEvent(eventType, query.otherQuery, targetEl, packedEvent)); function check(query, host, prop, propOnHost) { return query[prop] == null || host[propOnHost || prop] === query[prop]; } }; ECEventProcessor.prototype.afterTrigger = function () { // Make sure the eventInfo won't be used in next trigger. this.eventInfo = null; }; return ECEventProcessor; }(); ; // CONCATENATED MODULE: ./node_modules/echarts/lib/visual/symbol.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 SYMBOL_PROPS_WITH_CB = ['symbol', 'symbolSize', 'symbolRotate', 'symbolOffset']; var SYMBOL_PROPS = SYMBOL_PROPS_WITH_CB.concat(['symbolKeepAspect']); // Encoding visual for all series include which is filtered for legend drawing var seriesSymbolTask = { createOnAllSeries: true, // For legend. performRawSeries: true, reset: function (seriesModel, ecModel) { var data = seriesModel.getData(); if (seriesModel.legendIcon) { data.setVisual('legendIcon', seriesModel.legendIcon); } if (!seriesModel.hasSymbolVisual) { return; } var symbolOptions = {}; var symbolOptionsCb = {}; var hasCallback = false; for (var i = 0; i < SYMBOL_PROPS_WITH_CB.length; i++) { var symbolPropName = SYMBOL_PROPS_WITH_CB[i]; var val = seriesModel.get(symbolPropName); if (Object(core_util["isFunction"])(val)) { hasCallback = true; symbolOptionsCb[symbolPropName] = val; } else { symbolOptions[symbolPropName] = val; } } symbolOptions.symbol = symbolOptions.symbol || seriesModel.defaultSymbol; data.setVisual(Object(core_util["extend"])({ legendIcon: seriesModel.legendIcon || symbolOptions.symbol, symbolKeepAspect: seriesModel.get('symbolKeepAspect') }, symbolOptions)); // Only visible series has each data be visual encoded if (ecModel.isSeriesFiltered(seriesModel)) { return; } var symbolPropsCb = Object(core_util["keys"])(symbolOptionsCb); function dataEach(data, idx) { var rawValue = seriesModel.getRawValue(idx); var params = seriesModel.getDataParams(idx); for (var i = 0; i < symbolPropsCb.length; i++) { var symbolPropName = symbolPropsCb[i]; data.setItemVisual(idx, symbolPropName, symbolOptionsCb[symbolPropName](rawValue, params)); } } return { dataEach: hasCallback ? dataEach : null }; } }; var dataSymbolTask = { createOnAllSeries: true, // For legend. performRawSeries: true, reset: function (seriesModel, ecModel) { if (!seriesModel.hasSymbolVisual) { return; } // Only visible series has each data be visual encoded if (ecModel.isSeriesFiltered(seriesModel)) { return; } var data = seriesModel.getData(); function dataEach(data, idx) { var itemModel = data.getItemModel(idx); for (var i = 0; i < SYMBOL_PROPS.length; i++) { var symbolPropName = SYMBOL_PROPS[i]; var val = itemModel.getShallow(symbolPropName, true); if (val != null) { data.setItemVisual(idx, symbolPropName, val); } } } return { dataEach: data.hasItemOption ? dataEach : null }; } }; // CONCATENATED MODULE: ./node_modules/echarts/lib/visual/helper.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 getItemVisualFromData(data, dataIndex, key) { switch (key) { case 'color': var style = data.getItemVisual(dataIndex, 'style'); return style[data.getVisual('drawType')]; case 'opacity': return data.getItemVisual(dataIndex, 'style').opacity; case 'symbol': case 'symbolSize': case 'liftZ': return data.getItemVisual(dataIndex, key); default: if (false) { console.warn("Unknown visual type " + key); } } } function getVisualFromData(data, key) { switch (key) { case 'color': var style = data.getVisual('style'); return style[data.getVisual('drawType')]; case 'opacity': return data.getVisual('style').opacity; case 'symbol': case 'symbolSize': case 'liftZ': return data.getVisual(key); default: if (false) { console.warn("Unknown visual type " + key); } } } function setItemVisualFromData(data, dataIndex, key, value) { switch (key) { case 'color': // Make sure not sharing style object. var style = data.ensureUniqueItemVisual(dataIndex, 'style'); style[data.getVisual('drawType')] = value; // Mark the color has been changed, not from palette anymore data.setItemVisual(dataIndex, 'colorFromPalette', false); break; case 'opacity': data.ensureUniqueItemVisual(dataIndex, 'style').opacity = value; break; case 'symbol': case 'symbolSize': case 'liftZ': data.setItemVisual(dataIndex, key, value); break; default: if (false) { console.warn("Unknown visual type " + key); } } } // CONCATENATED MODULE: ./node_modules/echarts/lib/legacy/dataSelectAction.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ // Legacy data selection action. // Includes: pieSelect, pieUnSelect, pieToggleSelect, mapSelect, mapUnSelect, mapToggleSelect function createLegacyDataSelectAction(seriesType, ecRegisterAction) { function getSeriesIndices(ecModel, payload) { var seriesIndices = []; ecModel.eachComponent({ mainType: 'series', subType: seriesType, query: payload }, function (seriesModel) { seriesIndices.push(seriesModel.seriesIndex); }); return seriesIndices; } Object(core_util["each"])([[seriesType + 'ToggleSelect', 'toggleSelect'], [seriesType + 'Select', 'select'], [seriesType + 'UnSelect', 'unselect']], function (eventsMap) { ecRegisterAction(eventsMap[0], function (payload, ecModel, api) { payload = Object(core_util["extend"])({}, payload); if (false) { deprecateReplaceLog(payload.type, eventsMap[1]); } api.dispatchAction(Object(core_util["extend"])(payload, { type: eventsMap[1], seriesIndex: getSeriesIndices(ecModel, payload) })); }); }); } function handleSeriesLegacySelectEvents(type, eventPostfix, ecIns, ecModel, payload) { var legacyEventName = type + eventPostfix; if (!ecIns.isSilent(legacyEventName)) { if (false) { deprecateLog("event " + legacyEventName + " is deprecated."); } ecModel.eachComponent({ mainType: 'series', subType: 'pie' }, function (seriesModel) { var seriesIndex = seriesModel.seriesIndex; var selectedMap = seriesModel.option.selectedMap; var selected = payload.selected; for (var i = 0; i < selected.length; i++) { if (selected[i].seriesIndex === seriesIndex) { var data = seriesModel.getData(); var dataIndex = queryDataIndex(data, payload.fromActionPayload); ecIns.trigger(legacyEventName, { type: legacyEventName, seriesId: seriesModel.id, name: Object(core_util["isArray"])(dataIndex) ? data.getName(dataIndex[0]) : data.getName(dataIndex), selected: Object(core_util["isString"])(selectedMap) ? selectedMap : Object(core_util["extend"])({}, selectedMap) }); } } }); } } function handleLegacySelectEvents(messageCenter, ecIns, api) { messageCenter.on('selectchanged', function (params) { var ecModel = api.getModel(); if (params.isFromClick) { handleSeriesLegacySelectEvents('map', 'selectchanged', ecIns, ecModel, params); handleSeriesLegacySelectEvents('pie', 'selectchanged', ecIns, ecModel, params); } else if (params.fromAction === 'select') { handleSeriesLegacySelectEvents('map', 'selected', ecIns, ecModel, params); handleSeriesLegacySelectEvents('pie', 'selected', ecIns, ecModel, params); } else if (params.fromAction === 'unselect') { handleSeriesLegacySelectEvents('map', 'unselected', ecIns, ecModel, params); handleSeriesLegacySelectEvents('pie', 'unselected', ecIns, ecModel, params); } }); } // CONCATENATED MODULE: ./node_modules/echarts/lib/util/event.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 findEventDispatcher(target, det, returnFirstMatch) { var found; while (target) { if (det(target)) { found = target; if (returnFirstMatch) { break; } } target = target.__hostTarget || target.parent; } return found; } // CONCATENATED MODULE: ./node_modules/zrender/lib/core/WeakMap.js var wmUniqueIndex = Math.round(Math.random() * 9); var supportDefineProperty = typeof Object.defineProperty === 'function'; var WeakMap = (function () { function WeakMap() { this._id = '__ec_inner_' + wmUniqueIndex++; } WeakMap.prototype.get = function (key) { return this._guard(key)[this._id]; }; WeakMap.prototype.set = function (key, value) { var target = this._guard(key); if (supportDefineProperty) { Object.defineProperty(target, this._id, { value: value, enumerable: false, configurable: true }); } else { target[this._id] = value; } return this; }; WeakMap.prototype["delete"] = function (key) { if (this.has(key)) { delete this._guard(key)[this._id]; return true; } return false; }; WeakMap.prototype.has = function (key) { return !!this._guard(key)[this._id]; }; WeakMap.prototype._guard = function (key) { if (key !== Object(key)) { throw TypeError('Value of WeakMap is not a non-null object.'); } return key; }; return WeakMap; }()); /* harmony default export */ var core_WeakMap = (WeakMap); // CONCATENATED MODULE: ./node_modules/echarts/lib/util/symbol.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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_Path.extend({ 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_Path.extend({ 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_Path.extend({ 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_Path.extend({ 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 constructors */ // TODO Use function to build symbol path. var symbolCtors = { line: shape_Line, rect: shape_Rect, roundRect: shape_Rect, square: shape_Rect, circle: shape_Circle, diamond: Diamond, pin: Pin, arrow: Arrow, triangle: Triangle }; var symbolShapeMakers = { line: function (x, y, w, h, shape) { 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 = {}; Object(core_util["each"])(symbolCtors, function (Ctor, name) { symbolBuildProxies[name] = new Ctor(); }); var SymbolClz = graphic_Path.extend({ type: 'symbol', shape: { symbolType: '', x: 0, y: 0, width: 0, height: 0 }, calculateTextPosition: function (out, config, rect) { var res = calculateTextPosition(out, config, rect); var shape = this.shape; if (shape && shape.symbolType === 'pin' && config.position === '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; if (this.__isEmptyBrush) { symbolStyle.stroke = color; symbolStyle.fill = innerColor || '#fff'; // TODO Same width with lineStyle in LineView symbolStyle.lineWidth = 2; } else if (this.shape.symbolType === 'line') { symbolStyle.stroke = color; } else { symbolStyle.fill = color; } this.markRedraw(); } } /** * Create a symbol element with given symbol configuration: shape, x, y, width, height, color */ function symbol_createSymbol(symbolType, x, y, w, h, color, // whether to keep the ratio of w/h, 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 = makeImage(symbolType.slice(8), new core_BoundingRect(x, y, w, h), keepAspect ? 'center' : 'cover'); } else if (symbolType.indexOf('path://') === 0) { symbolPath = makePath(symbolType.slice(7), {}, new core_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; // TODO Should deprecate setColor symbolPath.setColor = symbolPathSetColor; if (color) { symbolPath.setColor(color); } return symbolPath; } function normalizeSymbolSize(symbolSize) { if (!Object(core_util["isArray"])(symbolSize)) { symbolSize = [+symbolSize, +symbolSize]; } return [symbolSize[0] || 0, symbolSize[1] || 0]; } function normalizeSymbolOffset(symbolOffset, symbolSize) { if (symbolOffset == null) { return; } if (!Object(core_util["isArray"])(symbolOffset)) { symbolOffset = [symbolOffset, symbolOffset]; } return [number_parsePercent(symbolOffset[0], symbolSize[0]) || 0, number_parsePercent(Object(core_util["retrieve2"])(symbolOffset[1], symbolOffset[0]), symbolSize[1]) || 0]; } // CONCATENATED MODULE: ./node_modules/zrender/lib/canvas/helper.js function isSafeNum(num) { return isFinite(num); } function createLinearGradient(ctx, obj, rect) { var x = obj.x == null ? 0 : obj.x; var x2 = obj.x2 == null ? 1 : obj.x2; var y = obj.y == null ? 0 : obj.y; var y2 = obj.y2 == null ? 0 : obj.y2; if (!obj.global) { x = x * rect.width + rect.x; x2 = x2 * rect.width + rect.x; y = y * rect.height + rect.y; y2 = y2 * rect.height + rect.y; } x = isSafeNum(x) ? x : 0; x2 = isSafeNum(x2) ? x2 : 1; y = isSafeNum(y) ? y : 0; y2 = isSafeNum(y2) ? y2 : 0; var canvasGradient = ctx.createLinearGradient(x, y, x2, y2); return canvasGradient; } function createRadialGradient(ctx, obj, rect) { var width = rect.width; var height = rect.height; var min = Math.min(width, height); var x = obj.x == null ? 0.5 : obj.x; var y = obj.y == null ? 0.5 : obj.y; var r = obj.r == null ? 0.5 : obj.r; if (!obj.global) { x = x * width + rect.x; y = y * height + rect.y; r = r * min; } x = isSafeNum(x) ? x : 0.5; y = isSafeNum(y) ? y : 0.5; r = r >= 0 && isSafeNum(r) ? r : 0.5; var canvasGradient = ctx.createRadialGradient(x, y, 0, x, y, r); return canvasGradient; } function getCanvasGradient(ctx, obj, rect) { var canvasGradient = obj.type === 'radial' ? createRadialGradient(ctx, obj, rect) : createLinearGradient(ctx, obj, rect); var colorStops = obj.colorStops; for (var i = 0; i < colorStops.length; i++) { canvasGradient.addColorStop(colorStops[i].offset, colorStops[i].color); } return canvasGradient; } function isClipPathChanged(clipPaths, prevClipPaths) { if (clipPaths === prevClipPaths || (!clipPaths && !prevClipPaths)) { return false; } if (!clipPaths || !prevClipPaths || (clipPaths.length !== prevClipPaths.length)) { return true; } for (var i = 0; i < clipPaths.length; i++) { if (clipPaths[i] !== prevClipPaths[i]) { return true; } } return false; } function parseInt10(val) { return parseInt(val, 10); } function getSize(root, whIdx, opts) { var wh = ['width', 'height'][whIdx]; var cwh = ['clientWidth', 'clientHeight'][whIdx]; var plt = ['paddingLeft', 'paddingTop'][whIdx]; var prb = ['paddingRight', 'paddingBottom'][whIdx]; if (opts[wh] != null && opts[wh] !== 'auto') { return parseFloat(opts[wh]); } var stl = document.defaultView.getComputedStyle(root); return ((root[cwh] || parseInt10(stl[wh]) || parseInt10(root.style[wh])) - (parseInt10(stl[plt]) || 0) - (parseInt10(stl[prb]) || 0)) | 0; } // CONCATENATED MODULE: ./node_modules/zrender/lib/canvas/dashStyle.js function normalizeLineDash(lineType, lineWidth) { if (!lineType || lineType === 'solid' || !(lineWidth > 0)) { return null; } return lineType === 'dashed' ? [4 * lineWidth, 2 * lineWidth] : lineType === 'dotted' ? [lineWidth] : Object(core_util["isNumber"])(lineType) ? [lineType] : Object(core_util["isArray"])(lineType) ? lineType : null; } function getLineDash(el) { var style = el.style; var lineDash = style.lineDash && style.lineWidth > 0 && normalizeLineDash(style.lineDash, style.lineWidth); var lineDashOffset = style.lineDashOffset; if (lineDash) { var lineScale_1 = (style.strokeNoScale && el.getLineScale) ? el.getLineScale() : 1; if (lineScale_1 && lineScale_1 !== 1) { lineDash = Object(core_util["map"])(lineDash, function (rawVal) { return rawVal / lineScale_1; }); lineDashOffset /= lineScale_1; } } return [lineDash, lineDashOffset]; } // CONCATENATED MODULE: ./node_modules/zrender/lib/canvas/graphic.js var pathProxyForDraw = new core_PathProxy(true); function styleHasStroke(style) { var stroke = style.stroke; return !(stroke == null || stroke === 'none' || !(style.lineWidth > 0)); } function isValidStrokeFillStyle(strokeOrFill) { return typeof strokeOrFill === 'string' && strokeOrFill !== 'none'; } function styleHasFill(style) { var fill = style.fill; return fill != null && fill !== 'none'; } function doFillPath(ctx, style) { if (style.fillOpacity != null && style.fillOpacity !== 1) { var originalGlobalAlpha = ctx.globalAlpha; ctx.globalAlpha = style.fillOpacity * style.opacity; ctx.fill(); ctx.globalAlpha = originalGlobalAlpha; } else { ctx.fill(); } } function doStrokePath(ctx, style) { if (style.strokeOpacity != null && style.strokeOpacity !== 1) { var originalGlobalAlpha = ctx.globalAlpha; ctx.globalAlpha = style.strokeOpacity * style.opacity; ctx.stroke(); ctx.globalAlpha = originalGlobalAlpha; } else { ctx.stroke(); } } function createCanvasPattern(ctx, pattern, el) { var image = createOrUpdateImage(pattern.image, pattern.__image, el); if (isImageReady(image)) { var canvasPattern = ctx.createPattern(image, pattern.repeat || 'repeat'); if (typeof DOMMatrix === 'function' && canvasPattern && canvasPattern.setTransform) { var matrix = new DOMMatrix(); matrix.translateSelf((pattern.x || 0), (pattern.y || 0)); matrix.rotateSelf(0, 0, (pattern.rotation || 0) * core_util["RADIAN_TO_DEGREE"]); matrix.scaleSelf((pattern.scaleX || 1), (pattern.scaleY || 1)); canvasPattern.setTransform(matrix); } return canvasPattern; } } function brushPath(ctx, el, style, inBatch) { var _a; var hasStroke = styleHasStroke(style); var hasFill = styleHasFill(style); var strokePercent = style.strokePercent; var strokePart = strokePercent < 1; var firstDraw = !el.path; if ((!el.silent || strokePart) && firstDraw) { el.createPathProxy(); } var path = el.path || pathProxyForDraw; var dirtyFlag = el.__dirty; if (!inBatch) { var fill = style.fill; var stroke = style.stroke; var hasFillGradient = hasFill && !!fill.colorStops; var hasStrokeGradient = hasStroke && !!stroke.colorStops; var hasFillPattern = hasFill && !!fill.image; var hasStrokePattern = hasStroke && !!stroke.image; var fillGradient = void 0; var strokeGradient = void 0; var fillPattern = void 0; var strokePattern = void 0; var rect = void 0; if (hasFillGradient || hasStrokeGradient) { rect = el.getBoundingRect(); } if (hasFillGradient) { fillGradient = dirtyFlag ? getCanvasGradient(ctx, fill, rect) : el.__canvasFillGradient; el.__canvasFillGradient = fillGradient; } if (hasStrokeGradient) { strokeGradient = dirtyFlag ? getCanvasGradient(ctx, stroke, rect) : el.__canvasStrokeGradient; el.__canvasStrokeGradient = strokeGradient; } if (hasFillPattern) { fillPattern = (dirtyFlag || !el.__canvasFillPattern) ? createCanvasPattern(ctx, fill, el) : el.__canvasFillPattern; el.__canvasFillPattern = fillPattern; } if (hasStrokePattern) { strokePattern = (dirtyFlag || !el.__canvasStrokePattern) ? createCanvasPattern(ctx, stroke, el) : el.__canvasStrokePattern; el.__canvasStrokePattern = fillPattern; } if (hasFillGradient) { ctx.fillStyle = fillGradient; } else if (hasFillPattern) { if (fillPattern) { ctx.fillStyle = fillPattern; } else { hasFill = false; } } if (hasStrokeGradient) { ctx.strokeStyle = strokeGradient; } else if (hasStrokePattern) { if (strokePattern) { ctx.strokeStyle = strokePattern; } else { hasStroke = false; } } } var scale = el.getGlobalScale(); path.setScale(scale[0], scale[1], el.segmentIgnoreThreshold); var lineDash; var lineDashOffset; if (ctx.setLineDash && style.lineDash) { _a = getLineDash(el), lineDash = _a[0], lineDashOffset = _a[1]; } var needsRebuild = true; if (firstDraw || (dirtyFlag & SHAPE_CHANGED_BIT)) { path.setDPR(ctx.dpr); if (strokePart) { path.setContext(null); } else { path.setContext(ctx); needsRebuild = false; } path.reset(); el.buildPath(path, el.shape, inBatch); path.toStatic(); el.pathUpdated(); } if (needsRebuild) { path.rebuildPath(ctx, strokePart ? strokePercent : 1); } if (lineDash) { ctx.setLineDash(lineDash); ctx.lineDashOffset = lineDashOffset; } if (!inBatch) { if (style.strokeFirst) { if (hasStroke) { doStrokePath(ctx, style); } if (hasFill) { doFillPath(ctx, style); } } else { if (hasFill) { doFillPath(ctx, style); } if (hasStroke) { doStrokePath(ctx, style); } } } if (lineDash) { ctx.setLineDash([]); } } function brushImage(ctx, el, style) { var image = el.__image = createOrUpdateImage(style.image, el.__image, el, el.onload); if (!image || !isImageReady(image)) { return; } var x = style.x || 0; var y = style.y || 0; var width = el.getWidth(); var height = el.getHeight(); var aspect = image.width / image.height; if (width == null && height != null) { width = height * aspect; } else if (height == null && width != null) { height = width / aspect; } else if (width == null && height == null) { width = image.width; height = image.height; } if (style.sWidth && style.sHeight) { var sx = style.sx || 0; var sy = style.sy || 0; ctx.drawImage(image, sx, sy, style.sWidth, style.sHeight, x, y, width, height); } else if (style.sx && style.sy) { var sx = style.sx; var sy = style.sy; var sWidth = width - sx; var sHeight = height - sy; ctx.drawImage(image, sx, sy, sWidth, sHeight, x, y, width, height); } else { ctx.drawImage(image, x, y, width, height); } } function brushText(ctx, el, style) { var _a; var text = style.text; text != null && (text += ''); if (text) { ctx.font = style.font || platform["a" /* DEFAULT_FONT */]; ctx.textAlign = style.textAlign; ctx.textBaseline = style.textBaseline; var lineDash = void 0; var lineDashOffset = void 0; if (ctx.setLineDash && style.lineDash) { _a = getLineDash(el), lineDash = _a[0], lineDashOffset = _a[1]; } if (lineDash) { ctx.setLineDash(lineDash); ctx.lineDashOffset = lineDashOffset; } if (style.strokeFirst) { if (styleHasStroke(style)) { ctx.strokeText(text, style.x, style.y); } if (styleHasFill(style)) { ctx.fillText(text, style.x, style.y); } } else { if (styleHasFill(style)) { ctx.fillText(text, style.x, style.y); } if (styleHasStroke(style)) { ctx.strokeText(text, style.x, style.y); } } if (lineDash) { ctx.setLineDash([]); } } } var SHADOW_NUMBER_PROPS = ['shadowBlur', 'shadowOffsetX', 'shadowOffsetY']; var STROKE_PROPS = [ ['lineCap', 'butt'], ['lineJoin', 'miter'], ['miterLimit', 10] ]; function bindCommonProps(ctx, style, prevStyle, forceSetAll, scope) { var styleChanged = false; if (!forceSetAll) { prevStyle = prevStyle || {}; if (style === prevStyle) { return false; } } if (forceSetAll || style.opacity !== prevStyle.opacity) { flushPathDrawn(ctx, scope); styleChanged = true; var opacity = Math.max(Math.min(style.opacity, 1), 0); ctx.globalAlpha = isNaN(opacity) ? DEFAULT_COMMON_STYLE.opacity : opacity; } if (forceSetAll || style.blend !== prevStyle.blend) { if (!styleChanged) { flushPathDrawn(ctx, scope); styleChanged = true; } ctx.globalCompositeOperation = style.blend || DEFAULT_COMMON_STYLE.blend; } for (var i = 0; i < SHADOW_NUMBER_PROPS.length; i++) { var propName = SHADOW_NUMBER_PROPS[i]; if (forceSetAll || style[propName] !== prevStyle[propName]) { if (!styleChanged) { flushPathDrawn(ctx, scope); styleChanged = true; } ctx[propName] = ctx.dpr * (style[propName] || 0); } } if (forceSetAll || style.shadowColor !== prevStyle.shadowColor) { if (!styleChanged) { flushPathDrawn(ctx, scope); styleChanged = true; } ctx.shadowColor = style.shadowColor || DEFAULT_COMMON_STYLE.shadowColor; } return styleChanged; } function bindPathAndTextCommonStyle(ctx, el, prevEl, forceSetAll, scope) { var style = graphic_getStyle(el, scope.inHover); var prevStyle = forceSetAll ? null : (prevEl && graphic_getStyle(prevEl, scope.inHover) || {}); if (style === prevStyle) { return false; } var styleChanged = bindCommonProps(ctx, style, prevStyle, forceSetAll, scope); if (forceSetAll || style.fill !== prevStyle.fill) { if (!styleChanged) { flushPathDrawn(ctx, scope); styleChanged = true; } isValidStrokeFillStyle(style.fill) && (ctx.fillStyle = style.fill); } if (forceSetAll || style.stroke !== prevStyle.stroke) { if (!styleChanged) { flushPathDrawn(ctx, scope); styleChanged = true; } isValidStrokeFillStyle(style.stroke) && (ctx.strokeStyle = style.stroke); } if (forceSetAll || style.opacity !== prevStyle.opacity) { if (!styleChanged) { flushPathDrawn(ctx, scope); styleChanged = true; } ctx.globalAlpha = style.opacity == null ? 1 : style.opacity; } if (el.hasStroke()) { var lineWidth = style.lineWidth; var newLineWidth = lineWidth / ((style.strokeNoScale && el.getLineScale) ? el.getLineScale() : 1); if (ctx.lineWidth !== newLineWidth) { if (!styleChanged) { flushPathDrawn(ctx, scope); styleChanged = true; } ctx.lineWidth = newLineWidth; } } for (var i = 0; i < STROKE_PROPS.length; i++) { var prop = STROKE_PROPS[i]; var propName = prop[0]; if (forceSetAll || style[propName] !== prevStyle[propName]) { if (!styleChanged) { flushPathDrawn(ctx, scope); styleChanged = true; } ctx[propName] = style[propName] || prop[1]; } } return styleChanged; } function bindImageStyle(ctx, el, prevEl, forceSetAll, scope) { return bindCommonProps(ctx, graphic_getStyle(el, scope.inHover), prevEl && graphic_getStyle(prevEl, scope.inHover), forceSetAll, scope); } function setContextTransform(ctx, el) { var m = el.transform; var dpr = ctx.dpr || 1; if (m) { ctx.setTransform(dpr * m[0], dpr * m[1], dpr * m[2], dpr * m[3], dpr * m[4], dpr * m[5]); } else { ctx.setTransform(dpr, 0, 0, dpr, 0, 0); } } function updateClipStatus(clipPaths, ctx, scope) { var allClipped = false; for (var i = 0; i < clipPaths.length; i++) { var clipPath = clipPaths[i]; allClipped = allClipped || clipPath.isZeroArea(); setContextTransform(ctx, clipPath); ctx.beginPath(); clipPath.buildPath(ctx, clipPath.shape); ctx.clip(); } scope.allClipped = allClipped; } function isTransformChanged(m0, m1) { if (m0 && m1) { return m0[0] !== m1[0] || m0[1] !== m1[1] || m0[2] !== m1[2] || m0[3] !== m1[3] || m0[4] !== m1[4] || m0[5] !== m1[5]; } else if (!m0 && !m1) { return false; } return true; } var DRAW_TYPE_PATH = 1; var DRAW_TYPE_IMAGE = 2; var DRAW_TYPE_TEXT = 3; var DRAW_TYPE_INCREMENTAL = 4; function canPathBatch(style) { var hasFill = styleHasFill(style); var hasStroke = styleHasStroke(style); return !(style.lineDash || !(+hasFill ^ +hasStroke) || (hasFill && typeof style.fill !== 'string') || (hasStroke && typeof style.stroke !== 'string') || style.strokePercent < 1 || style.strokeOpacity < 1 || style.fillOpacity < 1); } function flushPathDrawn(ctx, scope) { scope.batchFill && ctx.fill(); scope.batchStroke && ctx.stroke(); scope.batchFill = ''; scope.batchStroke = ''; } function graphic_getStyle(el, inHover) { return inHover ? (el.__hoverStyle || el.style) : el.style; } function brushSingle(ctx, el) { brush(ctx, el, { inHover: false, viewWidth: 0, viewHeight: 0 }, true); } function brush(ctx, el, scope, isLast) { var m = el.transform; if (!el.shouldBePainted(scope.viewWidth, scope.viewHeight, false, false)) { el.__dirty &= ~REDRAW_BIT; el.__isRendered = false; return; } var clipPaths = el.__clipPaths; var prevElClipPaths = scope.prevElClipPaths; var forceSetTransform = false; var forceSetStyle = false; if (!prevElClipPaths || isClipPathChanged(clipPaths, prevElClipPaths)) { if (prevElClipPaths && prevElClipPaths.length) { flushPathDrawn(ctx, scope); ctx.restore(); forceSetStyle = forceSetTransform = true; scope.prevElClipPaths = null; scope.allClipped = false; scope.prevEl = null; } if (clipPaths && clipPaths.length) { flushPathDrawn(ctx, scope); ctx.save(); updateClipStatus(clipPaths, ctx, scope); forceSetTransform = true; } scope.prevElClipPaths = clipPaths; } if (scope.allClipped) { el.__isRendered = false; return; } el.beforeBrush && el.beforeBrush(); el.innerBeforeBrush(); var prevEl = scope.prevEl; if (!prevEl) { forceSetStyle = forceSetTransform = true; } var canBatchPath = el instanceof graphic_Path && el.autoBatch && canPathBatch(el.style); if (forceSetTransform || isTransformChanged(m, prevEl.transform)) { flushPathDrawn(ctx, scope); setContextTransform(ctx, el); } else if (!canBatchPath) { flushPathDrawn(ctx, scope); } var style = graphic_getStyle(el, scope.inHover); if (el instanceof graphic_Path) { if (scope.lastDrawType !== DRAW_TYPE_PATH) { forceSetStyle = true; scope.lastDrawType = DRAW_TYPE_PATH; } bindPathAndTextCommonStyle(ctx, el, prevEl, forceSetStyle, scope); if (!canBatchPath || (!scope.batchFill && !scope.batchStroke)) { ctx.beginPath(); } brushPath(ctx, el, style, canBatchPath); if (canBatchPath) { scope.batchFill = style.fill || ''; scope.batchStroke = style.stroke || ''; } } else { if (el instanceof graphic_TSpan) { if (scope.lastDrawType !== DRAW_TYPE_TEXT) { forceSetStyle = true; scope.lastDrawType = DRAW_TYPE_TEXT; } bindPathAndTextCommonStyle(ctx, el, prevEl, forceSetStyle, scope); brushText(ctx, el, style); } else if (el instanceof graphic_Image) { if (scope.lastDrawType !== DRAW_TYPE_IMAGE) { forceSetStyle = true; scope.lastDrawType = DRAW_TYPE_IMAGE; } bindImageStyle(ctx, el, prevEl, forceSetStyle, scope); brushImage(ctx, el, style); } else if (el.getTemporalDisplayables) { if (scope.lastDrawType !== DRAW_TYPE_INCREMENTAL) { forceSetStyle = true; scope.lastDrawType = DRAW_TYPE_INCREMENTAL; } brushIncremental(ctx, el, scope); } } if (canBatchPath && isLast) { flushPathDrawn(ctx, scope); } el.innerAfterBrush(); el.afterBrush && el.afterBrush(); scope.prevEl = el; el.__dirty = 0; el.__isRendered = true; } function brushIncremental(ctx, el, scope) { var displayables = el.getDisplayables(); var temporalDisplayables = el.getTemporalDisplayables(); ctx.save(); var innerScope = { prevElClipPaths: null, prevEl: null, allClipped: false, viewWidth: scope.viewWidth, viewHeight: scope.viewHeight, inHover: scope.inHover }; var i; var len; for (i = el.getCursor(), len = displayables.length; i < len; i++) { var displayable = displayables[i]; displayable.beforeBrush && displayable.beforeBrush(); displayable.innerBeforeBrush(); brush(ctx, displayable, innerScope, i === len - 1); displayable.innerAfterBrush(); displayable.afterBrush && displayable.afterBrush(); innerScope.prevEl = displayable; } for (var i_1 = 0, len_1 = temporalDisplayables.length; i_1 < len_1; i_1++) { var displayable = temporalDisplayables[i_1]; displayable.beforeBrush && displayable.beforeBrush(); displayable.innerBeforeBrush(); brush(ctx, displayable, innerScope, i_1 === len_1 - 1); displayable.innerAfterBrush(); displayable.afterBrush && displayable.afterBrush(); innerScope.prevEl = displayable; } el.clearTemporalDisplayables(); el.notClear = true; ctx.restore(); } // CONCATENATED MODULE: ./node_modules/echarts/lib/util/decal.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 decalMap = new core_WeakMap(); var decalCache = new LRU["a" /* default */](100); var decalKeys = ['symbol', 'symbolSize', 'symbolKeepAspect', 'color', 'backgroundColor', 'dashArrayX', 'dashArrayY', 'maxTileWidth', 'maxTileHeight']; /** * Create or update pattern image from decal options * * @param {InnerDecalObject | 'none'} decalObject decal options, 'none' if no decal * @return {Pattern} pattern with generated image, null if no decal */ function createOrUpdatePatternFromDecal(decalObject, api) { if (decalObject === 'none') { return null; } var dpr = api.getDevicePixelRatio(); var zr = api.getZr(); var isSVG = zr.painter.type === 'svg'; if (decalObject.dirty) { decalMap["delete"](decalObject); } var oldPattern = decalMap.get(decalObject); if (oldPattern) { return oldPattern; } var decalOpt = Object(core_util["defaults"])(decalObject, { symbol: 'rect', symbolSize: 1, symbolKeepAspect: true, color: 'rgba(0, 0, 0, 0.2)', backgroundColor: null, dashArrayX: 5, dashArrayY: 5, rotation: 0, maxTileWidth: 512, maxTileHeight: 512 }); if (decalOpt.backgroundColor === 'none') { decalOpt.backgroundColor = null; } var pattern = { repeat: 'repeat' }; setPatternnSource(pattern); pattern.rotation = decalOpt.rotation; pattern.scaleX = pattern.scaleY = isSVG ? 1 : 1 / dpr; decalMap.set(decalObject, pattern); decalObject.dirty = false; return pattern; function setPatternnSource(pattern) { var keys = [dpr]; var isValidKey = true; for (var i = 0; i < decalKeys.length; ++i) { var value = decalOpt[decalKeys[i]]; if (value != null && !Object(core_util["isArray"])(value) && !Object(core_util["isString"])(value) && !Object(core_util["isNumber"])(value) && typeof value !== 'boolean') { isValidKey = false; break; } keys.push(value); } var cacheKey; if (isValidKey) { cacheKey = keys.join(',') + (isSVG ? '-svg' : ''); var cache = decalCache.get(cacheKey); if (cache) { isSVG ? pattern.svgElement = cache : pattern.image = cache; } } var dashArrayX = normalizeDashArrayX(decalOpt.dashArrayX); var dashArrayY = normalizeDashArrayY(decalOpt.dashArrayY); var symbolArray = normalizeSymbolArray(decalOpt.symbol); var lineBlockLengthsX = getLineBlockLengthX(dashArrayX); var lineBlockLengthY = getLineBlockLengthY(dashArrayY); var canvas = !isSVG && platform["d" /* platformApi */].createCanvas(); var svgRoot = isSVG && { tag: 'g', attrs: {}, key: 'dcl', children: [] }; var pSize = getPatternSize(); var ctx; if (canvas) { canvas.width = pSize.width * dpr; canvas.height = pSize.height * dpr; ctx = canvas.getContext('2d'); } brushDecal(); if (isValidKey) { decalCache.put(cacheKey, canvas || svgRoot); } pattern.image = canvas; pattern.svgElement = svgRoot; pattern.svgWidth = pSize.width; pattern.svgHeight = pSize.height; /** * Get minimum length that can make a repeatable pattern. * * @return {Object} pattern width and height */ function getPatternSize() { /** * For example, if dash is [[3, 2], [2, 1]] for X, it looks like * |--- --- --- --- --- ... * |-- -- -- -- -- -- -- -- ... * |--- --- --- --- --- ... * |-- -- -- -- -- -- -- -- ... * So the minimum length of X is 15, * which is the least common multiple of `3 + 2` and `2 + 1` * |--- --- --- |--- --- ... * |-- -- -- -- -- |-- -- -- ... */ var width = 1; for (var i = 0, xlen = lineBlockLengthsX.length; i < xlen; ++i) { width = getLeastCommonMultiple(width, lineBlockLengthsX[i]); } var symbolRepeats = 1; for (var i = 0, xlen = symbolArray.length; i < xlen; ++i) { symbolRepeats = getLeastCommonMultiple(symbolRepeats, symbolArray[i].length); } width *= symbolRepeats; var height = lineBlockLengthY * lineBlockLengthsX.length * symbolArray.length; if (false) { var warn = function (attrName) { /* eslint-disable-next-line */ console.warn("Calculated decal size is greater than " + attrName + " due to decal option settings so " + attrName + " is used for the decal size. Please consider changing the decal option to make a smaller decal or set " + attrName + " to be larger to avoid incontinuity."); }; if (width > decalOpt.maxTileWidth) { warn('maxTileWidth'); } if (height > decalOpt.maxTileHeight) { warn('maxTileHeight'); } } return { width: Math.max(1, Math.min(width, decalOpt.maxTileWidth)), height: Math.max(1, Math.min(height, decalOpt.maxTileHeight)) }; } function brushDecal() { if (ctx) { ctx.clearRect(0, 0, canvas.width, canvas.height); if (decalOpt.backgroundColor) { ctx.fillStyle = decalOpt.backgroundColor; ctx.fillRect(0, 0, canvas.width, canvas.height); } } var ySum = 0; for (var i = 0; i < dashArrayY.length; ++i) { ySum += dashArrayY[i]; } if (ySum <= 0) { // dashArrayY is 0, draw nothing return; } var y = -lineBlockLengthY; var yId = 0; var yIdTotal = 0; var xId0 = 0; while (y < pSize.height) { if (yId % 2 === 0) { var symbolYId = yIdTotal / 2 % symbolArray.length; var x = 0; var xId1 = 0; var xId1Total = 0; while (x < pSize.width * 2) { var xSum = 0; for (var i = 0; i < dashArrayX[xId0].length; ++i) { xSum += dashArrayX[xId0][i]; } if (xSum <= 0) { // Skip empty line break; } // E.g., [15, 5, 20, 5] draws only for 15 and 20 if (xId1 % 2 === 0) { var size = (1 - decalOpt.symbolSize) * 0.5; var left = x + dashArrayX[xId0][xId1] * size; var top_1 = y + dashArrayY[yId] * size; var width = dashArrayX[xId0][xId1] * decalOpt.symbolSize; var height = dashArrayY[yId] * decalOpt.symbolSize; var symbolXId = xId1Total / 2 % symbolArray[symbolYId].length; brushSymbol(left, top_1, width, height, symbolArray[symbolYId][symbolXId]); } x += dashArrayX[xId0][xId1]; ++xId1Total; ++xId1; if (xId1 === dashArrayX[xId0].length) { xId1 = 0; } } ++xId0; if (xId0 === dashArrayX.length) { xId0 = 0; } } y += dashArrayY[yId]; ++yIdTotal; ++yId; if (yId === dashArrayY.length) { yId = 0; } } function brushSymbol(x, y, width, height, symbolType) { var scale = isSVG ? 1 : dpr; var symbol = symbol_createSymbol(symbolType, x * scale, y * scale, width * scale, height * scale, decalOpt.color, decalOpt.symbolKeepAspect); if (isSVG) { var symbolVNode = zr.painter.renderOneToVNode(symbol); if (symbolVNode) { svgRoot.children.push(symbolVNode); } } else { // Paint to canvas for all other renderers. brushSingle(ctx, symbol); } } } } } /** * Convert symbol array into normalized array * * @param {string | (string | string[])[]} symbol symbol input * @return {string[][]} normolized symbol array */ function normalizeSymbolArray(symbol) { if (!symbol || symbol.length === 0) { return [['rect']]; } if (Object(core_util["isString"])(symbol)) { return [[symbol]]; } var isAllString = true; for (var i = 0; i < symbol.length; ++i) { if (!Object(core_util["isString"])(symbol[i])) { isAllString = false; break; } } if (isAllString) { return normalizeSymbolArray([symbol]); } var result = []; for (var i = 0; i < symbol.length; ++i) { if (Object(core_util["isString"])(symbol[i])) { result.push([symbol[i]]); } else { result.push(symbol[i]); } } return result; } /** * Convert dash input into dashArray * * @param {DecalDashArrayX} dash dash input * @return {number[][]} normolized dash array */ function normalizeDashArrayX(dash) { if (!dash || dash.length === 0) { return [[0, 0]]; } if (Object(core_util["isNumber"])(dash)) { var dashValue = Math.ceil(dash); return [[dashValue, dashValue]]; } /** * [20, 5] should be normalized into [[20, 5]], * while [20, [5, 10]] should be normalized into [[20, 20], [5, 10]] */ var isAllNumber = true; for (var i = 0; i < dash.length; ++i) { if (!Object(core_util["isNumber"])(dash[i])) { isAllNumber = false; break; } } if (isAllNumber) { return normalizeDashArrayX([dash]); } var result = []; for (var i = 0; i < dash.length; ++i) { if (Object(core_util["isNumber"])(dash[i])) { var dashValue = Math.ceil(dash[i]); result.push([dashValue, dashValue]); } else { var dashValue = Object(core_util["map"])(dash[i], function (n) { return Math.ceil(n); }); if (dashValue.length % 2 === 1) { // [4, 2, 1] means |---- - -- |---- - -- | // so normalize it to be [4, 2, 1, 4, 2, 1] result.push(dashValue.concat(dashValue)); } else { result.push(dashValue); } } } return result; } /** * Convert dash input into dashArray * * @param {DecalDashArrayY} dash dash input * @return {number[]} normolized dash array */ function normalizeDashArrayY(dash) { if (!dash || typeof dash === 'object' && dash.length === 0) { return [0, 0]; } if (Object(core_util["isNumber"])(dash)) { var dashValue_1 = Math.ceil(dash); return [dashValue_1, dashValue_1]; } var dashValue = Object(core_util["map"])(dash, function (n) { return Math.ceil(n); }); return dash.length % 2 ? dashValue.concat(dashValue) : dashValue; } /** * Get block length of each line. A block is the length of dash line and space. * For example, a line with [4, 1] has a dash line of 4 and a space of 1 after * that, so the block length of this line is 5. * * @param {number[][]} dash dash array of X or Y * @return {number[]} block length of each line */ function getLineBlockLengthX(dash) { return Object(core_util["map"])(dash, function (line) { return getLineBlockLengthY(line); }); } function getLineBlockLengthY(dash) { var blockLength = 0; for (var i = 0; i < dash.length; ++i) { blockLength += dash[i]; } if (dash.length % 2 === 1) { // [4, 2, 1] means |---- - -- |---- - -- | // So total length is (4 + 2 + 1) * 2 return blockLength * 2; } return blockLength; } // CONCATENATED MODULE: ./node_modules/echarts/lib/visual/decal.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 decalVisual(ecModel, api) { ecModel.eachRawSeries(function (seriesModel) { if (ecModel.isSeriesFiltered(seriesModel)) { return; } var data = seriesModel.getData(); if (data.hasItemVisual()) { data.each(function (idx) { var decal = data.getItemVisual(idx, 'decal'); if (decal) { var itemStyle = data.ensureUniqueItemVisual(idx, 'style'); itemStyle.decal = createOrUpdatePatternFromDecal(decal, api); } }); } var decal = data.getVisual('decal'); if (decal) { var style = data.getVisual('style'); style.decal = createOrUpdatePatternFromDecal(decal, api); } }); } // CONCATENATED MODULE: ./node_modules/echarts/lib/core/lifecycle.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 lifecycle = new core_Eventful(); /* harmony default export */ var core_lifecycle = (lifecycle); // CONCATENATED MODULE: ./node_modules/echarts/lib/core/impl.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ // Implementation of exported APIs. For example registerMap, getMap. // The implementations will be registered when installing the component. // Avoid these code being bundled to the core module. var implsStore = {}; // TODO Type function registerImpl(name, impl) { if (false) { if (implsStore[name]) { error("Already has an implementation of " + name + "."); } } implsStore[name] = impl; } function getImpl(name) { if (false) { if (!implsStore[name]) { error("Implementation of " + name + " doesn't exists."); } } return implsStore[name]; } // CONCATENATED MODULE: ./node_modules/echarts/lib/core/echarts.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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_version = '5.6.0'; var dependencies = { zrender: '5.6.1' }; var TEST_FRAME_REMAIN_TIME = 1; var PRIORITY_PROCESSOR_SERIES_FILTER = 800; // Some data processors depends on the stack result dimension (to calculate data extent). // So data stack stage should be in front of data processing stage. var PRIORITY_PROCESSOR_DATASTACK = 900; // "Data filter" will block the stream, so it should be // put at the beginning of data processing. var PRIORITY_PROCESSOR_FILTER = 1000; var PRIORITY_PROCESSOR_DEFAULT = 2000; var PRIORITY_PROCESSOR_STATISTIC = 5000; var PRIORITY_VISUAL_LAYOUT = 1000; var PRIORITY_VISUAL_PROGRESSIVE_LAYOUT = 1100; var PRIORITY_VISUAL_GLOBAL = 2000; var PRIORITY_VISUAL_CHART = 3000; var PRIORITY_VISUAL_COMPONENT = 4000; // Visual property in data. Greater than `PRIORITY_VISUAL_COMPONENT` to enable to // overwrite the viusal result of component (like `visualMap`) // using data item specific setting (like itemStyle.xxx on data item) var PRIORITY_VISUAL_CHART_DATA_CUSTOM = 4500; // Greater than `PRIORITY_VISUAL_CHART_DATA_CUSTOM` to enable to layout based on // visual result like `symbolSize`. var PRIORITY_VISUAL_POST_CHART_LAYOUT = 4600; var PRIORITY_VISUAL_BRUSH = 5000; var PRIORITY_VISUAL_ARIA = 6000; var PRIORITY_VISUAL_DECAL = 7000; var PRIORITY = { PROCESSOR: { FILTER: PRIORITY_PROCESSOR_FILTER, SERIES_FILTER: PRIORITY_PROCESSOR_SERIES_FILTER, STATISTIC: PRIORITY_PROCESSOR_STATISTIC }, VISUAL: { LAYOUT: PRIORITY_VISUAL_LAYOUT, PROGRESSIVE_LAYOUT: PRIORITY_VISUAL_PROGRESSIVE_LAYOUT, GLOBAL: PRIORITY_VISUAL_GLOBAL, CHART: PRIORITY_VISUAL_CHART, POST_CHART_LAYOUT: PRIORITY_VISUAL_POST_CHART_LAYOUT, COMPONENT: PRIORITY_VISUAL_COMPONENT, BRUSH: PRIORITY_VISUAL_BRUSH, CHART_ITEM: PRIORITY_VISUAL_CHART_DATA_CUSTOM, ARIA: PRIORITY_VISUAL_ARIA, DECAL: PRIORITY_VISUAL_DECAL } }; // Main process have three entries: `setOption`, `dispatchAction` and `resize`, // where they must not be invoked nestedly, except the only case: invoke // dispatchAction with updateMethod "none" in main process. // This flag is used to carry out this rule. // All events will be triggered out side main process (i.e. when !this[IN_MAIN_PROCESS]). var IN_MAIN_PROCESS_KEY = '__flagInMainProcess'; var PENDING_UPDATE = '__pendingUpdate'; var STATUS_NEEDS_UPDATE_KEY = '__needsUpdateStatus'; var ACTION_REG = /^[a-zA-Z0-9_]+$/; var CONNECT_STATUS_KEY = '__connectUpdateStatus'; var CONNECT_STATUS_PENDING = 0; var CONNECT_STATUS_UPDATING = 1; var CONNECT_STATUS_UPDATED = 2; ; ; function createRegisterEventWithLowercaseECharts(method) { return function () { var args = []; for (var _i = 0; _i < arguments.length; _i++) { args[_i] = arguments[_i]; } if (this.isDisposed()) { disposedWarning(this.id); return; } return toLowercaseNameAndCallEventful(this, method, args); }; } function createRegisterEventWithLowercaseMessageCenter(method) { return function () { var args = []; for (var _i = 0; _i < arguments.length; _i++) { args[_i] = arguments[_i]; } return toLowercaseNameAndCallEventful(this, method, args); }; } function toLowercaseNameAndCallEventful(host, method, args) { // `args[0]` is event name. Event name is all lowercase. args[0] = args[0] && args[0].toLowerCase(); return core_Eventful.prototype[method].apply(host, args); } var echarts_MessageCenter = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(MessageCenter, _super); function MessageCenter() { return _super !== null && _super.apply(this, arguments) || this; } return MessageCenter; }(core_Eventful); var messageCenterProto = echarts_MessageCenter.prototype; messageCenterProto.on = createRegisterEventWithLowercaseMessageCenter('on'); messageCenterProto.off = createRegisterEventWithLowercaseMessageCenter('off'); // --------------------------------------- // Internal method names for class ECharts // --------------------------------------- var prepare; var prepareView; var updateDirectly; var updateMethods; var doConvertPixel; var updateStreamModes; var doDispatchAction; var flushPendingActions; var triggerUpdatedEvent; var bindRenderedEvent; var bindMouseEvent; var render; var renderComponents; var renderSeries; var createExtensionAPI; var enableConnect; var markStatusToUpdate; var applyChangedStates; var echarts_ECharts = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(ECharts, _super); function ECharts(dom, // Theme name or themeOption. theme, opts) { var _this = _super.call(this, new ECEventProcessor_ECEventProcessor()) || this; _this._chartsViews = []; _this._chartsMap = {}; _this._componentsViews = []; _this._componentsMap = {}; // Can't dispatch action during rendering procedure _this._pendingActions = []; opts = opts || {}; // Get theme by name if (Object(core_util["isString"])(theme)) { theme = themeStorage[theme]; } _this._dom = dom; var defaultRenderer = 'canvas'; var defaultCoarsePointer = 'auto'; var defaultUseDirtyRect = false; if (false) { var root = /* eslint-disable-next-line */ env.hasGlobalWindow ? window : global; if (root) { defaultRenderer = retrieve2(root.__ECHARTS__DEFAULT__RENDERER__, defaultRenderer); defaultCoarsePointer = retrieve2(root.__ECHARTS__DEFAULT__COARSE_POINTER, defaultCoarsePointer); defaultUseDirtyRect = retrieve2(root.__ECHARTS__DEFAULT__USE_DIRTY_RECT__, defaultUseDirtyRect); } } if (opts.ssr) { registerSSRDataGetter(function (el) { var ecData = getECData(el); var dataIndex = ecData.dataIndex; if (dataIndex == null) { return; } var hashMap = Object(core_util["createHashMap"])(); hashMap.set('series_index', ecData.seriesIndex); hashMap.set('data_index', dataIndex); ecData.ssrType && hashMap.set('ssr_type', ecData.ssrType); return hashMap; }); } var zr = _this._zr = init(dom, { renderer: opts.renderer || defaultRenderer, devicePixelRatio: opts.devicePixelRatio, width: opts.width, height: opts.height, ssr: opts.ssr, useDirtyRect: Object(core_util["retrieve2"])(opts.useDirtyRect, defaultUseDirtyRect), useCoarsePointer: Object(core_util["retrieve2"])(opts.useCoarsePointer, defaultCoarsePointer), pointerSize: opts.pointerSize }); _this._ssr = opts.ssr; // Expect 60 fps. _this._throttledZrFlush = throttle(Object(core_util["bind"])(zr.flush, zr), 17); theme = Object(core_util["clone"])(theme); theme && globalBackwardCompat(theme, true); _this._theme = theme; _this._locale = createLocaleObject(opts.locale || SYSTEM_LANG); _this._coordSysMgr = new core_CoordinateSystem(); var api = _this._api = createExtensionAPI(_this); // Sort on demand function prioritySortFunc(a, b) { return a.__prio - b.__prio; } timsort_sort(visualFuncs, prioritySortFunc); timsort_sort(dataProcessorFuncs, prioritySortFunc); _this._scheduler = new core_Scheduler(_this, api, dataProcessorFuncs, visualFuncs); _this._messageCenter = new echarts_MessageCenter(); // Init mouse events _this._initEvents(); // In case some people write `window.onresize = chart.resize` _this.resize = Object(core_util["bind"])(_this.resize, _this); zr.animation.on('frame', _this._onframe, _this); bindRenderedEvent(zr, _this); bindMouseEvent(zr, _this); // ECharts instance can be used as value. Object(core_util["setAsPrimitive"])(_this); return _this; } ECharts.prototype._onframe = function () { if (this._disposed) { return; } applyChangedStates(this); var scheduler = this._scheduler; // Lazy update if (this[PENDING_UPDATE]) { var silent = this[PENDING_UPDATE].silent; this[IN_MAIN_PROCESS_KEY] = true; try { prepare(this); updateMethods.update.call(this, null, this[PENDING_UPDATE].updateParams); } catch (e) { this[IN_MAIN_PROCESS_KEY] = false; this[PENDING_UPDATE] = null; throw e; } // At present, in each frame, zrender performs: // (1) animation step forward. // (2) trigger('frame') (where this `_onframe` is called) // (3) zrender flush (render). // If we do nothing here, since we use `setToFinal: true`, the step (3) above // will render the final state of the elements before the real animation started. this._zr.flush(); this[IN_MAIN_PROCESS_KEY] = false; this[PENDING_UPDATE] = null; flushPendingActions.call(this, silent); triggerUpdatedEvent.call(this, silent); } // Avoid do both lazy update and progress in one frame. else if (scheduler.unfinished) { // Stream progress. var remainTime = TEST_FRAME_REMAIN_TIME; var ecModel = this._model; var api = this._api; scheduler.unfinished = false; do { var startTime = +new Date(); scheduler.performSeriesTasks(ecModel); // Currently dataProcessorFuncs do not check threshold. scheduler.performDataProcessorTasks(ecModel); updateStreamModes(this, ecModel); // Do not update coordinate system here. Because that coord system update in // each frame is not a good user experience. So we follow the rule that // the extent of the coordinate system is determined in the first frame (the // frame is executed immediately after task reset. // this._coordSysMgr.update(ecModel, api); // console.log('--- ec frame visual ---', remainTime); scheduler.performVisualTasks(ecModel); renderSeries(this, this._model, api, 'remain', {}); remainTime -= +new Date() - startTime; } while (remainTime > 0 && scheduler.unfinished); // Call flush explicitly for trigger finished event. if (!scheduler.unfinished) { this._zr.flush(); } // Else, zr flushing be ensue within the same frame, // because zr flushing is after onframe event. } }; ECharts.prototype.getDom = function () { return this._dom; }; ECharts.prototype.getId = function () { return this.id; }; ECharts.prototype.getZr = function () { return this._zr; }; ECharts.prototype.isSSR = function () { return this._ssr; }; /* eslint-disable-next-line */ ECharts.prototype.setOption = function (option, notMerge, lazyUpdate) { if (this[IN_MAIN_PROCESS_KEY]) { if (false) { error('`setOption` should not be called during main process.'); } return; } if (this._disposed) { disposedWarning(this.id); return; } var silent; var replaceMerge; var transitionOpt; if (Object(core_util["isObject"])(notMerge)) { lazyUpdate = notMerge.lazyUpdate; silent = notMerge.silent; replaceMerge = notMerge.replaceMerge; transitionOpt = notMerge.transition; notMerge = notMerge.notMerge; } this[IN_MAIN_PROCESS_KEY] = true; if (!this._model || notMerge) { var optionManager = new model_OptionManager(this._api); var theme = this._theme; var ecModel = this._model = new Global(); ecModel.scheduler = this._scheduler; ecModel.ssr = this._ssr; ecModel.init(null, null, null, theme, this._locale, optionManager); } this._model.setOption(option, { replaceMerge: replaceMerge }, echarts_optionPreprocessorFuncs); var updateParams = { seriesTransition: transitionOpt, optionChanged: true }; if (lazyUpdate) { this[PENDING_UPDATE] = { silent: silent, updateParams: updateParams }; this[IN_MAIN_PROCESS_KEY] = false; // `setOption(option, {lazyMode: true})` may be called when zrender has been slept. // It should wake it up to make sure zrender start to render at the next frame. this.getZr().wakeUp(); } else { try { prepare(this); updateMethods.update.call(this, null, updateParams); } catch (e) { this[PENDING_UPDATE] = null; this[IN_MAIN_PROCESS_KEY] = false; throw e; } // Ensure zr refresh sychronously, and then pixel in canvas can be // fetched after `setOption`. if (!this._ssr) { // not use flush when using ssr mode. this._zr.flush(); } this[PENDING_UPDATE] = null; this[IN_MAIN_PROCESS_KEY] = false; flushPendingActions.call(this, silent); triggerUpdatedEvent.call(this, silent); } }; /** * @deprecated */ ECharts.prototype.setTheme = function () { log_deprecateLog('ECharts#setTheme() is DEPRECATED in ECharts 3.0'); }; // We don't want developers to use getModel directly. ECharts.prototype.getModel = function () { return this._model; }; ECharts.prototype.getOption = function () { return this._model && this._model.getOption(); }; ECharts.prototype.getWidth = function () { return this._zr.getWidth(); }; ECharts.prototype.getHeight = function () { return this._zr.getHeight(); }; ECharts.prototype.getDevicePixelRatio = function () { return this._zr.painter.dpr /* eslint-disable-next-line */ || core_env["a" /* default */].hasGlobalWindow && window.devicePixelRatio || 1; }; /** * Get canvas which has all thing rendered * @deprecated Use renderToCanvas instead. */ ECharts.prototype.getRenderedCanvas = function (opts) { if (false) { deprecateReplaceLog('getRenderedCanvas', 'renderToCanvas'); } return this.renderToCanvas(opts); }; ECharts.prototype.renderToCanvas = function (opts) { opts = opts || {}; var painter = this._zr.painter; if (false) { if (painter.type !== 'canvas') { throw new Error('renderToCanvas can only be used in the canvas renderer.'); } } return painter.getRenderedCanvas({ backgroundColor: opts.backgroundColor || this._model.get('backgroundColor'), pixelRatio: opts.pixelRatio || this.getDevicePixelRatio() }); }; ECharts.prototype.renderToSVGString = function (opts) { opts = opts || {}; var painter = this._zr.painter; if (false) { if (painter.type !== 'svg') { throw new Error('renderToSVGString can only be used in the svg renderer.'); } } return painter.renderToString({ useViewBox: opts.useViewBox }); }; /** * Get svg data url */ ECharts.prototype.getSvgDataURL = function () { if (!core_env["a" /* default */].svgSupported) { return; } var zr = this._zr; var list = zr.storage.getDisplayList(); // Stop animations Object(core_util["each"])(list, function (el) { el.stopAnimation(null, true); }); return zr.painter.toDataURL(); }; ECharts.prototype.getDataURL = function (opts) { if (this._disposed) { disposedWarning(this.id); return; } opts = opts || {}; var excludeComponents = opts.excludeComponents; var ecModel = this._model; var excludesComponentViews = []; var self = this; Object(core_util["each"])(excludeComponents, function (componentType) { ecModel.eachComponent({ mainType: componentType }, function (component) { var view = self._componentsMap[component.__viewId]; if (!view.group.ignore) { excludesComponentViews.push(view); view.group.ignore = true; } }); }); var url = this._zr.painter.getType() === 'svg' ? this.getSvgDataURL() : this.renderToCanvas(opts).toDataURL('image/' + (opts && opts.type || 'png')); Object(core_util["each"])(excludesComponentViews, function (view) { view.group.ignore = false; }); return url; }; ECharts.prototype.getConnectedDataURL = function (opts) { if (this._disposed) { disposedWarning(this.id); return; } var isSvg = opts.type === 'svg'; var groupId = this.group; var mathMin = Math.min; var mathMax = Math.max; var MAX_NUMBER = Infinity; if (connectedGroups[groupId]) { var left_1 = MAX_NUMBER; var top_1 = MAX_NUMBER; var right_1 = -MAX_NUMBER; var bottom_1 = -MAX_NUMBER; var canvasList_1 = []; var dpr_1 = opts && opts.pixelRatio || this.getDevicePixelRatio(); Object(core_util["each"])(echarts_instances, function (chart, id) { if (chart.group === groupId) { var canvas = isSvg ? chart.getZr().painter.getSvgDom().innerHTML : chart.renderToCanvas(Object(core_util["clone"])(opts)); var boundingRect = chart.getDom().getBoundingClientRect(); left_1 = mathMin(boundingRect.left, left_1); top_1 = mathMin(boundingRect.top, top_1); right_1 = mathMax(boundingRect.right, right_1); bottom_1 = mathMax(boundingRect.bottom, bottom_1); canvasList_1.push({ dom: canvas, left: boundingRect.left, top: boundingRect.top }); } }); left_1 *= dpr_1; top_1 *= dpr_1; right_1 *= dpr_1; bottom_1 *= dpr_1; var width = right_1 - left_1; var height = bottom_1 - top_1; var targetCanvas = platform["d" /* platformApi */].createCanvas(); var zr_1 = init(targetCanvas, { renderer: isSvg ? 'svg' : 'canvas' }); zr_1.resize({ width: width, height: height }); if (isSvg) { var content_1 = ''; Object(core_util["each"])(canvasList_1, function (item) { var x = item.left - left_1; var y = item.top - top_1; content_1 += '' + item.dom + ''; }); zr_1.painter.getSvgRoot().innerHTML = content_1; if (opts.connectedBackgroundColor) { zr_1.painter.setBackgroundColor(opts.connectedBackgroundColor); } zr_1.refreshImmediately(); return zr_1.painter.toDataURL(); } else { // Background between the charts if (opts.connectedBackgroundColor) { zr_1.add(new shape_Rect({ shape: { x: 0, y: 0, width: width, height: height }, style: { fill: opts.connectedBackgroundColor } })); } Object(core_util["each"])(canvasList_1, function (item) { var img = new graphic_Image({ style: { x: item.left * dpr_1 - left_1, y: item.top * dpr_1 - top_1, image: item.dom } }); zr_1.add(img); }); zr_1.refreshImmediately(); return targetCanvas.toDataURL('image/' + (opts && opts.type || 'png')); } } else { return this.getDataURL(opts); } }; ECharts.prototype.convertToPixel = function (finder, value) { return doConvertPixel(this, 'convertToPixel', finder, value); }; ECharts.prototype.convertFromPixel = function (finder, value) { return doConvertPixel(this, 'convertFromPixel', finder, value); }; /** * Is the specified coordinate systems or components contain the given pixel point. * @param {Array|number} value * @return {boolean} result */ ECharts.prototype.containPixel = function (finder, value) { if (this._disposed) { disposedWarning(this.id); return; } var ecModel = this._model; var result; var findResult = parseFinder(ecModel, finder); Object(core_util["each"])(findResult, function (models, key) { key.indexOf('Models') >= 0 && Object(core_util["each"])(models, function (model) { var coordSys = model.coordinateSystem; if (coordSys && coordSys.containPoint) { result = result || !!coordSys.containPoint(value); } else if (key === 'seriesModels') { var view = this._chartsMap[model.__viewId]; if (view && view.containPoint) { result = result || view.containPoint(value, model); } else { if (false) { warn(key + ': ' + (view ? 'The found component do not support containPoint.' : 'No view mapping to the found component.')); } } } else { if (false) { warn(key + ': containPoint is not supported'); } } }, this); }, this); return !!result; }; /** * Get visual from series or data. * @param finder * If string, e.g., 'series', means {seriesIndex: 0}. * If Object, could contain some of these properties below: * { * seriesIndex / seriesId / seriesName, * dataIndex / dataIndexInside * } * If dataIndex is not specified, series visual will be fetched, * but not data item visual. * If all of seriesIndex, seriesId, seriesName are not specified, * visual will be fetched from first series. * @param visualType 'color', 'symbol', 'symbolSize' */ ECharts.prototype.getVisual = function (finder, visualType) { var ecModel = this._model; var parsedFinder = parseFinder(ecModel, finder, { defaultMainType: 'series' }); var seriesModel = parsedFinder.seriesModel; if (false) { if (!seriesModel) { warn('There is no specified series model'); } } var data = seriesModel.getData(); var dataIndexInside = parsedFinder.hasOwnProperty('dataIndexInside') ? parsedFinder.dataIndexInside : parsedFinder.hasOwnProperty('dataIndex') ? data.indexOfRawIndex(parsedFinder.dataIndex) : null; return dataIndexInside != null ? getItemVisualFromData(data, dataIndexInside, visualType) : getVisualFromData(data, visualType); }; /** * Get view of corresponding component model */ ECharts.prototype.getViewOfComponentModel = function (componentModel) { return this._componentsMap[componentModel.__viewId]; }; /** * Get view of corresponding series model */ ECharts.prototype.getViewOfSeriesModel = function (seriesModel) { return this._chartsMap[seriesModel.__viewId]; }; ECharts.prototype._initEvents = function () { var _this = this; Object(core_util["each"])(MOUSE_EVENT_NAMES, function (eveName) { var handler = function (e) { var ecModel = _this.getModel(); var el = e.target; var params; var isGlobalOut = eveName === 'globalout'; // no e.target when 'globalout'. if (isGlobalOut) { params = {}; } else { el && findEventDispatcher(el, function (parent) { var ecData = getECData(parent); if (ecData && ecData.dataIndex != null) { var dataModel = ecData.dataModel || ecModel.getSeriesByIndex(ecData.seriesIndex); params = dataModel && dataModel.getDataParams(ecData.dataIndex, ecData.dataType, el) || {}; return true; } // If element has custom eventData of components else if (ecData.eventData) { params = Object(core_util["extend"])({}, ecData.eventData); return true; } }, true); } // Contract: if params prepared in mouse event, // these properties must be specified: // { // componentType: string (component main type) // componentIndex: number // } // Otherwise event query can not work. if (params) { var componentType = params.componentType; var componentIndex = params.componentIndex; // Special handling for historic reason: when trigger by // markLine/markPoint/markArea, the componentType is // 'markLine'/'markPoint'/'markArea', but we should better // enable them to be queried by seriesIndex, since their // option is set in each series. if (componentType === 'markLine' || componentType === 'markPoint' || componentType === 'markArea') { componentType = 'series'; componentIndex = params.seriesIndex; } var model = componentType && componentIndex != null && ecModel.getComponent(componentType, componentIndex); var view = model && _this[model.mainType === 'series' ? '_chartsMap' : '_componentsMap'][model.__viewId]; if (false) { // `event.componentType` and `event[componentTpype + 'Index']` must not // be missed, otherwise there is no way to distinguish source component. // See `dataFormat.getDataParams`. if (!isGlobalOut && !(model && view)) { warn('model or view can not be found by params'); } } params.event = e; params.type = eveName; _this._$eventProcessor.eventInfo = { targetEl: el, packedEvent: params, model: model, view: view }; _this.trigger(eveName, params); } }; // Consider that some component (like tooltip, brush, ...) // register zr event handler, but user event handler might // do anything, such as call `setOption` or `dispatchAction`, // which probably update any of the content and probably // cause problem if it is called previous other inner handlers. handler.zrEventfulCallAtLast = true; _this._zr.on(eveName, handler, _this); }); Object(core_util["each"])(eventActionMap, function (actionType, eventType) { _this._messageCenter.on(eventType, function (event) { this.trigger(eventType, event); }, _this); }); // Extra events // TODO register? Object(core_util["each"])(['selectchanged'], function (eventType) { _this._messageCenter.on(eventType, function (event) { this.trigger(eventType, event); }, _this); }); handleLegacySelectEvents(this._messageCenter, this, this._api); }; ECharts.prototype.isDisposed = function () { return this._disposed; }; ECharts.prototype.clear = function () { if (this._disposed) { disposedWarning(this.id); return; } this.setOption({ series: [] }, true); }; ECharts.prototype.dispose = function () { if (this._disposed) { disposedWarning(this.id); return; } this._disposed = true; var dom = this.getDom(); if (dom) { setAttribute(this.getDom(), DOM_ATTRIBUTE_KEY, ''); } var chart = this; var api = chart._api; var ecModel = chart._model; Object(core_util["each"])(chart._componentsViews, function (component) { component.dispose(ecModel, api); }); Object(core_util["each"])(chart._chartsViews, function (chart) { chart.dispose(ecModel, api); }); // Dispose after all views disposed chart._zr.dispose(); // Set properties to null. // To reduce the memory cost in case the top code still holds this instance unexpectedly. chart._dom = chart._model = chart._chartsMap = chart._componentsMap = chart._chartsViews = chart._componentsViews = chart._scheduler = chart._api = chart._zr = chart._throttledZrFlush = chart._theme = chart._coordSysMgr = chart._messageCenter = null; delete echarts_instances[chart.id]; }; /** * Resize the chart */ ECharts.prototype.resize = function (opts) { if (this[IN_MAIN_PROCESS_KEY]) { if (false) { error('`resize` should not be called during main process.'); } return; } if (this._disposed) { disposedWarning(this.id); return; } this._zr.resize(opts); var ecModel = this._model; // Resize loading effect this._loadingFX && this._loadingFX.resize(); if (!ecModel) { return; } var needPrepare = ecModel.resetOption('media'); var silent = opts && opts.silent; // There is some real cases that: // chart.setOption(option, { lazyUpdate: true }); // chart.resize(); if (this[PENDING_UPDATE]) { if (silent == null) { silent = this[PENDING_UPDATE].silent; } needPrepare = true; this[PENDING_UPDATE] = null; } this[IN_MAIN_PROCESS_KEY] = true; try { needPrepare && prepare(this); updateMethods.update.call(this, { type: 'resize', animation: Object(core_util["extend"])({ // Disable animation duration: 0 }, opts && opts.animation) }); } catch (e) { this[IN_MAIN_PROCESS_KEY] = false; throw e; } this[IN_MAIN_PROCESS_KEY] = false; flushPendingActions.call(this, silent); triggerUpdatedEvent.call(this, silent); }; ECharts.prototype.showLoading = function (name, cfg) { if (this._disposed) { disposedWarning(this.id); return; } if (Object(core_util["isObject"])(name)) { cfg = name; name = ''; } name = name || 'default'; this.hideLoading(); if (!loadingEffects[name]) { if (false) { warn('Loading effects ' + name + ' not exists.'); } return; } var el = loadingEffects[name](this._api, cfg); var zr = this._zr; this._loadingFX = el; zr.add(el); }; /** * Hide loading effect */ ECharts.prototype.hideLoading = function () { if (this._disposed) { disposedWarning(this.id); return; } this._loadingFX && this._zr.remove(this._loadingFX); this._loadingFX = null; }; ECharts.prototype.makeActionFromEvent = function (eventObj) { var payload = Object(core_util["extend"])({}, eventObj); payload.type = eventActionMap[eventObj.type]; return payload; }; /** * @param opt If pass boolean, means opt.silent * @param opt.silent Default `false`. Whether trigger events. * @param opt.flush Default `undefined`. * true: Flush immediately, and then pixel in canvas can be fetched * immediately. Caution: it might affect performance. * false: Not flush. * undefined: Auto decide whether perform flush. */ ECharts.prototype.dispatchAction = function (payload, opt) { if (this._disposed) { disposedWarning(this.id); return; } if (!Object(core_util["isObject"])(opt)) { opt = { silent: !!opt }; } if (!actions[payload.type]) { return; } // Avoid dispatch action before setOption. Especially in `connect`. if (!this._model) { return; } // May dispatchAction in rendering procedure if (this[IN_MAIN_PROCESS_KEY]) { this._pendingActions.push(payload); return; } var silent = opt.silent; doDispatchAction.call(this, payload, silent); var flush = opt.flush; if (flush) { this._zr.flush(); } else if (flush !== false && core_env["a" /* default */].browser.weChat) { // In WeChat embedded browser, `requestAnimationFrame` and `setInterval` // hang when sliding page (on touch event), which cause that zr does not // refresh until user interaction finished, which is not expected. // But `dispatchAction` may be called too frequently when pan on touch // screen, which impacts performance if do not throttle them. this._throttledZrFlush(); } flushPendingActions.call(this, silent); triggerUpdatedEvent.call(this, silent); }; ECharts.prototype.updateLabelLayout = function () { core_lifecycle.trigger('series:layoutlabels', this._model, this._api, { // Not adding series labels. // TODO updatedSeries: [] }); }; ECharts.prototype.appendData = function (params) { if (this._disposed) { disposedWarning(this.id); return; } var seriesIndex = params.seriesIndex; var ecModel = this.getModel(); var seriesModel = ecModel.getSeriesByIndex(seriesIndex); if (false) { assert(params.data && seriesModel); } seriesModel.appendData(params); // Note: `appendData` does not support that update extent of coordinate // system, util some scenario require that. In the expected usage of // `appendData`, the initial extent of coordinate system should better // be fixed by axis `min`/`max` setting or initial data, otherwise if // the extent changed while `appendData`, the location of the painted // graphic elements have to be changed, which make the usage of // `appendData` meaningless. this._scheduler.unfinished = true; this.getZr().wakeUp(); }; // A work around for no `internal` modifier in ts yet but // need to strictly hide private methods to JS users. ECharts.internalField = function () { prepare = function (ecIns) { var scheduler = ecIns._scheduler; scheduler.restorePipelines(ecIns._model); scheduler.prepareStageTasks(); prepareView(ecIns, true); prepareView(ecIns, false); scheduler.plan(); }; /** * Prepare view instances of charts and components */ prepareView = function (ecIns, isComponent) { var ecModel = ecIns._model; var scheduler = ecIns._scheduler; var viewList = isComponent ? ecIns._componentsViews : ecIns._chartsViews; var viewMap = isComponent ? ecIns._componentsMap : ecIns._chartsMap; var zr = ecIns._zr; var api = ecIns._api; for (var i = 0; i < viewList.length; i++) { viewList[i].__alive = false; } isComponent ? ecModel.eachComponent(function (componentType, model) { componentType !== 'series' && doPrepare(model); }) : ecModel.eachSeries(doPrepare); function doPrepare(model) { // By default view will be reused if possible for the case that `setOption` with "notMerge" // mode and need to enable transition animation. (Usually, when they have the same id, or // especially no id but have the same type & name & index. See the `model.id` generation // rule in `makeIdAndName` and `viewId` generation rule here). // But in `replaceMerge` mode, this feature should be able to disabled when it is clear that // the new model has nothing to do with the old model. var requireNewView = model.__requireNewView; // This command should not work twice. model.__requireNewView = false; // Consider: id same and type changed. var viewId = '_ec_' + model.id + '_' + model.type; var view = !requireNewView && viewMap[viewId]; if (!view) { var classType = parseClassType(model.type); var Clazz = isComponent ? view_Component.getClass(classType.main, classType.sub) : // FIXME:TS // (ChartView as ChartViewConstructor).getClass('series', classType.sub) // For backward compat, still support a chart type declared as only subType // like "liquidfill", but recommend "series.liquidfill" // But need a base class to make a type series. Chart.getClass(classType.sub); if (false) { assert(Clazz, classType.sub + ' does not exist.'); } view = new Clazz(); view.init(ecModel, api); viewMap[viewId] = view; viewList.push(view); zr.add(view.group); } model.__viewId = view.__id = viewId; view.__alive = true; view.__model = model; view.group.__ecComponentInfo = { mainType: model.mainType, index: model.componentIndex }; !isComponent && scheduler.prepareView(view, model, ecModel, api); } for (var i = 0; i < viewList.length;) { var view = viewList[i]; if (!view.__alive) { !isComponent && view.renderTask.dispose(); zr.remove(view.group); view.dispose(ecModel, api); viewList.splice(i, 1); if (viewMap[view.__id] === view) { delete viewMap[view.__id]; } view.__id = view.group.__ecComponentInfo = null; } else { i++; } } }; updateDirectly = function (ecIns, method, payload, mainType, subType) { var ecModel = ecIns._model; ecModel.setUpdatePayload(payload); // broadcast if (!mainType) { // FIXME // Chart will not be update directly here, except set dirty. // But there is no such scenario now. Object(core_util["each"])([].concat(ecIns._componentsViews).concat(ecIns._chartsViews), callView); return; } var query = {}; query[mainType + 'Id'] = payload[mainType + 'Id']; query[mainType + 'Index'] = payload[mainType + 'Index']; query[mainType + 'Name'] = payload[mainType + 'Name']; var condition = { mainType: mainType, query: query }; subType && (condition.subType = subType); // subType may be '' by parseClassType; var excludeSeriesId = payload.excludeSeriesId; var excludeSeriesIdMap; if (excludeSeriesId != null) { excludeSeriesIdMap = Object(core_util["createHashMap"])(); Object(core_util["each"])(normalizeToArray(excludeSeriesId), function (id) { var modelId = convertOptionIdName(id, null); if (modelId != null) { excludeSeriesIdMap.set(modelId, true); } }); } // If dispatchAction before setOption, do nothing. ecModel && ecModel.eachComponent(condition, function (model) { var isExcluded = excludeSeriesIdMap && excludeSeriesIdMap.get(model.id) != null; if (isExcluded) { return; } ; if (isHighDownPayload(payload)) { if (model instanceof Series) { if (payload.type === HIGHLIGHT_ACTION_TYPE && !payload.notBlur && !model.get(['emphasis', 'disabled'])) { blurSeriesFromHighlightPayload(model, payload, ecIns._api); } } else { var _a = findComponentHighDownDispatchers(model.mainType, model.componentIndex, payload.name, ecIns._api), focusSelf = _a.focusSelf, dispatchers = _a.dispatchers; if (payload.type === HIGHLIGHT_ACTION_TYPE && focusSelf && !payload.notBlur) { blurComponent(model.mainType, model.componentIndex, ecIns._api); } // PENDING: // Whether to put this "enter emphasis" code in `ComponentView`, // which will be the same as `ChartView` but might be not necessary // and will be far from this logic. if (dispatchers) { Object(core_util["each"])(dispatchers, function (dispatcher) { payload.type === HIGHLIGHT_ACTION_TYPE ? enterEmphasis(dispatcher) : leaveEmphasis(dispatcher); }); } } } else if (isSelectChangePayload(payload)) { // TODO geo if (model instanceof Series) { toggleSelectionFromPayload(model, payload, ecIns._api); updateSeriesElementSelection(model); markStatusToUpdate(ecIns); } } }, ecIns); ecModel && ecModel.eachComponent(condition, function (model) { var isExcluded = excludeSeriesIdMap && excludeSeriesIdMap.get(model.id) != null; if (isExcluded) { return; } ; callView(ecIns[mainType === 'series' ? '_chartsMap' : '_componentsMap'][model.__viewId]); }, ecIns); function callView(view) { view && view.__alive && view[method] && view[method](view.__model, ecModel, ecIns._api, payload); } }; updateMethods = { prepareAndUpdate: function (payload) { prepare(this); updateMethods.update.call(this, payload, { // Needs to mark option changed if newOption is given. // It's from MagicType. // TODO If use a separate flag optionChanged in payload? optionChanged: payload.newOption != null }); }, update: function (payload, updateParams) { var ecModel = this._model; var api = this._api; var zr = this._zr; var coordSysMgr = this._coordSysMgr; var scheduler = this._scheduler; // update before setOption if (!ecModel) { return; } ecModel.setUpdatePayload(payload); scheduler.restoreData(ecModel, payload); scheduler.performSeriesTasks(ecModel); // TODO // Save total ecModel here for undo/redo (after restoring data and before processing data). // Undo (restoration of total ecModel) can be carried out in 'action' or outside API call. // Create new coordinate system each update // In LineView may save the old coordinate system and use it to get the original point. coordSysMgr.create(ecModel, api); scheduler.performDataProcessorTasks(ecModel, payload); // Current stream render is not supported in data process. So we can update // stream modes after data processing, where the filtered data is used to // determine whether to use progressive rendering. updateStreamModes(this, ecModel); // We update stream modes before coordinate system updated, then the modes info // can be fetched when coord sys updating (consider the barGrid extent fix). But // the drawback is the full coord info can not be fetched. Fortunately this full // coord is not required in stream mode updater currently. coordSysMgr.update(ecModel, api); clearColorPalette(ecModel); scheduler.performVisualTasks(ecModel, payload); render(this, ecModel, api, payload, updateParams); // Set background var backgroundColor = ecModel.get('backgroundColor') || 'transparent'; var darkMode = ecModel.get('darkMode'); zr.setBackgroundColor(backgroundColor); // Force set dark mode. if (darkMode != null && darkMode !== 'auto') { zr.setDarkMode(darkMode); } core_lifecycle.trigger('afterupdate', ecModel, api); }, updateTransform: function (payload) { var _this = this; var ecModel = this._model; var api = this._api; // update before setOption if (!ecModel) { return; } ecModel.setUpdatePayload(payload); // ChartView.markUpdateMethod(payload, 'updateTransform'); var componentDirtyList = []; ecModel.eachComponent(function (componentType, componentModel) { if (componentType === 'series') { return; } var componentView = _this.getViewOfComponentModel(componentModel); if (componentView && componentView.__alive) { if (componentView.updateTransform) { var result = componentView.updateTransform(componentModel, ecModel, api, payload); result && result.update && componentDirtyList.push(componentView); } else { componentDirtyList.push(componentView); } } }); var seriesDirtyMap = Object(core_util["createHashMap"])(); ecModel.eachSeries(function (seriesModel) { var chartView = _this._chartsMap[seriesModel.__viewId]; if (chartView.updateTransform) { var result = chartView.updateTransform(seriesModel, ecModel, api, payload); result && result.update && seriesDirtyMap.set(seriesModel.uid, 1); } else { seriesDirtyMap.set(seriesModel.uid, 1); } }); clearColorPalette(ecModel); // Keep pipe to the exist pipeline because it depends on the render task of the full pipeline. // this._scheduler.performVisualTasks(ecModel, payload, 'layout', true); this._scheduler.performVisualTasks(ecModel, payload, { setDirty: true, dirtyMap: seriesDirtyMap }); // Currently, not call render of components. Geo render cost a lot. // renderComponents(ecIns, ecModel, api, payload, componentDirtyList); renderSeries(this, ecModel, api, payload, {}, seriesDirtyMap); core_lifecycle.trigger('afterupdate', ecModel, api); }, updateView: function (payload) { var ecModel = this._model; // update before setOption if (!ecModel) { return; } ecModel.setUpdatePayload(payload); Chart.markUpdateMethod(payload, 'updateView'); clearColorPalette(ecModel); // Keep pipe to the exist pipeline because it depends on the render task of the full pipeline. this._scheduler.performVisualTasks(ecModel, payload, { setDirty: true }); render(this, ecModel, this._api, payload, {}); core_lifecycle.trigger('afterupdate', ecModel, this._api); }, updateVisual: function (payload) { // updateMethods.update.call(this, payload); var _this = this; var ecModel = this._model; // update before setOption if (!ecModel) { return; } ecModel.setUpdatePayload(payload); // clear all visual ecModel.eachSeries(function (seriesModel) { seriesModel.getData().clearAllVisual(); }); // Perform visual Chart.markUpdateMethod(payload, 'updateVisual'); clearColorPalette(ecModel); // Keep pipe to the exist pipeline because it depends on the render task of the full pipeline. this._scheduler.performVisualTasks(ecModel, payload, { visualType: 'visual', setDirty: true }); ecModel.eachComponent(function (componentType, componentModel) { if (componentType !== 'series') { var componentView = _this.getViewOfComponentModel(componentModel); componentView && componentView.__alive && componentView.updateVisual(componentModel, ecModel, _this._api, payload); } }); ecModel.eachSeries(function (seriesModel) { var chartView = _this._chartsMap[seriesModel.__viewId]; chartView.updateVisual(seriesModel, ecModel, _this._api, payload); }); core_lifecycle.trigger('afterupdate', ecModel, this._api); }, updateLayout: function (payload) { updateMethods.update.call(this, payload); } }; doConvertPixel = function (ecIns, methodName, finder, value) { if (ecIns._disposed) { disposedWarning(ecIns.id); return; } var ecModel = ecIns._model; var coordSysList = ecIns._coordSysMgr.getCoordinateSystems(); var result; var parsedFinder = parseFinder(ecModel, finder); for (var i = 0; i < coordSysList.length; i++) { var coordSys = coordSysList[i]; if (coordSys[methodName] && (result = coordSys[methodName](ecModel, parsedFinder, value)) != null) { return result; } } if (false) { warn('No coordinate system that supports ' + methodName + ' found by the given finder.'); } }; updateStreamModes = function (ecIns, ecModel) { var chartsMap = ecIns._chartsMap; var scheduler = ecIns._scheduler; ecModel.eachSeries(function (seriesModel) { scheduler.updateStreamModes(seriesModel, chartsMap[seriesModel.__viewId]); }); }; doDispatchAction = function (payload, silent) { var _this = this; var ecModel = this.getModel(); var payloadType = payload.type; var escapeConnect = payload.escapeConnect; var actionWrap = actions[payloadType]; var actionInfo = actionWrap.actionInfo; var cptTypeTmp = (actionInfo.update || 'update').split(':'); var updateMethod = cptTypeTmp.pop(); var cptType = cptTypeTmp[0] != null && parseClassType(cptTypeTmp[0]); this[IN_MAIN_PROCESS_KEY] = true; var payloads = [payload]; var batched = false; // Batch action if (payload.batch) { batched = true; payloads = Object(core_util["map"])(payload.batch, function (item) { item = Object(core_util["defaults"])(Object(core_util["extend"])({}, item), payload); item.batch = null; return item; }); } var eventObjBatch = []; var eventObj; var isSelectChange = isSelectChangePayload(payload); var isHighDown = isHighDownPayload(payload); // Only leave blur once if there are multiple batches. if (isHighDown) { allLeaveBlur(this._api); } Object(core_util["each"])(payloads, function (batchItem) { // Action can specify the event by return it. eventObj = actionWrap.action(batchItem, _this._model, _this._api); // Emit event outside eventObj = eventObj || Object(core_util["extend"])({}, batchItem); // Convert type to eventType eventObj.type = actionInfo.event || eventObj.type; eventObjBatch.push(eventObj); // light update does not perform data process, layout and visual. if (isHighDown) { var _a = preParseFinder(payload), queryOptionMap = _a.queryOptionMap, mainTypeSpecified = _a.mainTypeSpecified; var componentMainType = mainTypeSpecified ? queryOptionMap.keys()[0] : 'series'; updateDirectly(_this, updateMethod, batchItem, componentMainType); markStatusToUpdate(_this); } else if (isSelectChange) { // At present `dispatchAction({ type: 'select', ... })` is not supported on components. // geo still use 'geoselect'. updateDirectly(_this, updateMethod, batchItem, 'series'); markStatusToUpdate(_this); } else if (cptType) { updateDirectly(_this, updateMethod, batchItem, cptType.main, cptType.sub); } }); if (updateMethod !== 'none' && !isHighDown && !isSelectChange && !cptType) { try { // Still dirty if (this[PENDING_UPDATE]) { prepare(this); updateMethods.update.call(this, payload); this[PENDING_UPDATE] = null; } else { updateMethods[updateMethod].call(this, payload); } } catch (e) { this[IN_MAIN_PROCESS_KEY] = false; throw e; } } // Follow the rule of action batch if (batched) { eventObj = { type: actionInfo.event || payloadType, escapeConnect: escapeConnect, batch: eventObjBatch }; } else { eventObj = eventObjBatch[0]; } this[IN_MAIN_PROCESS_KEY] = false; if (!silent) { var messageCenter = this._messageCenter; messageCenter.trigger(eventObj.type, eventObj); // Extra triggered 'selectchanged' event if (isSelectChange) { var newObj = { type: 'selectchanged', escapeConnect: escapeConnect, selected: getAllSelectedIndices(ecModel), isFromClick: payload.isFromClick || false, fromAction: payload.type, fromActionPayload: payload }; messageCenter.trigger(newObj.type, newObj); } } }; flushPendingActions = function (silent) { var pendingActions = this._pendingActions; while (pendingActions.length) { var payload = pendingActions.shift(); doDispatchAction.call(this, payload, silent); } }; triggerUpdatedEvent = function (silent) { !silent && this.trigger('updated'); }; /** * Event `rendered` is triggered when zr * rendered. It is useful for realtime * snapshot (reflect animation). * * Event `finished` is triggered when: * (1) zrender rendering finished. * (2) initial animation finished. * (3) progressive rendering finished. * (4) no pending action. * (5) no delayed setOption needs to be processed. */ bindRenderedEvent = function (zr, ecIns) { zr.on('rendered', function (params) { ecIns.trigger('rendered', params); // The `finished` event should not be triggered repeatedly, // so it should only be triggered when rendering indeed happens // in zrender. (Consider the case that dipatchAction is keep // triggering when mouse move). if ( // Although zr is dirty if initial animation is not finished // and this checking is called on frame, we also check // animation finished for robustness. zr.animation.isFinished() && !ecIns[PENDING_UPDATE] && !ecIns._scheduler.unfinished && !ecIns._pendingActions.length) { ecIns.trigger('finished'); } }); }; bindMouseEvent = function (zr, ecIns) { zr.on('mouseover', function (e) { var el = e.target; var dispatcher = findEventDispatcher(el, isHighDownDispatcher); if (dispatcher) { handleGlobalMouseOverForHighDown(dispatcher, e, ecIns._api); markStatusToUpdate(ecIns); } }).on('mouseout', function (e) { var el = e.target; var dispatcher = findEventDispatcher(el, isHighDownDispatcher); if (dispatcher) { handleGlobalMouseOutForHighDown(dispatcher, e, ecIns._api); markStatusToUpdate(ecIns); } }).on('click', function (e) { var el = e.target; var dispatcher = findEventDispatcher(el, function (target) { return getECData(target).dataIndex != null; }, true); if (dispatcher) { var actionType = dispatcher.selected ? 'unselect' : 'select'; var ecData = getECData(dispatcher); ecIns._api.dispatchAction({ type: actionType, dataType: ecData.dataType, dataIndexInside: ecData.dataIndex, seriesIndex: ecData.seriesIndex, isFromClick: true }); } }); }; function clearColorPalette(ecModel) { ecModel.clearColorPalette(); ecModel.eachSeries(function (seriesModel) { seriesModel.clearColorPalette(); }); } ; // Allocate zlevels for series and components function allocateZlevels(ecModel) { ; var componentZLevels = []; var seriesZLevels = []; var hasSeparateZLevel = false; ecModel.eachComponent(function (componentType, componentModel) { var zlevel = componentModel.get('zlevel') || 0; var z = componentModel.get('z') || 0; var zlevelKey = componentModel.getZLevelKey(); hasSeparateZLevel = hasSeparateZLevel || !!zlevelKey; (componentType === 'series' ? seriesZLevels : componentZLevels).push({ zlevel: zlevel, z: z, idx: componentModel.componentIndex, type: componentType, key: zlevelKey }); }); if (hasSeparateZLevel) { // Series after component var zLevels = componentZLevels.concat(seriesZLevels); var lastSeriesZLevel_1; var lastSeriesKey_1; timsort_sort(zLevels, function (a, b) { if (a.zlevel === b.zlevel) { return a.z - b.z; } return a.zlevel - b.zlevel; }); Object(core_util["each"])(zLevels, function (item) { var componentModel = ecModel.getComponent(item.type, item.idx); var zlevel = item.zlevel; var key = item.key; if (lastSeriesZLevel_1 != null) { zlevel = Math.max(lastSeriesZLevel_1, zlevel); } if (key) { if (zlevel === lastSeriesZLevel_1 && key !== lastSeriesKey_1) { zlevel++; } lastSeriesKey_1 = key; } else if (lastSeriesKey_1) { if (zlevel === lastSeriesZLevel_1) { zlevel++; } lastSeriesKey_1 = ''; } lastSeriesZLevel_1 = zlevel; componentModel.setZLevel(zlevel); }); } } render = function (ecIns, ecModel, api, payload, updateParams) { allocateZlevels(ecModel); renderComponents(ecIns, ecModel, api, payload, updateParams); Object(core_util["each"])(ecIns._chartsViews, function (chart) { chart.__alive = false; }); renderSeries(ecIns, ecModel, api, payload, updateParams); // Remove groups of unrendered charts Object(core_util["each"])(ecIns._chartsViews, function (chart) { if (!chart.__alive) { chart.remove(ecModel, api); } }); }; renderComponents = function (ecIns, ecModel, api, payload, updateParams, dirtyList) { Object(core_util["each"])(dirtyList || ecIns._componentsViews, function (componentView) { var componentModel = componentView.__model; clearStates(componentModel, componentView); componentView.render(componentModel, ecModel, api, payload); updateZ(componentModel, componentView); updateStates(componentModel, componentView); }); }; /** * Render each chart and component */ renderSeries = function (ecIns, ecModel, api, payload, updateParams, dirtyMap) { // Render all charts var scheduler = ecIns._scheduler; updateParams = Object(core_util["extend"])(updateParams || {}, { updatedSeries: ecModel.getSeries() }); // TODO progressive? core_lifecycle.trigger('series:beforeupdate', ecModel, api, updateParams); var unfinished = false; ecModel.eachSeries(function (seriesModel) { var chartView = ecIns._chartsMap[seriesModel.__viewId]; chartView.__alive = true; var renderTask = chartView.renderTask; scheduler.updatePayload(renderTask, payload); // TODO states on marker. clearStates(seriesModel, chartView); if (dirtyMap && dirtyMap.get(seriesModel.uid)) { renderTask.dirty(); } if (renderTask.perform(scheduler.getPerformArgs(renderTask))) { unfinished = true; } chartView.group.silent = !!seriesModel.get('silent'); // Should not call markRedraw on group, because it will disable zrender // incremental render (always render from the __startIndex each frame) // chartView.group.markRedraw(); updateBlend(seriesModel, chartView); updateSeriesElementSelection(seriesModel); }); scheduler.unfinished = unfinished || scheduler.unfinished; core_lifecycle.trigger('series:layoutlabels', ecModel, api, updateParams); // transition after label is layouted. core_lifecycle.trigger('series:transition', ecModel, api, updateParams); ecModel.eachSeries(function (seriesModel) { var chartView = ecIns._chartsMap[seriesModel.__viewId]; // Update Z after labels updated. Before applying states. updateZ(seriesModel, chartView); // NOTE: Update states after label is updated. // label should be in normal status when layouting. updateStates(seriesModel, chartView); }); // If use hover layer updateHoverLayerStatus(ecIns, ecModel); core_lifecycle.trigger('series:afterupdate', ecModel, api, updateParams); }; markStatusToUpdate = function (ecIns) { ecIns[STATUS_NEEDS_UPDATE_KEY] = true; // Wake up zrender if it's sleep. Let it update states in the next frame. ecIns.getZr().wakeUp(); }; applyChangedStates = function (ecIns) { if (!ecIns[STATUS_NEEDS_UPDATE_KEY]) { return; } ecIns.getZr().storage.traverse(function (el) { // Not applied on removed elements, it may still in fading. if (isElementRemoved(el)) { return; } applyElementStates(el); }); ecIns[STATUS_NEEDS_UPDATE_KEY] = false; }; function applyElementStates(el) { var newStates = []; var oldStates = el.currentStates; // Keep other states. for (var i = 0; i < oldStates.length; i++) { var stateName = oldStates[i]; if (!(stateName === 'emphasis' || stateName === 'blur' || stateName === 'select')) { newStates.push(stateName); } } // Only use states when it's exists. if (el.selected && el.states.select) { newStates.push('select'); } if (el.hoverState === HOVER_STATE_EMPHASIS && el.states.emphasis) { newStates.push('emphasis'); } else if (el.hoverState === HOVER_STATE_BLUR && el.states.blur) { newStates.push('blur'); } el.useStates(newStates); } function updateHoverLayerStatus(ecIns, ecModel) { var zr = ecIns._zr; var storage = zr.storage; var elCount = 0; storage.traverse(function (el) { if (!el.isGroup) { elCount++; } }); if (elCount > ecModel.get('hoverLayerThreshold') && !core_env["a" /* default */].node && !core_env["a" /* default */].worker) { ecModel.eachSeries(function (seriesModel) { if (seriesModel.preventUsingHoverLayer) { return; } var chartView = ecIns._chartsMap[seriesModel.__viewId]; if (chartView.__alive) { chartView.eachRendered(function (el) { if (el.states.emphasis) { el.states.emphasis.hoverLayer = true; } }); } }); } } ; /** * Update chart and blend. */ function updateBlend(seriesModel, chartView) { var blendMode = seriesModel.get('blendMode') || null; chartView.eachRendered(function (el) { // FIXME marker and other components if (!el.isGroup) { // DON'T mark the element dirty. In case element is incremental and don't want to rerender. el.style.blend = blendMode; } }); } ; function updateZ(model, view) { if (model.preventAutoZ) { return; } var z = model.get('z') || 0; var zlevel = model.get('zlevel') || 0; // Set z and zlevel view.eachRendered(function (el) { doUpdateZ(el, z, zlevel, -Infinity); // Don't traverse the children because it has been traversed in _updateZ. return true; }); } ; function doUpdateZ(el, z, zlevel, maxZ2) { // Group may also have textContent var label = el.getTextContent(); var labelLine = el.getTextGuideLine(); var isGroup = el.isGroup; if (isGroup) { // set z & zlevel of children elements of Group var children = el.childrenRef(); for (var i = 0; i < children.length; i++) { maxZ2 = Math.max(doUpdateZ(children[i], z, zlevel, maxZ2), maxZ2); } } else { // not Group el.z = z; el.zlevel = zlevel; maxZ2 = Math.max(el.z2, maxZ2); } // always set z and zlevel if label/labelLine exists if (label) { label.z = z; label.zlevel = zlevel; // lift z2 of text content // TODO if el.emphasis.z2 is spcefied, what about textContent. isFinite(maxZ2) && (label.z2 = maxZ2 + 2); } if (labelLine) { var textGuideLineConfig = el.textGuideLineConfig; labelLine.z = z; labelLine.zlevel = zlevel; isFinite(maxZ2) && (labelLine.z2 = maxZ2 + (textGuideLineConfig && textGuideLineConfig.showAbove ? 1 : -1)); } return maxZ2; } // Clear states without animation. // TODO States on component. function clearStates(model, view) { view.eachRendered(function (el) { // Not applied on removed elements, it may still in fading. if (isElementRemoved(el)) { return; } var textContent = el.getTextContent(); var textGuide = el.getTextGuideLine(); if (el.stateTransition) { el.stateTransition = null; } if (textContent && textContent.stateTransition) { textContent.stateTransition = null; } if (textGuide && textGuide.stateTransition) { textGuide.stateTransition = null; } // TODO If el is incremental. if (el.hasState()) { el.prevStates = el.currentStates; el.clearStates(); } else if (el.prevStates) { el.prevStates = null; } }); } function updateStates(model, view) { var stateAnimationModel = model.getModel('stateAnimation'); var enableAnimation = model.isAnimationEnabled(); var duration = stateAnimationModel.get('duration'); var stateTransition = duration > 0 ? { duration: duration, delay: stateAnimationModel.get('delay'), easing: stateAnimationModel.get('easing') // additive: stateAnimationModel.get('additive') } : null; view.eachRendered(function (el) { if (el.states && el.states.emphasis) { // Not applied on removed elements, it may still in fading. if (isElementRemoved(el)) { return; } if (el instanceof graphic_Path) { savePathStates(el); } // Only updated on changed element. In case element is incremental and don't want to rerender. // TODO, a more proper way? if (el.__dirty) { var prevStates = el.prevStates; // Restore states without animation if (prevStates) { el.useStates(prevStates); } } // Update state transition and enable animation again. if (enableAnimation) { el.stateTransition = stateTransition; var textContent = el.getTextContent(); var textGuide = el.getTextGuideLine(); // TODO Is it necessary to animate label? if (textContent) { textContent.stateTransition = stateTransition; } if (textGuide) { textGuide.stateTransition = stateTransition; } } // Use highlighted and selected flag to toggle states. if (el.__dirty) { applyElementStates(el); } } }); } ; createExtensionAPI = function (ecIns) { return new (/** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(class_1, _super); function class_1() { return _super !== null && _super.apply(this, arguments) || this; } class_1.prototype.getCoordinateSystems = function () { return ecIns._coordSysMgr.getCoordinateSystems(); }; class_1.prototype.getComponentByElement = function (el) { while (el) { var modelInfo = el.__ecComponentInfo; if (modelInfo != null) { return ecIns._model.getComponent(modelInfo.mainType, modelInfo.index); } el = el.parent; } }; class_1.prototype.enterEmphasis = function (el, highlightDigit) { enterEmphasis(el, highlightDigit); markStatusToUpdate(ecIns); }; class_1.prototype.leaveEmphasis = function (el, highlightDigit) { leaveEmphasis(el, highlightDigit); markStatusToUpdate(ecIns); }; class_1.prototype.enterBlur = function (el) { enterBlur(el); markStatusToUpdate(ecIns); }; class_1.prototype.leaveBlur = function (el) { leaveBlur(el); markStatusToUpdate(ecIns); }; class_1.prototype.enterSelect = function (el) { enterSelect(el); markStatusToUpdate(ecIns); }; class_1.prototype.leaveSelect = function (el) { leaveSelect(el); markStatusToUpdate(ecIns); }; class_1.prototype.getModel = function () { return ecIns.getModel(); }; class_1.prototype.getViewOfComponentModel = function (componentModel) { return ecIns.getViewOfComponentModel(componentModel); }; class_1.prototype.getViewOfSeriesModel = function (seriesModel) { return ecIns.getViewOfSeriesModel(seriesModel); }; return class_1; }(core_ExtensionAPI))(ecIns); }; enableConnect = function (chart) { function updateConnectedChartsStatus(charts, status) { for (var i = 0; i < charts.length; i++) { var otherChart = charts[i]; otherChart[CONNECT_STATUS_KEY] = status; } } Object(core_util["each"])(eventActionMap, function (actionType, eventType) { chart._messageCenter.on(eventType, function (event) { if (connectedGroups[chart.group] && chart[CONNECT_STATUS_KEY] !== CONNECT_STATUS_PENDING) { if (event && event.escapeConnect) { return; } var action_1 = chart.makeActionFromEvent(event); var otherCharts_1 = []; Object(core_util["each"])(echarts_instances, function (otherChart) { if (otherChart !== chart && otherChart.group === chart.group) { otherCharts_1.push(otherChart); } }); updateConnectedChartsStatus(otherCharts_1, CONNECT_STATUS_PENDING); Object(core_util["each"])(otherCharts_1, function (otherChart) { if (otherChart[CONNECT_STATUS_KEY] !== CONNECT_STATUS_UPDATING) { otherChart.dispatchAction(action_1); } }); updateConnectedChartsStatus(otherCharts_1, CONNECT_STATUS_UPDATED); } }); }); }; }(); return ECharts; }(core_Eventful); var echartsProto = echarts_ECharts.prototype; echartsProto.on = createRegisterEventWithLowercaseECharts('on'); echartsProto.off = createRegisterEventWithLowercaseECharts('off'); /** * @deprecated */ // @ts-ignore echartsProto.one = function (eventName, cb, ctx) { var self = this; log_deprecateLog('ECharts#one is deprecated.'); function wrapped() { var args2 = []; for (var _i = 0; _i < arguments.length; _i++) { args2[_i] = arguments[_i]; } cb && cb.apply && cb.apply(this, args2); // @ts-ignore self.off(eventName, wrapped); } ; // @ts-ignore this.on.call(this, eventName, wrapped, ctx); }; var MOUSE_EVENT_NAMES = ['click', 'dblclick', 'mouseover', 'mouseout', 'mousemove', 'mousedown', 'mouseup', 'globalout', 'contextmenu']; function disposedWarning(id) { if (false) { warn('Instance ' + id + ' has been disposed'); } } var actions = {}; /** * Map eventType to actionType */ var eventActionMap = {}; var dataProcessorFuncs = []; var echarts_optionPreprocessorFuncs = []; var visualFuncs = []; var themeStorage = {}; var loadingEffects = {}; var echarts_instances = {}; var connectedGroups = {}; var idBase = +new Date() - 0; var groupIdBase = +new Date() - 0; var DOM_ATTRIBUTE_KEY = '_echarts_instance_'; /** * @param opts.devicePixelRatio Use window.devicePixelRatio by default * @param opts.renderer Can choose 'canvas' or 'svg' to render the chart. * @param opts.width Use clientWidth of the input `dom` by default. * Can be 'auto' (the same as null/undefined) * @param opts.height Use clientHeight of the input `dom` by default. * Can be 'auto' (the same as null/undefined) * @param opts.locale Specify the locale. * @param opts.useDirtyRect Enable dirty rectangle rendering or not. */ function echarts_init(dom, theme, opts) { var isClient = !(opts && opts.ssr); if (isClient) { if (false) { if (!dom) { throw new Error('Initialize failed: invalid dom.'); } } var existInstance = getInstanceByDom(dom); if (existInstance) { if (false) { warn('There is a chart instance already initialized on the dom.'); } return existInstance; } if (false) { if (isDom(dom) && dom.nodeName.toUpperCase() !== 'CANVAS' && (!dom.clientWidth && (!opts || opts.width == null) || !dom.clientHeight && (!opts || opts.height == null))) { warn('Can\'t get DOM width or height. Please check ' + 'dom.clientWidth and dom.clientHeight. They should not be 0.' + 'For example, you may need to call this in the callback ' + 'of window.onload.'); } } } var chart = new echarts_ECharts(dom, theme, opts); chart.id = 'ec_' + idBase++; echarts_instances[chart.id] = chart; isClient && setAttribute(dom, DOM_ATTRIBUTE_KEY, chart.id); enableConnect(chart); core_lifecycle.trigger('afterinit', chart); return chart; } /** * @usage * (A) * ```js * let chart1 = echarts.init(dom1); * let chart2 = echarts.init(dom2); * chart1.group = 'xxx'; * chart2.group = 'xxx'; * echarts.connect('xxx'); * ``` * (B) * ```js * let chart1 = echarts.init(dom1); * let chart2 = echarts.init(dom2); * echarts.connect('xxx', [chart1, chart2]); * ``` */ function connect(groupId) { // Is array of charts if (Object(core_util["isArray"])(groupId)) { var charts = groupId; groupId = null; // If any chart has group Object(core_util["each"])(charts, function (chart) { if (chart.group != null) { groupId = chart.group; } }); groupId = groupId || 'g_' + groupIdBase++; Object(core_util["each"])(charts, function (chart) { chart.group = groupId; }); } connectedGroups[groupId] = true; return groupId; } function disconnect(groupId) { connectedGroups[groupId] = false; } /** * Alias and backward compatibility * @deprecated */ var disConnect = disconnect; /** * Dispose a chart instance */ function echarts_dispose(chart) { if (Object(core_util["isString"])(chart)) { chart = echarts_instances[chart]; } else if (!(chart instanceof echarts_ECharts)) { // Try to treat as dom chart = getInstanceByDom(chart); } if (chart instanceof echarts_ECharts && !chart.isDisposed()) { chart.dispose(); } } function getInstanceByDom(dom) { return echarts_instances[getAttribute(dom, DOM_ATTRIBUTE_KEY)]; } function getInstanceById(key) { return echarts_instances[key]; } /** * Register theme */ function registerTheme(name, theme) { themeStorage[name] = theme; } /** * Register option preprocessor */ function registerPreprocessor(preprocessorFunc) { if (Object(core_util["indexOf"])(echarts_optionPreprocessorFuncs, preprocessorFunc) < 0) { echarts_optionPreprocessorFuncs.push(preprocessorFunc); } } function registerProcessor(priority, processor) { normalizeRegister(dataProcessorFuncs, priority, processor, PRIORITY_PROCESSOR_DEFAULT); } /** * Register postIniter * @param {Function} postInitFunc */ function registerPostInit(postInitFunc) { registerUpdateLifecycle('afterinit', postInitFunc); } /** * Register postUpdater * @param {Function} postUpdateFunc */ function registerPostUpdate(postUpdateFunc) { registerUpdateLifecycle('afterupdate', postUpdateFunc); } function registerUpdateLifecycle(name, cb) { core_lifecycle.on(name, cb); } function registerAction(actionInfo, eventName, action) { if (Object(core_util["isFunction"])(eventName)) { action = eventName; eventName = ''; } var actionType = Object(core_util["isObject"])(actionInfo) ? actionInfo.type : [actionInfo, actionInfo = { event: eventName }][0]; // Event name is all lowercase actionInfo.event = (actionInfo.event || actionType).toLowerCase(); eventName = actionInfo.event; if (eventActionMap[eventName]) { // Already registered. return; } // Validate action type and event name. Object(core_util["assert"])(ACTION_REG.test(actionType) && ACTION_REG.test(eventName)); if (!actions[actionType]) { actions[actionType] = { action: action, actionInfo: actionInfo }; } eventActionMap[eventName] = actionType; } function registerCoordinateSystem(type, coordSysCreator) { core_CoordinateSystem.register(type, coordSysCreator); } /** * Get dimensions of specified coordinate system. * @param {string} type * @return {Array.} */ function getCoordinateSystemDimensions(type) { var coordSysCreator = core_CoordinateSystem.get(type); if (coordSysCreator) { return coordSysCreator.getDimensionsInfo ? coordSysCreator.getDimensionsInfo() : coordSysCreator.dimensions.slice(); } } function registerLayout(priority, layoutTask) { normalizeRegister(visualFuncs, priority, layoutTask, PRIORITY_VISUAL_LAYOUT, 'layout'); } function registerVisual(priority, visualTask) { normalizeRegister(visualFuncs, priority, visualTask, PRIORITY_VISUAL_CHART, 'visual'); } var registeredTasks = []; function normalizeRegister(targetList, priority, fn, defaultPriority, visualType) { if (Object(core_util["isFunction"])(priority) || Object(core_util["isObject"])(priority)) { fn = priority; priority = defaultPriority; } if (false) { if (isNaN(priority) || priority == null) { throw new Error('Illegal priority'); } // Check duplicate each(targetList, function (wrap) { assert(wrap.__raw !== fn); }); } // Already registered if (Object(core_util["indexOf"])(registeredTasks, fn) >= 0) { return; } registeredTasks.push(fn); var stageHandler = core_Scheduler.wrapStageHandler(fn, visualType); stageHandler.__prio = priority; stageHandler.__raw = fn; targetList.push(stageHandler); } function registerLoading(name, loadingFx) { loadingEffects[name] = loadingFx; } /** * ZRender need a canvas context to do measureText. * But in node environment canvas may be created by node-canvas. * So we need to specify how to create a canvas instead of using document.createElement('canvas') * * * @deprecated use setPlatformAPI({ createCanvas }) instead. * * @example * let Canvas = require('canvas'); * let echarts = require('echarts'); * echarts.setCanvasCreator(function () { * // Small size is enough. * return new Canvas(32, 32); * }); */ function setCanvasCreator(creator) { if (false) { deprecateLog('setCanvasCreator is deprecated. Use setPlatformAPI({ createCanvas }) instead.'); } Object(platform["e" /* setPlatformAPI */])({ createCanvas: creator }); } /** * The parameters and usage: see `geoSourceManager.registerMap`. * Compatible with previous `echarts.registerMap`. */ function echarts_registerMap(mapName, geoJson, specialAreas) { var registerMap = getImpl('registerMap'); registerMap && registerMap(mapName, geoJson, specialAreas); } function echarts_getMap(mapName) { var getMap = getImpl('getMap'); return getMap && getMap(mapName); } var registerTransform = registerExternalTransform; /** * Globa dispatchAction to a specified chart instance. */ // export function dispatchAction(payload: { chartId: string } & Payload, opt?: Parameters[1]) { // if (!payload || !payload.chartId) { // // Must have chartId to find chart // return; // } // const chart = instances[payload.chartId]; // if (chart) { // chart.dispatchAction(payload, opt); // } // } // Builtin global visual registerVisual(PRIORITY_VISUAL_GLOBAL, seriesStyleTask); registerVisual(PRIORITY_VISUAL_CHART_DATA_CUSTOM, dataStyleTask); registerVisual(PRIORITY_VISUAL_CHART_DATA_CUSTOM, dataColorPaletteTask); registerVisual(PRIORITY_VISUAL_GLOBAL, seriesSymbolTask); registerVisual(PRIORITY_VISUAL_CHART_DATA_CUSTOM, dataSymbolTask); registerVisual(PRIORITY_VISUAL_DECAL, decalVisual); registerPreprocessor(globalBackwardCompat); registerProcessor(PRIORITY_PROCESSOR_DATASTACK, dataStack); registerLoading('default', defaultLoading); // Default actions registerAction({ type: HIGHLIGHT_ACTION_TYPE, event: HIGHLIGHT_ACTION_TYPE, update: HIGHLIGHT_ACTION_TYPE }, core_util["noop"]); registerAction({ type: DOWNPLAY_ACTION_TYPE, event: DOWNPLAY_ACTION_TYPE, update: DOWNPLAY_ACTION_TYPE }, core_util["noop"]); registerAction({ type: SELECT_ACTION_TYPE, event: SELECT_ACTION_TYPE, update: SELECT_ACTION_TYPE }, core_util["noop"]); registerAction({ type: UNSELECT_ACTION_TYPE, event: UNSELECT_ACTION_TYPE, update: UNSELECT_ACTION_TYPE }, core_util["noop"]); registerAction({ type: TOGGLE_SELECT_ACTION_TYPE, event: TOGGLE_SELECT_ACTION_TYPE, update: TOGGLE_SELECT_ACTION_TYPE }, core_util["noop"]); // Default theme registerTheme('light', light); registerTheme('dark', dark); // For backward compatibility, where the namespace `dataTool` will // be mounted on `echarts` is the extension `dataTool` is imported. var dataTool = {}; // CONCATENATED MODULE: ./node_modules/echarts/lib/extension.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 extensions = []; var extensionRegisters = { registerPreprocessor: registerPreprocessor, registerProcessor: registerProcessor, registerPostInit: registerPostInit, registerPostUpdate: registerPostUpdate, registerUpdateLifecycle: registerUpdateLifecycle, registerAction: registerAction, registerCoordinateSystem: registerCoordinateSystem, registerLayout: registerLayout, registerVisual: registerVisual, registerTransform: registerTransform, registerLoading: registerLoading, registerMap: echarts_registerMap, registerImpl: registerImpl, PRIORITY: PRIORITY, ComponentModel: Component, ComponentView: view_Component, SeriesModel: Series, ChartView: Chart, // TODO Use ComponentModel and SeriesModel instead of Constructor registerComponentModel: function (ComponentModelClass) { Component.registerClass(ComponentModelClass); }, registerComponentView: function (ComponentViewClass) { view_Component.registerClass(ComponentViewClass); }, registerSeriesModel: function (SeriesModelClass) { Series.registerClass(SeriesModelClass); }, registerChartView: function (ChartViewClass) { Chart.registerClass(ChartViewClass); }, registerSubTypeDefaulter: function (componentType, defaulter) { Component.registerSubTypeDefaulter(componentType, defaulter); }, registerPainter: function (painterType, PainterCtor) { registerPainter(painterType, PainterCtor); } }; function use(ext) { if (Object(core_util["isArray"])(ext)) { // use([ChartLine, ChartBar]); Object(core_util["each"])(ext, function (singleExt) { use(singleExt); }); return; } if (Object(core_util["indexOf"])(extensions, ext) >= 0) { return; } extensions.push(ext); if (Object(core_util["isFunction"])(ext)) { ext = { install: ext }; } ext.install(extensionRegisters); } // CONCATENATED MODULE: ./node_modules/echarts/lib/data/DataDiffer.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 dataIndexMapValueLength(valNumOrArrLengthMoreThan2) { return valNumOrArrLengthMoreThan2 == null ? 0 : valNumOrArrLengthMoreThan2.length || 1; } function defaultKeyGetter(item) { return item; } var DataDiffer = /** @class */function () { /** * @param context Can be visited by this.context in callback. */ function DataDiffer(oldArr, newArr, oldKeyGetter, newKeyGetter, context, // By default: 'oneToOne'. diffMode) { this._old = oldArr; this._new = newArr; this._oldKeyGetter = oldKeyGetter || defaultKeyGetter; this._newKeyGetter = newKeyGetter || defaultKeyGetter; // Visible in callback via `this.context`; this.context = context; this._diffModeMultiple = diffMode === 'multiple'; } /** * Callback function when add a data */ DataDiffer.prototype.add = function (func) { this._add = func; return this; }; /** * Callback function when update a data */ DataDiffer.prototype.update = function (func) { this._update = func; return this; }; /** * Callback function when update a data and only work in `cbMode: 'byKey'`. */ DataDiffer.prototype.updateManyToOne = function (func) { this._updateManyToOne = func; return this; }; /** * Callback function when update a data and only work in `cbMode: 'byKey'`. */ DataDiffer.prototype.updateOneToMany = function (func) { this._updateOneToMany = func; return this; }; /** * Callback function when update a data and only work in `cbMode: 'byKey'`. */ DataDiffer.prototype.updateManyToMany = function (func) { this._updateManyToMany = func; return this; }; /** * Callback function when remove a data */ DataDiffer.prototype.remove = function (func) { this._remove = func; return this; }; DataDiffer.prototype.execute = function () { this[this._diffModeMultiple ? '_executeMultiple' : '_executeOneToOne'](); }; DataDiffer.prototype._executeOneToOne = function () { var oldArr = this._old; var newArr = this._new; var newDataIndexMap = {}; var oldDataKeyArr = new Array(oldArr.length); var newDataKeyArr = new Array(newArr.length); this._initIndexMap(oldArr, null, oldDataKeyArr, '_oldKeyGetter'); this._initIndexMap(newArr, newDataIndexMap, newDataKeyArr, '_newKeyGetter'); for (var i = 0; i < oldArr.length; i++) { var oldKey = oldDataKeyArr[i]; var newIdxMapVal = newDataIndexMap[oldKey]; var newIdxMapValLen = dataIndexMapValueLength(newIdxMapVal); // idx can never be empty array here. see 'set null' logic below. if (newIdxMapValLen > 1) { // Consider there is duplicate key (for example, use dataItem.name as key). // We should make sure every item in newArr and oldArr can be visited. var newIdx = newIdxMapVal.shift(); if (newIdxMapVal.length === 1) { newDataIndexMap[oldKey] = newIdxMapVal[0]; } this._update && this._update(newIdx, i); } else if (newIdxMapValLen === 1) { newDataIndexMap[oldKey] = null; this._update && this._update(newIdxMapVal, i); } else { this._remove && this._remove(i); } } this._performRestAdd(newDataKeyArr, newDataIndexMap); }; /** * For example, consider the case: * oldData: [o0, o1, o2, o3, o4, o5, o6, o7], * newData: [n0, n1, n2, n3, n4, n5, n6, n7, n8], * Where: * o0, o1, n0 has key 'a' (many to one) * o5, n4, n5, n6 has key 'b' (one to many) * o2, n1 has key 'c' (one to one) * n2, n3 has key 'd' (add) * o3, o4 has key 'e' (remove) * o6, o7, n7, n8 has key 'f' (many to many, treated as add and remove) * Then: * (The order of the following directives are not ensured.) * this._updateManyToOne(n0, [o0, o1]); * this._updateOneToMany([n4, n5, n6], o5); * this._update(n1, o2); * this._remove(o3); * this._remove(o4); * this._remove(o6); * this._remove(o7); * this._add(n2); * this._add(n3); * this._add(n7); * this._add(n8); */ DataDiffer.prototype._executeMultiple = function () { var oldArr = this._old; var newArr = this._new; var oldDataIndexMap = {}; var newDataIndexMap = {}; var oldDataKeyArr = []; var newDataKeyArr = []; this._initIndexMap(oldArr, oldDataIndexMap, oldDataKeyArr, '_oldKeyGetter'); this._initIndexMap(newArr, newDataIndexMap, newDataKeyArr, '_newKeyGetter'); for (var i = 0; i < oldDataKeyArr.length; i++) { var oldKey = oldDataKeyArr[i]; var oldIdxMapVal = oldDataIndexMap[oldKey]; var newIdxMapVal = newDataIndexMap[oldKey]; var oldIdxMapValLen = dataIndexMapValueLength(oldIdxMapVal); var newIdxMapValLen = dataIndexMapValueLength(newIdxMapVal); if (oldIdxMapValLen > 1 && newIdxMapValLen === 1) { this._updateManyToOne && this._updateManyToOne(newIdxMapVal, oldIdxMapVal); newDataIndexMap[oldKey] = null; } else if (oldIdxMapValLen === 1 && newIdxMapValLen > 1) { this._updateOneToMany && this._updateOneToMany(newIdxMapVal, oldIdxMapVal); newDataIndexMap[oldKey] = null; } else if (oldIdxMapValLen === 1 && newIdxMapValLen === 1) { this._update && this._update(newIdxMapVal, oldIdxMapVal); newDataIndexMap[oldKey] = null; } else if (oldIdxMapValLen > 1 && newIdxMapValLen > 1) { this._updateManyToMany && this._updateManyToMany(newIdxMapVal, oldIdxMapVal); newDataIndexMap[oldKey] = null; } else if (oldIdxMapValLen > 1) { for (var i_1 = 0; i_1 < oldIdxMapValLen; i_1++) { this._remove && this._remove(oldIdxMapVal[i_1]); } } else { this._remove && this._remove(oldIdxMapVal); } } this._performRestAdd(newDataKeyArr, newDataIndexMap); }; DataDiffer.prototype._performRestAdd = function (newDataKeyArr, newDataIndexMap) { for (var i = 0; i < newDataKeyArr.length; i++) { var newKey = newDataKeyArr[i]; var newIdxMapVal = newDataIndexMap[newKey]; var idxMapValLen = dataIndexMapValueLength(newIdxMapVal); if (idxMapValLen > 1) { for (var j = 0; j < idxMapValLen; j++) { this._add && this._add(newIdxMapVal[j]); } } else if (idxMapValLen === 1) { this._add && this._add(newIdxMapVal); } // Support both `newDataKeyArr` are duplication removed or not removed. newDataIndexMap[newKey] = null; } }; DataDiffer.prototype._initIndexMap = function (arr, // Can be null. map, // In 'byKey', the output `keyArr` is duplication removed. // In 'byIndex', the output `keyArr` is not duplication removed and // its indices are accurately corresponding to `arr`. keyArr, keyGetterName) { var cbModeMultiple = this._diffModeMultiple; for (var i = 0; i < arr.length; i++) { // Add prefix to avoid conflict with Object.prototype. var key = '_ec_' + this[keyGetterName](arr[i], i); if (!cbModeMultiple) { keyArr[i] = key; } if (!map) { continue; } var idxMapVal = map[key]; var idxMapValLen = dataIndexMapValueLength(idxMapVal); if (idxMapValLen === 0) { // Simple optimize: in most cases, one index has one key, // do not need array. map[key] = i; if (cbModeMultiple) { keyArr.push(key); } } else if (idxMapValLen === 1) { map[key] = [idxMapVal, i]; } else { idxMapVal.push(i); } } }; return DataDiffer; }(); /* harmony default export */ var data_DataDiffer = (DataDiffer); // CONCATENATED MODULE: ./node_modules/echarts/lib/data/helper/dimensionHelper.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 DimensionUserOuput = /** @class */function () { function DimensionUserOuput(encode, dimRequest) { this._encode = encode; this._schema = dimRequest; } DimensionUserOuput.prototype.get = function () { return { // Do not generate full dimension name until fist used. fullDimensions: this._getFullDimensionNames(), encode: this._encode }; }; /** * Get all data store dimension names. * Theoretically a series data store is defined both by series and used dataset (if any). * If some dimensions are omitted for performance reason in `this.dimensions`, * the dimension name may not be auto-generated if user does not specify a dimension name. * In this case, the dimension name is `null`/`undefined`. */ DimensionUserOuput.prototype._getFullDimensionNames = function () { if (!this._cachedDimNames) { this._cachedDimNames = this._schema ? this._schema.makeOutputDimensionNames() : []; } return this._cachedDimNames; }; return DimensionUserOuput; }(); ; function summarizeDimensions(data, schema) { var summary = {}; var encode = summary.encode = {}; var notExtraCoordDimMap = Object(core_util["createHashMap"])(); var defaultedLabel = []; var defaultedTooltip = []; var userOutputEncode = {}; Object(core_util["each"])(data.dimensions, function (dimName) { var dimItem = data.getDimensionInfo(dimName); var coordDim = dimItem.coordDim; if (coordDim) { if (false) { assert(VISUAL_DIMENSIONS.get(coordDim) == null); } 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(userOutputEncode, coordDim)[coordDimIndex] = data.getDimensionIndex(dimItem.name); } if (dimItem.defaultTooltip) { defaultedTooltip.push(dimName); } } types_VISUAL_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]; 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.dataDimIndicesOnCoord = Object(core_util["map"])(dataDimsOnCoord, function (dimName) { return data.getDimensionInfo(dimName).storeDimIndex; }); summary.encodeFirstDimNotExtra = encodeFirstDimNotExtra; var encodeLabel = encode.label; // FIXME `encode.label` is not recommended, because formatter cannot be set // in this way. Use label.formatter instead. Maybe 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; summary.userOutput = new DimensionUserOuput(userOutputEncode, schema); return summary; } function getOrCreateEncodeArr(encode, dim) { if (!encode.hasOwnProperty(dim)) { encode[dim] = []; } return encode[dim]; } // FIXME:TS should be type `AxisType` 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 // let dimensions = data.dimensions.slice(); // let valueType; // let valueDim; // while (dimensions.length && ( // valueDim = dimensions.pop(), // valueType = data.getDimensionInfo(valueDim).type, // valueType === 'ordinal' || valueType === 'time' // )) {} // jshint ignore:line // return valueDim; // } // CONCATENATED MODULE: ./node_modules/echarts/lib/data/SeriesDimensionDefine.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 SeriesDimensionDefine_SeriesDimensionDefine = /** @class */function () { /** * @param opt All of the fields will be shallow copied. */ function SeriesDimensionDefine(opt) { /** * The format of `otherDims` is: * ```js * { * tooltip?: number * label?: number * itemName?: number * seriesName?: number * } * ``` * * A `series.encode` can specified these fields: * ```js * encode: { * // "3, 1, 5" is the index of data dimension. * tooltip: [3, 1, 5], * label: [0, 3], * ... * } * ``` * `otherDims` is the parse result of the `series.encode` above, like: * ```js * // Suppose the index of this data dimension is `3`. * this.otherDims = { * // `3` is at the index `0` of the `encode.tooltip` * tooltip: 0, * // `3` is at the index `1` of the `encode.label` * label: 1 * }; * ``` * * This prop should never be `null`/`undefined` after initialized. */ this.otherDims = {}; if (opt != null) { core_util["extend"](this, opt); } } return SeriesDimensionDefine; }(); ; /* harmony default export */ var data_SeriesDimensionDefine = (SeriesDimensionDefine_SeriesDimensionDefine); // CONCATENATED MODULE: ./node_modules/echarts/lib/data/helper/SeriesDataSchema.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 SeriesDataSchema_inner = makeInner(); var dimTypeShort = { float: 'f', int: 'i', ordinal: 'o', number: 'n', time: 't' }; /** * Represents the dimension requirement of a series. * * NOTICE: * When there are too many dimensions in dataset and many series, only the used dimensions * (i.e., used by coord sys and declared in `series.encode`) are add to `dimensionDefineList`. * But users may query data by other unused dimension names. * In this case, users can only query data if and only if they have defined dimension names * via ec option, so we provide `getDimensionIndexFromSource`, which only query them from * `source` dimensions. */ var SeriesDataSchema_SeriesDataSchema = /** @class */function () { function SeriesDataSchema(opt) { this.dimensions = opt.dimensions; this._dimOmitted = opt.dimensionOmitted; this.source = opt.source; this._fullDimCount = opt.fullDimensionCount; this._updateDimOmitted(opt.dimensionOmitted); } SeriesDataSchema.prototype.isDimensionOmitted = function () { return this._dimOmitted; }; SeriesDataSchema.prototype._updateDimOmitted = function (dimensionOmitted) { this._dimOmitted = dimensionOmitted; if (!dimensionOmitted) { return; } if (!this._dimNameMap) { this._dimNameMap = ensureSourceDimNameMap(this.source); } }; /** * @caution Can only be used when `dimensionOmitted: true`. * * Get index by user defined dimension name (i.e., not internal generate name). * That is, get index from `dimensionsDefine`. * If no `dimensionsDefine`, or no name get, return -1. */ SeriesDataSchema.prototype.getSourceDimensionIndex = function (dimName) { return Object(core_util["retrieve2"])(this._dimNameMap.get(dimName), -1); }; /** * @caution Can only be used when `dimensionOmitted: true`. * * Notice: may return `null`/`undefined` if user not specify dimension names. */ SeriesDataSchema.prototype.getSourceDimension = function (dimIndex) { var dimensionsDefine = this.source.dimensionsDefine; if (dimensionsDefine) { return dimensionsDefine[dimIndex]; } }; SeriesDataSchema.prototype.makeStoreSchema = function () { var dimCount = this._fullDimCount; var willRetrieveDataByName = shouldRetrieveDataByName(this.source); var makeHashStrict = !shouldOmitUnusedDimensions(dimCount); // If source don't have dimensions or series don't omit unsed dimensions. // Generate from seriesDimList directly var dimHash = ''; var dims = []; for (var fullDimIdx = 0, seriesDimIdx = 0; fullDimIdx < dimCount; fullDimIdx++) { var property = void 0; var type = void 0; var ordinalMeta = void 0; var seriesDimDef = this.dimensions[seriesDimIdx]; // The list has been sorted by `storeDimIndex` asc. if (seriesDimDef && seriesDimDef.storeDimIndex === fullDimIdx) { property = willRetrieveDataByName ? seriesDimDef.name : null; type = seriesDimDef.type; ordinalMeta = seriesDimDef.ordinalMeta; seriesDimIdx++; } else { var sourceDimDef = this.getSourceDimension(fullDimIdx); if (sourceDimDef) { property = willRetrieveDataByName ? sourceDimDef.name : null; type = sourceDimDef.type; } } dims.push({ property: property, type: type, ordinalMeta: ordinalMeta }); // If retrieving data by index, // use to determine whether data can be shared. // (Because in this case there might be no dimension name defined in dataset, but indices always exists). // (Indices are always 0, 1, 2, ..., so we can ignore them to shorten the hash). // Otherwise if retrieving data by property name (like `data: [{aa: 123, bb: 765}, ...]`), // use in hash. if (willRetrieveDataByName && property != null // For data stack, we have make sure each series has its own dim on this store. // So we do not add property to hash to make sure they can share this store. && (!seriesDimDef || !seriesDimDef.isCalculationCoord)) { dimHash += makeHashStrict // Use escape character '`' in case that property name contains '$'. ? property.replace(/\`/g, '`1').replace(/\$/g, '`2') // For better performance, when there are large dimensions, tolerant this defects that hardly meet. : property; } dimHash += '$'; dimHash += dimTypeShort[type] || 'f'; if (ordinalMeta) { dimHash += ordinalMeta.uid; } dimHash += '$'; } // Source from endpoint(usually series) will be read differently // when seriesLayoutBy or startIndex(which is affected by sourceHeader) are different. // So we use this three props as key. var source = this.source; var hash = [source.seriesLayoutBy, source.startIndex, dimHash].join('$$'); return { dimensions: dims, hash: hash }; }; SeriesDataSchema.prototype.makeOutputDimensionNames = function () { var result = []; for (var fullDimIdx = 0, seriesDimIdx = 0; fullDimIdx < this._fullDimCount; fullDimIdx++) { var name_1 = void 0; var seriesDimDef = this.dimensions[seriesDimIdx]; // The list has been sorted by `storeDimIndex` asc. if (seriesDimDef && seriesDimDef.storeDimIndex === fullDimIdx) { if (!seriesDimDef.isCalculationCoord) { name_1 = seriesDimDef.name; } seriesDimIdx++; } else { var sourceDimDef = this.getSourceDimension(fullDimIdx); if (sourceDimDef) { name_1 = sourceDimDef.name; } } result.push(name_1); } return result; }; SeriesDataSchema.prototype.appendCalculationDimension = function (dimDef) { this.dimensions.push(dimDef); dimDef.isCalculationCoord = true; this._fullDimCount++; // If append dimension on a data store, consider the store // might be shared by different series, series dimensions not // really map to store dimensions. this._updateDimOmitted(true); }; return SeriesDataSchema; }(); function isSeriesDataSchema(schema) { return schema instanceof SeriesDataSchema_SeriesDataSchema; } function createDimNameMap(dimsDef) { var dataDimNameMap = Object(core_util["createHashMap"])(); for (var i = 0; i < (dimsDef || []).length; i++) { var dimDefItemRaw = dimsDef[i]; var userDimName = Object(core_util["isObject"])(dimDefItemRaw) ? dimDefItemRaw.name : dimDefItemRaw; if (userDimName != null && dataDimNameMap.get(userDimName) == null) { dataDimNameMap.set(userDimName, i); } } return dataDimNameMap; } function ensureSourceDimNameMap(source) { var innerSource = SeriesDataSchema_inner(source); return innerSource.dimNameMap || (innerSource.dimNameMap = createDimNameMap(source.dimensionsDefine)); } function shouldOmitUnusedDimensions(dimCount) { return dimCount > 30; } // CONCATENATED MODULE: ./node_modules/echarts/lib/data/SeriesData.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 Int32Array */ var SeriesData_isObject = core_util["isObject"]; var SeriesData_map = core_util["map"]; var SeriesData_CtorInt32Array = typeof Int32Array === 'undefined' ? Array : Int32Array; // Use prefix to avoid index to be the same as otherIdList[idx], // which will cause weird update animation. var ID_PREFIX = 'e\0\0'; var INDEX_NOT_FOUND = -1; // type SeriesDimensionIndex = DimensionIndex; var TRANSFERABLE_PROPERTIES = ['hasItemOption', '_nameList', '_idList', '_invertedIndicesMap', '_dimSummary', 'userOutput', '_rawData', '_dimValueGetter', '_nameDimIdx', '_idDimIdx', '_nameRepeatCount']; var CLONE_PROPERTIES = ['_approximateExtent']; // ----------------------------- // Internal method declarations: // ----------------------------- var prepareInvertedIndex; var getId; var getIdNameFromStore; var normalizeDimensions; var transferProperties; var cloneListForMapAndSample; var makeIdFromName; var SeriesData_SeriesData = /** @class */function () { /** * @param dimensionsInput.dimensions * For example, ['someDimName', {name: 'someDimName', type: 'someDimType'}, ...]. * Dimensions should be concrete names like x, y, z, lng, lat, angle, radius */ function SeriesData(dimensionsInput, hostModel) { this.type = 'list'; this._dimOmitted = false; this._nameList = []; this._idList = []; // Models of data option is stored sparse for optimizing memory cost // Never used yet (not used yet). // private _optionModels: Model[] = []; // Global visual properties after visual coding this._visual = {}; // Global layout properties. this._layout = {}; // Item visual properties after visual coding this._itemVisuals = []; // Item layout properties after layout this._itemLayouts = []; // Graphic elements this._graphicEls = []; // key: dim, value: extent this._approximateExtent = {}; this._calculationInfo = {}; // Having detected that there is data item is non primitive type // (in type `OptionDataItemObject`). // Like `data: [ { value: xx, itemStyle: {...} }, ...]` // At present it only happen in `SOURCE_FORMAT_ORIGINAL`. this.hasItemOption = false; // Methods that create a new list based on this list should be listed here. // Notice that those method should `RETURN` the new list. this.TRANSFERABLE_METHODS = ['cloneShallow', 'downSample', 'minmaxDownSample', 'lttbDownSample', 'map']; // Methods that change indices of this list should be listed here. this.CHANGABLE_METHODS = ['filterSelf', 'selectRange']; this.DOWNSAMPLE_METHODS = ['downSample', 'minmaxDownSample', 'lttbDownSample']; var dimensions; var assignStoreDimIdx = false; if (isSeriesDataSchema(dimensionsInput)) { dimensions = dimensionsInput.dimensions; this._dimOmitted = dimensionsInput.isDimensionOmitted(); this._schema = dimensionsInput; } else { assignStoreDimIdx = true; dimensions = dimensionsInput; } dimensions = dimensions || ['x', 'y']; var dimensionInfos = {}; var dimensionNames = []; var invertedIndicesMap = {}; var needsHasOwn = false; var emptyObj = {}; for (var i = 0; i < dimensions.length; i++) { // Use the original dimensions[i], where other flag props may exists. var dimInfoInput = dimensions[i]; var dimensionInfo = core_util["isString"](dimInfoInput) ? new data_SeriesDimensionDefine({ name: dimInfoInput }) : !(dimInfoInput instanceof data_SeriesDimensionDefine) ? new data_SeriesDimensionDefine(dimInfoInput) : dimInfoInput; var dimensionName = dimensionInfo.name; dimensionInfo.type = dimensionInfo.type || 'float'; if (!dimensionInfo.coordDim) { dimensionInfo.coordDim = dimensionName; dimensionInfo.coordDimIndex = 0; } var otherDims = dimensionInfo.otherDims = dimensionInfo.otherDims || {}; dimensionNames.push(dimensionName); dimensionInfos[dimensionName] = dimensionInfo; if (emptyObj[dimensionName] != null) { needsHasOwn = true; } if (dimensionInfo.createInvertedIndices) { invertedIndicesMap[dimensionName] = []; } if (otherDims.itemName === 0) { this._nameDimIdx = i; } if (otherDims.itemId === 0) { this._idDimIdx = i; } if (false) { zrUtil.assert(assignStoreDimIdx || dimensionInfo.storeDimIndex >= 0); } if (assignStoreDimIdx) { dimensionInfo.storeDimIndex = i; } } this.dimensions = dimensionNames; this._dimInfos = dimensionInfos; this._initGetDimensionInfo(needsHasOwn); this.hostModel = hostModel; this._invertedIndicesMap = invertedIndicesMap; if (this._dimOmitted) { var dimIdxToName_1 = this._dimIdxToName = core_util["createHashMap"](); core_util["each"](dimensionNames, function (dimName) { dimIdxToName_1.set(dimensionInfos[dimName].storeDimIndex, dimName); }); } } /** * * Get concrete dimension name by dimension name or dimension index. * If input a dimension name, do not validate whether the dimension name exits. * * @caution * @param dim Must make sure the dimension is `SeriesDimensionLoose`. * Because only those dimensions will have auto-generated dimension names if not * have a user-specified name, and other dimensions will get a return of null/undefined. * * @notice Because of this reason, should better use `getDimensionIndex` instead, for examples: * ```js * const val = data.getStore().get(data.getDimensionIndex(dim), dataIdx); * ``` * * @return Concrete dim name. */ SeriesData.prototype.getDimension = function (dim) { var dimIdx = this._recognizeDimIndex(dim); if (dimIdx == null) { return dim; } dimIdx = dim; if (!this._dimOmitted) { return this.dimensions[dimIdx]; } // Retrieve from series dimension definition because it probably contains // generated dimension name (like 'x', 'y'). var dimName = this._dimIdxToName.get(dimIdx); if (dimName != null) { return dimName; } var sourceDimDef = this._schema.getSourceDimension(dimIdx); if (sourceDimDef) { return sourceDimDef.name; } }; /** * Get dimension index in data store. Return -1 if not found. * Can be used to index value from getRawValue. */ SeriesData.prototype.getDimensionIndex = function (dim) { var dimIdx = this._recognizeDimIndex(dim); if (dimIdx != null) { return dimIdx; } if (dim == null) { return -1; } var dimInfo = this._getDimInfo(dim); return dimInfo ? dimInfo.storeDimIndex : this._dimOmitted ? this._schema.getSourceDimensionIndex(dim) : -1; }; /** * The meanings of the input parameter `dim`: * * + If dim is a number (e.g., `1`), it means the index of the dimension. * For example, `getDimension(0)` will return 'x' or 'lng' or 'radius'. * + If dim is a number-like string (e.g., `"1"`): * + If there is the same concrete dim name defined in `series.dimensions` or `dataset.dimensions`, * it means that concrete name. * + If not, it will be converted to a number, which means the index of the dimension. * (why? because of the backward compatibility. We have been tolerating number-like string in * dimension setting, although now it seems that it is not a good idea.) * For example, `visualMap[i].dimension: "1"` is the same meaning as `visualMap[i].dimension: 1`, * if no dimension name is defined as `"1"`. * + If dim is a not-number-like string, it means the concrete dim name. * For example, it can be be default name `"x"`, `"y"`, `"z"`, `"lng"`, `"lat"`, `"angle"`, `"radius"`, * or customized in `dimensions` property of option like `"age"`. * * @return recognized `DimensionIndex`. Otherwise return null/undefined (means that dim is `DimensionName`). */ SeriesData.prototype._recognizeDimIndex = function (dim) { if (core_util["isNumber"](dim) // If being a number-like string but not being defined as a dimension name. || dim != null && !isNaN(dim) && !this._getDimInfo(dim) && (!this._dimOmitted || this._schema.getSourceDimensionIndex(dim) < 0)) { return +dim; } }; SeriesData.prototype._getStoreDimIndex = function (dim) { var dimIdx = this.getDimensionIndex(dim); if (false) { if (dimIdx == null) { throw new Error('Unknown dimension ' + dim); } } return dimIdx; }; /** * Get type and calculation info of particular dimension * @param dim * Dimension can be concrete names like x, y, z, lng, lat, angle, radius * Or a ordinal number. For example getDimensionInfo(0) will return 'x' or 'lng' or 'radius' */ SeriesData.prototype.getDimensionInfo = function (dim) { // Do not clone, because there may be categories in dimInfo. return this._getDimInfo(this.getDimension(dim)); }; SeriesData.prototype._initGetDimensionInfo = function (needsHasOwn) { var dimensionInfos = this._dimInfos; this._getDimInfo = needsHasOwn ? function (dimName) { return dimensionInfos.hasOwnProperty(dimName) ? dimensionInfos[dimName] : undefined; } : function (dimName) { return dimensionInfos[dimName]; }; }; /** * concrete dimension name list on coord. */ SeriesData.prototype.getDimensionsOnCoord = function () { return this._dimSummary.dataDimsOnCoord.slice(); }; SeriesData.prototype.mapDimension = function (coordDim, idx) { var dimensionsSummary = this._dimSummary; if (idx == null) { return dimensionsSummary.encodeFirstDimNotExtra[coordDim]; } var dims = dimensionsSummary.encode[coordDim]; return dims ? dims[idx] : null; }; SeriesData.prototype.mapDimensionsAll = function (coordDim) { var dimensionsSummary = this._dimSummary; var dims = dimensionsSummary.encode[coordDim]; return (dims || []).slice(); }; SeriesData.prototype.getStore = function () { return this._store; }; /** * Initialize from data * @param data source or data or data store. * @param nameList The name of a datum is used on data diff and * default label/tooltip. * A name can be specified in encode.itemName, * or dataItem.name (only for series option data), * or provided in nameList from outside. */ SeriesData.prototype.initData = function (data, nameList, dimValueGetter) { var _this = this; var store; if (data instanceof data_DataStore) { store = data; } if (!store) { var dimensions = this.dimensions; var provider = isSourceInstance(data) || core_util["isArrayLike"](data) ? new dataProvider_DefaultDataProvider(data, dimensions.length) : data; store = new data_DataStore(); var dimensionInfos = SeriesData_map(dimensions, function (dimName) { return { type: _this._dimInfos[dimName].type, property: dimName }; }); store.initData(provider, dimensionInfos, dimValueGetter); } this._store = store; // Reset this._nameList = (nameList || []).slice(); this._idList = []; this._nameRepeatCount = {}; this._doInit(0, store.count()); // Cache summary info for fast visit. See "dimensionHelper". // Needs to be initialized after store is prepared. this._dimSummary = summarizeDimensions(this, this._schema); this.userOutput = this._dimSummary.userOutput; }; /** * Caution: Can be only called on raw data (before `this._indices` created). */ SeriesData.prototype.appendData = function (data) { var range = this._store.appendData(data); this._doInit(range[0], range[1]); }; /** * Caution: Can be only called on raw data (before `this._indices` created). * This method does not modify `rawData` (`dataProvider`), but only * add values to store. * * The final count will be increased by `Math.max(values.length, names.length)`. * * @param values That is the SourceType: 'arrayRows', like * [ * [12, 33, 44], * [NaN, 43, 1], * ['-', 'asdf', 0] * ] * Each item is exactly corresponding to a dimension. */ SeriesData.prototype.appendValues = function (values, names) { var _a = this._store.appendValues(values, names && names.length), start = _a.start, end = _a.end; var shouldMakeIdFromName = this._shouldMakeIdFromName(); this._updateOrdinalMeta(); if (names) { for (var idx = start; idx < end; idx++) { var sourceIdx = idx - start; this._nameList[idx] = names[sourceIdx]; if (shouldMakeIdFromName) { makeIdFromName(this, idx); } } } }; SeriesData.prototype._updateOrdinalMeta = function () { var store = this._store; var dimensions = this.dimensions; for (var i = 0; i < dimensions.length; i++) { var dimInfo = this._dimInfos[dimensions[i]]; if (dimInfo.ordinalMeta) { store.collectOrdinalMeta(dimInfo.storeDimIndex, dimInfo.ordinalMeta); } } }; SeriesData.prototype._shouldMakeIdFromName = function () { var provider = this._store.getProvider(); return this._idDimIdx == null && provider.getSource().sourceFormat !== SOURCE_FORMAT_TYPED_ARRAY && !provider.fillStorage; }; SeriesData.prototype._doInit = function (start, end) { if (start >= end) { return; } var store = this._store; var provider = store.getProvider(); this._updateOrdinalMeta(); var nameList = this._nameList; var idList = this._idList; var sourceFormat = provider.getSource().sourceFormat; var isFormatOriginal = sourceFormat === SOURCE_FORMAT_ORIGINAL; // Each data item is value // [1, 2] // 2 // Bar chart, line chart which uses category axis // only gives the 'y' value. 'x' value is the indices of category // Use a tempValue to normalize the value to be a (x, y) value // If dataItem is {name: ...} or {id: ...}, it has highest priority. // This kind of ids and names are always stored `_nameList` and `_idList`. if (isFormatOriginal && !provider.pure) { var sharedDataItem = []; for (var idx = start; idx < end; idx++) { // NOTICE: Try not to write things into dataItem var dataItem = provider.getItem(idx, sharedDataItem); if (!this.hasItemOption && isDataItemOption(dataItem)) { this.hasItemOption = true; } if (dataItem) { var itemName = dataItem.name; if (nameList[idx] == null && itemName != null) { nameList[idx] = convertOptionIdName(itemName, null); } var itemId = dataItem.id; if (idList[idx] == null && itemId != null) { idList[idx] = convertOptionIdName(itemId, null); } } } } if (this._shouldMakeIdFromName()) { for (var idx = start; idx < end; idx++) { makeIdFromName(this, idx); } } prepareInvertedIndex(this); }; /** * PENDING: In fact currently this function is only used to short-circuit * the calling of `scale.unionExtentFromData` when data have been filtered by modules * like "dataZoom". `scale.unionExtentFromData` is used to calculate data extent for series on * an axis, but if a "axis related data filter module" is used, the extent of the axis have * been fixed and no need to calling `scale.unionExtentFromData` actually. * But if we add "custom data filter" in future, which is not "axis related", this method may * be still needed. * * Optimize for the scenario that data is filtered by a given extent. * Consider that if data amount is more than hundreds of thousand, * extent calculation will cost more than 10ms and the cache will * be erased because of the filtering. */ SeriesData.prototype.getApproximateExtent = function (dim) { return this._approximateExtent[dim] || this._store.getDataExtent(this._getStoreDimIndex(dim)); }; /** * Calculate extent on a filtered data might be time consuming. * Approximate extent is only used for: calculate extent of filtered data outside. */ SeriesData.prototype.setApproximateExtent = function (extent, dim) { dim = this.getDimension(dim); this._approximateExtent[dim] = extent.slice(); }; SeriesData.prototype.getCalculationInfo = function (key) { return this._calculationInfo[key]; }; SeriesData.prototype.setCalculationInfo = function (key, value) { SeriesData_isObject(key) ? core_util["extend"](this._calculationInfo, key) : this._calculationInfo[key] = value; }; /** * @return Never be null/undefined. `number` will be converted to string. Because: * In most cases, name is used in display, where returning a string is more convenient. * In other cases, name is used in query (see `indexOfName`), where we can keep the * rule that name `2` equals to name `'2'`. */ SeriesData.prototype.getName = function (idx) { var rawIndex = this.getRawIndex(idx); var name = this._nameList[rawIndex]; if (name == null && this._nameDimIdx != null) { name = getIdNameFromStore(this, this._nameDimIdx, rawIndex); } if (name == null) { name = ''; } return name; }; SeriesData.prototype._getCategory = function (dimIdx, idx) { var ordinal = this._store.get(dimIdx, idx); var ordinalMeta = this._store.getOrdinalMeta(dimIdx); if (ordinalMeta) { return ordinalMeta.categories[ordinal]; } return ordinal; }; /** * @return Never null/undefined. `number` will be converted to string. Because: * In all cases having encountered at present, id is used in making diff comparison, which * are usually based on hash map. We can keep the rule that the internal id are always string * (treat `2` is the same as `'2'`) to make the related logic simple. */ SeriesData.prototype.getId = function (idx) { return getId(this, this.getRawIndex(idx)); }; SeriesData.prototype.count = function () { return this._store.count(); }; /** * Get value. Return NaN if idx is out of range. * * @notice Should better to use `data.getStore().get(dimIndex, dataIdx)` instead. */ SeriesData.prototype.get = function (dim, idx) { var store = this._store; var dimInfo = this._dimInfos[dim]; if (dimInfo) { return store.get(dimInfo.storeDimIndex, idx); } }; /** * @notice Should better to use `data.getStore().getByRawIndex(dimIndex, dataIdx)` instead. */ SeriesData.prototype.getByRawIndex = function (dim, rawIdx) { var store = this._store; var dimInfo = this._dimInfos[dim]; if (dimInfo) { return store.getByRawIndex(dimInfo.storeDimIndex, rawIdx); } }; SeriesData.prototype.getIndices = function () { return this._store.getIndices(); }; SeriesData.prototype.getDataExtent = function (dim) { return this._store.getDataExtent(this._getStoreDimIndex(dim)); }; SeriesData.prototype.getSum = function (dim) { return this._store.getSum(this._getStoreDimIndex(dim)); }; SeriesData.prototype.getMedian = function (dim) { return this._store.getMedian(this._getStoreDimIndex(dim)); }; SeriesData.prototype.getValues = function (dimensions, idx) { var _this = this; var store = this._store; return core_util["isArray"](dimensions) ? store.getValues(SeriesData_map(dimensions, function (dim) { return _this._getStoreDimIndex(dim); }), idx) : store.getValues(dimensions); }; /** * If value is NaN. Including '-' * Only check the coord dimensions. */ SeriesData.prototype.hasValue = function (idx) { var dataDimIndicesOnCoord = this._dimSummary.dataDimIndicesOnCoord; for (var i = 0, len = dataDimIndicesOnCoord.length; i < len; i++) { // Ordinal type originally can be string or number. // But when an ordinal type is used on coord, it can // not be string but only number. So we can also use isNaN. if (isNaN(this._store.get(dataDimIndicesOnCoord[i], idx))) { return false; } } return true; }; /** * Retrieve the index with given name */ SeriesData.prototype.indexOfName = function (name) { for (var i = 0, len = this._store.count(); i < len; i++) { if (this.getName(i) === name) { return i; } } return -1; }; SeriesData.prototype.getRawIndex = function (idx) { return this._store.getRawIndex(idx); }; SeriesData.prototype.indexOfRawIndex = function (rawIndex) { return this._store.indexOfRawIndex(rawIndex); }; /** * Only support the dimension which inverted index created. * Do not support other cases until required. * @param dim concrete dim * @param value ordinal index * @return rawIndex */ SeriesData.prototype.rawIndexOf = function (dim, value) { var invertedIndices = dim && this._invertedIndicesMap[dim]; if (false) { if (!invertedIndices) { throw new Error('Do not supported yet'); } } var rawIndex = invertedIndices && invertedIndices[value]; if (rawIndex == null || isNaN(rawIndex)) { return INDEX_NOT_FOUND; } return rawIndex; }; /** * Retrieve the index of nearest value * @param dim * @param value * @param [maxDistance=Infinity] * @return If and only if multiple indices has * the same value, they are put to the result. */ SeriesData.prototype.indicesOfNearest = function (dim, value, maxDistance) { return this._store.indicesOfNearest(this._getStoreDimIndex(dim), value, maxDistance); }; SeriesData.prototype.each = function (dims, cb, ctx) { 'use strict'; if (core_util["isFunction"](dims)) { ctx = cb; cb = dims; dims = []; } // ctxCompat just for compat echarts3 var fCtx = ctx || this; var dimIndices = SeriesData_map(normalizeDimensions(dims), this._getStoreDimIndex, this); this._store.each(dimIndices, fCtx ? core_util["bind"](cb, fCtx) : cb); }; SeriesData.prototype.filterSelf = function (dims, cb, ctx) { 'use strict'; if (core_util["isFunction"](dims)) { ctx = cb; cb = dims; dims = []; } // ctxCompat just for compat echarts3 var fCtx = ctx || this; var dimIndices = SeriesData_map(normalizeDimensions(dims), this._getStoreDimIndex, this); this._store = this._store.filter(dimIndices, fCtx ? core_util["bind"](cb, fCtx) : cb); return this; }; /** * Select data in range. (For optimization of filter) * (Manually inline code, support 5 million data filtering in data zoom.) */ SeriesData.prototype.selectRange = function (range) { 'use strict'; var _this = this; var innerRange = {}; var dims = core_util["keys"](range); var dimIndices = []; core_util["each"](dims, function (dim) { var dimIdx = _this._getStoreDimIndex(dim); innerRange[dimIdx] = range[dim]; dimIndices.push(dimIdx); }); this._store = this._store.selectRange(innerRange); return this; }; /* eslint-enable max-len */ SeriesData.prototype.mapArray = function (dims, cb, ctx) { 'use strict'; if (core_util["isFunction"](dims)) { ctx = cb; cb = dims; dims = []; } // ctxCompat just for compat echarts3 ctx = ctx || this; var result = []; this.each(dims, function () { result.push(cb && cb.apply(this, arguments)); }, ctx); return result; }; SeriesData.prototype.map = function (dims, cb, ctx, ctxCompat) { 'use strict'; // ctxCompat just for compat echarts3 var fCtx = ctx || ctxCompat || this; var dimIndices = SeriesData_map(normalizeDimensions(dims), this._getStoreDimIndex, this); var list = cloneListForMapAndSample(this); list._store = this._store.map(dimIndices, fCtx ? core_util["bind"](cb, fCtx) : cb); return list; }; SeriesData.prototype.modify = function (dims, cb, ctx, ctxCompat) { var _this = this; // ctxCompat just for compat echarts3 var fCtx = ctx || ctxCompat || this; if (false) { zrUtil.each(normalizeDimensions(dims), function (dim) { var dimInfo = _this.getDimensionInfo(dim); if (!dimInfo.isCalculationCoord) { console.error('Danger: only stack dimension can be modified'); } }); } var dimIndices = SeriesData_map(normalizeDimensions(dims), this._getStoreDimIndex, this); // If do shallow clone here, if there are too many stacked series, // it still cost lots of memory, because `_store.dimensions` are not shared. // We should consider there probably be shallow clone happen in each series // in consequent filter/map. this._store.modify(dimIndices, fCtx ? core_util["bind"](cb, fCtx) : cb); }; /** * Large data down sampling on given dimension * @param sampleIndex Sample index for name and id */ SeriesData.prototype.downSample = function (dimension, rate, sampleValue, sampleIndex) { var list = cloneListForMapAndSample(this); list._store = this._store.downSample(this._getStoreDimIndex(dimension), rate, sampleValue, sampleIndex); return list; }; /** * Large data down sampling using min-max * @param {string} valueDimension * @param {number} rate */ SeriesData.prototype.minmaxDownSample = function (valueDimension, rate) { var list = cloneListForMapAndSample(this); list._store = this._store.minmaxDownSample(this._getStoreDimIndex(valueDimension), rate); return list; }; /** * Large data down sampling using largest-triangle-three-buckets * @param {string} valueDimension * @param {number} targetCount */ SeriesData.prototype.lttbDownSample = function (valueDimension, rate) { var list = cloneListForMapAndSample(this); list._store = this._store.lttbDownSample(this._getStoreDimIndex(valueDimension), rate); return list; }; SeriesData.prototype.getRawDataItem = function (idx) { return this._store.getRawDataItem(idx); }; /** * Get model of one data item. */ // TODO: Type of data item SeriesData.prototype.getItemModel = function (idx) { var hostModel = this.hostModel; var dataItem = this.getRawDataItem(idx); return new model_Model(dataItem, hostModel, hostModel && hostModel.ecModel); }; /** * Create a data differ */ SeriesData.prototype.diff = function (otherList) { var thisList = this; return new data_DataDiffer(otherList ? otherList.getStore().getIndices() : [], this.getStore().getIndices(), function (idx) { return getId(otherList, idx); }, function (idx) { return getId(thisList, idx); }); }; /** * Get visual property. */ SeriesData.prototype.getVisual = function (key) { var visual = this._visual; return visual && visual[key]; }; SeriesData.prototype.setVisual = function (kvObj, val) { this._visual = this._visual || {}; if (SeriesData_isObject(kvObj)) { core_util["extend"](this._visual, kvObj); } else { this._visual[kvObj] = val; } }; /** * Get visual property of single data item */ // eslint-disable-next-line SeriesData.prototype.getItemVisual = function (idx, key) { var itemVisual = this._itemVisuals[idx]; var val = itemVisual && itemVisual[key]; if (val == null) { // Use global visual property return this.getVisual(key); } return val; }; /** * If exists visual property of single data item */ SeriesData.prototype.hasItemVisual = function () { return this._itemVisuals.length > 0; }; /** * Make sure itemVisual property is unique */ // TODO: use key to save visual to reduce memory. SeriesData.prototype.ensureUniqueItemVisual = function (idx, key) { var itemVisuals = this._itemVisuals; var itemVisual = itemVisuals[idx]; if (!itemVisual) { itemVisual = itemVisuals[idx] = {}; } var val = itemVisual[key]; if (val == null) { val = this.getVisual(key); // TODO Performance? if (core_util["isArray"](val)) { val = val.slice(); } else if (SeriesData_isObject(val)) { val = core_util["extend"]({}, val); } itemVisual[key] = val; } return val; }; // eslint-disable-next-line SeriesData.prototype.setItemVisual = function (idx, key, value) { var itemVisual = this._itemVisuals[idx] || {}; this._itemVisuals[idx] = itemVisual; if (SeriesData_isObject(key)) { core_util["extend"](itemVisual, key); } else { itemVisual[key] = value; } }; /** * Clear itemVisuals and list visual. */ SeriesData.prototype.clearAllVisual = function () { this._visual = {}; this._itemVisuals = []; }; SeriesData.prototype.setLayout = function (key, val) { SeriesData_isObject(key) ? core_util["extend"](this._layout, key) : this._layout[key] = val; }; /** * Get layout property. */ SeriesData.prototype.getLayout = function (key) { return this._layout[key]; }; /** * Get layout of single data item */ SeriesData.prototype.getItemLayout = function (idx) { return this._itemLayouts[idx]; }; /** * Set layout of single data item */ SeriesData.prototype.setItemLayout = function (idx, layout, merge) { this._itemLayouts[idx] = merge ? core_util["extend"](this._itemLayouts[idx] || {}, layout) : layout; }; /** * Clear all layout of single data item */ SeriesData.prototype.clearItemLayouts = function () { this._itemLayouts.length = 0; }; /** * Set graphic element relative to data. It can be set as null */ SeriesData.prototype.setItemGraphicEl = function (idx, el) { var seriesIndex = this.hostModel && this.hostModel.seriesIndex; setCommonECData(seriesIndex, this.dataType, idx, el); this._graphicEls[idx] = el; }; SeriesData.prototype.getItemGraphicEl = function (idx) { return this._graphicEls[idx]; }; SeriesData.prototype.eachItemGraphicEl = function (cb, context) { core_util["each"](this._graphicEls, function (el, idx) { if (el) { cb && cb.call(context, el, idx); } }); }; /** * Shallow clone a new list except visual and layout properties, and graph elements. * New list only change the indices. */ SeriesData.prototype.cloneShallow = function (list) { if (!list) { list = new SeriesData(this._schema ? this._schema : SeriesData_map(this.dimensions, this._getDimInfo, this), this.hostModel); } transferProperties(list, this); list._store = this._store; return list; }; /** * Wrap some method to add more feature */ SeriesData.prototype.wrapMethod = function (methodName, injectFunction) { var originalMethod = this[methodName]; if (!core_util["isFunction"](originalMethod)) { return; } this.__wrappedMethods = this.__wrappedMethods || []; this.__wrappedMethods.push(methodName); this[methodName] = function () { var res = originalMethod.apply(this, arguments); return injectFunction.apply(this, [res].concat(core_util["slice"](arguments))); }; }; // ---------------------------------------------------------- // A work around for internal method visiting private member. // ---------------------------------------------------------- SeriesData.internalField = function () { prepareInvertedIndex = function (data) { var invertedIndicesMap = data._invertedIndicesMap; core_util["each"](invertedIndicesMap, function (invertedIndices, dim) { var dimInfo = data._dimInfos[dim]; // Currently, only dimensions that has ordinalMeta can create inverted indices. var ordinalMeta = dimInfo.ordinalMeta; var store = data._store; if (ordinalMeta) { invertedIndices = invertedIndicesMap[dim] = new SeriesData_CtorInt32Array(ordinalMeta.categories.length); // The default value of TypedArray is 0. To avoid miss // mapping to 0, we should set it as INDEX_NOT_FOUND. for (var i = 0; i < invertedIndices.length; i++) { invertedIndices[i] = INDEX_NOT_FOUND; } for (var i = 0; i < store.count(); i++) { // Only support the case that all values are distinct. invertedIndices[store.get(dimInfo.storeDimIndex, i)] = i; } } }); }; getIdNameFromStore = function (data, dimIdx, idx) { return convertOptionIdName(data._getCategory(dimIdx, idx), null); }; /** * @see the comment of `List['getId']`. */ getId = function (data, rawIndex) { var id = data._idList[rawIndex]; if (id == null && data._idDimIdx != null) { id = getIdNameFromStore(data, data._idDimIdx, rawIndex); } if (id == null) { id = ID_PREFIX + rawIndex; } return id; }; normalizeDimensions = function (dimensions) { if (!core_util["isArray"](dimensions)) { dimensions = dimensions != null ? [dimensions] : []; } return dimensions; }; /** * Data in excludeDimensions is copied, otherwise transferred. */ cloneListForMapAndSample = function (original) { var list = new SeriesData(original._schema ? original._schema : SeriesData_map(original.dimensions, original._getDimInfo, original), original.hostModel); // FIXME If needs stackedOn, value may already been stacked transferProperties(list, original); return list; }; transferProperties = function (target, source) { core_util["each"](TRANSFERABLE_PROPERTIES.concat(source.__wrappedMethods || []), function (propName) { if (source.hasOwnProperty(propName)) { target[propName] = source[propName]; } }); target.__wrappedMethods = source.__wrappedMethods; core_util["each"](CLONE_PROPERTIES, function (propName) { target[propName] = core_util["clone"](source[propName]); }); target._calculationInfo = core_util["extend"]({}, source._calculationInfo); }; makeIdFromName = function (data, idx) { var nameList = data._nameList; var idList = data._idList; var nameDimIdx = data._nameDimIdx; var idDimIdx = data._idDimIdx; var name = nameList[idx]; var id = idList[idx]; if (name == null && nameDimIdx != null) { nameList[idx] = name = getIdNameFromStore(data, nameDimIdx, idx); } if (id == null && idDimIdx != null) { idList[idx] = id = getIdNameFromStore(data, idDimIdx, idx); } if (id == null && name != null) { var nameRepeatCount = data._nameRepeatCount; var nmCnt = nameRepeatCount[name] = (nameRepeatCount[name] || 0) + 1; id = name; if (nmCnt > 1) { id += '__ec__' + nmCnt; } idList[idx] = id; } }; }(); return SeriesData; }(); /* harmony default export */ var data_SeriesData = (SeriesData_SeriesData); // CONCATENATED MODULE: ./node_modules/echarts/lib/data/helper/createDimensions.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ /** * For outside usage compat (like echarts-gl are using it). */ function createDimensions(source, opt) { return prepareSeriesDataSchema(source, opt).dimensions; } /** * This method builds the relationship between: * + "what the coord sys or series requires (see `coordDimensions`)", * + "what the user defines (in `encode` and `dimensions`, see `opt.dimensionsDefine` and `opt.encodeDefine`)" * + "what the data source provids (see `source`)". * * Some guess strategy will be adapted if user does not define something. * If no 'value' dimension specified, the first no-named dimension will be * named as 'value'. * * @return The results are always sorted by `storeDimIndex` asc. */ function prepareSeriesDataSchema( // TODO: TYPE completeDimensions type source, opt) { if (!isSourceInstance(source)) { source = createSourceFromSeriesDataOption(source); } opt = opt || {}; var sysDims = opt.coordDimensions || []; var dimsDef = opt.dimensionsDefine || source.dimensionsDefine || []; var coordDimNameMap = Object(core_util["createHashMap"])(); var resultList = []; var dimCount = getDimCount(source, sysDims, dimsDef, opt.dimensionsCount); // Try to ignore unused dimensions if sharing a high dimension datastore // 30 is an experience value. var omitUnusedDimensions = opt.canOmitUnusedDimensions && shouldOmitUnusedDimensions(dimCount); var isUsingSourceDimensionsDef = dimsDef === source.dimensionsDefine; var dataDimNameMap = isUsingSourceDimensionsDef ? ensureSourceDimNameMap(source) : createDimNameMap(dimsDef); var encodeDef = opt.encodeDefine; if (!encodeDef && opt.encodeDefaulter) { encodeDef = opt.encodeDefaulter(source, dimCount); } var encodeDefMap = Object(core_util["createHashMap"])(encodeDef); var indicesMap = new CtorInt32Array(dimCount); for (var i = 0; i < indicesMap.length; i++) { indicesMap[i] = -1; } function getResultItem(dimIdx) { var idx = indicesMap[dimIdx]; if (idx < 0) { var dimDefItemRaw = dimsDef[dimIdx]; var dimDefItem = Object(core_util["isObject"])(dimDefItemRaw) ? dimDefItemRaw : { name: dimDefItemRaw }; var resultItem = new data_SeriesDimensionDefine(); var userDimName = dimDefItem.name; if (userDimName != null && dataDimNameMap.get(userDimName) != null) { // Only if `series.dimensions` is defined in option // displayName, will be set, and dimension will be displayed vertically in // tooltip by default. resultItem.name = resultItem.displayName = userDimName; } dimDefItem.type != null && (resultItem.type = dimDefItem.type); dimDefItem.displayName != null && (resultItem.displayName = dimDefItem.displayName); var newIdx = resultList.length; indicesMap[dimIdx] = newIdx; resultItem.storeDimIndex = dimIdx; resultList.push(resultItem); return resultItem; } return resultList[idx]; } if (!omitUnusedDimensions) { for (var i = 0; i < dimCount; i++) { getResultItem(i); } } // Set `coordDim` and `coordDimIndex` by `encodeDefMap` and normalize `encodeDefMap`. encodeDefMap.each(function (dataDimsRaw, coordDim) { var dataDims = normalizeToArray(dataDimsRaw).slice(); // Note: It is allowed that `dataDims.length` is `0`, e.g., options is // `{encode: {x: -1, y: 1}}`. Should not filter anything in // this case. if (dataDims.length === 1 && !Object(core_util["isString"])(dataDims[0]) && dataDims[0] < 0) { encodeDefMap.set(coordDim, false); return; } var validDataDims = encodeDefMap.set(coordDim, []); Object(core_util["each"])(dataDims, function (resultDimIdxOrName, idx) { // The input resultDimIdx can be dim name or index. var resultDimIdx = Object(core_util["isString"])(resultDimIdxOrName) ? dataDimNameMap.get(resultDimIdxOrName) : resultDimIdxOrName; if (resultDimIdx != null && resultDimIdx < dimCount) { validDataDims[idx] = resultDimIdx; applyDim(getResultItem(resultDimIdx), coordDim, idx); } }); }); // Apply templates and default order from `sysDims`. var availDimIdx = 0; Object(core_util["each"])(sysDims, function (sysDimItemRaw) { var coordDim; var sysDimItemDimsDef; var sysDimItemOtherDims; var sysDimItem; if (Object(core_util["isString"])(sysDimItemRaw)) { coordDim = sysDimItemRaw; sysDimItem = {}; } else { sysDimItem = sysDimItemRaw; coordDim = sysDimItem.name; var ordinalMeta = sysDimItem.ordinalMeta; sysDimItem.ordinalMeta = null; sysDimItem = Object(core_util["extend"])({}, sysDimItem); sysDimItem.ordinalMeta = ordinalMeta; // `coordDimIndex` should not be set directly. sysDimItemDimsDef = sysDimItem.dimsDef; sysDimItemOtherDims = sysDimItem.otherDims; sysDimItem.name = sysDimItem.coordDim = sysDimItem.coordDimIndex = sysDimItem.dimsDef = sysDimItem.otherDims = null; } var dataDims = encodeDefMap.get(coordDim); // negative resultDimIdx means no need to mapping. if (dataDims === false) { return; } dataDims = normalizeToArray(dataDims); // dimensions provides default dim sequences. if (!dataDims.length) { for (var i = 0; i < (sysDimItemDimsDef && sysDimItemDimsDef.length || 1); i++) { while (availDimIdx < dimCount && getResultItem(availDimIdx).coordDim != null) { availDimIdx++; } availDimIdx < dimCount && dataDims.push(availDimIdx++); } } // Apply templates. Object(core_util["each"])(dataDims, function (resultDimIdx, coordDimIndex) { var resultItem = getResultItem(resultDimIdx); // Coordinate system has a higher priority on dim type than source. if (isUsingSourceDimensionsDef && sysDimItem.type != null) { resultItem.type = sysDimItem.type; } applyDim(Object(core_util["defaults"])(resultItem, sysDimItem), coordDim, coordDimIndex); if (resultItem.name == null && sysDimItemDimsDef) { var sysDimItemDimsDefItem = sysDimItemDimsDef[coordDimIndex]; !Object(core_util["isObject"])(sysDimItemDimsDefItem) && (sysDimItemDimsDefItem = { name: sysDimItemDimsDefItem }); resultItem.name = resultItem.displayName = sysDimItemDimsDefItem.name; resultItem.defaultTooltip = sysDimItemDimsDefItem.defaultTooltip; } // FIXME refactor, currently only used in case: {otherDims: {tooltip: false}} sysDimItemOtherDims && Object(core_util["defaults"])(resultItem.otherDims, sysDimItemOtherDims); }); }); function applyDim(resultItem, coordDim, coordDimIndex) { if (types_VISUAL_DIMENSIONS.get(coordDim) != null) { resultItem.otherDims[coordDim] = coordDimIndex; } else { resultItem.coordDim = coordDim; resultItem.coordDimIndex = coordDimIndex; coordDimNameMap.set(coordDim, true); } } // Make sure the first extra dim is 'value'. var generateCoord = opt.generateCoord; var generateCoordCount = opt.generateCoordCount; var fromZero = generateCoordCount != null; generateCoordCount = generateCoord ? generateCoordCount || 1 : 0; var extra = generateCoord || 'value'; function ifNoNameFillWithCoordName(resultItem) { if (resultItem.name == null) { // Duplication will be removed in the next step. resultItem.name = resultItem.coordDim; } } // Set dim `name` and other `coordDim` and other props. if (!omitUnusedDimensions) { for (var resultDimIdx = 0; resultDimIdx < dimCount; resultDimIdx++) { var resultItem = getResultItem(resultDimIdx); var coordDim = resultItem.coordDim; if (coordDim == null) { // TODO no need to generate coordDim for isExtraCoord? resultItem.coordDim = genCoordDimName(extra, coordDimNameMap, fromZero); resultItem.coordDimIndex = 0; // Series specified generateCoord is using out. if (!generateCoord || generateCoordCount <= 0) { resultItem.isExtraCoord = true; } generateCoordCount--; } ifNoNameFillWithCoordName(resultItem); if (resultItem.type == null && (guessOrdinal(source, resultDimIdx) === BE_ORDINAL.Must // Consider the case: // { // dataset: {source: [ // ['2001', 123], // ['2002', 456], // ... // ['The others', 987], // ]}, // series: {type: 'pie'} // } // The first column should better be treated as a "ordinal" although it // might not be detected as an "ordinal" by `guessOrdinal`. || resultItem.isExtraCoord && (resultItem.otherDims.itemName != null || resultItem.otherDims.seriesName != null))) { resultItem.type = 'ordinal'; } } } else { Object(core_util["each"])(resultList, function (resultItem) { // PENDING: guessOrdinal or let user specify type: 'ordinal' manually? ifNoNameFillWithCoordName(resultItem); }); // Sort dimensions: there are some rule that use the last dim as label, // and for some latter travel process easier. resultList.sort(function (item0, item1) { return item0.storeDimIndex - item1.storeDimIndex; }); } removeDuplication(resultList); return new SeriesDataSchema_SeriesDataSchema({ source: source, dimensions: resultList, fullDimensionCount: dimCount, dimensionOmitted: omitUnusedDimensions }); } function removeDuplication(result) { var duplicationMap = Object(core_util["createHashMap"])(); for (var i = 0; i < result.length; i++) { var dim = result[i]; var dimOriginalName = dim.name; var count = duplicationMap.get(dimOriginalName) || 0; if (count > 0) { // Starts from 0. dim.name = dimOriginalName + (count - 1); } count++; duplicationMap.set(dimOriginalName, count); } } // ??? TODO // Originally detect dimCount by data[0]. Should we // optimize it to only by sysDims and dimensions and encode. // So only necessary dims will be initialized. // But // (1) custom series should be considered. where other dims // may be visited. // (2) sometimes user need to calculate bubble size or use visualMap // on other dimensions besides coordSys needed. // So, dims that is not used by system, should be shared in data store? function getDimCount(source, sysDims, dimsDef, optDimCount) { // Note that the result dimCount should not small than columns count // of data, otherwise `dataDimNameMap` checking will be incorrect. var dimCount = Math.max(source.dimensionsDetectedCount || 1, sysDims.length, dimsDef.length, optDimCount || 0); Object(core_util["each"])(sysDims, function (sysDimItem) { var sysDimItemDimsDef; if (Object(core_util["isObject"])(sysDimItem) && (sysDimItemDimsDef = sysDimItem.dimsDef)) { dimCount = Math.max(dimCount, sysDimItemDimsDef.length); } }); return dimCount; } function genCoordDimName(name, map, fromZero) { if (fromZero || map.hasKey(name)) { var i = 0; while (map.hasKey(name + i)) { i++; } name += i; } map.set(name, true); return name; } // CONCATENATED MODULE: ./node_modules/echarts/lib/model/referHelper.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ /** * Helper for model references. * There are many manners to refer axis/coordSys. */ // TODO // merge relevant logic to this file? // check: "modelHelper" of tooltip and "BrushTargetManager". /** * @class * For example: * { * coordSysName: 'cartesian2d', * coordSysDims: ['x', 'y', ...], * axisMap: HashMap({ * x: xAxisModel, * y: yAxisModel * }), * categoryAxisMap: HashMap({ * x: xAxisModel, * y: undefined * }), * // The index of the first category axis in `coordSysDims`. * // `null/undefined` means no category axis exists. * firstCategoryDimIndex: 1, * // To replace user specified encode. * } */ var referHelper_CoordSysInfo = /** @class */function () { function CoordSysInfo(coordSysName) { this.coordSysDims = []; this.axisMap = Object(core_util["createHashMap"])(); this.categoryAxisMap = Object(core_util["createHashMap"])(); this.coordSysName = coordSysName; } return CoordSysInfo; }(); function getCoordSysInfoBySeries(seriesModel) { var coordSysName = seriesModel.get('coordinateSystem'); var result = new referHelper_CoordSysInfo(coordSysName); var fetch = fetchers[coordSysName]; if (fetch) { fetch(seriesModel, result, result.axisMap, result.categoryAxisMap); return result; } } var fetchers = { cartesian2d: function (seriesModel, result, axisMap, categoryAxisMap) { var xAxisModel = seriesModel.getReferringComponents('xAxis', SINGLE_REFERRING).models[0]; var yAxisModel = seriesModel.getReferringComponents('yAxis', SINGLE_REFERRING).models[0]; if (false) { if (!xAxisModel) { throw new Error('xAxis "' + retrieve(seriesModel.get('xAxisIndex'), seriesModel.get('xAxisId'), 0) + '" not found'); } if (!yAxisModel) { throw new Error('yAxis "' + retrieve(seriesModel.get('xAxisIndex'), seriesModel.get('yAxisId'), 0) + '" not found'); } } result.coordSysDims = ['x', 'y']; axisMap.set('x', xAxisModel); axisMap.set('y', yAxisModel); if (referHelper_isCategory(xAxisModel)) { categoryAxisMap.set('x', xAxisModel); result.firstCategoryDimIndex = 0; } if (referHelper_isCategory(yAxisModel)) { categoryAxisMap.set('y', yAxisModel); result.firstCategoryDimIndex == null && (result.firstCategoryDimIndex = 1); } }, singleAxis: function (seriesModel, result, axisMap, categoryAxisMap) { var singleAxisModel = seriesModel.getReferringComponents('singleAxis', SINGLE_REFERRING).models[0]; if (false) { if (!singleAxisModel) { throw new Error('singleAxis should be specified.'); } } result.coordSysDims = ['single']; axisMap.set('single', singleAxisModel); if (referHelper_isCategory(singleAxisModel)) { categoryAxisMap.set('single', singleAxisModel); result.firstCategoryDimIndex = 0; } }, polar: function (seriesModel, result, axisMap, categoryAxisMap) { var polarModel = seriesModel.getReferringComponents('polar', SINGLE_REFERRING).models[0]; var radiusAxisModel = polarModel.findAxisModel('radiusAxis'); var angleAxisModel = polarModel.findAxisModel('angleAxis'); if (false) { if (!angleAxisModel) { throw new Error('angleAxis option not found'); } if (!radiusAxisModel) { throw new Error('radiusAxis option not found'); } } result.coordSysDims = ['radius', 'angle']; axisMap.set('radius', radiusAxisModel); axisMap.set('angle', angleAxisModel); if (referHelper_isCategory(radiusAxisModel)) { categoryAxisMap.set('radius', radiusAxisModel); result.firstCategoryDimIndex = 0; } if (referHelper_isCategory(angleAxisModel)) { categoryAxisMap.set('angle', angleAxisModel); result.firstCategoryDimIndex == null && (result.firstCategoryDimIndex = 1); } }, geo: function (seriesModel, result, axisMap, categoryAxisMap) { result.coordSysDims = ['lng', 'lat']; }, parallel: function (seriesModel, result, axisMap, categoryAxisMap) { var ecModel = seriesModel.ecModel; var parallelModel = ecModel.getComponent('parallel', seriesModel.get('parallelIndex')); var coordSysDims = result.coordSysDims = parallelModel.dimensions.slice(); Object(core_util["each"])(parallelModel.parallelAxisIndex, function (axisIndex, index) { var axisModel = ecModel.getComponent('parallelAxis', axisIndex); var axisDim = coordSysDims[index]; axisMap.set(axisDim, axisModel); if (referHelper_isCategory(axisModel)) { categoryAxisMap.set(axisDim, axisModel); if (result.firstCategoryDimIndex == null) { result.firstCategoryDimIndex = index; } } }); } }; function referHelper_isCategory(axisModel) { return axisModel.get('type') === 'category'; } // CONCATENATED MODULE: ./node_modules/echarts/lib/data/helper/dataStackHelper.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ /** * Note that it is too complicated to support 3d stack by value * (have to create two-dimension inverted index), so in 3d case * we just support that stacked by index. * * @param seriesModel * @param dimensionsInput The same as the input of . * The input will be modified. * @param opt * @param opt.stackedCoordDimension Specify a coord dimension if needed. * @param opt.byIndex=false * @return calculationInfo * { * stackedDimension: string * stackedByDimension: string * isStackedByIndex: boolean * stackedOverDimension: string * stackResultDimension: string * } */ function enableDataStack(seriesModel, dimensionsInput, opt) { opt = opt || {}; var byIndex = opt.byIndex; var stackedCoordDimension = opt.stackedCoordDimension; var dimensionDefineList; var schema; var store; if (isLegacyDimensionsInput(dimensionsInput)) { dimensionDefineList = dimensionsInput; } else { schema = dimensionsInput.schema; dimensionDefineList = schema.dimensions; store = dimensionsInput.store; } // Compatibal: when `stack` is set as '', do not stack. var mayStack = !!(seriesModel && seriesModel.get('stack')); var stackedByDimInfo; var stackedDimInfo; var stackResultDimension; var stackedOverDimension; Object(core_util["each"])(dimensionDefineList, function (dimensionInfo, index) { if (Object(core_util["isString"])(dimensionInfo)) { dimensionDefineList[index] = dimensionInfo = { name: dimensionInfo }; } if (mayStack && !dimensionInfo.isExtraCoord) { // Find the first ordinal dimension as the stackedByDimInfo. if (!byIndex && !stackedByDimInfo && dimensionInfo.ordinalMeta) { stackedByDimInfo = dimensionInfo; } // Find the first stackable dimension as the stackedDimInfo. if (!stackedDimInfo && dimensionInfo.type !== 'ordinal' && dimensionInfo.type !== 'time' && (!stackedCoordDimension || stackedCoordDimension === dimensionInfo.coordDim)) { stackedDimInfo = dimensionInfo; } } }); if (stackedDimInfo && !byIndex && !stackedByDimInfo) { // Compatible with previous design, value axis (time axis) only stack by index. // It may make sense if the user provides elaborately constructed data. byIndex = true; } // Add stack dimension, they can be both calculated by coordinate system in `unionExtent`. // That put stack logic in List is for using conveniently in echarts extensions, but it // might not be a good way. if (stackedDimInfo) { // Use a weird name that not duplicated with other names. // Also need to use seriesModel.id as postfix because different // series may share same data store. The stack dimension needs to be distinguished. stackResultDimension = '__\0ecstackresult_' + seriesModel.id; stackedOverDimension = '__\0ecstackedover_' + seriesModel.id; // Create inverted index to fast query index by value. if (stackedByDimInfo) { stackedByDimInfo.createInvertedIndices = true; } var stackedDimCoordDim_1 = stackedDimInfo.coordDim; var stackedDimType = stackedDimInfo.type; var stackedDimCoordIndex_1 = 0; Object(core_util["each"])(dimensionDefineList, function (dimensionInfo) { if (dimensionInfo.coordDim === stackedDimCoordDim_1) { stackedDimCoordIndex_1++; } }); var stackedOverDimensionDefine = { name: stackResultDimension, coordDim: stackedDimCoordDim_1, coordDimIndex: stackedDimCoordIndex_1, type: stackedDimType, isExtraCoord: true, isCalculationCoord: true, storeDimIndex: dimensionDefineList.length }; var stackResultDimensionDefine = { name: stackedOverDimension, // This dimension contains stack base (generally, 0), so do not set it as // `stackedDimCoordDim` to avoid extent calculation, consider log scale. coordDim: stackedOverDimension, coordDimIndex: stackedDimCoordIndex_1 + 1, type: stackedDimType, isExtraCoord: true, isCalculationCoord: true, storeDimIndex: dimensionDefineList.length + 1 }; if (schema) { if (store) { stackedOverDimensionDefine.storeDimIndex = store.ensureCalculationDimension(stackedOverDimension, stackedDimType); stackResultDimensionDefine.storeDimIndex = store.ensureCalculationDimension(stackResultDimension, stackedDimType); } schema.appendCalculationDimension(stackedOverDimensionDefine); schema.appendCalculationDimension(stackResultDimensionDefine); } else { dimensionDefineList.push(stackedOverDimensionDefine); dimensionDefineList.push(stackResultDimensionDefine); } } return { stackedDimension: stackedDimInfo && stackedDimInfo.name, stackedByDimension: stackedByDimInfo && stackedByDimInfo.name, isStackedByIndex: byIndex, stackedOverDimension: stackedOverDimension, stackResultDimension: stackResultDimension }; } function isLegacyDimensionsInput(dimensionsInput) { return !isSeriesDataSchema(dimensionsInput.schema); } function isDimensionStacked(data, stackedDim) { // Each single series only maps to one pair of axis. So we do not need to // check stackByDim, whatever stacked by a dimension or stacked by index. return !!stackedDim && stackedDim === data.getCalculationInfo('stackedDimension'); } function getStackedDimension(data, targetDim) { return isDimensionStacked(data, targetDim) ? data.getCalculationInfo('stackResultDimension') : targetDim; } // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/helper/createSeriesData.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 getCoordSysDimDefs(seriesModel, coordSysInfo) { var coordSysName = seriesModel.get('coordinateSystem'); var registeredCoordSys = core_CoordinateSystem.get(coordSysName); var coordSysDimDefs; if (coordSysInfo && coordSysInfo.coordSysDims) { coordSysDimDefs = core_util["map"](coordSysInfo.coordSysDims, function (dim) { var dimInfo = { name: dim }; var axisModel = coordSysInfo.axisMap.get(dim); if (axisModel) { var axisType = axisModel.get('type'); dimInfo.type = getDimensionTypeByAxis(axisType); } return dimInfo; }); } if (!coordSysDimDefs) { // Get dimensions from registered coordinate system coordSysDimDefs = registeredCoordSys && (registeredCoordSys.getDimensionsInfo ? registeredCoordSys.getDimensionsInfo() : registeredCoordSys.dimensions.slice()) || ['x', 'y']; } return coordSysDimDefs; } function injectOrdinalMeta(dimInfoList, createInvertedIndices, coordSysInfo) { var firstCategoryDimIndex; var hasNameEncode; coordSysInfo && core_util["each"](dimInfoList, function (dimInfo, dimIndex) { var coordDim = dimInfo.coordDim; var categoryAxisModel = coordSysInfo.categoryAxisMap.get(coordDim); if (categoryAxisModel) { if (firstCategoryDimIndex == null) { firstCategoryDimIndex = dimIndex; } dimInfo.ordinalMeta = categoryAxisModel.getOrdinalMeta(); if (createInvertedIndices) { dimInfo.createInvertedIndices = true; } } if (dimInfo.otherDims.itemName != null) { hasNameEncode = true; } }); if (!hasNameEncode && firstCategoryDimIndex != null) { dimInfoList[firstCategoryDimIndex].otherDims.itemName = 0; } return firstCategoryDimIndex; } /** * Caution: there are side effects to `sourceManager` in this method. * Should better only be called in `Series['getInitialData']`. */ function createSeriesData(sourceRaw, seriesModel, opt) { opt = opt || {}; var sourceManager = seriesModel.getSourceManager(); var source; var isOriginalSource = false; if (sourceRaw) { isOriginalSource = true; source = createSourceFromSeriesDataOption(sourceRaw); } else { source = sourceManager.getSource(); // Is series.data. not dataset. isOriginalSource = source.sourceFormat === SOURCE_FORMAT_ORIGINAL; } var coordSysInfo = getCoordSysInfoBySeries(seriesModel); var coordSysDimDefs = getCoordSysDimDefs(seriesModel, coordSysInfo); var useEncodeDefaulter = opt.useEncodeDefaulter; var encodeDefaulter = core_util["isFunction"](useEncodeDefaulter) ? useEncodeDefaulter : useEncodeDefaulter ? core_util["curry"](makeSeriesEncodeForAxisCoordSys, coordSysDimDefs, seriesModel) : null; var createDimensionOptions = { coordDimensions: coordSysDimDefs, generateCoord: opt.generateCoord, encodeDefine: seriesModel.getEncode(), encodeDefaulter: encodeDefaulter, canOmitUnusedDimensions: !isOriginalSource }; var schema = prepareSeriesDataSchema(source, createDimensionOptions); var firstCategoryDimIndex = injectOrdinalMeta(schema.dimensions, opt.createInvertedIndices, coordSysInfo); var store = !isOriginalSource ? sourceManager.getSharedDataStore(schema) : null; var stackCalculationInfo = enableDataStack(seriesModel, { schema: schema, store: store }); var data = new data_SeriesData(schema, seriesModel); data.setCalculationInfo(stackCalculationInfo); var dimValueGetter = firstCategoryDimIndex != null && isNeedCompleteOrdinalData(source) ? function (itemOpt, dimName, dataIndex, dimIndex) { // Use dataIndex as ordinal value in categoryAxis return dimIndex === firstCategoryDimIndex ? dataIndex : this.defaultDimValueGetter(itemOpt, dimName, dataIndex, dimIndex); } : null; data.hasItemOption = false; data.initData( // Try to reuse the data store in sourceManager if using dataset. isOriginalSource ? source : store, null, dimValueGetter); return data; } function isNeedCompleteOrdinalData(source) { if (source.sourceFormat === SOURCE_FORMAT_ORIGINAL) { var sampleItem = firstDataNotNull(source.data || []); return !core_util["isArray"](getDataItemValue(sampleItem)); } } function firstDataNotNull(arr) { var i = 0; while (i < arr.length && arr[i] == null) { i++; } return arr[i]; } /* harmony default export */ var helper_createSeriesData = (createSeriesData); // CONCATENATED MODULE: ./node_modules/echarts/lib/scale/Scale.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 Scale = /** @class */function () { function Scale(setting) { this._setting = setting || {}; this._extent = [Infinity, -Infinity]; } Scale.prototype.getSetting = function (name) { return this._setting[name]; }; /** * Set extent from data */ Scale.prototype.unionExtent = function (other) { var extent = this._extent; other[0] < extent[0] && (extent[0] = other[0]); other[1] > extent[1] && (extent[1] = other[1]); // not setExtent because in log axis it may transformed to power // this.setExtent(extent[0], extent[1]); }; /** * Set extent from data */ Scale.prototype.unionExtentFromData = function (data, dim) { this.unionExtent(data.getApproximateExtent(dim)); }; /** * Get extent * * Extent is always in increase order. */ Scale.prototype.getExtent = function () { return this._extent.slice(); }; /** * Set extent */ Scale.prototype.setExtent = function (start, end) { var thisExtent = this._extent; if (!isNaN(start)) { thisExtent[0] = start; } if (!isNaN(end)) { thisExtent[1] = end; } }; /** * If value is in extent range */ Scale.prototype.isInExtentRange = function (value) { return this._extent[0] <= value && this._extent[1] >= value; }; /** * When axis extent depends on data and no data exists, * axis ticks should not be drawn, which is named 'blank'. */ Scale.prototype.isBlank = function () { return this._isBlank; }; /** * When axis extent depends on data and no data exists, * axis ticks should not be drawn, which is named 'blank'. */ Scale.prototype.setBlank = function (isBlank) { this._isBlank = isBlank; }; return Scale; }(); enableClassManagement(Scale); /* harmony default export */ var scale_Scale = (Scale); // CONCATENATED MODULE: ./node_modules/echarts/lib/data/OrdinalMeta.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 uidBase = 0; var OrdinalMeta_OrdinalMeta = /** @class */function () { function OrdinalMeta(opt) { this.categories = opt.categories || []; this._needCollect = opt.needCollect; this._deduplication = opt.deduplication; this.uid = ++uidBase; } OrdinalMeta.createByAxisModel = function (axisModel) { var option = axisModel.option; var data = option.data; var categories = data && Object(core_util["map"])(data, getName); return new OrdinalMeta({ categories: categories, needCollect: !categories, // deduplication is default in axis. deduplication: option.dedplication !== false }); }; ; OrdinalMeta.prototype.getOrdinal = function (category) { // @ts-ignore return this._getOrCreateMap().get(category); }; /** * @return The ordinal. If not found, return NaN. */ OrdinalMeta.prototype.parseAndCollect = function (category) { var index; var needCollect = this._needCollect; // The value of category dim can be the index of the given category set. // This feature is only supported when !needCollect, because we should // consider a common case: a value is 2017, which is a number but is // expected to be tread as a category. This case usually happen in dataset, // where it happent to be no need of the index feature. if (!Object(core_util["isString"])(category) && !needCollect) { return category; } // Optimize for the scenario: // category is ['2012-01-01', '2012-01-02', ...], where the input // data has been ensured not duplicate and is large data. // Notice, if a dataset dimension provide categroies, usually echarts // should remove duplication except user tell echarts dont do that // (set axis.deduplication = false), because echarts do not know whether // the values in the category dimension has duplication (consider the // parallel-aqi example) if (needCollect && !this._deduplication) { index = this.categories.length; this.categories[index] = category; return index; } var map = this._getOrCreateMap(); // @ts-ignore index = map.get(category); if (index == null) { if (needCollect) { index = this.categories.length; this.categories[index] = category; // @ts-ignore map.set(category, index); } else { index = NaN; } } return index; }; // Consider big data, do not create map until needed. OrdinalMeta.prototype._getOrCreateMap = function () { return this._map || (this._map = Object(core_util["createHashMap"])(this.categories)); }; return OrdinalMeta; }(); function getName(obj) { if (Object(core_util["isObject"])(obj) && obj.value != null) { return obj.value; } else { return obj + ''; } } /* harmony default export */ var data_OrdinalMeta = (OrdinalMeta_OrdinalMeta); // CONCATENATED MODULE: ./node_modules/echarts/lib/scale/helper.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 helper_isValueNice(val) { var exp10 = Math.pow(10, quantityExponent(Math.abs(val))); var f = Math.abs(val / exp10); return f === 0 || f === 1 || f === 2 || f === 3 || f === 5; } function isIntervalOrLogScale(scale) { return scale.type === 'interval' || scale.type === 'log'; } /** * @param extent Both extent[0] and extent[1] should be valid number. * Should be extent[0] < extent[1]. * @param splitNumber splitNumber should be >= 1. */ function intervalScaleNiceTicks(extent, splitNumber, minInterval, maxInterval) { var result = {}; var span = extent[1] - extent[0]; var interval = result.interval = nice(span / splitNumber, true); if (minInterval != null && interval < minInterval) { interval = result.interval = minInterval; } if (maxInterval != null && interval > maxInterval) { interval = result.interval = maxInterval; } // Tow more digital for tick. var precision = result.intervalPrecision = getIntervalPrecision(interval); // Niced extent inside original extent var niceTickExtent = result.niceTickExtent = [round(Math.ceil(extent[0] / interval) * interval, precision), round(Math.floor(extent[1] / interval) * interval, precision)]; fixExtent(niceTickExtent, extent); return result; } function increaseInterval(interval) { var exp10 = Math.pow(10, quantityExponent(interval)); // Increase interval var f = interval / exp10; if (!f) { f = 1; } else if (f === 2) { f = 3; } else if (f === 3) { f = 5; } else { // f is 1 or 5 f *= 2; } return round(f * exp10); } /** * @return interval precision */ function getIntervalPrecision(interval) { // Tow more digital for tick. return getPrecision(interval) + 2; } function helper_clamp(niceTickExtent, idx, extent) { niceTickExtent[idx] = Math.max(Math.min(niceTickExtent[idx], extent[1]), extent[0]); } // In some cases (e.g., splitNumber is 1), niceTickExtent may be out of extent. function fixExtent(niceTickExtent, extent) { !isFinite(niceTickExtent[0]) && (niceTickExtent[0] = extent[0]); !isFinite(niceTickExtent[1]) && (niceTickExtent[1] = extent[1]); helper_clamp(niceTickExtent, 0, extent); helper_clamp(niceTickExtent, 1, extent); if (niceTickExtent[0] > niceTickExtent[1]) { niceTickExtent[0] = niceTickExtent[1]; } } function helper_contain(val, extent) { return val >= extent[0] && val <= extent[1]; } function helper_normalize(val, extent) { if (extent[1] === extent[0]) { return 0.5; } return (val - extent[0]) / (extent[1] - extent[0]); } function helper_scale(val, extent) { return val * (extent[1] - extent[0]) + extent[0]; } // CONCATENATED MODULE: ./node_modules/echarts/lib/scale/Ordinal.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ /** * Linear continuous scale * http://en.wikipedia.org/wiki/Level_of_measurement */ // FIXME only one data var Ordinal_OrdinalScale = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(OrdinalScale, _super); function OrdinalScale(setting) { var _this = _super.call(this, setting) || this; _this.type = 'ordinal'; var ordinalMeta = _this.getSetting('ordinalMeta'); // Caution: Should not use instanceof, consider ec-extensions using // import approach to get OrdinalMeta class. if (!ordinalMeta) { ordinalMeta = new data_OrdinalMeta({}); } if (Object(core_util["isArray"])(ordinalMeta)) { ordinalMeta = new data_OrdinalMeta({ categories: Object(core_util["map"])(ordinalMeta, function (item) { return Object(core_util["isObject"])(item) ? item.value : item; }) }); } _this._ordinalMeta = ordinalMeta; _this._extent = _this.getSetting('extent') || [0, ordinalMeta.categories.length - 1]; return _this; } OrdinalScale.prototype.parse = function (val) { // Caution: Math.round(null) will return `0` rather than `NaN` if (val == null) { return NaN; } return Object(core_util["isString"])(val) ? this._ordinalMeta.getOrdinal(val) // val might be float. : Math.round(val); }; OrdinalScale.prototype.contain = function (rank) { rank = this.parse(rank); return helper_contain(rank, this._extent) && this._ordinalMeta.categories[rank] != null; }; /** * Normalize given rank or name to linear [0, 1] * @param val raw ordinal number. * @return normalized value in [0, 1]. */ OrdinalScale.prototype.normalize = function (val) { val = this._getTickNumber(this.parse(val)); return helper_normalize(val, this._extent); }; /** * @param val normalized value in [0, 1]. * @return raw ordinal number. */ OrdinalScale.prototype.scale = function (val) { val = Math.round(helper_scale(val, this._extent)); return this.getRawOrdinalNumber(val); }; OrdinalScale.prototype.getTicks = function () { var ticks = []; var extent = this._extent; var rank = extent[0]; while (rank <= extent[1]) { ticks.push({ value: rank }); rank++; } return ticks; }; OrdinalScale.prototype.getMinorTicks = function (splitNumber) { // Not support. return; }; /** * @see `Ordinal['_ordinalNumbersByTick']` */ OrdinalScale.prototype.setSortInfo = function (info) { if (info == null) { this._ordinalNumbersByTick = this._ticksByOrdinalNumber = null; return; } var infoOrdinalNumbers = info.ordinalNumbers; var ordinalsByTick = this._ordinalNumbersByTick = []; var ticksByOrdinal = this._ticksByOrdinalNumber = []; // Unnecessary support negative tick in `realtimeSort`. var tickNum = 0; var allCategoryLen = this._ordinalMeta.categories.length; for (var len = Math.min(allCategoryLen, infoOrdinalNumbers.length); tickNum < len; ++tickNum) { var ordinalNumber = infoOrdinalNumbers[tickNum]; ordinalsByTick[tickNum] = ordinalNumber; ticksByOrdinal[ordinalNumber] = tickNum; } // Handle that `series.data` only covers part of the `axis.category.data`. var unusedOrdinal = 0; for (; tickNum < allCategoryLen; ++tickNum) { while (ticksByOrdinal[unusedOrdinal] != null) { unusedOrdinal++; } ; ordinalsByTick.push(unusedOrdinal); ticksByOrdinal[unusedOrdinal] = tickNum; } }; OrdinalScale.prototype._getTickNumber = function (ordinal) { var ticksByOrdinalNumber = this._ticksByOrdinalNumber; // also support ordinal out of range of `ordinalMeta.categories.length`, // where ordinal numbers are used as tick value directly. return ticksByOrdinalNumber && ordinal >= 0 && ordinal < ticksByOrdinalNumber.length ? ticksByOrdinalNumber[ordinal] : ordinal; }; /** * @usage * ```js * const ordinalNumber = ordinalScale.getRawOrdinalNumber(tickVal); * * // case0 * const rawOrdinalValue = axisModel.getCategories()[ordinalNumber]; * // case1 * const rawOrdinalValue = this._ordinalMeta.categories[ordinalNumber]; * // case2 * const coord = axis.dataToCoord(ordinalNumber); * ``` * * @param {OrdinalNumber} tickNumber index of display */ OrdinalScale.prototype.getRawOrdinalNumber = function (tickNumber) { var ordinalNumbersByTick = this._ordinalNumbersByTick; // tickNumber may be out of range, e.g., when axis max is larger than `ordinalMeta.categories.length`., // where ordinal numbers are used as tick value directly. return ordinalNumbersByTick && tickNumber >= 0 && tickNumber < ordinalNumbersByTick.length ? ordinalNumbersByTick[tickNumber] : tickNumber; }; /** * Get item on tick */ OrdinalScale.prototype.getLabel = function (tick) { if (!this.isBlank()) { var ordinalNumber = this.getRawOrdinalNumber(tick.value); var cateogry = this._ordinalMeta.categories[ordinalNumber]; // Note that if no data, ordinalMeta.categories is an empty array. // Return empty if it's not exist. return cateogry == null ? '' : cateogry + ''; } }; OrdinalScale.prototype.count = function () { return this._extent[1] - this._extent[0] + 1; }; OrdinalScale.prototype.unionExtentFromData = function (data, dim) { this.unionExtent(data.getApproximateExtent(dim)); }; /** * @override * If value is in extent range */ OrdinalScale.prototype.isInExtentRange = function (value) { value = this._getTickNumber(value); return this._extent[0] <= value && this._extent[1] >= value; }; OrdinalScale.prototype.getOrdinalMeta = function () { return this._ordinalMeta; }; OrdinalScale.prototype.calcNiceTicks = function () {}; OrdinalScale.prototype.calcNiceExtent = function () {}; OrdinalScale.type = 'ordinal'; return OrdinalScale; }(scale_Scale); scale_Scale.registerClass(Ordinal_OrdinalScale); /* harmony default export */ var Ordinal = (Ordinal_OrdinalScale); // CONCATENATED MODULE: ./node_modules/echarts/lib/scale/Interval.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 roundNumber = round; var Interval_IntervalScale = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(IntervalScale, _super); function IntervalScale() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = 'interval'; // Step is calculated in adjustExtent. _this._interval = 0; _this._intervalPrecision = 2; return _this; } IntervalScale.prototype.parse = function (val) { return val; }; IntervalScale.prototype.contain = function (val) { return helper_contain(val, this._extent); }; IntervalScale.prototype.normalize = function (val) { return helper_normalize(val, this._extent); }; IntervalScale.prototype.scale = function (val) { return helper_scale(val, this._extent); }; IntervalScale.prototype.setExtent = function (start, end) { var thisExtent = this._extent; // start,end may be a Number like '25',so... if (!isNaN(start)) { thisExtent[0] = parseFloat(start); } if (!isNaN(end)) { thisExtent[1] = parseFloat(end); } }; IntervalScale.prototype.unionExtent = function (other) { var extent = this._extent; other[0] < extent[0] && (extent[0] = other[0]); other[1] > extent[1] && (extent[1] = other[1]); // unionExtent may called by it's sub classes this.setExtent(extent[0], extent[1]); }; IntervalScale.prototype.getInterval = function () { return this._interval; }; IntervalScale.prototype.setInterval = function (interval) { this._interval = interval; // Dropped auto calculated niceExtent and use user-set extent. // We assume user wants to set both interval, min, max to get a better result. this._niceExtent = this._extent.slice(); this._intervalPrecision = getIntervalPrecision(interval); }; /** * @param expandToNicedExtent Whether expand the ticks to niced extent. */ IntervalScale.prototype.getTicks = function (expandToNicedExtent) { var interval = this._interval; var extent = this._extent; var niceTickExtent = this._niceExtent; var intervalPrecision = this._intervalPrecision; var ticks = []; // If interval is 0, return []; if (!interval) { return ticks; } // Consider this case: using dataZoom toolbox, zoom and zoom. var safeLimit = 10000; if (extent[0] < niceTickExtent[0]) { if (expandToNicedExtent) { ticks.push({ value: roundNumber(niceTickExtent[0] - interval, intervalPrecision) }); } else { ticks.push({ value: extent[0] }); } } var tick = niceTickExtent[0]; while (tick <= niceTickExtent[1]) { ticks.push({ value: tick }); // Avoid rounding error tick = roundNumber(tick + interval, intervalPrecision); if (tick === ticks[ticks.length - 1].value) { // Consider out of safe float point, e.g., // -3711126.9907707 + 2e-10 === -3711126.9907707 break; } if (ticks.length > safeLimit) { return []; } } // Consider this case: the last item of ticks is smaller // than niceTickExtent[1] and niceTickExtent[1] === extent[1]. var lastNiceTick = ticks.length ? ticks[ticks.length - 1].value : niceTickExtent[1]; if (extent[1] > lastNiceTick) { if (expandToNicedExtent) { ticks.push({ value: roundNumber(lastNiceTick + interval, intervalPrecision) }); } else { ticks.push({ value: extent[1] }); } } return ticks; }; IntervalScale.prototype.getMinorTicks = function (splitNumber) { var ticks = this.getTicks(true); var minorTicks = []; var extent = this.getExtent(); for (var i = 1; i < ticks.length; i++) { var nextTick = ticks[i]; var prevTick = ticks[i - 1]; var count = 0; var minorTicksGroup = []; var interval = nextTick.value - prevTick.value; var minorInterval = interval / splitNumber; while (count < splitNumber - 1) { var minorTick = roundNumber(prevTick.value + (count + 1) * minorInterval); // For the first and last interval. The count may be less than splitNumber. if (minorTick > extent[0] && minorTick < extent[1]) { minorTicksGroup.push(minorTick); } count++; } minorTicks.push(minorTicksGroup); } return minorTicks; }; /** * @param opt.precision If 'auto', use nice presision. * @param opt.pad returns 1.50 but not 1.5 if precision is 2. */ IntervalScale.prototype.getLabel = function (data, opt) { if (data == null) { return ''; } var precision = opt && opt.precision; if (precision == null) { precision = getPrecision(data.value) || 0; } else if (precision === 'auto') { // Should be more precise then tick. precision = this._intervalPrecision; } // (1) If `precision` is set, 12.005 should be display as '12.00500'. // (2) Use roundNumber (toFixed) to avoid scientific notation like '3.5e-7'. var dataNum = roundNumber(data.value, precision, true); return addCommas(dataNum); }; /** * @param splitNumber By default `5`. */ IntervalScale.prototype.calcNiceTicks = function (splitNumber, minInterval, maxInterval) { splitNumber = splitNumber || 5; var extent = this._extent; var span = extent[1] - extent[0]; if (!isFinite(span)) { return; } // User may set axis min 0 and data are all negative // FIXME If it needs to reverse ? if (span < 0) { span = -span; extent.reverse(); } var result = intervalScaleNiceTicks(extent, splitNumber, minInterval, maxInterval); this._intervalPrecision = result.intervalPrecision; this._interval = result.interval; this._niceExtent = result.niceTickExtent; }; IntervalScale.prototype.calcNiceExtent = function (opt) { var extent = this._extent; // If extent start and end are same, expand them if (extent[0] === extent[1]) { if (extent[0] !== 0) { // Expand extent // Note that extents can be both negative. See #13154 var expandSize = Math.abs(extent[0]); // In the fowllowing case // Axis has been fixed max 100 // Plus data are all 100 and axis extent are [100, 100]. // Extend to the both side will cause expanded max is larger than fixed max. // So only expand to the smaller side. if (!opt.fixMax) { extent[1] += expandSize / 2; extent[0] -= expandSize / 2; } else { extent[0] -= expandSize / 2; } } else { extent[1] = 1; } } var span = extent[1] - extent[0]; // If there are no data and extent are [Infinity, -Infinity] if (!isFinite(span)) { extent[0] = 0; extent[1] = 1; } this.calcNiceTicks(opt.splitNumber, opt.minInterval, opt.maxInterval); // let extent = this._extent; var interval = this._interval; if (!opt.fixMin) { extent[0] = roundNumber(Math.floor(extent[0] / interval) * interval); } if (!opt.fixMax) { extent[1] = roundNumber(Math.ceil(extent[1] / interval) * interval); } }; IntervalScale.prototype.setNiceExtent = function (min, max) { this._niceExtent = [min, max]; }; IntervalScale.type = 'interval'; return IntervalScale; }(scale_Scale); scale_Scale.registerClass(Interval_IntervalScale); /* harmony default export */ var Interval = (Interval_IntervalScale); // CONCATENATED MODULE: ./node_modules/echarts/lib/util/vendor.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 supportFloat32Array = typeof Float32Array !== 'undefined'; var Float32ArrayCtor = !supportFloat32Array ? Array : Float32Array; function createFloat32Array(arg) { if (Object(core_util["isArray"])(arg)) { // Return self directly if don't support TypedArray. return supportFloat32Array ? new Float32Array(arg) : arg; } // Else is number return new Float32ArrayCtor(arg); } // CONCATENATED MODULE: ./node_modules/echarts/lib/layout/barGrid.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 STACK_PREFIX = '__ec_stack_'; function getSeriesStackId(seriesModel) { return seriesModel.get('stack') || STACK_PREFIX + seriesModel.seriesIndex; } function getAxisKey(axis) { return axis.dim + axis.index; } /** * @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(Object(core_util["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)) { 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 = {}; Object(core_util["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 dimIdx = data.getDimensionIndex(data.mapDimension(baseAxis.dim)); var store = data.getStore(); for (var i = 0, cnt = store.count(); i < cnt; ++i) { var value = store.get(dimIdx, 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 = []; Object(core_util["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 = number_parsePercent(seriesModel.get('barWidth'), bandWidth); var barMaxWidth = number_parsePercent(seriesModel.get('barMaxWidth'), bandWidth); var barMinWidth = number_parsePercent( // barMinWidth by default is 0.5 / 1 in cartesian. Because in value axis, // the auto-calculated bar width might be less than 0.5 / 1. seriesModel.get('barMinWidth') || (isInLargeMode(seriesModel) ? 0.5 : 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 = {}; Object(core_util["each"])(seriesInfoList, function (seriesInfo, idx) { var axisKey = seriesInfo.axisKey; var bandWidth = seriesInfo.bandWidth; var columnsOnAxis = columnsMap[axisKey] || { bandWidth: bandWidth, remainedWidth: bandWidth, autoWidthCount: 0, categoryGap: null, gap: '20%', 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 = {}; Object(core_util["each"])(columnsMap, function (columnsOnAxis, coordSysName) { result[coordSysName] = {}; var stacks = columnsOnAxis.stacks; var bandWidth = columnsOnAxis.bandWidth; var categoryGapPercent = columnsOnAxis.categoryGap; if (categoryGapPercent == null) { var columnCount = Object(core_util["keys"])(stacks).length; // More columns in one group // the spaces between group is smaller. Or the column will be too thin. categoryGapPercent = Math.max(35 - columnCount * 4, 15) + '%'; } var categoryGap = number_parsePercent(categoryGapPercent, bandWidth); var barGapPercent = number_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 Object(core_util["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 whether 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. Because 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; Object(core_util["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; Object(core_util["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; } function retrieveColumnLayout(barWidthAndOffset, axis, seriesModel) { if (barWidthAndOffset && axis) { var result = barWidthAndOffset[getAxisKey(axis)]; if (result != null && seriesModel != null) { return result[getSeriesStackId(seriesModel)]; } return result; } } function barGrid_layout(seriesType, ecModel) { var seriesModels = prepareLayoutBarSeries(seriesType, ecModel); var barWidthAndOffset = makeColumnLayout(seriesModels); Object(core_util["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; data.setLayout({ bandWidth: columnLayoutInfo.bandWidth, offset: columnOffset, size: columnWidth }); }); } // TODO: Do not support stack in large mode yet. function createProgressiveLayout(seriesType) { return { seriesType: seriesType, plan: createRenderPlanner(), reset: function (seriesModel) { if (!isOnCartesian(seriesModel)) { return; } var data = seriesModel.getData(); var cartesian = seriesModel.coordinateSystem; var baseAxis = cartesian.getBaseAxis(); var valueAxis = cartesian.getOtherAxis(baseAxis); var valueDimIdx = data.getDimensionIndex(data.mapDimension(valueAxis.dim)); var baseDimIdx = data.getDimensionIndex(data.mapDimension(baseAxis.dim)); var drawBackground = seriesModel.get('showBackground', true); var valueDim = data.mapDimension(valueAxis.dim); var stackResultDim = data.getCalculationInfo('stackResultDimension'); var stacked = isDimensionStacked(data, valueDim) && !!data.getCalculationInfo('stackedOnSeries'); var isValueAxisH = valueAxis.isHorizontal(); var valueAxisStart = getValueAxisStart(baseAxis, valueAxis); var isLarge = isInLargeMode(seriesModel); var barMinHeight = seriesModel.get('barMinHeight') || 0; var stackedDimIdx = stackResultDim && data.getDimensionIndex(stackResultDim); // Layout info. var columnWidth = data.getLayout('size'); var columnOffset = data.getLayout('offset'); return { progress: function (params, data) { var count = params.count; var largePoints = isLarge && createFloat32Array(count * 3); var largeBackgroundPoints = isLarge && drawBackground && createFloat32Array(count * 3); var largeDataIndices = isLarge && createFloat32Array(count); var coordLayout = cartesian.master.getRect(); var bgSize = isValueAxisH ? coordLayout.width : coordLayout.height; var dataIndex; var store = data.getStore(); var idxOffset = 0; while ((dataIndex = params.next()) != null) { var value = store.get(stacked ? stackedDimIdx : valueDimIdx, dataIndex); var baseValue = store.get(baseDimIdx, dataIndex); var baseCoord = valueAxisStart; var stackStartValue = void 0; // Because of the barMinHeight, we can not use the value in // stackResultDimension directly. if (stacked) { stackStartValue = +value - store.get(valueDimIdx, dataIndex); } var x = void 0; var y = void 0; var width = void 0; var height = void 0; if (isValueAxisH) { var coord = cartesian.dataToPoint([value, baseValue]); if (stacked) { var startCoord = cartesian.dataToPoint([stackStartValue, baseValue]); baseCoord = startCoord[0]; } x = baseCoord; y = coord[1] + columnOffset; width = coord[0] - baseCoord; height = columnWidth; if (Math.abs(width) < barMinHeight) { width = (width < 0 ? -1 : 1) * barMinHeight; } } else { var coord = cartesian.dataToPoint([baseValue, value]); if (stacked) { var startCoord = cartesian.dataToPoint([baseValue, stackStartValue]); baseCoord = startCoord[1]; } x = coord[0] + columnOffset; y = baseCoord; width = columnWidth; height = coord[1] - baseCoord; if (Math.abs(height) < barMinHeight) { // Include zero to has a positive bar height = (height <= 0 ? -1 : 1) * barMinHeight; } } if (!isLarge) { data.setItemLayout(dataIndex, { x: x, y: y, width: width, height: height }); } else { largePoints[idxOffset] = x; largePoints[idxOffset + 1] = y; largePoints[idxOffset + 2] = isValueAxisH ? width : height; if (largeBackgroundPoints) { largeBackgroundPoints[idxOffset] = isValueAxisH ? coordLayout.x : x; largeBackgroundPoints[idxOffset + 1] = isValueAxisH ? y : coordLayout.y; largeBackgroundPoints[idxOffset + 2] = bgSize; } largeDataIndices[dataIndex] = dataIndex; } idxOffset += 3; } if (isLarge) { data.setLayout({ largePoints: largePoints, largeDataIndices: largeDataIndices, largeBackgroundPoints: largeBackgroundPoints, valueAxisHorizontal: isValueAxisH }); } } }; } }; } 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) { var startValue = valueAxis.model.get('startValue'); if (!startValue) { startValue = 0; } return valueAxis.toGlobalCoord(valueAxis.dataToCoord(valueAxis.type === 'log' ? startValue > 0 ? startValue : 1 : startValue)); } // CONCATENATED MODULE: ./node_modules/echarts/lib/scale/Time.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ /* * A third-party license is embedded for some of the code in this file: * The "scaleLevels" was originally copied from "d3.js" with some * modifications made for this project. * (See more details in the comment on the definition of "scaleLevels" below.) * The use of the source code of this file is also subject to the terms * and consitions of the license of "d3.js" (BSD-3Clause, see * ). */ // [About UTC and local time zone]: // In most cases, `number.parseDate` will treat input data string as local time // (except time zone is specified in time string). And `format.formateTime` returns // local time by default. option.useUTC is false by default. This design has // considered these common cases: // (1) Time that is persistent in server is in UTC, but it is needed to be displayed // in local time by default. // (2) By default, the input data string (e.g., '2011-01-02') should be displayed // as its original time, without any time difference. // FIXME 公用? var bisect = function (a, x, lo, hi) { while (lo < hi) { var mid = lo + hi >>> 1; if (a[mid][1] < x) { lo = mid + 1; } else { hi = mid; } } return lo; }; var Time_TimeScale = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(TimeScale, _super); function TimeScale(settings) { var _this = _super.call(this, settings) || this; _this.type = 'time'; return _this; } /** * Get label is mainly for other components like dataZoom, tooltip. */ TimeScale.prototype.getLabel = function (tick) { var useUTC = this.getSetting('useUTC'); return format(tick.value, fullLeveledFormatter[getDefaultFormatPrecisionOfInterval(getPrimaryTimeUnit(this._minLevelUnit))] || fullLeveledFormatter.second, useUTC, this.getSetting('locale')); }; TimeScale.prototype.getFormattedLabel = function (tick, idx, labelFormatter) { var isUTC = this.getSetting('useUTC'); var lang = this.getSetting('locale'); return leveledFormat(tick, idx, labelFormatter, lang, isUTC); }; /** * @override */ TimeScale.prototype.getTicks = function () { var interval = this._interval; var extent = this._extent; var ticks = []; // If interval is 0, return []; if (!interval) { return ticks; } ticks.push({ value: extent[0], level: 0 }); var useUTC = this.getSetting('useUTC'); var innerTicks = getIntervalTicks(this._minLevelUnit, this._approxInterval, useUTC, extent); ticks = ticks.concat(innerTicks); ticks.push({ value: extent[1], level: 0 }); return ticks; }; TimeScale.prototype.calcNiceExtent = function (opt) { var extent = this._extent; // If extent start and end are same, expand them if (extent[0] === extent[1]) { // Expand extent extent[0] -= ONE_DAY; extent[1] += ONE_DAY; } // If there are no data and extent are [Infinity, -Infinity] if (extent[1] === -Infinity && extent[0] === Infinity) { var d = new Date(); extent[1] = +new Date(d.getFullYear(), d.getMonth(), d.getDate()); extent[0] = extent[1] - ONE_DAY; } this.calcNiceTicks(opt.splitNumber, opt.minInterval, opt.maxInterval); }; TimeScale.prototype.calcNiceTicks = function (approxTickNum, minInterval, maxInterval) { approxTickNum = approxTickNum || 10; var extent = this._extent; var span = extent[1] - extent[0]; this._approxInterval = span / approxTickNum; if (minInterval != null && this._approxInterval < minInterval) { this._approxInterval = minInterval; } if (maxInterval != null && this._approxInterval > maxInterval) { this._approxInterval = maxInterval; } var scaleIntervalsLen = scaleIntervals.length; var idx = Math.min(bisect(scaleIntervals, this._approxInterval, 0, scaleIntervalsLen), scaleIntervalsLen - 1); // Interval that can be used to calculate ticks this._interval = scaleIntervals[idx][1]; // Min level used when picking ticks from top down. // We check one more level to avoid the ticks are to sparse in some case. this._minLevelUnit = scaleIntervals[Math.max(idx - 1, 0)][0]; }; TimeScale.prototype.parse = function (val) { // val might be float. return Object(core_util["isNumber"])(val) ? val : +parseDate(val); }; TimeScale.prototype.contain = function (val) { return helper_contain(this.parse(val), this._extent); }; TimeScale.prototype.normalize = function (val) { return helper_normalize(this.parse(val), this._extent); }; TimeScale.prototype.scale = function (val) { return helper_scale(val, this._extent); }; TimeScale.type = 'time'; return TimeScale; }(Interval); /** * This implementation was originally copied from "d3.js" * * with some modifications made for this program. * See the license statement at the head of this file. */ var scaleIntervals = [ // Format interval ['second', ONE_SECOND], ['minute', ONE_MINUTE], ['hour', ONE_HOUR], ['quarter-day', ONE_HOUR * 6], ['half-day', ONE_HOUR * 12], ['day', ONE_DAY * 1.2], ['half-week', ONE_DAY * 3.5], ['week', ONE_DAY * 7], ['month', ONE_DAY * 31], ['quarter', ONE_DAY * 95], ['half-year', ONE_YEAR / 2], ['year', ONE_YEAR] // 1Y ]; function isUnitValueSame(unit, valueA, valueB, isUTC) { var dateA = parseDate(valueA); var dateB = parseDate(valueB); var isSame = function (unit) { return getUnitValue(dateA, unit, isUTC) === getUnitValue(dateB, unit, isUTC); }; var isSameYear = function () { return isSame('year'); }; // const isSameHalfYear = () => isSameYear() && isSame('half-year'); // const isSameQuater = () => isSameYear() && isSame('quarter'); var isSameMonth = function () { return isSameYear() && isSame('month'); }; var isSameDay = function () { return isSameMonth() && isSame('day'); }; // const isSameHalfDay = () => isSameDay() && isSame('half-day'); var isSameHour = function () { return isSameDay() && isSame('hour'); }; var isSameMinute = function () { return isSameHour() && isSame('minute'); }; var isSameSecond = function () { return isSameMinute() && isSame('second'); }; var isSameMilliSecond = function () { return isSameSecond() && isSame('millisecond'); }; switch (unit) { case 'year': return isSameYear(); case 'month': return isSameMonth(); case 'day': return isSameDay(); case 'hour': return isSameHour(); case 'minute': return isSameMinute(); case 'second': return isSameSecond(); case 'millisecond': return isSameMilliSecond(); } } // const primaryUnitGetters = { // year: fullYearGetterName(), // month: monthGetterName(), // day: dateGetterName(), // hour: hoursGetterName(), // minute: minutesGetterName(), // second: secondsGetterName(), // millisecond: millisecondsGetterName() // }; // const primaryUnitUTCGetters = { // year: fullYearGetterName(true), // month: monthGetterName(true), // day: dateGetterName(true), // hour: hoursGetterName(true), // minute: minutesGetterName(true), // second: secondsGetterName(true), // millisecond: millisecondsGetterName(true) // }; // function moveTick(date: Date, unitName: TimeUnit, step: number, isUTC: boolean) { // step = step || 1; // switch (getPrimaryTimeUnit(unitName)) { // case 'year': // date[fullYearSetterName(isUTC)](date[fullYearGetterName(isUTC)]() + step); // break; // case 'month': // date[monthSetterName(isUTC)](date[monthGetterName(isUTC)]() + step); // break; // case 'day': // date[dateSetterName(isUTC)](date[dateGetterName(isUTC)]() + step); // break; // case 'hour': // date[hoursSetterName(isUTC)](date[hoursGetterName(isUTC)]() + step); // break; // case 'minute': // date[minutesSetterName(isUTC)](date[minutesGetterName(isUTC)]() + step); // break; // case 'second': // date[secondsSetterName(isUTC)](date[secondsGetterName(isUTC)]() + step); // break; // case 'millisecond': // date[millisecondsSetterName(isUTC)](date[millisecondsGetterName(isUTC)]() + step); // break; // } // return date.getTime(); // } // const DATE_INTERVALS = [[8, 7.5], [4, 3.5], [2, 1.5]]; // const MONTH_INTERVALS = [[6, 5.5], [3, 2.5], [2, 1.5]]; // const MINUTES_SECONDS_INTERVALS = [[30, 30], [20, 20], [15, 15], [10, 10], [5, 5], [2, 2]]; function getDateInterval(approxInterval, daysInMonth) { approxInterval /= ONE_DAY; return approxInterval > 16 ? 16 // Math.floor(daysInMonth / 2) + 1 // In this case we only want one tick between two months. : approxInterval > 7.5 ? 7 // TODO week 7 or day 8? : approxInterval > 3.5 ? 4 : approxInterval > 1.5 ? 2 : 1; } function getMonthInterval(approxInterval) { var APPROX_ONE_MONTH = 30 * ONE_DAY; approxInterval /= APPROX_ONE_MONTH; return approxInterval > 6 ? 6 : approxInterval > 3 ? 3 : approxInterval > 2 ? 2 : 1; } function getHourInterval(approxInterval) { approxInterval /= ONE_HOUR; return approxInterval > 12 ? 12 : approxInterval > 6 ? 6 : approxInterval > 3.5 ? 4 : approxInterval > 2 ? 2 : 1; } function getMinutesAndSecondsInterval(approxInterval, isMinutes) { approxInterval /= isMinutes ? ONE_MINUTE : ONE_SECOND; return approxInterval > 30 ? 30 : approxInterval > 20 ? 20 : approxInterval > 15 ? 15 : approxInterval > 10 ? 10 : approxInterval > 5 ? 5 : approxInterval > 2 ? 2 : 1; } function getMillisecondsInterval(approxInterval) { return nice(approxInterval, true); } function getFirstTimestampOfUnit(date, unitName, isUTC) { var outDate = new Date(date); switch (getPrimaryTimeUnit(unitName)) { case 'year': case 'month': outDate[monthSetterName(isUTC)](0); case 'day': outDate[dateSetterName(isUTC)](1); case 'hour': outDate[hoursSetterName(isUTC)](0); case 'minute': outDate[minutesSetterName(isUTC)](0); case 'second': outDate[secondsSetterName(isUTC)](0); outDate[millisecondsSetterName(isUTC)](0); } return outDate.getTime(); } function getIntervalTicks(bottomUnitName, approxInterval, isUTC, extent) { var safeLimit = 10000; var unitNames = timeUnits; var iter = 0; function addTicksInSpan(interval, minTimestamp, maxTimestamp, getMethodName, setMethodName, isDate, out) { var date = new Date(minTimestamp); var dateTime = minTimestamp; var d = date[getMethodName](); // if (isDate) { // d -= 1; // Starts with 0; PENDING // } while (dateTime < maxTimestamp && dateTime <= extent[1]) { out.push({ value: dateTime }); d += interval; date[setMethodName](d); dateTime = date.getTime(); } // This extra tick is for calcuating ticks of next level. Will not been added to the final result out.push({ value: dateTime, notAdd: true }); } function addLevelTicks(unitName, lastLevelTicks, levelTicks) { var newAddedTicks = []; var isFirstLevel = !lastLevelTicks.length; if (isUnitValueSame(getPrimaryTimeUnit(unitName), extent[0], extent[1], isUTC)) { return; } if (isFirstLevel) { lastLevelTicks = [{ // TODO Optimize. Not include so may ticks. value: getFirstTimestampOfUnit(new Date(extent[0]), unitName, isUTC) }, { value: extent[1] }]; } for (var i = 0; i < lastLevelTicks.length - 1; i++) { var startTick = lastLevelTicks[i].value; var endTick = lastLevelTicks[i + 1].value; if (startTick === endTick) { continue; } var interval = void 0; var getterName = void 0; var setterName = void 0; var isDate = false; switch (unitName) { case 'year': interval = Math.max(1, Math.round(approxInterval / ONE_DAY / 365)); getterName = fullYearGetterName(isUTC); setterName = fullYearSetterName(isUTC); break; case 'half-year': case 'quarter': case 'month': interval = getMonthInterval(approxInterval); getterName = monthGetterName(isUTC); setterName = monthSetterName(isUTC); break; case 'week': // PENDING If week is added. Ignore day. case 'half-week': case 'day': interval = getDateInterval(approxInterval, 31); // Use 32 days and let interval been 16 getterName = dateGetterName(isUTC); setterName = dateSetterName(isUTC); isDate = true; break; case 'half-day': case 'quarter-day': case 'hour': interval = getHourInterval(approxInterval); getterName = hoursGetterName(isUTC); setterName = hoursSetterName(isUTC); break; case 'minute': interval = getMinutesAndSecondsInterval(approxInterval, true); getterName = minutesGetterName(isUTC); setterName = minutesSetterName(isUTC); break; case 'second': interval = getMinutesAndSecondsInterval(approxInterval, false); getterName = secondsGetterName(isUTC); setterName = secondsSetterName(isUTC); break; case 'millisecond': interval = getMillisecondsInterval(approxInterval); getterName = millisecondsGetterName(isUTC); setterName = millisecondsSetterName(isUTC); break; } addTicksInSpan(interval, startTick, endTick, getterName, setterName, isDate, newAddedTicks); if (unitName === 'year' && levelTicks.length > 1 && i === 0) { // Add nearest years to the left extent. levelTicks.unshift({ value: levelTicks[0].value - interval }); } } for (var i = 0; i < newAddedTicks.length; i++) { levelTicks.push(newAddedTicks[i]); } // newAddedTicks.length && console.log(unitName, newAddedTicks); return newAddedTicks; } var levelsTicks = []; var currentLevelTicks = []; var tickCount = 0; var lastLevelTickCount = 0; for (var i = 0; i < unitNames.length && iter++ < safeLimit; ++i) { var primaryTimeUnit = getPrimaryTimeUnit(unitNames[i]); if (!isPrimaryTimeUnit(unitNames[i])) { // TODO continue; } addLevelTicks(unitNames[i], levelsTicks[levelsTicks.length - 1] || [], currentLevelTicks); var nextPrimaryTimeUnit = unitNames[i + 1] ? getPrimaryTimeUnit(unitNames[i + 1]) : null; if (primaryTimeUnit !== nextPrimaryTimeUnit) { if (currentLevelTicks.length) { lastLevelTickCount = tickCount; // Remove the duplicate so the tick count can be precisely. currentLevelTicks.sort(function (a, b) { return a.value - b.value; }); var levelTicksRemoveDuplicated = []; for (var i_1 = 0; i_1 < currentLevelTicks.length; ++i_1) { var tickValue = currentLevelTicks[i_1].value; if (i_1 === 0 || currentLevelTicks[i_1 - 1].value !== tickValue) { levelTicksRemoveDuplicated.push(currentLevelTicks[i_1]); if (tickValue >= extent[0] && tickValue <= extent[1]) { tickCount++; } } } var targetTickNum = (extent[1] - extent[0]) / approxInterval; // Added too much in this level and not too less in last level if (tickCount > targetTickNum * 1.5 && lastLevelTickCount > targetTickNum / 1.5) { break; } // Only treat primary time unit as one level. levelsTicks.push(levelTicksRemoveDuplicated); if (tickCount > targetTickNum || bottomUnitName === unitNames[i]) { break; } } // Reset if next unitName is primary currentLevelTicks = []; } } if (false) { if (iter >= safeLimit) { warn('Exceed safe limit.'); } } var levelsTicksInExtent = Object(core_util["filter"])(Object(core_util["map"])(levelsTicks, function (levelTicks) { return Object(core_util["filter"])(levelTicks, function (tick) { return tick.value >= extent[0] && tick.value <= extent[1] && !tick.notAdd; }); }), function (levelTicks) { return levelTicks.length > 0; }); var ticks = []; var maxLevel = levelsTicksInExtent.length - 1; for (var i = 0; i < levelsTicksInExtent.length; ++i) { var levelTicks = levelsTicksInExtent[i]; for (var k = 0; k < levelTicks.length; ++k) { ticks.push({ value: levelTicks[k].value, level: maxLevel - i }); } } ticks.sort(function (a, b) { return a.value - b.value; }); // Remove duplicates var result = []; for (var i = 0; i < ticks.length; ++i) { if (i === 0 || ticks[i].value !== ticks[i - 1].value) { result.push(ticks[i]); } } return result; } scale_Scale.registerClass(Time_TimeScale); /* harmony default export */ var Time = (Time_TimeScale); // CONCATENATED MODULE: ./node_modules/echarts/lib/scale/Log.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ // Use some method of IntervalScale var scaleProto = scale_Scale.prototype; // FIXME:TS refactor: not good to call it directly with `this`? var Log_intervalScaleProto = Interval.prototype; var roundingErrorFix = round; var mathFloor = Math.floor; var mathCeil = Math.ceil; var Log_mathPow = Math.pow; var mathLog = Math.log; var Log_LogScale = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(LogScale, _super); function LogScale() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = 'log'; _this.base = 10; _this._originalScale = new Interval(); // FIXME:TS actually used by `IntervalScale` _this._interval = 0; return _this; } /** * @param Whether expand the ticks to niced extent. */ LogScale.prototype.getTicks = function (expandToNicedExtent) { var originalScale = this._originalScale; var extent = this._extent; var originalExtent = originalScale.getExtent(); var ticks = Log_intervalScaleProto.getTicks.call(this, expandToNicedExtent); return core_util["map"](ticks, function (tick) { var val = tick.value; var powVal = round(Log_mathPow(this.base, val)); // Fix #4158 powVal = val === extent[0] && this._fixMin ? fixRoundingError(powVal, originalExtent[0]) : powVal; powVal = val === extent[1] && this._fixMax ? fixRoundingError(powVal, originalExtent[1]) : powVal; return { value: powVal }; }, this); }; LogScale.prototype.setExtent = function (start, end) { var base = mathLog(this.base); // log(-Infinity) is NaN, so safe guard here start = mathLog(Math.max(0, start)) / base; end = mathLog(Math.max(0, end)) / base; Log_intervalScaleProto.setExtent.call(this, start, end); }; /** * @return {number} end */ LogScale.prototype.getExtent = function () { var base = this.base; var extent = scaleProto.getExtent.call(this); extent[0] = Log_mathPow(base, extent[0]); extent[1] = Log_mathPow(base, extent[1]); // Fix #4158 var originalScale = this._originalScale; var originalExtent = originalScale.getExtent(); this._fixMin && (extent[0] = fixRoundingError(extent[0], originalExtent[0])); this._fixMax && (extent[1] = fixRoundingError(extent[1], originalExtent[1])); return extent; }; LogScale.prototype.unionExtent = function (extent) { this._originalScale.unionExtent(extent); var base = this.base; extent[0] = mathLog(extent[0]) / mathLog(base); extent[1] = mathLog(extent[1]) / mathLog(base); scaleProto.unionExtent.call(this, extent); }; LogScale.prototype.unionExtentFromData = function (data, dim) { // TODO // filter value that <= 0 this.unionExtent(data.getApproximateExtent(dim)); }; /** * Update interval and extent of intervals for nice ticks * @param approxTickNum default 10 Given approx tick number */ LogScale.prototype.calcNiceTicks = function (approxTickNum) { approxTickNum = approxTickNum || 10; var extent = this._extent; var span = extent[1] - extent[0]; if (span === Infinity || span <= 0) { return; } var interval = quantity(span); var err = approxTickNum / span * interval; // Filter ticks to get closer to the desired count. if (err <= 0.5) { interval *= 10; } // Interval should be integer while (!isNaN(interval) && Math.abs(interval) < 1 && Math.abs(interval) > 0) { interval *= 10; } var niceExtent = [round(mathCeil(extent[0] / interval) * interval), round(mathFloor(extent[1] / interval) * interval)]; this._interval = interval; this._niceExtent = niceExtent; }; LogScale.prototype.calcNiceExtent = function (opt) { Log_intervalScaleProto.calcNiceExtent.call(this, opt); this._fixMin = opt.fixMin; this._fixMax = opt.fixMax; }; LogScale.prototype.parse = function (val) { return val; }; LogScale.prototype.contain = function (val) { val = mathLog(val) / mathLog(this.base); return helper_contain(val, this._extent); }; LogScale.prototype.normalize = function (val) { val = mathLog(val) / mathLog(this.base); return helper_normalize(val, this._extent); }; LogScale.prototype.scale = function (val) { val = helper_scale(val, this._extent); return Log_mathPow(this.base, val); }; LogScale.type = 'log'; return LogScale; }(scale_Scale); var Log_proto = Log_LogScale.prototype; Log_proto.getMinorTicks = Log_intervalScaleProto.getMinorTicks; Log_proto.getLabel = Log_intervalScaleProto.getLabel; function fixRoundingError(val, originalVal) { return roundingErrorFix(val, getPrecision(originalVal)); } scale_Scale.registerClass(Log_LogScale); /* harmony default export */ var Log = (Log_LogScale); // CONCATENATED MODULE: ./node_modules/echarts/lib/coord/scaleRawExtentInfo.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 scaleRawExtentInfo_ScaleRawExtentInfo = /** @class */function () { function ScaleRawExtentInfo(scale, model, // Usually: data extent from all series on this axis. originalExtent) { this._prepareParams(scale, model, originalExtent); } /** * Parameters depending on outside (like model, user callback) * are prepared and fixed here. */ ScaleRawExtentInfo.prototype._prepareParams = function (scale, model, // Usually: data extent from all series on this axis. dataExtent) { if (dataExtent[1] < dataExtent[0]) { dataExtent = [NaN, NaN]; } this._dataMin = dataExtent[0]; this._dataMax = dataExtent[1]; var isOrdinal = this._isOrdinal = scale.type === 'ordinal'; this._needCrossZero = scale.type === 'interval' && model.getNeedCrossZero && model.getNeedCrossZero(); var axisMinValue = model.get('min', true); if (axisMinValue == null) { axisMinValue = model.get('startValue', true); } var modelMinRaw = this._modelMinRaw = axisMinValue; if (Object(core_util["isFunction"])(modelMinRaw)) { // This callback always provides users the full data extent (before data is filtered). this._modelMinNum = parseAxisModelMinMax(scale, modelMinRaw({ min: dataExtent[0], max: dataExtent[1] })); } else if (modelMinRaw !== 'dataMin') { this._modelMinNum = parseAxisModelMinMax(scale, modelMinRaw); } var modelMaxRaw = this._modelMaxRaw = model.get('max', true); if (Object(core_util["isFunction"])(modelMaxRaw)) { // This callback always provides users the full data extent (before data is filtered). this._modelMaxNum = parseAxisModelMinMax(scale, modelMaxRaw({ min: dataExtent[0], max: dataExtent[1] })); } else if (modelMaxRaw !== 'dataMax') { this._modelMaxNum = parseAxisModelMinMax(scale, modelMaxRaw); } if (isOrdinal) { // FIXME: there is a flaw here: if there is no "block" data processor like `dataZoom`, // and progressive rendering is using, here the category result might just only contain // the processed chunk rather than the entire result. this._axisDataLen = model.getCategories().length; } else { var boundaryGap = model.get('boundaryGap'); var boundaryGapArr = Object(core_util["isArray"])(boundaryGap) ? boundaryGap : [boundaryGap || 0, boundaryGap || 0]; if (typeof boundaryGapArr[0] === 'boolean' || typeof boundaryGapArr[1] === 'boolean') { if (false) { console.warn('Boolean type for boundaryGap is only ' + 'allowed for ordinal axis. Please use string in ' + 'percentage instead, e.g., "20%". Currently, ' + 'boundaryGap is set to be 0.'); } this._boundaryGapInner = [0, 0]; } else { this._boundaryGapInner = [parsePercent(boundaryGapArr[0], 1), parsePercent(boundaryGapArr[1], 1)]; } } }; /** * Calculate extent by prepared parameters. * This method has no external dependency and can be called duplicatedly, * getting the same result. * If parameters changed, should call this method to recalcuate. */ ScaleRawExtentInfo.prototype.calculate = function () { // Notice: When min/max is not set (that is, when there are null/undefined, // which is the most common case), these cases should be ensured: // (1) For 'ordinal', show all axis.data. // (2) For others: // + `boundaryGap` is applied (if min/max set, boundaryGap is // disabled). // + If `needCrossZero`, min/max should be zero, otherwise, min/max should // be the result that originalExtent enlarged by boundaryGap. // (3) If no data, it should be ensured that `scale.setBlank` is set. var isOrdinal = this._isOrdinal; var dataMin = this._dataMin; var dataMax = this._dataMax; var axisDataLen = this._axisDataLen; var boundaryGapInner = this._boundaryGapInner; var span = !isOrdinal ? dataMax - dataMin || Math.abs(dataMin) : null; // Currently if a `'value'` axis model min is specified as 'dataMin'/'dataMax', // `boundaryGap` will not be used. It's the different from specifying as `null`/`undefined`. var min = this._modelMinRaw === 'dataMin' ? dataMin : this._modelMinNum; var max = this._modelMaxRaw === 'dataMax' ? dataMax : this._modelMaxNum; // If `_modelMinNum`/`_modelMaxNum` is `null`/`undefined`, should not be fixed. var minFixed = min != null; var maxFixed = max != null; if (min == null) { min = isOrdinal ? axisDataLen ? 0 : NaN : dataMin - boundaryGapInner[0] * span; } if (max == null) { max = isOrdinal ? axisDataLen ? axisDataLen - 1 : NaN : dataMax + boundaryGapInner[1] * span; } (min == null || !isFinite(min)) && (min = NaN); (max == null || !isFinite(max)) && (max = NaN); var isBlank = Object(core_util["eqNaN"])(min) || Object(core_util["eqNaN"])(max) || isOrdinal && !axisDataLen; // If data extent modified, need to recalculated to ensure cross zero. if (this._needCrossZero) { // Axis is over zero and min is not set if (min > 0 && max > 0 && !minFixed) { min = 0; // minFixed = true; } // Axis is under zero and max is not set if (min < 0 && max < 0 && !maxFixed) { max = 0; // maxFixed = true; } // PENDING: // When `needCrossZero` and all data is positive/negative, should it be ensured // that the results processed by boundaryGap are positive/negative? // If so, here `minFixed`/`maxFixed` need to be set. } var determinedMin = this._determinedMin; var determinedMax = this._determinedMax; if (determinedMin != null) { min = determinedMin; minFixed = true; } if (determinedMax != null) { max = determinedMax; maxFixed = true; } // Ensure min/max be finite number or NaN here. (not to be null/undefined) // `NaN` means min/max axis is blank. return { min: min, max: max, minFixed: minFixed, maxFixed: maxFixed, isBlank: isBlank }; }; ScaleRawExtentInfo.prototype.modifyDataMinMax = function (minMaxName, val) { if (false) { assert(!this.frozen); } this[DATA_MIN_MAX_ATTR[minMaxName]] = val; }; ScaleRawExtentInfo.prototype.setDeterminedMinMax = function (minMaxName, val) { var attr = DETERMINED_MIN_MAX_ATTR[minMaxName]; if (false) { assert(!this.frozen // Earse them usually means logic flaw. && this[attr] == null); } this[attr] = val; }; ScaleRawExtentInfo.prototype.freeze = function () { // @ts-ignore this.frozen = true; }; return ScaleRawExtentInfo; }(); var DETERMINED_MIN_MAX_ATTR = { min: '_determinedMin', max: '_determinedMax' }; var DATA_MIN_MAX_ATTR = { min: '_dataMin', max: '_dataMax' }; /** * Get scale min max and related info only depends on model settings. * This method can be called after coordinate system created. * For example, in data processing stage. * * Scale extent info probably be required multiple times during a workflow. * For example: * (1) `dataZoom` depends it to get the axis extent in "100%" state. * (2) `processor/extentCalculator` depends it to make sure whether axis extent is specified. * (3) `coordSys.update` use it to finally decide the scale extent. * But the callback of `min`/`max` should not be called multiple times. * The code below should not be implemented repeatedly either. * So we cache the result in the scale instance, which will be recreated at the beginning * of the workflow (because `scale` instance will be recreated each round of the workflow). */ function ensureScaleRawExtentInfo(scale, model, // Usually: data extent from all series on this axis. originalExtent) { // Do not permit to recreate. var rawExtentInfo = scale.rawExtentInfo; if (rawExtentInfo) { return rawExtentInfo; } rawExtentInfo = new scaleRawExtentInfo_ScaleRawExtentInfo(scale, model, originalExtent); // @ts-ignore scale.rawExtentInfo = rawExtentInfo; return rawExtentInfo; } function parseAxisModelMinMax(scale, minMax) { return minMax == null ? null : Object(core_util["eqNaN"])(minMax) ? NaN : scale.parse(minMax); } // CONCATENATED MODULE: ./node_modules/echarts/lib/coord/axisHelper.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ /** * Get axis scale extent before niced. * Item of returned array can only be number (including Infinity and NaN). * * Caution: * Precondition of calling this method: * The scale extent has been initialized using series data extent via * `scale.setExtent` or `scale.unionExtentFromData`; */ function getScaleExtent(scale, model) { var scaleType = scale.type; var rawExtentResult = ensureScaleRawExtentInfo(scale, model, scale.getExtent()).calculate(); scale.setBlank(rawExtentResult.isBlank); var min = rawExtentResult.min; var max = rawExtentResult.max; // If bars are placed on a base axis of type time or interval account for axis boundary overflow and current axis // is base axis // FIXME // (1) Consider support value axis, where below zero and axis `onZero` should be handled properly. // (2) Refactor the logic with `barGrid`. Is it not need to `makeBarWidthAndOffsetInfo` twice with different extent? // Should not depend on series type `bar`? // (3) Fix that might overlap when using dataZoom. // (4) Consider other chart types using `barGrid`? // See #6728, #4862, `test/bar-overflow-time-plot.html` var ecModel = model.ecModel; if (ecModel && scaleType === 'time' /* || scaleType === 'interval' */) { var barSeriesModels = prepareLayoutBarSeries('bar', ecModel); var isBaseAxisAndHasBarSeries_1 = false; core_util["each"](barSeriesModels, function (seriesModel) { isBaseAxisAndHasBarSeries_1 = isBaseAxisAndHasBarSeries_1 || seriesModel.getBaseAxis() === model.axis; }); if (isBaseAxisAndHasBarSeries_1) { // Calculate placement of bars on axis. TODO should be decoupled // with barLayout var barWidthAndOffset = makeColumnLayout(barSeriesModels); // Adjust axis min and max to account for overflow var adjustedScale = adjustScaleForOverflow(min, max, model, barWidthAndOffset); min = adjustedScale.min; max = adjustedScale.max; } } return { extent: [min, max], // "fix" means "fixed", the value should not be // changed in the subsequent steps. fixMin: rawExtentResult.minFixed, fixMax: rawExtentResult.maxFixed }; } function adjustScaleForOverflow(min, max, model, // Only support cartesian coord yet. barWidthAndOffset) { // Get Axis Length var axisExtent = model.axis.getExtent(); var axisLength = Math.abs(axisExtent[1] - axisExtent[0]); // Get bars on current base axis and calculate min and max overflow var barsOnCurrentAxis = retrieveColumnLayout(barWidthAndOffset, model.axis); if (barsOnCurrentAxis === undefined) { return { min: min, max: max }; } var minOverflow = Infinity; core_util["each"](barsOnCurrentAxis, function (item) { minOverflow = Math.min(item.offset, minOverflow); }); var maxOverflow = -Infinity; core_util["each"](barsOnCurrentAxis, function (item) { maxOverflow = Math.max(item.offset + item.width, maxOverflow); }); minOverflow = Math.abs(minOverflow); maxOverflow = Math.abs(maxOverflow); var totalOverFlow = minOverflow + maxOverflow; // Calculate required buffer based on old range and overflow var oldRange = max - min; var oldRangePercentOfNew = 1 - (minOverflow + maxOverflow) / axisLength; var overflowBuffer = oldRange / oldRangePercentOfNew - oldRange; max += overflowBuffer * (maxOverflow / totalOverFlow); min -= overflowBuffer * (minOverflow / totalOverFlow); return { min: min, max: max }; } // Precondition of calling this method: // The scale extent has been initialized using series data extent via // `scale.setExtent` or `scale.unionExtentFromData`; function niceScaleExtent(scale, inModel) { var model = inModel; var extentInfo = getScaleExtent(scale, model); var extent = extentInfo.extent; var splitNumber = model.get('splitNumber'); if (scale instanceof Log) { scale.base = model.get('logBase'); } var scaleType = scale.type; var interval = model.get('interval'); var isIntervalOrTime = scaleType === 'interval' || scaleType === 'time'; scale.setExtent(extent[0], extent[1]); scale.calcNiceExtent({ splitNumber: splitNumber, fixMin: extentInfo.fixMin, fixMax: extentInfo.fixMax, minInterval: isIntervalOrTime ? model.get('minInterval') : null, maxInterval: isIntervalOrTime ? model.get('maxInterval') : null }); // If some one specified the min, max. And the default calculated interval // is not good enough. He can specify the interval. It is often appeared // in angle axis with angle 0 - 360. Interval calculated in interval scale is hard // to be 60. // FIXME if (interval != null) { scale.setInterval && scale.setInterval(interval); } } /** * @param axisType Default retrieve from model.type */ function createScaleByModel(model, axisType) { axisType = axisType || model.get('type'); if (axisType) { switch (axisType) { // Buildin scale case 'category': return new Ordinal({ ordinalMeta: model.getOrdinalMeta ? model.getOrdinalMeta() : model.getCategories(), extent: [Infinity, -Infinity] }); case 'time': return new Time({ locale: model.ecModel.getLocaleModel(), useUTC: model.ecModel.get('useUTC') }); default: // case 'value'/'interval', 'log', or others. return new (scale_Scale.getClass(axisType) || Interval)(); } } } /** * Check if the axis cross 0 */ function ifAxisCrossZero(axis) { var dataExtent = axis.scale.getExtent(); var min = dataExtent[0]; var max = dataExtent[1]; return !(min > 0 && max > 0 || min < 0 && max < 0); } /** * @param axis * @return Label formatter function. * param: {number} tickValue, * param: {number} idx, the index in all ticks. * If category axis, this param is not required. * return: {string} label string. */ function makeLabelFormatter(axis) { var labelFormatter = axis.getLabelModel().get('formatter'); var categoryTickStart = axis.type === 'category' ? axis.scale.getExtent()[0] : null; if (axis.scale.type === 'time') { return function (tpl) { return function (tick, idx) { return axis.scale.getFormattedLabel(tick, idx, tpl); }; }(labelFormatter); } else if (core_util["isString"](labelFormatter)) { return function (tpl) { return function (tick) { // For category axis, get raw value; for numeric axis, // get formatted label like '1,333,444'. var label = axis.scale.getLabel(tick); var text = tpl.replace('{value}', label != null ? label : ''); return text; }; }(labelFormatter); } else if (core_util["isFunction"](labelFormatter)) { return function (cb) { return function (tick, idx) { // The original intention of `idx` is "the index of the tick in all ticks". // But the previous implementation of category axis do not consider the // `axisLabel.interval`, which cause that, for example, the `interval` is // `1`, then the ticks "name5", "name7", "name9" are displayed, where the // corresponding `idx` are `0`, `2`, `4`, but not `0`, `1`, `2`. So we keep // the definition here for back compatibility. if (categoryTickStart != null) { idx = tick.value - categoryTickStart; } return cb(getAxisRawValue(axis, tick), idx, tick.level != null ? { level: tick.level } : null); }; }(labelFormatter); } else { return function (tick) { return axis.scale.getLabel(tick); }; } } function getAxisRawValue(axis, tick) { // In category axis with data zoom, tick is not the original // index of axis.data. So tick should not be exposed to user // in category axis. return axis.type === 'category' ? axis.scale.getLabel(tick) : tick.value; } /** * @param axis * @return Be null/undefined if no labels. */ function estimateLabelUnionRect(axis) { var axisModel = axis.model; var scale = axis.scale; if (!axisModel.get(['axisLabel', 'show']) || scale.isBlank()) { return; } var realNumberScaleTicks; var tickCount; var categoryScaleExtent = scale.getExtent(); // Optimize for large category data, avoid call `getTicks()`. if (scale instanceof Ordinal) { tickCount = scale.count(); } else { realNumberScaleTicks = scale.getTicks(); tickCount = realNumberScaleTicks.length; } var axisLabelModel = axis.getLabelModel(); var labelFormatter = makeLabelFormatter(axis); var rect; var step = 1; // Simple optimization for large amount of labels if (tickCount > 40) { step = Math.ceil(tickCount / 40); } for (var i = 0; i < tickCount; i += step) { var tick = realNumberScaleTicks ? realNumberScaleTicks[i] : { value: categoryScaleExtent[0] + i }; var label = labelFormatter(tick, i); var unrotatedSingleRect = axisLabelModel.getTextRect(label); var singleRect = rotateTextRect(unrotatedSingleRect, axisLabelModel.get('rotate') || 0); rect ? rect.union(singleRect) : rect = singleRect; } return rect; } function rotateTextRect(textRect, rotate) { var rotateRadians = rotate * Math.PI / 180; var beforeWidth = textRect.width; var beforeHeight = textRect.height; var afterWidth = beforeWidth * Math.abs(Math.cos(rotateRadians)) + Math.abs(beforeHeight * Math.sin(rotateRadians)); var afterHeight = beforeWidth * Math.abs(Math.sin(rotateRadians)) + Math.abs(beforeHeight * Math.cos(rotateRadians)); var rotatedRect = new core_BoundingRect(textRect.x, textRect.y, afterWidth, afterHeight); return rotatedRect; } /** * @param model axisLabelModel or axisTickModel * @return {number|String} Can be null|'auto'|number|function */ function getOptionCategoryInterval(model) { var interval = model.get('interval'); return interval == null ? 'auto' : interval; } /** * Set `categoryInterval` as 0 implicitly indicates that * show all labels regardless of overlap. * @param {Object} axis axisModel.axis */ function shouldShowAllLabels(axis) { return axis.type === 'category' && getOptionCategoryInterval(axis.getLabelModel()) === 0; } function getDataDimensionsOnAxis(data, axisDim) { // Remove duplicated dat dimensions caused by `getStackedDimension`. var dataDimMap = {}; // Currently `mapDimensionsAll` will contain stack result dimension ('__\0ecstackresult'). // PENDING: is it reasonable? Do we need to remove the original dim from "coord dim" since // there has been stacked result dim? core_util["each"](data.mapDimensionsAll(axisDim), function (dataDim) { // For example, the extent of the original dimension // is [0.1, 0.5], the extent of the `stackResultDimension` // is [7, 9], the final extent should NOT include [0.1, 0.5], // because there is no graphic corresponding to [0.1, 0.5]. // See the case in `test/area-stack.html` `main1`, where area line // stack needs `yAxis` not start from 0. dataDimMap[getStackedDimension(data, dataDim)] = true; }); return core_util["keys"](dataDimMap); } function unionAxisExtentFromData(dataExtent, data, axisDim) { if (data) { core_util["each"](getDataDimensionsOnAxis(data, axisDim), function (dim) { var seriesExtent = data.getApproximateExtent(dim); seriesExtent[0] < dataExtent[0] && (dataExtent[0] = seriesExtent[0]); seriesExtent[1] > dataExtent[1] && (dataExtent[1] = seriesExtent[1]); }); } } // CONCATENATED MODULE: ./node_modules/echarts/lib/coord/axisModelCommonMixin.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ // eslint-disable-next-line @typescript-eslint/no-unused-vars var AxisModelCommonMixin = /** @class */function () { function AxisModelCommonMixin() {} AxisModelCommonMixin.prototype.getNeedCrossZero = function () { var option = this.option; return !option.scale; }; /** * Should be implemented by each axis model if necessary. * @return coordinate system model */ AxisModelCommonMixin.prototype.getCoordSysModel = function () { return; }; return AxisModelCommonMixin; }(); // CONCATENATED MODULE: ./node_modules/echarts/lib/export/api/helper.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 exposes helper functions for developing extensions. */ // import createGraphFromNodeEdge from './chart/helper/createGraphFromNodeEdge.js'; /** * Create a multi dimension List structure from seriesModel. */ function createList(seriesModel) { return helper_createSeriesData(null, seriesModel); } // export function createGraph(seriesModel) { // let nodes = seriesModel.get('data'); // let links = seriesModel.get('links'); // return createGraphFromNodeEdge(nodes, links, seriesModel); // } var helper_dataStack = { isDimensionStacked: isDimensionStacked, enableDataStack: enableDataStack, getStackedDimension: getStackedDimension }; /** * Create a symbol element with given symbol configuration: shape, x, y, width, height, color * @param {string} symbolDesc * @param {number} x * @param {number} y * @param {number} w * @param {number} h * @param {string} color */ /** * Create scale * @param {Array.} dataExtent * @param {Object|module:echarts/Model} option If `optoin.type` * is secified, it can only be `'value'` currently. */ function createScale(dataExtent, option) { var axisModel = option; if (!(option instanceof model_Model)) { axisModel = new model_Model(option); // FIXME // Currently AxisModelCommonMixin has nothing to do with the // the requirements of `axisHelper.createScaleByModel`. For // example the methods `getCategories` and `getOrdinalMeta` // are required for `'category'` axis, and ecModel is required // for `'time'` axis. But occasionally echarts-gl happened // to only use `'value'` axis. // zrUtil.mixin(axisModel, AxisModelCommonMixin); } var scale = createScaleByModel(axisModel); scale.setExtent(dataExtent[0], dataExtent[1]); niceScaleExtent(scale, axisModel); return scale; } /** * Mixin common methods to axis model, * * Include methods * `getFormattedLabels() => Array.` * `getCategories() => Array.` * `getMin(origin: boolean) => number` * `getMax(origin: boolean) => number` * `getNeedCrossZero() => boolean` */ function mixinAxisModelCommonMethods(Model) { core_util["mixin"](Model, AxisModelCommonMixin); } function helper_createTextStyle(textStyleModel, opts) { opts = opts || {}; return createTextStyle(textStyleModel, null, null, opts.state !== 'normal'); } // CONCATENATED MODULE: ./node_modules/zrender/lib/contain/polygon.js var polygon_EPSILON = 1e-8; function polygon_isAroundEqual(a, b) { return Math.abs(a - b) < polygon_EPSILON; } function polygon_contain(points, x, y) { var w = 0; var p = points[0]; if (!p) { return false; } for (var i = 1; i < points.length; i++) { var p2 = points[i]; w += windingLine(p[0], p[1], p2[0], p2[1], x, y); p = p2; } var p0 = points[0]; if (!polygon_isAroundEqual(p[0], p0[0]) || !polygon_isAroundEqual(p[1], p0[1])) { w += windingLine(p[0], p[1], p0[0], p0[1], x, y); } return w !== 0; } // CONCATENATED MODULE: ./node_modules/echarts/lib/coord/geo/Region.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 TMP_TRANSFORM = []; function transformPoints(points, transform) { for (var p = 0; p < points.length; p++) { applyTransform(points[p], points[p], transform); } } function updateBBoxFromPoints(points, min, max, projection) { for (var i = 0; i < points.length; i++) { var p = points[i]; if (projection) { // projection may return null point. p = projection.project(p); } if (p && isFinite(p[0]) && isFinite(p[1])) { vector_min(min, min, p); vector_max(max, max, p); } } } function centroid(points) { var signedArea = 0; var cx = 0; var cy = 0; var len = points.length; var x0 = points[len - 1][0]; var y0 = points[len - 1][1]; // Polygon should been closed. for (var i = 0; i < len; i++) { var x1 = points[i][0]; var y1 = points[i][1]; var a = x0 * y1 - x1 * y0; signedArea += a; cx += (x0 + x1) * a; cy += (y0 + y1) * a; x0 = x1; y0 = y1; } return signedArea ? [cx / signedArea / 3, cy / signedArea / 3, signedArea] : [points[0][0] || 0, points[0][1] || 0]; } var Region = /** @class */function () { function Region(name) { this.name = name; } Region.prototype.setCenter = function (center) { this._center = center; }; /** * Get center point in data unit. That is, * for GeoJSONRegion, the unit is lat/lng, * for GeoSVGRegion, the unit is SVG local coord. */ Region.prototype.getCenter = function () { var center = this._center; if (!center) { // In most cases there are no need to calculate this center. // So calculate only when called. center = this._center = this.calcCenter(); } return center; }; return Region; }(); var GeoJSONPolygonGeometry = /** @class */function () { function GeoJSONPolygonGeometry(exterior, interiors) { this.type = 'polygon'; this.exterior = exterior; this.interiors = interiors; } return GeoJSONPolygonGeometry; }(); var GeoJSONLineStringGeometry = /** @class */function () { function GeoJSONLineStringGeometry(points) { this.type = 'linestring'; this.points = points; } return GeoJSONLineStringGeometry; }(); var Region_GeoJSONRegion = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(GeoJSONRegion, _super); function GeoJSONRegion(name, geometries, cp) { var _this = _super.call(this, name) || this; _this.type = 'geoJSON'; _this.geometries = geometries; _this._center = cp && [cp[0], cp[1]]; return _this; } GeoJSONRegion.prototype.calcCenter = function () { var geometries = this.geometries; var largestGeo; var largestGeoSize = 0; for (var i = 0; i < geometries.length; i++) { var geo = geometries[i]; var exterior = geo.exterior; // Simple trick to use points count instead of polygon area as region size. // Ignore linestring var size = exterior && exterior.length; if (size > largestGeoSize) { largestGeo = geo; largestGeoSize = size; } } if (largestGeo) { return centroid(largestGeo.exterior); } // from bounding rect by default. var rect = this.getBoundingRect(); return [rect.x + rect.width / 2, rect.y + rect.height / 2]; }; GeoJSONRegion.prototype.getBoundingRect = function (projection) { var rect = this._rect; // Always recalculate if using projection. if (rect && !projection) { return rect; } var min = [Infinity, Infinity]; var max = [-Infinity, -Infinity]; var geometries = this.geometries; Object(core_util["each"])(geometries, function (geo) { if (geo.type === 'polygon') { // Doesn't consider hole updateBBoxFromPoints(geo.exterior, min, max, projection); } else { Object(core_util["each"])(geo.points, function (points) { updateBBoxFromPoints(points, min, max, projection); }); } }); // Normalie invalid bounding. if (!(isFinite(min[0]) && isFinite(min[1]) && isFinite(max[0]) && isFinite(max[1]))) { min[0] = min[1] = max[0] = max[1] = 0; } rect = new core_BoundingRect(min[0], min[1], max[0] - min[0], max[1] - min[1]); if (!projection) { this._rect = rect; } return rect; }; GeoJSONRegion.prototype.contain = function (coord) { var rect = this.getBoundingRect(); var geometries = this.geometries; if (!rect.contain(coord[0], coord[1])) { return false; } loopGeo: for (var i = 0, len = geometries.length; i < len; i++) { var geo = geometries[i]; // Only support polygon. if (geo.type !== 'polygon') { continue; } var exterior = geo.exterior; var interiors = geo.interiors; if (polygon_contain(exterior, coord[0], coord[1])) { // Not in the region if point is in the hole. for (var k = 0; k < (interiors ? interiors.length : 0); k++) { if (polygon_contain(interiors[k], coord[0], coord[1])) { continue loopGeo; } } return true; } } return false; }; /** * Transform the raw coords to target bounding. * @param x * @param y * @param width * @param height */ GeoJSONRegion.prototype.transformTo = function (x, y, width, height) { var rect = this.getBoundingRect(); var aspect = rect.width / rect.height; if (!width) { width = aspect * height; } else if (!height) { height = width / aspect; } var target = new core_BoundingRect(x, y, width, height); var transform = rect.calculateTransform(target); var geometries = this.geometries; for (var i = 0; i < geometries.length; i++) { var geo = geometries[i]; if (geo.type === 'polygon') { transformPoints(geo.exterior, transform); Object(core_util["each"])(geo.interiors, function (interior) { transformPoints(interior, transform); }); } else { Object(core_util["each"])(geo.points, function (points) { transformPoints(points, transform); }); } } rect = this._rect; rect.copy(target); // Update center this._center = [rect.x + rect.width / 2, rect.y + rect.height / 2]; }; GeoJSONRegion.prototype.cloneShallow = function (name) { name == null && (name = this.name); var newRegion = new GeoJSONRegion(name, this.geometries, this._center); newRegion._rect = this._rect; newRegion.transformTo = null; // Simply avoid to be called. return newRegion; }; return GeoJSONRegion; }(Region); var Region_GeoSVGRegion = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(GeoSVGRegion, _super); function GeoSVGRegion(name, elOnlyForCalculate) { var _this = _super.call(this, name) || this; _this.type = 'geoSVG'; _this._elOnlyForCalculate = elOnlyForCalculate; return _this; } GeoSVGRegion.prototype.calcCenter = function () { var el = this._elOnlyForCalculate; var rect = el.getBoundingRect(); var center = [rect.x + rect.width / 2, rect.y + rect.height / 2]; var mat = identity(TMP_TRANSFORM); var target = el; while (target && !target.isGeoSVGGraphicRoot) { matrix_mul(mat, target.getLocalTransform(), mat); target = target.parent; } matrix_invert(mat, mat); applyTransform(center, center, mat); return center; }; return GeoSVGRegion; }(Region); // CONCATENATED MODULE: ./node_modules/echarts/lib/coord/geo/parseGeoJson.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ /** * Parse and decode geo json */ function decode(json) { if (!json.UTF8Encoding) { return json; } var jsonCompressed = json; var encodeScale = jsonCompressed.UTF8Scale; if (encodeScale == null) { encodeScale = 1024; } var features = jsonCompressed.features; core_util["each"](features, function (feature) { var geometry = feature.geometry; var encodeOffsets = geometry.encodeOffsets; var coordinates = geometry.coordinates; // Geometry may be appeded manually in the script after json loaded. // In this case this geometry is usually not encoded. if (!encodeOffsets) { return; } switch (geometry.type) { case 'LineString': geometry.coordinates = decodeRing(coordinates, encodeOffsets, encodeScale); break; case 'Polygon': decodeRings(coordinates, encodeOffsets, encodeScale); break; case 'MultiLineString': decodeRings(coordinates, encodeOffsets, encodeScale); break; case 'MultiPolygon': core_util["each"](coordinates, function (rings, idx) { return decodeRings(rings, encodeOffsets[idx], encodeScale); }); } }); // Has been decoded jsonCompressed.UTF8Encoding = false; return jsonCompressed; } function decodeRings(rings, encodeOffsets, encodeScale) { for (var c = 0; c < rings.length; c++) { rings[c] = decodeRing(rings[c], encodeOffsets[c], encodeScale); } } function decodeRing(coordinate, encodeOffsets, encodeScale) { var result = []; var prevX = encodeOffsets[0]; var prevY = encodeOffsets[1]; for (var i = 0; i < coordinate.length; i += 2) { var x = coordinate.charCodeAt(i) - 64; var y = coordinate.charCodeAt(i + 1) - 64; // ZigZag decoding x = x >> 1 ^ -(x & 1); y = y >> 1 ^ -(y & 1); // Delta deocding x += prevX; y += prevY; prevX = x; prevY = y; // Dequantize result.push([x / encodeScale, y / encodeScale]); } return result; } function parseGeoJSON(geoJson, nameProperty) { geoJson = decode(geoJson); return core_util["map"](core_util["filter"](geoJson.features, function (featureObj) { // Output of mapshaper may have geometry null return featureObj.geometry && featureObj.properties && featureObj.geometry.coordinates.length > 0; }), function (featureObj) { var properties = featureObj.properties; var geo = featureObj.geometry; var geometries = []; switch (geo.type) { case 'Polygon': var coordinates = geo.coordinates; // According to the GeoJSON specification. // First must be exterior, and the rest are all interior(holes). geometries.push(new GeoJSONPolygonGeometry(coordinates[0], coordinates.slice(1))); break; case 'MultiPolygon': core_util["each"](geo.coordinates, function (item) { if (item[0]) { geometries.push(new GeoJSONPolygonGeometry(item[0], item.slice(1))); } }); break; case 'LineString': geometries.push(new GeoJSONLineStringGeometry([geo.coordinates])); break; case 'MultiLineString': geometries.push(new GeoJSONLineStringGeometry(geo.coordinates)); } var region = new Region_GeoJSONRegion(properties[nameProperty || 'name'], geometries, properties.cp); region.properties = properties; return region; }); } // CONCATENATED MODULE: ./node_modules/echarts/lib/export/api/number.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ // CONCATENATED MODULE: ./node_modules/echarts/lib/export/api/time.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ // CONCATENATED MODULE: ./node_modules/echarts/lib/export/api/graphic.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ // CONCATENATED MODULE: ./node_modules/echarts/lib/export/api/format.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ // CONCATENATED MODULE: ./node_modules/echarts/lib/export/api/util.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ // CONCATENATED MODULE: ./node_modules/echarts/lib/coord/axisTickLabelBuilder.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 axisTickLabelBuilder_inner = makeInner(); function tickValuesToNumbers(axis, values) { var nums = core_util["map"](values, function (val) { return axis.scale.parse(val); }); if (axis.type === 'time' && nums.length > 0) { // Time axis needs duplicate first/last tick (see TimeScale.getTicks()) // The first and last tick/label don't get drawn nums.sort(); nums.unshift(nums[0]); nums.push(nums[nums.length - 1]); } return nums; } function createAxisLabels(axis) { var custom = axis.getLabelModel().get('customValues'); if (custom) { var labelFormatter_1 = makeLabelFormatter(axis); var extent_1 = axis.scale.getExtent(); var tickNumbers = tickValuesToNumbers(axis, custom); var ticks = core_util["filter"](tickNumbers, function (val) { return val >= extent_1[0] && val <= extent_1[1]; }); return { labels: core_util["map"](ticks, function (numval) { var tick = { value: numval }; return { formattedLabel: labelFormatter_1(tick), rawLabel: axis.scale.getLabel(tick), tickValue: numval }; }) }; } // Only ordinal scale support tick interval return axis.type === 'category' ? makeCategoryLabels(axis) : makeRealNumberLabels(axis); } /** * @param {module:echats/coord/Axis} axis * @param {module:echarts/model/Model} tickModel For example, can be axisTick, splitLine, splitArea. * @return {Object} { * ticks: Array. * tickCategoryInterval: number * } */ function createAxisTicks(axis, tickModel) { var custom = axis.getTickModel().get('customValues'); if (custom) { var extent_2 = axis.scale.getExtent(); var tickNumbers = tickValuesToNumbers(axis, custom); return { ticks: core_util["filter"](tickNumbers, function (val) { return val >= extent_2[0] && val <= extent_2[1]; }) }; } // Only ordinal scale support tick interval return axis.type === 'category' ? makeCategoryTicks(axis, tickModel) : { ticks: core_util["map"](axis.scale.getTicks(), function (tick) { return tick.value; }) }; } function makeCategoryLabels(axis) { var labelModel = axis.getLabelModel(); var result = makeCategoryLabelsActually(axis, labelModel); return !labelModel.get('show') || axis.scale.isBlank() ? { labels: [], labelCategoryInterval: result.labelCategoryInterval } : result; } function makeCategoryLabelsActually(axis, labelModel) { var labelsCache = getListCache(axis, 'labels'); var optionLabelInterval = getOptionCategoryInterval(labelModel); var result = listCacheGet(labelsCache, optionLabelInterval); if (result) { return result; } var labels; var numericLabelInterval; if (core_util["isFunction"](optionLabelInterval)) { labels = makeLabelsByCustomizedCategoryInterval(axis, optionLabelInterval); } else { numericLabelInterval = optionLabelInterval === 'auto' ? makeAutoCategoryInterval(axis) : optionLabelInterval; labels = makeLabelsByNumericCategoryInterval(axis, numericLabelInterval); } // Cache to avoid calling interval function repeatedly. return listCacheSet(labelsCache, optionLabelInterval, { labels: labels, labelCategoryInterval: numericLabelInterval }); } function makeCategoryTicks(axis, tickModel) { var ticksCache = getListCache(axis, 'ticks'); var optionTickInterval = getOptionCategoryInterval(tickModel); var result = listCacheGet(ticksCache, optionTickInterval); if (result) { return result; } var ticks; var tickCategoryInterval; // Optimize for the case that large category data and no label displayed, // we should not return all ticks. if (!tickModel.get('show') || axis.scale.isBlank()) { ticks = []; } if (core_util["isFunction"](optionTickInterval)) { ticks = makeLabelsByCustomizedCategoryInterval(axis, optionTickInterval, true); } // Always use label interval by default despite label show. Consider this // scenario, Use multiple grid with the xAxis sync, and only one xAxis shows // labels. `splitLine` and `axisTick` should be consistent in this case. else if (optionTickInterval === 'auto') { var labelsResult = makeCategoryLabelsActually(axis, axis.getLabelModel()); tickCategoryInterval = labelsResult.labelCategoryInterval; ticks = core_util["map"](labelsResult.labels, function (labelItem) { return labelItem.tickValue; }); } else { tickCategoryInterval = optionTickInterval; ticks = makeLabelsByNumericCategoryInterval(axis, tickCategoryInterval, true); } // Cache to avoid calling interval function repeatedly. return listCacheSet(ticksCache, optionTickInterval, { ticks: ticks, tickCategoryInterval: tickCategoryInterval }); } function makeRealNumberLabels(axis) { var ticks = axis.scale.getTicks(); var labelFormatter = makeLabelFormatter(axis); return { labels: core_util["map"](ticks, function (tick, idx) { return { level: tick.level, formattedLabel: labelFormatter(tick, idx), rawLabel: axis.scale.getLabel(tick), tickValue: tick.value }; }) }; } function getListCache(axis, prop) { // Because key can be a function, and cache size always is small, we use array cache. return axisTickLabelBuilder_inner(axis)[prop] || (axisTickLabelBuilder_inner(axis)[prop] = []); } function listCacheGet(cache, key) { for (var i = 0; i < cache.length; i++) { if (cache[i].key === key) { return cache[i].value; } } } function listCacheSet(cache, key, value) { cache.push({ key: key, value: value }); return value; } function makeAutoCategoryInterval(axis) { var result = axisTickLabelBuilder_inner(axis).autoInterval; return result != null ? result : axisTickLabelBuilder_inner(axis).autoInterval = axis.calculateCategoryInterval(); } /** * Calculate interval for category axis ticks and labels. * To get precise result, at least one of `getRotate` and `isHorizontal` * should be implemented in axis. */ function calculateCategoryInterval(axis) { var params = fetchAutoCategoryIntervalCalculationParams(axis); var labelFormatter = makeLabelFormatter(axis); var rotation = (params.axisRotate - params.labelRotate) / 180 * Math.PI; var ordinalScale = axis.scale; var ordinalExtent = ordinalScale.getExtent(); // Providing this method is for optimization: // avoid generating a long array by `getTicks` // in large category data case. var tickCount = ordinalScale.count(); if (ordinalExtent[1] - ordinalExtent[0] < 1) { return 0; } var step = 1; // Simple optimization. Empirical value: tick count should less than 40. if (tickCount > 40) { step = Math.max(1, Math.floor(tickCount / 40)); } var tickValue = ordinalExtent[0]; var unitSpan = axis.dataToCoord(tickValue + 1) - axis.dataToCoord(tickValue); var unitW = Math.abs(unitSpan * Math.cos(rotation)); var unitH = Math.abs(unitSpan * Math.sin(rotation)); var maxW = 0; var maxH = 0; // Caution: Performance sensitive for large category data. // Consider dataZoom, we should make appropriate step to avoid O(n) loop. for (; tickValue <= ordinalExtent[1]; tickValue += step) { var width = 0; var height = 0; // Not precise, do not consider align and vertical align // and each distance from axis line yet. var rect = getBoundingRect(labelFormatter({ value: tickValue }), params.font, 'center', 'top'); // Magic number width = rect.width * 1.3; height = rect.height * 1.3; // Min size, void long loop. maxW = Math.max(maxW, width, 7); maxH = Math.max(maxH, height, 7); } var dw = maxW / unitW; var dh = maxH / unitH; // 0/0 is NaN, 1/0 is Infinity. isNaN(dw) && (dw = Infinity); isNaN(dh) && (dh = Infinity); var interval = Math.max(0, Math.floor(Math.min(dw, dh))); var cache = axisTickLabelBuilder_inner(axis.model); var axisExtent = axis.getExtent(); var lastAutoInterval = cache.lastAutoInterval; var lastTickCount = cache.lastTickCount; // Use cache to keep interval stable while moving zoom window, // otherwise the calculated interval might jitter when the zoom // window size is close to the interval-changing size. // For example, if all of the axis labels are `a, b, c, d, e, f, g`. // The jitter will cause that sometimes the displayed labels are // `a, d, g` (interval: 2) sometimes `a, c, e`(interval: 1). if (lastAutoInterval != null && lastTickCount != null && Math.abs(lastAutoInterval - interval) <= 1 && Math.abs(lastTickCount - tickCount) <= 1 // Always choose the bigger one, otherwise the critical // point is not the same when zooming in or zooming out. && lastAutoInterval > interval // If the axis change is caused by chart resize, the cache should not // be used. Otherwise some hidden labels might not be shown again. && cache.axisExtent0 === axisExtent[0] && cache.axisExtent1 === axisExtent[1]) { interval = lastAutoInterval; } // Only update cache if cache not used, otherwise the // changing of interval is too insensitive. else { cache.lastTickCount = tickCount; cache.lastAutoInterval = interval; cache.axisExtent0 = axisExtent[0]; cache.axisExtent1 = axisExtent[1]; } return interval; } function fetchAutoCategoryIntervalCalculationParams(axis) { var labelModel = axis.getLabelModel(); return { axisRotate: axis.getRotate ? axis.getRotate() : axis.isHorizontal && !axis.isHorizontal() ? 90 : 0, labelRotate: labelModel.get('rotate') || 0, font: labelModel.getFont() }; } function makeLabelsByNumericCategoryInterval(axis, categoryInterval, onlyTick) { var labelFormatter = makeLabelFormatter(axis); var ordinalScale = axis.scale; var ordinalExtent = ordinalScale.getExtent(); var labelModel = axis.getLabelModel(); var result = []; // TODO: axisType: ordinalTime, pick the tick from each month/day/year/... var step = Math.max((categoryInterval || 0) + 1, 1); var startTick = ordinalExtent[0]; var tickCount = ordinalScale.count(); // Calculate start tick based on zero if possible to keep label consistent // while zooming and moving while interval > 0. Otherwise the selection // of displayable ticks and symbols probably keep changing. // 3 is empirical value. if (startTick !== 0 && step > 1 && tickCount / step > 2) { startTick = Math.round(Math.ceil(startTick / step) * step); } // (1) Only add min max label here but leave overlap checking // to render stage, which also ensure the returned list // suitable for splitLine and splitArea rendering. // (2) Scales except category always contain min max label so // do not need to perform this process. var showAllLabel = shouldShowAllLabels(axis); var includeMinLabel = labelModel.get('showMinLabel') || showAllLabel; var includeMaxLabel = labelModel.get('showMaxLabel') || showAllLabel; if (includeMinLabel && startTick !== ordinalExtent[0]) { addItem(ordinalExtent[0]); } // Optimize: avoid generating large array by `ordinalScale.getTicks()`. var tickValue = startTick; for (; tickValue <= ordinalExtent[1]; tickValue += step) { addItem(tickValue); } if (includeMaxLabel && tickValue - step !== ordinalExtent[1]) { addItem(ordinalExtent[1]); } function addItem(tickValue) { var tickObj = { value: tickValue }; result.push(onlyTick ? tickValue : { formattedLabel: labelFormatter(tickObj), rawLabel: ordinalScale.getLabel(tickObj), tickValue: tickValue }); } return result; } function makeLabelsByCustomizedCategoryInterval(axis, categoryInterval, onlyTick) { var ordinalScale = axis.scale; var labelFormatter = makeLabelFormatter(axis); var result = []; core_util["each"](ordinalScale.getTicks(), function (tick) { var rawLabel = ordinalScale.getLabel(tick); var tickValue = tick.value; if (categoryInterval(tick.value, rawLabel)) { result.push(onlyTick ? tickValue : { formattedLabel: labelFormatter(tick), rawLabel: rawLabel, tickValue: tickValue }); } }); return result; } // CONCATENATED MODULE: ./node_modules/echarts/lib/coord/Axis.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 NORMALIZED_EXTENT = [0, 1]; /** * Base class of Axis. */ var Axis_Axis = /** @class */function () { function Axis(dim, scale, extent) { this.onBand = false; this.inverse = false; this.dim = dim; this.scale = scale; this._extent = extent || [0, 0]; } /** * If axis extent contain given coord */ Axis.prototype.contain = function (coord) { var extent = this._extent; var min = Math.min(extent[0], extent[1]); var max = Math.max(extent[0], extent[1]); return coord >= min && coord <= max; }; /** * If axis extent contain given data */ Axis.prototype.containData = function (data) { return this.scale.contain(data); }; /** * Get coord extent. */ Axis.prototype.getExtent = function () { return this._extent.slice(); }; /** * Get precision used for formatting */ Axis.prototype.getPixelPrecision = function (dataExtent) { return getPixelPrecision(dataExtent || this.scale.getExtent(), this._extent); }; /** * Set coord extent */ Axis.prototype.setExtent = function (start, end) { var extent = this._extent; extent[0] = start; extent[1] = end; }; /** * Convert data to coord. Data is the rank if it has an ordinal scale */ Axis.prototype.dataToCoord = function (data, clamp) { var extent = this._extent; var scale = this.scale; data = scale.normalize(data); if (this.onBand && scale.type === 'ordinal') { extent = extent.slice(); fixExtentWithBands(extent, scale.count()); } return linearMap(data, NORMALIZED_EXTENT, extent, clamp); }; /** * Convert coord to data. Data is the rank if it has an ordinal scale */ Axis.prototype.coordToData = function (coord, clamp) { var extent = this._extent; var scale = this.scale; if (this.onBand && scale.type === 'ordinal') { extent = extent.slice(); fixExtentWithBands(extent, scale.count()); } var t = linearMap(coord, extent, NORMALIZED_EXTENT, clamp); return this.scale.scale(t); }; /** * Convert pixel point to data in axis */ Axis.prototype.pointToData = function (point, clamp) { // Should be implemented in derived class if necessary. return; }; /** * Different from `zrUtil.map(axis.getTicks(), axis.dataToCoord, axis)`, * `axis.getTicksCoords` considers `onBand`, which is used by * `boundaryGap:true` of category axis and splitLine and splitArea. * @param opt.tickModel default: axis.model.getModel('axisTick') * @param opt.clamp If `true`, the first and the last * tick must be at the axis end points. Otherwise, clip ticks * that outside the axis extent. */ Axis.prototype.getTicksCoords = function (opt) { opt = opt || {}; var tickModel = opt.tickModel || this.getTickModel(); var result = createAxisTicks(this, tickModel); var ticks = result.ticks; var ticksCoords = Object(core_util["map"])(ticks, function (tickVal) { return { coord: this.dataToCoord(this.scale.type === 'ordinal' ? this.scale.getRawOrdinalNumber(tickVal) : tickVal), tickValue: tickVal }; }, this); var alignWithLabel = tickModel.get('alignWithLabel'); fixOnBandTicksCoords(this, ticksCoords, alignWithLabel, opt.clamp); return ticksCoords; }; Axis.prototype.getMinorTicksCoords = function () { if (this.scale.type === 'ordinal') { // Category axis doesn't support minor ticks return []; } var minorTickModel = this.model.getModel('minorTick'); var splitNumber = minorTickModel.get('splitNumber'); // Protection. if (!(splitNumber > 0 && splitNumber < 100)) { splitNumber = 5; } var minorTicks = this.scale.getMinorTicks(splitNumber); var minorTicksCoords = Object(core_util["map"])(minorTicks, function (minorTicksGroup) { return Object(core_util["map"])(minorTicksGroup, function (minorTick) { return { coord: this.dataToCoord(minorTick), tickValue: minorTick }; }, this); }, this); return minorTicksCoords; }; Axis.prototype.getViewLabels = function () { return createAxisLabels(this).labels; }; Axis.prototype.getLabelModel = function () { return this.model.getModel('axisLabel'); }; /** * Notice here we only get the default tick model. For splitLine * or splitArea, we should pass the splitLineModel or splitAreaModel * manually when calling `getTicksCoords`. * In GL, this method may be overridden to: * `axisModel.getModel('axisTick', grid3DModel.getModel('axisTick'));` */ Axis.prototype.getTickModel = function () { return this.model.getModel('axisTick'); }; /** * Get width of band */ Axis.prototype.getBandWidth = function () { var axisExtent = this._extent; var dataExtent = this.scale.getExtent(); var len = dataExtent[1] - dataExtent[0] + (this.onBand ? 1 : 0); // Fix #2728, avoid NaN when only one data. len === 0 && (len = 1); var size = Math.abs(axisExtent[1] - axisExtent[0]); return Math.abs(size) / len; }; /** * Only be called in category axis. * Can be overridden, consider other axes like in 3D. * @return Auto interval for cateogry axis tick and label */ Axis.prototype.calculateCategoryInterval = function () { return calculateCategoryInterval(this); }; return Axis; }(); function fixExtentWithBands(extent, nTick) { var size = extent[1] - extent[0]; var len = nTick; var margin = size / len / 2; extent[0] += margin; extent[1] -= margin; } // If axis has labels [1, 2, 3, 4]. Bands on the axis are // |---1---|---2---|---3---|---4---|. // So the displayed ticks and splitLine/splitArea should between // each data item, otherwise cause misleading (e.g., split tow bars // of a single data item when there are two bar series). // Also consider if tickCategoryInterval > 0 and onBand, ticks and // splitLine/spliteArea should layout appropriately corresponding // to displayed labels. (So we should not use `getBandWidth` in this // case). function fixOnBandTicksCoords(axis, ticksCoords, alignWithLabel, clamp) { var ticksLen = ticksCoords.length; if (!axis.onBand || alignWithLabel || !ticksLen) { return; } var axisExtent = axis.getExtent(); var last; var diffSize; if (ticksLen === 1) { ticksCoords[0].coord = axisExtent[0]; last = ticksCoords[1] = { coord: axisExtent[1], tickValue: ticksCoords[0].tickValue }; } else { var crossLen = ticksCoords[ticksLen - 1].tickValue - ticksCoords[0].tickValue; var shift_1 = (ticksCoords[ticksLen - 1].coord - ticksCoords[0].coord) / crossLen; Object(core_util["each"])(ticksCoords, function (ticksItem) { ticksItem.coord -= shift_1 / 2; }); var dataExtent = axis.scale.getExtent(); diffSize = 1 + dataExtent[1] - ticksCoords[ticksLen - 1].tickValue; last = { coord: ticksCoords[ticksLen - 1].coord + shift_1 * diffSize, tickValue: dataExtent[1] + 1 }; ticksCoords.push(last); } var inverse = axisExtent[0] > axisExtent[1]; // Handling clamp. if (littleThan(ticksCoords[0].coord, axisExtent[0])) { clamp ? ticksCoords[0].coord = axisExtent[0] : ticksCoords.shift(); } if (clamp && littleThan(axisExtent[0], ticksCoords[0].coord)) { ticksCoords.unshift({ coord: axisExtent[0] }); } if (littleThan(axisExtent[1], last.coord)) { clamp ? last.coord = axisExtent[1] : ticksCoords.pop(); } if (clamp && littleThan(last.coord, axisExtent[1])) { ticksCoords.push({ coord: axisExtent[1] }); } function littleThan(a, b) { // Avoid rounding error cause calculated tick coord different with extent. // It may cause an extra unnecessary tick added. a = round(a); b = round(b); return inverse ? a > b : a < b; } } /* harmony default export */ var coord_Axis = (Axis_Axis); // CONCATENATED MODULE: ./node_modules/echarts/lib/export/api.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ // These APIs are for more advanced usages // For example extend charts and components, creating graphic elements, formatting. // --------------------- Helper Methods --------------------- // --------------------- Export for Extension Usage --------------------- // export {SeriesData}; // TODO: Compatitable with exists echarts-gl code // Only for GL // --------------------- Deprecated Extension Methods --------------------- // Should use `ComponentModel.extend` or `class XXXX extend ComponentModel` to create class. // Then use `registerComponentModel` in `install` parameter when `use` this extension. For example: // class Bar3DModel extends ComponentModel {} // export function install(registers) { registers.registerComponentModel(Bar3DModel); } // echarts.use(install); function extendComponentModel(proto) { var Model = Component.extend(proto); Component.registerClass(Model); return Model; } function extendComponentView(proto) { var View = view_Component.extend(proto); view_Component.registerClass(View); return View; } function extendSeriesModel(proto) { var Model = Series.extend(proto); Series.registerClass(Model); return Model; } function extendChartView(proto) { var View = Chart.extend(proto); Chart.registerClass(View); return View; } // CONCATENATED MODULE: ./node_modules/echarts/lib/label/labelGuideHelper.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 labelGuideHelper_PI2 = Math.PI * 2; var labelGuideHelper_CMD = core_PathProxy.CMD; var DEFAULT_SEARCH_SPACE = ['top', 'right', 'bottom', 'left']; function getCandidateAnchor(pos, distance, rect, outPt, outDir) { var width = rect.width; var height = rect.height; switch (pos) { case 'top': outPt.set(rect.x + width / 2, rect.y - distance); outDir.set(0, -1); break; case 'bottom': outPt.set(rect.x + width / 2, rect.y + height + distance); outDir.set(0, 1); break; case 'left': outPt.set(rect.x - distance, rect.y + height / 2); outDir.set(-1, 0); break; case 'right': outPt.set(rect.x + width + distance, rect.y + height / 2); outDir.set(1, 0); break; } } function projectPointToArc(cx, cy, r, startAngle, endAngle, anticlockwise, x, y, out) { x -= cx; y -= cy; var d = Math.sqrt(x * x + y * y); x /= d; y /= d; // Intersect point. var ox = x * r + cx; var oy = y * r + cy; if (Math.abs(startAngle - endAngle) % labelGuideHelper_PI2 < 1e-4) { // Is a circle out[0] = ox; out[1] = oy; return d - r; } if (anticlockwise) { var tmp = startAngle; startAngle = normalizeRadian(endAngle); endAngle = normalizeRadian(tmp); } else { startAngle = normalizeRadian(startAngle); endAngle = normalizeRadian(endAngle); } if (startAngle > endAngle) { endAngle += labelGuideHelper_PI2; } var angle = Math.atan2(y, x); if (angle < 0) { angle += labelGuideHelper_PI2; } if (angle >= startAngle && angle <= endAngle || angle + labelGuideHelper_PI2 >= startAngle && angle + labelGuideHelper_PI2 <= endAngle) { // Project point is on the arc. out[0] = ox; out[1] = oy; return d - r; } var x1 = r * Math.cos(startAngle) + cx; var y1 = r * Math.sin(startAngle) + cy; var x2 = r * Math.cos(endAngle) + cx; var y2 = r * Math.sin(endAngle) + cy; var d1 = (x1 - x) * (x1 - x) + (y1 - y) * (y1 - y); var d2 = (x2 - x) * (x2 - x) + (y2 - y) * (y2 - y); if (d1 < d2) { out[0] = x1; out[1] = y1; return Math.sqrt(d1); } else { out[0] = x2; out[1] = y2; return Math.sqrt(d2); } } function projectPointToLine(x1, y1, x2, y2, x, y, out, limitToEnds) { var dx = x - x1; var dy = y - y1; var dx1 = x2 - x1; var dy1 = y2 - y1; var lineLen = Math.sqrt(dx1 * dx1 + dy1 * dy1); dx1 /= lineLen; dy1 /= lineLen; // dot product var projectedLen = dx * dx1 + dy * dy1; var t = projectedLen / lineLen; if (limitToEnds) { t = Math.min(Math.max(t, 0), 1); } t *= lineLen; var ox = out[0] = x1 + t * dx1; var oy = out[1] = y1 + t * dy1; return Math.sqrt((ox - x) * (ox - x) + (oy - y) * (oy - y)); } function projectPointToRect(x1, y1, width, height, x, y, out) { if (width < 0) { x1 = x1 + width; width = -width; } if (height < 0) { y1 = y1 + height; height = -height; } var x2 = x1 + width; var y2 = y1 + height; var ox = out[0] = Math.min(Math.max(x, x1), x2); var oy = out[1] = Math.min(Math.max(y, y1), y2); return Math.sqrt((ox - x) * (ox - x) + (oy - y) * (oy - y)); } var tmpPt = []; function nearestPointOnRect(pt, rect, out) { var dist = projectPointToRect(rect.x, rect.y, rect.width, rect.height, pt.x, pt.y, tmpPt); out.set(tmpPt[0], tmpPt[1]); return dist; } /** * Calculate min distance corresponding point. * This method won't evaluate if point is in the path. */ function nearestPointOnPath(pt, path, out) { var xi = 0; var yi = 0; var x0 = 0; var y0 = 0; var x1; var y1; var minDist = Infinity; var data = path.data; var x = pt.x; var y = pt.y; for (var i = 0; i < data.length;) { var cmd = data[i++]; if (i === 1) { xi = data[i]; yi = data[i + 1]; x0 = xi; y0 = yi; } var d = minDist; switch (cmd) { case labelGuideHelper_CMD.M: // moveTo 命令重新创建一个新的 subpath, 并且更新新的起点 // 在 closePath 的时候使用 x0 = data[i++]; y0 = data[i++]; xi = x0; yi = y0; break; case labelGuideHelper_CMD.L: d = projectPointToLine(xi, yi, data[i], data[i + 1], x, y, tmpPt, true); xi = data[i++]; yi = data[i++]; break; case labelGuideHelper_CMD.C: d = cubicProjectPoint(xi, yi, data[i++], data[i++], data[i++], data[i++], data[i], data[i + 1], x, y, tmpPt); xi = data[i++]; yi = data[i++]; break; case labelGuideHelper_CMD.Q: d = quadraticProjectPoint(xi, yi, data[i++], data[i++], data[i], data[i + 1], x, y, tmpPt); xi = data[i++]; yi = data[i++]; break; case labelGuideHelper_CMD.A: // TODO Arc 判断的开销比较大 var cx = data[i++]; var cy = data[i++]; var rx = data[i++]; var ry = data[i++]; var theta = data[i++]; var dTheta = data[i++]; // TODO Arc 旋转 i += 1; var anticlockwise = !!(1 - data[i++]); x1 = Math.cos(theta) * rx + cx; y1 = Math.sin(theta) * ry + cy; // 不是直接使用 arc 命令 if (i <= 1) { // 第一个命令起点还未定义 x0 = x1; y0 = y1; } // zr 使用scale来模拟椭圆, 这里也对x做一定的缩放 var _x = (x - cx) * ry / rx + cx; d = projectPointToArc(cx, cy, ry, theta, theta + dTheta, anticlockwise, _x, y, tmpPt); xi = Math.cos(theta + dTheta) * rx + cx; yi = Math.sin(theta + dTheta) * ry + cy; break; case labelGuideHelper_CMD.R: x0 = xi = data[i++]; y0 = yi = data[i++]; var width = data[i++]; var height = data[i++]; d = projectPointToRect(x0, y0, width, height, x, y, tmpPt); break; case labelGuideHelper_CMD.Z: d = projectPointToLine(xi, yi, x0, y0, x, y, tmpPt, true); xi = x0; yi = y0; break; } if (d < minDist) { minDist = d; out.set(tmpPt[0], tmpPt[1]); } } return minDist; } // Temporal variable for intermediate usage. var labelGuideHelper_pt0 = new core_Point(); var labelGuideHelper_pt1 = new core_Point(); var labelGuideHelper_pt2 = new core_Point(); var labelGuideHelper_dir = new core_Point(); var labelGuideHelper_dir2 = new core_Point(); /** * Calculate a proper guide line based on the label position and graphic element definition * @param label * @param labelRect * @param target * @param targetRect */ function updateLabelLinePoints(target, labelLineModel) { if (!target) { return; } var labelLine = target.getTextGuideLine(); var label = target.getTextContent(); // Needs to create text guide in each charts. if (!(label && labelLine)) { return; } var labelGuideConfig = target.textGuideLineConfig || {}; var points = [[0, 0], [0, 0], [0, 0]]; var searchSpace = labelGuideConfig.candidates || DEFAULT_SEARCH_SPACE; var labelRect = label.getBoundingRect().clone(); labelRect.applyTransform(label.getComputedTransform()); var minDist = Infinity; var anchorPoint = labelGuideConfig.anchor; var targetTransform = target.getComputedTransform(); var targetInversedTransform = targetTransform && matrix_invert([], targetTransform); var len = labelLineModel.get('length2') || 0; if (anchorPoint) { labelGuideHelper_pt2.copy(anchorPoint); } for (var i = 0; i < searchSpace.length; i++) { var candidate = searchSpace[i]; getCandidateAnchor(candidate, 0, labelRect, labelGuideHelper_pt0, labelGuideHelper_dir); core_Point.scaleAndAdd(labelGuideHelper_pt1, labelGuideHelper_pt0, labelGuideHelper_dir, len); // Transform to target coord space. labelGuideHelper_pt1.transform(targetInversedTransform); // Note: getBoundingRect will ensure the `path` being created. var boundingRect = target.getBoundingRect(); var dist = anchorPoint ? anchorPoint.distance(labelGuideHelper_pt1) : target instanceof graphic_Path ? nearestPointOnPath(labelGuideHelper_pt1, target.path, labelGuideHelper_pt2) : nearestPointOnRect(labelGuideHelper_pt1, boundingRect, labelGuideHelper_pt2); // TODO pt2 is in the path if (dist < minDist) { minDist = dist; // Transform back to global space. labelGuideHelper_pt1.transform(targetTransform); labelGuideHelper_pt2.transform(targetTransform); labelGuideHelper_pt2.toArray(points[0]); labelGuideHelper_pt1.toArray(points[1]); labelGuideHelper_pt0.toArray(points[2]); } } limitTurnAngle(points, labelLineModel.get('minTurnAngle')); labelLine.setShape({ points: points }); } // Temporal variable for the limitTurnAngle function var labelGuideHelper_tmpArr = []; var tmpProjPoint = new core_Point(); /** * Reduce the line segment attached to the label to limit the turn angle between two segments. * @param linePoints * @param minTurnAngle Radian of minimum turn angle. 0 - 180 */ function limitTurnAngle(linePoints, minTurnAngle) { if (!(minTurnAngle <= 180 && minTurnAngle > 0)) { return; } minTurnAngle = minTurnAngle / 180 * Math.PI; // The line points can be // /pt1----pt2 (label) // / // pt0/ labelGuideHelper_pt0.fromArray(linePoints[0]); labelGuideHelper_pt1.fromArray(linePoints[1]); labelGuideHelper_pt2.fromArray(linePoints[2]); core_Point.sub(labelGuideHelper_dir, labelGuideHelper_pt0, labelGuideHelper_pt1); core_Point.sub(labelGuideHelper_dir2, labelGuideHelper_pt2, labelGuideHelper_pt1); var len1 = labelGuideHelper_dir.len(); var len2 = labelGuideHelper_dir2.len(); if (len1 < 1e-3 || len2 < 1e-3) { return; } labelGuideHelper_dir.scale(1 / len1); labelGuideHelper_dir2.scale(1 / len2); var angleCos = labelGuideHelper_dir.dot(labelGuideHelper_dir2); var minTurnAngleCos = Math.cos(minTurnAngle); if (minTurnAngleCos < angleCos) { // Smaller than minTurnAngle // Calculate project point of pt0 on pt1-pt2 var d = projectPointToLine(labelGuideHelper_pt1.x, labelGuideHelper_pt1.y, labelGuideHelper_pt2.x, labelGuideHelper_pt2.y, labelGuideHelper_pt0.x, labelGuideHelper_pt0.y, labelGuideHelper_tmpArr, false); tmpProjPoint.fromArray(labelGuideHelper_tmpArr); // Calculate new projected length with limited minTurnAngle and get the new connect point tmpProjPoint.scaleAndAdd(labelGuideHelper_dir2, d / Math.tan(Math.PI - minTurnAngle)); // Limit the new calculated connect point between pt1 and pt2. var t = labelGuideHelper_pt2.x !== labelGuideHelper_pt1.x ? (tmpProjPoint.x - labelGuideHelper_pt1.x) / (labelGuideHelper_pt2.x - labelGuideHelper_pt1.x) : (tmpProjPoint.y - labelGuideHelper_pt1.y) / (labelGuideHelper_pt2.y - labelGuideHelper_pt1.y); if (isNaN(t)) { return; } if (t < 0) { core_Point.copy(tmpProjPoint, labelGuideHelper_pt1); } else if (t > 1) { core_Point.copy(tmpProjPoint, labelGuideHelper_pt2); } tmpProjPoint.toArray(linePoints[1]); } } /** * Limit the angle of line and the surface * @param maxSurfaceAngle Radian of minimum turn angle. 0 - 180. 0 is same direction to normal. 180 is opposite */ function limitSurfaceAngle(linePoints, surfaceNormal, maxSurfaceAngle) { if (!(maxSurfaceAngle <= 180 && maxSurfaceAngle > 0)) { return; } maxSurfaceAngle = maxSurfaceAngle / 180 * Math.PI; labelGuideHelper_pt0.fromArray(linePoints[0]); labelGuideHelper_pt1.fromArray(linePoints[1]); labelGuideHelper_pt2.fromArray(linePoints[2]); core_Point.sub(labelGuideHelper_dir, labelGuideHelper_pt1, labelGuideHelper_pt0); core_Point.sub(labelGuideHelper_dir2, labelGuideHelper_pt2, labelGuideHelper_pt1); var len1 = labelGuideHelper_dir.len(); var len2 = labelGuideHelper_dir2.len(); if (len1 < 1e-3 || len2 < 1e-3) { return; } labelGuideHelper_dir.scale(1 / len1); labelGuideHelper_dir2.scale(1 / len2); var angleCos = labelGuideHelper_dir.dot(surfaceNormal); var maxSurfaceAngleCos = Math.cos(maxSurfaceAngle); if (angleCos < maxSurfaceAngleCos) { // Calculate project point of pt0 on pt1-pt2 var d = projectPointToLine(labelGuideHelper_pt1.x, labelGuideHelper_pt1.y, labelGuideHelper_pt2.x, labelGuideHelper_pt2.y, labelGuideHelper_pt0.x, labelGuideHelper_pt0.y, labelGuideHelper_tmpArr, false); tmpProjPoint.fromArray(labelGuideHelper_tmpArr); var HALF_PI = Math.PI / 2; var angle2 = Math.acos(labelGuideHelper_dir2.dot(surfaceNormal)); var newAngle = HALF_PI + angle2 - maxSurfaceAngle; if (newAngle >= HALF_PI) { // parallel core_Point.copy(tmpProjPoint, labelGuideHelper_pt2); } else { // Calculate new projected length with limited minTurnAngle and get the new connect point tmpProjPoint.scaleAndAdd(labelGuideHelper_dir2, d / Math.tan(Math.PI / 2 - newAngle)); // Limit the new calculated connect point between pt1 and pt2. var t = labelGuideHelper_pt2.x !== labelGuideHelper_pt1.x ? (tmpProjPoint.x - labelGuideHelper_pt1.x) / (labelGuideHelper_pt2.x - labelGuideHelper_pt1.x) : (tmpProjPoint.y - labelGuideHelper_pt1.y) / (labelGuideHelper_pt2.y - labelGuideHelper_pt1.y); if (isNaN(t)) { return; } if (t < 0) { core_Point.copy(tmpProjPoint, labelGuideHelper_pt1); } else if (t > 1) { core_Point.copy(tmpProjPoint, labelGuideHelper_pt2); } } tmpProjPoint.toArray(linePoints[1]); } } function setLabelLineState(labelLine, ignore, stateName, stateModel) { var isNormal = stateName === 'normal'; var stateObj = isNormal ? labelLine : labelLine.ensureState(stateName); // Make sure display. stateObj.ignore = ignore; // Set smooth var smooth = stateModel.get('smooth'); if (smooth && smooth === true) { smooth = 0.3; } stateObj.shape = stateObj.shape || {}; if (smooth > 0) { stateObj.shape.smooth = smooth; } var styleObj = stateModel.getModel('lineStyle').getLineStyle(); isNormal ? labelLine.useStyle(styleObj) : stateObj.style = styleObj; } function buildLabelLinePath(path, shape) { var smooth = shape.smooth; var points = shape.points; if (!points) { return; } path.moveTo(points[0][0], points[0][1]); if (smooth > 0 && points.length >= 3) { var len1 = vector_dist(points[0], points[1]); var len2 = vector_dist(points[1], points[2]); if (!len1 || !len2) { path.lineTo(points[1][0], points[1][1]); path.lineTo(points[2][0], points[2][1]); return; } var moveLen = Math.min(len1, len2) * smooth; var midPoint0 = lerp([], points[1], points[0], moveLen / len1); var midPoint2 = lerp([], points[1], points[2], moveLen / len2); var midPoint1 = lerp([], midPoint0, midPoint2, 0.5); path.bezierCurveTo(midPoint0[0], midPoint0[1], midPoint0[0], midPoint0[1], midPoint1[0], midPoint1[1]); path.bezierCurveTo(midPoint2[0], midPoint2[1], midPoint2[0], midPoint2[1], points[2][0], points[2][1]); } else { for (var i = 1; i < points.length; i++) { path.lineTo(points[i][0], points[i][1]); } } } /** * Create a label line if necessary and set it's style. */ function setLabelLineStyle(targetEl, statesModels, defaultStyle) { var labelLine = targetEl.getTextGuideLine(); var label = targetEl.getTextContent(); if (!label) { // Not show label line if there is no label. if (labelLine) { targetEl.removeTextGuideLine(); } return; } var normalModel = statesModels.normal; var showNormal = normalModel.get('show'); var labelIgnoreNormal = label.ignore; for (var i = 0; i < DISPLAY_STATES.length; i++) { var stateName = DISPLAY_STATES[i]; var stateModel = statesModels[stateName]; var isNormal = stateName === 'normal'; if (stateModel) { var stateShow = stateModel.get('show'); var isLabelIgnored = isNormal ? labelIgnoreNormal : Object(core_util["retrieve2"])(label.states[stateName] && label.states[stateName].ignore, labelIgnoreNormal); if (isLabelIgnored // Not show when label is not shown in this state. || !Object(core_util["retrieve2"])(stateShow, showNormal) // Use normal state by default if not set. ) { var stateObj = isNormal ? labelLine : labelLine && labelLine.states[stateName]; if (stateObj) { stateObj.ignore = true; } if (!!labelLine) { setLabelLineState(labelLine, true, stateName, stateModel); } continue; } // Create labelLine if not exists if (!labelLine) { labelLine = new shape_Polyline(); targetEl.setTextGuideLine(labelLine); // Reset state of normal because it's new created. // NOTE: NORMAL should always been the first! if (!isNormal && (labelIgnoreNormal || !showNormal)) { setLabelLineState(labelLine, true, 'normal', statesModels.normal); } // Use same state proxy. if (targetEl.stateProxy) { labelLine.stateProxy = targetEl.stateProxy; } } setLabelLineState(labelLine, false, stateName, stateModel); } } if (labelLine) { Object(core_util["defaults"])(labelLine.style, defaultStyle); // Not fill. labelLine.style.fill = null; var showAbove = normalModel.get('showAbove'); var labelLineConfig = targetEl.textGuideLineConfig = targetEl.textGuideLineConfig || {}; labelLineConfig.showAbove = showAbove || false; // Custom the buildPath. labelLine.buildPath = buildLabelLinePath; } } function getLabelLineStatesModels(itemModel, labelLineName) { labelLineName = labelLineName || 'labelLine'; var statesModels = { normal: itemModel.getModel(labelLineName) }; for (var i = 0; i < SPECIAL_STATES.length; i++) { var stateName = SPECIAL_STATES[i]; statesModels[stateName] = itemModel.getModel([stateName, labelLineName]); } return statesModels; } // CONCATENATED MODULE: ./node_modules/echarts/lib/label/labelLayoutHelper.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 prepareLayoutList(input) { var list = []; for (var i = 0; i < input.length; i++) { var rawItem = input[i]; if (rawItem.defaultAttr.ignore) { continue; } var label = rawItem.label; var transform = label.getComputedTransform(); // NOTE: Get bounding rect after getComputedTransform, or label may not been updated by the host el. var localRect = label.getBoundingRect(); var isAxisAligned = !transform || transform[1] < 1e-5 && transform[2] < 1e-5; var minMargin = label.style.margin || 0; var globalRect = localRect.clone(); globalRect.applyTransform(transform); globalRect.x -= minMargin / 2; globalRect.y -= minMargin / 2; globalRect.width += minMargin; globalRect.height += minMargin; var obb = isAxisAligned ? new core_OrientedBoundingRect(localRect, transform) : null; list.push({ label: label, labelLine: rawItem.labelLine, rect: globalRect, localRect: localRect, obb: obb, priority: rawItem.priority, defaultAttr: rawItem.defaultAttr, layoutOption: rawItem.computedLayoutOption, axisAligned: isAxisAligned, transform: transform }); } return list; } function shiftLayout(list, xyDim, sizeDim, minBound, maxBound, balanceShift) { var len = list.length; if (len < 2) { return; } list.sort(function (a, b) { return a.rect[xyDim] - b.rect[xyDim]; }); var lastPos = 0; var delta; var adjusted = false; var shifts = []; var totalShifts = 0; for (var i = 0; i < len; i++) { var item = list[i]; var rect = item.rect; delta = rect[xyDim] - lastPos; if (delta < 0) { // shiftForward(i, len, -delta); rect[xyDim] -= delta; item.label[xyDim] -= delta; adjusted = true; } var shift = Math.max(-delta, 0); shifts.push(shift); totalShifts += shift; lastPos = rect[xyDim] + rect[sizeDim]; } if (totalShifts > 0 && balanceShift) { // Shift back to make the distribution more equally. shiftList(-totalShifts / len, 0, len); } // TODO bleedMargin? var first = list[0]; var last = list[len - 1]; var minGap; var maxGap; updateMinMaxGap(); // If ends exceed two bounds, squeeze at most 80%, then take the gap of two bounds. minGap < 0 && squeezeGaps(-minGap, 0.8); maxGap < 0 && squeezeGaps(maxGap, 0.8); updateMinMaxGap(); takeBoundsGap(minGap, maxGap, 1); takeBoundsGap(maxGap, minGap, -1); // Handle bailout when there is not enough space. updateMinMaxGap(); if (minGap < 0) { squeezeWhenBailout(-minGap); } if (maxGap < 0) { squeezeWhenBailout(maxGap); } function updateMinMaxGap() { minGap = first.rect[xyDim] - minBound; maxGap = maxBound - last.rect[xyDim] - last.rect[sizeDim]; } function takeBoundsGap(gapThisBound, gapOtherBound, moveDir) { if (gapThisBound < 0) { // Move from other gap if can. var moveFromMaxGap = Math.min(gapOtherBound, -gapThisBound); if (moveFromMaxGap > 0) { shiftList(moveFromMaxGap * moveDir, 0, len); var remained = moveFromMaxGap + gapThisBound; if (remained < 0) { squeezeGaps(-remained * moveDir, 1); } } else { squeezeGaps(-gapThisBound * moveDir, 1); } } } function shiftList(delta, start, end) { if (delta !== 0) { adjusted = true; } for (var i = start; i < end; i++) { var item = list[i]; var rect = item.rect; rect[xyDim] += delta; item.label[xyDim] += delta; } } // Squeeze gaps if the labels exceed margin. function squeezeGaps(delta, maxSqeezePercent) { var gaps = []; var totalGaps = 0; for (var i = 1; i < len; i++) { var prevItemRect = list[i - 1].rect; var gap = Math.max(list[i].rect[xyDim] - prevItemRect[xyDim] - prevItemRect[sizeDim], 0); gaps.push(gap); totalGaps += gap; } if (!totalGaps) { return; } var squeezePercent = Math.min(Math.abs(delta) / totalGaps, maxSqeezePercent); if (delta > 0) { for (var i = 0; i < len - 1; i++) { // Distribute the shift delta to all gaps. var movement = gaps[i] * squeezePercent; // Forward shiftList(movement, 0, i + 1); } } else { // Backward for (var i = len - 1; i > 0; i--) { // Distribute the shift delta to all gaps. var movement = gaps[i - 1] * squeezePercent; shiftList(-movement, i, len); } } } /** * Squeeze to allow overlap if there is no more space available. * Let other overlapping strategy like hideOverlap do the job instead of keep exceeding the bounds. */ function squeezeWhenBailout(delta) { var dir = delta < 0 ? -1 : 1; delta = Math.abs(delta); var moveForEachLabel = Math.ceil(delta / (len - 1)); for (var i = 0; i < len - 1; i++) { if (dir > 0) { // Forward shiftList(moveForEachLabel, 0, i + 1); } else { // Backward shiftList(-moveForEachLabel, len - i - 1, len); } delta -= moveForEachLabel; if (delta <= 0) { return; } } } return adjusted; } /** * Adjust labels on x direction to avoid overlap. */ function shiftLayoutOnX(list, leftBound, rightBound, // If average the shifts on all labels and add them to 0 // TODO: Not sure if should enable it. // Pros: The angle of lines will distribute more equally // Cons: In some layout. It may not what user wanted. like in pie. the label of last sector is usually changed unexpectedly. balanceShift) { return shiftLayout(list, 'x', 'width', leftBound, rightBound, balanceShift); } /** * Adjust labels on y direction to avoid overlap. */ function shiftLayoutOnY(list, topBound, bottomBound, // If average the shifts on all labels and add them to 0 balanceShift) { return shiftLayout(list, 'y', 'height', topBound, bottomBound, balanceShift); } function hideOverlap(labelList) { var displayedLabels = []; // TODO, render overflow visible first, put in the displayedLabels. labelList.sort(function (a, b) { return b.priority - a.priority; }); var globalRect = new core_BoundingRect(0, 0, 0, 0); function hideEl(el) { if (!el.ignore) { // Show on emphasis. var emphasisState = el.ensureState('emphasis'); if (emphasisState.ignore == null) { emphasisState.ignore = false; } } el.ignore = true; } for (var i = 0; i < labelList.length; i++) { var labelItem = labelList[i]; var isAxisAligned = labelItem.axisAligned; var localRect = labelItem.localRect; var transform = labelItem.transform; var label = labelItem.label; var labelLine = labelItem.labelLine; globalRect.copy(labelItem.rect); // Add a threshold because layout may be aligned precisely. globalRect.width -= 0.1; globalRect.height -= 0.1; globalRect.x += 0.05; globalRect.y += 0.05; var obb = labelItem.obb; var overlapped = false; for (var j = 0; j < displayedLabels.length; j++) { var existsTextCfg = displayedLabels[j]; // Fast rejection. if (!globalRect.intersect(existsTextCfg.rect)) { continue; } if (isAxisAligned && existsTextCfg.axisAligned) { // Is overlapped overlapped = true; break; } if (!existsTextCfg.obb) { // If self is not axis aligned. But other is. existsTextCfg.obb = new core_OrientedBoundingRect(existsTextCfg.localRect, existsTextCfg.transform); } if (!obb) { // If self is axis aligned. But other is not. obb = new core_OrientedBoundingRect(localRect, transform); } if (obb.intersect(existsTextCfg.obb)) { overlapped = true; break; } } // TODO Callback to determine if this overlap should be handled? if (overlapped) { hideEl(label); labelLine && hideEl(labelLine); } else { label.attr('ignore', labelItem.defaultAttr.ignore); labelLine && labelLine.attr('ignore', labelItem.defaultAttr.labelGuideIgnore); displayedLabels.push(labelItem); } } } // CONCATENATED MODULE: ./node_modules/echarts/lib/label/LabelManager.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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: move labels out of viewport. function cloneArr(points) { if (points) { var newPoints = []; for (var i = 0; i < points.length; i++) { newPoints.push(points[i].slice()); } return newPoints; } } function prepareLayoutCallbackParams(labelItem, hostEl) { var label = labelItem.label; var labelLine = hostEl && hostEl.getTextGuideLine(); return { dataIndex: labelItem.dataIndex, dataType: labelItem.dataType, seriesIndex: labelItem.seriesModel.seriesIndex, text: labelItem.label.style.text, rect: labelItem.hostRect, labelRect: labelItem.rect, // x: labelAttr.x, // y: labelAttr.y, align: label.style.align, verticalAlign: label.style.verticalAlign, labelLinePoints: cloneArr(labelLine && labelLine.shape.points) }; } var LABEL_OPTION_TO_STYLE_KEYS = ['align', 'verticalAlign', 'width', 'height', 'fontSize']; var LabelManager_dummyTransformable = new core_Transformable(); var labelLayoutInnerStore = makeInner(); var labelLineAnimationStore = makeInner(); function extendWithKeys(target, source, keys) { for (var i = 0; i < keys.length; i++) { var key = keys[i]; if (source[key] != null) { target[key] = source[key]; } } } var LABEL_LAYOUT_PROPS = ['x', 'y', 'rotation']; var LabelManager_LabelManager = /** @class */function () { function LabelManager() { this._labelList = []; this._chartViewList = []; } LabelManager.prototype.clearLabels = function () { this._labelList = []; this._chartViewList = []; }; /** * Add label to manager */ LabelManager.prototype._addLabel = function (dataIndex, dataType, seriesModel, label, layoutOption) { var labelStyle = label.style; var hostEl = label.__hostTarget; var textConfig = hostEl.textConfig || {}; // TODO: If label is in other state. var labelTransform = label.getComputedTransform(); var labelRect = label.getBoundingRect().plain(); core_BoundingRect.applyTransform(labelRect, labelRect, labelTransform); if (labelTransform) { LabelManager_dummyTransformable.setLocalTransform(labelTransform); } else { // Identity transform. LabelManager_dummyTransformable.x = LabelManager_dummyTransformable.y = LabelManager_dummyTransformable.rotation = LabelManager_dummyTransformable.originX = LabelManager_dummyTransformable.originY = 0; LabelManager_dummyTransformable.scaleX = LabelManager_dummyTransformable.scaleY = 1; } LabelManager_dummyTransformable.rotation = normalizeRadian(LabelManager_dummyTransformable.rotation); var host = label.__hostTarget; var hostRect; if (host) { hostRect = host.getBoundingRect().plain(); var transform = host.getComputedTransform(); core_BoundingRect.applyTransform(hostRect, hostRect, transform); } var labelGuide = hostRect && host.getTextGuideLine(); this._labelList.push({ label: label, labelLine: labelGuide, seriesModel: seriesModel, dataIndex: dataIndex, dataType: dataType, layoutOption: layoutOption, computedLayoutOption: null, rect: labelRect, hostRect: hostRect, // Label with lower priority will be hidden when overlapped // Use rect size as default priority priority: hostRect ? hostRect.width * hostRect.height : 0, // Save default label attributes. // For restore if developers want get back to default value in callback. defaultAttr: { ignore: label.ignore, labelGuideIgnore: labelGuide && labelGuide.ignore, x: LabelManager_dummyTransformable.x, y: LabelManager_dummyTransformable.y, scaleX: LabelManager_dummyTransformable.scaleX, scaleY: LabelManager_dummyTransformable.scaleY, rotation: LabelManager_dummyTransformable.rotation, style: { x: labelStyle.x, y: labelStyle.y, align: labelStyle.align, verticalAlign: labelStyle.verticalAlign, width: labelStyle.width, height: labelStyle.height, fontSize: labelStyle.fontSize }, cursor: label.cursor, attachedPos: textConfig.position, attachedRot: textConfig.rotation } }); }; LabelManager.prototype.addLabelsOfSeries = function (chartView) { var _this = this; this._chartViewList.push(chartView); var seriesModel = chartView.__model; var layoutOption = seriesModel.get('labelLayout'); /** * Ignore layouting if it's not specified anything. */ if (!(Object(core_util["isFunction"])(layoutOption) || Object(core_util["keys"])(layoutOption).length)) { return; } chartView.group.traverse(function (child) { if (child.ignore) { return true; // Stop traverse descendants. } // Only support label being hosted on graphic elements. var textEl = child.getTextContent(); var ecData = getECData(child); // Can only attach the text on the element with dataIndex if (textEl && !textEl.disableLabelLayout) { _this._addLabel(ecData.dataIndex, ecData.dataType, seriesModel, textEl, layoutOption); } }); }; LabelManager.prototype.updateLayoutConfig = function (api) { var width = api.getWidth(); var height = api.getHeight(); function createDragHandler(el, labelLineModel) { return function () { updateLabelLinePoints(el, labelLineModel); }; } for (var i = 0; i < this._labelList.length; i++) { var labelItem = this._labelList[i]; var label = labelItem.label; var hostEl = label.__hostTarget; var defaultLabelAttr = labelItem.defaultAttr; var layoutOption = void 0; // TODO A global layout option? if (Object(core_util["isFunction"])(labelItem.layoutOption)) { layoutOption = labelItem.layoutOption(prepareLayoutCallbackParams(labelItem, hostEl)); } else { layoutOption = labelItem.layoutOption; } layoutOption = layoutOption || {}; labelItem.computedLayoutOption = layoutOption; var degreeToRadian = Math.PI / 180; // TODO hostEl should always exists. // Or label should not have parent because the x, y is all in global space. if (hostEl) { hostEl.setTextConfig({ // Force to set local false. local: false, // Ignore position and rotation config on the host el if x or y is changed. position: layoutOption.x != null || layoutOption.y != null ? null : defaultLabelAttr.attachedPos, // Ignore rotation config on the host el if rotation is changed. rotation: layoutOption.rotate != null ? layoutOption.rotate * degreeToRadian : defaultLabelAttr.attachedRot, offset: [layoutOption.dx || 0, layoutOption.dy || 0] }); } var needsUpdateLabelLine = false; if (layoutOption.x != null) { // TODO width of chart view. label.x = number_parsePercent(layoutOption.x, width); label.setStyle('x', 0); // Ignore movement in style. TODO: origin. needsUpdateLabelLine = true; } else { label.x = defaultLabelAttr.x; label.setStyle('x', defaultLabelAttr.style.x); } if (layoutOption.y != null) { // TODO height of chart view. label.y = number_parsePercent(layoutOption.y, height); label.setStyle('y', 0); // Ignore movement in style. needsUpdateLabelLine = true; } else { label.y = defaultLabelAttr.y; label.setStyle('y', defaultLabelAttr.style.y); } if (layoutOption.labelLinePoints) { var guideLine = hostEl.getTextGuideLine(); if (guideLine) { guideLine.setShape({ points: layoutOption.labelLinePoints }); // Not update needsUpdateLabelLine = false; } } var labelLayoutStore = labelLayoutInnerStore(label); labelLayoutStore.needsUpdateLabelLine = needsUpdateLabelLine; label.rotation = layoutOption.rotate != null ? layoutOption.rotate * degreeToRadian : defaultLabelAttr.rotation; label.scaleX = defaultLabelAttr.scaleX; label.scaleY = defaultLabelAttr.scaleY; for (var k = 0; k < LABEL_OPTION_TO_STYLE_KEYS.length; k++) { var key = LABEL_OPTION_TO_STYLE_KEYS[k]; label.setStyle(key, layoutOption[key] != null ? layoutOption[key] : defaultLabelAttr.style[key]); } if (layoutOption.draggable) { label.draggable = true; label.cursor = 'move'; if (hostEl) { var hostModel = labelItem.seriesModel; if (labelItem.dataIndex != null) { var data = labelItem.seriesModel.getData(labelItem.dataType); hostModel = data.getItemModel(labelItem.dataIndex); } label.on('drag', createDragHandler(hostEl, hostModel.getModel('labelLine'))); } } else { // TODO Other drag functions? label.off('drag'); label.cursor = defaultLabelAttr.cursor; } } }; LabelManager.prototype.layout = function (api) { var width = api.getWidth(); var height = api.getHeight(); var labelList = prepareLayoutList(this._labelList); var labelsNeedsAdjustOnX = Object(core_util["filter"])(labelList, function (item) { return item.layoutOption.moveOverlap === 'shiftX'; }); var labelsNeedsAdjustOnY = Object(core_util["filter"])(labelList, function (item) { return item.layoutOption.moveOverlap === 'shiftY'; }); shiftLayoutOnX(labelsNeedsAdjustOnX, 0, width); shiftLayoutOnY(labelsNeedsAdjustOnY, 0, height); var labelsNeedsHideOverlap = Object(core_util["filter"])(labelList, function (item) { return item.layoutOption.hideOverlap; }); hideOverlap(labelsNeedsHideOverlap); }; /** * Process all labels. Not only labels with layoutOption. */ LabelManager.prototype.processLabelsOverall = function () { var _this = this; Object(core_util["each"])(this._chartViewList, function (chartView) { var seriesModel = chartView.__model; var ignoreLabelLineUpdate = chartView.ignoreLabelLineUpdate; var animationEnabled = seriesModel.isAnimationEnabled(); chartView.group.traverse(function (child) { if (child.ignore && !child.forceLabelAnimation) { return true; // Stop traverse descendants. } var needsUpdateLabelLine = !ignoreLabelLineUpdate; var label = child.getTextContent(); if (!needsUpdateLabelLine && label) { needsUpdateLabelLine = labelLayoutInnerStore(label).needsUpdateLabelLine; } if (needsUpdateLabelLine) { _this._updateLabelLine(child, seriesModel); } if (animationEnabled) { _this._animateLabels(child, seriesModel); } }); }); }; LabelManager.prototype._updateLabelLine = function (el, seriesModel) { // Only support label being hosted on graphic elements. var textEl = el.getTextContent(); // Update label line style. var ecData = getECData(el); var dataIndex = ecData.dataIndex; // Only support labelLine on the labels represent data. if (textEl && dataIndex != null) { var data = seriesModel.getData(ecData.dataType); var itemModel = data.getItemModel(dataIndex); var defaultStyle = {}; var visualStyle = data.getItemVisual(dataIndex, 'style'); if (visualStyle) { var visualType = data.getVisual('drawType'); // Default to be same with main color defaultStyle.stroke = visualStyle[visualType]; } var labelLineModel = itemModel.getModel('labelLine'); setLabelLineStyle(el, getLabelLineStatesModels(itemModel), defaultStyle); updateLabelLinePoints(el, labelLineModel); } }; LabelManager.prototype._animateLabels = function (el, seriesModel) { var textEl = el.getTextContent(); var guideLine = el.getTextGuideLine(); // Animate if (textEl // `forceLabelAnimation` has the highest priority && (el.forceLabelAnimation || !textEl.ignore && !textEl.invisible && !el.disableLabelAnimation && !isElementRemoved(el))) { var layoutStore = labelLayoutInnerStore(textEl); var oldLayout = layoutStore.oldLayout; var ecData = getECData(el); var dataIndex = ecData.dataIndex; var newProps = { x: textEl.x, y: textEl.y, rotation: textEl.rotation }; var data = seriesModel.getData(ecData.dataType); if (!oldLayout) { textEl.attr(newProps); // Disable fade in animation if value animation is enabled. if (!labelInner(textEl).valueAnimation) { var oldOpacity = Object(core_util["retrieve2"])(textEl.style.opacity, 1); // Fade in animation textEl.style.opacity = 0; initProps(textEl, { style: { opacity: oldOpacity } }, seriesModel, dataIndex); } } else { textEl.attr(oldLayout); // Make sure the animation from is in the right status. var prevStates = el.prevStates; if (prevStates) { if (Object(core_util["indexOf"])(prevStates, 'select') >= 0) { textEl.attr(layoutStore.oldLayoutSelect); } if (Object(core_util["indexOf"])(prevStates, 'emphasis') >= 0) { textEl.attr(layoutStore.oldLayoutEmphasis); } } updateProps(textEl, newProps, seriesModel, dataIndex); } layoutStore.oldLayout = newProps; if (textEl.states.select) { var layoutSelect = layoutStore.oldLayoutSelect = {}; extendWithKeys(layoutSelect, newProps, LABEL_LAYOUT_PROPS); extendWithKeys(layoutSelect, textEl.states.select, LABEL_LAYOUT_PROPS); } if (textEl.states.emphasis) { var layoutEmphasis = layoutStore.oldLayoutEmphasis = {}; extendWithKeys(layoutEmphasis, newProps, LABEL_LAYOUT_PROPS); extendWithKeys(layoutEmphasis, textEl.states.emphasis, LABEL_LAYOUT_PROPS); } animateLabelValue(textEl, dataIndex, data, seriesModel, seriesModel); } if (guideLine && !guideLine.ignore && !guideLine.invisible) { var layoutStore = labelLineAnimationStore(guideLine); var oldLayout = layoutStore.oldLayout; var newLayout = { points: guideLine.shape.points }; if (!oldLayout) { guideLine.setShape(newLayout); guideLine.style.strokePercent = 0; initProps(guideLine, { style: { strokePercent: 1 } }, seriesModel); } else { guideLine.attr({ shape: oldLayout }); updateProps(guideLine, { shape: newLayout }, seriesModel); } layoutStore.oldLayout = newLayout; } }; return LabelManager; }(); /* harmony default export */ var label_LabelManager = (LabelManager_LabelManager); // CONCATENATED MODULE: ./node_modules/echarts/lib/label/installLabelLayout.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 getLabelManager = makeInner(); function installLabelLayout(registers) { registers.registerUpdateLifecycle('series:beforeupdate', function (ecModel, api, params) { // TODO api provide an namespace that can save stuff per instance var labelManager = getLabelManager(api).labelManager; if (!labelManager) { labelManager = getLabelManager(api).labelManager = new label_LabelManager(); } labelManager.clearLabels(); }); registers.registerUpdateLifecycle('series:layoutlabels', function (ecModel, api, params) { var labelManager = getLabelManager(api).labelManager; params.updatedSeries.forEach(function (series) { labelManager.addLabelsOfSeries(api.getViewOfSeriesModel(series)); }); labelManager.updateLayoutConfig(api); labelManager.layout(api); labelManager.processLabelsOverall(); }); } // CONCATENATED MODULE: ./node_modules/echarts/lib/export/core.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ // Core API from echarts/src/echarts // Import label layout by default. // TODO will be treeshaked. use(installLabelLayout); // CONCATENATED MODULE: ./node_modules/zrender/lib/svg/SVGPathRebuilder.js var SVGPathRebuilder_mathSin = Math.sin; var SVGPathRebuilder_mathCos = Math.cos; var SVGPathRebuilder_PI = Math.PI; var SVGPathRebuilder_PI2 = Math.PI * 2; var degree = 180 / SVGPathRebuilder_PI; var SVGPathRebuilder_SVGPathRebuilder = (function () { function SVGPathRebuilder() { } SVGPathRebuilder.prototype.reset = function (precision) { this._start = true; this._d = []; this._str = ''; this._p = Math.pow(10, precision || 4); }; SVGPathRebuilder.prototype.moveTo = function (x, y) { this._add('M', x, y); }; SVGPathRebuilder.prototype.lineTo = function (x, y) { this._add('L', x, y); }; SVGPathRebuilder.prototype.bezierCurveTo = function (x, y, x2, y2, x3, y3) { this._add('C', x, y, x2, y2, x3, y3); }; SVGPathRebuilder.prototype.quadraticCurveTo = function (x, y, x2, y2) { this._add('Q', x, y, x2, y2); }; SVGPathRebuilder.prototype.arc = function (cx, cy, r, startAngle, endAngle, anticlockwise) { this.ellipse(cx, cy, r, r, 0, startAngle, endAngle, anticlockwise); }; SVGPathRebuilder.prototype.ellipse = function (cx, cy, rx, ry, psi, startAngle, endAngle, anticlockwise) { var dTheta = endAngle - startAngle; var clockwise = !anticlockwise; var dThetaPositive = Math.abs(dTheta); var isCircle = Object(helper["j" /* isAroundZero */])(dThetaPositive - SVGPathRebuilder_PI2) || (clockwise ? dTheta >= SVGPathRebuilder_PI2 : -dTheta >= SVGPathRebuilder_PI2); var unifiedTheta = dTheta > 0 ? dTheta % SVGPathRebuilder_PI2 : (dTheta % SVGPathRebuilder_PI2 + SVGPathRebuilder_PI2); var large = false; if (isCircle) { large = true; } else if (Object(helper["j" /* isAroundZero */])(dThetaPositive)) { large = false; } else { large = (unifiedTheta >= SVGPathRebuilder_PI) === !!clockwise; } var x0 = cx + rx * SVGPathRebuilder_mathCos(startAngle); var y0 = cy + ry * SVGPathRebuilder_mathSin(startAngle); if (this._start) { this._add('M', x0, y0); } var xRot = Math.round(psi * degree); if (isCircle) { var p = 1 / this._p; var dTheta_1 = (clockwise ? 1 : -1) * (SVGPathRebuilder_PI2 - p); this._add('A', rx, ry, xRot, 1, +clockwise, cx + rx * SVGPathRebuilder_mathCos(startAngle + dTheta_1), cy + ry * SVGPathRebuilder_mathSin(startAngle + dTheta_1)); if (p > 1e-2) { this._add('A', rx, ry, xRot, 0, +clockwise, x0, y0); } } else { var x = cx + rx * SVGPathRebuilder_mathCos(endAngle); var y = cy + ry * SVGPathRebuilder_mathSin(endAngle); this._add('A', rx, ry, xRot, +large, +clockwise, x, y); } }; SVGPathRebuilder.prototype.rect = function (x, y, w, h) { this._add('M', x, y); this._add('l', w, 0); this._add('l', 0, h); this._add('l', -w, 0); this._add('Z'); }; SVGPathRebuilder.prototype.closePath = function () { if (this._d.length > 0) { this._add('Z'); } }; SVGPathRebuilder.prototype._add = function (cmd, a, b, c, d, e, f, g, h) { var vals = []; var p = this._p; for (var i = 1; i < arguments.length; i++) { var val = arguments[i]; if (isNaN(val)) { this._invalid = true; return; } vals.push(Math.round(val * p) / p); } this._d.push(cmd + vals.join(' ')); this._start = cmd === 'Z'; }; SVGPathRebuilder.prototype.generateStr = function () { this._str = this._invalid ? '' : this._d.join(''); this._d = []; }; SVGPathRebuilder.prototype.getStr = function () { return this._str; }; return SVGPathRebuilder; }()); /* harmony default export */ var svg_SVGPathRebuilder = (SVGPathRebuilder_SVGPathRebuilder); // CONCATENATED MODULE: ./node_modules/zrender/lib/svg/mapStyleToAttrs.js var NONE = 'none'; var mathRound = Math.round; function pathHasFill(style) { var fill = style.fill; return fill != null && fill !== NONE; } function pathHasStroke(style) { var stroke = style.stroke; return stroke != null && stroke !== NONE; } var strokeProps = ['lineCap', 'miterLimit', 'lineJoin']; var svgStrokeProps = Object(core_util["map"])(strokeProps, function (prop) { return "stroke-" + prop.toLowerCase(); }); function mapStyleToAttrs(updateAttr, style, el, forceUpdate) { var opacity = style.opacity == null ? 1 : style.opacity; if (el instanceof graphic_Image) { updateAttr('opacity', opacity); return; } if (pathHasFill(style)) { var fill = Object(helper["p" /* normalizeColor */])(style.fill); updateAttr('fill', fill.color); var fillOpacity = style.fillOpacity != null ? style.fillOpacity * fill.opacity * opacity : fill.opacity * opacity; if (forceUpdate || fillOpacity < 1) { updateAttr('fill-opacity', fillOpacity); } } else { updateAttr('fill', NONE); } if (pathHasStroke(style)) { var stroke = Object(helper["p" /* normalizeColor */])(style.stroke); updateAttr('stroke', stroke.color); var strokeScale = style.strokeNoScale ? el.getLineScale() : 1; var strokeWidth = (strokeScale ? (style.lineWidth || 0) / strokeScale : 0); var strokeOpacity = style.strokeOpacity != null ? style.strokeOpacity * stroke.opacity * opacity : stroke.opacity * opacity; var strokeFirst = style.strokeFirst; if (forceUpdate || strokeWidth !== 1) { updateAttr('stroke-width', strokeWidth); } if (forceUpdate || strokeFirst) { updateAttr('paint-order', strokeFirst ? 'stroke' : 'fill'); } if (forceUpdate || strokeOpacity < 1) { updateAttr('stroke-opacity', strokeOpacity); } if (style.lineDash) { var _a = getLineDash(el), lineDash = _a[0], lineDashOffset = _a[1]; if (lineDash) { lineDashOffset = mathRound(lineDashOffset || 0); updateAttr('stroke-dasharray', lineDash.join(',')); if (lineDashOffset || forceUpdate) { updateAttr('stroke-dashoffset', lineDashOffset); } } } else if (forceUpdate) { updateAttr('stroke-dasharray', NONE); } for (var i = 0; i < strokeProps.length; i++) { var propName = strokeProps[i]; if (forceUpdate || style[propName] !== DEFAULT_PATH_STYLE[propName]) { var val = style[propName] || DEFAULT_PATH_STYLE[propName]; val && updateAttr(svgStrokeProps[i], val); } } } else if (forceUpdate) { updateAttr('stroke', NONE); } } // CONCATENATED MODULE: ./node_modules/zrender/lib/svg/core.js var SVGNS = 'http://www.w3.org/2000/svg'; var XLINKNS = 'http://www.w3.org/1999/xlink'; var XMLNS = 'http://www.w3.org/2000/xmlns/'; var XML_NAMESPACE = 'http://www.w3.org/XML/1998/namespace'; var META_DATA_PREFIX = 'ecmeta_'; function createElement(name) { return document.createElementNS(SVGNS, name); } ; function createVNode(tag, key, attrs, children, text) { return { tag: tag, attrs: attrs || {}, children: children, text: text, key: key }; } function createElementOpen(name, attrs) { var attrsStr = []; if (attrs) { for (var key in attrs) { var val = attrs[key]; var part = key; if (val === false) { continue; } else if (val !== true && val != null) { part += "=\"" + val + "\""; } attrsStr.push(part); } } return "<" + name + " " + attrsStr.join(' ') + ">"; } function createElementClose(name) { return ""; } function vNodeToString(el, opts) { opts = opts || {}; var S = opts.newline ? '\n' : ''; function convertElToString(el) { var children = el.children, tag = el.tag, attrs = el.attrs, text = el.text; return createElementOpen(tag, attrs) + (tag !== 'style' ? encodeHTML(text) : text || '') + (children ? "" + S + Object(core_util["map"])(children, function (child) { return convertElToString(child); }).join(S) + S : '') + createElementClose(tag); } return convertElToString(el); } function getCssString(selectorNodes, animationNodes, opts) { opts = opts || {}; var S = opts.newline ? '\n' : ''; var bracketBegin = " {" + S; var bracketEnd = S + "}"; var selectors = Object(core_util["map"])(Object(core_util["keys"])(selectorNodes), function (className) { return className + bracketBegin + Object(core_util["map"])(Object(core_util["keys"])(selectorNodes[className]), function (attrName) { return attrName + ":" + selectorNodes[className][attrName] + ";"; }).join(S) + bracketEnd; }).join(S); var animations = Object(core_util["map"])(Object(core_util["keys"])(animationNodes), function (animationName) { return "@keyframes " + animationName + bracketBegin + Object(core_util["map"])(Object(core_util["keys"])(animationNodes[animationName]), function (percent) { return percent + bracketBegin + Object(core_util["map"])(Object(core_util["keys"])(animationNodes[animationName][percent]), function (attrName) { var val = animationNodes[animationName][percent][attrName]; if (attrName === 'd') { val = "path(\"" + val + "\")"; } return attrName + ":" + val + ";"; }).join(S) + bracketEnd; }).join(S) + bracketEnd; }).join(S); if (!selectors && !animations) { return ''; } return [''].join(S); } function createBrushScope(zrId) { return { zrId: zrId, shadowCache: {}, patternCache: {}, gradientCache: {}, clipPathCache: {}, defs: {}, cssNodes: {}, cssAnims: {}, cssStyleCache: {}, cssAnimIdx: 0, shadowIdx: 0, gradientIdx: 0, patternIdx: 0, clipPathIdx: 0 }; } function createSVGVNode(width, height, children, useViewBox) { return createVNode('svg', 'root', { 'width': width, 'height': height, 'xmlns': SVGNS, 'xmlns:xlink': XLINKNS, 'version': '1.1', 'baseProfile': 'full', 'viewBox': useViewBox ? "0 0 " + width + " " + height : false }, children); } // CONCATENATED MODULE: ./node_modules/zrender/lib/svg/cssClassId.js var cssClassIdx = 0; function getClassId() { return cssClassIdx++; } // CONCATENATED MODULE: ./node_modules/zrender/lib/svg/cssAnimation.js var EASING_MAP = { cubicIn: '0.32,0,0.67,0', cubicOut: '0.33,1,0.68,1', cubicInOut: '0.65,0,0.35,1', quadraticIn: '0.11,0,0.5,0', quadraticOut: '0.5,1,0.89,1', quadraticInOut: '0.45,0,0.55,1', quarticIn: '0.5,0,0.75,0', quarticOut: '0.25,1,0.5,1', quarticInOut: '0.76,0,0.24,1', quinticIn: '0.64,0,0.78,0', quinticOut: '0.22,1,0.36,1', quinticInOut: '0.83,0,0.17,1', sinusoidalIn: '0.12,0,0.39,0', sinusoidalOut: '0.61,1,0.88,1', sinusoidalInOut: '0.37,0,0.63,1', exponentialIn: '0.7,0,0.84,0', exponentialOut: '0.16,1,0.3,1', exponentialInOut: '0.87,0,0.13,1', circularIn: '0.55,0,1,0.45', circularOut: '0,0.55,0.45,1', circularInOut: '0.85,0,0.15,1' }; var transformOriginKey = 'transform-origin'; function buildPathString(el, kfShape, path) { var shape = Object(core_util["extend"])({}, el.shape); Object(core_util["extend"])(shape, kfShape); el.buildPath(path, shape); var svgPathBuilder = new svg_SVGPathRebuilder(); svgPathBuilder.reset(Object(helper["f" /* getPathPrecision */])(el)); path.rebuildPath(svgPathBuilder, 1); svgPathBuilder.generateStr(); return svgPathBuilder.getStr(); } function setTransformOrigin(target, transform) { var originX = transform.originX, originY = transform.originY; if (originX || originY) { target[transformOriginKey] = originX + "px " + originY + "px"; } } var ANIMATE_STYLE_MAP = { fill: 'fill', opacity: 'opacity', lineWidth: 'stroke-width', lineDashOffset: 'stroke-dashoffset' }; function addAnimation(cssAnim, scope) { var animationName = scope.zrId + '-ani-' + scope.cssAnimIdx++; scope.cssAnims[animationName] = cssAnim; return animationName; } function createCompoundPathCSSAnimation(el, attrs, scope) { var paths = el.shape.paths; var composedAnim = {}; var cssAnimationCfg; var cssAnimationName; Object(core_util["each"])(paths, function (path) { var subScope = createBrushScope(scope.zrId); subScope.animation = true; createCSSAnimation(path, {}, subScope, true); var cssAnims = subScope.cssAnims; var cssNodes = subScope.cssNodes; var animNames = Object(core_util["keys"])(cssAnims); var len = animNames.length; if (!len) { return; } cssAnimationName = animNames[len - 1]; var lastAnim = cssAnims[cssAnimationName]; for (var percent in lastAnim) { var kf = lastAnim[percent]; composedAnim[percent] = composedAnim[percent] || { d: '' }; composedAnim[percent].d += kf.d || ''; } for (var className in cssNodes) { var val = cssNodes[className].animation; if (val.indexOf(cssAnimationName) >= 0) { cssAnimationCfg = val; } } }); if (!cssAnimationCfg) { return; } attrs.d = false; var animationName = addAnimation(composedAnim, scope); return cssAnimationCfg.replace(cssAnimationName, animationName); } function getEasingFunc(easing) { return Object(core_util["isString"])(easing) ? EASING_MAP[easing] ? "cubic-bezier(" + EASING_MAP[easing] + ")" : createCubicEasingFunc(easing) ? easing : '' : ''; } function createCSSAnimation(el, attrs, scope, onlyShape) { var animators = el.animators; var len = animators.length; var cssAnimations = []; if (el instanceof graphic_CompoundPath) { var animationCfg = createCompoundPathCSSAnimation(el, attrs, scope); if (animationCfg) { cssAnimations.push(animationCfg); } else if (!len) { return; } } else if (!len) { return; } var groupAnimators = {}; for (var i = 0; i < len; i++) { var animator = animators[i]; var cfgArr = [animator.getMaxTime() / 1000 + 's']; var easing = getEasingFunc(animator.getClip().easing); var delay = animator.getDelay(); if (easing) { cfgArr.push(easing); } else { cfgArr.push('linear'); } if (delay) { cfgArr.push(delay / 1000 + 's'); } if (animator.getLoop()) { cfgArr.push('infinite'); } var cfg = cfgArr.join(' '); groupAnimators[cfg] = groupAnimators[cfg] || [cfg, []]; groupAnimators[cfg][1].push(animator); } function createSingleCSSAnimation(groupAnimator) { var animators = groupAnimator[1]; var len = animators.length; var transformKfs = {}; var shapeKfs = {}; var finalKfs = {}; var animationTimingFunctionAttrName = 'animation-timing-function'; function saveAnimatorTrackToCssKfs(animator, cssKfs, toCssAttrName) { var tracks = animator.getTracks(); var maxTime = animator.getMaxTime(); for (var k = 0; k < tracks.length; k++) { var track = tracks[k]; if (track.needsAnimate()) { var kfs = track.keyframes; var attrName = track.propName; toCssAttrName && (attrName = toCssAttrName(attrName)); if (attrName) { for (var i = 0; i < kfs.length; i++) { var kf = kfs[i]; var percent = Math.round(kf.time / maxTime * 100) + '%'; var kfEasing = getEasingFunc(kf.easing); var rawValue = kf.rawValue; if (Object(core_util["isString"])(rawValue) || Object(core_util["isNumber"])(rawValue)) { cssKfs[percent] = cssKfs[percent] || {}; cssKfs[percent][attrName] = kf.rawValue; if (kfEasing) { cssKfs[percent][animationTimingFunctionAttrName] = kfEasing; } } } } } } } for (var i = 0; i < len; i++) { var animator = animators[i]; var targetProp = animator.targetName; if (!targetProp) { !onlyShape && saveAnimatorTrackToCssKfs(animator, transformKfs); } else if (targetProp === 'shape') { saveAnimatorTrackToCssKfs(animator, shapeKfs); } } for (var percent in transformKfs) { var transform = {}; copyTransform(transform, el); Object(core_util["extend"])(transform, transformKfs[percent]); var str = Object(helper["g" /* getSRTTransformString */])(transform); var timingFunction = transformKfs[percent][animationTimingFunctionAttrName]; finalKfs[percent] = str ? { transform: str } : {}; setTransformOrigin(finalKfs[percent], transform); if (timingFunction) { finalKfs[percent][animationTimingFunctionAttrName] = timingFunction; } } ; var path; var canAnimateShape = true; for (var percent in shapeKfs) { finalKfs[percent] = finalKfs[percent] || {}; var isFirst = !path; var timingFunction = shapeKfs[percent][animationTimingFunctionAttrName]; if (isFirst) { path = new core_PathProxy(); } var len_1 = path.len(); path.reset(); finalKfs[percent].d = buildPathString(el, shapeKfs[percent], path); var newLen = path.len(); if (!isFirst && len_1 !== newLen) { canAnimateShape = false; break; } if (timingFunction) { finalKfs[percent][animationTimingFunctionAttrName] = timingFunction; } } ; if (!canAnimateShape) { for (var percent in finalKfs) { delete finalKfs[percent].d; } } if (!onlyShape) { for (var i = 0; i < len; i++) { var animator = animators[i]; var targetProp = animator.targetName; if (targetProp === 'style') { saveAnimatorTrackToCssKfs(animator, finalKfs, function (propName) { return ANIMATE_STYLE_MAP[propName]; }); } } } var percents = Object(core_util["keys"])(finalKfs); var allTransformOriginSame = true; var transformOrigin; for (var i = 1; i < percents.length; i++) { var p0 = percents[i - 1]; var p1 = percents[i]; if (finalKfs[p0][transformOriginKey] !== finalKfs[p1][transformOriginKey]) { allTransformOriginSame = false; break; } transformOrigin = finalKfs[p0][transformOriginKey]; } if (allTransformOriginSame && transformOrigin) { for (var percent in finalKfs) { if (finalKfs[percent][transformOriginKey]) { delete finalKfs[percent][transformOriginKey]; } } attrs[transformOriginKey] = transformOrigin; } if (Object(core_util["filter"])(percents, function (percent) { return Object(core_util["keys"])(finalKfs[percent]).length > 0; }).length) { var animationName = addAnimation(finalKfs, scope); return animationName + " " + groupAnimator[0] + " both"; } } for (var key in groupAnimators) { var animationCfg = createSingleCSSAnimation(groupAnimators[key]); if (animationCfg) { cssAnimations.push(animationCfg); } } if (cssAnimations.length) { var className = scope.zrId + '-cls-' + getClassId(); scope.cssNodes['.' + className] = { animation: cssAnimations.join(',') }; attrs["class"] = className; } } // CONCATENATED MODULE: ./node_modules/zrender/lib/svg/cssEmphasis.js function createCSSEmphasis(el, attrs, scope) { if (!el.ignore) { if (el.isSilent()) { var style = { 'pointer-events': 'none' }; setClassAttribute(style, attrs, scope, true); } else { var emphasisStyle = el.states.emphasis && el.states.emphasis.style ? el.states.emphasis.style : {}; var fill = emphasisStyle.fill; if (!fill) { var normalFill = el.style && el.style.fill; var selectFill = el.states.select && el.states.select.style && el.states.select.style.fill; var fromFill = el.currentStates.indexOf('select') >= 0 ? (selectFill || normalFill) : normalFill; if (fromFill) { fill = Object(tool_color["liftColor"])(fromFill); } } var lineWidth = emphasisStyle.lineWidth; if (lineWidth) { var scaleX = (!emphasisStyle.strokeNoScale && el.transform) ? el.transform[0] : 1; lineWidth = lineWidth / scaleX; } var style = { cursor: 'pointer' }; if (fill) { style.fill = fill; } if (emphasisStyle.stroke) { style.stroke = emphasisStyle.stroke; } if (lineWidth) { style['stroke-width'] = lineWidth; } setClassAttribute(style, attrs, scope, true); } } } function setClassAttribute(style, attrs, scope, withHover) { var styleKey = JSON.stringify(style); var className = scope.cssStyleCache[styleKey]; if (!className) { className = scope.zrId + '-cls-' + getClassId(); scope.cssStyleCache[styleKey] = className; scope.cssNodes['.' + className + (withHover ? ':hover' : '')] = style; } attrs["class"] = attrs["class"] ? (attrs["class"] + ' ' + className) : className; } // CONCATENATED MODULE: ./node_modules/zrender/lib/svg/graphic.js var graphic_round = Math.round; function graphic_isImageLike(val) { return val && Object(core_util["isString"])(val.src); } function isCanvasLike(val) { return val && Object(core_util["isFunction"])(val.toDataURL); } function setStyleAttrs(attrs, style, el, scope) { mapStyleToAttrs(function (key, val) { var isFillStroke = key === 'fill' || key === 'stroke'; if (isFillStroke && Object(helper["k" /* isGradient */])(val)) { setGradient(style, attrs, key, scope); } else if (isFillStroke && Object(helper["n" /* isPattern */])(val)) { setPattern(el, attrs, key, scope); } else { attrs[key] = val; } if (isFillStroke && scope.ssr && val === 'none') { attrs['pointer-events'] = 'visible'; } }, style, el, false); setShadow(el, attrs, scope); } function setMetaData(attrs, el) { var metaData = getElementSSRData(el); if (metaData) { metaData.each(function (val, key) { val != null && (attrs[(META_DATA_PREFIX + key).toLowerCase()] = val + ''); }); if (el.isSilent()) { attrs[META_DATA_PREFIX + 'silent'] = 'true'; } } } function noRotateScale(m) { return Object(helper["j" /* isAroundZero */])(m[0] - 1) && Object(helper["j" /* isAroundZero */])(m[1]) && Object(helper["j" /* isAroundZero */])(m[2]) && Object(helper["j" /* isAroundZero */])(m[3] - 1); } function noTranslate(m) { return Object(helper["j" /* isAroundZero */])(m[4]) && Object(helper["j" /* isAroundZero */])(m[5]); } function setTransform(attrs, m, compress) { if (m && !(noTranslate(m) && noRotateScale(m))) { var mul = compress ? 10 : 1e4; attrs.transform = noRotateScale(m) ? "translate(" + graphic_round(m[4] * mul) / mul + " " + graphic_round(m[5] * mul) / mul + ")" : Object(helper["e" /* getMatrixStr */])(m); } } function convertPolyShape(shape, attrs, mul) { var points = shape.points; var strArr = []; for (var i = 0; i < points.length; i++) { strArr.push(graphic_round(points[i][0] * mul) / mul); strArr.push(graphic_round(points[i][1] * mul) / mul); } attrs.points = strArr.join(' '); } function validatePolyShape(shape) { return !shape.smooth; } function createAttrsConvert(desc) { var normalizedDesc = Object(core_util["map"])(desc, function (item) { return (typeof item === 'string' ? [item, item] : item); }); return function (shape, attrs, mul) { for (var i = 0; i < normalizedDesc.length; i++) { var item = normalizedDesc[i]; var val = shape[item[0]]; if (val != null) { attrs[item[1]] = graphic_round(val * mul) / mul; } } }; } var builtinShapesDef = { circle: [createAttrsConvert(['cx', 'cy', 'r'])], polyline: [convertPolyShape, validatePolyShape], polygon: [convertPolyShape, validatePolyShape] }; function hasShapeAnimation(el) { var animators = el.animators; for (var i = 0; i < animators.length; i++) { if (animators[i].targetName === 'shape') { return true; } } return false; } function brushSVGPath(el, scope) { var style = el.style; var shape = el.shape; var builtinShpDef = builtinShapesDef[el.type]; var attrs = {}; var needsAnimate = scope.animation; var svgElType = 'path'; var strokePercent = el.style.strokePercent; var precision = (scope.compress && Object(helper["f" /* getPathPrecision */])(el)) || 4; if (builtinShpDef && !scope.willUpdate && !(builtinShpDef[1] && !builtinShpDef[1](shape)) && !(needsAnimate && hasShapeAnimation(el)) && !(strokePercent < 1)) { svgElType = el.type; var mul = Math.pow(10, precision); builtinShpDef[0](shape, attrs, mul); } else { var needBuildPath = !el.path || el.shapeChanged(); if (!el.path) { el.createPathProxy(); } var path = el.path; if (needBuildPath) { path.beginPath(); el.buildPath(path, el.shape); el.pathUpdated(); } var pathVersion = path.getVersion(); var elExt = el; var svgPathBuilder = elExt.__svgPathBuilder; if (elExt.__svgPathVersion !== pathVersion || !svgPathBuilder || strokePercent !== elExt.__svgPathStrokePercent) { if (!svgPathBuilder) { svgPathBuilder = elExt.__svgPathBuilder = new svg_SVGPathRebuilder(); } svgPathBuilder.reset(precision); path.rebuildPath(svgPathBuilder, strokePercent); svgPathBuilder.generateStr(); elExt.__svgPathVersion = pathVersion; elExt.__svgPathStrokePercent = strokePercent; } attrs.d = svgPathBuilder.getStr(); } setTransform(attrs, el.transform); setStyleAttrs(attrs, style, el, scope); setMetaData(attrs, el); scope.animation && createCSSAnimation(el, attrs, scope); scope.emphasis && createCSSEmphasis(el, attrs, scope); return createVNode(svgElType, el.id + '', attrs); } function brushSVGImage(el, scope) { var style = el.style; var image = style.image; if (image && !Object(core_util["isString"])(image)) { if (graphic_isImageLike(image)) { image = image.src; } else if (isCanvasLike(image)) { image = image.toDataURL(); } } if (!image) { return; } var x = style.x || 0; var y = style.y || 0; var dw = style.width; var dh = style.height; var attrs = { href: image, width: dw, height: dh }; if (x) { attrs.x = x; } if (y) { attrs.y = y; } setTransform(attrs, el.transform); setStyleAttrs(attrs, style, el, scope); setMetaData(attrs, el); scope.animation && createCSSAnimation(el, attrs, scope); return createVNode('image', el.id + '', attrs); } ; function brushSVGTSpan(el, scope) { var style = el.style; var text = style.text; text != null && (text += ''); if (!text || isNaN(style.x) || isNaN(style.y)) { return; } var font = style.font || platform["a" /* DEFAULT_FONT */]; var x = style.x || 0; var y = Object(helper["b" /* adjustTextY */])(style.y || 0, getLineHeight(font), style.textBaseline); var textAlign = helper["a" /* TEXT_ALIGN_TO_ANCHOR */][style.textAlign] || style.textAlign; var attrs = { 'dominant-baseline': 'central', 'text-anchor': textAlign }; if (hasSeparateFont(style)) { var separatedFontStr = ''; var fontStyle = style.fontStyle; var fontSize = parseFontSize(style.fontSize); if (!parseFloat(fontSize)) { return; } var fontFamily = style.fontFamily || platform["b" /* DEFAULT_FONT_FAMILY */]; var fontWeight = style.fontWeight; separatedFontStr += "font-size:" + fontSize + ";font-family:" + fontFamily + ";"; if (fontStyle && fontStyle !== 'normal') { separatedFontStr += "font-style:" + fontStyle + ";"; } if (fontWeight && fontWeight !== 'normal') { separatedFontStr += "font-weight:" + fontWeight + ";"; } attrs.style = separatedFontStr; } else { attrs.style = "font: " + font; } if (text.match(/\s/)) { attrs['xml:space'] = 'preserve'; } if (x) { attrs.x = x; } if (y) { attrs.y = y; } setTransform(attrs, el.transform); setStyleAttrs(attrs, style, el, scope); setMetaData(attrs, el); scope.animation && createCSSAnimation(el, attrs, scope); return createVNode('text', el.id + '', attrs, undefined, text); } function graphic_brush(el, scope) { if (el instanceof graphic_Path) { return brushSVGPath(el, scope); } else if (el instanceof graphic_Image) { return brushSVGImage(el, scope); } else if (el instanceof graphic_TSpan) { return brushSVGTSpan(el, scope); } } function setShadow(el, attrs, scope) { var style = el.style; if (Object(helper["i" /* hasShadow */])(style)) { var shadowKey = Object(helper["h" /* getShadowKey */])(el); var shadowCache = scope.shadowCache; var shadowId = shadowCache[shadowKey]; if (!shadowId) { var globalScale = el.getGlobalScale(); var scaleX = globalScale[0]; var scaleY = globalScale[1]; if (!scaleX || !scaleY) { return; } var offsetX = style.shadowOffsetX || 0; var offsetY = style.shadowOffsetY || 0; var blur_1 = style.shadowBlur; var _a = Object(helper["p" /* normalizeColor */])(style.shadowColor), opacity = _a.opacity, color = _a.color; var stdDx = blur_1 / 2 / scaleX; var stdDy = blur_1 / 2 / scaleY; var stdDeviation = stdDx + ' ' + stdDy; shadowId = scope.zrId + '-s' + scope.shadowIdx++; scope.defs[shadowId] = createVNode('filter', shadowId, { 'id': shadowId, 'x': '-100%', 'y': '-100%', 'width': '300%', 'height': '300%' }, [ createVNode('feDropShadow', '', { 'dx': offsetX / scaleX, 'dy': offsetY / scaleY, 'stdDeviation': stdDeviation, 'flood-color': color, 'flood-opacity': opacity }) ]); shadowCache[shadowKey] = shadowId; } attrs.filter = Object(helper["d" /* getIdURL */])(shadowId); } } function setGradient(style, attrs, target, scope) { var val = style[target]; var gradientTag; var gradientAttrs = { 'gradientUnits': val.global ? 'userSpaceOnUse' : 'objectBoundingBox' }; if (Object(helper["m" /* isLinearGradient */])(val)) { gradientTag = 'linearGradient'; gradientAttrs.x1 = val.x; gradientAttrs.y1 = val.y; gradientAttrs.x2 = val.x2; gradientAttrs.y2 = val.y2; } else if (Object(helper["o" /* isRadialGradient */])(val)) { gradientTag = 'radialGradient'; gradientAttrs.cx = Object(core_util["retrieve2"])(val.x, 0.5); gradientAttrs.cy = Object(core_util["retrieve2"])(val.y, 0.5); gradientAttrs.r = Object(core_util["retrieve2"])(val.r, 0.5); } else { if (false) { logError('Illegal gradient type.'); } return; } var colors = val.colorStops; var colorStops = []; for (var i = 0, len = colors.length; i < len; ++i) { var offset = Object(helper["q" /* round4 */])(colors[i].offset) * 100 + '%'; var stopColor = colors[i].color; var _a = Object(helper["p" /* normalizeColor */])(stopColor), color = _a.color, opacity = _a.opacity; var stopsAttrs = { 'offset': offset }; stopsAttrs['stop-color'] = color; if (opacity < 1) { stopsAttrs['stop-opacity'] = opacity; } colorStops.push(createVNode('stop', i + '', stopsAttrs)); } var gradientVNode = createVNode(gradientTag, '', gradientAttrs, colorStops); var gradientKey = vNodeToString(gradientVNode); var gradientCache = scope.gradientCache; var gradientId = gradientCache[gradientKey]; if (!gradientId) { gradientId = scope.zrId + '-g' + scope.gradientIdx++; gradientCache[gradientKey] = gradientId; gradientAttrs.id = gradientId; scope.defs[gradientId] = createVNode(gradientTag, gradientId, gradientAttrs, colorStops); } attrs[target] = Object(helper["d" /* getIdURL */])(gradientId); } function setPattern(el, attrs, target, scope) { var val = el.style[target]; var boundingRect = el.getBoundingRect(); var patternAttrs = {}; var repeat = val.repeat; var noRepeat = repeat === 'no-repeat'; var repeatX = repeat === 'repeat-x'; var repeatY = repeat === 'repeat-y'; var child; if (Object(helper["l" /* isImagePattern */])(val)) { var imageWidth_1 = val.imageWidth; var imageHeight_1 = val.imageHeight; var imageSrc = void 0; var patternImage = val.image; if (Object(core_util["isString"])(patternImage)) { imageSrc = patternImage; } else if (graphic_isImageLike(patternImage)) { imageSrc = patternImage.src; } else if (isCanvasLike(patternImage)) { imageSrc = patternImage.toDataURL(); } if (typeof Image === 'undefined') { var errMsg = 'Image width/height must been given explictly in svg-ssr renderer.'; Object(core_util["assert"])(imageWidth_1, errMsg); Object(core_util["assert"])(imageHeight_1, errMsg); } else if (imageWidth_1 == null || imageHeight_1 == null) { var setSizeToVNode_1 = function (vNode, img) { if (vNode) { var svgEl = vNode.elm; var width = imageWidth_1 || img.width; var height = imageHeight_1 || img.height; if (vNode.tag === 'pattern') { if (repeatX) { height = 1; width /= boundingRect.width; } else if (repeatY) { width = 1; height /= boundingRect.height; } } vNode.attrs.width = width; vNode.attrs.height = height; if (svgEl) { svgEl.setAttribute('width', width); svgEl.setAttribute('height', height); } } }; var createdImage = createOrUpdateImage(imageSrc, null, el, function (img) { noRepeat || setSizeToVNode_1(patternVNode, img); setSizeToVNode_1(child, img); }); if (createdImage && createdImage.width && createdImage.height) { imageWidth_1 = imageWidth_1 || createdImage.width; imageHeight_1 = imageHeight_1 || createdImage.height; } } child = createVNode('image', 'img', { href: imageSrc, width: imageWidth_1, height: imageHeight_1 }); patternAttrs.width = imageWidth_1; patternAttrs.height = imageHeight_1; } else if (val.svgElement) { child = Object(core_util["clone"])(val.svgElement); patternAttrs.width = val.svgWidth; patternAttrs.height = val.svgHeight; } if (!child) { return; } var patternWidth; var patternHeight; if (noRepeat) { patternWidth = patternHeight = 1; } else if (repeatX) { patternHeight = 1; patternWidth = patternAttrs.width / boundingRect.width; } else if (repeatY) { patternWidth = 1; patternHeight = patternAttrs.height / boundingRect.height; } else { patternAttrs.patternUnits = 'userSpaceOnUse'; } if (patternWidth != null && !isNaN(patternWidth)) { patternAttrs.width = patternWidth; } if (patternHeight != null && !isNaN(patternHeight)) { patternAttrs.height = patternHeight; } var patternTransform = Object(helper["g" /* getSRTTransformString */])(val); patternTransform && (patternAttrs.patternTransform = patternTransform); var patternVNode = createVNode('pattern', '', patternAttrs, [child]); var patternKey = vNodeToString(patternVNode); var patternCache = scope.patternCache; var patternId = patternCache[patternKey]; if (!patternId) { patternId = scope.zrId + '-p' + scope.patternIdx++; patternCache[patternKey] = patternId; patternAttrs.id = patternId; patternVNode = scope.defs[patternId] = createVNode('pattern', patternId, patternAttrs, [child]); } attrs[target] = Object(helper["d" /* getIdURL */])(patternId); } function setClipPath(clipPath, attrs, scope) { var clipPathCache = scope.clipPathCache, defs = scope.defs; var clipPathId = clipPathCache[clipPath.id]; if (!clipPathId) { clipPathId = scope.zrId + '-c' + scope.clipPathIdx++; var clipPathAttrs = { id: clipPathId }; clipPathCache[clipPath.id] = clipPathId; defs[clipPathId] = createVNode('clipPath', clipPathId, clipPathAttrs, [brushSVGPath(clipPath, scope)]); } attrs['clip-path'] = Object(helper["d" /* getIdURL */])(clipPathId); } // CONCATENATED MODULE: ./node_modules/zrender/lib/svg/domapi.js function createTextNode(text) { return document.createTextNode(text); } function createComment(text) { return document.createComment(text); } function insertBefore(parentNode, newNode, referenceNode) { parentNode.insertBefore(newNode, referenceNode); } function removeChild(node, child) { node.removeChild(child); } function appendChild(node, child) { node.appendChild(child); } function domapi_parentNode(node) { return node.parentNode; } function nextSibling(node) { return node.nextSibling; } function tagName(elm) { return elm.tagName; } function setTextContent(node, text) { node.textContent = text; } function getTextContent(node) { return node.textContent; } function isElement(node) { return node.nodeType === 1; } function isText(node) { return node.nodeType === 3; } function isComment(node) { return node.nodeType === 8; } // CONCATENATED MODULE: ./node_modules/zrender/lib/svg/patch.js var colonChar = 58; var xChar = 120; var emptyNode = createVNode('', ''); function isUndef(s) { return s === undefined; } function isDef(s) { return s !== undefined; } function createKeyToOldIdx(children, beginIdx, endIdx) { var map = {}; for (var i = beginIdx; i <= endIdx; ++i) { var key = children[i].key; if (key !== undefined) { if (false) { if (map[key] != null) { console.error("Duplicate key " + key); } } map[key] = i; } } return map; } function sameVnode(vnode1, vnode2) { var isSameKey = vnode1.key === vnode2.key; var isSameTag = vnode1.tag === vnode2.tag; return isSameTag && isSameKey; } function createElm(vnode) { var i; var children = vnode.children; var tag = vnode.tag; if (isDef(tag)) { var elm = (vnode.elm = createElement(tag)); updateAttrs(emptyNode, vnode); if (Object(core_util["isArray"])(children)) { for (i = 0; i < children.length; ++i) { var ch = children[i]; if (ch != null) { appendChild(elm, createElm(ch)); } } } else if (isDef(vnode.text) && !Object(core_util["isObject"])(vnode.text)) { appendChild(elm, createTextNode(vnode.text)); } } else { vnode.elm = createTextNode(vnode.text); } return vnode.elm; } function addVnodes(parentElm, before, vnodes, startIdx, endIdx) { for (; startIdx <= endIdx; ++startIdx) { var ch = vnodes[startIdx]; if (ch != null) { insertBefore(parentElm, createElm(ch), before); } } } function removeVnodes(parentElm, vnodes, startIdx, endIdx) { for (; startIdx <= endIdx; ++startIdx) { var ch = vnodes[startIdx]; if (ch != null) { if (isDef(ch.tag)) { var parent_1 = domapi_parentNode(ch.elm); removeChild(parent_1, ch.elm); } else { removeChild(parentElm, ch.elm); } } } } function updateAttrs(oldVnode, vnode) { var key; var elm = vnode.elm; var oldAttrs = oldVnode && oldVnode.attrs || {}; var attrs = vnode.attrs || {}; if (oldAttrs === attrs) { return; } for (key in attrs) { var cur = attrs[key]; var old = oldAttrs[key]; if (old !== cur) { if (cur === true) { elm.setAttribute(key, ''); } else if (cur === false) { elm.removeAttribute(key); } else { if (key === 'style') { elm.style.cssText = cur; } else if (key.charCodeAt(0) !== xChar) { elm.setAttribute(key, cur); } else if (key === 'xmlns:xlink' || key === 'xmlns') { elm.setAttributeNS(XMLNS, key, cur); } else if (key.charCodeAt(3) === colonChar) { elm.setAttributeNS(XML_NAMESPACE, key, cur); } else if (key.charCodeAt(5) === colonChar) { elm.setAttributeNS(XLINKNS, key, cur); } else { elm.setAttribute(key, cur); } } } } for (key in oldAttrs) { if (!(key in attrs)) { elm.removeAttribute(key); } } } function updateChildren(parentElm, oldCh, newCh) { var oldStartIdx = 0; var newStartIdx = 0; var oldEndIdx = oldCh.length - 1; var oldStartVnode = oldCh[0]; var oldEndVnode = oldCh[oldEndIdx]; var newEndIdx = newCh.length - 1; var newStartVnode = newCh[0]; var newEndVnode = newCh[newEndIdx]; var oldKeyToIdx; var idxInOld; var elmToMove; var before; while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) { if (oldStartVnode == null) { oldStartVnode = oldCh[++oldStartIdx]; } else if (oldEndVnode == null) { oldEndVnode = oldCh[--oldEndIdx]; } else if (newStartVnode == null) { newStartVnode = newCh[++newStartIdx]; } else if (newEndVnode == null) { newEndVnode = newCh[--newEndIdx]; } else if (sameVnode(oldStartVnode, newStartVnode)) { patchVnode(oldStartVnode, newStartVnode); oldStartVnode = oldCh[++oldStartIdx]; newStartVnode = newCh[++newStartIdx]; } else if (sameVnode(oldEndVnode, newEndVnode)) { patchVnode(oldEndVnode, newEndVnode); oldEndVnode = oldCh[--oldEndIdx]; newEndVnode = newCh[--newEndIdx]; } else if (sameVnode(oldStartVnode, newEndVnode)) { patchVnode(oldStartVnode, newEndVnode); insertBefore(parentElm, oldStartVnode.elm, nextSibling(oldEndVnode.elm)); oldStartVnode = oldCh[++oldStartIdx]; newEndVnode = newCh[--newEndIdx]; } else if (sameVnode(oldEndVnode, newStartVnode)) { patchVnode(oldEndVnode, newStartVnode); insertBefore(parentElm, oldEndVnode.elm, oldStartVnode.elm); oldEndVnode = oldCh[--oldEndIdx]; newStartVnode = newCh[++newStartIdx]; } else { if (isUndef(oldKeyToIdx)) { oldKeyToIdx = createKeyToOldIdx(oldCh, oldStartIdx, oldEndIdx); } idxInOld = oldKeyToIdx[newStartVnode.key]; if (isUndef(idxInOld)) { insertBefore(parentElm, createElm(newStartVnode), oldStartVnode.elm); } else { elmToMove = oldCh[idxInOld]; if (elmToMove.tag !== newStartVnode.tag) { insertBefore(parentElm, createElm(newStartVnode), oldStartVnode.elm); } else { patchVnode(elmToMove, newStartVnode); oldCh[idxInOld] = undefined; insertBefore(parentElm, elmToMove.elm, oldStartVnode.elm); } } newStartVnode = newCh[++newStartIdx]; } } if (oldStartIdx <= oldEndIdx || newStartIdx <= newEndIdx) { if (oldStartIdx > oldEndIdx) { before = newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].elm; addVnodes(parentElm, before, newCh, newStartIdx, newEndIdx); } else { removeVnodes(parentElm, oldCh, oldStartIdx, oldEndIdx); } } } function patchVnode(oldVnode, vnode) { var elm = (vnode.elm = oldVnode.elm); var oldCh = oldVnode.children; var ch = vnode.children; if (oldVnode === vnode) { return; } updateAttrs(oldVnode, vnode); if (isUndef(vnode.text)) { if (isDef(oldCh) && isDef(ch)) { if (oldCh !== ch) { updateChildren(elm, oldCh, ch); } } else if (isDef(ch)) { if (isDef(oldVnode.text)) { setTextContent(elm, ''); } addVnodes(elm, null, ch, 0, ch.length - 1); } else if (isDef(oldCh)) { removeVnodes(elm, oldCh, 0, oldCh.length - 1); } else if (isDef(oldVnode.text)) { setTextContent(elm, ''); } } else if (oldVnode.text !== vnode.text) { if (isDef(oldCh)) { removeVnodes(elm, oldCh, 0, oldCh.length - 1); } setTextContent(elm, vnode.text); } } function patch(oldVnode, vnode) { if (sameVnode(oldVnode, vnode)) { patchVnode(oldVnode, vnode); } else { var elm = oldVnode.elm; var parent_2 = domapi_parentNode(elm); createElm(vnode); if (parent_2 !== null) { insertBefore(parent_2, vnode.elm, nextSibling(elm)); removeVnodes(parent_2, [oldVnode], 0, 0); } } return vnode; } // CONCATENATED MODULE: ./node_modules/zrender/lib/svg/Painter.js var svgId = 0; var Painter_SVGPainter = (function () { function SVGPainter(root, storage, opts) { this.type = 'svg'; this.refreshHover = createMethodNotSupport('refreshHover'); this.configLayer = createMethodNotSupport('configLayer'); this.storage = storage; this._opts = opts = Object(core_util["extend"])({}, opts); this.root = root; this._id = 'zr' + svgId++; this._oldVNode = createSVGVNode(opts.width, opts.height); if (root && !opts.ssr) { var viewport = this._viewport = document.createElement('div'); viewport.style.cssText = 'position:relative;overflow:hidden'; var svgDom = this._svgDom = this._oldVNode.elm = createElement('svg'); updateAttrs(null, this._oldVNode); viewport.appendChild(svgDom); root.appendChild(viewport); } this.resize(opts.width, opts.height); } SVGPainter.prototype.getType = function () { return this.type; }; SVGPainter.prototype.getViewportRoot = function () { return this._viewport; }; SVGPainter.prototype.getViewportRootOffset = function () { var viewportRoot = this.getViewportRoot(); if (viewportRoot) { return { offsetLeft: viewportRoot.offsetLeft || 0, offsetTop: viewportRoot.offsetTop || 0 }; } }; SVGPainter.prototype.getSvgDom = function () { return this._svgDom; }; SVGPainter.prototype.refresh = function () { if (this.root) { var vnode = this.renderToVNode({ willUpdate: true }); vnode.attrs.style = 'position:absolute;left:0;top:0;user-select:none'; patch(this._oldVNode, vnode); this._oldVNode = vnode; } }; SVGPainter.prototype.renderOneToVNode = function (el) { return graphic_brush(el, createBrushScope(this._id)); }; SVGPainter.prototype.renderToVNode = function (opts) { opts = opts || {}; var list = this.storage.getDisplayList(true); var width = this._width; var height = this._height; var scope = createBrushScope(this._id); scope.animation = opts.animation; scope.willUpdate = opts.willUpdate; scope.compress = opts.compress; scope.emphasis = opts.emphasis; scope.ssr = this._opts.ssr; var children = []; var bgVNode = this._bgVNode = createBackgroundVNode(width, height, this._backgroundColor, scope); bgVNode && children.push(bgVNode); var mainVNode = !opts.compress ? (this._mainVNode = createVNode('g', 'main', {}, [])) : null; this._paintList(list, scope, mainVNode ? mainVNode.children : children); mainVNode && children.push(mainVNode); var defs = Object(core_util["map"])(Object(core_util["keys"])(scope.defs), function (id) { return scope.defs[id]; }); if (defs.length) { children.push(createVNode('defs', 'defs', {}, defs)); } if (opts.animation) { var animationCssStr = getCssString(scope.cssNodes, scope.cssAnims, { newline: true }); if (animationCssStr) { var styleNode = createVNode('style', 'stl', {}, [], animationCssStr); children.push(styleNode); } } return createSVGVNode(width, height, children, opts.useViewBox); }; SVGPainter.prototype.renderToString = function (opts) { opts = opts || {}; return vNodeToString(this.renderToVNode({ animation: Object(core_util["retrieve2"])(opts.cssAnimation, true), emphasis: Object(core_util["retrieve2"])(opts.cssEmphasis, true), willUpdate: false, compress: true, useViewBox: Object(core_util["retrieve2"])(opts.useViewBox, true) }), { newline: true }); }; SVGPainter.prototype.setBackgroundColor = function (backgroundColor) { this._backgroundColor = backgroundColor; }; SVGPainter.prototype.getSvgRoot = function () { return this._mainVNode && this._mainVNode.elm; }; SVGPainter.prototype._paintList = function (list, scope, out) { var listLen = list.length; var clipPathsGroupsStack = []; var clipPathsGroupsStackDepth = 0; var currentClipPathGroup; var prevClipPaths; var clipGroupNodeIdx = 0; for (var i = 0; i < listLen; i++) { var displayable = list[i]; if (!displayable.invisible) { var clipPaths = displayable.__clipPaths; var len = clipPaths && clipPaths.length || 0; var prevLen = prevClipPaths && prevClipPaths.length || 0; var lca = void 0; for (lca = Math.max(len - 1, prevLen - 1); lca >= 0; lca--) { if (clipPaths && prevClipPaths && clipPaths[lca] === prevClipPaths[lca]) { break; } } for (var i_1 = prevLen - 1; i_1 > lca; i_1--) { clipPathsGroupsStackDepth--; currentClipPathGroup = clipPathsGroupsStack[clipPathsGroupsStackDepth - 1]; } for (var i_2 = lca + 1; i_2 < len; i_2++) { var groupAttrs = {}; setClipPath(clipPaths[i_2], groupAttrs, scope); var g = createVNode('g', 'clip-g-' + clipGroupNodeIdx++, groupAttrs, []); (currentClipPathGroup ? currentClipPathGroup.children : out).push(g); clipPathsGroupsStack[clipPathsGroupsStackDepth++] = g; currentClipPathGroup = g; } prevClipPaths = clipPaths; var ret = graphic_brush(displayable, scope); if (ret) { (currentClipPathGroup ? currentClipPathGroup.children : out).push(ret); } } } }; SVGPainter.prototype.resize = function (width, height) { var opts = this._opts; var root = this.root; var viewport = this._viewport; width != null && (opts.width = width); height != null && (opts.height = height); if (root && viewport) { viewport.style.display = 'none'; width = getSize(root, 0, opts); height = getSize(root, 1, opts); viewport.style.display = ''; } if (this._width !== width || this._height !== height) { this._width = width; this._height = height; if (viewport) { var viewportStyle = viewport.style; viewportStyle.width = width + 'px'; viewportStyle.height = height + 'px'; } if (!Object(helper["n" /* isPattern */])(this._backgroundColor)) { var svgDom = this._svgDom; if (svgDom) { svgDom.setAttribute('width', width); svgDom.setAttribute('height', height); } var bgEl = this._bgVNode && this._bgVNode.elm; if (bgEl) { bgEl.setAttribute('width', width); bgEl.setAttribute('height', height); } } else { this.refresh(); } } }; SVGPainter.prototype.getWidth = function () { return this._width; }; SVGPainter.prototype.getHeight = function () { return this._height; }; SVGPainter.prototype.dispose = function () { if (this.root) { this.root.innerHTML = ''; } this._svgDom = this._viewport = this.storage = this._oldVNode = this._bgVNode = this._mainVNode = null; }; SVGPainter.prototype.clear = function () { if (this._svgDom) { this._svgDom.innerHTML = null; } this._oldVNode = null; }; SVGPainter.prototype.toDataURL = function (base64) { var str = this.renderToString(); var prefix = 'data:image/svg+xml;'; if (base64) { str = Object(helper["c" /* encodeBase64 */])(str); return str && prefix + 'base64,' + str; } return prefix + 'charset=UTF-8,' + encodeURIComponent(str); }; return SVGPainter; }()); function createMethodNotSupport(method) { return function () { if (false) { logError('In SVG mode painter not support method "' + method + '"'); } }; } function createBackgroundVNode(width, height, backgroundColor, scope) { var bgVNode; if (backgroundColor && backgroundColor !== 'none') { bgVNode = createVNode('rect', 'bg', { width: width, height: height, x: '0', y: '0' }); if (Object(helper["k" /* isGradient */])(backgroundColor)) { setGradient({ fill: backgroundColor }, bgVNode.attrs, 'fill', scope); } else if (Object(helper["n" /* isPattern */])(backgroundColor)) { setPattern({ style: { fill: backgroundColor }, dirty: core_util["noop"], getBoundingRect: function () { return ({ width: width, height: height }); } }, bgVNode.attrs, 'fill', scope); } else { var _a = Object(helper["p" /* normalizeColor */])(backgroundColor), color = _a.color, opacity = _a.opacity; bgVNode.attrs.fill = color; opacity < 1 && (bgVNode.attrs['fill-opacity'] = opacity); } } return bgVNode; } /* harmony default export */ var Painter = (Painter_SVGPainter); // CONCATENATED MODULE: ./node_modules/echarts/lib/renderer/installSVGRenderer.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 install(registers) { registers.registerPainter('svg', Painter); } // CONCATENATED MODULE: ./node_modules/zrender/lib/canvas/Layer.js function createDom(id, painter, dpr) { var newDom = platform["d" /* platformApi */].createCanvas(); var width = painter.getWidth(); var height = painter.getHeight(); var newDomStyle = newDom.style; if (newDomStyle) { newDomStyle.position = 'absolute'; newDomStyle.left = '0'; newDomStyle.top = '0'; newDomStyle.width = width + 'px'; newDomStyle.height = height + 'px'; newDom.setAttribute('data-zr-dom-id', id); } newDom.width = width * dpr; newDom.height = height * dpr; return newDom; } ; var Layer_Layer = (function (_super) { Object(tslib_es6["b" /* __extends */])(Layer, _super); function Layer(id, painter, dpr) { var _this = _super.call(this) || this; _this.motionBlur = false; _this.lastFrameAlpha = 0.7; _this.dpr = 1; _this.virtual = false; _this.config = {}; _this.incremental = false; _this.zlevel = 0; _this.maxRepaintRectCount = 5; _this.__dirty = true; _this.__firstTimePaint = true; _this.__used = false; _this.__drawIndex = 0; _this.__startIndex = 0; _this.__endIndex = 0; _this.__prevStartIndex = null; _this.__prevEndIndex = null; var dom; dpr = dpr || devicePixelRatio; if (typeof id === 'string') { dom = createDom(id, painter, dpr); } else if (core_util["isObject"](id)) { dom = id; id = dom.id; } _this.id = id; _this.dom = dom; var domStyle = dom.style; if (domStyle) { core_util["disableUserSelect"](dom); dom.onselectstart = function () { return false; }; domStyle.padding = '0'; domStyle.margin = '0'; domStyle.borderWidth = '0'; } _this.painter = painter; _this.dpr = dpr; return _this; } Layer.prototype.getElementCount = function () { return this.__endIndex - this.__startIndex; }; Layer.prototype.afterBrush = function () { this.__prevStartIndex = this.__startIndex; this.__prevEndIndex = this.__endIndex; }; Layer.prototype.initContext = function () { this.ctx = this.dom.getContext('2d'); this.ctx.dpr = this.dpr; }; Layer.prototype.setUnpainted = function () { this.__firstTimePaint = true; }; Layer.prototype.createBackBuffer = function () { var dpr = this.dpr; this.domBack = createDom('back-' + this.id, this.painter, dpr); this.ctxBack = this.domBack.getContext('2d'); if (dpr !== 1) { this.ctxBack.scale(dpr, dpr); } }; Layer.prototype.createRepaintRects = function (displayList, prevList, viewWidth, viewHeight) { if (this.__firstTimePaint) { this.__firstTimePaint = false; return null; } var mergedRepaintRects = []; var maxRepaintRectCount = this.maxRepaintRectCount; var full = false; var pendingRect = new core_BoundingRect(0, 0, 0, 0); function addRectToMergePool(rect) { if (!rect.isFinite() || rect.isZero()) { return; } if (mergedRepaintRects.length === 0) { var boundingRect = new core_BoundingRect(0, 0, 0, 0); boundingRect.copy(rect); mergedRepaintRects.push(boundingRect); } else { var isMerged = false; var minDeltaArea = Infinity; var bestRectToMergeIdx = 0; for (var i = 0; i < mergedRepaintRects.length; ++i) { var mergedRect = mergedRepaintRects[i]; if (mergedRect.intersect(rect)) { var pendingRect_1 = new core_BoundingRect(0, 0, 0, 0); pendingRect_1.copy(mergedRect); pendingRect_1.union(rect); mergedRepaintRects[i] = pendingRect_1; isMerged = true; break; } else if (full) { pendingRect.copy(rect); pendingRect.union(mergedRect); var aArea = rect.width * rect.height; var bArea = mergedRect.width * mergedRect.height; var pendingArea = pendingRect.width * pendingRect.height; var deltaArea = pendingArea - aArea - bArea; if (deltaArea < minDeltaArea) { minDeltaArea = deltaArea; bestRectToMergeIdx = i; } } } if (full) { mergedRepaintRects[bestRectToMergeIdx].union(rect); isMerged = true; } if (!isMerged) { var boundingRect = new core_BoundingRect(0, 0, 0, 0); boundingRect.copy(rect); mergedRepaintRects.push(boundingRect); } if (!full) { full = mergedRepaintRects.length >= maxRepaintRectCount; } } } for (var i = this.__startIndex; i < this.__endIndex; ++i) { var el = displayList[i]; if (el) { var shouldPaint = el.shouldBePainted(viewWidth, viewHeight, true, true); var prevRect = el.__isRendered && ((el.__dirty & REDRAW_BIT) || !shouldPaint) ? el.getPrevPaintRect() : null; if (prevRect) { addRectToMergePool(prevRect); } var curRect = shouldPaint && ((el.__dirty & REDRAW_BIT) || !el.__isRendered) ? el.getPaintRect() : null; if (curRect) { addRectToMergePool(curRect); } } } for (var i = this.__prevStartIndex; i < this.__prevEndIndex; ++i) { var el = prevList[i]; var shouldPaint = el && el.shouldBePainted(viewWidth, viewHeight, true, true); if (el && (!shouldPaint || !el.__zr) && el.__isRendered) { var prevRect = el.getPrevPaintRect(); if (prevRect) { addRectToMergePool(prevRect); } } } var hasIntersections; do { hasIntersections = false; for (var i = 0; i < mergedRepaintRects.length;) { if (mergedRepaintRects[i].isZero()) { mergedRepaintRects.splice(i, 1); continue; } for (var j = i + 1; j < mergedRepaintRects.length;) { if (mergedRepaintRects[i].intersect(mergedRepaintRects[j])) { hasIntersections = true; mergedRepaintRects[i].union(mergedRepaintRects[j]); mergedRepaintRects.splice(j, 1); } else { j++; } } i++; } } while (hasIntersections); this._paintRects = mergedRepaintRects; return mergedRepaintRects; }; Layer.prototype.debugGetPaintRects = function () { return (this._paintRects || []).slice(); }; Layer.prototype.resize = function (width, height) { var dpr = this.dpr; var dom = this.dom; var domStyle = dom.style; var domBack = this.domBack; if (domStyle) { domStyle.width = width + 'px'; domStyle.height = height + 'px'; } dom.width = width * dpr; dom.height = height * dpr; if (domBack) { domBack.width = width * dpr; domBack.height = height * dpr; if (dpr !== 1) { this.ctxBack.scale(dpr, dpr); } } }; Layer.prototype.clear = function (clearAll, clearColor, repaintRects) { var dom = this.dom; var ctx = this.ctx; var width = dom.width; var height = dom.height; clearColor = clearColor || this.clearColor; var haveMotionBLur = this.motionBlur && !clearAll; var lastFrameAlpha = this.lastFrameAlpha; var dpr = this.dpr; var self = this; if (haveMotionBLur) { if (!this.domBack) { this.createBackBuffer(); } this.ctxBack.globalCompositeOperation = 'copy'; this.ctxBack.drawImage(dom, 0, 0, width / dpr, height / dpr); } var domBack = this.domBack; function doClear(x, y, width, height) { ctx.clearRect(x, y, width, height); if (clearColor && clearColor !== 'transparent') { var clearColorGradientOrPattern = void 0; if (core_util["isGradientObject"](clearColor)) { var shouldCache = clearColor.global || (clearColor.__width === width && clearColor.__height === height); clearColorGradientOrPattern = shouldCache && clearColor.__canvasGradient || getCanvasGradient(ctx, clearColor, { x: 0, y: 0, width: width, height: height }); clearColor.__canvasGradient = clearColorGradientOrPattern; clearColor.__width = width; clearColor.__height = height; } else if (core_util["isImagePatternObject"](clearColor)) { clearColor.scaleX = clearColor.scaleX || dpr; clearColor.scaleY = clearColor.scaleY || dpr; clearColorGradientOrPattern = createCanvasPattern(ctx, clearColor, { dirty: function () { self.setUnpainted(); self.painter.refresh(); } }); } ctx.save(); ctx.fillStyle = clearColorGradientOrPattern || clearColor; ctx.fillRect(x, y, width, height); ctx.restore(); } if (haveMotionBLur) { ctx.save(); ctx.globalAlpha = lastFrameAlpha; ctx.drawImage(domBack, x, y, width, height); ctx.restore(); } } ; if (!repaintRects || haveMotionBLur) { doClear(0, 0, width, height); } else if (repaintRects.length) { core_util["each"](repaintRects, function (rect) { doClear(rect.x * dpr, rect.y * dpr, rect.width * dpr, rect.height * dpr); }); } }; return Layer; }(core_Eventful)); /* harmony default export */ var canvas_Layer = (Layer_Layer); // CONCATENATED MODULE: ./node_modules/zrender/lib/canvas/Painter.js var HOVER_LAYER_ZLEVEL = 1e5; var CANVAS_ZLEVEL = 314159; var EL_AFTER_INCREMENTAL_INC = 0.01; var INCREMENTAL_INC = 0.001; function isLayerValid(layer) { if (!layer) { return false; } if (layer.__builtin__) { return true; } if (typeof (layer.resize) !== 'function' || typeof (layer.refresh) !== 'function') { return false; } return true; } function createRoot(width, height) { var domRoot = document.createElement('div'); domRoot.style.cssText = [ 'position:relative', 'width:' + width + 'px', 'height:' + height + 'px', 'padding:0', 'margin:0', 'border-width:0' ].join(';') + ';'; return domRoot; } var Painter_CanvasPainter = (function () { function CanvasPainter(root, storage, opts, id) { this.type = 'canvas'; this._zlevelList = []; this._prevDisplayList = []; this._layers = {}; this._layerConfig = {}; this._needsManuallyCompositing = false; this.type = 'canvas'; var singleCanvas = !root.nodeName || root.nodeName.toUpperCase() === 'CANVAS'; this._opts = opts = core_util["extend"]({}, opts || {}); this.dpr = opts.devicePixelRatio || devicePixelRatio; this._singleCanvas = singleCanvas; this.root = root; var rootStyle = root.style; if (rootStyle) { core_util["disableUserSelect"](root); root.innerHTML = ''; } this.storage = storage; var zlevelList = this._zlevelList; this._prevDisplayList = []; var layers = this._layers; if (!singleCanvas) { this._width = getSize(root, 0, opts); this._height = getSize(root, 1, opts); var domRoot = this._domRoot = createRoot(this._width, this._height); root.appendChild(domRoot); } else { var rootCanvas = root; var width = rootCanvas.width; var height = rootCanvas.height; if (opts.width != null) { width = opts.width; } if (opts.height != null) { height = opts.height; } this.dpr = opts.devicePixelRatio || 1; rootCanvas.width = width * this.dpr; rootCanvas.height = height * this.dpr; this._width = width; this._height = height; var mainLayer = new canvas_Layer(rootCanvas, this, this.dpr); mainLayer.__builtin__ = true; mainLayer.initContext(); layers[CANVAS_ZLEVEL] = mainLayer; mainLayer.zlevel = CANVAS_ZLEVEL; zlevelList.push(CANVAS_ZLEVEL); this._domRoot = root; } } CanvasPainter.prototype.getType = function () { return 'canvas'; }; CanvasPainter.prototype.isSingleCanvas = function () { return this._singleCanvas; }; CanvasPainter.prototype.getViewportRoot = function () { return this._domRoot; }; CanvasPainter.prototype.getViewportRootOffset = function () { var viewportRoot = this.getViewportRoot(); if (viewportRoot) { return { offsetLeft: viewportRoot.offsetLeft || 0, offsetTop: viewportRoot.offsetTop || 0 }; } }; CanvasPainter.prototype.refresh = function (paintAll) { var list = this.storage.getDisplayList(true); var prevList = this._prevDisplayList; var zlevelList = this._zlevelList; this._redrawId = Math.random(); this._paintList(list, prevList, paintAll, this._redrawId); for (var i = 0; i < zlevelList.length; i++) { var z = zlevelList[i]; var layer = this._layers[z]; if (!layer.__builtin__ && layer.refresh) { var clearColor = i === 0 ? this._backgroundColor : null; layer.refresh(clearColor); } } if (this._opts.useDirtyRect) { this._prevDisplayList = list.slice(); } return this; }; CanvasPainter.prototype.refreshHover = function () { this._paintHoverList(this.storage.getDisplayList(false)); }; CanvasPainter.prototype._paintHoverList = function (list) { var len = list.length; var hoverLayer = this._hoverlayer; hoverLayer && hoverLayer.clear(); if (!len) { return; } var scope = { inHover: true, viewWidth: this._width, viewHeight: this._height }; var ctx; for (var i = 0; i < len; i++) { var el = list[i]; if (el.__inHover) { if (!hoverLayer) { hoverLayer = this._hoverlayer = this.getLayer(HOVER_LAYER_ZLEVEL); } if (!ctx) { ctx = hoverLayer.ctx; ctx.save(); } brush(ctx, el, scope, i === len - 1); } } if (ctx) { ctx.restore(); } }; CanvasPainter.prototype.getHoverLayer = function () { return this.getLayer(HOVER_LAYER_ZLEVEL); }; CanvasPainter.prototype.paintOne = function (ctx, el) { brushSingle(ctx, el); }; CanvasPainter.prototype._paintList = function (list, prevList, paintAll, redrawId) { if (this._redrawId !== redrawId) { return; } paintAll = paintAll || false; this._updateLayerStatus(list); var _a = this._doPaintList(list, prevList, paintAll), finished = _a.finished, needsRefreshHover = _a.needsRefreshHover; if (this._needsManuallyCompositing) { this._compositeManually(); } if (needsRefreshHover) { this._paintHoverList(list); } if (!finished) { var self_1 = this; animation_requestAnimationFrame(function () { self_1._paintList(list, prevList, paintAll, redrawId); }); } else { this.eachLayer(function (layer) { layer.afterBrush && layer.afterBrush(); }); } }; CanvasPainter.prototype._compositeManually = function () { var ctx = this.getLayer(CANVAS_ZLEVEL).ctx; var width = this._domRoot.width; var height = this._domRoot.height; ctx.clearRect(0, 0, width, height); this.eachBuiltinLayer(function (layer) { if (layer.virtual) { ctx.drawImage(layer.dom, 0, 0, width, height); } }); }; CanvasPainter.prototype._doPaintList = function (list, prevList, paintAll) { var _this = this; var layerList = []; var useDirtyRect = this._opts.useDirtyRect; for (var zi = 0; zi < this._zlevelList.length; zi++) { var zlevel = this._zlevelList[zi]; var layer = this._layers[zlevel]; if (layer.__builtin__ && layer !== this._hoverlayer && (layer.__dirty || paintAll)) { layerList.push(layer); } } var finished = true; var needsRefreshHover = false; var _loop_1 = function (k) { var layer = layerList[k]; var ctx = layer.ctx; var repaintRects = useDirtyRect && layer.createRepaintRects(list, prevList, this_1._width, this_1._height); var start = paintAll ? layer.__startIndex : layer.__drawIndex; var useTimer = !paintAll && layer.incremental && Date.now; var startTime = useTimer && Date.now(); var clearColor = layer.zlevel === this_1._zlevelList[0] ? this_1._backgroundColor : null; if (layer.__startIndex === layer.__endIndex) { layer.clear(false, clearColor, repaintRects); } else if (start === layer.__startIndex) { var firstEl = list[start]; if (!firstEl.incremental || !firstEl.notClear || paintAll) { layer.clear(false, clearColor, repaintRects); } } if (start === -1) { console.error('For some unknown reason. drawIndex is -1'); start = layer.__startIndex; } var i; var repaint = function (repaintRect) { var scope = { inHover: false, allClipped: false, prevEl: null, viewWidth: _this._width, viewHeight: _this._height }; for (i = start; i < layer.__endIndex; i++) { var el = list[i]; if (el.__inHover) { needsRefreshHover = true; } _this._doPaintEl(el, layer, useDirtyRect, repaintRect, scope, i === layer.__endIndex - 1); if (useTimer) { var dTime = Date.now() - startTime; if (dTime > 15) { break; } } } if (scope.prevElClipPaths) { ctx.restore(); } }; if (repaintRects) { if (repaintRects.length === 0) { i = layer.__endIndex; } else { var dpr = this_1.dpr; for (var r = 0; r < repaintRects.length; ++r) { var rect = repaintRects[r]; ctx.save(); ctx.beginPath(); ctx.rect(rect.x * dpr, rect.y * dpr, rect.width * dpr, rect.height * dpr); ctx.clip(); repaint(rect); ctx.restore(); } } } else { ctx.save(); repaint(); ctx.restore(); } layer.__drawIndex = i; if (layer.__drawIndex < layer.__endIndex) { finished = false; } }; var this_1 = this; for (var k = 0; k < layerList.length; k++) { _loop_1(k); } if (core_env["a" /* default */].wxa) { core_util["each"](this._layers, function (layer) { if (layer && layer.ctx && layer.ctx.draw) { layer.ctx.draw(); } }); } return { finished: finished, needsRefreshHover: needsRefreshHover }; }; CanvasPainter.prototype._doPaintEl = function (el, currentLayer, useDirtyRect, repaintRect, scope, isLast) { var ctx = currentLayer.ctx; if (useDirtyRect) { var paintRect = el.getPaintRect(); if (!repaintRect || paintRect && paintRect.intersect(repaintRect)) { brush(ctx, el, scope, isLast); el.setPrevPaintRect(paintRect); } } else { brush(ctx, el, scope, isLast); } }; CanvasPainter.prototype.getLayer = function (zlevel, virtual) { if (this._singleCanvas && !this._needsManuallyCompositing) { zlevel = CANVAS_ZLEVEL; } var layer = this._layers[zlevel]; if (!layer) { layer = new canvas_Layer('zr_' + zlevel, this, this.dpr); layer.zlevel = zlevel; layer.__builtin__ = true; if (this._layerConfig[zlevel]) { core_util["merge"](layer, this._layerConfig[zlevel], true); } else if (this._layerConfig[zlevel - EL_AFTER_INCREMENTAL_INC]) { core_util["merge"](layer, this._layerConfig[zlevel - EL_AFTER_INCREMENTAL_INC], true); } if (virtual) { layer.virtual = virtual; } this.insertLayer(zlevel, layer); layer.initContext(); } return layer; }; CanvasPainter.prototype.insertLayer = function (zlevel, layer) { var layersMap = this._layers; var zlevelList = this._zlevelList; var len = zlevelList.length; var domRoot = this._domRoot; var prevLayer = null; var i = -1; if (layersMap[zlevel]) { if (false) { util.logError('ZLevel ' + zlevel + ' has been used already'); } return; } if (!isLayerValid(layer)) { if (false) { util.logError('Layer of zlevel ' + zlevel + ' is not valid'); } return; } if (len > 0 && zlevel > zlevelList[0]) { for (i = 0; i < len - 1; i++) { if (zlevelList[i] < zlevel && zlevelList[i + 1] > zlevel) { break; } } prevLayer = layersMap[zlevelList[i]]; } zlevelList.splice(i + 1, 0, zlevel); layersMap[zlevel] = layer; if (!layer.virtual) { if (prevLayer) { var prevDom = prevLayer.dom; if (prevDom.nextSibling) { domRoot.insertBefore(layer.dom, prevDom.nextSibling); } else { domRoot.appendChild(layer.dom); } } else { if (domRoot.firstChild) { domRoot.insertBefore(layer.dom, domRoot.firstChild); } else { domRoot.appendChild(layer.dom); } } } layer.painter || (layer.painter = this); }; CanvasPainter.prototype.eachLayer = function (cb, context) { var zlevelList = this._zlevelList; for (var i = 0; i < zlevelList.length; i++) { var z = zlevelList[i]; cb.call(context, this._layers[z], z); } }; CanvasPainter.prototype.eachBuiltinLayer = function (cb, context) { var zlevelList = this._zlevelList; for (var i = 0; i < zlevelList.length; i++) { var z = zlevelList[i]; var layer = this._layers[z]; if (layer.__builtin__) { cb.call(context, layer, z); } } }; CanvasPainter.prototype.eachOtherLayer = function (cb, context) { var zlevelList = this._zlevelList; for (var i = 0; i < zlevelList.length; i++) { var z = zlevelList[i]; var layer = this._layers[z]; if (!layer.__builtin__) { cb.call(context, layer, z); } } }; CanvasPainter.prototype.getLayers = function () { return this._layers; }; CanvasPainter.prototype._updateLayerStatus = function (list) { this.eachBuiltinLayer(function (layer, z) { layer.__dirty = layer.__used = false; }); function updatePrevLayer(idx) { if (prevLayer) { if (prevLayer.__endIndex !== idx) { prevLayer.__dirty = true; } prevLayer.__endIndex = idx; } } if (this._singleCanvas) { for (var i_1 = 1; i_1 < list.length; i_1++) { var el = list[i_1]; if (el.zlevel !== list[i_1 - 1].zlevel || el.incremental) { this._needsManuallyCompositing = true; break; } } } var prevLayer = null; var incrementalLayerCount = 0; var prevZlevel; var i; for (i = 0; i < list.length; i++) { var el = list[i]; var zlevel = el.zlevel; var layer = void 0; if (prevZlevel !== zlevel) { prevZlevel = zlevel; incrementalLayerCount = 0; } if (el.incremental) { layer = this.getLayer(zlevel + INCREMENTAL_INC, this._needsManuallyCompositing); layer.incremental = true; incrementalLayerCount = 1; } else { layer = this.getLayer(zlevel + (incrementalLayerCount > 0 ? EL_AFTER_INCREMENTAL_INC : 0), this._needsManuallyCompositing); } if (!layer.__builtin__) { core_util["logError"]('ZLevel ' + zlevel + ' has been used by unkown layer ' + layer.id); } if (layer !== prevLayer) { layer.__used = true; if (layer.__startIndex !== i) { layer.__dirty = true; } layer.__startIndex = i; if (!layer.incremental) { layer.__drawIndex = i; } else { layer.__drawIndex = -1; } updatePrevLayer(i); prevLayer = layer; } if ((el.__dirty & REDRAW_BIT) && !el.__inHover) { layer.__dirty = true; if (layer.incremental && layer.__drawIndex < 0) { layer.__drawIndex = i; } } } updatePrevLayer(i); this.eachBuiltinLayer(function (layer, z) { if (!layer.__used && layer.getElementCount() > 0) { layer.__dirty = true; layer.__startIndex = layer.__endIndex = layer.__drawIndex = 0; } if (layer.__dirty && layer.__drawIndex < 0) { layer.__drawIndex = layer.__startIndex; } }); }; CanvasPainter.prototype.clear = function () { this.eachBuiltinLayer(this._clearLayer); return this; }; CanvasPainter.prototype._clearLayer = function (layer) { layer.clear(); }; CanvasPainter.prototype.setBackgroundColor = function (backgroundColor) { this._backgroundColor = backgroundColor; core_util["each"](this._layers, function (layer) { layer.setUnpainted(); }); }; CanvasPainter.prototype.configLayer = function (zlevel, config) { if (config) { var layerConfig = this._layerConfig; if (!layerConfig[zlevel]) { layerConfig[zlevel] = config; } else { core_util["merge"](layerConfig[zlevel], config, true); } for (var i = 0; i < this._zlevelList.length; i++) { var _zlevel = this._zlevelList[i]; if (_zlevel === zlevel || _zlevel === zlevel + EL_AFTER_INCREMENTAL_INC) { var layer = this._layers[_zlevel]; core_util["merge"](layer, layerConfig[zlevel], true); } } } }; CanvasPainter.prototype.delLayer = function (zlevel) { var layers = this._layers; var zlevelList = this._zlevelList; var layer = layers[zlevel]; if (!layer) { return; } layer.dom.parentNode.removeChild(layer.dom); delete layers[zlevel]; zlevelList.splice(core_util["indexOf"](zlevelList, zlevel), 1); }; CanvasPainter.prototype.resize = function (width, height) { if (!this._domRoot.style) { if (width == null || height == null) { return; } this._width = width; this._height = height; this.getLayer(CANVAS_ZLEVEL).resize(width, height); } else { var domRoot = this._domRoot; domRoot.style.display = 'none'; var opts = this._opts; var root = this.root; width != null && (opts.width = width); height != null && (opts.height = height); width = getSize(root, 0, opts); height = getSize(root, 1, opts); domRoot.style.display = ''; if (this._width !== width || height !== this._height) { domRoot.style.width = width + 'px'; domRoot.style.height = height + 'px'; for (var id in this._layers) { if (this._layers.hasOwnProperty(id)) { this._layers[id].resize(width, height); } } this.refresh(true); } this._width = width; this._height = height; } return this; }; CanvasPainter.prototype.clearLayer = function (zlevel) { var layer = this._layers[zlevel]; if (layer) { layer.clear(); } }; CanvasPainter.prototype.dispose = function () { this.root.innerHTML = ''; this.root = this.storage = this._domRoot = this._layers = null; }; CanvasPainter.prototype.getRenderedCanvas = function (opts) { opts = opts || {}; if (this._singleCanvas && !this._compositeManually) { return this._layers[CANVAS_ZLEVEL].dom; } var imageLayer = new canvas_Layer('image', this, opts.pixelRatio || this.dpr); imageLayer.initContext(); imageLayer.clear(false, opts.backgroundColor || this._backgroundColor); var ctx = imageLayer.ctx; if (opts.pixelRatio <= this.dpr) { this.refresh(); var width_1 = imageLayer.dom.width; var height_1 = imageLayer.dom.height; this.eachLayer(function (layer) { if (layer.__builtin__) { ctx.drawImage(layer.dom, 0, 0, width_1, height_1); } else if (layer.renderToCanvas) { ctx.save(); layer.renderToCanvas(ctx); ctx.restore(); } }); } else { var scope = { inHover: false, viewWidth: this._width, viewHeight: this._height }; var displayList = this.storage.getDisplayList(true); for (var i = 0, len = displayList.length; i < len; i++) { var el = displayList[i]; brush(ctx, el, scope, i === len - 1); } } return imageLayer.dom; }; CanvasPainter.prototype.getWidth = function () { return this._width; }; CanvasPainter.prototype.getHeight = function () { return this._height; }; return CanvasPainter; }()); /* harmony default export */ var canvas_Painter = (Painter_CanvasPainter); ; // CONCATENATED MODULE: ./node_modules/echarts/lib/renderer/installCanvasRenderer.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 installCanvasRenderer_install(registers) { registers.registerPainter('canvas', canvas_Painter); } // CONCATENATED MODULE: ./node_modules/echarts/lib/export/renderers.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/line/LineSeries.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 LineSeries_LineSeriesModel = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(LineSeriesModel, _super); function LineSeriesModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = LineSeriesModel.type; _this.hasSymbolVisual = true; return _this; } LineSeriesModel.prototype.getInitialData = function (option) { if (false) { var coordSys = option.coordinateSystem; if (coordSys !== 'polar' && coordSys !== 'cartesian2d') { throw new Error('Line not support coordinateSystem besides cartesian and polar'); } } return helper_createSeriesData(null, this, { useEncodeDefaulter: true }); }; LineSeriesModel.prototype.getLegendIcon = function (opt) { var group = new graphic_Group(); var line = symbol_createSymbol('line', 0, opt.itemHeight / 2, opt.itemWidth, 0, opt.lineStyle.stroke, false); group.add(line); line.setStyle(opt.lineStyle); var visualType = this.getData().getVisual('symbol'); var visualRotate = this.getData().getVisual('symbolRotate'); var symbolType = visualType === 'none' ? 'circle' : visualType; // Symbol size is 80% when there is a line var size = opt.itemHeight * 0.8; var symbol = symbol_createSymbol(symbolType, (opt.itemWidth - size) / 2, (opt.itemHeight - size) / 2, size, size, opt.itemStyle.fill); group.add(symbol); symbol.setStyle(opt.itemStyle); var symbolRotate = opt.iconRotate === 'inherit' ? visualRotate : opt.iconRotate || 0; symbol.rotation = symbolRotate * Math.PI / 180; symbol.setOrigin([opt.itemWidth / 2, opt.itemHeight / 2]); if (symbolType.indexOf('empty') > -1) { symbol.style.stroke = symbol.style.fill; symbol.style.fill = '#fff'; symbol.style.lineWidth = 2; } return group; }; LineSeriesModel.type = 'series.line'; LineSeriesModel.dependencies = ['grid', 'polar']; LineSeriesModel.defaultOption = { // zlevel: 0, z: 3, coordinateSystem: 'cartesian2d', legendHoverLink: true, clip: true, label: { position: 'top' }, // itemStyle: { // }, endLabel: { show: false, valueAnimation: true, distance: 8 }, lineStyle: { width: 2, type: 'solid' }, emphasis: { scale: true }, // 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', 'lttb'. sampling: 'none', animationEasing: 'linear', // Disable progressive progressive: 0, hoverLayerThreshold: Infinity, universalTransition: { divideShape: 'clone' }, triggerLineEvent: false }; return LineSeriesModel; }(Series); /* harmony default export */ var LineSeries = (LineSeries_LineSeriesModel); // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/helper/labelHelper.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ /** * @return label string. Not null/undefined */ function getDefaultLabel(data, dataIndex) { var labelDims = data.mapDimensionsAll('defaultedLabel'); var len = labelDims.length; // Simple optimization (in lots of cases, label dims length is 1) if (len === 1) { var rawVal = retrieveRawValue(data, dataIndex, labelDims[0]); return rawVal != null ? rawVal + '' : null; } else if (len) { var vals = []; for (var i = 0; i < labelDims.length; i++) { vals.push(retrieveRawValue(data, dataIndex, labelDims[i])); } return vals.join(' '); } } function getDefaultInterpolatedLabel(data, interpolatedValue) { var labelDims = data.mapDimensionsAll('defaultedLabel'); if (!Object(core_util["isArray"])(interpolatedValue)) { return interpolatedValue + ''; } var vals = []; for (var i = 0; i < labelDims.length; i++) { var dimIndex = data.getDimensionIndex(labelDims[i]); if (dimIndex >= 0) { vals.push(interpolatedValue[dimIndex]); } } return vals.join(' '); } // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/helper/Symbol.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 Symbol_Symbol = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(Symbol, _super); function Symbol(data, idx, seriesScope, opts) { var _this = _super.call(this) || this; _this.updateData(data, idx, seriesScope, opts); return _this; } Symbol.prototype._createSymbol = function (symbolType, data, idx, symbolSize, keepAspect) { // Remove paths created before this.removeAll(); // let symbolPath = createSymbol( // symbolType, -0.5, -0.5, 1, 1, color // ); // If width/height are set too small (e.g., set to 1) on ios10 // and macOS Sierra, a circle stroke become a rect, no matter what // the scale is set. So we set width/height as 2. See #4150. var symbolPath = symbol_createSymbol(symbolType, -1, -1, 2, 2, null, keepAspect); symbolPath.attr({ z2: 100, culling: true, scaleX: symbolSize[0] / 2, scaleY: symbolSize[1] / 2 }); // Rewrite drift method symbolPath.drift = driftSymbol; this._symbolType = symbolType; this.add(symbolPath); }; /** * Stop animation * @param {boolean} toLastFrame */ Symbol.prototype.stopSymbolAnimation = function (toLastFrame) { this.childAt(0).stopAnimation(null, toLastFrame); }; Symbol.prototype.getSymbolType = function () { return this._symbolType; }; /** * FIXME: * Caution: This method breaks the encapsulation of this module, * but it indeed brings convenience. So do not use the method * unless you detailedly know all the implements of `Symbol`, * especially animation. * * Get symbol path element. */ Symbol.prototype.getSymbolPath = function () { return this.childAt(0); }; /** * Highlight symbol */ Symbol.prototype.highlight = function () { enterEmphasis(this.childAt(0)); }; /** * Downplay symbol */ Symbol.prototype.downplay = function () { leaveEmphasis(this.childAt(0)); }; /** * @param {number} zlevel * @param {number} z */ Symbol.prototype.setZ = function (zlevel, z) { var symbolPath = this.childAt(0); symbolPath.zlevel = zlevel; symbolPath.z = z; }; Symbol.prototype.setDraggable = function (draggable, hasCursorOption) { var symbolPath = this.childAt(0); symbolPath.draggable = draggable; symbolPath.cursor = !hasCursorOption && draggable ? 'move' : symbolPath.cursor; }; /** * Update symbol properties */ Symbol.prototype.updateData = function (data, idx, seriesScope, opts) { this.silent = false; var symbolType = data.getItemVisual(idx, 'symbol') || 'circle'; var seriesModel = data.hostModel; var symbolSize = Symbol.getSymbolSize(data, idx); var isInit = symbolType !== this._symbolType; var disableAnimation = opts && opts.disableAnimation; if (isInit) { var keepAspect = data.getItemVisual(idx, 'symbolKeepAspect'); this._createSymbol(symbolType, data, idx, symbolSize, keepAspect); } else { var symbolPath = this.childAt(0); symbolPath.silent = false; var target = { scaleX: symbolSize[0] / 2, scaleY: symbolSize[1] / 2 }; disableAnimation ? symbolPath.attr(target) : updateProps(symbolPath, target, seriesModel, idx); saveOldStyle(symbolPath); } this._updateCommon(data, idx, symbolSize, seriesScope, opts); if (isInit) { var symbolPath = this.childAt(0); if (!disableAnimation) { var target = { scaleX: this._sizeX, scaleY: this._sizeY, style: { // Always fadeIn. Because it has fadeOut animation when symbol is removed.. opacity: symbolPath.style.opacity } }; symbolPath.scaleX = symbolPath.scaleY = 0; symbolPath.style.opacity = 0; initProps(symbolPath, target, seriesModel, idx); } } if (disableAnimation) { // Must stop leave transition manually if don't call initProps or updateProps. this.childAt(0).stopAnimation('leave'); } }; Symbol.prototype._updateCommon = function (data, idx, symbolSize, seriesScope, opts) { var symbolPath = this.childAt(0); var seriesModel = data.hostModel; var emphasisItemStyle; var blurItemStyle; var selectItemStyle; var focus; var blurScope; var emphasisDisabled; var labelStatesModels; var hoverScale; var cursorStyle; if (seriesScope) { emphasisItemStyle = seriesScope.emphasisItemStyle; blurItemStyle = seriesScope.blurItemStyle; selectItemStyle = seriesScope.selectItemStyle; focus = seriesScope.focus; blurScope = seriesScope.blurScope; labelStatesModels = seriesScope.labelStatesModels; hoverScale = seriesScope.hoverScale; cursorStyle = seriesScope.cursorStyle; emphasisDisabled = seriesScope.emphasisDisabled; } if (!seriesScope || data.hasItemOption) { var itemModel = seriesScope && seriesScope.itemModel ? seriesScope.itemModel : data.getItemModel(idx); var emphasisModel = itemModel.getModel('emphasis'); emphasisItemStyle = emphasisModel.getModel('itemStyle').getItemStyle(); selectItemStyle = itemModel.getModel(['select', 'itemStyle']).getItemStyle(); blurItemStyle = itemModel.getModel(['blur', 'itemStyle']).getItemStyle(); focus = emphasisModel.get('focus'); blurScope = emphasisModel.get('blurScope'); emphasisDisabled = emphasisModel.get('disabled'); labelStatesModels = getLabelStatesModels(itemModel); hoverScale = emphasisModel.getShallow('scale'); cursorStyle = itemModel.getShallow('cursor'); } var symbolRotate = data.getItemVisual(idx, 'symbolRotate'); symbolPath.attr('rotation', (symbolRotate || 0) * Math.PI / 180 || 0); var symbolOffset = normalizeSymbolOffset(data.getItemVisual(idx, 'symbolOffset'), symbolSize); if (symbolOffset) { symbolPath.x = symbolOffset[0]; symbolPath.y = symbolOffset[1]; } cursorStyle && symbolPath.attr('cursor', cursorStyle); var symbolStyle = data.getItemVisual(idx, 'style'); var visualColor = symbolStyle.fill; if (symbolPath instanceof graphic_Image) { var pathStyle = symbolPath.style; symbolPath.useStyle(Object(core_util["extend"])({ // TODO other properties like x, y ? image: pathStyle.image, x: pathStyle.x, y: pathStyle.y, width: pathStyle.width, height: pathStyle.height }, symbolStyle)); } else { if (symbolPath.__isEmptyBrush) { // fill and stroke will be swapped if it's empty. // So we cloned a new style to avoid it affecting the original style in visual storage. // TODO Better implementation. No empty logic! symbolPath.useStyle(Object(core_util["extend"])({}, symbolStyle)); } else { symbolPath.useStyle(symbolStyle); } // Disable decal because symbol scale will been applied on the decal. symbolPath.style.decal = null; symbolPath.setColor(visualColor, opts && opts.symbolInnerColor); symbolPath.style.strokeNoScale = true; } var liftZ = data.getItemVisual(idx, 'liftZ'); var z2Origin = this._z2; if (liftZ != null) { if (z2Origin == null) { this._z2 = symbolPath.z2; symbolPath.z2 += liftZ; } } else if (z2Origin != null) { symbolPath.z2 = z2Origin; this._z2 = null; } var useNameLabel = opts && opts.useNameLabel; setLabelStyle(symbolPath, labelStatesModels, { labelFetcher: seriesModel, labelDataIndex: idx, defaultText: getLabelDefaultText, inheritColor: visualColor, defaultOpacity: symbolStyle.opacity }); // Do not execute util needed. function getLabelDefaultText(idx) { return useNameLabel ? data.getName(idx) : getDefaultLabel(data, idx); } this._sizeX = symbolSize[0] / 2; this._sizeY = symbolSize[1] / 2; var emphasisState = symbolPath.ensureState('emphasis'); emphasisState.style = emphasisItemStyle; symbolPath.ensureState('select').style = selectItemStyle; symbolPath.ensureState('blur').style = blurItemStyle; // null / undefined / true means to use default strategy. // 0 / false / negative number / NaN / Infinity means no scale. var scaleRatio = hoverScale == null || hoverScale === true ? Math.max(1.1, 3 / this._sizeY) // PENDING: restrict hoverScale > 1? It seems unreasonable to scale down : isFinite(hoverScale) && hoverScale > 0 ? +hoverScale : 1; // always set scale to allow resetting emphasisState.scaleX = this._sizeX * scaleRatio; emphasisState.scaleY = this._sizeY * scaleRatio; this.setSymbolScale(1); toggleHoverEmphasis(this, focus, blurScope, emphasisDisabled); }; Symbol.prototype.setSymbolScale = function (scale) { this.scaleX = this.scaleY = scale; }; Symbol.prototype.fadeOut = function (cb, seriesModel, opt) { var symbolPath = this.childAt(0); var dataIndex = getECData(this).dataIndex; var animationOpt = opt && opt.animation; // Avoid mistaken hover when fading out this.silent = symbolPath.silent = true; // Not show text when animating if (opt && opt.fadeLabel) { var textContent = symbolPath.getTextContent(); if (textContent) { removeElement(textContent, { style: { opacity: 0 } }, seriesModel, { dataIndex: dataIndex, removeOpt: animationOpt, cb: function () { symbolPath.removeTextContent(); } }); } } else { symbolPath.removeTextContent(); } removeElement(symbolPath, { style: { opacity: 0 }, scaleX: 0, scaleY: 0 }, seriesModel, { dataIndex: dataIndex, cb: cb, removeOpt: animationOpt }); }; Symbol.getSymbolSize = function (data, idx) { return normalizeSymbolSize(data.getItemVisual(idx, 'symbolSize')); }; return Symbol; }(graphic_Group); function driftSymbol(dx, dy) { this.parent.drift(dx, dy); } /* harmony default export */ var helper_Symbol = (Symbol_Symbol); // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/helper/SymbolDraw.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 symbolNeedsDraw(data, point, idx, opt) { return point && !isNaN(point[0]) && !isNaN(point[1]) && !(opt.isIgnore && opt.isIgnore(idx)) // We do not set clipShape on group, because it will cut part of // the symbol element shape. We use the same clip shape here as // the line clip. && !(opt.clipShape && !opt.clipShape.contain(point[0], point[1])) && data.getItemVisual(idx, 'symbol') !== 'none'; } function normalizeUpdateOpt(opt) { if (opt != null && !Object(core_util["isObject"])(opt)) { opt = { isIgnore: opt }; } return opt || {}; } function makeSeriesScope(data) { var seriesModel = data.hostModel; var emphasisModel = seriesModel.getModel('emphasis'); return { emphasisItemStyle: emphasisModel.getModel('itemStyle').getItemStyle(), blurItemStyle: seriesModel.getModel(['blur', 'itemStyle']).getItemStyle(), selectItemStyle: seriesModel.getModel(['select', 'itemStyle']).getItemStyle(), focus: emphasisModel.get('focus'), blurScope: emphasisModel.get('blurScope'), emphasisDisabled: emphasisModel.get('disabled'), hoverScale: emphasisModel.get('scale'), labelStatesModels: getLabelStatesModels(seriesModel), cursorStyle: seriesModel.get('cursor') }; } var SymbolDraw_SymbolDraw = /** @class */function () { function SymbolDraw(SymbolCtor) { this.group = new graphic_Group(); this._SymbolCtor = SymbolCtor || helper_Symbol; } /** * Update symbols draw by new data */ SymbolDraw.prototype.updateData = function (data, opt) { // Remove progressive els. this._progressiveEls = null; opt = normalizeUpdateOpt(opt); var group = this.group; var seriesModel = data.hostModel; var oldData = this._data; var SymbolCtor = this._SymbolCtor; var disableAnimation = opt.disableAnimation; var seriesScope = makeSeriesScope(data); var symbolUpdateOpt = { disableAnimation: disableAnimation }; var getSymbolPoint = opt.getSymbolPoint || function (idx) { return data.getItemLayout(idx); }; // There is no oldLineData only when first rendering or switching from // stream mode to normal mode, where previous elements should be removed. if (!oldData) { group.removeAll(); } data.diff(oldData).add(function (newIdx) { var point = getSymbolPoint(newIdx); if (symbolNeedsDraw(data, point, newIdx, opt)) { var symbolEl = new SymbolCtor(data, newIdx, seriesScope, symbolUpdateOpt); symbolEl.setPosition(point); data.setItemGraphicEl(newIdx, symbolEl); group.add(symbolEl); } }).update(function (newIdx, oldIdx) { var symbolEl = oldData.getItemGraphicEl(oldIdx); var point = getSymbolPoint(newIdx); if (!symbolNeedsDraw(data, point, newIdx, opt)) { group.remove(symbolEl); return; } var newSymbolType = data.getItemVisual(newIdx, 'symbol') || 'circle'; var oldSymbolType = symbolEl && symbolEl.getSymbolType && symbolEl.getSymbolType(); if (!symbolEl // Create a new if symbol type changed. || oldSymbolType && oldSymbolType !== newSymbolType) { group.remove(symbolEl); symbolEl = new SymbolCtor(data, newIdx, seriesScope, symbolUpdateOpt); symbolEl.setPosition(point); } else { symbolEl.updateData(data, newIdx, seriesScope, symbolUpdateOpt); var target = { x: point[0], y: point[1] }; disableAnimation ? symbolEl.attr(target) : updateProps(symbolEl, target, seriesModel); } // Add back group.add(symbolEl); data.setItemGraphicEl(newIdx, symbolEl); }).remove(function (oldIdx) { var el = oldData.getItemGraphicEl(oldIdx); el && el.fadeOut(function () { group.remove(el); }, seriesModel); }).execute(); this._getSymbolPoint = getSymbolPoint; this._data = data; }; ; SymbolDraw.prototype.updateLayout = function () { var _this = this; var data = this._data; if (data) { // Not use animation data.eachItemGraphicEl(function (el, idx) { var point = _this._getSymbolPoint(idx); el.setPosition(point); el.markRedraw(); }); } }; ; SymbolDraw.prototype.incrementalPrepareUpdate = function (data) { this._seriesScope = makeSeriesScope(data); this._data = null; this.group.removeAll(); }; ; /** * Update symbols draw by new data */ SymbolDraw.prototype.incrementalUpdate = function (taskParams, data, opt) { // Clear this._progressiveEls = []; opt = normalizeUpdateOpt(opt); function updateIncrementalAndHover(el) { if (!el.isGroup) { el.incremental = true; el.ensureState('emphasis').hoverLayer = true; } } for (var idx = taskParams.start; idx < taskParams.end; idx++) { var point = data.getItemLayout(idx); if (symbolNeedsDraw(data, point, idx, opt)) { var el = new this._SymbolCtor(data, idx, this._seriesScope); el.traverse(updateIncrementalAndHover); el.setPosition(point); this.group.add(el); data.setItemGraphicEl(idx, el); this._progressiveEls.push(el); } } }; ; SymbolDraw.prototype.eachRendered = function (cb) { traverseElements(this._progressiveEls || this.group, cb); }; SymbolDraw.prototype.remove = function (enableAnimation) { var group = this.group; var data = this._data; // Incremental model do not have this._data. if (data && enableAnimation) { data.eachItemGraphicEl(function (el) { el.fadeOut(function () { group.remove(el); }, data.hostModel); }); } else { group.removeAll(); } }; ; return SymbolDraw; }(); /* harmony default export */ var helper_SymbolDraw = (SymbolDraw_SymbolDraw); // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/line/helper.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 prepareDataCoordInfo(coordSys, data, valueOrigin) { var baseAxis = coordSys.getBaseAxis(); var valueAxis = coordSys.getOtherAxis(baseAxis); var valueStart = getValueStart(valueAxis, valueOrigin); var baseAxisDim = baseAxis.dim; var valueAxisDim = valueAxis.dim; var valueDim = data.mapDimension(valueAxisDim); var baseDim = data.mapDimension(baseAxisDim); var baseDataOffset = valueAxisDim === 'x' || valueAxisDim === 'radius' ? 1 : 0; var dims = Object(core_util["map"])(coordSys.dimensions, function (coordDim) { return data.mapDimension(coordDim); }); var stacked = false; var stackResultDim = data.getCalculationInfo('stackResultDimension'); if (isDimensionStacked(data, dims[0] /* , dims[1] */)) { // jshint ignore:line stacked = true; dims[0] = stackResultDim; } if (isDimensionStacked(data, dims[1] /* , dims[0] */)) { // jshint ignore:line stacked = true; dims[1] = stackResultDim; } return { dataDimsForPoint: dims, valueStart: valueStart, valueAxisDim: valueAxisDim, baseAxisDim: baseAxisDim, stacked: !!stacked, valueDim: valueDim, baseDim: baseDim, baseDataOffset: baseDataOffset, stackedOverDimension: data.getCalculationInfo('stackedOverDimension') }; } function getValueStart(valueAxis, valueOrigin) { var valueStart = 0; var extent = valueAxis.scale.getExtent(); if (valueOrigin === 'start') { valueStart = extent[0]; } else if (valueOrigin === 'end') { valueStart = extent[1]; } // If origin is specified as a number, use it as // valueStart directly else if (Object(core_util["isNumber"])(valueOrigin) && !isNaN(valueOrigin)) { valueStart = valueOrigin; } // auto else { // Both positive if (extent[0] > 0) { valueStart = extent[0]; } // Both negative else if (extent[1] < 0) { valueStart = extent[1]; } // If is one positive, and one negative, onZero shall be true } return valueStart; } function getStackedOnPoint(dataCoordInfo, coordSys, data, idx) { var value = NaN; if (dataCoordInfo.stacked) { value = data.get(data.getCalculationInfo('stackedOverDimension'), idx); } if (isNaN(value)) { value = dataCoordInfo.valueStart; } var baseDataOffset = dataCoordInfo.baseDataOffset; var stackedData = []; stackedData[baseDataOffset] = data.get(dataCoordInfo.baseDim, idx); stackedData[1 - baseDataOffset] = value; return coordSys.dataToPoint(stackedData); } // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/line/lineAnimationDiff.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 diffData(oldData, newData) { var diffResult = []; newData.diff(oldData).add(function (idx) { diffResult.push({ cmd: '+', idx: idx }); }).update(function (newIdx, oldIdx) { diffResult.push({ cmd: '=', idx: oldIdx, idx1: newIdx }); }).remove(function (idx) { diffResult.push({ cmd: '-', idx: idx }); }).execute(); return diffResult; } function lineAnimationDiff(oldData, newData, oldStackedOnPoints, newStackedOnPoints, oldCoordSys, newCoordSys, oldValueOrigin, newValueOrigin) { var diff = diffData(oldData, newData); // let newIdList = newData.mapArray(newData.getId); // let oldIdList = oldData.mapArray(oldData.getId); // convertToIntId(newIdList, oldIdList); // // FIXME One data ? // diff = arrayDiff(oldIdList, newIdList); var currPoints = []; var nextPoints = []; // Points for stacking base line var currStackedPoints = []; var nextStackedPoints = []; var status = []; var sortedIndices = []; var rawIndices = []; var newDataOldCoordInfo = prepareDataCoordInfo(oldCoordSys, newData, oldValueOrigin); // const oldDataNewCoordInfo = prepareDataCoordInfo(newCoordSys, oldData, newValueOrigin); var oldPoints = oldData.getLayout('points') || []; var newPoints = newData.getLayout('points') || []; for (var i = 0; i < diff.length; i++) { var diffItem = diff[i]; var pointAdded = true; var oldIdx2 = void 0; var newIdx2 = void 0; // FIXME, animation is not so perfect when dataZoom window moves fast // Which is in case remvoing or add more than one data in the tail or head switch (diffItem.cmd) { case '=': oldIdx2 = diffItem.idx * 2; newIdx2 = diffItem.idx1 * 2; var currentX = oldPoints[oldIdx2]; var currentY = oldPoints[oldIdx2 + 1]; var nextX = newPoints[newIdx2]; var nextY = newPoints[newIdx2 + 1]; // If previous data is NaN, use next point directly if (isNaN(currentX) || isNaN(currentY)) { currentX = nextX; currentY = nextY; } currPoints.push(currentX, currentY); nextPoints.push(nextX, nextY); currStackedPoints.push(oldStackedOnPoints[oldIdx2], oldStackedOnPoints[oldIdx2 + 1]); nextStackedPoints.push(newStackedOnPoints[newIdx2], newStackedOnPoints[newIdx2 + 1]); rawIndices.push(newData.getRawIndex(diffItem.idx1)); break; case '+': var newIdx = diffItem.idx; var newDataDimsForPoint = newDataOldCoordInfo.dataDimsForPoint; var oldPt = oldCoordSys.dataToPoint([newData.get(newDataDimsForPoint[0], newIdx), newData.get(newDataDimsForPoint[1], newIdx)]); newIdx2 = newIdx * 2; currPoints.push(oldPt[0], oldPt[1]); nextPoints.push(newPoints[newIdx2], newPoints[newIdx2 + 1]); var stackedOnPoint = getStackedOnPoint(newDataOldCoordInfo, oldCoordSys, newData, newIdx); currStackedPoints.push(stackedOnPoint[0], stackedOnPoint[1]); nextStackedPoints.push(newStackedOnPoints[newIdx2], newStackedOnPoints[newIdx2 + 1]); rawIndices.push(newData.getRawIndex(newIdx)); break; case '-': pointAdded = false; } // Original indices if (pointAdded) { status.push(diffItem); sortedIndices.push(sortedIndices.length); } } // Diff result may be crossed if all items are changed // Sort by data index sortedIndices.sort(function (a, b) { return rawIndices[a] - rawIndices[b]; }); var len = currPoints.length; var sortedCurrPoints = createFloat32Array(len); var sortedNextPoints = createFloat32Array(len); var sortedCurrStackedPoints = createFloat32Array(len); var sortedNextStackedPoints = createFloat32Array(len); var sortedStatus = []; for (var i = 0; i < sortedIndices.length; i++) { var idx = sortedIndices[i]; var i2 = i * 2; var idx2 = idx * 2; sortedCurrPoints[i2] = currPoints[idx2]; sortedCurrPoints[i2 + 1] = currPoints[idx2 + 1]; sortedNextPoints[i2] = nextPoints[idx2]; sortedNextPoints[i2 + 1] = nextPoints[idx2 + 1]; sortedCurrStackedPoints[i2] = currStackedPoints[idx2]; sortedCurrStackedPoints[i2 + 1] = currStackedPoints[idx2 + 1]; sortedNextStackedPoints[i2] = nextStackedPoints[idx2]; sortedNextStackedPoints[i2 + 1] = nextStackedPoints[idx2 + 1]; sortedStatus[i] = status[idx]; } return { current: sortedCurrPoints, next: sortedNextPoints, stackedOnCurrent: sortedCurrStackedPoints, stackedOnNext: sortedNextStackedPoints, status: sortedStatus }; } // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/line/poly.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ // Poly path support NaN point var poly_mathMin = Math.min; var poly_mathMax = Math.max; function isPointNull(x, y) { return isNaN(x) || isNaN(y); } /** * Draw smoothed line in non-monotone, in may cause undesired curve in extreme * situations. This should be used when points are non-monotone neither in x or * y dimension. */ function drawSegment(ctx, points, start, segLen, allLen, dir, smooth, smoothMonotone, connectNulls) { var prevX; var prevY; var cpx0; var cpy0; var cpx1; var cpy1; var idx = start; var k = 0; for (; k < segLen; k++) { var x = points[idx * 2]; var y = points[idx * 2 + 1]; if (idx >= allLen || idx < 0) { break; } if (isPointNull(x, y)) { if (connectNulls) { idx += dir; continue; } break; } if (idx === start) { ctx[dir > 0 ? 'moveTo' : 'lineTo'](x, y); cpx0 = x; cpy0 = y; } else { var dx = x - prevX; var dy = y - prevY; // Ignore tiny segment. if (dx * dx + dy * dy < 0.5) { idx += dir; continue; } if (smooth > 0) { var nextIdx = idx + dir; var nextX = points[nextIdx * 2]; var nextY = points[nextIdx * 2 + 1]; // Ignore duplicate point while (nextX === x && nextY === y && k < segLen) { k++; nextIdx += dir; idx += dir; nextX = points[nextIdx * 2]; nextY = points[nextIdx * 2 + 1]; x = points[idx * 2]; y = points[idx * 2 + 1]; dx = x - prevX; dy = y - prevY; } var tmpK = k + 1; if (connectNulls) { // Find next point not null while (isPointNull(nextX, nextY) && tmpK < segLen) { tmpK++; nextIdx += dir; nextX = points[nextIdx * 2]; nextY = points[nextIdx * 2 + 1]; } } var ratioNextSeg = 0.5; var vx = 0; var vy = 0; var nextCpx0 = void 0; var nextCpy0 = void 0; // Is last point if (tmpK >= segLen || isPointNull(nextX, nextY)) { cpx1 = x; cpy1 = y; } else { vx = nextX - prevX; vy = nextY - prevY; var dx0 = x - prevX; var dx1 = nextX - x; var dy0 = y - prevY; var dy1 = nextY - y; var lenPrevSeg = void 0; var lenNextSeg = void 0; if (smoothMonotone === 'x') { lenPrevSeg = Math.abs(dx0); lenNextSeg = Math.abs(dx1); var dir_1 = vx > 0 ? 1 : -1; cpx1 = x - dir_1 * lenPrevSeg * smooth; cpy1 = y; nextCpx0 = x + dir_1 * lenNextSeg * smooth; nextCpy0 = y; } else if (smoothMonotone === 'y') { lenPrevSeg = Math.abs(dy0); lenNextSeg = Math.abs(dy1); var dir_2 = vy > 0 ? 1 : -1; cpx1 = x; cpy1 = y - dir_2 * lenPrevSeg * smooth; nextCpx0 = x; nextCpy0 = y + dir_2 * lenNextSeg * smooth; } else { lenPrevSeg = Math.sqrt(dx0 * dx0 + dy0 * dy0); lenNextSeg = Math.sqrt(dx1 * dx1 + dy1 * dy1); // Use ratio of seg length ratioNextSeg = lenNextSeg / (lenNextSeg + lenPrevSeg); cpx1 = x - vx * smooth * (1 - ratioNextSeg); cpy1 = y - vy * smooth * (1 - ratioNextSeg); // cp0 of next segment nextCpx0 = x + vx * smooth * ratioNextSeg; nextCpy0 = y + vy * smooth * ratioNextSeg; // Smooth constraint between point and next point. // Avoid exceeding extreme after smoothing. nextCpx0 = poly_mathMin(nextCpx0, poly_mathMax(nextX, x)); nextCpy0 = poly_mathMin(nextCpy0, poly_mathMax(nextY, y)); nextCpx0 = poly_mathMax(nextCpx0, poly_mathMin(nextX, x)); nextCpy0 = poly_mathMax(nextCpy0, poly_mathMin(nextY, y)); // Reclaculate cp1 based on the adjusted cp0 of next seg. vx = nextCpx0 - x; vy = nextCpy0 - y; cpx1 = x - vx * lenPrevSeg / lenNextSeg; cpy1 = y - vy * lenPrevSeg / lenNextSeg; // Smooth constraint between point and prev point. // Avoid exceeding extreme after smoothing. cpx1 = poly_mathMin(cpx1, poly_mathMax(prevX, x)); cpy1 = poly_mathMin(cpy1, poly_mathMax(prevY, y)); cpx1 = poly_mathMax(cpx1, poly_mathMin(prevX, x)); cpy1 = poly_mathMax(cpy1, poly_mathMin(prevY, y)); // Adjust next cp0 again. vx = x - cpx1; vy = y - cpy1; nextCpx0 = x + vx * lenNextSeg / lenPrevSeg; nextCpy0 = y + vy * lenNextSeg / lenPrevSeg; } } ctx.bezierCurveTo(cpx0, cpy0, cpx1, cpy1, x, y); cpx0 = nextCpx0; cpy0 = nextCpy0; } else { ctx.lineTo(x, y); } } prevX = x; prevY = y; idx += dir; } return k; } var ECPolylineShape = /** @class */function () { function ECPolylineShape() { this.smooth = 0; this.smoothConstraint = true; } return ECPolylineShape; }(); var poly_ECPolyline = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(ECPolyline, _super); function ECPolyline(opts) { var _this = _super.call(this, opts) || this; _this.type = 'ec-polyline'; return _this; } ECPolyline.prototype.getDefaultStyle = function () { return { stroke: '#000', fill: null }; }; ECPolyline.prototype.getDefaultShape = function () { return new ECPolylineShape(); }; ECPolyline.prototype.buildPath = function (ctx, shape) { var points = shape.points; var i = 0; var len = points.length / 2; // const result = getBoundingBox(points, shape.smoothConstraint); if (shape.connectNulls) { // Must remove first and last null values avoid draw error in polygon for (; len > 0; len--) { if (!isPointNull(points[len * 2 - 2], points[len * 2 - 1])) { break; } } for (; i < len; i++) { if (!isPointNull(points[i * 2], points[i * 2 + 1])) { break; } } } while (i < len) { i += drawSegment(ctx, points, i, len, len, 1, shape.smooth, shape.smoothMonotone, shape.connectNulls) + 1; } }; ECPolyline.prototype.getPointOn = function (xOrY, dim) { if (!this.path) { this.createPathProxy(); this.buildPath(this.path, this.shape); } var path = this.path; var data = path.data; var CMD = core_PathProxy.CMD; var x0; var y0; var isDimX = dim === 'x'; var roots = []; for (var i = 0; i < data.length;) { var cmd = data[i++]; var x = void 0; var y = void 0; var x2 = void 0; var y2 = void 0; var x3 = void 0; var y3 = void 0; var t = void 0; switch (cmd) { case CMD.M: x0 = data[i++]; y0 = data[i++]; break; case CMD.L: x = data[i++]; y = data[i++]; t = isDimX ? (xOrY - x0) / (x - x0) : (xOrY - y0) / (y - y0); if (t <= 1 && t >= 0) { var val = isDimX ? (y - y0) * t + y0 : (x - x0) * t + x0; return isDimX ? [xOrY, val] : [val, xOrY]; } x0 = x; y0 = y; break; case CMD.C: x = data[i++]; y = data[i++]; x2 = data[i++]; y2 = data[i++]; x3 = data[i++]; y3 = data[i++]; var nRoot = isDimX ? cubicRootAt(x0, x, x2, x3, xOrY, roots) : cubicRootAt(y0, y, y2, y3, xOrY, roots); if (nRoot > 0) { for (var i_1 = 0; i_1 < nRoot; i_1++) { var t_1 = roots[i_1]; if (t_1 <= 1 && t_1 >= 0) { var val = isDimX ? curve_cubicAt(y0, y, y2, y3, t_1) : curve_cubicAt(x0, x, x2, x3, t_1); return isDimX ? [xOrY, val] : [val, xOrY]; } } } x0 = x3; y0 = y3; break; } } }; return ECPolyline; }(graphic_Path); var poly_ECPolygonShape = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(ECPolygonShape, _super); function ECPolygonShape() { return _super !== null && _super.apply(this, arguments) || this; } return ECPolygonShape; }(ECPolylineShape); var poly_ECPolygon = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(ECPolygon, _super); function ECPolygon(opts) { var _this = _super.call(this, opts) || this; _this.type = 'ec-polygon'; return _this; } ECPolygon.prototype.getDefaultShape = function () { return new poly_ECPolygonShape(); }; ECPolygon.prototype.buildPath = function (ctx, shape) { var points = shape.points; var stackedOnPoints = shape.stackedOnPoints; var i = 0; var len = points.length / 2; var smoothMonotone = shape.smoothMonotone; if (shape.connectNulls) { // Must remove first and last null values avoid draw error in polygon for (; len > 0; len--) { if (!isPointNull(points[len * 2 - 2], points[len * 2 - 1])) { break; } } for (; i < len; i++) { if (!isPointNull(points[i * 2], points[i * 2 + 1])) { break; } } } while (i < len) { var k = drawSegment(ctx, points, i, len, len, 1, shape.smooth, smoothMonotone, shape.connectNulls); drawSegment(ctx, stackedOnPoints, i + k - 1, k, len, -1, shape.stackedOnSmooth, smoothMonotone, shape.connectNulls); i += k + 1; ctx.closePath(); } }; return ECPolygon; }(graphic_Path); // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/helper/createClipPathFromCoordSys.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 createGridClipPath(cartesian, hasAnimation, seriesModel, done, during) { var rect = cartesian.getArea(); var x = rect.x; var y = rect.y; var width = rect.width; var height = rect.height; var lineWidth = seriesModel.get(['lineStyle', 'width']) || 0; // Expand the clip path a bit to avoid the border is clipped and looks thinner x -= lineWidth / 2; y -= lineWidth / 2; width += lineWidth; height += lineWidth; // fix: https://github.com/apache/incubator-echarts/issues/11369 width = Math.ceil(width); if (x !== Math.floor(x)) { x = Math.floor(x); // if no extra 1px on `width`, it will still be clipped since `x` is floored width++; } var clipPath = new shape_Rect({ shape: { x: x, y: y, width: width, height: height } }); if (hasAnimation) { var baseAxis = cartesian.getBaseAxis(); var isHorizontal = baseAxis.isHorizontal(); var isAxisInversed = baseAxis.inverse; if (isHorizontal) { if (isAxisInversed) { clipPath.shape.x += width; } clipPath.shape.width = 0; } else { if (!isAxisInversed) { clipPath.shape.y += height; } clipPath.shape.height = 0; } var duringCb = Object(core_util["isFunction"])(during) ? function (percent) { during(percent, clipPath); } : null; initProps(clipPath, { shape: { width: width, height: height, x: x, y: y } }, seriesModel, null, done, duringCb); } return clipPath; } function createPolarClipPath(polar, hasAnimation, seriesModel) { var sectorArea = polar.getArea(); // Avoid float number rounding error for symbol on the edge of axis extent. var r0 = round(sectorArea.r0, 1); var r = round(sectorArea.r, 1); var clipPath = new shape_Sector({ shape: { cx: round(polar.cx, 1), cy: round(polar.cy, 1), r0: r0, r: r, startAngle: sectorArea.startAngle, endAngle: sectorArea.endAngle, clockwise: sectorArea.clockwise } }); if (hasAnimation) { var isRadial = polar.getBaseAxis().dim === 'angle'; if (isRadial) { clipPath.shape.endAngle = sectorArea.startAngle; } else { clipPath.shape.r = r0; } initProps(clipPath, { shape: { endAngle: sectorArea.endAngle, r: r } }, seriesModel); } return clipPath; } function createClipPath(coordSys, hasAnimation, seriesModel, done, during) { if (!coordSys) { return null; } else if (coordSys.type === 'polar') { return createPolarClipPath(coordSys, hasAnimation, seriesModel); } else if (coordSys.type === 'cartesian2d') { return createGridClipPath(coordSys, hasAnimation, seriesModel, done, during); } return null; } // CONCATENATED MODULE: ./node_modules/echarts/lib/coord/CoordinateSystem.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 isCoordinateSystemType(coordSys, type) { return coordSys.type === type; } // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/line/LineView.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ // FIXME step not support polar function isPointsSame(points1, points2) { if (points1.length !== points2.length) { return; } for (var i = 0; i < points1.length; i++) { if (points1[i] !== points2[i]) { return; } } return true; } function bboxFromPoints(points) { var minX = Infinity; var minY = Infinity; var maxX = -Infinity; var maxY = -Infinity; for (var i = 0; i < points.length;) { var x = points[i++]; var y = points[i++]; if (!isNaN(x)) { minX = Math.min(x, minX); maxX = Math.max(x, maxX); } if (!isNaN(y)) { minY = Math.min(y, minY); maxY = Math.max(y, maxY); } } return [[minX, minY], [maxX, maxY]]; } function getBoundingDiff(points1, points2) { var _a = bboxFromPoints(points1), min1 = _a[0], max1 = _a[1]; var _b = bboxFromPoints(points2), min2 = _b[0], max2 = _b[1]; // Get a max value from each corner of two boundings. return Math.max(Math.abs(min1[0] - min2[0]), Math.abs(min1[1] - min2[1]), Math.abs(max1[0] - max2[0]), Math.abs(max1[1] - max2[1])); } function getSmooth(smooth) { return core_util["isNumber"](smooth) ? smooth : smooth ? 0.5 : 0; } function getStackedOnPoints(coordSys, data, dataCoordInfo) { if (!dataCoordInfo.valueDim) { return []; } var len = data.count(); var points = createFloat32Array(len * 2); for (var idx = 0; idx < len; idx++) { var pt = getStackedOnPoint(dataCoordInfo, coordSys, data, idx); points[idx * 2] = pt[0]; points[idx * 2 + 1] = pt[1]; } return points; } /** * Filter the null data and extend data for step considering `stepTurnAt` * * @param points data to convert, that may containing null * @param basePoints base data to reference, used only for areaStyle points * @param coordSys coordinate system * @param stepTurnAt 'start' | 'end' | 'middle' | true * @param connectNulls whether to connect nulls * @returns converted point positions */ function turnPointsIntoStep(points, basePoints, coordSys, stepTurnAt, connectNulls) { var baseAxis = coordSys.getBaseAxis(); var baseIndex = baseAxis.dim === 'x' || baseAxis.dim === 'radius' ? 0 : 1; var stepPoints = []; var i = 0; var stepPt = []; var pt = []; var nextPt = []; var filteredPoints = []; if (connectNulls) { for (i = 0; i < points.length; i += 2) { /** * For areaStyle of stepped lines, `stackedOnPoints` should be * filtered the same as `points` so that the base axis values * should stay the same as the lines above. See #20021 */ var reference = basePoints || points; if (!isNaN(reference[i]) && !isNaN(reference[i + 1])) { filteredPoints.push(points[i], points[i + 1]); } } points = filteredPoints; } for (i = 0; i < points.length - 2; i += 2) { nextPt[0] = points[i + 2]; nextPt[1] = points[i + 3]; pt[0] = points[i]; pt[1] = points[i + 1]; stepPoints.push(pt[0], pt[1]); switch (stepTurnAt) { case 'end': stepPt[baseIndex] = nextPt[baseIndex]; stepPt[1 - baseIndex] = pt[1 - baseIndex]; stepPoints.push(stepPt[0], stepPt[1]); break; case 'middle': var middle = (pt[baseIndex] + nextPt[baseIndex]) / 2; var stepPt2 = []; stepPt[baseIndex] = stepPt2[baseIndex] = middle; stepPt[1 - baseIndex] = pt[1 - baseIndex]; stepPt2[1 - baseIndex] = nextPt[1 - baseIndex]; stepPoints.push(stepPt[0], stepPt[1]); stepPoints.push(stepPt2[0], stepPt2[1]); break; default: // default is start stepPt[baseIndex] = pt[baseIndex]; stepPt[1 - baseIndex] = nextPt[1 - baseIndex]; stepPoints.push(stepPt[0], stepPt[1]); } } // Last points stepPoints.push(points[i++], points[i++]); return stepPoints; } /** * Clip color stops to edge. Avoid creating too large gradients. * Which may lead to blurry when GPU acceleration is enabled. See #15680 * * The stops has been sorted from small to large. */ function clipColorStops(colorStops, maxSize) { var newColorStops = []; var len = colorStops.length; // coord will always < 0 in prevOutOfRangeColorStop. var prevOutOfRangeColorStop; var prevInRangeColorStop; function lerpStop(stop0, stop1, clippedCoord) { var coord0 = stop0.coord; var p = (clippedCoord - coord0) / (stop1.coord - coord0); var color = Object(tool_color["lerp"])(p, [stop0.color, stop1.color]); return { coord: clippedCoord, color: color }; } for (var i = 0; i < len; i++) { var stop_1 = colorStops[i]; var coord = stop_1.coord; if (coord < 0) { prevOutOfRangeColorStop = stop_1; } else if (coord > maxSize) { if (prevInRangeColorStop) { newColorStops.push(lerpStop(prevInRangeColorStop, stop_1, maxSize)); } else if (prevOutOfRangeColorStop) { // If there are two stops and coord range is between these two stops newColorStops.push(lerpStop(prevOutOfRangeColorStop, stop_1, 0), lerpStop(prevOutOfRangeColorStop, stop_1, maxSize)); } // All following stop will be out of range. So just ignore them. break; } else { if (prevOutOfRangeColorStop) { newColorStops.push(lerpStop(prevOutOfRangeColorStop, stop_1, 0)); // Reset prevOutOfRangeColorStop = null; } newColorStops.push(stop_1); prevInRangeColorStop = stop_1; } } return newColorStops; } function getVisualGradient(data, coordSys, api) { var visualMetaList = data.getVisual('visualMeta'); if (!visualMetaList || !visualMetaList.length || !data.count()) { // When data.count() is 0, gradient range can not be calculated. return; } if (coordSys.type !== 'cartesian2d') { if (false) { console.warn('Visual map on line style is only supported on cartesian2d.'); } return; } var coordDim; var visualMeta; for (var i = visualMetaList.length - 1; i >= 0; i--) { var dimInfo = data.getDimensionInfo(visualMetaList[i].dimension); coordDim = dimInfo && dimInfo.coordDim; // Can only be x or y if (coordDim === 'x' || coordDim === 'y') { visualMeta = visualMetaList[i]; break; } } if (!visualMeta) { if (false) { console.warn('Visual map on line style only support x or y dimension.'); } return; } // If the area to be rendered is bigger than area defined by LinearGradient, // the canvas spec prescribes that the color of the first stop and the last // stop should be used. But if two stops are added at offset 0, in effect // browsers use the color of the second stop to render area outside // LinearGradient. So we can only infinitesimally extend area defined in // LinearGradient to render `outerColors`. var axis = coordSys.getAxis(coordDim); // dataToCoord mapping may not be linear, but must be monotonic. var colorStops = core_util["map"](visualMeta.stops, function (stop) { // offset will be calculated later. return { coord: axis.toGlobalCoord(axis.dataToCoord(stop.value)), color: stop.color }; }); var stopLen = colorStops.length; var outerColors = visualMeta.outerColors.slice(); if (stopLen && colorStops[0].coord > colorStops[stopLen - 1].coord) { colorStops.reverse(); outerColors.reverse(); } var colorStopsInRange = clipColorStops(colorStops, coordDim === 'x' ? api.getWidth() : api.getHeight()); var inRangeStopLen = colorStopsInRange.length; if (!inRangeStopLen && stopLen) { // All stops are out of range. All will be the same color. return colorStops[0].coord < 0 ? outerColors[1] ? outerColors[1] : colorStops[stopLen - 1].color : outerColors[0] ? outerColors[0] : colorStops[0].color; } var tinyExtent = 10; // Arbitrary value: 10px var minCoord = colorStopsInRange[0].coord - tinyExtent; var maxCoord = colorStopsInRange[inRangeStopLen - 1].coord + tinyExtent; var coordSpan = maxCoord - minCoord; if (coordSpan < 1e-3) { return 'transparent'; } core_util["each"](colorStopsInRange, function (stop) { stop.offset = (stop.coord - minCoord) / coordSpan; }); colorStopsInRange.push({ // NOTE: inRangeStopLen may still be 0 if stoplen is zero. offset: inRangeStopLen ? colorStopsInRange[inRangeStopLen - 1].offset : 0.5, color: outerColors[1] || 'transparent' }); colorStopsInRange.unshift({ offset: inRangeStopLen ? colorStopsInRange[0].offset : 0.5, color: outerColors[0] || 'transparent' }); var gradient = new graphic_LinearGradient(0, 0, 0, 0, colorStopsInRange, true); gradient[coordDim] = minCoord; gradient[coordDim + '2'] = maxCoord; return gradient; } function getIsIgnoreFunc(seriesModel, data, coordSys) { var showAllSymbol = seriesModel.get('showAllSymbol'); var isAuto = showAllSymbol === 'auto'; if (showAllSymbol && !isAuto) { return; } var categoryAxis = coordSys.getAxesByScale('ordinal')[0]; if (!categoryAxis) { return; } // Note that category label interval strategy might bring some weird effect // in some scenario: users may wonder why some of the symbols are not // displayed. So we show all symbols as possible as we can. if (isAuto // Simplify the logic, do not determine label overlap here. && canShowAllSymbolForCategory(categoryAxis, data)) { return; } // Otherwise follow the label interval strategy on category axis. var categoryDataDim = data.mapDimension(categoryAxis.dim); var labelMap = {}; core_util["each"](categoryAxis.getViewLabels(), function (labelItem) { var ordinalNumber = categoryAxis.scale.getRawOrdinalNumber(labelItem.tickValue); labelMap[ordinalNumber] = 1; }); return function (dataIndex) { return !labelMap.hasOwnProperty(data.get(categoryDataDim, dataIndex)); }; } function canShowAllSymbolForCategory(categoryAxis, data) { // In most cases, line is monotonous on category axis, and the label size // is close with each other. So we check the symbol size and some of the // label size alone with the category axis to estimate whether all symbol // can be shown without overlap. var axisExtent = categoryAxis.getExtent(); var availSize = Math.abs(axisExtent[1] - axisExtent[0]) / categoryAxis.scale.count(); isNaN(availSize) && (availSize = 0); // 0/0 is NaN. // Sampling some points, max 5. var dataLen = data.count(); var step = Math.max(1, Math.round(dataLen / 5)); for (var dataIndex = 0; dataIndex < dataLen; dataIndex += step) { if (helper_Symbol.getSymbolSize(data, dataIndex // Only for cartesian, where `isHorizontal` exists. )[categoryAxis.isHorizontal() ? 1 : 0] // Empirical number * 1.5 > availSize) { return false; } } return true; } function LineView_isPointNull(x, y) { return isNaN(x) || isNaN(y); } function getLastIndexNotNull(points) { var len = points.length / 2; for (; len > 0; len--) { if (!LineView_isPointNull(points[len * 2 - 2], points[len * 2 - 1])) { break; } } return len - 1; } function getPointAtIndex(points, idx) { return [points[idx * 2], points[idx * 2 + 1]]; } function getIndexRange(points, xOrY, dim) { var len = points.length / 2; var dimIdx = dim === 'x' ? 0 : 1; var a; var b; var prevIndex = 0; var nextIndex = -1; for (var i = 0; i < len; i++) { b = points[i * 2 + dimIdx]; if (isNaN(b) || isNaN(points[i * 2 + 1 - dimIdx])) { continue; } if (i === 0) { a = b; continue; } if (a <= xOrY && b >= xOrY || a >= xOrY && b <= xOrY) { nextIndex = i; break; } prevIndex = i; a = b; } return { range: [prevIndex, nextIndex], t: (xOrY - a) / (b - a) }; } function anyStateShowEndLabel(seriesModel) { if (seriesModel.get(['endLabel', 'show'])) { return true; } for (var i = 0; i < SPECIAL_STATES.length; i++) { if (seriesModel.get([SPECIAL_STATES[i], 'endLabel', 'show'])) { return true; } } return false; } function createLineClipPath(lineView, coordSys, hasAnimation, seriesModel) { if (isCoordinateSystemType(coordSys, 'cartesian2d')) { var endLabelModel_1 = seriesModel.getModel('endLabel'); var valueAnimation_1 = endLabelModel_1.get('valueAnimation'); var data_1 = seriesModel.getData(); var labelAnimationRecord_1 = { lastFrameIndex: 0 }; var during = anyStateShowEndLabel(seriesModel) ? function (percent, clipRect) { lineView._endLabelOnDuring(percent, clipRect, data_1, labelAnimationRecord_1, valueAnimation_1, endLabelModel_1, coordSys); } : null; var isHorizontal = coordSys.getBaseAxis().isHorizontal(); var clipPath = createGridClipPath(coordSys, hasAnimation, seriesModel, function () { var endLabel = lineView._endLabel; if (endLabel && hasAnimation) { if (labelAnimationRecord_1.originalX != null) { endLabel.attr({ x: labelAnimationRecord_1.originalX, y: labelAnimationRecord_1.originalY }); } } }, during); // Expand clip shape to avoid clipping when line value exceeds axis if (!seriesModel.get('clip', true)) { var rectShape = clipPath.shape; var expandSize = Math.max(rectShape.width, rectShape.height); if (isHorizontal) { rectShape.y -= expandSize; rectShape.height += expandSize * 2; } else { rectShape.x -= expandSize; rectShape.width += expandSize * 2; } } // Set to the final frame. To make sure label layout is right. if (during) { during(1, clipPath); } return clipPath; } else { if (false) { if (seriesModel.get(['endLabel', 'show'])) { console.warn('endLabel is not supported for lines in polar systems.'); } } return createPolarClipPath(coordSys, hasAnimation, seriesModel); } } function getEndLabelStateSpecified(endLabelModel, coordSys) { var baseAxis = coordSys.getBaseAxis(); var isHorizontal = baseAxis.isHorizontal(); var isBaseInversed = baseAxis.inverse; var align = isHorizontal ? isBaseInversed ? 'right' : 'left' : 'center'; var verticalAlign = isHorizontal ? 'middle' : isBaseInversed ? 'top' : 'bottom'; return { normal: { align: endLabelModel.get('align') || align, verticalAlign: endLabelModel.get('verticalAlign') || verticalAlign } }; } var LineView_LineView = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(LineView, _super); function LineView() { return _super !== null && _super.apply(this, arguments) || this; } LineView.prototype.init = function () { var lineGroup = new graphic_Group(); var symbolDraw = new helper_SymbolDraw(); this.group.add(symbolDraw.group); this._symbolDraw = symbolDraw; this._lineGroup = lineGroup; this._changePolyState = core_util["bind"](this._changePolyState, this); }; LineView.prototype.render = function (seriesModel, ecModel, api) { var coordSys = seriesModel.coordinateSystem; var group = this.group; var data = seriesModel.getData(); var lineStyleModel = seriesModel.getModel('lineStyle'); var areaStyleModel = seriesModel.getModel('areaStyle'); var points = data.getLayout('points') || []; var isCoordSysPolar = coordSys.type === 'polar'; var prevCoordSys = this._coordSys; var symbolDraw = this._symbolDraw; var polyline = this._polyline; var polygon = this._polygon; var lineGroup = this._lineGroup; var hasAnimation = !ecModel.ssr && seriesModel.get('animation'); var isAreaChart = !areaStyleModel.isEmpty(); var valueOrigin = areaStyleModel.get('origin'); var dataCoordInfo = prepareDataCoordInfo(coordSys, data, valueOrigin); var stackedOnPoints = isAreaChart && getStackedOnPoints(coordSys, data, dataCoordInfo); var showSymbol = seriesModel.get('showSymbol'); var connectNulls = seriesModel.get('connectNulls'); var isIgnoreFunc = showSymbol && !isCoordSysPolar && getIsIgnoreFunc(seriesModel, data, coordSys); // Remove temporary symbols var oldData = this._data; oldData && oldData.eachItemGraphicEl(function (el, idx) { if (el.__temp) { group.remove(el); oldData.setItemGraphicEl(idx, null); } }); // Remove previous created symbols if showSymbol changed to false if (!showSymbol) { symbolDraw.remove(); } group.add(lineGroup); // FIXME step not support polar var step = !isCoordSysPolar ? seriesModel.get('step') : false; var clipShapeForSymbol; if (coordSys && coordSys.getArea && seriesModel.get('clip', true)) { clipShapeForSymbol = coordSys.getArea(); // Avoid float number rounding error for symbol on the edge of axis extent. // See #7913 and `test/dataZoom-clip.html`. if (clipShapeForSymbol.width != null) { clipShapeForSymbol.x -= 0.1; clipShapeForSymbol.y -= 0.1; clipShapeForSymbol.width += 0.2; clipShapeForSymbol.height += 0.2; } else if (clipShapeForSymbol.r0) { clipShapeForSymbol.r0 -= 0.5; clipShapeForSymbol.r += 0.5; } } this._clipShapeForSymbol = clipShapeForSymbol; var visualColor = getVisualGradient(data, coordSys, api) || data.getVisual('style')[data.getVisual('drawType')]; // Initialization animation or coordinate system changed if (!(polyline && prevCoordSys.type === coordSys.type && step === this._step)) { showSymbol && symbolDraw.updateData(data, { isIgnore: isIgnoreFunc, clipShape: clipShapeForSymbol, disableAnimation: true, getSymbolPoint: function (idx) { return [points[idx * 2], points[idx * 2 + 1]]; } }); hasAnimation && this._initSymbolLabelAnimation(data, coordSys, clipShapeForSymbol); if (step) { if (stackedOnPoints) { stackedOnPoints = turnPointsIntoStep(stackedOnPoints, points, coordSys, step, connectNulls); } // TODO If stacked series is not step points = turnPointsIntoStep(points, null, coordSys, step, connectNulls); } polyline = this._newPolyline(points); if (isAreaChart) { polygon = this._newPolygon(points, stackedOnPoints); } // If areaStyle is removed else if (polygon) { lineGroup.remove(polygon); polygon = this._polygon = null; } // NOTE: Must update _endLabel before setClipPath. if (!isCoordSysPolar) { this._initOrUpdateEndLabel(seriesModel, coordSys, convertToColorString(visualColor)); } lineGroup.setClipPath(createLineClipPath(this, coordSys, true, seriesModel)); } else { if (isAreaChart && !polygon) { // If areaStyle is added polygon = this._newPolygon(points, stackedOnPoints); } else if (polygon && !isAreaChart) { // If areaStyle is removed lineGroup.remove(polygon); polygon = this._polygon = null; } // NOTE: Must update _endLabel before setClipPath. if (!isCoordSysPolar) { this._initOrUpdateEndLabel(seriesModel, coordSys, convertToColorString(visualColor)); } // Update clipPath var oldClipPath = lineGroup.getClipPath(); if (oldClipPath) { var newClipPath = createLineClipPath(this, coordSys, false, seriesModel); initProps(oldClipPath, { shape: newClipPath.shape }, seriesModel); } else { lineGroup.setClipPath(createLineClipPath(this, coordSys, true, seriesModel)); } // Always update, or it is wrong in the case turning on legend // because points are not changed. showSymbol && symbolDraw.updateData(data, { isIgnore: isIgnoreFunc, clipShape: clipShapeForSymbol, disableAnimation: true, getSymbolPoint: function (idx) { return [points[idx * 2], points[idx * 2 + 1]]; } }); // In the case data zoom triggered refreshing frequently // Data may not change if line has a category axis. So it should animate nothing. if (!isPointsSame(this._stackedOnPoints, stackedOnPoints) || !isPointsSame(this._points, points)) { if (hasAnimation) { this._doUpdateAnimation(data, stackedOnPoints, coordSys, api, step, valueOrigin, connectNulls); } else { // Not do it in update with animation if (step) { if (stackedOnPoints) { stackedOnPoints = turnPointsIntoStep(stackedOnPoints, points, coordSys, step, connectNulls); } // TODO If stacked series is not step points = turnPointsIntoStep(points, null, coordSys, step, connectNulls); } polyline.setShape({ points: points }); polygon && polygon.setShape({ points: points, stackedOnPoints: stackedOnPoints }); } } } var emphasisModel = seriesModel.getModel('emphasis'); var focus = emphasisModel.get('focus'); var blurScope = emphasisModel.get('blurScope'); var emphasisDisabled = emphasisModel.get('disabled'); polyline.useStyle(core_util["defaults"]( // Use color in lineStyle first lineStyleModel.getLineStyle(), { fill: 'none', stroke: visualColor, lineJoin: 'bevel' })); setStatesStylesFromModel(polyline, seriesModel, 'lineStyle'); if (polyline.style.lineWidth > 0 && seriesModel.get(['emphasis', 'lineStyle', 'width']) === 'bolder') { var emphasisLineStyle = polyline.getState('emphasis').style; emphasisLineStyle.lineWidth = +polyline.style.lineWidth + 1; } // Needs seriesIndex for focus getECData(polyline).seriesIndex = seriesModel.seriesIndex; toggleHoverEmphasis(polyline, focus, blurScope, emphasisDisabled); var smooth = getSmooth(seriesModel.get('smooth')); var smoothMonotone = seriesModel.get('smoothMonotone'); polyline.setShape({ smooth: smooth, smoothMonotone: smoothMonotone, connectNulls: connectNulls }); if (polygon) { var stackedOnSeries = data.getCalculationInfo('stackedOnSeries'); var stackedOnSmooth = 0; polygon.useStyle(core_util["defaults"](areaStyleModel.getAreaStyle(), { fill: visualColor, opacity: 0.7, lineJoin: 'bevel', decal: data.getVisual('style').decal })); if (stackedOnSeries) { stackedOnSmooth = getSmooth(stackedOnSeries.get('smooth')); } polygon.setShape({ smooth: smooth, stackedOnSmooth: stackedOnSmooth, smoothMonotone: smoothMonotone, connectNulls: connectNulls }); setStatesStylesFromModel(polygon, seriesModel, 'areaStyle'); // Needs seriesIndex for focus getECData(polygon).seriesIndex = seriesModel.seriesIndex; toggleHoverEmphasis(polygon, focus, blurScope, emphasisDisabled); } var changePolyState = this._changePolyState; data.eachItemGraphicEl(function (el) { // Switch polyline / polygon state if element changed its state. el && (el.onHoverStateChange = changePolyState); }); this._polyline.onHoverStateChange = changePolyState; this._data = data; // Save the coordinate system for transition animation when data changed this._coordSys = coordSys; this._stackedOnPoints = stackedOnPoints; this._points = points; this._step = step; this._valueOrigin = valueOrigin; if (seriesModel.get('triggerLineEvent')) { this.packEventData(seriesModel, polyline); polygon && this.packEventData(seriesModel, polygon); } }; LineView.prototype.packEventData = function (seriesModel, el) { getECData(el).eventData = { componentType: 'series', componentSubType: 'line', componentIndex: seriesModel.componentIndex, seriesIndex: seriesModel.seriesIndex, seriesName: seriesModel.name, seriesType: 'line' }; }; LineView.prototype.highlight = function (seriesModel, ecModel, api, payload) { var data = seriesModel.getData(); var dataIndex = queryDataIndex(data, payload); this._changePolyState('emphasis'); if (!(dataIndex instanceof Array) && dataIndex != null && dataIndex >= 0) { var points = data.getLayout('points'); var symbol = data.getItemGraphicEl(dataIndex); if (!symbol) { // Create a temporary symbol if it is not exists var x = points[dataIndex * 2]; var y = points[dataIndex * 2 + 1]; if (isNaN(x) || isNaN(y)) { // Null data return; } // fix #11360: shouldn't draw symbol outside clipShapeForSymbol if (this._clipShapeForSymbol && !this._clipShapeForSymbol.contain(x, y)) { return; } var zlevel = seriesModel.get('zlevel') || 0; var z = seriesModel.get('z') || 0; symbol = new helper_Symbol(data, dataIndex); symbol.x = x; symbol.y = y; symbol.setZ(zlevel, z); // ensure label text of the temporary symbol is in front of line and area polygon var symbolLabel = symbol.getSymbolPath().getTextContent(); if (symbolLabel) { symbolLabel.zlevel = zlevel; symbolLabel.z = z; symbolLabel.z2 = this._polyline.z2 + 1; } symbol.__temp = true; data.setItemGraphicEl(dataIndex, symbol); // Stop scale animation symbol.stopSymbolAnimation(true); this.group.add(symbol); } symbol.highlight(); } else { // Highlight whole series Chart.prototype.highlight.call(this, seriesModel, ecModel, api, payload); } }; LineView.prototype.downplay = function (seriesModel, ecModel, api, payload) { var data = seriesModel.getData(); var dataIndex = queryDataIndex(data, payload); this._changePolyState('normal'); if (dataIndex != null && dataIndex >= 0) { var symbol = data.getItemGraphicEl(dataIndex); if (symbol) { if (symbol.__temp) { data.setItemGraphicEl(dataIndex, null); this.group.remove(symbol); } else { symbol.downplay(); } } } else { // FIXME // can not downplay completely. // Downplay whole series Chart.prototype.downplay.call(this, seriesModel, ecModel, api, payload); } }; LineView.prototype._changePolyState = function (toState) { var polygon = this._polygon; setStatesFlag(this._polyline, toState); polygon && setStatesFlag(polygon, toState); }; LineView.prototype._newPolyline = function (points) { var polyline = this._polyline; // Remove previous created polyline if (polyline) { this._lineGroup.remove(polyline); } polyline = new poly_ECPolyline({ shape: { points: points }, segmentIgnoreThreshold: 2, z2: 10 }); this._lineGroup.add(polyline); this._polyline = polyline; return polyline; }; LineView.prototype._newPolygon = function (points, stackedOnPoints) { var polygon = this._polygon; // Remove previous created polygon if (polygon) { this._lineGroup.remove(polygon); } polygon = new poly_ECPolygon({ shape: { points: points, stackedOnPoints: stackedOnPoints }, segmentIgnoreThreshold: 2 }); this._lineGroup.add(polygon); this._polygon = polygon; return polygon; }; LineView.prototype._initSymbolLabelAnimation = function (data, coordSys, clipShape) { var isHorizontalOrRadial; var isCoordSysPolar; var baseAxis = coordSys.getBaseAxis(); var isAxisInverse = baseAxis.inverse; if (coordSys.type === 'cartesian2d') { isHorizontalOrRadial = baseAxis.isHorizontal(); isCoordSysPolar = false; } else if (coordSys.type === 'polar') { isHorizontalOrRadial = baseAxis.dim === 'angle'; isCoordSysPolar = true; } var seriesModel = data.hostModel; var seriesDuration = seriesModel.get('animationDuration'); if (core_util["isFunction"](seriesDuration)) { seriesDuration = seriesDuration(null); } var seriesDelay = seriesModel.get('animationDelay') || 0; var seriesDelayValue = core_util["isFunction"](seriesDelay) ? seriesDelay(null) : seriesDelay; data.eachItemGraphicEl(function (symbol, idx) { var el = symbol; if (el) { var point = [symbol.x, symbol.y]; var start = void 0; var end = void 0; var current = void 0; if (clipShape) { if (isCoordSysPolar) { var polarClip = clipShape; var coord = coordSys.pointToCoord(point); if (isHorizontalOrRadial) { start = polarClip.startAngle; end = polarClip.endAngle; current = -coord[1] / 180 * Math.PI; } else { start = polarClip.r0; end = polarClip.r; current = coord[0]; } } else { var gridClip = clipShape; if (isHorizontalOrRadial) { start = gridClip.x; end = gridClip.x + gridClip.width; current = symbol.x; } else { start = gridClip.y + gridClip.height; end = gridClip.y; current = symbol.y; } } } var ratio = end === start ? 0 : (current - start) / (end - start); if (isAxisInverse) { ratio = 1 - ratio; } var delay = core_util["isFunction"](seriesDelay) ? seriesDelay(idx) : seriesDuration * ratio + seriesDelayValue; var symbolPath = el.getSymbolPath(); var text = symbolPath.getTextContent(); el.attr({ scaleX: 0, scaleY: 0 }); el.animateTo({ scaleX: 1, scaleY: 1 }, { duration: 200, setToFinal: true, delay: delay }); if (text) { text.animateFrom({ style: { opacity: 0 } }, { duration: 300, delay: delay }); } symbolPath.disableLabelAnimation = true; } }); }; LineView.prototype._initOrUpdateEndLabel = function (seriesModel, coordSys, inheritColor) { var endLabelModel = seriesModel.getModel('endLabel'); if (anyStateShowEndLabel(seriesModel)) { var data_2 = seriesModel.getData(); var polyline = this._polyline; // series may be filtered. var points = data_2.getLayout('points'); if (!points) { polyline.removeTextContent(); this._endLabel = null; return; } var endLabel = this._endLabel; if (!endLabel) { endLabel = this._endLabel = new Text({ z2: 200 // should be higher than item symbol }); endLabel.ignoreClip = true; polyline.setTextContent(this._endLabel); polyline.disableLabelAnimation = true; } // Find last non-NaN data to display data var dataIndex = getLastIndexNotNull(points); if (dataIndex >= 0) { setLabelStyle(polyline, getLabelStatesModels(seriesModel, 'endLabel'), { inheritColor: inheritColor, labelFetcher: seriesModel, labelDataIndex: dataIndex, defaultText: function (dataIndex, opt, interpolatedValue) { return interpolatedValue != null ? getDefaultInterpolatedLabel(data_2, interpolatedValue) : getDefaultLabel(data_2, dataIndex); }, enableTextSetter: true }, getEndLabelStateSpecified(endLabelModel, coordSys)); polyline.textConfig.position = null; } } else if (this._endLabel) { this._polyline.removeTextContent(); this._endLabel = null; } }; LineView.prototype._endLabelOnDuring = function (percent, clipRect, data, animationRecord, valueAnimation, endLabelModel, coordSys) { var endLabel = this._endLabel; var polyline = this._polyline; if (endLabel) { // NOTE: Don't remove percent < 1. percent === 1 means the first frame during render. // The label is not prepared at this time. if (percent < 1 && animationRecord.originalX == null) { animationRecord.originalX = endLabel.x; animationRecord.originalY = endLabel.y; } var points = data.getLayout('points'); var seriesModel = data.hostModel; var connectNulls = seriesModel.get('connectNulls'); var precision = endLabelModel.get('precision'); var distance = endLabelModel.get('distance') || 0; var baseAxis = coordSys.getBaseAxis(); var isHorizontal = baseAxis.isHorizontal(); var isBaseInversed = baseAxis.inverse; var clipShape = clipRect.shape; var xOrY = isBaseInversed ? isHorizontal ? clipShape.x : clipShape.y + clipShape.height : isHorizontal ? clipShape.x + clipShape.width : clipShape.y; var distanceX = (isHorizontal ? distance : 0) * (isBaseInversed ? -1 : 1); var distanceY = (isHorizontal ? 0 : -distance) * (isBaseInversed ? -1 : 1); var dim = isHorizontal ? 'x' : 'y'; var dataIndexRange = getIndexRange(points, xOrY, dim); var indices = dataIndexRange.range; var diff = indices[1] - indices[0]; var value = void 0; if (diff >= 1) { // diff > 1 && connectNulls, which is on the null data. if (diff > 1 && !connectNulls) { var pt = getPointAtIndex(points, indices[0]); endLabel.attr({ x: pt[0] + distanceX, y: pt[1] + distanceY }); valueAnimation && (value = seriesModel.getRawValue(indices[0])); } else { var pt = polyline.getPointOn(xOrY, dim); pt && endLabel.attr({ x: pt[0] + distanceX, y: pt[1] + distanceY }); var startValue = seriesModel.getRawValue(indices[0]); var endValue = seriesModel.getRawValue(indices[1]); valueAnimation && (value = interpolateRawValues(data, precision, startValue, endValue, dataIndexRange.t)); } animationRecord.lastFrameIndex = indices[0]; } else { // If diff <= 0, which is the range is not found(Include NaN) // Choose the first point or last point. var idx = percent === 1 || animationRecord.lastFrameIndex > 0 ? indices[0] : 0; var pt = getPointAtIndex(points, idx); valueAnimation && (value = seriesModel.getRawValue(idx)); endLabel.attr({ x: pt[0] + distanceX, y: pt[1] + distanceY }); } if (valueAnimation) { var inner = labelInner(endLabel); if (typeof inner.setLabelText === 'function') { inner.setLabelText(value); } } } }; /** * @private */ // FIXME Two value axis LineView.prototype._doUpdateAnimation = function (data, stackedOnPoints, coordSys, api, step, valueOrigin, connectNulls) { var polyline = this._polyline; var polygon = this._polygon; var seriesModel = data.hostModel; var diff = lineAnimationDiff(this._data, data, this._stackedOnPoints, stackedOnPoints, this._coordSys, coordSys, this._valueOrigin, valueOrigin); var current = diff.current; var stackedOnCurrent = diff.stackedOnCurrent; var next = diff.next; var stackedOnNext = diff.stackedOnNext; if (step) { // TODO If stacked series is not step stackedOnCurrent = turnPointsIntoStep(diff.stackedOnCurrent, diff.current, coordSys, step, connectNulls); current = turnPointsIntoStep(diff.current, null, coordSys, step, connectNulls); stackedOnNext = turnPointsIntoStep(diff.stackedOnNext, diff.next, coordSys, step, connectNulls); next = turnPointsIntoStep(diff.next, null, coordSys, step, connectNulls); } // Don't apply animation if diff is large. // For better result and avoid memory explosion problems like // https://github.com/apache/incubator-echarts/issues/12229 if (getBoundingDiff(current, next) > 3000 || polygon && getBoundingDiff(stackedOnCurrent, stackedOnNext) > 3000) { polyline.stopAnimation(); polyline.setShape({ points: next }); if (polygon) { polygon.stopAnimation(); polygon.setShape({ points: next, stackedOnPoints: stackedOnNext }); } return; } polyline.shape.__points = diff.current; polyline.shape.points = current; var target = { shape: { points: next } }; // Also animate the original points. // If points reference is changed when turning into step line. if (diff.current !== current) { target.shape.__points = diff.next; } // Stop previous animation. polyline.stopAnimation(); updateProps(polyline, target, seriesModel); if (polygon) { polygon.setShape({ // Reuse the points with polyline. points: current, stackedOnPoints: stackedOnCurrent }); polygon.stopAnimation(); updateProps(polygon, { shape: { stackedOnPoints: stackedOnNext } }, seriesModel); // If use attr directly in updateProps. if (polyline.shape.points !== polygon.shape.points) { polygon.shape.points = polyline.shape.points; } } var updatedDataInfo = []; var diffStatus = diff.status; for (var i = 0; i < diffStatus.length; i++) { var cmd = diffStatus[i].cmd; if (cmd === '=') { var el = data.getItemGraphicEl(diffStatus[i].idx1); if (el) { updatedDataInfo.push({ el: el, ptIdx: i // Index of points }); } } } if (polyline.animators && polyline.animators.length) { polyline.animators[0].during(function () { polygon && polygon.dirtyShape(); var points = polyline.shape.__points; for (var i = 0; i < updatedDataInfo.length; i++) { var el = updatedDataInfo[i].el; var offset = updatedDataInfo[i].ptIdx * 2; el.x = points[offset]; el.y = points[offset + 1]; el.markRedraw(); } }); } }; LineView.prototype.remove = function (ecModel) { var group = this.group; var oldData = this._data; this._lineGroup.removeAll(); this._symbolDraw.remove(true); // Remove temporary created elements when highlighting oldData && oldData.eachItemGraphicEl(function (el, idx) { if (el.__temp) { group.remove(el); oldData.setItemGraphicEl(idx, null); } }); this._polyline = this._polygon = this._coordSys = this._points = this._stackedOnPoints = this._endLabel = this._data = null; }; LineView.type = 'line'; return LineView; }(Chart); /* harmony default export */ var line_LineView = (LineView_LineView); // CONCATENATED MODULE: ./node_modules/echarts/lib/layout/points.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 pointsLayout(seriesType, forceStoreInTypedArray) { return { seriesType: seriesType, plan: createRenderPlanner(), reset: function (seriesModel) { var data = seriesModel.getData(); var coordSys = seriesModel.coordinateSystem; var pipelineContext = seriesModel.pipelineContext; var useTypedArray = forceStoreInTypedArray || pipelineContext.large; if (!coordSys) { return; } var dims = Object(core_util["map"])(coordSys.dimensions, function (dim) { return data.mapDimension(dim); }).slice(0, 2); var dimLen = dims.length; var stackResultDim = data.getCalculationInfo('stackResultDimension'); if (isDimensionStacked(data, dims[0])) { dims[0] = stackResultDim; } if (isDimensionStacked(data, dims[1])) { dims[1] = stackResultDim; } var store = data.getStore(); var dimIdx0 = data.getDimensionIndex(dims[0]); var dimIdx1 = data.getDimensionIndex(dims[1]); return dimLen && { progress: function (params, data) { var segCount = params.end - params.start; var points = useTypedArray && createFloat32Array(segCount * dimLen); var tmpIn = []; var tmpOut = []; for (var i = params.start, offset = 0; i < params.end; i++) { var point = void 0; if (dimLen === 1) { var x = store.get(dimIdx0, i); // NOTE: Make sure the second parameter is null to use default strategy. point = coordSys.dataToPoint(x, null, tmpOut); } else { tmpIn[0] = store.get(dimIdx0, i); tmpIn[1] = store.get(dimIdx1, i); // Let coordinate system to handle the NaN data. point = coordSys.dataToPoint(tmpIn, null, tmpOut); } if (useTypedArray) { points[offset++] = point[0]; points[offset++] = point[1]; } else { data.setItemLayout(i, point.slice()); } } useTypedArray && data.setLayout('points', points); } }; } }; } ; // CONCATENATED MODULE: ./node_modules/echarts/lib/processor/dataSample.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 samplers = { average: function (frame) { var sum = 0; var count = 0; for (var i = 0; i < frame.length; i++) { if (!isNaN(frame[i])) { sum += frame[i]; count++; } } // Return NaN if count is 0 return count === 0 ? NaN : sum / count; }, sum: function (frame) { var sum = 0; for (var i = 0; i < frame.length; i++) { // Ignore NaN sum += frame[i] || 0; } return sum; }, max: function (frame) { var max = -Infinity; for (var i = 0; i < frame.length; i++) { frame[i] > max && (max = frame[i]); } // NaN will cause illegal axis extent. return isFinite(max) ? max : NaN; }, min: function (frame) { var min = Infinity; for (var i = 0; i < frame.length; i++) { frame[i] < min && (min = frame[i]); } // NaN will cause illegal axis extent. return isFinite(min) ? min : NaN; }, // TODO // Median nearest: function (frame) { return frame[0]; } }; var indexSampler = function (frame) { return Math.round(frame.length / 2); }; function dataSample(seriesType) { return { seriesType: seriesType, // FIXME:TS never used, so comment it // modifyOutputEnd: true, reset: function (seriesModel, ecModel, api) { var data = seriesModel.getData(); var sampling = seriesModel.get('sampling'); var coordSys = seriesModel.coordinateSystem; var count = data.count(); // Only cartesian2d support down sampling. Disable it when there is few data. if (count > 10 && coordSys.type === 'cartesian2d' && sampling) { var baseAxis = coordSys.getBaseAxis(); var valueAxis = coordSys.getOtherAxis(baseAxis); var extent = baseAxis.getExtent(); var dpr = api.getDevicePixelRatio(); // Coordinste system has been resized var size = Math.abs(extent[1] - extent[0]) * (dpr || 1); var rate = Math.round(count / size); if (isFinite(rate) && rate > 1) { if (sampling === 'lttb') { seriesModel.setData(data.lttbDownSample(data.mapDimension(valueAxis.dim), 1 / rate)); } else if (sampling === 'minmax') { seriesModel.setData(data.minmaxDownSample(data.mapDimension(valueAxis.dim), 1 / rate)); } var sampler = void 0; if (Object(core_util["isString"])(sampling)) { sampler = samplers[sampling]; } else if (Object(core_util["isFunction"])(sampling)) { sampler = sampling; } if (sampler) { // Only support sample the first dim mapped from value axis. seriesModel.setData(data.downSample(data.mapDimension(valueAxis.dim), 1 / rate, sampler, indexSampler)); } } } } }; } // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/line/install.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ // In case developer forget to include grid component function install_install(registers) { registers.registerChartView(line_LineView); registers.registerSeriesModel(LineSeries); registers.registerLayout(pointsLayout('line', true)); registers.registerVisual({ seriesType: 'line', reset: function (seriesModel) { var data = seriesModel.getData(); // Visual coding for legend var lineStyle = seriesModel.getModel('lineStyle').getLineStyle(); if (lineStyle && !lineStyle.stroke) { // Fill in visual should be palette color if // has color callback lineStyle.stroke = data.getVisual('style').fill; } data.setVisual('legendLineStyle', lineStyle); } }); // Down sample after filter registers.registerProcessor(registers.PRIORITY.PROCESSOR.STATISTIC, dataSample('line')); } // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/bar/BaseBarSeries.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 BaseBarSeries_BaseBarSeriesModel = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(BaseBarSeriesModel, _super); function BaseBarSeriesModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = BaseBarSeriesModel.type; return _this; } BaseBarSeriesModel.prototype.getInitialData = function (option, ecModel) { return helper_createSeriesData(null, this, { useEncodeDefaulter: true }); }; BaseBarSeriesModel.prototype.getMarkerPosition = function (value, dims, startingAtTick) { var coordSys = this.coordinateSystem; if (coordSys && coordSys.clampData) { // PENDING if clamp ? var clampData_1 = coordSys.clampData(value); var pt_1 = coordSys.dataToPoint(clampData_1); if (startingAtTick) { Object(core_util["each"])(coordSys.getAxes(), function (axis, idx) { // If axis type is category, use tick coords instead if (axis.type === 'category' && dims != null) { var tickCoords = axis.getTicksCoords(); var alignTicksWithLabel = axis.getTickModel().get('alignWithLabel'); var targetTickId = clampData_1[idx]; // The index of rightmost tick of markArea is 1 larger than x1/y1 index var isEnd = dims[idx] === 'x1' || dims[idx] === 'y1'; if (isEnd && !alignTicksWithLabel) { targetTickId += 1; } // The only contains one tick, tickCoords is // like [{coord: 0, tickValue: 0}, {coord: 0}] // to the length should always be larger than 1 if (tickCoords.length < 2) { return; } else if (tickCoords.length === 2) { // The left value and right value of the axis are // the same. coord is 0 in both items. Use the max // value of the axis as the coord pt_1[idx] = axis.toGlobalCoord(axis.getExtent()[isEnd ? 1 : 0]); return; } var leftCoord = void 0; var coord = void 0; var stepTickValue = 1; for (var i = 0; i < tickCoords.length; i++) { var tickCoord = tickCoords[i].coord; // The last item of tickCoords doesn't contain // tickValue var tickValue = i === tickCoords.length - 1 ? tickCoords[i - 1].tickValue + stepTickValue : tickCoords[i].tickValue; if (tickValue === targetTickId) { coord = tickCoord; break; } else if (tickValue < targetTickId) { leftCoord = tickCoord; } else if (leftCoord != null && tickValue > targetTickId) { coord = (tickCoord + leftCoord) / 2; break; } if (i === 1) { // Here we assume the step of category axes is // the same stepTickValue = tickValue - tickCoords[0].tickValue; } } if (coord == null) { if (!leftCoord) { // targetTickId is smaller than all tick ids in the // visible area, use the leftmost tick coord coord = tickCoords[0].coord; } else if (leftCoord) { // targetTickId is larger than all tick ids in the // visible area, use the rightmost tick coord coord = tickCoords[tickCoords.length - 1].coord; } } pt_1[idx] = axis.toGlobalCoord(coord); } }); } else { var data = this.getData(); var offset = data.getLayout('offset'); var size = data.getLayout('size'); var offsetIndex = coordSys.getBaseAxis().isHorizontal() ? 0 : 1; pt_1[offsetIndex] += offset + size / 2; } return pt_1; } return [NaN, NaN]; }; BaseBarSeriesModel.type = 'series.__base_bar__'; BaseBarSeriesModel.defaultOption = { // zlevel: 0, z: 2, coordinateSystem: 'cartesian2d', legendHoverLink: true, // stack: null // Cartesian coordinate system // xAxisIndex: 0, // yAxisIndex: 0, barMinHeight: 0, barMinAngle: 0, // cursor: null, large: false, largeThreshold: 400, progressive: 3e3, progressiveChunkMode: 'mod' }; return BaseBarSeriesModel; }(Series); Series.registerClass(BaseBarSeries_BaseBarSeriesModel); /* harmony default export */ var BaseBarSeries = (BaseBarSeries_BaseBarSeriesModel); // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/bar/BarSeries.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 BarSeries_BarSeriesModel = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(BarSeriesModel, _super); function BarSeriesModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = BarSeriesModel.type; return _this; } BarSeriesModel.prototype.getInitialData = function () { return helper_createSeriesData(null, this, { useEncodeDefaulter: true, createInvertedIndices: !!this.get('realtimeSort', true) || null }); }; /** * @override */ BarSeriesModel.prototype.getProgressive = function () { // Do not support progressive in normal mode. return this.get('large') ? this.get('progressive') : false; }; /** * @override */ BarSeriesModel.prototype.getProgressiveThreshold = function () { // Do not support progressive in normal mode. var progressiveThreshold = this.get('progressiveThreshold'); var largeThreshold = this.get('largeThreshold'); if (largeThreshold > progressiveThreshold) { progressiveThreshold = largeThreshold; } return progressiveThreshold; }; BarSeriesModel.prototype.brushSelector = function (dataIndex, data, selectors) { return selectors.rect(data.getItemLayout(dataIndex)); }; BarSeriesModel.type = 'series.bar'; BarSeriesModel.dependencies = ['grid', 'polar']; BarSeriesModel.defaultOption = inheritDefaultOption(BaseBarSeries.defaultOption, { // If clipped // Only available on cartesian2d clip: true, roundCap: false, showBackground: false, backgroundStyle: { color: 'rgba(180, 180, 180, 0.2)', borderColor: null, borderWidth: 0, borderType: 'solid', borderRadius: 0, shadowBlur: 0, shadowColor: null, shadowOffsetX: 0, shadowOffsetY: 0, opacity: 1 }, select: { itemStyle: { borderColor: '#212121' } }, realtimeSort: false }); return BarSeriesModel; }(BaseBarSeries); /* harmony default export */ var BarSeries = (BarSeries_BarSeriesModel); // CONCATENATED MODULE: ./node_modules/echarts/lib/util/shape/sausage.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ /** * Sausage: similar to sector, but have half circle on both sides */ var SausageShape = /** @class */function () { function SausageShape() { this.cx = 0; this.cy = 0; this.r0 = 0; this.r = 0; this.startAngle = 0; this.endAngle = Math.PI * 2; this.clockwise = true; } return SausageShape; }(); var sausage_SausagePath = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(SausagePath, _super); function SausagePath(opts) { var _this = _super.call(this, opts) || this; _this.type = 'sausage'; return _this; } SausagePath.prototype.getDefaultShape = function () { return new SausageShape(); }; SausagePath.prototype.buildPath = function (ctx, shape) { var cx = shape.cx; var cy = shape.cy; var r0 = Math.max(shape.r0 || 0, 0); var r = Math.max(shape.r, 0); var dr = (r - r0) * 0.5; var rCenter = r0 + dr; var startAngle = shape.startAngle; var endAngle = shape.endAngle; var clockwise = shape.clockwise; var PI2 = Math.PI * 2; var lessThanCircle = clockwise ? endAngle - startAngle < PI2 : startAngle - endAngle < PI2; if (!lessThanCircle) { // Normalize angles startAngle = endAngle - (clockwise ? PI2 : -PI2); } var unitStartX = Math.cos(startAngle); var unitStartY = Math.sin(startAngle); var unitEndX = Math.cos(endAngle); var unitEndY = Math.sin(endAngle); if (lessThanCircle) { ctx.moveTo(unitStartX * r0 + cx, unitStartY * r0 + cy); ctx.arc(unitStartX * rCenter + cx, unitStartY * rCenter + cy, dr, -Math.PI + startAngle, startAngle, !clockwise); } else { ctx.moveTo(unitStartX * r + cx, unitStartY * r + cy); } ctx.arc(cx, cy, r, startAngle, endAngle, !clockwise); ctx.arc(unitEndX * rCenter + cx, unitEndY * rCenter + cy, dr, endAngle - Math.PI * 2, endAngle - Math.PI, !clockwise); if (r0 !== 0) { ctx.arc(cx, cy, r0, endAngle, startAngle, clockwise); } // ctx.closePath(); }; return SausagePath; }(graphic_Path); /* harmony default export */ var sausage = (sausage_SausagePath); // CONCATENATED MODULE: ./node_modules/echarts/lib/label/sectorLabel.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 createSectorCalculateTextPosition(positionMapping, opts) { opts = opts || {}; var isRoundCap = opts.isRoundCap; return function (out, opts, boundingRect) { var textPosition = opts.position; if (!textPosition || textPosition instanceof Array) { return calculateTextPosition(out, opts, boundingRect); } var mappedSectorPosition = positionMapping(textPosition); var distance = opts.distance != null ? opts.distance : 5; var sector = this.shape; var cx = sector.cx; var cy = sector.cy; var r = sector.r; var r0 = sector.r0; var middleR = (r + r0) / 2; var startAngle = sector.startAngle; var endAngle = sector.endAngle; var middleAngle = (startAngle + endAngle) / 2; var extraDist = isRoundCap ? Math.abs(r - r0) / 2 : 0; var mathCos = Math.cos; var mathSin = Math.sin; // base position: top-left var x = cx + r * mathCos(startAngle); var y = cy + r * mathSin(startAngle); var textAlign = 'left'; var textVerticalAlign = 'top'; switch (mappedSectorPosition) { case 'startArc': x = cx + (r0 - distance) * mathCos(middleAngle); y = cy + (r0 - distance) * mathSin(middleAngle); textAlign = 'center'; textVerticalAlign = 'top'; break; case 'insideStartArc': x = cx + (r0 + distance) * mathCos(middleAngle); y = cy + (r0 + distance) * mathSin(middleAngle); textAlign = 'center'; textVerticalAlign = 'bottom'; break; case 'startAngle': x = cx + middleR * mathCos(startAngle) + adjustAngleDistanceX(startAngle, distance + extraDist, false); y = cy + middleR * mathSin(startAngle) + adjustAngleDistanceY(startAngle, distance + extraDist, false); textAlign = 'right'; textVerticalAlign = 'middle'; break; case 'insideStartAngle': x = cx + middleR * mathCos(startAngle) + adjustAngleDistanceX(startAngle, -distance + extraDist, false); y = cy + middleR * mathSin(startAngle) + adjustAngleDistanceY(startAngle, -distance + extraDist, false); textAlign = 'left'; textVerticalAlign = 'middle'; break; case 'middle': x = cx + middleR * mathCos(middleAngle); y = cy + middleR * mathSin(middleAngle); textAlign = 'center'; textVerticalAlign = 'middle'; break; case 'endArc': x = cx + (r + distance) * mathCos(middleAngle); y = cy + (r + distance) * mathSin(middleAngle); textAlign = 'center'; textVerticalAlign = 'bottom'; break; case 'insideEndArc': x = cx + (r - distance) * mathCos(middleAngle); y = cy + (r - distance) * mathSin(middleAngle); textAlign = 'center'; textVerticalAlign = 'top'; break; case 'endAngle': x = cx + middleR * mathCos(endAngle) + adjustAngleDistanceX(endAngle, distance + extraDist, true); y = cy + middleR * mathSin(endAngle) + adjustAngleDistanceY(endAngle, distance + extraDist, true); textAlign = 'left'; textVerticalAlign = 'middle'; break; case 'insideEndAngle': x = cx + middleR * mathCos(endAngle) + adjustAngleDistanceX(endAngle, -distance + extraDist, true); y = cy + middleR * mathSin(endAngle) + adjustAngleDistanceY(endAngle, -distance + extraDist, true); textAlign = 'right'; textVerticalAlign = 'middle'; break; default: return calculateTextPosition(out, opts, boundingRect); } out = out || {}; out.x = x; out.y = y; out.align = textAlign; out.verticalAlign = textVerticalAlign; return out; }; } function setSectorTextRotation(sector, textPosition, positionMapping, rotateType) { if (Object(core_util["isNumber"])(rotateType)) { // user-set rotation sector.setTextConfig({ rotation: rotateType }); return; } else if (Object(core_util["isArray"])(textPosition)) { // user-set position, use 0 as auto rotation sector.setTextConfig({ rotation: 0 }); return; } var shape = sector.shape; var startAngle = shape.clockwise ? shape.startAngle : shape.endAngle; var endAngle = shape.clockwise ? shape.endAngle : shape.startAngle; var middleAngle = (startAngle + endAngle) / 2; var anchorAngle; var mappedSectorPosition = positionMapping(textPosition); switch (mappedSectorPosition) { case 'startArc': case 'insideStartArc': case 'middle': case 'insideEndArc': case 'endArc': anchorAngle = middleAngle; break; case 'startAngle': case 'insideStartAngle': anchorAngle = startAngle; break; case 'endAngle': case 'insideEndAngle': anchorAngle = endAngle; break; default: sector.setTextConfig({ rotation: 0 }); return; } var rotate = Math.PI * 1.5 - anchorAngle; /** * TODO: labels with rotate > Math.PI / 2 should be rotate another * half round flipped to increase readability. However, only middle * position supports this for now, because in other positions, the * anchor point is not at the center of the text, so the positions * after rotating is not as expected. */ if (mappedSectorPosition === 'middle' && rotate > Math.PI / 2 && rotate < Math.PI * 1.5) { rotate -= Math.PI; } sector.setTextConfig({ rotation: rotate }); } function adjustAngleDistanceX(angle, distance, isEnd) { return distance * Math.sin(angle) * (isEnd ? -1 : 1); } function adjustAngleDistanceY(angle, distance, isEnd) { return distance * Math.cos(angle) * (isEnd ? 1 : -1); } // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/helper/sectorHelper.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 getSectorCornerRadius(model, shape, zeroIfNull) { var cornerRadius = model.get('borderRadius'); if (cornerRadius == null) { return zeroIfNull ? { cornerRadius: 0 } : null; } if (!Object(core_util["isArray"])(cornerRadius)) { cornerRadius = [cornerRadius, cornerRadius, cornerRadius, cornerRadius]; } var dr = Math.abs(shape.r || 0 - shape.r0 || 0); return { cornerRadius: Object(core_util["map"])(cornerRadius, function (cr) { return parsePercent(cr, dr); }) }; } // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/bar/BarView.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 BarView_mathMax = Math.max; var BarView_mathMin = Math.min; function getClipArea(coord, data) { var coordSysClipArea = coord.getArea && coord.getArea(); if (isCoordinateSystemType(coord, 'cartesian2d')) { var baseAxis = coord.getBaseAxis(); // When boundaryGap is false or using time axis. bar may exceed the grid. // We should not clip this part. // See test/bar2.html if (baseAxis.type !== 'category' || !baseAxis.onBand) { var expandWidth = data.getLayout('bandWidth'); if (baseAxis.isHorizontal()) { coordSysClipArea.x -= expandWidth; coordSysClipArea.width += expandWidth * 2; } else { coordSysClipArea.y -= expandWidth; coordSysClipArea.height += expandWidth * 2; } } } return coordSysClipArea; } var BarView_BarView = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(BarView, _super); function BarView() { var _this = _super.call(this) || this; _this.type = BarView.type; _this._isFirstFrame = true; return _this; } BarView.prototype.render = function (seriesModel, ecModel, api, payload) { this._model = seriesModel; this._removeOnRenderedListener(api); this._updateDrawMode(seriesModel); var coordinateSystemType = seriesModel.get('coordinateSystem'); if (coordinateSystemType === 'cartesian2d' || coordinateSystemType === 'polar') { // Clear previously rendered progressive elements. this._progressiveEls = null; this._isLargeDraw ? this._renderLarge(seriesModel, ecModel, api) : this._renderNormal(seriesModel, ecModel, api, payload); } else if (false) { warn('Only cartesian2d and polar supported for bar.'); } }; BarView.prototype.incrementalPrepareRender = function (seriesModel) { this._clear(); this._updateDrawMode(seriesModel); // incremental also need to clip, otherwise might be overlow. // But must not set clip in each frame, otherwise all of the children will be marked redraw. this._updateLargeClip(seriesModel); }; BarView.prototype.incrementalRender = function (params, seriesModel) { // Reset this._progressiveEls = []; // Do not support progressive in normal mode. this._incrementalRenderLarge(params, seriesModel); }; BarView.prototype.eachRendered = function (cb) { traverseElements(this._progressiveEls || this.group, cb); }; BarView.prototype._updateDrawMode = function (seriesModel) { var isLargeDraw = seriesModel.pipelineContext.large; if (this._isLargeDraw == null || isLargeDraw !== this._isLargeDraw) { this._isLargeDraw = isLargeDraw; this._clear(); } }; BarView.prototype._renderNormal = function (seriesModel, ecModel, api, payload) { var group = this.group; var data = seriesModel.getData(); var oldData = this._data; var coord = seriesModel.coordinateSystem; var baseAxis = coord.getBaseAxis(); var isHorizontalOrRadial; if (coord.type === 'cartesian2d') { isHorizontalOrRadial = baseAxis.isHorizontal(); } else if (coord.type === 'polar') { isHorizontalOrRadial = baseAxis.dim === 'angle'; } var animationModel = seriesModel.isAnimationEnabled() ? seriesModel : null; var realtimeSortCfg = shouldRealtimeSort(seriesModel, coord); if (realtimeSortCfg) { this._enableRealtimeSort(realtimeSortCfg, data, api); } var needsClip = seriesModel.get('clip', true) || realtimeSortCfg; var coordSysClipArea = getClipArea(coord, data); // If there is clipPath created in large mode. Remove it. group.removeClipPath(); // We don't use clipPath in normal mode because we needs a perfect animation // And don't want the label are clipped. var roundCap = seriesModel.get('roundCap', true); var drawBackground = seriesModel.get('showBackground', true); var backgroundModel = seriesModel.getModel('backgroundStyle'); var barBorderRadius = backgroundModel.get('borderRadius') || 0; var bgEls = []; var oldBgEls = this._backgroundEls; var isInitSort = payload && payload.isInitSort; var isChangeOrder = payload && payload.type === 'changeAxisOrder'; function createBackground(dataIndex) { var bgLayout = getLayout[coord.type](data, dataIndex); var bgEl = createBackgroundEl(coord, isHorizontalOrRadial, bgLayout); bgEl.useStyle(backgroundModel.getItemStyle()); // Only cartesian2d support borderRadius. if (coord.type === 'cartesian2d') { bgEl.setShape('r', barBorderRadius); } else { bgEl.setShape('cornerRadius', barBorderRadius); } bgEls[dataIndex] = bgEl; return bgEl; } ; data.diff(oldData).add(function (dataIndex) { var itemModel = data.getItemModel(dataIndex); var layout = getLayout[coord.type](data, dataIndex, itemModel); if (drawBackground) { createBackground(dataIndex); } // If dataZoom in filteMode: 'empty', the baseValue can be set as NaN in "axisProxy". if (!data.hasValue(dataIndex) || !isValidLayout[coord.type](layout)) { return; } var isClipped = false; if (needsClip) { // Clip will modify the layout params. // And return a boolean to determine if the shape are fully clipped. isClipped = BarView_clip[coord.type](coordSysClipArea, layout); } var el = elementCreator[coord.type](seriesModel, data, dataIndex, layout, isHorizontalOrRadial, animationModel, baseAxis.model, false, roundCap); if (realtimeSortCfg) { /** * Force label animation because even if the element is * ignored because it's clipped, it may not be clipped after * changing order. Then, if not using forceLabelAnimation, * the label animation was never started, in which case, * the label will be the final value and doesn't have label * animation. */ el.forceLabelAnimation = true; } updateStyle(el, data, dataIndex, itemModel, layout, seriesModel, isHorizontalOrRadial, coord.type === 'polar'); if (isInitSort) { el.attr({ shape: layout }); } else if (realtimeSortCfg) { updateRealtimeAnimation(realtimeSortCfg, animationModel, el, layout, dataIndex, isHorizontalOrRadial, false, false); } else { initProps(el, { shape: layout }, seriesModel, dataIndex); } data.setItemGraphicEl(dataIndex, el); group.add(el); el.ignore = isClipped; }).update(function (newIndex, oldIndex) { var itemModel = data.getItemModel(newIndex); var layout = getLayout[coord.type](data, newIndex, itemModel); if (drawBackground) { var bgEl = void 0; if (oldBgEls.length === 0) { bgEl = createBackground(oldIndex); } else { bgEl = oldBgEls[oldIndex]; bgEl.useStyle(backgroundModel.getItemStyle()); // Only cartesian2d support borderRadius. if (coord.type === 'cartesian2d') { bgEl.setShape('r', barBorderRadius); } else { bgEl.setShape('cornerRadius', barBorderRadius); } bgEls[newIndex] = bgEl; } var bgLayout = getLayout[coord.type](data, newIndex); var shape = createBackgroundShape(isHorizontalOrRadial, bgLayout, coord); updateProps(bgEl, { shape: shape }, animationModel, newIndex); } var el = oldData.getItemGraphicEl(oldIndex); if (!data.hasValue(newIndex) || !isValidLayout[coord.type](layout)) { group.remove(el); return; } var isClipped = false; if (needsClip) { isClipped = BarView_clip[coord.type](coordSysClipArea, layout); if (isClipped) { group.remove(el); } } if (!el) { el = elementCreator[coord.type](seriesModel, data, newIndex, layout, isHorizontalOrRadial, animationModel, baseAxis.model, !!el, roundCap); } else { saveOldStyle(el); } if (realtimeSortCfg) { el.forceLabelAnimation = true; } if (isChangeOrder) { var textEl = el.getTextContent(); if (textEl) { var labelInnerStore = labelInner(textEl); if (labelInnerStore.prevValue != null) { /** * Set preValue to be value so that no new label * should be started, otherwise, it will take a full * `animationDurationUpdate` time to finish the * animation, which is not expected. */ labelInnerStore.prevValue = labelInnerStore.value; } } } // Not change anything if only order changed. // Especially not change label. else { updateStyle(el, data, newIndex, itemModel, layout, seriesModel, isHorizontalOrRadial, coord.type === 'polar'); } if (isInitSort) { el.attr({ shape: layout }); } else if (realtimeSortCfg) { updateRealtimeAnimation(realtimeSortCfg, animationModel, el, layout, newIndex, isHorizontalOrRadial, true, isChangeOrder); } else { updateProps(el, { shape: layout }, seriesModel, newIndex, null); } data.setItemGraphicEl(newIndex, el); el.ignore = isClipped; group.add(el); }).remove(function (dataIndex) { var el = oldData.getItemGraphicEl(dataIndex); el && removeElementWithFadeOut(el, seriesModel, dataIndex); }).execute(); var bgGroup = this._backgroundGroup || (this._backgroundGroup = new graphic_Group()); bgGroup.removeAll(); for (var i = 0; i < bgEls.length; ++i) { bgGroup.add(bgEls[i]); } group.add(bgGroup); this._backgroundEls = bgEls; this._data = data; }; BarView.prototype._renderLarge = function (seriesModel, ecModel, api) { this._clear(); createLarge(seriesModel, this.group); this._updateLargeClip(seriesModel); }; BarView.prototype._incrementalRenderLarge = function (params, seriesModel) { this._removeBackground(); createLarge(seriesModel, this.group, this._progressiveEls, true); }; BarView.prototype._updateLargeClip = function (seriesModel) { // Use clipPath in large mode. var clipPath = seriesModel.get('clip', true) && createClipPath(seriesModel.coordinateSystem, false, seriesModel); var group = this.group; if (clipPath) { group.setClipPath(clipPath); } else { group.removeClipPath(); } }; BarView.prototype._enableRealtimeSort = function (realtimeSortCfg, data, api) { var _this = this; // If no data in the first frame, wait for data to initSort if (!data.count()) { return; } var baseAxis = realtimeSortCfg.baseAxis; if (this._isFirstFrame) { this._dispatchInitSort(data, realtimeSortCfg, api); this._isFirstFrame = false; } else { var orderMapping_1 = function (idx) { var el = data.getItemGraphicEl(idx); var shape = el && el.shape; return shape && // The result should be consistent with the initial sort by data value. // Do not support the case that both positive and negative exist. Math.abs(baseAxis.isHorizontal() ? shape.height : shape.width) // If data is NaN, shape.xxx may be NaN, so use || 0 here in case || 0; }; this._onRendered = function () { _this._updateSortWithinSameData(data, orderMapping_1, baseAxis, api); }; api.getZr().on('rendered', this._onRendered); } }; BarView.prototype._dataSort = function (data, baseAxis, orderMapping) { var info = []; data.each(data.mapDimension(baseAxis.dim), function (ordinalNumber, dataIdx) { var mappedValue = orderMapping(dataIdx); mappedValue = mappedValue == null ? NaN : mappedValue; info.push({ dataIndex: dataIdx, mappedValue: mappedValue, ordinalNumber: ordinalNumber }); }); info.sort(function (a, b) { // If NaN, it will be treated as min val. return b.mappedValue - a.mappedValue; }); return { ordinalNumbers: Object(core_util["map"])(info, function (item) { return item.ordinalNumber; }) }; }; BarView.prototype._isOrderChangedWithinSameData = function (data, orderMapping, baseAxis) { var scale = baseAxis.scale; var ordinalDataDim = data.mapDimension(baseAxis.dim); var lastValue = Number.MAX_VALUE; for (var tickNum = 0, len = scale.getOrdinalMeta().categories.length; tickNum < len; ++tickNum) { var rawIdx = data.rawIndexOf(ordinalDataDim, scale.getRawOrdinalNumber(tickNum)); var value = rawIdx < 0 // If some tick have no bar, the tick will be treated as min. ? Number.MIN_VALUE // PENDING: if dataZoom on baseAxis exits, is it a performance issue? : orderMapping(data.indexOfRawIndex(rawIdx)); if (value > lastValue) { return true; } lastValue = value; } return false; }; /* * Consider the case when A and B changed order, whose representing * bars are both out of sight, we don't wish to trigger reorder action * as long as the order in the view doesn't change. */ BarView.prototype._isOrderDifferentInView = function (orderInfo, baseAxis) { var scale = baseAxis.scale; var extent = scale.getExtent(); var tickNum = Math.max(0, extent[0]); var tickMax = Math.min(extent[1], scale.getOrdinalMeta().categories.length - 1); for (; tickNum <= tickMax; ++tickNum) { if (orderInfo.ordinalNumbers[tickNum] !== scale.getRawOrdinalNumber(tickNum)) { return true; } } }; BarView.prototype._updateSortWithinSameData = function (data, orderMapping, baseAxis, api) { if (!this._isOrderChangedWithinSameData(data, orderMapping, baseAxis)) { return; } var sortInfo = this._dataSort(data, baseAxis, orderMapping); if (this._isOrderDifferentInView(sortInfo, baseAxis)) { this._removeOnRenderedListener(api); api.dispatchAction({ type: 'changeAxisOrder', componentType: baseAxis.dim + 'Axis', axisId: baseAxis.index, sortInfo: sortInfo }); } }; BarView.prototype._dispatchInitSort = function (data, realtimeSortCfg, api) { var baseAxis = realtimeSortCfg.baseAxis; var sortResult = this._dataSort(data, baseAxis, function (dataIdx) { return data.get(data.mapDimension(realtimeSortCfg.otherAxis.dim), dataIdx); }); api.dispatchAction({ type: 'changeAxisOrder', componentType: baseAxis.dim + 'Axis', isInitSort: true, axisId: baseAxis.index, sortInfo: sortResult }); }; BarView.prototype.remove = function (ecModel, api) { this._clear(this._model); this._removeOnRenderedListener(api); }; BarView.prototype.dispose = function (ecModel, api) { this._removeOnRenderedListener(api); }; BarView.prototype._removeOnRenderedListener = function (api) { if (this._onRendered) { api.getZr().off('rendered', this._onRendered); this._onRendered = null; } }; BarView.prototype._clear = function (model) { var group = this.group; var data = this._data; if (model && model.isAnimationEnabled() && data && !this._isLargeDraw) { this._removeBackground(); this._backgroundEls = []; data.eachItemGraphicEl(function (el) { removeElementWithFadeOut(el, model, getECData(el).dataIndex); }); } else { group.removeAll(); } this._data = null; this._isFirstFrame = true; }; BarView.prototype._removeBackground = function () { this.group.remove(this._backgroundGroup); this._backgroundGroup = null; }; BarView.type = 'bar'; return BarView; }(Chart); var BarView_clip = { cartesian2d: function (coordSysBoundingRect, layout) { var signWidth = layout.width < 0 ? -1 : 1; var signHeight = layout.height < 0 ? -1 : 1; // Needs positive width and height if (signWidth < 0) { layout.x += layout.width; layout.width = -layout.width; } if (signHeight < 0) { layout.y += layout.height; layout.height = -layout.height; } var coordSysX2 = coordSysBoundingRect.x + coordSysBoundingRect.width; var coordSysY2 = coordSysBoundingRect.y + coordSysBoundingRect.height; var x = BarView_mathMax(layout.x, coordSysBoundingRect.x); var x2 = BarView_mathMin(layout.x + layout.width, coordSysX2); var y = BarView_mathMax(layout.y, coordSysBoundingRect.y); var y2 = BarView_mathMin(layout.y + layout.height, coordSysY2); var xClipped = x2 < x; var yClipped = y2 < y; // When xClipped or yClipped, the element will be marked as `ignore`. // But we should also place the element at the edge of the coord sys bounding rect. // Because if data changed and the bar shows again, its transition animation // will begin at this place. layout.x = xClipped && x > coordSysX2 ? x2 : x; layout.y = yClipped && y > coordSysY2 ? y2 : y; layout.width = xClipped ? 0 : x2 - x; layout.height = yClipped ? 0 : y2 - y; // Reverse back if (signWidth < 0) { layout.x += layout.width; layout.width = -layout.width; } if (signHeight < 0) { layout.y += layout.height; layout.height = -layout.height; } return xClipped || yClipped; }, polar: function (coordSysClipArea, layout) { var signR = layout.r0 <= layout.r ? 1 : -1; // Make sure r is larger than r0 if (signR < 0) { var tmp = layout.r; layout.r = layout.r0; layout.r0 = tmp; } var r = BarView_mathMin(layout.r, coordSysClipArea.r); var r0 = BarView_mathMax(layout.r0, coordSysClipArea.r0); layout.r = r; layout.r0 = r0; var clipped = r - r0 < 0; // Reverse back if (signR < 0) { var tmp = layout.r; layout.r = layout.r0; layout.r0 = tmp; } return clipped; } }; var elementCreator = { cartesian2d: function (seriesModel, data, newIndex, layout, isHorizontal, animationModel, axisModel, isUpdate, roundCap) { var rect = new shape_Rect({ shape: Object(core_util["extend"])({}, layout), z2: 1 }); rect.__dataIndex = newIndex; rect.name = 'item'; if (animationModel) { var rectShape = rect.shape; var animateProperty = isHorizontal ? 'height' : 'width'; rectShape[animateProperty] = 0; } return rect; }, polar: function (seriesModel, data, newIndex, layout, isRadial, animationModel, axisModel, isUpdate, roundCap) { var ShapeClass = !isRadial && roundCap ? sausage : shape_Sector; var sector = new ShapeClass({ shape: layout, z2: 1 }); sector.name = 'item'; var positionMap = createPolarPositionMapping(isRadial); sector.calculateTextPosition = createSectorCalculateTextPosition(positionMap, { isRoundCap: ShapeClass === sausage }); // Animation if (animationModel) { var sectorShape = sector.shape; var animateProperty = isRadial ? 'r' : 'endAngle'; var animateTarget = {}; sectorShape[animateProperty] = isRadial ? layout.r0 : layout.startAngle; animateTarget[animateProperty] = layout[animateProperty]; (isUpdate ? updateProps : initProps)(sector, { shape: animateTarget // __value: typeof dataValue === 'string' ? parseInt(dataValue, 10) : dataValue }, animationModel); } return sector; } }; function shouldRealtimeSort(seriesModel, coordSys) { var realtimeSortOption = seriesModel.get('realtimeSort', true); var baseAxis = coordSys.getBaseAxis(); if (false) { if (realtimeSortOption) { if (baseAxis.type !== 'category') { warn('`realtimeSort` will not work because this bar series is not based on a category axis.'); } if (coordSys.type !== 'cartesian2d') { warn('`realtimeSort` will not work because this bar series is not on cartesian2d.'); } } } if (realtimeSortOption && baseAxis.type === 'category' && coordSys.type === 'cartesian2d') { return { baseAxis: baseAxis, otherAxis: coordSys.getOtherAxis(baseAxis) }; } } function updateRealtimeAnimation(realtimeSortCfg, seriesAnimationModel, el, layout, newIndex, isHorizontal, isUpdate, isChangeOrder) { var seriesTarget; var axisTarget; if (isHorizontal) { axisTarget = { x: layout.x, width: layout.width }; seriesTarget = { y: layout.y, height: layout.height }; } else { axisTarget = { y: layout.y, height: layout.height }; seriesTarget = { x: layout.x, width: layout.width }; } if (!isChangeOrder) { // Keep the original growth animation if only axis order changed. // Not start a new animation. (isUpdate ? updateProps : initProps)(el, { shape: seriesTarget }, seriesAnimationModel, newIndex, null); } var axisAnimationModel = seriesAnimationModel ? realtimeSortCfg.baseAxis.model : null; (isUpdate ? updateProps : initProps)(el, { shape: axisTarget }, axisAnimationModel, newIndex); } function checkPropertiesNotValid(obj, props) { for (var i = 0; i < props.length; i++) { if (!isFinite(obj[props[i]])) { return true; } } return false; } var rectPropties = ['x', 'y', 'width', 'height']; var polarPropties = ['cx', 'cy', 'r', 'startAngle', 'endAngle']; var isValidLayout = { cartesian2d: function (layout) { return !checkPropertiesNotValid(layout, rectPropties); }, polar: function (layout) { return !checkPropertiesNotValid(layout, polarPropties); } }; var getLayout = { // itemModel is only used to get borderWidth, which is not needed // when calculating bar background layout. cartesian2d: function (data, dataIndex, itemModel) { var layout = data.getItemLayout(dataIndex); var fixedLineWidth = itemModel ? getLineWidth(itemModel, layout) : 0; // fix layout with lineWidth var signX = layout.width > 0 ? 1 : -1; var signY = layout.height > 0 ? 1 : -1; return { x: layout.x + signX * fixedLineWidth / 2, y: layout.y + signY * fixedLineWidth / 2, width: layout.width - signX * fixedLineWidth, height: layout.height - signY * fixedLineWidth }; }, polar: function (data, dataIndex, itemModel) { var layout = data.getItemLayout(dataIndex); return { cx: layout.cx, cy: layout.cy, r0: layout.r0, r: layout.r, startAngle: layout.startAngle, endAngle: layout.endAngle, clockwise: layout.clockwise }; } }; function isZeroOnPolar(layout) { return layout.startAngle != null && layout.endAngle != null && layout.startAngle === layout.endAngle; } function createPolarPositionMapping(isRadial) { return function (isRadial) { var arcOrAngle = isRadial ? 'Arc' : 'Angle'; return function (position) { switch (position) { case 'start': case 'insideStart': case 'end': case 'insideEnd': return position + arcOrAngle; default: return position; } }; }(isRadial); } function updateStyle(el, data, dataIndex, itemModel, layout, seriesModel, isHorizontalOrRadial, isPolar) { var style = data.getItemVisual(dataIndex, 'style'); if (!isPolar) { var borderRadius = itemModel.get(['itemStyle', 'borderRadius']) || 0; el.setShape('r', borderRadius); } else if (!seriesModel.get('roundCap')) { var sectorShape = el.shape; var cornerRadius = getSectorCornerRadius(itemModel.getModel('itemStyle'), sectorShape, true); Object(core_util["extend"])(sectorShape, cornerRadius); el.setShape(sectorShape); } el.useStyle(style); var cursorStyle = itemModel.getShallow('cursor'); cursorStyle && el.attr('cursor', cursorStyle); var labelPositionOutside = isPolar ? isHorizontalOrRadial ? layout.r >= layout.r0 ? 'endArc' : 'startArc' : layout.endAngle >= layout.startAngle ? 'endAngle' : 'startAngle' : isHorizontalOrRadial ? layout.height >= 0 ? 'bottom' : 'top' : layout.width >= 0 ? 'right' : 'left'; var labelStatesModels = getLabelStatesModels(itemModel); setLabelStyle(el, labelStatesModels, { labelFetcher: seriesModel, labelDataIndex: dataIndex, defaultText: getDefaultLabel(seriesModel.getData(), dataIndex), inheritColor: style.fill, defaultOpacity: style.opacity, defaultOutsidePosition: labelPositionOutside }); var label = el.getTextContent(); if (isPolar && label) { var position = itemModel.get(['label', 'position']); el.textConfig.inside = position === 'middle' ? true : null; setSectorTextRotation(el, position === 'outside' ? labelPositionOutside : position, createPolarPositionMapping(isHorizontalOrRadial), itemModel.get(['label', 'rotate'])); } setLabelValueAnimation(label, labelStatesModels, seriesModel.getRawValue(dataIndex), function (value) { return getDefaultInterpolatedLabel(data, value); }); var emphasisModel = itemModel.getModel(['emphasis']); toggleHoverEmphasis(el, emphasisModel.get('focus'), emphasisModel.get('blurScope'), emphasisModel.get('disabled')); setStatesStylesFromModel(el, itemModel); if (isZeroOnPolar(layout)) { el.style.fill = 'none'; el.style.stroke = 'none'; Object(core_util["each"])(el.states, function (state) { if (state.style) { state.style.fill = state.style.stroke = 'none'; } }); } } // In case width or height are too small. function getLineWidth(itemModel, rawLayout) { // Has no border. var borderColor = itemModel.get(['itemStyle', 'borderColor']); if (!borderColor || borderColor === 'none') { return 0; } var lineWidth = itemModel.get(['itemStyle', 'borderWidth']) || 0; // width or height may be NaN for empty data var width = isNaN(rawLayout.width) ? Number.MAX_VALUE : Math.abs(rawLayout.width); var height = isNaN(rawLayout.height) ? Number.MAX_VALUE : Math.abs(rawLayout.height); return Math.min(lineWidth, width, height); } var LagePathShape = /** @class */function () { function LagePathShape() {} return LagePathShape; }(); var BarView_LargePath = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(LargePath, _super); function LargePath(opts) { var _this = _super.call(this, opts) || this; _this.type = 'largeBar'; return _this; } LargePath.prototype.getDefaultShape = function () { return new LagePathShape(); }; LargePath.prototype.buildPath = function (ctx, shape) { // Drawing lines is more efficient than drawing // a whole line or drawing rects. var points = shape.points; var baseDimIdx = this.baseDimIdx; var valueDimIdx = 1 - this.baseDimIdx; var startPoint = []; var size = []; var barWidth = this.barWidth; for (var i = 0; i < points.length; i += 3) { size[baseDimIdx] = barWidth; size[valueDimIdx] = points[i + 2]; startPoint[baseDimIdx] = points[i + baseDimIdx]; startPoint[valueDimIdx] = points[i + valueDimIdx]; ctx.rect(startPoint[0], startPoint[1], size[0], size[1]); } }; return LargePath; }(graphic_Path); function createLarge(seriesModel, group, progressiveEls, incremental) { // TODO support polar var data = seriesModel.getData(); var baseDimIdx = data.getLayout('valueAxisHorizontal') ? 1 : 0; var largeDataIndices = data.getLayout('largeDataIndices'); var barWidth = data.getLayout('size'); var backgroundModel = seriesModel.getModel('backgroundStyle'); var bgPoints = data.getLayout('largeBackgroundPoints'); if (bgPoints) { var bgEl = new BarView_LargePath({ shape: { points: bgPoints }, incremental: !!incremental, silent: true, z2: 0 }); bgEl.baseDimIdx = baseDimIdx; bgEl.largeDataIndices = largeDataIndices; bgEl.barWidth = barWidth; bgEl.useStyle(backgroundModel.getItemStyle()); group.add(bgEl); progressiveEls && progressiveEls.push(bgEl); } var el = new BarView_LargePath({ shape: { points: data.getLayout('largePoints') }, incremental: !!incremental, ignoreCoarsePointer: true, z2: 1 }); el.baseDimIdx = baseDimIdx; el.largeDataIndices = largeDataIndices; el.barWidth = barWidth; group.add(el); el.useStyle(data.getVisual('style')); // Stroke is rendered first to avoid overlapping with fill el.style.stroke = null; // Enable tooltip and user mouse/touch event handlers. getECData(el).seriesIndex = seriesModel.seriesIndex; if (!seriesModel.get('silent')) { el.on('mousedown', largePathUpdateDataIndex); el.on('mousemove', largePathUpdateDataIndex); } progressiveEls && progressiveEls.push(el); } // Use throttle to avoid frequently traverse to find dataIndex. var largePathUpdateDataIndex = throttle(function (event) { var largePath = this; var dataIndex = largePathFindDataIndex(largePath, event.offsetX, event.offsetY); getECData(largePath).dataIndex = dataIndex >= 0 ? dataIndex : null; }, 30, false); function largePathFindDataIndex(largePath, x, y) { var baseDimIdx = largePath.baseDimIdx; var valueDimIdx = 1 - baseDimIdx; var points = largePath.shape.points; var largeDataIndices = largePath.largeDataIndices; var startPoint = []; var size = []; var barWidth = largePath.barWidth; for (var i = 0, len = points.length / 3; i < len; i++) { var ii = i * 3; size[baseDimIdx] = barWidth; size[valueDimIdx] = points[ii + 2]; startPoint[baseDimIdx] = points[ii + baseDimIdx]; startPoint[valueDimIdx] = points[ii + valueDimIdx]; if (size[valueDimIdx] < 0) { startPoint[valueDimIdx] += size[valueDimIdx]; size[valueDimIdx] = -size[valueDimIdx]; } if (x >= startPoint[0] && x <= startPoint[0] + size[0] && y >= startPoint[1] && y <= startPoint[1] + size[1]) { return largeDataIndices[i]; } } return -1; } function createBackgroundShape(isHorizontalOrRadial, layout, coord) { if (isCoordinateSystemType(coord, 'cartesian2d')) { var rectShape = layout; var coordLayout = coord.getArea(); return { x: isHorizontalOrRadial ? rectShape.x : coordLayout.x, y: isHorizontalOrRadial ? coordLayout.y : rectShape.y, width: isHorizontalOrRadial ? rectShape.width : coordLayout.width, height: isHorizontalOrRadial ? coordLayout.height : rectShape.height }; } else { var coordLayout = coord.getArea(); var sectorShape = layout; return { cx: coordLayout.cx, cy: coordLayout.cy, r0: isHorizontalOrRadial ? coordLayout.r0 : sectorShape.r0, r: isHorizontalOrRadial ? coordLayout.r : sectorShape.r, startAngle: isHorizontalOrRadial ? sectorShape.startAngle : 0, endAngle: isHorizontalOrRadial ? sectorShape.endAngle : Math.PI * 2 }; } } function createBackgroundEl(coord, isHorizontalOrRadial, layout) { var ElementClz = coord.type === 'polar' ? shape_Sector : shape_Rect; return new ElementClz({ shape: createBackgroundShape(isHorizontalOrRadial, layout, coord), silent: true, z2: 0 }); } /* harmony default export */ var bar_BarView = (BarView_BarView); // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/bar/install.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 bar_install_install(registers) { registers.registerChartView(bar_BarView); registers.registerSeriesModel(BarSeries); registers.registerLayout(registers.PRIORITY.VISUAL.LAYOUT, core_util["curry"](barGrid_layout, 'bar')); // Do layout after other overall layout, which can prepare some information. registers.registerLayout(registers.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT, createProgressiveLayout('bar')); // Down sample after filter registers.registerProcessor(registers.PRIORITY.PROCESSOR.STATISTIC, dataSample('bar')); /** * @payload * @property {string} [componentType=series] * @property {number} [dx] * @property {number} [dy] * @property {number} [zoom] * @property {number} [originX] * @property {number} [originY] */ registers.registerAction({ type: 'changeAxisOrder', event: 'changeAxisOrder', update: 'update' }, function (payload, ecModel) { var componentType = payload.componentType || 'series'; ecModel.eachComponent({ mainType: componentType, query: payload }, function (componentModel) { if (payload.sortInfo) { componentModel.axis.setCategorySortInfo(payload.sortInfo); } }); }); } // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/pie/pieLayout.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 pieLayout_PI2 = Math.PI * 2; var pieLayout_RADIAN = Math.PI / 180; function getViewRect(seriesModel, api) { return getLayoutRect(seriesModel.getBoxLayoutParams(), { width: api.getWidth(), height: api.getHeight() }); } function getBasicPieLayout(seriesModel, api) { var viewRect = getViewRect(seriesModel, api); // center can be string or number when coordinateSystem is specified var center = seriesModel.get('center'); var radius = seriesModel.get('radius'); if (!core_util["isArray"](radius)) { radius = [0, radius]; } var width = number_parsePercent(viewRect.width, api.getWidth()); var height = number_parsePercent(viewRect.height, api.getHeight()); var size = Math.min(width, height); var r0 = number_parsePercent(radius[0], size / 2); var r = number_parsePercent(radius[1], size / 2); var cx; var cy; var coordSys = seriesModel.coordinateSystem; if (coordSys) { // percentage is not allowed when coordinate system is specified var point = coordSys.dataToPoint(center); cx = point[0] || 0; cy = point[1] || 0; } else { if (!core_util["isArray"](center)) { center = [center, center]; } cx = number_parsePercent(center[0], width) + viewRect.x; cy = number_parsePercent(center[1], height) + viewRect.y; } return { cx: cx, cy: cy, r0: r0, r: r }; } function pieLayout(seriesType, ecModel, api) { ecModel.eachSeriesByType(seriesType, function (seriesModel) { var data = seriesModel.getData(); var valueDim = data.mapDimension('value'); var viewRect = getViewRect(seriesModel, api); var _a = getBasicPieLayout(seriesModel, api), cx = _a.cx, cy = _a.cy, r = _a.r, r0 = _a.r0; var startAngle = -seriesModel.get('startAngle') * pieLayout_RADIAN; var endAngle = seriesModel.get('endAngle'); var padAngle = seriesModel.get('padAngle') * pieLayout_RADIAN; endAngle = endAngle === 'auto' ? startAngle - pieLayout_PI2 : -endAngle * pieLayout_RADIAN; var minAngle = seriesModel.get('minAngle') * pieLayout_RADIAN; var minAndPadAngle = minAngle + padAngle; var validDataCount = 0; data.each(valueDim, function (value) { !isNaN(value) && validDataCount++; }); var sum = data.getSum(valueDim); // Sum may be 0 var unitRadian = Math.PI / (sum || validDataCount) * 2; var clockwise = seriesModel.get('clockwise'); var roseType = seriesModel.get('roseType'); var stillShowZeroSum = seriesModel.get('stillShowZeroSum'); // [0...max] var extent = data.getDataExtent(valueDim); extent[0] = 0; var dir = clockwise ? 1 : -1; var angles = [startAngle, endAngle]; var halfPadAngle = dir * padAngle / 2; normalizeArcAngles(angles, !clockwise); startAngle = angles[0], endAngle = angles[1]; var layoutData = getSeriesLayoutData(seriesModel); layoutData.startAngle = startAngle; layoutData.endAngle = endAngle; layoutData.clockwise = clockwise; var angleRange = Math.abs(endAngle - startAngle); // In the case some sector angle is smaller than minAngle var restAngle = angleRange; var valueSumLargerThanMinAngle = 0; var currentAngle = startAngle; data.setLayout({ viewRect: viewRect, r: r }); data.each(valueDim, function (value, idx) { var angle; if (isNaN(value)) { data.setItemLayout(idx, { angle: NaN, startAngle: NaN, endAngle: NaN, clockwise: clockwise, cx: cx, cy: cy, r0: r0, r: roseType ? NaN : r }); return; } // FIXME 兼容 2.0 但是 roseType 是 area 的时候才是这样? if (roseType !== 'area') { angle = sum === 0 && stillShowZeroSum ? unitRadian : value * unitRadian; } else { angle = angleRange / validDataCount; } if (angle < minAndPadAngle) { angle = minAndPadAngle; restAngle -= minAndPadAngle; } else { valueSumLargerThanMinAngle += value; } var endAngle = currentAngle + dir * angle; // calculate display angle var actualStartAngle = 0; var actualEndAngle = 0; if (padAngle > angle) { actualStartAngle = currentAngle + dir * angle / 2; actualEndAngle = actualStartAngle; } else { actualStartAngle = currentAngle + halfPadAngle; actualEndAngle = endAngle - halfPadAngle; } data.setItemLayout(idx, { angle: angle, startAngle: actualStartAngle, endAngle: actualEndAngle, clockwise: clockwise, cx: cx, cy: cy, r0: r0, r: roseType ? linearMap(value, extent, [r0, r]) : r }); currentAngle = endAngle; }); // Some sector is constrained by minAngle and padAngle // Rest sectors needs recalculate angle if (restAngle < pieLayout_PI2 && validDataCount) { // Average the angle if rest angle is not enough after all angles is // Constrained by minAngle and padAngle if (restAngle <= 1e-3) { var angle_1 = angleRange / validDataCount; data.each(valueDim, function (value, idx) { if (!isNaN(value)) { var layout_1 = data.getItemLayout(idx); layout_1.angle = angle_1; var actualStartAngle = 0; var actualEndAngle = 0; if (angle_1 < padAngle) { actualStartAngle = startAngle + dir * (idx + 1 / 2) * angle_1; actualEndAngle = actualStartAngle; } else { actualStartAngle = startAngle + dir * idx * angle_1 + halfPadAngle; actualEndAngle = startAngle + dir * (idx + 1) * angle_1 - halfPadAngle; } layout_1.startAngle = actualStartAngle; layout_1.endAngle = actualEndAngle; } }); } else { unitRadian = restAngle / valueSumLargerThanMinAngle; currentAngle = startAngle; data.each(valueDim, function (value, idx) { if (!isNaN(value)) { var layout_2 = data.getItemLayout(idx); var angle = layout_2.angle === minAndPadAngle ? minAndPadAngle : value * unitRadian; var actualStartAngle = 0; var actualEndAngle = 0; if (angle < padAngle) { actualStartAngle = currentAngle + dir * angle / 2; actualEndAngle = actualStartAngle; } else { actualStartAngle = currentAngle + halfPadAngle; actualEndAngle = currentAngle + dir * angle - halfPadAngle; } layout_2.startAngle = actualStartAngle; layout_2.endAngle = actualEndAngle; currentAngle += dir * angle; } }); } } }); } var getSeriesLayoutData = makeInner(); // CONCATENATED MODULE: ./node_modules/echarts/lib/processor/dataFilter.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 dataFilter(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++) { // @ts-ignore FIXME: LegendModel if (!legendModels[i].isSelected(name)) { return false; } } return true; }); } }; } // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/pie/labelLayout.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ // FIXME emphasis label position is not same with normal label position var labelLayout_RADIAN = Math.PI / 180; function adjustSingleSide(list, cx, cy, r, dir, viewWidth, viewHeight, viewLeft, viewTop, farthestX) { if (list.length < 2) { return; } ; function recalculateXOnSemiToAlignOnEllipseCurve(semi) { var rB = semi.rB; var rB2 = rB * rB; for (var i = 0; i < semi.list.length; i++) { var item = semi.list[i]; var dy = Math.abs(item.label.y - cy); // horizontal r is always same with original r because x is not changed. var rA = r + item.len; var rA2 = rA * rA; // Use ellipse implicit function to calculate x var dx = Math.sqrt(Math.abs((1 - dy * dy / rB2) * rA2)); var newX = cx + (dx + item.len2) * dir; var deltaX = newX - item.label.x; var newTargetWidth = item.targetTextWidth - deltaX * dir; // text x is changed, so need to recalculate width. constrainTextWidth(item, newTargetWidth, true); item.label.x = newX; } } // Adjust X based on the shifted y. Make tight labels aligned on an ellipse curve. function recalculateX(items) { // Extremes of var topSemi = { list: [], maxY: 0 }; var bottomSemi = { list: [], maxY: 0 }; for (var i = 0; i < items.length; i++) { if (items[i].labelAlignTo !== 'none') { continue; } var item = items[i]; var semi = item.label.y > cy ? bottomSemi : topSemi; var dy = Math.abs(item.label.y - cy); if (dy >= semi.maxY) { var dx = item.label.x - cx - item.len2 * dir; // horizontal r is always same with original r because x is not changed. var rA = r + item.len; // Canculate rB based on the topest / bottemest label. var rB = Math.abs(dx) < rA ? Math.sqrt(dy * dy / (1 - dx * dx / rA / rA)) : rA; semi.rB = rB; semi.maxY = dy; } semi.list.push(item); } recalculateXOnSemiToAlignOnEllipseCurve(topSemi); recalculateXOnSemiToAlignOnEllipseCurve(bottomSemi); } var len = list.length; for (var i = 0; i < len; i++) { if (list[i].position === 'outer' && list[i].labelAlignTo === 'labelLine') { var dx = list[i].label.x - farthestX; list[i].linePoints[1][0] += dx; list[i].label.x = farthestX; } } if (shiftLayoutOnY(list, viewTop, viewTop + viewHeight)) { recalculateX(list); } } function avoidOverlap(labelLayoutList, cx, cy, r, viewWidth, viewHeight, viewLeft, viewTop) { var leftList = []; var rightList = []; var leftmostX = Number.MAX_VALUE; var rightmostX = -Number.MAX_VALUE; for (var i = 0; i < labelLayoutList.length; i++) { var label = labelLayoutList[i].label; if (isPositionCenter(labelLayoutList[i])) { continue; } if (label.x < cx) { leftmostX = Math.min(leftmostX, label.x); leftList.push(labelLayoutList[i]); } else { rightmostX = Math.max(rightmostX, label.x); rightList.push(labelLayoutList[i]); } } for (var i = 0; i < labelLayoutList.length; i++) { var layout = labelLayoutList[i]; if (!isPositionCenter(layout) && layout.linePoints) { if (layout.labelStyleWidth != null) { continue; } var label = layout.label; var linePoints = layout.linePoints; var targetTextWidth = void 0; if (layout.labelAlignTo === 'edge') { if (label.x < cx) { targetTextWidth = linePoints[2][0] - layout.labelDistance - viewLeft - layout.edgeDistance; } else { targetTextWidth = viewLeft + viewWidth - layout.edgeDistance - linePoints[2][0] - layout.labelDistance; } } else if (layout.labelAlignTo === 'labelLine') { if (label.x < cx) { targetTextWidth = leftmostX - viewLeft - layout.bleedMargin; } else { targetTextWidth = viewLeft + viewWidth - rightmostX - layout.bleedMargin; } } else { if (label.x < cx) { targetTextWidth = label.x - viewLeft - layout.bleedMargin; } else { targetTextWidth = viewLeft + viewWidth - label.x - layout.bleedMargin; } } layout.targetTextWidth = targetTextWidth; constrainTextWidth(layout, targetTextWidth); } } adjustSingleSide(rightList, cx, cy, r, 1, viewWidth, viewHeight, viewLeft, viewTop, rightmostX); adjustSingleSide(leftList, cx, cy, r, -1, viewWidth, viewHeight, viewLeft, viewTop, leftmostX); for (var i = 0; i < labelLayoutList.length; i++) { var layout = labelLayoutList[i]; if (!isPositionCenter(layout) && layout.linePoints) { var label = layout.label; var linePoints = layout.linePoints; var isAlignToEdge = layout.labelAlignTo === 'edge'; var padding = label.style.padding; var paddingH = padding ? padding[1] + padding[3] : 0; // textRect.width already contains paddingH if bgColor is set var extraPaddingH = label.style.backgroundColor ? 0 : paddingH; var realTextWidth = layout.rect.width + extraPaddingH; var dist = linePoints[1][0] - linePoints[2][0]; if (isAlignToEdge) { if (label.x < cx) { linePoints[2][0] = viewLeft + layout.edgeDistance + realTextWidth + layout.labelDistance; } else { linePoints[2][0] = viewLeft + viewWidth - layout.edgeDistance - realTextWidth - layout.labelDistance; } } else { if (label.x < cx) { linePoints[2][0] = label.x + layout.labelDistance; } else { linePoints[2][0] = label.x - layout.labelDistance; } linePoints[1][0] = linePoints[2][0] + dist; } linePoints[1][1] = linePoints[2][1] = label.y; } } } /** * Set max width of each label, and then wrap each label to the max width. * * @param layout label layout * @param availableWidth max width for the label to display * @param forceRecalculate recaculate the text layout even if the current width * is smaller than `availableWidth`. This is useful when the text was previously * wrapped by calling `constrainTextWidth` but now `availableWidth` changed, in * which case, previous wrapping should be redo. */ function constrainTextWidth(layout, availableWidth, forceRecalculate) { if (forceRecalculate === void 0) { forceRecalculate = false; } if (layout.labelStyleWidth != null) { // User-defined style.width has the highest priority. return; } var label = layout.label; var style = label.style; var textRect = layout.rect; var bgColor = style.backgroundColor; var padding = style.padding; var paddingH = padding ? padding[1] + padding[3] : 0; var overflow = style.overflow; // textRect.width already contains paddingH if bgColor is set var oldOuterWidth = textRect.width + (bgColor ? 0 : paddingH); if (availableWidth < oldOuterWidth || forceRecalculate) { var oldHeight = textRect.height; if (overflow && overflow.match('break')) { // Temporarily set background to be null to calculate // the bounding box without background. label.setStyle('backgroundColor', null); // Set constraining width label.setStyle('width', availableWidth - paddingH); // This is the real bounding box of the text without padding. var innerRect = label.getBoundingRect(); label.setStyle('width', Math.ceil(innerRect.width)); label.setStyle('backgroundColor', bgColor); } else { var availableInnerWidth = availableWidth - paddingH; var newWidth = availableWidth < oldOuterWidth // Current text is too wide, use `availableWidth` as max width. ? availableInnerWidth : // Current available width is enough, but the text may have // already been wrapped with a smaller available width. forceRecalculate ? availableInnerWidth > layout.unconstrainedWidth // Current available is larger than text width, // so don't constrain width (otherwise it may have // empty space in the background). ? null // Current available is smaller than text width, so // use the current available width as constraining // width. : availableInnerWidth // Current available width is enough, so no need to // constrain. : null; label.setStyle('width', newWidth); } var newRect = label.getBoundingRect(); textRect.width = newRect.width; var margin = (label.style.margin || 0) + 2.1; textRect.height = newRect.height + margin; textRect.y -= (textRect.height - oldHeight) / 2; } } function isPositionCenter(sectorShape) { // Not change x for center label return sectorShape.position === 'center'; } function pieLabelLayout(seriesModel) { var data = seriesModel.getData(); var labelLayoutList = []; var cx; var cy; var hasLabelRotate = false; var minShowLabelRadian = (seriesModel.get('minShowLabelAngle') || 0) * labelLayout_RADIAN; var viewRect = data.getLayout('viewRect'); var r = data.getLayout('r'); var viewWidth = viewRect.width; var viewLeft = viewRect.x; var viewTop = viewRect.y; var viewHeight = viewRect.height; function setNotShow(el) { el.ignore = true; } function isLabelShown(label) { if (!label.ignore) { return true; } for (var key in label.states) { if (label.states[key].ignore === false) { return true; } } return false; } data.each(function (idx) { var sector = data.getItemGraphicEl(idx); var sectorShape = sector.shape; var label = sector.getTextContent(); var labelLine = sector.getTextGuideLine(); var itemModel = data.getItemModel(idx); var labelModel = itemModel.getModel('label'); // Use position in normal or emphasis var labelPosition = labelModel.get('position') || itemModel.get(['emphasis', 'label', 'position']); var labelDistance = labelModel.get('distanceToLabelLine'); var labelAlignTo = labelModel.get('alignTo'); var edgeDistance = number_parsePercent(labelModel.get('edgeDistance'), viewWidth); var bleedMargin = labelModel.get('bleedMargin'); var labelLineModel = itemModel.getModel('labelLine'); var labelLineLen = labelLineModel.get('length'); labelLineLen = number_parsePercent(labelLineLen, viewWidth); var labelLineLen2 = labelLineModel.get('length2'); labelLineLen2 = number_parsePercent(labelLineLen2, viewWidth); if (Math.abs(sectorShape.endAngle - sectorShape.startAngle) < minShowLabelRadian) { Object(core_util["each"])(label.states, setNotShow); label.ignore = true; if (labelLine) { Object(core_util["each"])(labelLine.states, setNotShow); labelLine.ignore = true; } return; } if (!isLabelShown(label)) { return; } var midAngle = (sectorShape.startAngle + sectorShape.endAngle) / 2; var nx = Math.cos(midAngle); var ny = Math.sin(midAngle); var textX; var textY; var linePoints; var textAlign; cx = sectorShape.cx; cy = sectorShape.cy; var isLabelInside = labelPosition === 'inside' || labelPosition === 'inner'; if (labelPosition === 'center') { textX = sectorShape.cx; textY = sectorShape.cy; textAlign = 'center'; } else { var x1 = (isLabelInside ? (sectorShape.r + sectorShape.r0) / 2 * nx : sectorShape.r * nx) + cx; var y1 = (isLabelInside ? (sectorShape.r + sectorShape.r0) / 2 * ny : sectorShape.r * ny) + cy; textX = x1 + nx * 3; textY = y1 + ny * 3; if (!isLabelInside) { // For roseType var x2 = x1 + nx * (labelLineLen + r - sectorShape.r); var y2 = y1 + ny * (labelLineLen + r - sectorShape.r); var x3 = x2 + (nx < 0 ? -1 : 1) * labelLineLen2; var y3 = y2; if (labelAlignTo === 'edge') { // Adjust textX because text align of edge is opposite textX = nx < 0 ? viewLeft + edgeDistance : viewLeft + viewWidth - edgeDistance; } else { textX = x3 + (nx < 0 ? -labelDistance : labelDistance); } textY = y3; linePoints = [[x1, y1], [x2, y2], [x3, y3]]; } textAlign = isLabelInside ? 'center' : labelAlignTo === 'edge' ? nx > 0 ? 'right' : 'left' : nx > 0 ? 'left' : 'right'; } var PI = Math.PI; var labelRotate = 0; var rotate = labelModel.get('rotate'); if (Object(core_util["isNumber"])(rotate)) { labelRotate = rotate * (PI / 180); } else if (labelPosition === 'center') { labelRotate = 0; } else if (rotate === 'radial' || rotate === true) { var radialAngle = nx < 0 ? -midAngle + PI : -midAngle; labelRotate = radialAngle; } else if (rotate === 'tangential' && labelPosition !== 'outside' && labelPosition !== 'outer') { var rad = Math.atan2(nx, ny); if (rad < 0) { rad = PI * 2 + rad; } var isDown = ny > 0; if (isDown) { rad = PI + rad; } labelRotate = rad - PI; } hasLabelRotate = !!labelRotate; label.x = textX; label.y = textY; label.rotation = labelRotate; label.setStyle({ verticalAlign: 'middle' }); // Not sectorShape the inside label if (!isLabelInside) { var textRect = label.getBoundingRect().clone(); textRect.applyTransform(label.getComputedTransform()); // Text has a default 1px stroke. Exclude this. var margin = (label.style.margin || 0) + 2.1; textRect.y -= margin / 2; textRect.height += margin; labelLayoutList.push({ label: label, labelLine: labelLine, position: labelPosition, len: labelLineLen, len2: labelLineLen2, minTurnAngle: labelLineModel.get('minTurnAngle'), maxSurfaceAngle: labelLineModel.get('maxSurfaceAngle'), surfaceNormal: new core_Point(nx, ny), linePoints: linePoints, textAlign: textAlign, labelDistance: labelDistance, labelAlignTo: labelAlignTo, edgeDistance: edgeDistance, bleedMargin: bleedMargin, rect: textRect, unconstrainedWidth: textRect.width, labelStyleWidth: label.style.width }); } else { label.setStyle({ align: textAlign }); var selectState = label.states.select; if (selectState) { selectState.x += label.x; selectState.y += label.y; } } sector.setTextConfig({ inside: isLabelInside }); }); if (!hasLabelRotate && seriesModel.get('avoidLabelOverlap')) { avoidOverlap(labelLayoutList, cx, cy, r, viewWidth, viewHeight, viewLeft, viewTop); } for (var i = 0; i < labelLayoutList.length; i++) { var layout = labelLayoutList[i]; var label = layout.label; var labelLine = layout.labelLine; var notShowLabel = isNaN(label.x) || isNaN(label.y); if (label) { label.setStyle({ align: layout.textAlign }); if (notShowLabel) { Object(core_util["each"])(label.states, setNotShow); label.ignore = true; } var selectState = label.states.select; if (selectState) { selectState.x += label.x; selectState.y += label.y; } } if (labelLine) { var linePoints = layout.linePoints; if (notShowLabel || !linePoints) { Object(core_util["each"])(labelLine.states, setNotShow); labelLine.ignore = true; } else { limitTurnAngle(linePoints, layout.minTurnAngle); limitSurfaceAngle(linePoints, layout.surfaceNormal, layout.maxSurfaceAngle); labelLine.setShape({ points: linePoints }); // Set the anchor to the midpoint of sector label.__hostTarget.textGuideLineConfig = { anchor: new core_Point(linePoints[0][0], linePoints[0][1]) }; } } } } // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/pie/PieView.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ /** * Piece of pie including Sector, Label, LabelLine */ var PieView_PiePiece = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(PiePiece, _super); function PiePiece(data, idx, startAngle) { var _this = _super.call(this) || this; _this.z2 = 2; var text = new Text(); _this.setTextContent(text); _this.updateData(data, idx, startAngle, true); return _this; } PiePiece.prototype.updateData = function (data, idx, startAngle, firstCreate) { var sector = this; var seriesModel = data.hostModel; var itemModel = data.getItemModel(idx); var emphasisModel = itemModel.getModel('emphasis'); var layout = data.getItemLayout(idx); // cornerRadius & innerCornerRadius doesn't exist in the item layout. Use `0` if null value is specified. // see `setItemLayout` in `pieLayout.ts`. var sectorShape = Object(core_util["extend"])(getSectorCornerRadius(itemModel.getModel('itemStyle'), layout, true), layout); // Ignore NaN data. if (isNaN(sectorShape.startAngle)) { // Use NaN shape to avoid drawing shape. sector.setShape(sectorShape); return; } if (firstCreate) { sector.setShape(sectorShape); var animationType = seriesModel.getShallow('animationType'); if (seriesModel.ecModel.ssr) { // Use scale animation in SSR mode(opacity?) // Because CSS SVG animation doesn't support very customized shape animation. initProps(sector, { scaleX: 0, scaleY: 0 }, seriesModel, { dataIndex: idx, isFrom: true }); sector.originX = sectorShape.cx; sector.originY = sectorShape.cy; } else if (animationType === 'scale') { sector.shape.r = layout.r0; initProps(sector, { shape: { r: layout.r } }, seriesModel, idx); } // Expansion else { if (startAngle != null) { sector.setShape({ startAngle: startAngle, endAngle: startAngle }); initProps(sector, { shape: { startAngle: layout.startAngle, endAngle: layout.endAngle } }, seriesModel, idx); } else { sector.shape.endAngle = layout.startAngle; updateProps(sector, { shape: { endAngle: layout.endAngle } }, seriesModel, idx); } } } else { saveOldStyle(sector); // Transition animation from the old shape updateProps(sector, { shape: sectorShape }, seriesModel, idx); } sector.useStyle(data.getItemVisual(idx, 'style')); setStatesStylesFromModel(sector, itemModel); var midAngle = (layout.startAngle + layout.endAngle) / 2; var offset = seriesModel.get('selectedOffset'); var dx = Math.cos(midAngle) * offset; var dy = Math.sin(midAngle) * offset; var cursorStyle = itemModel.getShallow('cursor'); cursorStyle && sector.attr('cursor', cursorStyle); this._updateLabel(seriesModel, data, idx); sector.ensureState('emphasis').shape = Object(core_util["extend"])({ r: layout.r + (emphasisModel.get('scale') ? emphasisModel.get('scaleSize') || 0 : 0) }, getSectorCornerRadius(emphasisModel.getModel('itemStyle'), layout)); Object(core_util["extend"])(sector.ensureState('select'), { x: dx, y: dy, shape: getSectorCornerRadius(itemModel.getModel(['select', 'itemStyle']), layout) }); Object(core_util["extend"])(sector.ensureState('blur'), { shape: getSectorCornerRadius(itemModel.getModel(['blur', 'itemStyle']), layout) }); var labelLine = sector.getTextGuideLine(); var labelText = sector.getTextContent(); labelLine && Object(core_util["extend"])(labelLine.ensureState('select'), { x: dx, y: dy }); // TODO: needs dx, dy in zrender? Object(core_util["extend"])(labelText.ensureState('select'), { x: dx, y: dy }); toggleHoverEmphasis(this, emphasisModel.get('focus'), emphasisModel.get('blurScope'), emphasisModel.get('disabled')); }; PiePiece.prototype._updateLabel = function (seriesModel, data, idx) { var sector = this; var itemModel = data.getItemModel(idx); var labelLineModel = itemModel.getModel('labelLine'); var style = data.getItemVisual(idx, 'style'); var visualColor = style && style.fill; var visualOpacity = style && style.opacity; setLabelStyle(sector, getLabelStatesModels(itemModel), { labelFetcher: data.hostModel, labelDataIndex: idx, inheritColor: visualColor, defaultOpacity: visualOpacity, defaultText: seriesModel.getFormattedLabel(idx, 'normal') || data.getName(idx) }); var labelText = sector.getTextContent(); // Set textConfig on sector. sector.setTextConfig({ // reset position, rotation position: null, rotation: null }); // Make sure update style on labelText after setLabelStyle. // Because setLabelStyle will replace a new style on it. labelText.attr({ z2: 10 }); var labelPosition = seriesModel.get(['label', 'position']); if (labelPosition !== 'outside' && labelPosition !== 'outer') { sector.removeTextGuideLine(); } else { var polyline = this.getTextGuideLine(); if (!polyline) { polyline = new shape_Polyline(); this.setTextGuideLine(polyline); } // Default use item visual color setLabelLineStyle(this, getLabelLineStatesModels(itemModel), { stroke: visualColor, opacity: Object(core_util["retrieve3"])(labelLineModel.get(['lineStyle', 'opacity']), visualOpacity, 1) }); } }; return PiePiece; }(shape_Sector); // Pie view var PieView_PieView = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(PieView, _super); function PieView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.ignoreLabelLineUpdate = true; return _this; } PieView.prototype.render = function (seriesModel, ecModel, api, payload) { var data = seriesModel.getData(); var oldData = this._data; var group = this.group; var startAngle; // First render if (!oldData && data.count() > 0) { var shape = data.getItemLayout(0); for (var s = 1; isNaN(shape && shape.startAngle) && s < data.count(); ++s) { shape = data.getItemLayout(s); } if (shape) { startAngle = shape.startAngle; } } // remove empty-circle if it exists if (this._emptyCircleSector) { group.remove(this._emptyCircleSector); } // when all data are filtered, show lightgray empty circle if (data.count() === 0 && seriesModel.get('showEmptyCircle')) { var layoutData = getSeriesLayoutData(seriesModel); var sector = new shape_Sector({ shape: Object(core_util["extend"])(getBasicPieLayout(seriesModel, api), layoutData) }); sector.useStyle(seriesModel.getModel('emptyCircleStyle').getItemStyle()); this._emptyCircleSector = sector; group.add(sector); } data.diff(oldData).add(function (idx) { var piePiece = new PieView_PiePiece(data, idx, startAngle); data.setItemGraphicEl(idx, piePiece); group.add(piePiece); }).update(function (newIdx, oldIdx) { var piePiece = oldData.getItemGraphicEl(oldIdx); piePiece.updateData(data, newIdx, startAngle); piePiece.off('click'); group.add(piePiece); data.setItemGraphicEl(newIdx, piePiece); }).remove(function (idx) { var piePiece = oldData.getItemGraphicEl(idx); removeElementWithFadeOut(piePiece, seriesModel, idx); }).execute(); pieLabelLayout(seriesModel); // Always use initial animation. if (seriesModel.get('animationTypeUpdate') !== 'expansion') { this._data = data; } }; PieView.prototype.dispose = function () {}; PieView.prototype.containPoint = function (point, seriesModel) { var data = seriesModel.getData(); var itemLayout = data.getItemLayout(0); if (itemLayout) { var dx = point[0] - itemLayout.cx; var dy = point[1] - itemLayout.cy; var radius = Math.sqrt(dx * dx + dy * dy); return radius <= itemLayout.r && radius >= itemLayout.r0; } }; PieView.type = 'pie'; return PieView; }(Chart); /* harmony default export */ var pie_PieView = (PieView_PieView); // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/helper/createSeriesDataSimply.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ /** * [Usage]: * (1) * createListSimply(seriesModel, ['value']); * (2) * createListSimply(seriesModel, { * coordDimensions: ['value'], * dimensionsCount: 5 * }); */ function createSeriesDataSimply(seriesModel, opt, nameList) { opt = Object(core_util["isArray"])(opt) && { coordDimensions: opt } || Object(core_util["extend"])({ encodeDefine: seriesModel.getEncode() }, opt); var source = seriesModel.getSource(); var dimensions = prepareSeriesDataSchema(source, opt).dimensions; var list = new data_SeriesData(dimensions, seriesModel); list.initData(source, nameList); return list; } // CONCATENATED MODULE: ./node_modules/echarts/lib/visual/LegendVisualProvider.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ /** * LegendVisualProvider is an bridge that pick encoded color from data and * provide to the legend component. */ var LegendVisualProvider = /** @class */function () { function LegendVisualProvider( // Function to get data after filtered. It stores all the encoding info getDataWithEncodedVisual, // Function to get raw data before filtered. getRawData) { this._getDataWithEncodedVisual = getDataWithEncodedVisual; this._getRawData = getRawData; } LegendVisualProvider.prototype.getAllNames = function () { var rawData = this._getRawData(); // We find the name from the raw data. In case it's filtered by the legend component. // Normally, the name can be found in rawData, but can't be found in filtered data will display as gray. return rawData.mapArray(rawData.getName); }; LegendVisualProvider.prototype.containName = function (name) { var rawData = this._getRawData(); return rawData.indexOfName(name) >= 0; }; LegendVisualProvider.prototype.indexOfName = function (name) { // Only get data when necessary. // Because LegendVisualProvider constructor may be new in the stage that data is not prepared yet. // Invoking Series#getData immediately will throw an error. var dataWithEncodedVisual = this._getDataWithEncodedVisual(); return dataWithEncodedVisual.indexOfName(name); }; LegendVisualProvider.prototype.getItemVisual = function (dataIndex, key) { // Get encoded visual properties from final filtered data. var dataWithEncodedVisual = this._getDataWithEncodedVisual(); return dataWithEncodedVisual.getItemVisual(dataIndex, key); }; return LegendVisualProvider; }(); /* harmony default export */ var visual_LegendVisualProvider = (LegendVisualProvider); // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/pie/PieSeries.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 innerData = makeInner(); var PieSeries_PieSeriesModel = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(PieSeriesModel, _super); function PieSeriesModel() { return _super !== null && _super.apply(this, arguments) || this; } /** * @overwrite */ PieSeriesModel.prototype.init = function (option) { _super.prototype.init.apply(this, arguments); // Enable legend selection for each data item // Use a function instead of direct access because data reference may changed this.legendVisualProvider = new visual_LegendVisualProvider(core_util["bind"](this.getData, this), core_util["bind"](this.getRawData, this)); this._defaultLabelLine(option); }; /** * @overwrite */ PieSeriesModel.prototype.mergeOption = function () { _super.prototype.mergeOption.apply(this, arguments); }; /** * @overwrite */ PieSeriesModel.prototype.getInitialData = function () { return createSeriesDataSimply(this, { coordDimensions: ['value'], encodeDefaulter: core_util["curry"](makeSeriesEncodeForNameBased, this) }); }; /** * @overwrite */ PieSeriesModel.prototype.getDataParams = function (dataIndex) { var data = this.getData(); // update seats when data is changed var dataInner = innerData(data); var seats = dataInner.seats; if (!seats) { var valueList_1 = []; data.each(data.mapDimension('value'), function (value) { valueList_1.push(value); }); seats = dataInner.seats = getPercentSeats(valueList_1, data.hostModel.get('percentPrecision')); } var params = _super.prototype.getDataParams.call(this, dataIndex); // seats may be empty when sum is 0 params.percent = seats[dataIndex] || 0; params.$vars.push('percent'); return params; }; PieSeriesModel.prototype._defaultLabelLine = function (option) { // Extend labelLine emphasis defaultEmphasis(option, 'labelLine', ['show']); var labelLineNormalOpt = option.labelLine; var labelLineEmphasisOpt = option.emphasis.labelLine; // Not show label line if `label.normal.show = false` labelLineNormalOpt.show = labelLineNormalOpt.show && option.label.show; labelLineEmphasisOpt.show = labelLineEmphasisOpt.show && option.emphasis.label.show; }; PieSeriesModel.type = 'series.pie'; PieSeriesModel.defaultOption = { // zlevel: 0, z: 2, legendHoverLink: true, colorBy: 'data', // 默认全局居中 center: ['50%', '50%'], radius: [0, '75%'], // 默认顺时针 clockwise: true, startAngle: 90, endAngle: 'auto', padAngle: 0, // 最小角度改为0 minAngle: 0, // If the angle of a sector less than `minShowLabelAngle`, // the label will not be displayed. minShowLabelAngle: 0, // 选中时扇区偏移量 selectedOffset: 10, // 选择模式,默认关闭,可选single,multiple // selectedMode: false, // 南丁格尔玫瑰图模式,'radius'(半径) | 'area'(面积) // roseType: null, percentPrecision: 2, // If still show when all data zero. stillShowZeroSum: true, // cursor: null, left: 0, top: 0, right: 0, bottom: 0, width: null, height: null, label: { // color: 'inherit', // If rotate around circle rotate: 0, show: true, overflow: 'truncate', // 'outer', 'inside', 'center' position: 'outer', // 'none', 'labelLine', 'edge'. Works only when position is 'outer' alignTo: 'none', // Closest distance between label and chart edge. // Works only position is 'outer' and alignTo is 'edge'. edgeDistance: '25%', // Works only position is 'outer' and alignTo is not 'edge'. bleedMargin: 10, // Distance between text and label line. distanceToLabelLine: 5 // formatter: 标签文本格式器,同 tooltip.formatter,不支持异步回调 // 默认使用全局文本样式,详见 textStyle // distance: 当position为inner时有效,为label位置到圆心的距离与圆半径(环状图为内外半径和)的比例系数 }, // Enabled when label.normal.position is 'outer' labelLine: { show: true, // 引导线两段中的第一段长度 length: 15, // 引导线两段中的第二段长度 length2: 15, smooth: false, minTurnAngle: 90, maxSurfaceAngle: 90, lineStyle: { // color: 各异, width: 1, type: 'solid' } }, itemStyle: { borderWidth: 1, borderJoin: 'round' }, showEmptyCircle: true, emptyCircleStyle: { color: 'lightgray', opacity: 1 }, labelLayout: { // Hide the overlapped label. hideOverlap: true }, emphasis: { scale: true, scaleSize: 5 }, // If use strategy to avoid label overlapping avoidLabelOverlap: true, // Animation type. Valid values: expansion, scale animationType: 'expansion', animationDuration: 1000, // Animation type when update. Valid values: transition, expansion animationTypeUpdate: 'transition', animationEasingUpdate: 'cubicInOut', animationDurationUpdate: 500, animationEasing: 'cubicInOut' }; return PieSeriesModel; }(Series); /* harmony default export */ var PieSeries = (PieSeries_PieSeriesModel); // CONCATENATED MODULE: ./node_modules/echarts/lib/processor/negativeDataFilter.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 negativeDataFilter(seriesType) { return { seriesType: seriesType, reset: function (seriesModel, ecModel) { var data = seriesModel.getData(); data.filterSelf(function (idx) { // handle negative value condition var valueDim = data.mapDimension('value'); var curValue = data.get(valueDim, idx); if (Object(core_util["isNumber"])(curValue) && !isNaN(curValue) && curValue < 0) { return false; } return true; }); } }; } // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/pie/install.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 pie_install_install(registers) { registers.registerChartView(pie_PieView); registers.registerSeriesModel(PieSeries); createLegacyDataSelectAction('pie', registers.registerAction); registers.registerLayout(Object(core_util["curry"])(pieLayout, 'pie')); registers.registerProcessor(dataFilter('pie')); registers.registerProcessor(negativeDataFilter('pie')); } // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/scatter/ScatterSeries.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 ScatterSeries_ScatterSeriesModel = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(ScatterSeriesModel, _super); function ScatterSeriesModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = ScatterSeriesModel.type; _this.hasSymbolVisual = true; return _this; } ScatterSeriesModel.prototype.getInitialData = function (option, ecModel) { return helper_createSeriesData(null, this, { useEncodeDefaulter: true }); }; ScatterSeriesModel.prototype.getProgressive = function () { var progressive = this.option.progressive; if (progressive == null) { // PENDING return this.option.large ? 5e3 : this.get('progressive'); } return progressive; }; ScatterSeriesModel.prototype.getProgressiveThreshold = function () { var progressiveThreshold = this.option.progressiveThreshold; if (progressiveThreshold == null) { // PENDING return this.option.large ? 1e4 : this.get('progressiveThreshold'); } return progressiveThreshold; }; ScatterSeriesModel.prototype.brushSelector = function (dataIndex, data, selectors) { return selectors.point(data.getItemLayout(dataIndex)); }; ScatterSeriesModel.prototype.getZLevelKey = function () { // Each progressive series has individual key. return this.getData().count() > this.getProgressiveThreshold() ? this.id : ''; }; ScatterSeriesModel.type = 'series.scatter'; ScatterSeriesModel.dependencies = ['grid', 'polar', 'geo', 'singleAxis', 'calendar']; ScatterSeriesModel.defaultOption = { coordinateSystem: 'cartesian2d', // zlevel: 0, z: 2, legendHoverLink: true, symbolSize: 10, // symbolRotate: null, // 图形旋转控制 large: false, // Available when large is true largeThreshold: 2000, // cursor: null, itemStyle: { opacity: 0.8 // color: 各异 }, emphasis: { scale: true }, // If clip the overflow graphics // Works on cartesian / polar series clip: true, select: { itemStyle: { borderColor: '#212121' } }, universalTransition: { divideShape: 'clone' } // progressive: null }; return ScatterSeriesModel; }(Series); /* harmony default export */ var ScatterSeries = (ScatterSeries_ScatterSeriesModel); // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/helper/LargeSymbolDraw.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 */ // TODO Batch by color var BOOST_SIZE_THRESHOLD = 4; var LargeSymbolPathShape = /** @class */function () { function LargeSymbolPathShape() {} return LargeSymbolPathShape; }(); var LargeSymbolDraw_LargeSymbolPath = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(LargeSymbolPath, _super); function LargeSymbolPath(opts) { var _this = _super.call(this, opts) || this; _this._off = 0; _this.hoverDataIdx = -1; return _this; } LargeSymbolPath.prototype.getDefaultShape = function () { return new LargeSymbolPathShape(); }; LargeSymbolPath.prototype.reset = function () { this.notClear = false; this._off = 0; }; LargeSymbolPath.prototype.buildPath = function (path, shape) { var points = shape.points; var size = shape.size; var symbolProxy = this.symbolProxy; var symbolProxyShape = symbolProxy.shape; var ctx = path.getContext ? path.getContext() : path; var canBoost = ctx && size[0] < BOOST_SIZE_THRESHOLD; var softClipShape = this.softClipShape; var i; // Do draw in afterBrush. if (canBoost) { this._ctx = ctx; return; } this._ctx = null; for (i = this._off; i < points.length;) { var x = points[i++]; var y = points[i++]; if (isNaN(x) || isNaN(y)) { continue; } if (softClipShape && !softClipShape.contain(x, y)) { continue; } symbolProxyShape.x = x - size[0] / 2; symbolProxyShape.y = y - size[1] / 2; symbolProxyShape.width = size[0]; symbolProxyShape.height = size[1]; symbolProxy.buildPath(path, symbolProxyShape, true); } if (this.incremental) { this._off = i; this.notClear = true; } }; LargeSymbolPath.prototype.afterBrush = function () { var shape = this.shape; var points = shape.points; var size = shape.size; var ctx = this._ctx; var softClipShape = this.softClipShape; var i; if (!ctx) { return; } // PENDING If style or other canvas status changed? for (i = this._off; i < points.length;) { var x = points[i++]; var y = points[i++]; if (isNaN(x) || isNaN(y)) { continue; } if (softClipShape && !softClipShape.contain(x, y)) { continue; } // fillRect is faster than building a rect path and draw. // And it support light globalCompositeOperation. ctx.fillRect(x - size[0] / 2, y - size[1] / 2, size[0], size[1]); } if (this.incremental) { this._off = i; this.notClear = true; } }; LargeSymbolPath.prototype.findDataIndex = function (x, y) { // TODO ??? // Consider transform var shape = this.shape; var points = shape.points; var size = shape.size; var w = Math.max(size[0], 4); var h = Math.max(size[1], 4); // Not consider transform // Treat each element as a rect // top down traverse for (var idx = points.length / 2 - 1; idx >= 0; idx--) { var i = idx * 2; var x0 = points[i] - w / 2; var y0 = points[i + 1] - h / 2; if (x >= x0 && y >= y0 && x <= x0 + w && y <= y0 + h) { return idx; } } return -1; }; LargeSymbolPath.prototype.contain = function (x, y) { var localPos = this.transformCoordToLocal(x, y); var rect = this.getBoundingRect(); x = localPos[0]; y = localPos[1]; if (rect.contain(x, y)) { // Cache found data index. var dataIdx = this.hoverDataIdx = this.findDataIndex(x, y); return dataIdx >= 0; } this.hoverDataIdx = -1; return false; }; LargeSymbolPath.prototype.getBoundingRect = function () { // Ignore stroke for large symbol draw. var rect = this._rect; if (!rect) { var shape = this.shape; var points = shape.points; var size = shape.size; var w = size[0]; var h = size[1]; var minX = Infinity; var minY = Infinity; var maxX = -Infinity; var maxY = -Infinity; for (var i = 0; i < points.length;) { var x = points[i++]; var y = points[i++]; minX = Math.min(x, minX); maxX = Math.max(x, maxX); minY = Math.min(y, minY); maxY = Math.max(y, maxY); } rect = this._rect = new core_BoundingRect(minX - w / 2, minY - h / 2, maxX - minX + w, maxY - minY + h); } return rect; }; return LargeSymbolPath; }(graphic_Path); var LargeSymbolDraw_LargeSymbolDraw = /** @class */function () { function LargeSymbolDraw() { this.group = new graphic_Group(); } /** * Update symbols draw by new data */ LargeSymbolDraw.prototype.updateData = function (data, opt) { this._clear(); var symbolEl = this._create(); symbolEl.setShape({ points: data.getLayout('points') }); this._setCommon(symbolEl, data, opt); }; LargeSymbolDraw.prototype.updateLayout = function (data) { var points = data.getLayout('points'); this.group.eachChild(function (child) { if (child.startIndex != null) { var len = (child.endIndex - child.startIndex) * 2; var byteOffset = child.startIndex * 4 * 2; points = new Float32Array(points.buffer, byteOffset, len); } child.setShape('points', points); // Reset draw cursor. child.reset(); }); }; LargeSymbolDraw.prototype.incrementalPrepareUpdate = function (data) { this._clear(); }; LargeSymbolDraw.prototype.incrementalUpdate = function (taskParams, data, opt) { var lastAdded = this._newAdded[0]; var points = data.getLayout('points'); var oldPoints = lastAdded && lastAdded.shape.points; // Merging the exists. Each element has 1e4 points. // Consider the performance balance between too much elements and too much points in one shape(may affect hover optimization) if (oldPoints && oldPoints.length < 2e4) { var oldLen = oldPoints.length; var newPoints = new Float32Array(oldLen + points.length); // Concat two array newPoints.set(oldPoints); newPoints.set(points, oldLen); // Update endIndex lastAdded.endIndex = taskParams.end; lastAdded.setShape({ points: newPoints }); } else { // Clear this._newAdded = []; var symbolEl = this._create(); symbolEl.startIndex = taskParams.start; symbolEl.endIndex = taskParams.end; symbolEl.incremental = true; symbolEl.setShape({ points: points }); this._setCommon(symbolEl, data, opt); } }; LargeSymbolDraw.prototype.eachRendered = function (cb) { this._newAdded[0] && cb(this._newAdded[0]); }; LargeSymbolDraw.prototype._create = function () { var symbolEl = new LargeSymbolDraw_LargeSymbolPath({ cursor: 'default' }); symbolEl.ignoreCoarsePointer = true; this.group.add(symbolEl); this._newAdded.push(symbolEl); return symbolEl; }; LargeSymbolDraw.prototype._setCommon = function (symbolEl, data, opt) { var hostModel = data.hostModel; opt = opt || {}; var size = data.getVisual('symbolSize'); symbolEl.setShape('size', size instanceof Array ? size : [size, size]); symbolEl.softClipShape = opt.clipShape || null; // Create symbolProxy to build path for each data symbolEl.symbolProxy = symbol_createSymbol(data.getVisual('symbol'), 0, 0, 0, 0); // Use symbolProxy setColor method symbolEl.setColor = symbolEl.symbolProxy.setColor; var extrudeShadow = symbolEl.shape.size[0] < BOOST_SIZE_THRESHOLD; symbolEl.useStyle( // Draw shadow when doing fillRect is extremely slow. hostModel.getModel('itemStyle').getItemStyle(extrudeShadow ? ['color', 'shadowBlur', 'shadowColor'] : ['color'])); var globalStyle = data.getVisual('style'); var visualColor = globalStyle && globalStyle.fill; if (visualColor) { symbolEl.setColor(visualColor); } var ecData = getECData(symbolEl); // Enable tooltip // PENDING May have performance issue when path is extremely large ecData.seriesIndex = hostModel.seriesIndex; symbolEl.on('mousemove', function (e) { ecData.dataIndex = null; var dataIndex = symbolEl.hoverDataIdx; if (dataIndex >= 0) { // Provide dataIndex for tooltip ecData.dataIndex = dataIndex + (symbolEl.startIndex || 0); } }); }; LargeSymbolDraw.prototype.remove = function () { this._clear(); }; LargeSymbolDraw.prototype._clear = function () { this._newAdded = []; this.group.removeAll(); }; return LargeSymbolDraw; }(); /* harmony default export */ var helper_LargeSymbolDraw = (LargeSymbolDraw_LargeSymbolDraw); // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/scatter/ScatterView.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 ScatterView_ScatterView = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(ScatterView, _super); function ScatterView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = ScatterView.type; return _this; } ScatterView.prototype.render = function (seriesModel, ecModel, api) { var data = seriesModel.getData(); var symbolDraw = this._updateSymbolDraw(data, seriesModel); symbolDraw.updateData(data, { // TODO // If this parameter should be a shape or a bounding volume // shape will be more general. // But bounding volume like bounding rect will be much faster in the contain calculation clipShape: this._getClipShape(seriesModel) }); this._finished = true; }; ScatterView.prototype.incrementalPrepareRender = function (seriesModel, ecModel, api) { var data = seriesModel.getData(); var symbolDraw = this._updateSymbolDraw(data, seriesModel); symbolDraw.incrementalPrepareUpdate(data); this._finished = false; }; ScatterView.prototype.incrementalRender = function (taskParams, seriesModel, ecModel) { this._symbolDraw.incrementalUpdate(taskParams, seriesModel.getData(), { clipShape: this._getClipShape(seriesModel) }); this._finished = taskParams.end === seriesModel.getData().count(); }; ScatterView.prototype.updateTransform = function (seriesModel, ecModel, api) { var data = seriesModel.getData(); // Must mark group dirty and make sure the incremental layer will be cleared // PENDING this.group.dirty(); if (!this._finished || data.count() > 1e4) { return { update: true }; } else { var res = pointsLayout('').reset(seriesModel, ecModel, api); if (res.progress) { res.progress({ start: 0, end: data.count(), count: data.count() }, data); } this._symbolDraw.updateLayout(data); } }; ScatterView.prototype.eachRendered = function (cb) { this._symbolDraw && this._symbolDraw.eachRendered(cb); }; ScatterView.prototype._getClipShape = function (seriesModel) { if (!seriesModel.get('clip', true)) { return; } var coordSys = seriesModel.coordinateSystem; // PENDING make `0.1` configurable, for example, `clipTolerance`? return coordSys && coordSys.getArea && coordSys.getArea(.1); }; ScatterView.prototype._updateSymbolDraw = function (data, seriesModel) { var symbolDraw = this._symbolDraw; var pipelineContext = seriesModel.pipelineContext; var isLargeDraw = pipelineContext.large; if (!symbolDraw || isLargeDraw !== this._isLargeDraw) { symbolDraw && symbolDraw.remove(); symbolDraw = this._symbolDraw = isLargeDraw ? new helper_LargeSymbolDraw() : new helper_SymbolDraw(); this._isLargeDraw = isLargeDraw; this.group.removeAll(); } this.group.add(symbolDraw.group); return symbolDraw; }; ScatterView.prototype.remove = function (ecModel, api) { this._symbolDraw && this._symbolDraw.remove(true); this._symbolDraw = null; }; ScatterView.prototype.dispose = function () {}; ScatterView.type = 'scatter'; return ScatterView; }(Chart); /* harmony default export */ var scatter_ScatterView = (ScatterView_ScatterView); // CONCATENATED MODULE: ./node_modules/echarts/lib/coord/cartesian/GridModel.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 GridModel_GridModel = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(GridModel, _super); function GridModel() { return _super !== null && _super.apply(this, arguments) || this; } GridModel.type = 'grid'; GridModel.dependencies = ['xAxis', 'yAxis']; GridModel.layoutMode = 'box'; GridModel.defaultOption = { show: false, // zlevel: 0, z: 0, left: '10%', top: 60, right: '10%', bottom: 70, // If grid size contain label containLabel: false, // width: {totalWidth} - left - right, // height: {totalHeight} - top - bottom, backgroundColor: 'rgba(0,0,0,0)', borderWidth: 1, borderColor: '#ccc' }; return GridModel; }(Component); /* harmony default export */ var cartesian_GridModel = (GridModel_GridModel); // CONCATENATED MODULE: ./node_modules/echarts/lib/coord/cartesian/AxisModel.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 AxisModel_CartesianAxisModel = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(CartesianAxisModel, _super); function CartesianAxisModel() { return _super !== null && _super.apply(this, arguments) || this; } CartesianAxisModel.prototype.getCoordSysModel = function () { return this.getReferringComponents('grid', SINGLE_REFERRING).models[0]; }; CartesianAxisModel.type = 'cartesian2dAxis'; return CartesianAxisModel; }(Component); core_util["mixin"](AxisModel_CartesianAxisModel, AxisModelCommonMixin); /* harmony default export */ var cartesian_AxisModel = (AxisModel_CartesianAxisModel); // CONCATENATED MODULE: ./node_modules/echarts/lib/coord/axisDefault.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 axisDefault_defaultOption = { show: true, // zlevel: 0, z: 0, // Inverse the axis. inverse: false, // Axis name displayed. name: '', // 'start' | 'middle' | 'end' nameLocation: 'end', // By degree. By default auto rotate by nameLocation. nameRotate: null, nameTruncate: { maxWidth: null, ellipsis: '...', placeholder: '.' }, // Use global text style by default. nameTextStyle: {}, // The gap between axisName and axisLine. nameGap: 15, // Default `false` to support tooltip. silent: false, // Default `false` to avoid legacy user event listener fail. triggerEvent: false, tooltip: { show: false }, axisPointer: {}, axisLine: { show: true, onZero: true, onZeroAxisIndex: null, lineStyle: { color: '#6E7079', width: 1, type: 'solid' }, // The arrow at both ends the the axis. symbol: ['none', 'none'], symbolSize: [10, 15] }, axisTick: { show: true, // Whether axisTick is inside the grid or outside the grid. inside: false, // The length of axisTick. length: 5, lineStyle: { width: 1 } }, axisLabel: { show: true, // Whether axisLabel is inside the grid or outside the grid. inside: false, rotate: 0, // true | false | null/undefined (auto) showMinLabel: null, // true | false | null/undefined (auto) showMaxLabel: null, margin: 8, // formatter: null, fontSize: 12 }, splitLine: { show: true, showMinLine: true, showMaxLine: true, lineStyle: { color: ['#E0E6F1'], width: 1, type: 'solid' } }, splitArea: { show: false, areaStyle: { color: ['rgba(250,250,250,0.2)', 'rgba(210,219,238,0.2)'] } } }; var axisDefault_categoryAxis = core_util["merge"]({ // The gap at both ends of the axis. For categoryAxis, boolean. boundaryGap: true, // Set false to faster category collection. deduplication: null, // splitArea: { // show: false // }, splitLine: { show: false }, axisTick: { // If tick is align with label when boundaryGap is true alignWithLabel: false, interval: 'auto' }, axisLabel: { interval: 'auto' } }, axisDefault_defaultOption); var axisDefault_valueAxis = core_util["merge"]({ boundaryGap: [0, 0], axisLine: { // Not shown when other axis is categoryAxis in cartesian show: 'auto' }, axisTick: { // Not shown when other axis is categoryAxis in cartesian show: 'auto' }, // TODO // min/max: [30, datamin, 60] or [20, datamin] or [datamin, 60] splitNumber: 5, minorTick: { // Minor tick, not available for cateogry axis. show: false, // Split number of minor ticks. The value should be in range of (0, 100) splitNumber: 5, // Length of minor tick length: 3, // Line style lineStyle: { // Default to be same with axisTick } }, minorSplitLine: { show: false, lineStyle: { color: '#F4F7FD', width: 1 } } }, axisDefault_defaultOption); var timeAxis = core_util["merge"]({ splitNumber: 6, axisLabel: { // To eliminate labels that are not nice showMinLabel: false, showMaxLabel: false, rich: { primary: { fontWeight: 'bold' } } }, splitLine: { show: false } }, axisDefault_valueAxis); var logAxis = core_util["defaults"]({ logBase: 10 }, axisDefault_valueAxis); /* harmony default export */ var axisDefault = ({ category: axisDefault_categoryAxis, value: axisDefault_valueAxis, time: timeAxis, log: logAxis }); // CONCATENATED MODULE: ./node_modules/echarts/lib/coord/axisCommonTypes.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 AXIS_TYPES = { value: 1, category: 1, time: 1, log: 1 }; // CONCATENATED MODULE: ./node_modules/echarts/lib/coord/axisModelCreator.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ /** * Generate sub axis model class * @param axisName 'x' 'y' 'radius' 'angle' 'parallel' ... */ function axisModelCreator(registers, axisName, BaseAxisModelClass, extraDefaultOption) { Object(core_util["each"])(AXIS_TYPES, function (v, axisType) { var defaultOption = Object(core_util["merge"])(Object(core_util["merge"])({}, axisDefault[axisType], true), extraDefaultOption, true); var AxisModel = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(AxisModel, _super); function AxisModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = axisName + 'Axis.' + axisType; return _this; } AxisModel.prototype.mergeDefaultAndTheme = function (option, ecModel) { var layoutMode = fetchLayoutMode(this); var inputPositionParams = layoutMode ? getLayoutParams(option) : {}; var themeModel = ecModel.getTheme(); Object(core_util["merge"])(option, themeModel.get(axisType + 'Axis')); Object(core_util["merge"])(option, this.getDefaultOption()); option.type = getAxisType(option); if (layoutMode) { mergeLayoutParam(option, inputPositionParams, layoutMode); } }; AxisModel.prototype.optionUpdated = function () { var thisOption = this.option; if (thisOption.type === 'category') { this.__ordinalMeta = data_OrdinalMeta.createByAxisModel(this); } }; /** * Should not be called before all of 'getInitailData' finished. * Because categories are collected during initializing data. */ AxisModel.prototype.getCategories = function (rawData) { var option = this.option; // FIXME // warning if called before all of 'getInitailData' finished. if (option.type === 'category') { if (rawData) { return option.data; } return this.__ordinalMeta.categories; } }; AxisModel.prototype.getOrdinalMeta = function () { return this.__ordinalMeta; }; AxisModel.type = axisName + 'Axis.' + axisType; AxisModel.defaultOption = defaultOption; return AxisModel; }(BaseAxisModelClass); registers.registerComponentModel(AxisModel); }); registers.registerSubTypeDefaulter(axisName + 'Axis', getAxisType); } function getAxisType(option) { // Default axis with data is category axis return option.type || (option.data ? 'category' : 'value'); } // CONCATENATED MODULE: ./node_modules/echarts/lib/coord/cartesian/Cartesian.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 Cartesian_Cartesian = /** @class */function () { function Cartesian(name) { this.type = 'cartesian'; this._dimList = []; this._axes = {}; this.name = name || ''; } Cartesian.prototype.getAxis = function (dim) { return this._axes[dim]; }; Cartesian.prototype.getAxes = function () { return core_util["map"](this._dimList, function (dim) { return this._axes[dim]; }, this); }; Cartesian.prototype.getAxesByScale = function (scaleType) { scaleType = scaleType.toLowerCase(); return core_util["filter"](this.getAxes(), function (axis) { return axis.scale.type === scaleType; }); }; Cartesian.prototype.addAxis = function (axis) { var dim = axis.dim; this._axes[dim] = axis; this._dimList.push(dim); }; return Cartesian; }(); ; /* harmony default export */ var cartesian_Cartesian = (Cartesian_Cartesian); // CONCATENATED MODULE: ./node_modules/echarts/lib/coord/cartesian/Cartesian2D.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 cartesian2DDimensions = ['x', 'y']; function canCalculateAffineTransform(scale) { return scale.type === 'interval' || scale.type === 'time'; } var Cartesian2D_Cartesian2D = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(Cartesian2D, _super); function Cartesian2D() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = 'cartesian2d'; _this.dimensions = cartesian2DDimensions; return _this; } /** * Calculate an affine transform matrix if two axes are time or value. * It's mainly for accelartion on the large time series data. */ Cartesian2D.prototype.calcAffineTransform = function () { this._transform = this._invTransform = null; var xAxisScale = this.getAxis('x').scale; var yAxisScale = this.getAxis('y').scale; if (!canCalculateAffineTransform(xAxisScale) || !canCalculateAffineTransform(yAxisScale)) { return; } var xScaleExtent = xAxisScale.getExtent(); var yScaleExtent = yAxisScale.getExtent(); var start = this.dataToPoint([xScaleExtent[0], yScaleExtent[0]]); var end = this.dataToPoint([xScaleExtent[1], yScaleExtent[1]]); var xScaleSpan = xScaleExtent[1] - xScaleExtent[0]; var yScaleSpan = yScaleExtent[1] - yScaleExtent[0]; if (!xScaleSpan || !yScaleSpan) { return; } // Accelerate data to point calculation on the special large time series data. var scaleX = (end[0] - start[0]) / xScaleSpan; var scaleY = (end[1] - start[1]) / yScaleSpan; var translateX = start[0] - xScaleExtent[0] * scaleX; var translateY = start[1] - yScaleExtent[0] * scaleY; var m = this._transform = [scaleX, 0, 0, scaleY, translateX, translateY]; this._invTransform = matrix_invert([], m); }; /** * Base axis will be used on stacking. */ Cartesian2D.prototype.getBaseAxis = function () { return this.getAxesByScale('ordinal')[0] || this.getAxesByScale('time')[0] || this.getAxis('x'); }; Cartesian2D.prototype.containPoint = function (point) { var axisX = this.getAxis('x'); var axisY = this.getAxis('y'); return axisX.contain(axisX.toLocalCoord(point[0])) && axisY.contain(axisY.toLocalCoord(point[1])); }; Cartesian2D.prototype.containData = function (data) { return this.getAxis('x').containData(data[0]) && this.getAxis('y').containData(data[1]); }; Cartesian2D.prototype.containZone = function (data1, data2) { var zoneDiag1 = this.dataToPoint(data1); var zoneDiag2 = this.dataToPoint(data2); var area = this.getArea(); var zone = new core_BoundingRect(zoneDiag1[0], zoneDiag1[1], zoneDiag2[0] - zoneDiag1[0], zoneDiag2[1] - zoneDiag1[1]); return area.intersect(zone); }; Cartesian2D.prototype.dataToPoint = function (data, clamp, out) { out = out || []; var xVal = data[0]; var yVal = data[1]; // Fast path if (this._transform // It's supported that if data is like `[Inifity, 123]`, where only Y pixel calculated. && xVal != null && isFinite(xVal) && yVal != null && isFinite(yVal)) { return applyTransform(out, data, this._transform); } var xAxis = this.getAxis('x'); var yAxis = this.getAxis('y'); out[0] = xAxis.toGlobalCoord(xAxis.dataToCoord(xVal, clamp)); out[1] = yAxis.toGlobalCoord(yAxis.dataToCoord(yVal, clamp)); return out; }; Cartesian2D.prototype.clampData = function (data, out) { var xScale = this.getAxis('x').scale; var yScale = this.getAxis('y').scale; var xAxisExtent = xScale.getExtent(); var yAxisExtent = yScale.getExtent(); var x = xScale.parse(data[0]); var y = yScale.parse(data[1]); out = out || []; out[0] = Math.min(Math.max(Math.min(xAxisExtent[0], xAxisExtent[1]), x), Math.max(xAxisExtent[0], xAxisExtent[1])); out[1] = Math.min(Math.max(Math.min(yAxisExtent[0], yAxisExtent[1]), y), Math.max(yAxisExtent[0], yAxisExtent[1])); return out; }; Cartesian2D.prototype.pointToData = function (point, clamp) { var out = []; if (this._invTransform) { return applyTransform(out, point, this._invTransform); } var xAxis = this.getAxis('x'); var yAxis = this.getAxis('y'); out[0] = xAxis.coordToData(xAxis.toLocalCoord(point[0]), clamp); out[1] = yAxis.coordToData(yAxis.toLocalCoord(point[1]), clamp); return out; }; Cartesian2D.prototype.getOtherAxis = function (axis) { return this.getAxis(axis.dim === 'x' ? 'y' : 'x'); }; /** * Get rect area of cartesian. * Area will have a contain function to determine if a point is in the coordinate system. */ Cartesian2D.prototype.getArea = function (tolerance) { tolerance = tolerance || 0; var xExtent = this.getAxis('x').getGlobalExtent(); var yExtent = this.getAxis('y').getGlobalExtent(); var x = Math.min(xExtent[0], xExtent[1]) - tolerance; var y = Math.min(yExtent[0], yExtent[1]) - tolerance; var width = Math.max(xExtent[0], xExtent[1]) - x + tolerance; var height = Math.max(yExtent[0], yExtent[1]) - y + tolerance; return new core_BoundingRect(x, y, width, height); }; return Cartesian2D; }(cartesian_Cartesian); ; /* harmony default export */ var cartesian_Cartesian2D = (Cartesian2D_Cartesian2D); // CONCATENATED MODULE: ./node_modules/echarts/lib/coord/cartesian/Axis2D.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 Axis2D_Axis2D = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(Axis2D, _super); function Axis2D(dim, scale, coordExtent, axisType, position) { var _this = _super.call(this, dim, scale, coordExtent) || this; /** * Index of axis, can be used as key * Injected outside. */ _this.index = 0; _this.type = axisType || 'value'; _this.position = position || 'bottom'; return _this; } Axis2D.prototype.isHorizontal = function () { var position = this.position; return position === 'top' || position === 'bottom'; }; /** * Each item cooresponds to this.getExtent(), which * means globalExtent[0] may greater than globalExtent[1], * unless `asc` is input. * * @param {boolean} [asc] * @return {Array.} */ Axis2D.prototype.getGlobalExtent = function (asc) { var ret = this.getExtent(); ret[0] = this.toGlobalCoord(ret[0]); ret[1] = this.toGlobalCoord(ret[1]); asc && ret[0] > ret[1] && ret.reverse(); return ret; }; Axis2D.prototype.pointToData = function (point, clamp) { return this.coordToData(this.toLocalCoord(point[this.dim === 'x' ? 0 : 1]), clamp); }; /** * Set ordinalSortInfo * @param info new OrdinalSortInfo */ Axis2D.prototype.setCategorySortInfo = function (info) { if (this.type !== 'category') { return false; } this.model.option.categorySortInfo = info; this.scale.setSortInfo(info); }; return Axis2D; }(coord_Axis); /* harmony default export */ var cartesian_Axis2D = (Axis2D_Axis2D); // CONCATENATED MODULE: ./node_modules/echarts/lib/coord/cartesian/cartesianAxisHelper.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ /** * Can only be called after coordinate system creation stage. * (Can be called before coordinate system update stage). */ function cartesianAxisHelper_layout(gridModel, axisModel, opt) { opt = opt || {}; var grid = gridModel.coordinateSystem; var axis = axisModel.axis; var layout = {}; var otherAxisOnZeroOf = axis.getAxesOnZeroOf()[0]; var rawAxisPosition = axis.position; var axisPosition = otherAxisOnZeroOf ? 'onZero' : rawAxisPosition; var axisDim = axis.dim; var rect = grid.getRect(); var rectBound = [rect.x, rect.x + rect.width, rect.y, rect.y + rect.height]; var idx = { left: 0, right: 1, top: 0, bottom: 1, onZero: 2 }; var axisOffset = axisModel.get('offset') || 0; var posBound = axisDim === 'x' ? [rectBound[2] - axisOffset, rectBound[3] + axisOffset] : [rectBound[0] - axisOffset, rectBound[1] + axisOffset]; if (otherAxisOnZeroOf) { var onZeroCoord = otherAxisOnZeroOf.toGlobalCoord(otherAxisOnZeroOf.dataToCoord(0)); posBound[idx.onZero] = Math.max(Math.min(onZeroCoord, posBound[1]), posBound[0]); } // Axis position layout.position = [axisDim === 'y' ? posBound[idx[axisPosition]] : rectBound[0], axisDim === 'x' ? posBound[idx[axisPosition]] : rectBound[3]]; // Axis rotation layout.rotation = Math.PI / 2 * (axisDim === 'x' ? 0 : 1); // Tick and label direction, x y is axisDim var dirMap = { top: -1, bottom: 1, left: -1, right: 1 }; layout.labelDirection = layout.tickDirection = layout.nameDirection = dirMap[rawAxisPosition]; layout.labelOffset = otherAxisOnZeroOf ? posBound[idx[rawAxisPosition]] - posBound[idx.onZero] : 0; if (axisModel.get(['axisTick', 'inside'])) { layout.tickDirection = -layout.tickDirection; } if (core_util["retrieve"](opt.labelInside, axisModel.get(['axisLabel', 'inside']))) { layout.labelDirection = -layout.labelDirection; } // Special label rotation var labelRotate = axisModel.get(['axisLabel', 'rotate']); layout.labelRotate = axisPosition === 'top' ? -labelRotate : labelRotate; // Over splitLine and splitArea layout.z2 = 1; return layout; } function isCartesian2DSeries(seriesModel) { return seriesModel.get('coordinateSystem') === 'cartesian2d'; } function findAxisModels(seriesModel) { var axisModelMap = { xAxisModel: null, yAxisModel: null }; core_util["each"](axisModelMap, function (v, key) { var axisType = key.replace(/Model$/, ''); var axisModel = seriesModel.getReferringComponents(axisType, SINGLE_REFERRING).models[0]; if (false) { if (!axisModel) { throw new Error(axisType + ' "' + zrUtil.retrieve3(seriesModel.get(axisType + 'Index'), seriesModel.get(axisType + 'Id'), 0) + '" not found'); } } axisModelMap[key] = axisModel; }); return axisModelMap; } // CONCATENATED MODULE: ./node_modules/echarts/lib/coord/axisAlignTicks.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 axisAlignTicks_mathLog = Math.log; function alignScaleTicks(scale, axisModel, alignToScale) { var intervalScaleProto = Interval.prototype; // NOTE: There is a precondition for log scale here: // In log scale we store _interval and _extent of exponent value. // So if we use the method of InternalScale to set/get these data. // It process the exponent value, which is linear and what we want here. var alignToTicks = intervalScaleProto.getTicks.call(alignToScale); var alignToNicedTicks = intervalScaleProto.getTicks.call(alignToScale, true); var alignToSplitNumber = alignToTicks.length - 1; var alignToInterval = intervalScaleProto.getInterval.call(alignToScale); var scaleExtent = getScaleExtent(scale, axisModel); var rawExtent = scaleExtent.extent; var isMinFixed = scaleExtent.fixMin; var isMaxFixed = scaleExtent.fixMax; if (scale.type === 'log') { var logBase = axisAlignTicks_mathLog(scale.base); rawExtent = [axisAlignTicks_mathLog(rawExtent[0]) / logBase, axisAlignTicks_mathLog(rawExtent[1]) / logBase]; } scale.setExtent(rawExtent[0], rawExtent[1]); scale.calcNiceExtent({ splitNumber: alignToSplitNumber, fixMin: isMinFixed, fixMax: isMaxFixed }); var extent = intervalScaleProto.getExtent.call(scale); // Need to update the rawExtent. // Because value in rawExtent may be not parsed. e.g. 'dataMin', 'dataMax' if (isMinFixed) { rawExtent[0] = extent[0]; } if (isMaxFixed) { rawExtent[1] = extent[1]; } var interval = intervalScaleProto.getInterval.call(scale); var min = rawExtent[0]; var max = rawExtent[1]; if (isMinFixed && isMaxFixed) { // User set min, max, divide to get new interval interval = (max - min) / alignToSplitNumber; } else if (isMinFixed) { max = rawExtent[0] + interval * alignToSplitNumber; // User set min, expand extent on the other side while (max < rawExtent[1] && isFinite(max) && isFinite(rawExtent[1])) { interval = increaseInterval(interval); max = rawExtent[0] + interval * alignToSplitNumber; } } else if (isMaxFixed) { // User set max, expand extent on the other side min = rawExtent[1] - interval * alignToSplitNumber; while (min > rawExtent[0] && isFinite(min) && isFinite(rawExtent[0])) { interval = increaseInterval(interval); min = rawExtent[1] - interval * alignToSplitNumber; } } else { var nicedSplitNumber = scale.getTicks().length - 1; if (nicedSplitNumber > alignToSplitNumber) { interval = increaseInterval(interval); } var range = interval * alignToSplitNumber; max = Math.ceil(rawExtent[1] / interval) * interval; min = round(max - range); // Not change the result that crossing zero. if (min < 0 && rawExtent[0] >= 0) { min = 0; max = round(range); } else if (max > 0 && rawExtent[1] <= 0) { max = 0; min = -round(range); } } // Adjust min, max based on the extent of alignTo. When min or max is set in alignTo scale var t0 = (alignToTicks[0].value - alignToNicedTicks[0].value) / alignToInterval; var t1 = (alignToTicks[alignToSplitNumber].value - alignToNicedTicks[alignToSplitNumber].value) / alignToInterval; // NOTE: Must in setExtent -> setInterval -> setNiceExtent order. intervalScaleProto.setExtent.call(scale, min + interval * t0, max + interval * t1); intervalScaleProto.setInterval.call(scale, interval); if (t0 || t1) { intervalScaleProto.setNiceExtent.call(scale, min + interval, max - interval); } if (false) { var ticks = intervalScaleProto.getTicks.call(scale); if (ticks[1] && (!isValueNice(interval) || getPrecisionSafe(ticks[1].value) > getPrecisionSafe(interval))) { warn( // eslint-disable-next-line "The ticks may be not readable when set min: " + axisModel.get('min') + ", max: " + axisModel.get('max') + " and alignTicks: true"); } } } // CONCATENATED MODULE: ./node_modules/echarts/lib/coord/cartesian/Grid.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ /** * Grid is a region which contains at most 4 cartesian systems * * TODO Default cartesian */ var Grid_Grid = /** @class */function () { function Grid(gridModel, ecModel, api) { // FIXME:TS where used (different from registered type 'cartesian2d')? this.type = 'grid'; this._coordsMap = {}; this._coordsList = []; this._axesMap = {}; this._axesList = []; this.axisPointerEnabled = true; this.dimensions = cartesian2DDimensions; this._initCartesian(gridModel, ecModel, api); this.model = gridModel; } Grid.prototype.getRect = function () { return this._rect; }; Grid.prototype.update = function (ecModel, api) { var axesMap = this._axesMap; this._updateScale(ecModel, this.model); function updateAxisTicks(axes) { var alignTo; // Axis is added in order of axisIndex. var axesIndices = Object(core_util["keys"])(axes); var len = axesIndices.length; if (!len) { return; } var axisNeedsAlign = []; // Process once and calculate the ticks for those don't use alignTicks. for (var i = len - 1; i >= 0; i--) { var idx = +axesIndices[i]; // Convert to number. var axis = axes[idx]; var model = axis.model; var scale = axis.scale; if ( // Only value and log axis without interval support alignTicks. isIntervalOrLogScale(scale) && model.get('alignTicks') && model.get('interval') == null) { axisNeedsAlign.push(axis); } else { niceScaleExtent(scale, model); if (isIntervalOrLogScale(scale)) { // Can only align to interval or log axis. alignTo = axis; } } } ; // All axes has set alignTicks. Pick the first one. // PENDING. Should we find the axis that both set interval, min, max and align to this one? if (axisNeedsAlign.length) { if (!alignTo) { alignTo = axisNeedsAlign.pop(); niceScaleExtent(alignTo.scale, alignTo.model); } Object(core_util["each"])(axisNeedsAlign, function (axis) { alignScaleTicks(axis.scale, axis.model, alignTo.scale); }); } } updateAxisTicks(axesMap.x); updateAxisTicks(axesMap.y); // Key: axisDim_axisIndex, value: boolean, whether onZero target. var onZeroRecords = {}; Object(core_util["each"])(axesMap.x, function (xAxis) { fixAxisOnZero(axesMap, 'y', xAxis, onZeroRecords); }); Object(core_util["each"])(axesMap.y, function (yAxis) { fixAxisOnZero(axesMap, 'x', yAxis, onZeroRecords); }); // Resize again if containLabel is enabled // FIXME It may cause getting wrong grid size in data processing stage this.resize(this.model, api); }; /** * Resize the grid */ Grid.prototype.resize = function (gridModel, api, ignoreContainLabel) { var boxLayoutParams = gridModel.getBoxLayoutParams(); var isContainLabel = !ignoreContainLabel && gridModel.get('containLabel'); var gridRect = getLayoutRect(boxLayoutParams, { width: api.getWidth(), height: api.getHeight() }); this._rect = gridRect; var axesList = this._axesList; adjustAxes(); // Minus label size if (isContainLabel) { Object(core_util["each"])(axesList, function (axis) { if (!axis.model.get(['axisLabel', 'inside'])) { var labelUnionRect = estimateLabelUnionRect(axis); if (labelUnionRect) { var dim = axis.isHorizontal() ? 'height' : 'width'; var margin = axis.model.get(['axisLabel', 'margin']); gridRect[dim] -= labelUnionRect[dim] + margin; if (axis.position === 'top') { gridRect.y += labelUnionRect.height + margin; } else if (axis.position === 'left') { gridRect.x += labelUnionRect.width + margin; } } } }); adjustAxes(); } Object(core_util["each"])(this._coordsList, function (coord) { // Calculate affine matrix to accelerate the data to point transform. // If all the axes scales are time or value. coord.calcAffineTransform(); }); function adjustAxes() { Object(core_util["each"])(axesList, function (axis) { var isHorizontal = axis.isHorizontal(); var extent = isHorizontal ? [0, gridRect.width] : [0, gridRect.height]; var idx = axis.inverse ? 1 : 0; axis.setExtent(extent[idx], extent[1 - idx]); updateAxisTransform(axis, isHorizontal ? gridRect.x : gridRect.y); }); } }; Grid.prototype.getAxis = function (dim, axisIndex) { var axesMapOnDim = this._axesMap[dim]; if (axesMapOnDim != null) { return axesMapOnDim[axisIndex || 0]; } }; Grid.prototype.getAxes = function () { return this._axesList.slice(); }; Grid.prototype.getCartesian = function (xAxisIndex, yAxisIndex) { if (xAxisIndex != null && yAxisIndex != null) { var key = 'x' + xAxisIndex + 'y' + yAxisIndex; return this._coordsMap[key]; } if (Object(core_util["isObject"])(xAxisIndex)) { yAxisIndex = xAxisIndex.yAxisIndex; xAxisIndex = xAxisIndex.xAxisIndex; } for (var i = 0, coordList = this._coordsList; i < coordList.length; i++) { if (coordList[i].getAxis('x').index === xAxisIndex || coordList[i].getAxis('y').index === yAxisIndex) { return coordList[i]; } } }; Grid.prototype.getCartesians = function () { return this._coordsList.slice(); }; /** * @implements */ Grid.prototype.convertToPixel = function (ecModel, finder, value) { var target = this._findConvertTarget(finder); return target.cartesian ? target.cartesian.dataToPoint(value) : target.axis ? target.axis.toGlobalCoord(target.axis.dataToCoord(value)) : null; }; /** * @implements */ Grid.prototype.convertFromPixel = function (ecModel, finder, value) { var target = this._findConvertTarget(finder); return target.cartesian ? target.cartesian.pointToData(value) : target.axis ? target.axis.coordToData(target.axis.toLocalCoord(value)) : null; }; Grid.prototype._findConvertTarget = function (finder) { var seriesModel = finder.seriesModel; var xAxisModel = finder.xAxisModel || seriesModel && seriesModel.getReferringComponents('xAxis', SINGLE_REFERRING).models[0]; var yAxisModel = finder.yAxisModel || seriesModel && seriesModel.getReferringComponents('yAxis', SINGLE_REFERRING).models[0]; var gridModel = finder.gridModel; var coordsList = this._coordsList; var cartesian; var axis; if (seriesModel) { cartesian = seriesModel.coordinateSystem; Object(core_util["indexOf"])(coordsList, cartesian) < 0 && (cartesian = null); } else if (xAxisModel && yAxisModel) { cartesian = this.getCartesian(xAxisModel.componentIndex, yAxisModel.componentIndex); } else if (xAxisModel) { axis = this.getAxis('x', xAxisModel.componentIndex); } else if (yAxisModel) { axis = this.getAxis('y', yAxisModel.componentIndex); } // Lowest priority. else if (gridModel) { var grid = gridModel.coordinateSystem; if (grid === this) { cartesian = this._coordsList[0]; } } return { cartesian: cartesian, axis: axis }; }; /** * @implements */ Grid.prototype.containPoint = function (point) { var coord = this._coordsList[0]; if (coord) { return coord.containPoint(point); } }; /** * Initialize cartesian coordinate systems */ Grid.prototype._initCartesian = function (gridModel, ecModel, api) { var _this = this; var grid = this; var axisPositionUsed = { left: false, right: false, top: false, bottom: false }; var axesMap = { x: {}, y: {} }; var axesCount = { x: 0, y: 0 }; // Create axis ecModel.eachComponent('xAxis', createAxisCreator('x'), this); ecModel.eachComponent('yAxis', createAxisCreator('y'), this); if (!axesCount.x || !axesCount.y) { // Roll back when there no either x or y axis this._axesMap = {}; this._axesList = []; return; } this._axesMap = axesMap; // Create cartesian2d Object(core_util["each"])(axesMap.x, function (xAxis, xAxisIndex) { Object(core_util["each"])(axesMap.y, function (yAxis, yAxisIndex) { var key = 'x' + xAxisIndex + 'y' + yAxisIndex; var cartesian = new cartesian_Cartesian2D(key); cartesian.master = _this; cartesian.model = gridModel; _this._coordsMap[key] = cartesian; _this._coordsList.push(cartesian); cartesian.addAxis(xAxis); cartesian.addAxis(yAxis); }); }); function createAxisCreator(dimName) { return function (axisModel, idx) { if (!isAxisUsedInTheGrid(axisModel, gridModel)) { return; } var axisPosition = axisModel.get('position'); if (dimName === 'x') { // Fix position if (axisPosition !== 'top' && axisPosition !== 'bottom') { // Default bottom of X axisPosition = axisPositionUsed.bottom ? 'top' : 'bottom'; } } else { // Fix position if (axisPosition !== 'left' && axisPosition !== 'right') { // Default left of Y axisPosition = axisPositionUsed.left ? 'right' : 'left'; } } axisPositionUsed[axisPosition] = true; var axis = new cartesian_Axis2D(dimName, createScaleByModel(axisModel), [0, 0], axisModel.get('type'), axisPosition); var isCategory = axis.type === 'category'; axis.onBand = isCategory && axisModel.get('boundaryGap'); axis.inverse = axisModel.get('inverse'); // Inject axis into axisModel axisModel.axis = axis; // Inject axisModel into axis axis.model = axisModel; // Inject grid info axis axis.grid = grid; // Index of axis, can be used as key axis.index = idx; grid._axesList.push(axis); axesMap[dimName][idx] = axis; axesCount[dimName]++; }; } }; /** * Update cartesian properties from series. */ Grid.prototype._updateScale = function (ecModel, gridModel) { // Reset scale Object(core_util["each"])(this._axesList, function (axis) { axis.scale.setExtent(Infinity, -Infinity); if (axis.type === 'category') { var categorySortInfo = axis.model.get('categorySortInfo'); axis.scale.setSortInfo(categorySortInfo); } }); ecModel.eachSeries(function (seriesModel) { if (isCartesian2DSeries(seriesModel)) { var axesModelMap = findAxisModels(seriesModel); var xAxisModel = axesModelMap.xAxisModel; var yAxisModel = axesModelMap.yAxisModel; if (!isAxisUsedInTheGrid(xAxisModel, gridModel) || !isAxisUsedInTheGrid(yAxisModel, gridModel)) { return; } var cartesian = this.getCartesian(xAxisModel.componentIndex, yAxisModel.componentIndex); var data = seriesModel.getData(); var xAxis = cartesian.getAxis('x'); var yAxis = cartesian.getAxis('y'); unionExtent(data, xAxis); unionExtent(data, yAxis); } }, this); function unionExtent(data, axis) { Object(core_util["each"])(getDataDimensionsOnAxis(data, axis.dim), function (dim) { axis.scale.unionExtentFromData(data, dim); }); } }; /** * @param dim 'x' or 'y' or 'auto' or null/undefined */ Grid.prototype.getTooltipAxes = function (dim) { var baseAxes = []; var otherAxes = []; Object(core_util["each"])(this.getCartesians(), function (cartesian) { var baseAxis = dim != null && dim !== 'auto' ? cartesian.getAxis(dim) : cartesian.getBaseAxis(); var otherAxis = cartesian.getOtherAxis(baseAxis); Object(core_util["indexOf"])(baseAxes, baseAxis) < 0 && baseAxes.push(baseAxis); Object(core_util["indexOf"])(otherAxes, otherAxis) < 0 && otherAxes.push(otherAxis); }); return { baseAxes: baseAxes, otherAxes: otherAxes }; }; Grid.create = function (ecModel, api) { var grids = []; ecModel.eachComponent('grid', function (gridModel, idx) { var grid = new Grid(gridModel, ecModel, api); grid.name = 'grid_' + idx; // dataSampling requires axis extent, so resize // should be performed in create stage. grid.resize(gridModel, api, true); gridModel.coordinateSystem = grid; grids.push(grid); }); // Inject the coordinateSystems into seriesModel ecModel.eachSeries(function (seriesModel) { if (!isCartesian2DSeries(seriesModel)) { return; } var axesModelMap = findAxisModels(seriesModel); var xAxisModel = axesModelMap.xAxisModel; var yAxisModel = axesModelMap.yAxisModel; var gridModel = xAxisModel.getCoordSysModel(); if (false) { if (!gridModel) { throw new Error('Grid "' + retrieve3(xAxisModel.get('gridIndex'), xAxisModel.get('gridId'), 0) + '" not found'); } if (xAxisModel.getCoordSysModel() !== yAxisModel.getCoordSysModel()) { throw new Error('xAxis and yAxis must use the same grid'); } } var grid = gridModel.coordinateSystem; seriesModel.coordinateSystem = grid.getCartesian(xAxisModel.componentIndex, yAxisModel.componentIndex); }); return grids; }; // For deciding which dimensions to use when creating list data Grid.dimensions = cartesian2DDimensions; return Grid; }(); /** * Check if the axis is used in the specified grid. */ function isAxisUsedInTheGrid(axisModel, gridModel) { return axisModel.getCoordSysModel() === gridModel; } function fixAxisOnZero(axesMap, otherAxisDim, axis, // Key: see `getOnZeroRecordKey` onZeroRecords) { axis.getAxesOnZeroOf = function () { // TODO: onZero of multiple axes. return otherAxisOnZeroOf ? [otherAxisOnZeroOf] : []; }; // onZero can not be enabled in these two situations: // 1. When any other axis is a category axis. // 2. When no axis is cross 0 point. var otherAxes = axesMap[otherAxisDim]; var otherAxisOnZeroOf; var axisModel = axis.model; var onZero = axisModel.get(['axisLine', 'onZero']); var onZeroAxisIndex = axisModel.get(['axisLine', 'onZeroAxisIndex']); if (!onZero) { return; } // If target axis is specified. if (onZeroAxisIndex != null) { if (canOnZeroToAxis(otherAxes[onZeroAxisIndex])) { otherAxisOnZeroOf = otherAxes[onZeroAxisIndex]; } } else { // Find the first available other axis. for (var idx in otherAxes) { if (otherAxes.hasOwnProperty(idx) && canOnZeroToAxis(otherAxes[idx]) // Consider that two Y axes on one value axis, // if both onZero, the two Y axes overlap. && !onZeroRecords[getOnZeroRecordKey(otherAxes[idx])]) { otherAxisOnZeroOf = otherAxes[idx]; break; } } } if (otherAxisOnZeroOf) { onZeroRecords[getOnZeroRecordKey(otherAxisOnZeroOf)] = true; } function getOnZeroRecordKey(axis) { return axis.dim + '_' + axis.index; } } function canOnZeroToAxis(axis) { return axis && axis.type !== 'category' && axis.type !== 'time' && ifAxisCrossZero(axis); } function updateAxisTransform(axis, coordBase) { var axisExtent = axis.getExtent(); var axisExtentSum = axisExtent[0] + axisExtent[1]; // Fast transform axis.toGlobalCoord = axis.dim === 'x' ? function (coord) { return coord + coordBase; } : function (coord) { return axisExtentSum - coord + coordBase; }; axis.toLocalCoord = axis.dim === 'x' ? function (coord) { return coord - coordBase; } : function (coord) { return axisExtentSum - coord + coordBase; }; } /* harmony default export */ var cartesian_Grid = (Grid_Grid); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/axis/AxisBuilder.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 AxisBuilder_PI = Math.PI; /** * A final axis is translated and rotated from a "standard axis". * So opt.position and opt.rotation is required. * * A standard axis is and axis from [0, 0] to [0, axisExtent[1]], * for example: (0, 0) ------------> (0, 50) * * nameDirection or tickDirection or labelDirection is 1 means tick * or label is below the standard axis, whereas is -1 means above * the standard axis. labelOffset means offset between label and axis, * which is useful when 'onZero', where axisLabel is in the grid and * label in outside grid. * * Tips: like always, * positive rotation represents anticlockwise, and negative rotation * represents clockwise. * The direction of position coordinate is the same as the direction * of screen coordinate. * * Do not need to consider axis 'inverse', which is auto processed by * axis extent. */ var AxisBuilder_AxisBuilder = /** @class */function () { function AxisBuilder(axisModel, opt) { this.group = new graphic_Group(); this.opt = opt; this.axisModel = axisModel; // Default value Object(core_util["defaults"])(opt, { labelOffset: 0, nameDirection: 1, tickDirection: 1, labelDirection: 1, silent: true, handleAutoShown: function () { return true; } }); // FIXME Not use a separate text group? var transformGroup = new graphic_Group({ x: opt.position[0], y: opt.position[1], rotation: opt.rotation }); // this.group.add(transformGroup); // this._transformGroup = transformGroup; transformGroup.updateTransform(); this._transformGroup = transformGroup; } AxisBuilder.prototype.hasBuilder = function (name) { return !!builders[name]; }; AxisBuilder.prototype.add = function (name) { builders[name](this.opt, this.axisModel, this.group, this._transformGroup); }; AxisBuilder.prototype.getGroup = function () { return this.group; }; AxisBuilder.innerTextLayout = function (axisRotation, textRotation, direction) { var rotationDiff = remRadian(textRotation - axisRotation); var textAlign; var textVerticalAlign; if (isRadianAroundZero(rotationDiff)) { // Label is parallel with axis line. textVerticalAlign = direction > 0 ? 'top' : 'bottom'; textAlign = 'center'; } else if (isRadianAroundZero(rotationDiff - AxisBuilder_PI)) { // Label is inverse parallel with axis line. textVerticalAlign = direction > 0 ? 'bottom' : 'top'; textAlign = 'center'; } else { textVerticalAlign = 'middle'; if (rotationDiff > 0 && rotationDiff < AxisBuilder_PI) { textAlign = direction > 0 ? 'right' : 'left'; } else { textAlign = direction > 0 ? 'left' : 'right'; } } return { rotation: rotationDiff, textAlign: textAlign, textVerticalAlign: textVerticalAlign }; }; AxisBuilder.makeAxisEventDataBase = function (axisModel) { var eventData = { componentType: axisModel.mainType, componentIndex: axisModel.componentIndex }; eventData[axisModel.mainType + 'Index'] = axisModel.componentIndex; return eventData; }; AxisBuilder.isLabelSilent = function (axisModel) { var tooltipOpt = axisModel.get('tooltip'); return axisModel.get('silent') // Consider mouse cursor, add these restrictions. || !(axisModel.get('triggerEvent') || tooltipOpt && tooltipOpt.show); }; return AxisBuilder; }(); ; var builders = { axisLine: function (opt, axisModel, group, transformGroup) { var shown = axisModel.get(['axisLine', 'show']); if (shown === 'auto' && opt.handleAutoShown) { shown = opt.handleAutoShown('axisLine'); } if (!shown) { return; } var extent = axisModel.axis.getExtent(); var matrix = transformGroup.transform; var pt1 = [extent[0], 0]; var pt2 = [extent[1], 0]; var inverse = pt1[0] > pt2[0]; if (matrix) { applyTransform(pt1, pt1, matrix); applyTransform(pt2, pt2, matrix); } var lineStyle = Object(core_util["extend"])({ lineCap: 'round' }, axisModel.getModel(['axisLine', 'lineStyle']).getLineStyle()); var line = new shape_Line({ shape: { x1: pt1[0], y1: pt1[1], x2: pt2[0], y2: pt2[1] }, style: lineStyle, strokeContainThreshold: opt.strokeContainThreshold || 5, silent: true, z2: 1 }); graphic_subPixelOptimizeLine(line.shape, line.style.lineWidth); line.anid = 'line'; group.add(line); var arrows = axisModel.get(['axisLine', 'symbol']); if (arrows != null) { var arrowSize = axisModel.get(['axisLine', 'symbolSize']); if (Object(core_util["isString"])(arrows)) { // Use the same arrow for start and end point arrows = [arrows, arrows]; } if (Object(core_util["isString"])(arrowSize) || Object(core_util["isNumber"])(arrowSize)) { // Use the same size for width and height arrowSize = [arrowSize, arrowSize]; } var arrowOffset = normalizeSymbolOffset(axisModel.get(['axisLine', 'symbolOffset']) || 0, arrowSize); var symbolWidth_1 = arrowSize[0]; var symbolHeight_1 = arrowSize[1]; Object(core_util["each"])([{ rotate: opt.rotation + Math.PI / 2, offset: arrowOffset[0], r: 0 }, { rotate: opt.rotation - Math.PI / 2, offset: arrowOffset[1], r: Math.sqrt((pt1[0] - pt2[0]) * (pt1[0] - pt2[0]) + (pt1[1] - pt2[1]) * (pt1[1] - pt2[1])) }], function (point, index) { if (arrows[index] !== 'none' && arrows[index] != null) { var symbol = symbol_createSymbol(arrows[index], -symbolWidth_1 / 2, -symbolHeight_1 / 2, symbolWidth_1, symbolHeight_1, lineStyle.stroke, true); // Calculate arrow position with offset var r = point.r + point.offset; var pt = inverse ? pt2 : pt1; symbol.attr({ rotation: point.rotate, x: pt[0] + r * Math.cos(opt.rotation), y: pt[1] - r * Math.sin(opt.rotation), silent: true, z2: 11 }); group.add(symbol); } }); } }, axisTickLabel: function (opt, axisModel, group, transformGroup) { var ticksEls = buildAxisMajorTicks(group, transformGroup, axisModel, opt); var labelEls = buildAxisLabel(group, transformGroup, axisModel, opt); fixMinMaxLabelShow(axisModel, labelEls, ticksEls); buildAxisMinorTicks(group, transformGroup, axisModel, opt.tickDirection); // This bit fixes the label overlap issue for the time chart. // See https://github.com/apache/echarts/issues/14266 for more. if (axisModel.get(['axisLabel', 'hideOverlap'])) { var labelList = prepareLayoutList(Object(core_util["map"])(labelEls, function (label) { return { label: label, priority: label.z2, defaultAttr: { ignore: label.ignore } }; })); hideOverlap(labelList); } }, axisName: function (opt, axisModel, group, transformGroup) { var name = Object(core_util["retrieve"])(opt.axisName, axisModel.get('name')); if (!name) { return; } var nameLocation = axisModel.get('nameLocation'); var nameDirection = opt.nameDirection; var textStyleModel = axisModel.getModel('nameTextStyle'); var gap = axisModel.get('nameGap') || 0; var extent = axisModel.axis.getExtent(); var gapSignal = extent[0] > extent[1] ? -1 : 1; var pos = [nameLocation === 'start' ? extent[0] - gapSignal * gap : nameLocation === 'end' ? extent[1] + gapSignal * gap : (extent[0] + extent[1]) / 2, // Reuse labelOffset. isNameLocationCenter(nameLocation) ? opt.labelOffset + nameDirection * gap : 0]; var labelLayout; var nameRotation = axisModel.get('nameRotate'); if (nameRotation != null) { nameRotation = nameRotation * AxisBuilder_PI / 180; // To radian. } var axisNameAvailableWidth; if (isNameLocationCenter(nameLocation)) { labelLayout = AxisBuilder_AxisBuilder.innerTextLayout(opt.rotation, nameRotation != null ? nameRotation : opt.rotation, // Adapt to axis. nameDirection); } else { labelLayout = endTextLayout(opt.rotation, nameLocation, nameRotation || 0, extent); axisNameAvailableWidth = opt.axisNameAvailableWidth; if (axisNameAvailableWidth != null) { axisNameAvailableWidth = Math.abs(axisNameAvailableWidth / Math.sin(labelLayout.rotation)); !isFinite(axisNameAvailableWidth) && (axisNameAvailableWidth = null); } } var textFont = textStyleModel.getFont(); var truncateOpt = axisModel.get('nameTruncate', true) || {}; var ellipsis = truncateOpt.ellipsis; var maxWidth = Object(core_util["retrieve"])(opt.nameTruncateMaxWidth, truncateOpt.maxWidth, axisNameAvailableWidth); var textEl = new Text({ x: pos[0], y: pos[1], rotation: labelLayout.rotation, silent: AxisBuilder_AxisBuilder.isLabelSilent(axisModel), style: createTextStyle(textStyleModel, { text: name, font: textFont, overflow: 'truncate', width: maxWidth, ellipsis: ellipsis, fill: textStyleModel.getTextColor() || axisModel.get(['axisLine', 'lineStyle', 'color']), align: textStyleModel.get('align') || labelLayout.textAlign, verticalAlign: textStyleModel.get('verticalAlign') || labelLayout.textVerticalAlign }), z2: 1 }); setTooltipConfig({ el: textEl, componentModel: axisModel, itemName: name }); textEl.__fullText = name; // Id for animation textEl.anid = 'name'; if (axisModel.get('triggerEvent')) { var eventData = AxisBuilder_AxisBuilder.makeAxisEventDataBase(axisModel); eventData.targetType = 'axisName'; eventData.name = name; getECData(textEl).eventData = eventData; } // FIXME transformGroup.add(textEl); textEl.updateTransform(); group.add(textEl); textEl.decomposeTransform(); } }; function endTextLayout(rotation, textPosition, textRotate, extent) { var rotationDiff = remRadian(textRotate - rotation); var textAlign; var textVerticalAlign; var inverse = extent[0] > extent[1]; var onLeft = textPosition === 'start' && !inverse || textPosition !== 'start' && inverse; if (isRadianAroundZero(rotationDiff - AxisBuilder_PI / 2)) { textVerticalAlign = onLeft ? 'bottom' : 'top'; textAlign = 'center'; } else if (isRadianAroundZero(rotationDiff - AxisBuilder_PI * 1.5)) { textVerticalAlign = onLeft ? 'top' : 'bottom'; textAlign = 'center'; } else { textVerticalAlign = 'middle'; if (rotationDiff < AxisBuilder_PI * 1.5 && rotationDiff > AxisBuilder_PI / 2) { textAlign = onLeft ? 'left' : 'right'; } else { textAlign = onLeft ? 'right' : 'left'; } } return { rotation: rotationDiff, textAlign: textAlign, textVerticalAlign: textVerticalAlign }; } function fixMinMaxLabelShow(axisModel, labelEls, tickEls) { if (shouldShowAllLabels(axisModel.axis)) { return; } // If min or max are user set, we need to check // If the tick on min(max) are overlap on their neighbour tick // If they are overlapped, we need to hide the min(max) tick label var showMinLabel = axisModel.get(['axisLabel', 'showMinLabel']); var showMaxLabel = axisModel.get(['axisLabel', 'showMaxLabel']); // FIXME // Have not consider onBand yet, where tick els is more than label els. labelEls = labelEls || []; tickEls = tickEls || []; var firstLabel = labelEls[0]; var nextLabel = labelEls[1]; var lastLabel = labelEls[labelEls.length - 1]; var prevLabel = labelEls[labelEls.length - 2]; var firstTick = tickEls[0]; var nextTick = tickEls[1]; var lastTick = tickEls[tickEls.length - 1]; var prevTick = tickEls[tickEls.length - 2]; if (showMinLabel === false) { ignoreEl(firstLabel); ignoreEl(firstTick); } else if (isTwoLabelOverlapped(firstLabel, nextLabel)) { if (showMinLabel) { ignoreEl(nextLabel); ignoreEl(nextTick); } else { ignoreEl(firstLabel); ignoreEl(firstTick); } } if (showMaxLabel === false) { ignoreEl(lastLabel); ignoreEl(lastTick); } else if (isTwoLabelOverlapped(prevLabel, lastLabel)) { if (showMaxLabel) { ignoreEl(prevLabel); ignoreEl(prevTick); } else { ignoreEl(lastLabel); ignoreEl(lastTick); } } } function ignoreEl(el) { el && (el.ignore = true); } function isTwoLabelOverlapped(current, next) { // current and next has the same rotation. var firstRect = current && current.getBoundingRect().clone(); var nextRect = next && next.getBoundingRect().clone(); if (!firstRect || !nextRect) { return; } // When checking intersect of two rotated labels, we use mRotationBack // to avoid that boundingRect is enlarge when using `boundingRect.applyTransform`. var mRotationBack = identity([]); matrix_rotate(mRotationBack, mRotationBack, -current.rotation); firstRect.applyTransform(matrix_mul([], mRotationBack, current.getLocalTransform())); nextRect.applyTransform(matrix_mul([], mRotationBack, next.getLocalTransform())); return firstRect.intersect(nextRect); } function isNameLocationCenter(nameLocation) { return nameLocation === 'middle' || nameLocation === 'center'; } function createTicks(ticksCoords, tickTransform, tickEndCoord, tickLineStyle, anidPrefix) { var tickEls = []; var pt1 = []; var pt2 = []; for (var i = 0; i < ticksCoords.length; i++) { var tickCoord = ticksCoords[i].coord; pt1[0] = tickCoord; pt1[1] = 0; pt2[0] = tickCoord; pt2[1] = tickEndCoord; if (tickTransform) { applyTransform(pt1, pt1, tickTransform); applyTransform(pt2, pt2, tickTransform); } // Tick line, Not use group transform to have better line draw var tickEl = new shape_Line({ shape: { x1: pt1[0], y1: pt1[1], x2: pt2[0], y2: pt2[1] }, style: tickLineStyle, z2: 2, autoBatch: true, silent: true }); graphic_subPixelOptimizeLine(tickEl.shape, tickEl.style.lineWidth); tickEl.anid = anidPrefix + '_' + ticksCoords[i].tickValue; tickEls.push(tickEl); } return tickEls; } function buildAxisMajorTicks(group, transformGroup, axisModel, opt) { var axis = axisModel.axis; var tickModel = axisModel.getModel('axisTick'); var shown = tickModel.get('show'); if (shown === 'auto' && opt.handleAutoShown) { shown = opt.handleAutoShown('axisTick'); } if (!shown || axis.scale.isBlank()) { return; } var lineStyleModel = tickModel.getModel('lineStyle'); var tickEndCoord = opt.tickDirection * tickModel.get('length'); var ticksCoords = axis.getTicksCoords(); var ticksEls = createTicks(ticksCoords, transformGroup.transform, tickEndCoord, Object(core_util["defaults"])(lineStyleModel.getLineStyle(), { stroke: axisModel.get(['axisLine', 'lineStyle', 'color']) }), 'ticks'); for (var i = 0; i < ticksEls.length; i++) { group.add(ticksEls[i]); } return ticksEls; } function buildAxisMinorTicks(group, transformGroup, axisModel, tickDirection) { var axis = axisModel.axis; var minorTickModel = axisModel.getModel('minorTick'); if (!minorTickModel.get('show') || axis.scale.isBlank()) { return; } var minorTicksCoords = axis.getMinorTicksCoords(); if (!minorTicksCoords.length) { return; } var lineStyleModel = minorTickModel.getModel('lineStyle'); var tickEndCoord = tickDirection * minorTickModel.get('length'); var minorTickLineStyle = Object(core_util["defaults"])(lineStyleModel.getLineStyle(), Object(core_util["defaults"])(axisModel.getModel('axisTick').getLineStyle(), { stroke: axisModel.get(['axisLine', 'lineStyle', 'color']) })); for (var i = 0; i < minorTicksCoords.length; i++) { var minorTicksEls = createTicks(minorTicksCoords[i], transformGroup.transform, tickEndCoord, minorTickLineStyle, 'minorticks_' + i); for (var k = 0; k < minorTicksEls.length; k++) { group.add(minorTicksEls[k]); } } } function buildAxisLabel(group, transformGroup, axisModel, opt) { var axis = axisModel.axis; var show = Object(core_util["retrieve"])(opt.axisLabelShow, axisModel.get(['axisLabel', 'show'])); if (!show || axis.scale.isBlank()) { return; } var labelModel = axisModel.getModel('axisLabel'); var labelMargin = labelModel.get('margin'); var labels = axis.getViewLabels(); // Special label rotate. var labelRotation = (Object(core_util["retrieve"])(opt.labelRotate, labelModel.get('rotate')) || 0) * AxisBuilder_PI / 180; var labelLayout = AxisBuilder_AxisBuilder.innerTextLayout(opt.rotation, labelRotation, opt.labelDirection); var rawCategoryData = axisModel.getCategories && axisModel.getCategories(true); var labelEls = []; var silent = AxisBuilder_AxisBuilder.isLabelSilent(axisModel); var triggerEvent = axisModel.get('triggerEvent'); Object(core_util["each"])(labels, function (labelItem, index) { var tickValue = axis.scale.type === 'ordinal' ? axis.scale.getRawOrdinalNumber(labelItem.tickValue) : labelItem.tickValue; var formattedLabel = labelItem.formattedLabel; var rawLabel = labelItem.rawLabel; var itemLabelModel = labelModel; if (rawCategoryData && rawCategoryData[tickValue]) { var rawCategoryItem = rawCategoryData[tickValue]; if (Object(core_util["isObject"])(rawCategoryItem) && rawCategoryItem.textStyle) { itemLabelModel = new model_Model(rawCategoryItem.textStyle, labelModel, axisModel.ecModel); } } var textColor = itemLabelModel.getTextColor() || axisModel.get(['axisLine', 'lineStyle', 'color']); var tickCoord = axis.dataToCoord(tickValue); var align = itemLabelModel.getShallow('align', true) || labelLayout.textAlign; var alignMin = Object(core_util["retrieve2"])(itemLabelModel.getShallow('alignMinLabel', true), align); var alignMax = Object(core_util["retrieve2"])(itemLabelModel.getShallow('alignMaxLabel', true), align); var verticalAlign = itemLabelModel.getShallow('verticalAlign', true) || itemLabelModel.getShallow('baseline', true) || labelLayout.textVerticalAlign; var verticalAlignMin = Object(core_util["retrieve2"])(itemLabelModel.getShallow('verticalAlignMinLabel', true), verticalAlign); var verticalAlignMax = Object(core_util["retrieve2"])(itemLabelModel.getShallow('verticalAlignMaxLabel', true), verticalAlign); var textEl = new Text({ x: tickCoord, y: opt.labelOffset + opt.labelDirection * labelMargin, rotation: labelLayout.rotation, silent: silent, z2: 10 + (labelItem.level || 0), style: createTextStyle(itemLabelModel, { text: formattedLabel, align: index === 0 ? alignMin : index === labels.length - 1 ? alignMax : align, verticalAlign: index === 0 ? verticalAlignMin : index === labels.length - 1 ? verticalAlignMax : verticalAlign, fill: Object(core_util["isFunction"])(textColor) ? textColor( // (1) In category axis with data zoom, tick is not the original // index of axis.data. So tick should not be exposed to user // in category axis. // (2) Compatible with previous version, which always use formatted label as // input. But in interval scale the formatted label is like '223,445', which // maked user replace ','. So we modify it to return original val but remain // it as 'string' to avoid error in replacing. axis.type === 'category' ? rawLabel : axis.type === 'value' ? tickValue + '' : tickValue, index) : textColor }) }); textEl.anid = 'label_' + tickValue; setTooltipConfig({ el: textEl, componentModel: axisModel, itemName: formattedLabel, formatterParamsExtra: { isTruncated: function () { return textEl.isTruncated; }, value: rawLabel, tickIndex: index } }); // Pack data for mouse event if (triggerEvent) { var eventData = AxisBuilder_AxisBuilder.makeAxisEventDataBase(axisModel); eventData.targetType = 'axisLabel'; eventData.value = rawLabel; eventData.tickIndex = index; if (axis.type === 'category') { eventData.dataIndex = tickValue; } getECData(textEl).eventData = eventData; } // FIXME transformGroup.add(textEl); textEl.updateTransform(); labelEls.push(textEl); group.add(textEl); textEl.decomposeTransform(); }); return labelEls; } /* harmony default export */ var axis_AxisBuilder = (AxisBuilder_AxisBuilder); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/axisPointer/modelHelper.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ // Build axisPointerModel, mergin tooltip.axisPointer model for each axis. // allAxesInfo should be updated when setOption performed. function collect(ecModel, api) { var result = { /** * key: makeKey(axis.model) * value: { * axis, * coordSys, * axisPointerModel, * triggerTooltip, * triggerEmphasis, * involveSeries, * snap, * seriesModels, * seriesDataCount * } */ axesInfo: {}, seriesInvolved: false, /** * key: makeKey(coordSys.model) * value: Object: key makeKey(axis.model), value: axisInfo */ coordSysAxesInfo: {}, coordSysMap: {} }; collectAxesInfo(result, ecModel, api); // Check seriesInvolved for performance, in case too many series in some chart. result.seriesInvolved && collectSeriesInfo(result, ecModel); return result; } function collectAxesInfo(result, ecModel, api) { var globalTooltipModel = ecModel.getComponent('tooltip'); var globalAxisPointerModel = ecModel.getComponent('axisPointer'); // links can only be set on global. var linksOption = globalAxisPointerModel.get('link', true) || []; var linkGroups = []; // Collect axes info. Object(core_util["each"])(api.getCoordinateSystems(), function (coordSys) { // Some coordinate system do not support axes, like geo. if (!coordSys.axisPointerEnabled) { return; } var coordSysKey = makeKey(coordSys.model); var axesInfoInCoordSys = result.coordSysAxesInfo[coordSysKey] = {}; result.coordSysMap[coordSysKey] = coordSys; // Set tooltip (like 'cross') is a convenient way to show axisPointer // for user. So we enable setting tooltip on coordSys model. var coordSysModel = coordSys.model; var baseTooltipModel = coordSysModel.getModel('tooltip', globalTooltipModel); Object(core_util["each"])(coordSys.getAxes(), Object(core_util["curry"])(saveTooltipAxisInfo, false, null)); // If axis tooltip used, choose tooltip axis for each coordSys. // Notice this case: coordSys is `grid` but not `cartesian2D` here. if (coordSys.getTooltipAxes && globalTooltipModel // If tooltip.showContent is set as false, tooltip will not // show but axisPointer will show as normal. && baseTooltipModel.get('show')) { // Compatible with previous logic. But series.tooltip.trigger: 'axis' // or series.data[n].tooltip.trigger: 'axis' are not support any more. var triggerAxis = baseTooltipModel.get('trigger') === 'axis'; var cross = baseTooltipModel.get(['axisPointer', 'type']) === 'cross'; var tooltipAxes = coordSys.getTooltipAxes(baseTooltipModel.get(['axisPointer', 'axis'])); if (triggerAxis || cross) { Object(core_util["each"])(tooltipAxes.baseAxes, Object(core_util["curry"])(saveTooltipAxisInfo, cross ? 'cross' : true, triggerAxis)); } if (cross) { Object(core_util["each"])(tooltipAxes.otherAxes, Object(core_util["curry"])(saveTooltipAxisInfo, 'cross', false)); } } // fromTooltip: true | false | 'cross' // triggerTooltip: true | false | null function saveTooltipAxisInfo(fromTooltip, triggerTooltip, axis) { var axisPointerModel = axis.model.getModel('axisPointer', globalAxisPointerModel); var axisPointerShow = axisPointerModel.get('show'); if (!axisPointerShow || axisPointerShow === 'auto' && !fromTooltip && !isHandleTrigger(axisPointerModel)) { return; } if (triggerTooltip == null) { triggerTooltip = axisPointerModel.get('triggerTooltip'); } axisPointerModel = fromTooltip ? makeAxisPointerModel(axis, baseTooltipModel, globalAxisPointerModel, ecModel, fromTooltip, triggerTooltip) : axisPointerModel; var snap = axisPointerModel.get('snap'); var triggerEmphasis = axisPointerModel.get('triggerEmphasis'); var axisKey = makeKey(axis.model); var involveSeries = triggerTooltip || snap || axis.type === 'category'; // If result.axesInfo[key] exist, override it (tooltip has higher priority). var axisInfo = result.axesInfo[axisKey] = { key: axisKey, axis: axis, coordSys: coordSys, axisPointerModel: axisPointerModel, triggerTooltip: triggerTooltip, triggerEmphasis: triggerEmphasis, involveSeries: involveSeries, snap: snap, useHandle: isHandleTrigger(axisPointerModel), seriesModels: [], linkGroup: null }; axesInfoInCoordSys[axisKey] = axisInfo; result.seriesInvolved = result.seriesInvolved || involveSeries; var groupIndex = getLinkGroupIndex(linksOption, axis); if (groupIndex != null) { var linkGroup = linkGroups[groupIndex] || (linkGroups[groupIndex] = { axesInfo: {} }); linkGroup.axesInfo[axisKey] = axisInfo; linkGroup.mapper = linksOption[groupIndex].mapper; axisInfo.linkGroup = linkGroup; } } }); } function makeAxisPointerModel(axis, baseTooltipModel, globalAxisPointerModel, ecModel, fromTooltip, triggerTooltip) { var tooltipAxisPointerModel = baseTooltipModel.getModel('axisPointer'); var fields = ['type', 'snap', 'lineStyle', 'shadowStyle', 'label', 'animation', 'animationDurationUpdate', 'animationEasingUpdate', 'z']; var volatileOption = {}; Object(core_util["each"])(fields, function (field) { volatileOption[field] = Object(core_util["clone"])(tooltipAxisPointerModel.get(field)); }); // category axis do not auto snap, otherwise some tick that do not // has value can not be hovered. value/time/log axis default snap if // triggered from tooltip and trigger tooltip. volatileOption.snap = axis.type !== 'category' && !!triggerTooltip; // Compatible with previous behavior, tooltip axis does not show label by default. // Only these properties can be overridden from tooltip to axisPointer. if (tooltipAxisPointerModel.get('type') === 'cross') { volatileOption.type = 'line'; } var labelOption = volatileOption.label || (volatileOption.label = {}); // Follow the convention, do not show label when triggered by tooltip by default. labelOption.show == null && (labelOption.show = false); if (fromTooltip === 'cross') { // When 'cross', both axes show labels. var tooltipAxisPointerLabelShow = tooltipAxisPointerModel.get(['label', 'show']); labelOption.show = tooltipAxisPointerLabelShow != null ? tooltipAxisPointerLabelShow : true; // If triggerTooltip, this is a base axis, which should better not use cross style // (cross style is dashed by default) if (!triggerTooltip) { var crossStyle = volatileOption.lineStyle = tooltipAxisPointerModel.get('crossStyle'); crossStyle && Object(core_util["defaults"])(labelOption, crossStyle.textStyle); } } return axis.model.getModel('axisPointer', new model_Model(volatileOption, globalAxisPointerModel, ecModel)); } function collectSeriesInfo(result, ecModel) { // Prepare data for axis trigger ecModel.eachSeries(function (seriesModel) { // Notice this case: this coordSys is `cartesian2D` but not `grid`. var coordSys = seriesModel.coordinateSystem; var seriesTooltipTrigger = seriesModel.get(['tooltip', 'trigger'], true); var seriesTooltipShow = seriesModel.get(['tooltip', 'show'], true); if (!coordSys || seriesTooltipTrigger === 'none' || seriesTooltipTrigger === false || seriesTooltipTrigger === 'item' || seriesTooltipShow === false || seriesModel.get(['axisPointer', 'show'], true) === false) { return; } Object(core_util["each"])(result.coordSysAxesInfo[makeKey(coordSys.model)], function (axisInfo) { var axis = axisInfo.axis; if (coordSys.getAxis(axis.dim) === axis) { axisInfo.seriesModels.push(seriesModel); axisInfo.seriesDataCount == null && (axisInfo.seriesDataCount = 0); axisInfo.seriesDataCount += seriesModel.getData().count(); } }); }); } /** * For example: * { * axisPointer: { * links: [{ * xAxisIndex: [2, 4], * yAxisIndex: 'all' * }, { * xAxisId: ['a5', 'a7'], * xAxisName: 'xxx' * }] * } * } */ function getLinkGroupIndex(linksOption, axis) { var axisModel = axis.model; var dim = axis.dim; for (var i = 0; i < linksOption.length; i++) { var linkOption = linksOption[i] || {}; if (checkPropInLink(linkOption[dim + 'AxisId'], axisModel.id) || checkPropInLink(linkOption[dim + 'AxisIndex'], axisModel.componentIndex) || checkPropInLink(linkOption[dim + 'AxisName'], axisModel.name)) { return i; } } } function checkPropInLink(linkPropValue, axisPropValue) { return linkPropValue === 'all' || Object(core_util["isArray"])(linkPropValue) && Object(core_util["indexOf"])(linkPropValue, axisPropValue) >= 0 || linkPropValue === axisPropValue; } function fixValue(axisModel) { var axisInfo = getAxisInfo(axisModel); if (!axisInfo) { return; } var axisPointerModel = axisInfo.axisPointerModel; var scale = axisInfo.axis.scale; var option = axisPointerModel.option; var status = axisPointerModel.get('status'); var value = axisPointerModel.get('value'); // Parse init value for category and time axis. if (value != null) { value = scale.parse(value); } var useHandle = isHandleTrigger(axisPointerModel); // If `handle` used, `axisPointer` will always be displayed, so value // and status should be initialized. if (status == null) { option.status = useHandle ? 'show' : 'hide'; } var extent = scale.getExtent().slice(); extent[0] > extent[1] && extent.reverse(); if ( // Pick a value on axis when initializing. value == null // If both `handle` and `dataZoom` are used, value may be out of axis extent, // where we should re-pick a value to keep `handle` displaying normally. || value > extent[1]) { // Make handle displayed on the end of the axis when init, which looks better. value = extent[1]; } if (value < extent[0]) { value = extent[0]; } option.value = value; if (useHandle) { option.status = axisInfo.axis.scale.isBlank() ? 'hide' : 'show'; } } function getAxisInfo(axisModel) { var coordSysAxesInfo = (axisModel.ecModel.getComponent('axisPointer') || {}).coordSysAxesInfo; return coordSysAxesInfo && coordSysAxesInfo.axesInfo[makeKey(axisModel)]; } function getAxisPointerModel(axisModel) { var axisInfo = getAxisInfo(axisModel); return axisInfo && axisInfo.axisPointerModel; } function isHandleTrigger(axisPointerModel) { return !!axisPointerModel.get(['handle', 'show']); } /** * @param {module:echarts/model/Model} model * @return {string} unique key */ function makeKey(model) { return model.type + '||' + model.id; } // CONCATENATED MODULE: ./node_modules/echarts/lib/component/axis/AxisView.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 axisPointerClazz = {}; /** * Base class of AxisView. */ var AxisView_AxisView = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(AxisView, _super); function AxisView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = AxisView.type; return _this; } /** * @override */ AxisView.prototype.render = function (axisModel, ecModel, api, payload) { // FIXME // This process should proformed after coordinate systems updated // (axis scale updated), and should be performed each time update. // So put it here temporarily, although it is not appropriate to // put a model-writing procedure in `view`. this.axisPointerClass && fixValue(axisModel); _super.prototype.render.apply(this, arguments); this._doUpdateAxisPointerClass(axisModel, api, true); }; /** * Action handler. */ AxisView.prototype.updateAxisPointer = function (axisModel, ecModel, api, payload) { this._doUpdateAxisPointerClass(axisModel, api, false); }; /** * @override */ AxisView.prototype.remove = function (ecModel, api) { var axisPointer = this._axisPointer; axisPointer && axisPointer.remove(api); }; /** * @override */ AxisView.prototype.dispose = function (ecModel, api) { this._disposeAxisPointer(api); _super.prototype.dispose.apply(this, arguments); }; AxisView.prototype._doUpdateAxisPointerClass = function (axisModel, api, forceRender) { var Clazz = AxisView.getAxisPointerClass(this.axisPointerClass); if (!Clazz) { return; } var axisPointerModel = getAxisPointerModel(axisModel); axisPointerModel ? (this._axisPointer || (this._axisPointer = new Clazz())).render(axisModel, axisPointerModel, api, forceRender) : this._disposeAxisPointer(api); }; AxisView.prototype._disposeAxisPointer = function (api) { this._axisPointer && this._axisPointer.dispose(api); this._axisPointer = null; }; AxisView.registerAxisPointerClass = function (type, clazz) { if (false) { if (axisPointerClazz[type]) { throw new Error('axisPointer ' + type + ' exists'); } } axisPointerClazz[type] = clazz; }; ; AxisView.getAxisPointerClass = function (type) { return type && axisPointerClazz[type]; }; ; AxisView.type = 'axis'; return AxisView; }(view_Component); /* harmony default export */ var axis_AxisView = (AxisView_AxisView); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/axis/axisSplitHelper.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 axisSplitHelper_inner = makeInner(); function rectCoordAxisBuildSplitArea(axisView, axisGroup, axisModel, gridModel) { var axis = axisModel.axis; if (axis.scale.isBlank()) { return; } // TODO: TYPE var splitAreaModel = axisModel.getModel('splitArea'); var areaStyleModel = splitAreaModel.getModel('areaStyle'); var areaColors = areaStyleModel.get('color'); var gridRect = gridModel.coordinateSystem.getRect(); var ticksCoords = axis.getTicksCoords({ tickModel: splitAreaModel, clamp: true }); if (!ticksCoords.length) { return; } // For Making appropriate splitArea animation, the color and anid // should be corresponding to previous one if possible. var areaColorsLen = areaColors.length; var lastSplitAreaColors = axisSplitHelper_inner(axisView).splitAreaColors; var newSplitAreaColors = core_util["createHashMap"](); var colorIndex = 0; if (lastSplitAreaColors) { for (var i = 0; i < ticksCoords.length; i++) { var cIndex = lastSplitAreaColors.get(ticksCoords[i].tickValue); if (cIndex != null) { colorIndex = (cIndex + (areaColorsLen - 1) * i) % areaColorsLen; break; } } } var prev = axis.toGlobalCoord(ticksCoords[0].coord); var areaStyle = areaStyleModel.getAreaStyle(); areaColors = core_util["isArray"](areaColors) ? areaColors : [areaColors]; for (var i = 1; i < ticksCoords.length; i++) { var tickCoord = axis.toGlobalCoord(ticksCoords[i].coord); var x = void 0; var y = void 0; var width = void 0; var height = void 0; if (axis.isHorizontal()) { x = prev; y = gridRect.y; width = tickCoord - x; height = gridRect.height; prev = x + width; } else { x = gridRect.x; y = prev; width = gridRect.width; height = tickCoord - y; prev = y + height; } var tickValue = ticksCoords[i - 1].tickValue; tickValue != null && newSplitAreaColors.set(tickValue, colorIndex); axisGroup.add(new shape_Rect({ anid: tickValue != null ? 'area_' + tickValue : null, shape: { x: x, y: y, width: width, height: height }, style: core_util["defaults"]({ fill: areaColors[colorIndex] }, areaStyle), autoBatch: true, silent: true })); colorIndex = (colorIndex + 1) % areaColorsLen; } axisSplitHelper_inner(axisView).splitAreaColors = newSplitAreaColors; } function rectCoordAxisHandleRemove(axisView) { axisSplitHelper_inner(axisView).splitAreaColors = null; } // CONCATENATED MODULE: ./node_modules/echarts/lib/component/axis/CartesianAxisView.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 selfBuilderAttrs = ['splitArea', 'splitLine', 'minorSplitLine']; var CartesianAxisView_CartesianAxisView = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(CartesianAxisView, _super); function CartesianAxisView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = CartesianAxisView.type; _this.axisPointerClass = 'CartesianAxisPointer'; return _this; } /** * @override */ CartesianAxisView.prototype.render = function (axisModel, ecModel, api, payload) { this.group.removeAll(); var oldAxisGroup = this._axisGroup; this._axisGroup = new graphic_Group(); this.group.add(this._axisGroup); if (!axisModel.get('show')) { return; } var gridModel = axisModel.getCoordSysModel(); var layout = cartesianAxisHelper_layout(gridModel, axisModel); var axisBuilder = new axis_AxisBuilder(axisModel, core_util["extend"]({ handleAutoShown: function (elementType) { var cartesians = gridModel.coordinateSystem.getCartesians(); for (var i = 0; i < cartesians.length; i++) { if (isIntervalOrLogScale(cartesians[i].getOtherAxis(axisModel.axis).scale)) { // Still show axis tick or axisLine if other axis is value / log return true; } } // Not show axisTick or axisLine if other axis is category / time return false; } }, layout)); core_util["each"](axisBuilderAttrs, axisBuilder.add, axisBuilder); this._axisGroup.add(axisBuilder.getGroup()); core_util["each"](selfBuilderAttrs, function (name) { if (axisModel.get([name, 'show'])) { axisElementBuilders[name](this, this._axisGroup, axisModel, gridModel); } }, this); // THIS is a special case for bar racing chart. // Update the axis label from the natural initial layout to // sorted layout should has no animation. var isInitialSortFromBarRacing = payload && payload.type === 'changeAxisOrder' && payload.isInitSort; if (!isInitialSortFromBarRacing) { groupTransition(oldAxisGroup, this._axisGroup, axisModel); } _super.prototype.render.call(this, axisModel, ecModel, api, payload); }; CartesianAxisView.prototype.remove = function () { rectCoordAxisHandleRemove(this); }; CartesianAxisView.type = 'cartesianAxis'; return CartesianAxisView; }(axis_AxisView); var axisElementBuilders = { splitLine: function (axisView, axisGroup, axisModel, gridModel) { var axis = axisModel.axis; if (axis.scale.isBlank()) { return; } var splitLineModel = axisModel.getModel('splitLine'); var lineStyleModel = splitLineModel.getModel('lineStyle'); var lineColors = lineStyleModel.get('color'); var showMinLine = splitLineModel.get('showMinLine') !== false; var showMaxLine = splitLineModel.get('showMaxLine') !== false; lineColors = core_util["isArray"](lineColors) ? lineColors : [lineColors]; var gridRect = gridModel.coordinateSystem.getRect(); var isHorizontal = axis.isHorizontal(); var lineCount = 0; var ticksCoords = axis.getTicksCoords({ tickModel: splitLineModel }); var p1 = []; var p2 = []; var lineStyle = lineStyleModel.getLineStyle(); for (var i = 0; i < ticksCoords.length; i++) { var tickCoord = axis.toGlobalCoord(ticksCoords[i].coord); if (i === 0 && !showMinLine || i === ticksCoords.length - 1 && !showMaxLine) { continue; } var tickValue = ticksCoords[i].tickValue; if (isHorizontal) { p1[0] = tickCoord; p1[1] = gridRect.y; p2[0] = tickCoord; p2[1] = gridRect.y + gridRect.height; } else { p1[0] = gridRect.x; p1[1] = tickCoord; p2[0] = gridRect.x + gridRect.width; p2[1] = tickCoord; } var colorIndex = lineCount++ % lineColors.length; var line = new shape_Line({ anid: tickValue != null ? 'line_' + tickValue : null, autoBatch: true, shape: { x1: p1[0], y1: p1[1], x2: p2[0], y2: p2[1] }, style: core_util["defaults"]({ stroke: lineColors[colorIndex] }, lineStyle), silent: true }); graphic_subPixelOptimizeLine(line.shape, lineStyle.lineWidth); axisGroup.add(line); } }, minorSplitLine: function (axisView, axisGroup, axisModel, gridModel) { var axis = axisModel.axis; var minorSplitLineModel = axisModel.getModel('minorSplitLine'); var lineStyleModel = minorSplitLineModel.getModel('lineStyle'); var gridRect = gridModel.coordinateSystem.getRect(); var isHorizontal = axis.isHorizontal(); var minorTicksCoords = axis.getMinorTicksCoords(); if (!minorTicksCoords.length) { return; } var p1 = []; var p2 = []; var lineStyle = lineStyleModel.getLineStyle(); for (var i = 0; i < minorTicksCoords.length; i++) { for (var k = 0; k < minorTicksCoords[i].length; k++) { var tickCoord = axis.toGlobalCoord(minorTicksCoords[i][k].coord); if (isHorizontal) { p1[0] = tickCoord; p1[1] = gridRect.y; p2[0] = tickCoord; p2[1] = gridRect.y + gridRect.height; } else { p1[0] = gridRect.x; p1[1] = tickCoord; p2[0] = gridRect.x + gridRect.width; p2[1] = tickCoord; } var line = new shape_Line({ anid: 'minor_line_' + minorTicksCoords[i][k].tickValue, autoBatch: true, shape: { x1: p1[0], y1: p1[1], x2: p2[0], y2: p2[1] }, style: lineStyle, silent: true }); graphic_subPixelOptimizeLine(line.shape, lineStyle.lineWidth); axisGroup.add(line); } } }, splitArea: function (axisView, axisGroup, axisModel, gridModel) { rectCoordAxisBuildSplitArea(axisView, axisGroup, axisModel, gridModel); } }; var CartesianAxisView_CartesianXAxisView = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(CartesianXAxisView, _super); function CartesianXAxisView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = CartesianXAxisView.type; return _this; } CartesianXAxisView.type = 'xAxis'; return CartesianXAxisView; }(CartesianAxisView_CartesianAxisView); var CartesianAxisView_CartesianYAxisView = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(CartesianYAxisView, _super); function CartesianYAxisView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = CartesianAxisView_CartesianXAxisView.type; return _this; } CartesianYAxisView.type = 'yAxis'; return CartesianYAxisView; }(CartesianAxisView_CartesianAxisView); /* harmony default export */ var axis_CartesianAxisView = (CartesianAxisView_CartesianAxisView); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/grid/installSimple.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ // Grid view var installSimple_GridView = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(GridView, _super); function GridView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = 'grid'; return _this; } GridView.prototype.render = function (gridModel, ecModel) { this.group.removeAll(); if (gridModel.get('show')) { this.group.add(new shape_Rect({ shape: gridModel.coordinateSystem.getRect(), style: Object(core_util["defaults"])({ fill: gridModel.get('backgroundColor') }, gridModel.getItemStyle()), silent: true, z2: -1 })); } }; GridView.type = 'grid'; return GridView; }(view_Component); var extraOption = { // gridIndex: 0, // gridId: '', offset: 0 }; function installSimple_install(registers) { registers.registerComponentView(installSimple_GridView); registers.registerComponentModel(cartesian_GridModel); registers.registerCoordinateSystem('cartesian2d', cartesian_Grid); axisModelCreator(registers, 'x', AxisModel_CartesianAxisModel, extraOption); axisModelCreator(registers, 'y', AxisModel_CartesianAxisModel, extraOption); registers.registerComponentView(CartesianAxisView_CartesianXAxisView); registers.registerComponentView(CartesianAxisView_CartesianYAxisView); registers.registerPreprocessor(function (option) { // Only create grid when need if (option.xAxis && option.yAxis && !option.grid) { option.grid = {}; } }); } // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/scatter/install.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 scatter_install_install(registers) { // In case developer forget to include grid component use(installSimple_install); registers.registerSeriesModel(ScatterSeries); registers.registerChartView(scatter_ScatterView); registers.registerLayout(pointsLayout('scatter')); } // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/radar/radarLayout.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 radarLayout(ecModel) { ecModel.eachSeriesByType('radar', function (seriesModel) { var data = seriesModel.getData(); var points = []; var coordSys = seriesModel.coordinateSystem; if (!coordSys) { return; } var axes = coordSys.getIndicatorAxes(); core_util["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 = core_util["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]; } // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/radar/backwardCompat.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ // @ts-nocheck // Backward compat for radar chart in 2 function radarBackwardCompat(option) { var polarOptArr = option.polar; if (polarOptArr) { if (!core_util["isArray"](polarOptArr)) { polarOptArr = [polarOptArr]; } var polarNotRadar_1 = []; core_util["each"](polarOptArr, function (polarOpt, idx) { if (polarOpt.indicator) { if (polarOpt.type && !polarOpt.shape) { polarOpt.shape = polarOpt.type; } option.radar = option.radar || []; if (!core_util["isArray"](option.radar)) { option.radar = [option.radar]; } option.radar.push(polarOpt); } else { polarNotRadar_1.push(polarOpt); } }); option.polar = polarNotRadar_1; } core_util["each"](option.series, function (seriesOpt) { if (seriesOpt && seriesOpt.type === 'radar' && seriesOpt.polarIndex) { seriesOpt.radarIndex = seriesOpt.polarIndex; } }); } // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/radar/RadarView.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 RadarView_RadarView = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(RadarView, _super); function RadarView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = RadarView.type; return _this; } RadarView.prototype.render = function (seriesModel, ecModel, api) { var polar = seriesModel.coordinateSystem; var group = this.group; var data = seriesModel.getData(); var oldData = this._data; function createSymbol(data, idx) { var symbolType = data.getItemVisual(idx, 'symbol') || 'circle'; if (symbolType === 'none') { return; } var symbolSize = normalizeSymbolSize(data.getItemVisual(idx, 'symbolSize')); var symbolPath = symbol_createSymbol(symbolType, -1, -1, 2, 2); var symbolRotate = data.getItemVisual(idx, 'symbolRotate') || 0; symbolPath.attr({ style: { strokeNoScale: true }, z2: 100, scaleX: symbolSize[0] / 2, scaleY: symbolSize[1] / 2, rotation: symbolRotate * Math.PI / 180 || 0 }); return symbolPath; } function updateSymbols(oldPoints, newPoints, symbolGroup, data, idx, isInit) { // Simply rerender all symbolGroup.removeAll(); for (var i = 0; i < newPoints.length - 1; i++) { var symbolPath = createSymbol(data, idx); if (symbolPath) { symbolPath.__dimIdx = i; if (oldPoints[i]) { symbolPath.setPosition(oldPoints[i]); graphic_namespaceObject[isInit ? 'initProps' : 'updateProps'](symbolPath, { x: newPoints[i][0], y: newPoints[i][1] }, seriesModel, idx); } else { symbolPath.setPosition(newPoints[i]); } symbolGroup.add(symbolPath); } } } function getInitialPoints(points) { return core_util["map"](points, function (pt) { return [polar.cx, polar.cy]; }); } data.diff(oldData).add(function (idx) { var points = data.getItemLayout(idx); if (!points) { return; } var polygon = new shape_Polygon(); var polyline = new shape_Polyline(); var target = { shape: { points: points } }; polygon.shape.points = getInitialPoints(points); polyline.shape.points = getInitialPoints(points); initProps(polygon, target, seriesModel, idx); initProps(polyline, target, seriesModel, idx); var itemGroup = new graphic_Group(); var symbolGroup = new graphic_Group(); itemGroup.add(polyline); itemGroup.add(polygon); itemGroup.add(symbolGroup); updateSymbols(polyline.shape.points, points, symbolGroup, data, idx, true); data.setItemGraphicEl(idx, itemGroup); }).update(function (newIdx, oldIdx) { var itemGroup = oldData.getItemGraphicEl(oldIdx); var polyline = itemGroup.childAt(0); var polygon = itemGroup.childAt(1); var symbolGroup = itemGroup.childAt(2); var target = { shape: { points: data.getItemLayout(newIdx) } }; if (!target.shape.points) { return; } updateSymbols(polyline.shape.points, target.shape.points, symbolGroup, data, newIdx, false); saveOldStyle(polygon); saveOldStyle(polyline); updateProps(polyline, target, seriesModel); updateProps(polygon, target, seriesModel); data.setItemGraphicEl(newIdx, itemGroup); }).remove(function (idx) { group.remove(oldData.getItemGraphicEl(idx)); }).execute(); data.eachItemGraphicEl(function (itemGroup, idx) { var itemModel = data.getItemModel(idx); var polyline = itemGroup.childAt(0); var polygon = itemGroup.childAt(1); var symbolGroup = itemGroup.childAt(2); // Radar uses the visual encoded from itemStyle. var itemStyle = data.getItemVisual(idx, 'style'); var color = itemStyle.fill; group.add(itemGroup); polyline.useStyle(core_util["defaults"](itemModel.getModel('lineStyle').getLineStyle(), { fill: 'none', stroke: color })); setStatesStylesFromModel(polyline, itemModel, 'lineStyle'); setStatesStylesFromModel(polygon, itemModel, 'areaStyle'); var areaStyleModel = itemModel.getModel('areaStyle'); var polygonIgnore = areaStyleModel.isEmpty() && areaStyleModel.parentModel.isEmpty(); polygon.ignore = polygonIgnore; core_util["each"](['emphasis', 'select', 'blur'], function (stateName) { var stateModel = itemModel.getModel([stateName, 'areaStyle']); var stateIgnore = stateModel.isEmpty() && stateModel.parentModel.isEmpty(); // Won't be ignore if normal state is not ignore. polygon.ensureState(stateName).ignore = stateIgnore && polygonIgnore; }); polygon.useStyle(core_util["defaults"](areaStyleModel.getAreaStyle(), { fill: color, opacity: 0.7, decal: itemStyle.decal })); var emphasisModel = itemModel.getModel('emphasis'); var itemHoverStyle = emphasisModel.getModel('itemStyle').getItemStyle(); symbolGroup.eachChild(function (symbolPath) { if (symbolPath instanceof graphic_Image) { var pathStyle = symbolPath.style; symbolPath.useStyle(core_util["extend"]({ // TODO other properties like x, y ? image: pathStyle.image, x: pathStyle.x, y: pathStyle.y, width: pathStyle.width, height: pathStyle.height }, itemStyle)); } else { symbolPath.useStyle(itemStyle); symbolPath.setColor(color); symbolPath.style.strokeNoScale = true; } var pathEmphasisState = symbolPath.ensureState('emphasis'); pathEmphasisState.style = core_util["clone"](itemHoverStyle); var defaultText = data.getStore().get(data.getDimensionIndex(symbolPath.__dimIdx), idx); (defaultText == null || isNaN(defaultText)) && (defaultText = ''); setLabelStyle(symbolPath, getLabelStatesModels(itemModel), { labelFetcher: data.hostModel, labelDataIndex: idx, labelDimIndex: symbolPath.__dimIdx, defaultText: defaultText, inheritColor: color, defaultOpacity: itemStyle.opacity }); }); toggleHoverEmphasis(itemGroup, emphasisModel.get('focus'), emphasisModel.get('blurScope'), emphasisModel.get('disabled')); }); this._data = data; }; RadarView.prototype.remove = function () { this.group.removeAll(); this._data = null; }; RadarView.type = 'radar'; return RadarView; }(Chart); /* harmony default export */ var radar_RadarView = (RadarView_RadarView); // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/radar/RadarSeries.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 RadarSeries_RadarSeriesModel = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(RadarSeriesModel, _super); function RadarSeriesModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = RadarSeriesModel.type; _this.hasSymbolVisual = true; return _this; } // Overwrite RadarSeriesModel.prototype.init = function (option) { _super.prototype.init.apply(this, arguments); // Enable legend selection for each data item // Use a function instead of direct access because data reference may changed this.legendVisualProvider = new visual_LegendVisualProvider(core_util["bind"](this.getData, this), core_util["bind"](this.getRawData, this)); }; RadarSeriesModel.prototype.getInitialData = function (option, ecModel) { return createSeriesDataSimply(this, { generateCoord: 'indicator_', generateCoordCount: Infinity }); }; RadarSeriesModel.prototype.formatTooltip = function (dataIndex, multipleSeries, dataType) { var data = this.getData(); var coordSys = this.coordinateSystem; var indicatorAxes = coordSys.getIndicatorAxes(); var name = this.getData().getName(dataIndex); var nameToDisplay = name === '' ? this.name : name; var markerColor = retrieveVisualColorForTooltipMarker(this, dataIndex); return createTooltipMarkup('section', { header: nameToDisplay, sortBlocks: true, blocks: core_util["map"](indicatorAxes, function (axis) { var val = data.get(data.mapDimension(axis.dim), dataIndex); return createTooltipMarkup('nameValue', { markerType: 'subItem', markerColor: markerColor, name: axis.name, value: val, sortParam: val }); }) }); }; RadarSeriesModel.prototype.getTooltipPosition = function (dataIndex) { if (dataIndex != null) { var data_1 = this.getData(); var coordSys = this.coordinateSystem; var values = data_1.getValues(core_util["map"](coordSys.dimensions, function (dim) { return data_1.mapDimension(dim); }), dataIndex); for (var i = 0, len = values.length; i < len; i++) { if (!isNaN(values[i])) { var indicatorAxes = coordSys.getIndicatorAxes(); return coordSys.coordToPoint(indicatorAxes[i].dataToCoord(values[i]), i); } } } }; RadarSeriesModel.type = 'series.radar'; RadarSeriesModel.dependencies = ['radar']; RadarSeriesModel.defaultOption = { // zlevel: 0, z: 2, colorBy: 'data', coordinateSystem: 'radar', legendHoverLink: true, radarIndex: 0, lineStyle: { width: 2, type: 'solid', join: 'round' }, label: { position: 'top' }, // areaStyle: { // }, // itemStyle: {} symbolSize: 8 // symbolRotate: null }; return RadarSeriesModel; }(Series); /* harmony default export */ var RadarSeries = (RadarSeries_RadarSeriesModel); // CONCATENATED MODULE: ./node_modules/echarts/lib/coord/radar/RadarModel.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 valueAxisDefault = axisDefault.value; function defaultsShow(opt, show) { return core_util["defaults"]({ show: show }, opt); } var RadarModel_RadarModel = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(RadarModel, _super); function RadarModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = RadarModel.type; return _this; } RadarModel.prototype.optionUpdated = function () { var boundaryGap = this.get('boundaryGap'); var splitNumber = this.get('splitNumber'); var scale = this.get('scale'); var axisLine = this.get('axisLine'); var axisTick = this.get('axisTick'); // let axisType = this.get('axisType'); var axisLabel = this.get('axisLabel'); var nameTextStyle = this.get('axisName'); var showName = this.get(['axisName', 'show']); var nameFormatter = this.get(['axisName', 'formatter']); var nameGap = this.get('axisNameGap'); var triggerEvent = this.get('triggerEvent'); var indicatorModels = core_util["map"](this.get('indicator') || [], function (indicatorOpt) { // PENDING if (indicatorOpt.max != null && indicatorOpt.max > 0 && !indicatorOpt.min) { indicatorOpt.min = 0; } else if (indicatorOpt.min != null && indicatorOpt.min < 0 && !indicatorOpt.max) { indicatorOpt.max = 0; } var iNameTextStyle = nameTextStyle; if (indicatorOpt.color != null) { iNameTextStyle = core_util["defaults"]({ color: indicatorOpt.color }, nameTextStyle); } // Use same configuration var innerIndicatorOpt = core_util["merge"](core_util["clone"](indicatorOpt), { boundaryGap: boundaryGap, splitNumber: splitNumber, scale: scale, axisLine: axisLine, axisTick: axisTick, // axisType: axisType, axisLabel: axisLabel, // Compatible with 2 and use text name: indicatorOpt.text, showName: showName, nameLocation: 'end', nameGap: nameGap, // min: 0, nameTextStyle: iNameTextStyle, triggerEvent: triggerEvent }, false); if (core_util["isString"](nameFormatter)) { var indName = innerIndicatorOpt.name; innerIndicatorOpt.name = nameFormatter.replace('{value}', indName != null ? indName : ''); } else if (core_util["isFunction"](nameFormatter)) { innerIndicatorOpt.name = nameFormatter(innerIndicatorOpt.name, innerIndicatorOpt); } var model = new model_Model(innerIndicatorOpt, null, this.ecModel); core_util["mixin"](model, AxisModelCommonMixin.prototype); // For triggerEvent. model.mainType = 'radar'; model.componentIndex = this.componentIndex; return model; }, this); this._indicatorModels = indicatorModels; }; RadarModel.prototype.getIndicatorModels = function () { return this._indicatorModels; }; RadarModel.type = 'radar'; RadarModel.defaultOption = { // zlevel: 0, z: 0, center: ['50%', '50%'], radius: '75%', startAngle: 90, axisName: { show: true // formatter: null // textStyle: {} }, boundaryGap: [0, 0], splitNumber: 5, axisNameGap: 15, scale: false, // Polygon or circle shape: 'polygon', axisLine: core_util["merge"]({ lineStyle: { color: '#bbb' } }, valueAxisDefault.axisLine), axisLabel: defaultsShow(valueAxisDefault.axisLabel, false), axisTick: defaultsShow(valueAxisDefault.axisTick, false), // axisType: 'value', splitLine: defaultsShow(valueAxisDefault.splitLine, true), splitArea: defaultsShow(valueAxisDefault.splitArea, true), // {text, min, max} indicator: [] }; return RadarModel; }(Component); /* harmony default export */ var radar_RadarModel = (RadarModel_RadarModel); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/radar/RadarView.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 RadarView_axisBuilderAttrs = ['axisLine', 'axisTickLabel', 'axisName']; var radar_RadarView_RadarView = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(RadarView, _super); function RadarView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = RadarView.type; return _this; } RadarView.prototype.render = function (radarModel, ecModel, api) { var group = this.group; group.removeAll(); this._buildAxes(radarModel); this._buildSplitLineAndArea(radarModel); }; RadarView.prototype._buildAxes = function (radarModel) { var radar = radarModel.coordinateSystem; var indicatorAxes = radar.getIndicatorAxes(); var axisBuilders = core_util["map"](indicatorAxes, function (indicatorAxis) { var axisName = indicatorAxis.model.get('showName') ? indicatorAxis.name : ''; // hide name var axisBuilder = new axis_AxisBuilder(indicatorAxis.model, { axisName: axisName, position: [radar.cx, radar.cy], rotation: indicatorAxis.angle, labelDirection: -1, tickDirection: -1, nameDirection: 1 }); return axisBuilder; }); core_util["each"](axisBuilders, function (axisBuilder) { core_util["each"](RadarView_axisBuilderAttrs, axisBuilder.add, axisBuilder); this.group.add(axisBuilder.getGroup()); }, this); }; RadarView.prototype._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'); var splitLineColorsArr = core_util["isArray"](splitLineColors) ? splitLineColors : [splitLineColors]; var splitAreaColorsArr = core_util["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, splitLineColorsArr, i); splitLines[colorIndex].push(new shape_Circle({ shape: { cx: cx, cy: cy, r: ticksRadius[i].coord } })); } if (showSplitArea && i < ticksRadius.length - 1) { var colorIndex = getColorIndex(splitAreas, splitAreaColorsArr, i); splitAreas[colorIndex].push(new shape_Ring({ shape: { cx: cx, cy: cy, r0: ticksRadius[i].coord, r: ticksRadius[i + 1].coord } })); } } } // Polyyon else { var realSplitNumber_1; var axesTicksPoints = core_util["map"](indicatorAxes, function (indicatorAxis, idx) { var ticksCoords = indicatorAxis.getTicksCoords(); realSplitNumber_1 = realSplitNumber_1 == null ? ticksCoords.length - 1 : Math.min(ticksCoords.length - 1, realSplitNumber_1); return core_util["map"](ticksCoords, function (tickCoord) { return radar.coordToPoint(tickCoord.coord, idx); }); }); var prevPoints = []; for (var i = 0; i <= realSplitNumber_1; 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 (false) { console.error('Can\'t draw value axis ' + i); } } if (showSplitLine) { var colorIndex = getColorIndex(splitLines, splitLineColorsArr, i); splitLines[colorIndex].push(new shape_Polyline({ shape: { points: points } })); } if (showSplitArea && prevPoints) { var colorIndex = getColorIndex(splitAreas, splitAreaColorsArr, i - 1); splitAreas[colorIndex].push(new shape_Polygon({ shape: { points: points.concat(prevPoints) } })); } prevPoints = points.slice().reverse(); } } var lineStyle = lineStyleModel.getLineStyle(); var areaStyle = areaStyleModel.getAreaStyle(); // Add splitArea before splitLine core_util["each"](splitAreas, function (splitAreas, idx) { this.group.add(graphic_mergePath(splitAreas, { style: core_util["defaults"]({ stroke: 'none', fill: splitAreaColorsArr[idx % splitAreaColorsArr.length] }, areaStyle), silent: true })); }, this); core_util["each"](splitLines, function (splitLines, idx) { this.group.add(graphic_mergePath(splitLines, { style: core_util["defaults"]({ fill: 'none', stroke: splitLineColorsArr[idx % splitLineColorsArr.length] }, lineStyle), silent: true })); }, this); }; RadarView.type = 'radar'; return RadarView; }(view_Component); /* harmony default export */ var component_radar_RadarView = (radar_RadarView_RadarView); // CONCATENATED MODULE: ./node_modules/echarts/lib/coord/radar/IndicatorAxis.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 IndicatorAxis_IndicatorAxis = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(IndicatorAxis, _super); function IndicatorAxis(dim, scale, radiusExtent) { var _this = _super.call(this, dim, scale, radiusExtent) || this; _this.type = 'value'; _this.angle = 0; _this.name = ''; return _this; } return IndicatorAxis; }(coord_Axis); /* harmony default export */ var radar_IndicatorAxis = (IndicatorAxis_IndicatorAxis); // CONCATENATED MODULE: ./node_modules/echarts/lib/coord/radar/Radar.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 var Radar_Radar = /** @class */function () { function Radar(radarModel, ecModel, api) { /** * * Radar dimensions */ this.dimensions = []; this._model = radarModel; this._indicatorAxes = Object(core_util["map"])(radarModel.getIndicatorModels(), function (indicatorModel, idx) { var dim = 'indicator_' + idx; var indicatorAxis = new radar_IndicatorAxis(dim, new Interval() // (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); } 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); }; // TODO: API should be coordToPoint([coord, 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 = number_parsePercent(center[0], viewWidth); this.cy = number_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 (Object(core_util["isString"])(radius) || Object(core_util["isNumber"])(radius)) { radius = [0, radius]; } this.r0 = number_parsePercent(radius[0], viewSize); this.r = number_parsePercent(radius[1], viewSize); Object(core_util["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; Object(core_util["each"])(indicatorAxes, function (indicatorAxis) { indicatorAxis.scale.setExtent(Infinity, -Infinity); }); ecModel.eachSeriesByType('radar', function (radarSeries, idx) { if (radarSeries.get('coordinateSystem') !== 'radar' // @ts-ignore || ecModel.getComponent('radar', radarSeries.get('radarIndex')) !== radarModel) { return; } var data = radarSeries.getData(); Object(core_util["each"])(indicatorAxes, function (indicatorAxis) { indicatorAxis.scale.unionExtentFromData(data, data.mapDimension(indicatorAxis.dim)); }); }, this); var splitNumber = radarModel.get('splitNumber'); var dummyScale = new Interval(); dummyScale.setExtent(0, splitNumber); dummyScale.setInterval(1); // Force all the axis fixing the maxSplitNumber. Object(core_util["each"])(indicatorAxes, function (indicatorAxis, idx) { alignScaleTicks(indicatorAxis.scale, indicatorAxis.model, dummyScale); }); }; Radar.prototype.convertToPixel = function (ecModel, finder, value) { console.warn('Not implemented.'); return null; }; Radar.prototype.convertFromPixel = function (ecModel, finder, pixel) { console.warn('Not implemented.'); return null; }; Radar.prototype.containPoint = function (point) { console.warn('Not implemented.'); return false; }; 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 // @ts-ignore radarSeries.coordinateSystem = radarList[radarSeries.get('radarIndex') || 0]; } }); return radarList; }; /** * Radar dimensions is based on the data */ Radar.dimensions = []; return Radar; }(); /* harmony default export */ var radar_Radar = (Radar_Radar); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/radar/install.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 radar_install_install(registers) { registers.registerCoordinateSystem('radar', radar_Radar); registers.registerComponentModel(radar_RadarModel); registers.registerComponentView(component_radar_RadarView); registers.registerVisual({ seriesType: 'radar', reset: function (seriesModel) { var data = seriesModel.getData(); // itemVisual symbol is for selected data data.each(function (idx) { data.setItemVisual(idx, 'legendIcon', 'roundRect'); }); // visual is for unselected data data.setVisual('legendIcon', 'roundRect'); } }); } // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/radar/install.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 chart_radar_install_install(registers) { use(radar_install_install); registers.registerChartView(radar_RadarView); registers.registerSeriesModel(RadarSeries); registers.registerLayout(radarLayout); registers.registerProcessor(dataFilter('radar')); registers.registerPreprocessor(radarBackwardCompat); } // CONCATENATED MODULE: ./node_modules/echarts/lib/component/helper/interactionMutex.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ // @ts-nocheck 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. * } */ // TODO: SELF REGISTERED. registerAction({ type: 'takeGlobalCursor', event: 'globalCursorTaken', update: 'update' }, core_util["noop"]); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/helper/RoamController.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 RoamController_RoamController = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(RoamController, _super); function RoamController(zr) { var _this = _super.call(this) || this; _this._zr = zr; // Avoid two roamController bind the same handler var mousedownHandler = Object(core_util["bind"])(_this._mousedownHandler, _this); var mousemoveHandler = Object(core_util["bind"])(_this._mousemoveHandler, _this); var mouseupHandler = Object(core_util["bind"])(_this._mouseupHandler, _this); var mousewheelHandler = Object(core_util["bind"])(_this._mousewheelHandler, _this); var pinchHandler = Object(core_util["bind"])(_this._pinchHandler, _this); /** * Notice: only enable needed types. For example, if 'zoom' * is not needed, 'zoom' should not be enabled, otherwise * default mousewheel behaviour (scroll page) will be disabled. */ _this.enable = function (controlType, opt) { // Disable previous first this.disable(); this._opt = Object(core_util["defaults"])(Object(core_util["clone"])(opt) || {}, { zoomOnMouseWheel: true, moveOnMouseMove: true, // By default, wheel do not trigger move. moveOnMouseWheel: false, preventDefaultMouseMove: true }); if (controlType == null) { controlType = true; } if (controlType === true || controlType === 'move' || controlType === 'pan') { zr.on('mousedown', mousedownHandler); zr.on('mousemove', mousemoveHandler); zr.on('mouseup', mouseupHandler); } if (controlType === true || controlType === 'scale' || controlType === 'zoom') { zr.on('mousewheel', mousewheelHandler); zr.on('pinch', pinchHandler); } }; _this.disable = function () { zr.off('mousedown', mousedownHandler); zr.off('mousemove', mousemoveHandler); zr.off('mouseup', mouseupHandler); zr.off('mousewheel', mousewheelHandler); zr.off('pinch', pinchHandler); }; return _this; } RoamController.prototype.isDragging = function () { return this._dragging; }; RoamController.prototype.isPinching = function () { return this._pinching; }; RoamController.prototype.setPointerChecker = function (pointerChecker) { this.pointerChecker = pointerChecker; }; RoamController.prototype.dispose = function () { this.disable(); }; RoamController.prototype._mousedownHandler = function (e) { if (isMiddleOrRightButtonOnMouseUpDown(e)) { return; } var el = e.target; while (el) { if (el.draggable) { return; } // check if host is draggable el = el.__hostTarget || el.parent; } var x = e.offsetX; var y = e.offsetY; // Only check on mosedown, but not mousemove. // Mouse can be out of target when mouse moving. if (this.pointerChecker && this.pointerChecker(e, x, y)) { this._x = x; this._y = y; this._dragging = true; } }; RoamController.prototype._mousemoveHandler = function (e) { if (!this._dragging || !isAvailableBehavior('moveOnMouseMove', e, this._opt) || e.gestureEvent === 'pinch' || isTaken(this._zr, 'globalPan')) { return; } var x = e.offsetX; var y = e.offsetY; var oldX = this._x; var oldY = this._y; var dx = x - oldX; var dy = y - oldY; this._x = x; this._y = y; this._opt.preventDefaultMouseMove && stop(e.event); RoamController_trigger(this, 'pan', 'moveOnMouseMove', e, { dx: dx, dy: dy, oldX: oldX, oldY: oldY, newX: x, newY: y, isAvailableBehavior: null }); }; RoamController.prototype._mouseupHandler = function (e) { if (!isMiddleOrRightButtonOnMouseUpDown(e)) { this._dragging = false; } }; RoamController.prototype._mousewheelHandler = function (e) { var shouldZoom = isAvailableBehavior('zoomOnMouseWheel', e, this._opt); var shouldMove = isAvailableBehavior('moveOnMouseWheel', e, this._opt); var wheelDelta = e.wheelDelta; var absWheelDeltaDelta = Math.abs(wheelDelta); var originX = e.offsetX; var originY = e.offsetY; // wheelDelta maybe -0 in chrome mac. if (wheelDelta === 0 || !shouldZoom && !shouldMove) { return; } // If both `shouldZoom` and `shouldMove` is true, trigger // their event both, and the final behavior is determined // by event listener themselves. if (shouldZoom) { // Convenience: // Mac and VM Windows on Mac: scroll up: zoom out. // Windows: scroll up: zoom in. // FIXME: Should do more test in different environment. // wheelDelta is too complicated in difference nvironment // (https://developer.mozilla.org/en-US/docs/Web/Events/mousewheel), // although it has been normallized by zrender. // wheelDelta of mouse wheel is bigger than touch pad. var factor = absWheelDeltaDelta > 3 ? 1.4 : absWheelDeltaDelta > 1 ? 1.2 : 1.1; var scale = wheelDelta > 0 ? factor : 1 / factor; checkPointerAndTrigger(this, 'zoom', 'zoomOnMouseWheel', e, { scale: scale, originX: originX, originY: originY, isAvailableBehavior: null }); } if (shouldMove) { // FIXME: Should do more test in different environment. var absDelta = Math.abs(wheelDelta); // wheelDelta of mouse wheel is bigger than touch pad. var scrollDelta = (wheelDelta > 0 ? 1 : -1) * (absDelta > 3 ? 0.4 : absDelta > 1 ? 0.15 : 0.05); checkPointerAndTrigger(this, 'scrollMove', 'moveOnMouseWheel', e, { scrollDelta: scrollDelta, originX: originX, originY: originY, isAvailableBehavior: null }); } }; RoamController.prototype._pinchHandler = function (e) { if (isTaken(this._zr, 'globalPan')) { return; } var scale = e.pinchScale > 1 ? 1.1 : 1 / 1.1; checkPointerAndTrigger(this, 'zoom', null, e, { scale: scale, originX: e.pinchX, originY: e.pinchY, isAvailableBehavior: null }); }; return RoamController; }(core_Eventful); function checkPointerAndTrigger(controller, eventName, behaviorToCheck, e, contollerEvent) { if (controller.pointerChecker && controller.pointerChecker(e, contollerEvent.originX, contollerEvent.originY)) { // When mouse is out of roamController rect, // default befavoius should not be be disabled, otherwise // page sliding is disabled, contrary to expectation. stop(e.event); RoamController_trigger(controller, eventName, behaviorToCheck, e, contollerEvent); } } function RoamController_trigger(controller, eventName, behaviorToCheck, e, contollerEvent) { // Also provide behavior checker for event listener, for some case that // multiple components share one listener. contollerEvent.isAvailableBehavior = Object(core_util["bind"])(isAvailableBehavior, null, behaviorToCheck, e); // TODO should not have type issue. controller.trigger(eventName, contollerEvent); } // settings: { // zoomOnMouseWheel // moveOnMouseMove // moveOnMouseWheel // } // The value can be: true / false / 'shift' / 'ctrl' / 'alt'. function isAvailableBehavior(behaviorToCheck, e, settings) { var setting = settings[behaviorToCheck]; return !behaviorToCheck || setting && (!Object(core_util["isString"])(setting) || e.event[setting + 'Key']); } /* harmony default export */ var helper_RoamController = (RoamController_RoamController); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/helper/roamHelper.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ /** * For geo and graph. */ function updateViewOnPan(controllerHost, dx, dy) { var target = controllerHost.target; target.x += dx; target.y += dy; target.dirty(); } /** * For geo and graph. */ function updateViewOnZoom(controllerHost, zoomDelta, zoomX, zoomY) { var target = controllerHost.target; var zoomLimit = controllerHost.zoomLimit; var newZoom = controllerHost.zoom = controllerHost.zoom || 1; newZoom *= zoomDelta; if (zoomLimit) { var zoomMin = zoomLimit.min || 0; var zoomMax = zoomLimit.max || Infinity; newZoom = Math.max(Math.min(zoomMax, newZoom), zoomMin); } var zoomScale = newZoom / controllerHost.zoom; controllerHost.zoom = newZoom; // Keep the mouse center when scaling target.x -= (zoomX - target.x) * (zoomScale - 1); target.y -= (zoomY - target.y) * (zoomScale - 1); target.scaleX *= zoomScale; target.scaleY *= zoomScale; target.dirty(); } // CONCATENATED MODULE: ./node_modules/echarts/lib/component/helper/cursorHelper.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 IRRELEVANT_EXCLUDES = { 'axisPointer': 1, 'tooltip': 1, 'brush': 1 }; /** * Avoid that: mouse click on a elements that is over geo or graph, * but roam is triggered. */ function onIrrelevantElement(e, api, targetCoordSysModel) { var model = api.getComponentByElement(e.topTarget); // If model is axisModel, it works only if it is injected with coordinateSystem. var coordSys = model && model.coordinateSystem; return model && model !== targetCoordSysModel && !IRRELEVANT_EXCLUDES.hasOwnProperty(model.mainType) && coordSys && coordSys.model !== targetCoordSysModel; } // CONCATENATED MODULE: ./node_modules/zrender/lib/tool/parseXML.js function parseXML(svg) { if (Object(core_util["isString"])(svg)) { var parser = new DOMParser(); svg = parser.parseFromString(svg, 'text/xml'); } var svgNode = svg; if (svgNode.nodeType === 9) { svgNode = svgNode.firstChild; } while (svgNode.nodeName.toLowerCase() !== 'svg' || svgNode.nodeType !== 1) { svgNode = svgNode.nextSibling; } return svgNode; } // CONCATENATED MODULE: ./node_modules/zrender/lib/tool/parseSVG.js ; var nodeParsers; var INHERITABLE_STYLE_ATTRIBUTES_MAP = { '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-anchor': 'textAlign', 'visibility': 'visibility', 'display': 'display' }; var INHERITABLE_STYLE_ATTRIBUTES_MAP_KEYS = Object(core_util["keys"])(INHERITABLE_STYLE_ATTRIBUTES_MAP); var SELF_STYLE_ATTRIBUTES_MAP = { 'alignment-baseline': 'textBaseline', 'stop-color': 'stopColor' }; var SELF_STYLE_ATTRIBUTES_MAP_KEYS = Object(core_util["keys"])(SELF_STYLE_ATTRIBUTES_MAP); var parseSVG_SVGParser = (function () { function SVGParser() { this._defs = {}; this._root = null; } SVGParser.prototype.parse = function (xml, opt) { opt = opt || {}; var svg = parseXML(xml); if (false) { if (!svg) { throw new Error('Illegal svg'); } } this._defsUsePending = []; var root = new graphic_Group(); this._root = root; var named = []; var viewBox = svg.getAttribute('viewBox') || ''; var width = parseFloat((svg.getAttribute('width') || opt.width)); var height = parseFloat((svg.getAttribute('height') || opt.height)); isNaN(width) && (width = null); isNaN(height) && (height = null); parseAttributes(svg, root, null, true, false); var child = svg.firstChild; while (child) { this._parseNode(child, root, named, null, false, false); child = child.nextSibling; } applyDefs(this._defs, this._defsUsePending); this._defsUsePending = []; var viewBoxRect; var viewBoxTransform; if (viewBox) { var viewBoxArr = splitNumberSequence(viewBox); if (viewBoxArr.length >= 4) { viewBoxRect = { x: parseFloat((viewBoxArr[0] || 0)), y: parseFloat((viewBoxArr[1] || 0)), width: parseFloat(viewBoxArr[2]), height: parseFloat(viewBoxArr[3]) }; } } if (viewBoxRect && width != null && height != null) { viewBoxTransform = makeViewBoxTransform(viewBoxRect, { x: 0, y: 0, width: width, height: height }); if (!opt.ignoreViewBox) { var elRoot = root; root = new graphic_Group(); root.add(elRoot); elRoot.scaleX = elRoot.scaleY = viewBoxTransform.scale; elRoot.x = viewBoxTransform.x; elRoot.y = viewBoxTransform.y; } } if (!opt.ignoreRootClip && width != null && height != null) { root.setClipPath(new shape_Rect({ shape: { x: 0, y: 0, width: width, height: height } })); } return { root: root, width: width, height: height, viewBoxRect: viewBoxRect, viewBoxTransform: viewBoxTransform, named: named }; }; SVGParser.prototype._parseNode = function (xmlNode, parentGroup, named, namedFrom, isInDefs, isInText) { var nodeName = xmlNode.nodeName.toLowerCase(); var el; var namedFromForSub = namedFrom; if (nodeName === 'defs') { isInDefs = true; } if (nodeName === 'text') { isInText = true; } if (nodeName === 'defs' || nodeName === 'switch') { el = parentGroup; } else { if (!isInDefs) { var parser_1 = nodeParsers[nodeName]; if (parser_1 && Object(core_util["hasOwn"])(nodeParsers, nodeName)) { el = parser_1.call(this, xmlNode, parentGroup); var nameAttr = xmlNode.getAttribute('name'); if (nameAttr) { var newNamed = { name: nameAttr, namedFrom: null, svgNodeTagLower: nodeName, el: el }; named.push(newNamed); if (nodeName === 'g') { namedFromForSub = newNamed; } } else if (namedFrom) { named.push({ name: namedFrom.name, namedFrom: namedFrom, svgNodeTagLower: nodeName, el: el }); } parentGroup.add(el); } } var parser = paintServerParsers[nodeName]; if (parser && Object(core_util["hasOwn"])(paintServerParsers, nodeName)) { var def = parser.call(this, xmlNode); var id = xmlNode.getAttribute('id'); if (id) { this._defs[id] = def; } } } if (el && el.isGroup) { var child = xmlNode.firstChild; while (child) { if (child.nodeType === 1) { this._parseNode(child, el, named, namedFromForSub, isInDefs, isInText); } else if (child.nodeType === 3 && isInText) { this._parseText(child, el); } child = child.nextSibling; } } }; SVGParser.prototype._parseText = function (xmlNode, parentGroup) { var text = new graphic_TSpan({ style: { text: xmlNode.textContent }, silent: true, x: this._textX || 0, y: this._textY || 0 }); inheritStyle(parentGroup, text); parseAttributes(xmlNode, text, this._defsUsePending, false, false); applyTextAlignment(text, parentGroup); var textStyle = text.style; var fontSize = textStyle.fontSize; if (fontSize && fontSize < 9) { textStyle.fontSize = 9; text.scaleX *= fontSize / 9; text.scaleY *= fontSize / 9; } var font = (textStyle.fontSize || textStyle.fontFamily) && [ textStyle.fontStyle, textStyle.fontWeight, (textStyle.fontSize || 12) + 'px', textStyle.fontFamily || 'sans-serif' ].join(' '); textStyle.font = font; var rect = text.getBoundingRect(); this._textX += rect.width; parentGroup.add(text); return text; }; SVGParser.internalField = (function () { nodeParsers = { 'g': function (xmlNode, parentGroup) { var g = new graphic_Group(); inheritStyle(parentGroup, g); parseAttributes(xmlNode, g, this._defsUsePending, false, false); return g; }, 'rect': function (xmlNode, parentGroup) { var rect = new shape_Rect(); inheritStyle(parentGroup, rect); parseAttributes(xmlNode, rect, this._defsUsePending, false, false); 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') }); rect.silent = true; return rect; }, 'circle': function (xmlNode, parentGroup) { var circle = new shape_Circle(); inheritStyle(parentGroup, circle); parseAttributes(xmlNode, circle, this._defsUsePending, false, false); circle.setShape({ cx: parseFloat(xmlNode.getAttribute('cx') || '0'), cy: parseFloat(xmlNode.getAttribute('cy') || '0'), r: parseFloat(xmlNode.getAttribute('r') || '0') }); circle.silent = true; return circle; }, 'line': function (xmlNode, parentGroup) { var line = new shape_Line(); inheritStyle(parentGroup, line); parseAttributes(xmlNode, line, this._defsUsePending, false, false); 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') }); line.silent = true; return line; }, 'ellipse': function (xmlNode, parentGroup) { var ellipse = new shape_Ellipse(); inheritStyle(parentGroup, ellipse); parseAttributes(xmlNode, ellipse, this._defsUsePending, false, false); 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') }); ellipse.silent = true; return ellipse; }, 'polygon': function (xmlNode, parentGroup) { var pointsStr = xmlNode.getAttribute('points'); var pointsArr; if (pointsStr) { pointsArr = parsePoints(pointsStr); } var polygon = new shape_Polygon({ shape: { points: pointsArr || [] }, silent: true }); inheritStyle(parentGroup, polygon); parseAttributes(xmlNode, polygon, this._defsUsePending, false, false); return polygon; }, 'polyline': function (xmlNode, parentGroup) { var pointsStr = xmlNode.getAttribute('points'); var pointsArr; if (pointsStr) { pointsArr = parsePoints(pointsStr); } var polyline = new shape_Polyline({ shape: { points: pointsArr || [] }, silent: true }); inheritStyle(parentGroup, polyline); parseAttributes(xmlNode, polyline, this._defsUsePending, false, false); return polyline; }, 'image': function (xmlNode, parentGroup) { var img = new graphic_Image(); inheritStyle(parentGroup, img); parseAttributes(xmlNode, img, this._defsUsePending, false, false); img.setStyle({ image: xmlNode.getAttribute('xlink:href') || xmlNode.getAttribute('href'), x: +xmlNode.getAttribute('x'), y: +xmlNode.getAttribute('y'), width: +xmlNode.getAttribute('width'), height: +xmlNode.getAttribute('height') }); img.silent = true; 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 graphic_Group(); inheritStyle(parentGroup, g); parseAttributes(xmlNode, g, this._defsUsePending, false, true); return g; }, 'tspan': function (xmlNode, parentGroup) { var x = xmlNode.getAttribute('x'); var y = xmlNode.getAttribute('y'); if (x != null) { this._textX = parseFloat(x); } if (y != null) { this._textY = parseFloat(y); } var dx = xmlNode.getAttribute('dx') || '0'; var dy = xmlNode.getAttribute('dy') || '0'; var g = new graphic_Group(); inheritStyle(parentGroup, g); parseAttributes(xmlNode, g, this._defsUsePending, false, true); this._textX += parseFloat(dx); this._textY += parseFloat(dy); return g; }, 'path': function (xmlNode, parentGroup) { var d = xmlNode.getAttribute('d') || ''; var path = createFromString(d); inheritStyle(parentGroup, path); parseAttributes(xmlNode, path, this._defsUsePending, false, false); path.silent = true; return path; } }; })(); return SVGParser; }()); var paintServerParsers = { '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 graphic_LinearGradient(x1, y1, x2, y2); parsePaintServerUnit(xmlNode, gradient); parseGradientColorStops(xmlNode, gradient); return gradient; }, 'radialgradient': function (xmlNode) { var cx = parseInt(xmlNode.getAttribute('cx') || '0', 10); var cy = parseInt(xmlNode.getAttribute('cy') || '0', 10); var r = parseInt(xmlNode.getAttribute('r') || '0', 10); var gradient = new graphic_RadialGradient(cx, cy, r); parsePaintServerUnit(xmlNode, gradient); parseGradientColorStops(xmlNode, gradient); return gradient; } }; function parsePaintServerUnit(xmlNode, gradient) { var gradientUnits = xmlNode.getAttribute('gradientUnits'); if (gradientUnits === 'userSpaceOnUse') { gradient.global = true; } } function parseGradientColorStops(xmlNode, gradient) { var stop = xmlNode.firstChild; while (stop) { if (stop.nodeType === 1 && stop.nodeName.toLocaleLowerCase() === 'stop') { var offsetStr = stop.getAttribute('offset'); var offset = void 0; if (offsetStr && offsetStr.indexOf('%') > 0) { offset = parseInt(offsetStr, 10) / 100; } else if (offsetStr) { offset = parseFloat(offsetStr); } else { offset = 0; } var styleVals = {}; parseInlineStyle(stop, styleVals, styleVals); var stopColor = styleVals.stopColor || stop.getAttribute('stop-color') || '#000000'; gradient.colorStops.push({ offset: offset, color: stopColor }); } stop = stop.nextSibling; } } function inheritStyle(parent, child) { if (parent && parent.__inheritedStyle) { if (!child.__inheritedStyle) { child.__inheritedStyle = {}; } Object(core_util["defaults"])(child.__inheritedStyle, parent.__inheritedStyle); } } function parsePoints(pointsString) { var list = splitNumberSequence(pointsString); 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; } function parseAttributes(xmlNode, el, defsUsePending, onlyInlineStyle, isTextGroup) { var disp = el; var inheritedStyle = disp.__inheritedStyle = disp.__inheritedStyle || {}; var selfStyle = {}; if (xmlNode.nodeType === 1) { parseTransformAttribute(xmlNode, el); parseInlineStyle(xmlNode, inheritedStyle, selfStyle); if (!onlyInlineStyle) { parseAttributeStyle(xmlNode, inheritedStyle, selfStyle); } } disp.style = disp.style || {}; if (inheritedStyle.fill != null) { disp.style.fill = getFillStrokeStyle(disp, 'fill', inheritedStyle.fill, defsUsePending); } if (inheritedStyle.stroke != null) { disp.style.stroke = getFillStrokeStyle(disp, 'stroke', inheritedStyle.stroke, defsUsePending); } Object(core_util["each"])([ 'lineWidth', 'opacity', 'fillOpacity', 'strokeOpacity', 'miterLimit', 'fontSize' ], function (propName) { if (inheritedStyle[propName] != null) { disp.style[propName] = parseFloat(inheritedStyle[propName]); } }); Object(core_util["each"])([ 'lineDashOffset', 'lineCap', 'lineJoin', 'fontWeight', 'fontFamily', 'fontStyle', 'textAlign' ], function (propName) { if (inheritedStyle[propName] != null) { disp.style[propName] = inheritedStyle[propName]; } }); if (isTextGroup) { disp.__selfStyle = selfStyle; } if (inheritedStyle.lineDash) { disp.style.lineDash = Object(core_util["map"])(splitNumberSequence(inheritedStyle.lineDash), function (str) { return parseFloat(str); }); } if (inheritedStyle.visibility === 'hidden' || inheritedStyle.visibility === 'collapse') { disp.invisible = true; } if (inheritedStyle.display === 'none') { disp.ignore = true; } } function applyTextAlignment(text, parentGroup) { var parentSelfStyle = parentGroup.__selfStyle; if (parentSelfStyle) { var textBaseline = parentSelfStyle.textBaseline; var zrTextBaseline = textBaseline; if (!textBaseline || textBaseline === 'auto') { zrTextBaseline = 'alphabetic'; } else if (textBaseline === 'baseline') { zrTextBaseline = 'alphabetic'; } else if (textBaseline === 'before-edge' || textBaseline === 'text-before-edge') { zrTextBaseline = 'top'; } else if (textBaseline === 'after-edge' || textBaseline === 'text-after-edge') { zrTextBaseline = 'bottom'; } else if (textBaseline === 'central' || textBaseline === 'mathematical') { zrTextBaseline = 'middle'; } text.style.textBaseline = zrTextBaseline; } var parentInheritedStyle = parentGroup.__inheritedStyle; if (parentInheritedStyle) { var textAlign = parentInheritedStyle.textAlign; var zrTextAlign = textAlign; if (textAlign) { if (textAlign === 'middle') { zrTextAlign = 'center'; } text.style.textAlign = zrTextAlign; } } } var urlRegex = /^url\(\s*#(.*?)\)/; function getFillStrokeStyle(el, method, str, defsUsePending) { var urlMatch = str && str.match(urlRegex); if (urlMatch) { var url = Object(core_util["trim"])(urlMatch[1]); defsUsePending.push([el, method, url]); return; } if (str === 'none') { str = null; } return str; } function applyDefs(defs, defsUsePending) { for (var i = 0; i < defsUsePending.length; i++) { var item = defsUsePending[i]; item[0].style[item[1]] = defs[item[2]]; } } var parseSVG_numberReg = /-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g; function splitNumberSequence(rawStr) { return rawStr.match(parseSVG_numberReg) || []; } var transformRegex = /(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.eE,]*)\)/g; var DEGREE_TO_ANGLE = Math.PI / 180; function parseTransformAttribute(xmlNode, node) { var transform = xmlNode.getAttribute('transform'); if (transform) { transform = transform.replace(/,/g, ' '); var transformOps_1 = []; var mt = null; transform.replace(transformRegex, function (str, type, value) { transformOps_1.push(type, value); return ''; }); for (var i = transformOps_1.length - 1; i > 0; i -= 2) { var value = transformOps_1[i]; var type = transformOps_1[i - 1]; var valueArr = splitNumberSequence(value); mt = mt || matrix_create(); switch (type) { case 'translate': matrix_translate(mt, mt, [parseFloat(valueArr[0]), parseFloat(valueArr[1] || '0')]); break; case 'scale': matrix_scale(mt, mt, [parseFloat(valueArr[0]), parseFloat(valueArr[1] || valueArr[0])]); break; case 'rotate': matrix_rotate(mt, mt, -parseFloat(valueArr[0]) * DEGREE_TO_ANGLE, [ parseFloat(valueArr[1] || '0'), parseFloat(valueArr[2] || '0') ]); break; case 'skewX': var sx = Math.tan(parseFloat(valueArr[0]) * DEGREE_TO_ANGLE); matrix_mul(mt, [1, 0, sx, 1, 0, 0], mt); break; case 'skewY': var sy = Math.tan(parseFloat(valueArr[0]) * DEGREE_TO_ANGLE); matrix_mul(mt, [1, sy, 0, 1, 0, 0], mt); break; case 'matrix': mt[0] = parseFloat(valueArr[0]); mt[1] = parseFloat(valueArr[1]); mt[2] = parseFloat(valueArr[2]); mt[3] = parseFloat(valueArr[3]); mt[4] = parseFloat(valueArr[4]); mt[5] = parseFloat(valueArr[5]); break; } } node.setLocalTransform(mt); } } var styleRegex = /([^\s:;]+)\s*:\s*([^:;]+)/g; function parseInlineStyle(xmlNode, inheritableStyleResult, selfStyleResult) { var style = xmlNode.getAttribute('style'); if (!style) { return; } styleRegex.lastIndex = 0; var styleRegResult; while ((styleRegResult = styleRegex.exec(style)) != null) { var svgStlAttr = styleRegResult[1]; var zrInheritableStlAttr = Object(core_util["hasOwn"])(INHERITABLE_STYLE_ATTRIBUTES_MAP, svgStlAttr) ? INHERITABLE_STYLE_ATTRIBUTES_MAP[svgStlAttr] : null; if (zrInheritableStlAttr) { inheritableStyleResult[zrInheritableStlAttr] = styleRegResult[2]; } var zrSelfStlAttr = Object(core_util["hasOwn"])(SELF_STYLE_ATTRIBUTES_MAP, svgStlAttr) ? SELF_STYLE_ATTRIBUTES_MAP[svgStlAttr] : null; if (zrSelfStlAttr) { selfStyleResult[zrSelfStlAttr] = styleRegResult[2]; } } } function parseAttributeStyle(xmlNode, inheritableStyleResult, selfStyleResult) { for (var i = 0; i < INHERITABLE_STYLE_ATTRIBUTES_MAP_KEYS.length; i++) { var svgAttrName = INHERITABLE_STYLE_ATTRIBUTES_MAP_KEYS[i]; var attrValue = xmlNode.getAttribute(svgAttrName); if (attrValue != null) { inheritableStyleResult[INHERITABLE_STYLE_ATTRIBUTES_MAP[svgAttrName]] = attrValue; } } for (var i = 0; i < SELF_STYLE_ATTRIBUTES_MAP_KEYS.length; i++) { var svgAttrName = SELF_STYLE_ATTRIBUTES_MAP_KEYS[i]; var attrValue = xmlNode.getAttribute(svgAttrName); if (attrValue != null) { selfStyleResult[SELF_STYLE_ATTRIBUTES_MAP[svgAttrName]] = attrValue; } } } function makeViewBoxTransform(viewBoxRect, boundingRect) { var scaleX = boundingRect.width / viewBoxRect.width; var scaleY = boundingRect.height / viewBoxRect.height; var scale = Math.min(scaleX, scaleY); return { scale: scale, x: -(viewBoxRect.x + viewBoxRect.width / 2) * scale + (boundingRect.x + boundingRect.width / 2), y: -(viewBoxRect.y + viewBoxRect.height / 2) * scale + (boundingRect.y + boundingRect.height / 2) }; } function parseSVG(xml, opt) { var parser = new parseSVG_SVGParser(); return parser.parse(xml, opt); } // CONCATENATED MODULE: ./node_modules/echarts/lib/coord/geo/GeoSVGResource.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ /** * "region available" means that: enable users to set attribute `name="xxx"` on those tags * to make it be a region. * 1. region styles and its label styles can be defined in echarts opton: * ```js * geo: { * regions: [{ * name: 'xxx', * itemStyle: { ... }, * label: { ... } * }, { * ... * }, * ...] * }; * ``` * 2. name can be duplicated in different SVG tag. All of the tags with the same name share * a region option. For exampel if there are two representing two lung lobes. They have * no common parents but both of them need to display label "lung" inside. */ var REGION_AVAILABLE_SVG_TAG_MAP = Object(core_util["createHashMap"])(['rect', 'circle', 'line', 'ellipse', 'polygon', 'polyline', 'path', // are also enabled because some SVG might paint text itself, // but still need to trigger events or tooltip. 'text', 'tspan', // is also enabled because this case: if multiple tags share one name // and need label displayed, every tags will display the name, which is not // expected. So we can put them into a . Thereby only one label // displayed and located based on the bounding rect of the . 'g']); var GeoSVGResource_GeoSVGResource = /** @class */function () { function GeoSVGResource(mapName, svg) { this.type = 'geoSVG'; // All used graphics. key: hostKey, value: root this._usedGraphicMap = Object(core_util["createHashMap"])(); // All unused graphics. this._freedGraphics = []; this._mapName = mapName; // Only perform parse to XML object here, which might be time // consiming for large SVG. // Although convert XML to zrender element is also time consiming, // if we do it here, the clone of zrender elements has to be // required. So we do it once for each geo instance, util real // performance issues call for optimizing it. this._parsedXML = parseXML(svg); } GeoSVGResource.prototype.load = function /* nameMap: NameMap */ () { // In the "load" stage, graphic need to be built to // get boundingRect for geo coordinate system. var firstGraphic = this._firstGraphic; // Create the return data structure only when first graphic created. // Because they will be used in geo coordinate system update stage, // and `regions` will be mounted at `geo` coordinate system, // in which there is no "view" info, so that it should better not to // make references to graphic elements. if (!firstGraphic) { firstGraphic = this._firstGraphic = this._buildGraphic(this._parsedXML); this._freedGraphics.push(firstGraphic); this._boundingRect = this._firstGraphic.boundingRect.clone(); // PENDING: `nameMap` will not be supported until some real requirement come. // if (nameMap) { // named = applyNameMap(named, nameMap); // } var _a = createRegions(firstGraphic.named), regions = _a.regions, regionsMap = _a.regionsMap; this._regions = regions; this._regionsMap = regionsMap; } return { boundingRect: this._boundingRect, regions: this._regions, regionsMap: this._regionsMap }; }; GeoSVGResource.prototype._buildGraphic = function (svgXML) { var result; var rootFromParse; try { result = svgXML && parseSVG(svgXML, { ignoreViewBox: true, ignoreRootClip: true }) || {}; rootFromParse = result.root; Object(core_util["assert"])(rootFromParse != null); } catch (e) { throw new Error('Invalid svg format\n' + e.message); } // Note: we keep the covenant that the root has no transform. So always add an extra root. var root = new graphic_Group(); root.add(rootFromParse); root.isGeoSVGGraphicRoot = true; // [THE_RULE_OF_VIEWPORT_AND_VIEWBOX] // // Consider: `` // - the `width/height` we call it `svgWidth/svgHeight` for short. // - `(0, 0, svgWidth, svgHeight)` defines the viewport of the SVG, or say, // "viewport boundingRect", or `boundingRect` for short. // - `viewBox` defines the transform from the real content ot the viewport. // `viewBox` has the same unit as the content of SVG. // If `viewBox` exists, a transform is defined, so the unit of `svgWidth/svgHeight` become // different from the content of SVG. Otherwise, they are the same. // // If both `svgWidth/svgHeight/viewBox` are specified in a SVG file, the transform rule will be: // 0. `boundingRect` is `(0, 0, svgWidth, svgHeight)`. Set it to Geo['_rect'] (View['_rect']). // 1. Make a transform from `viewBox` to `boundingRect`. // Note: only support `preserveAspectRatio 'xMidYMid'` here. That is, this transform will preserve // the aspect ratio. // 2. Make a transform from boundingRect to Geo['_viewRect'] (View['_viewRect']) // (`Geo`/`View` will do this job). // Note: this transform might not preserve aspect radio, which depending on how users specify // viewRect in echarts option (e.g., `geo.left/top/width/height` will not preserve aspect ratio, // but `geo.layoutCenter/layoutSize` will preserve aspect ratio). // // If `svgWidth/svgHeight` not specified, we use `viewBox` as the `boundingRect` to make the SVG // layout look good. // // If neither `svgWidth/svgHeight` nor `viewBox` are not specified, we calculate the boundingRect // of the SVG content and use them to make SVG layout look good. var svgWidth = result.width; var svgHeight = result.height; var viewBoxRect = result.viewBoxRect; var boundingRect = this._boundingRect; if (!boundingRect) { var bRectX = void 0; var bRectY = void 0; var bRectWidth = void 0; var bRectHeight = void 0; if (svgWidth != null) { bRectX = 0; bRectWidth = svgWidth; } else if (viewBoxRect) { bRectX = viewBoxRect.x; bRectWidth = viewBoxRect.width; } if (svgHeight != null) { bRectY = 0; bRectHeight = svgHeight; } else if (viewBoxRect) { bRectY = viewBoxRect.y; bRectHeight = viewBoxRect.height; } // If both viewBox and svgWidth/svgHeight not specified, // we have to determine how to layout those element to make them look good. if (bRectX == null || bRectY == null) { var calculatedBoundingRect = rootFromParse.getBoundingRect(); if (bRectX == null) { bRectX = calculatedBoundingRect.x; bRectWidth = calculatedBoundingRect.width; } if (bRectY == null) { bRectY = calculatedBoundingRect.y; bRectHeight = calculatedBoundingRect.height; } } boundingRect = this._boundingRect = new core_BoundingRect(bRectX, bRectY, bRectWidth, bRectHeight); } if (viewBoxRect) { var viewBoxTransform = makeViewBoxTransform(viewBoxRect, boundingRect); // Only support `preserveAspectRatio 'xMidYMid'` rootFromParse.scaleX = rootFromParse.scaleY = viewBoxTransform.scale; rootFromParse.x = viewBoxTransform.x; rootFromParse.y = viewBoxTransform.y; } // SVG needs to clip based on `viewBox`. And some SVG files really rely on this feature. // They do not strictly confine all of the content inside a display rect, but deliberately // use a `viewBox` to define a displayable rect. // PENDING: // The drawback of the `setClipPath` here is: the region label (genereted by echarts) near the // edge might also be clipped, because region labels are put as `textContent` of the SVG path. root.setClipPath(new shape_Rect({ shape: boundingRect.plain() })); var named = []; Object(core_util["each"])(result.named, function (namedItem) { if (REGION_AVAILABLE_SVG_TAG_MAP.get(namedItem.svgNodeTagLower) != null) { named.push(namedItem); setSilent(namedItem.el); } }); return { root: root, boundingRect: boundingRect, named: named }; }; /** * Consider: * (1) One graphic element can not be shared by different `geoView` running simultaneously. * Notice, also need to consider multiple echarts instances share a `mapRecord`. * (2) Converting SVG to graphic elements is time consuming. * (3) In the current architecture, `load` should be called frequently to get boundingRect, * and it is called without view info. * So we maintain graphic elements in this module, and enables `view` to use/return these * graphics from/to the pool with it's uid. */ GeoSVGResource.prototype.useGraphic = function (hostKey /* , nameMap: NameMap */) { var usedRootMap = this._usedGraphicMap; var svgGraphic = usedRootMap.get(hostKey); if (svgGraphic) { return svgGraphic; } svgGraphic = this._freedGraphics.pop() // use the first boundingRect to avoid duplicated boundingRect calculation. || this._buildGraphic(this._parsedXML); usedRootMap.set(hostKey, svgGraphic); // PENDING: `nameMap` will not be supported until some real requirement come. // `nameMap` can only be obtained from echarts option. // The original `named` must not be modified. // if (nameMap) { // svgGraphic = extend({}, svgGraphic); // svgGraphic.named = applyNameMap(svgGraphic.named, nameMap); // } return svgGraphic; }; GeoSVGResource.prototype.freeGraphic = function (hostKey) { var usedRootMap = this._usedGraphicMap; var svgGraphic = usedRootMap.get(hostKey); if (svgGraphic) { usedRootMap.removeKey(hostKey); this._freedGraphics.push(svgGraphic); } }; return GeoSVGResource; }(); function setSilent(el) { // Only named element has silent: false, other elements should // act as background and has no user interaction. el.silent = false; // text|tspan will be converted to group. if (el.isGroup) { el.traverse(function (child) { child.silent = false; }); } } function createRegions(named) { var regions = []; var regionsMap = Object(core_util["createHashMap"])(); // Create resions only for the first graphic. Object(core_util["each"])(named, function (namedItem) { // Region has feature to calculate center for tooltip or other features. // If there is a , the center should be the center of the // bounding rect of the g. if (namedItem.namedFrom != null) { return; } var region = new Region_GeoSVGRegion(namedItem.name, namedItem.el); // PENDING: if `nameMap` supported, this region can not be mounted on // `this`, but can only be created each time `load()` called. regions.push(region); // PENDING: if multiple tag named with the same name, only one will be // found by `_regionsMap`. `_regionsMap` is used to find a coordinate // by name. We use `region.getCenter()` as the coordinate. regionsMap.set(namedItem.name, region); }); return { regions: regions, regionsMap: regionsMap }; } // PENDING: `nameMap` will not be supported until some real requirement come. // /** // * Use the alias in geoNameMap. // * The input `named` must not be modified. // */ // function applyNameMap( // named: GeoSVGGraphicRecord['named'], // nameMap: NameMap // ): GeoSVGGraphicRecord['named'] { // const result = [] as GeoSVGGraphicRecord['named']; // for (let i = 0; i < named.length; i++) { // let regionGraphic = named[i]; // const name = regionGraphic.name; // if (nameMap && nameMap.hasOwnProperty(name)) { // regionGraphic = extend({}, regionGraphic); // regionGraphic.name = name; // } // result.push(regionGraphic); // } // return result; // } // CONCATENATED MODULE: ./node_modules/echarts/lib/coord/geo/fix/nanhai.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 geoCoord = [126, 25]; var nanhaiName = '南海诸岛'; var nanhai_points = [[[0, 3.5], [7, 11.2], [15, 11.9], [30, 7], [42, 0.7], [52, 0.7], [56, 7.7], [59, 0.7], [64, 0.7], [64, 0], [5, 0], [0, 3.5]], [[13, 16.1], [19, 14.7], [16, 21.7], [11, 23.1], [13, 16.1]], [[12, 32.2], [14, 38.5], [15, 38.5], [13, 32.2], [12, 32.2]], [[16, 47.6], [12, 53.2], [13, 53.2], [18, 47.6], [16, 47.6]], [[6, 64.4], [8, 70], [9, 70], [8, 64.4], [6, 64.4]], [[23, 82.6], [29, 79.8], [30, 79.8], [25, 82.6], [23, 82.6]], [[37, 70.7], [43, 62.3], [44, 62.3], [39, 70.7], [37, 70.7]], [[48, 51.1], [51, 45.5], [53, 45.5], [50, 51.1], [48, 51.1]], [[51, 35], [51, 28.7], [53, 28.7], [53, 35], [51, 35]], [[52, 22.4], [55, 17.5], [56, 17.5], [53, 22.4], [52, 22.4]], [[58, 12.6], [62, 7], [63, 7], [60, 12.6], [58, 12.6]], [[0, 3.5], [0, 93.1], [64, 93.1], [64, 0], [63, 0], [63, 92.4], [1, 92.4], [1, 3.5], [0, 3.5]]]; for (var nanhai_i = 0; nanhai_i < nanhai_points.length; nanhai_i++) { for (var nanhai_k = 0; nanhai_k < nanhai_points[nanhai_i].length; nanhai_k++) { nanhai_points[nanhai_i][nanhai_k][0] /= 10.5; nanhai_points[nanhai_i][nanhai_k][1] /= -10.5 / 0.75; nanhai_points[nanhai_i][nanhai_k][0] += geoCoord[0]; nanhai_points[nanhai_i][nanhai_k][1] += geoCoord[1]; } } function fixNanhai(mapType, regions) { if (mapType === 'china') { for (var i = 0; i < regions.length; i++) { // Already exists. if (regions[i].name === nanhaiName) { return; } } regions.push(new Region_GeoJSONRegion(nanhaiName, core_util["map"](nanhai_points, function (exterior) { return { type: 'polygon', exterior: exterior }; }), geoCoord)); } } // CONCATENATED MODULE: ./node_modules/echarts/lib/coord/geo/fix/textCoord.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 coordsOffsetMap = { '南海诸岛': [32, 80], // 全国 '广东': [0, -10], '香港': [10, 5], '澳门': [-10, 10], // '北京': [-10, 0], '天津': [5, 5] }; function fixTextCoords(mapType, region) { if (mapType === 'china') { var coordFix = coordsOffsetMap[region.name]; if (coordFix) { var cp = region.getCenter(); cp[0] += coordFix[0] / 10.5; cp[1] += -coordFix[1] / (10.5 / 0.75); region.setCenter(cp); } } } // CONCATENATED MODULE: ./node_modules/echarts/lib/coord/geo/fix/diaoyuIsland.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 钓鱼岛 // let Region = require('../Region'); // let zrUtil = require('zrender/lib/core/util'); // let geoCoord = [126, 25]; var diaoyuIsland_points = [[[123.45165252685547, 25.73527164402261], [123.49731445312499, 25.73527164402261], [123.49731445312499, 25.750734064600884], [123.45165252685547, 25.750734064600884], [123.45165252685547, 25.73527164402261]]]; function fixDiaoyuIsland(mapType, region) { if (mapType === 'china' && region.name === '台湾') { region.geometries.push({ type: 'polygon', exterior: diaoyuIsland_points[0] }); } } // CONCATENATED MODULE: ./node_modules/echarts/lib/coord/geo/GeoJSONResource.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ // Built-in GEO fixer. var DEFAULT_NAME_PROPERTY = 'name'; var GeoJSONResource_GeoJSONResource = /** @class */function () { function GeoJSONResource(mapName, geoJSON, specialAreas) { this.type = 'geoJSON'; this._parsedMap = Object(core_util["createHashMap"])(); this._mapName = mapName; this._specialAreas = specialAreas; // PENDING: delay the parse to the first usage to rapid up the FMP? this._geoJSON = parseInput(geoJSON); } /** * @param nameMap can be null/undefined * @param nameProperty can be null/undefined */ GeoJSONResource.prototype.load = function (nameMap, nameProperty) { nameProperty = nameProperty || DEFAULT_NAME_PROPERTY; var parsed = this._parsedMap.get(nameProperty); if (!parsed) { var rawRegions = this._parseToRegions(nameProperty); parsed = this._parsedMap.set(nameProperty, { regions: rawRegions, boundingRect: calculateBoundingRect(rawRegions) }); } var regionsMap = Object(core_util["createHashMap"])(); var finalRegions = []; Object(core_util["each"])(parsed.regions, function (region) { var regionName = region.name; // Try use the alias in geoNameMap if (nameMap && Object(core_util["hasOwn"])(nameMap, regionName)) { region = region.cloneShallow(regionName = nameMap[regionName]); } finalRegions.push(region); regionsMap.set(regionName, region); }); return { regions: finalRegions, boundingRect: parsed.boundingRect || new core_BoundingRect(0, 0, 0, 0), regionsMap: regionsMap }; }; GeoJSONResource.prototype._parseToRegions = function (nameProperty) { var mapName = this._mapName; var geoJSON = this._geoJSON; var rawRegions; // https://jsperf.com/try-catch-performance-overhead try { rawRegions = geoJSON ? parseGeoJSON(geoJSON, nameProperty) : []; } catch (e) { throw new Error('Invalid geoJson format\n' + e.message); } fixNanhai(mapName, rawRegions); Object(core_util["each"])(rawRegions, function (region) { var regionName = region.name; fixTextCoords(mapName, region); fixDiaoyuIsland(mapName, region); // Some area like Alaska in USA map needs to be tansformed // to look better var specialArea = this._specialAreas && this._specialAreas[regionName]; if (specialArea) { region.transformTo(specialArea.left, specialArea.top, specialArea.width, specialArea.height); } }, this); return rawRegions; }; /** * Only for exporting to users. * **MUST NOT** used internally. */ GeoJSONResource.prototype.getMapForUser = function () { return { // For backward compatibility, use geoJson // PENDING: it has been returning them without clone. // do we need to avoid outsite modification? geoJson: this._geoJSON, geoJSON: this._geoJSON, specialAreas: this._specialAreas }; }; return GeoJSONResource; }(); function calculateBoundingRect(regions) { var rect; for (var i = 0; i < regions.length; i++) { var regionRect = regions[i].getBoundingRect(); rect = rect || regionRect.clone(); rect.union(regionRect); } return rect; } function parseInput(source) { return !Object(core_util["isString"])(source) ? source : typeof JSON !== 'undefined' && JSON.parse ? JSON.parse(source) : new Function('return (' + source + ');')(); } // CONCATENATED MODULE: ./node_modules/echarts/lib/coord/geo/geoSourceManager.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 geoSourceManager_storage = Object(core_util["createHashMap"])(); /* harmony default export */ var geoSourceManager = ({ /** * Compatible with previous `echarts.registerMap`. * * @usage * ```js * * echarts.registerMap('USA', geoJson, specialAreas); * * echarts.registerMap('USA', { * geoJson: geoJson, * specialAreas: {...} * }); * echarts.registerMap('USA', { * geoJSON: geoJson, * specialAreas: {...} * }); * * echarts.registerMap('airport', { * svg: svg * } * ``` * * Note: * Do not support that register multiple geoJSON or SVG * one map name. Because different geoJSON and SVG have * different unit. It's not easy to make sure how those * units are mapping/normalize. * If intending to use multiple geoJSON or SVG, we can * use multiple geo coordinate system. */ registerMap: function (mapName, rawDef, rawSpecialAreas) { if (rawDef.svg) { var resource = new GeoSVGResource_GeoSVGResource(mapName, rawDef.svg); geoSourceManager_storage.set(mapName, resource); } else { // Recommend: // echarts.registerMap('eu', { geoJSON: xxx, specialAreas: xxx }); // Backward compatibility: // echarts.registerMap('eu', geoJSON, specialAreas); // echarts.registerMap('eu', { geoJson: xxx, specialAreas: xxx }); var geoJSON = rawDef.geoJson || rawDef.geoJSON; if (geoJSON && !rawDef.features) { rawSpecialAreas = rawDef.specialAreas; } else { geoJSON = rawDef; } var resource = new GeoJSONResource_GeoJSONResource(mapName, geoJSON, rawSpecialAreas); geoSourceManager_storage.set(mapName, resource); } }, getGeoResource: function (mapName) { return geoSourceManager_storage.get(mapName); }, /** * Only for exporting to users. * **MUST NOT** used internally. */ getMapForUser: function (mapName) { var resource = geoSourceManager_storage.get(mapName); // Do not support return SVG until some real requirement come. return resource && resource.type === 'geoJSON' && resource.getMapForUser(); }, load: function (mapName, nameMap, nameProperty) { var resource = geoSourceManager_storage.get(mapName); if (!resource) { if (false) { console.error('Map ' + mapName + ' not exists. The GeoJSON of the map must be provided.'); } return; } return resource.load(nameMap, nameProperty); } }); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/helper/MapDraw.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ /** * Only these tags enable use `itemStyle` if they are named in SVG. * Other tags like might not suitable for `itemStyle`. * They will not be considered to be styled until some requirements come. */ var OPTION_STYLE_ENABLED_TAGS = ['rect', 'circle', 'line', 'ellipse', 'polygon', 'polyline', 'path']; var OPTION_STYLE_ENABLED_TAG_MAP = core_util["createHashMap"](OPTION_STYLE_ENABLED_TAGS); var STATE_TRIGGER_TAG_MAP = core_util["createHashMap"](OPTION_STYLE_ENABLED_TAGS.concat(['g'])); var LABEL_HOST_MAP = core_util["createHashMap"](OPTION_STYLE_ENABLED_TAGS.concat(['g'])); var mapLabelRaw = makeInner(); function getFixedItemStyle(model) { var itemStyle = model.getItemStyle(); var areaColor = model.get('areaColor'); // If user want the color not to be changed when hover, // they should both set areaColor and color to be null. if (areaColor != null) { itemStyle.fill = areaColor; } return itemStyle; } // Only stroke can be used for line. // Using fill in style if stroke not exits. // TODO Not sure yet. Perhaps a separate `lineStyle`? function fixLineStyle(styleHost) { var style = styleHost.style; if (style) { style.stroke = style.stroke || style.fill; style.fill = null; } } var MapDraw_MapDraw = /** @class */function () { function MapDraw(api) { var group = new graphic_Group(); this.uid = getUID('ec_map_draw'); this._controller = new helper_RoamController(api.getZr()); this._controllerHost = { target: group }; this.group = group; group.add(this._regionsGroup = new graphic_Group()); group.add(this._svgGroup = new graphic_Group()); } MapDraw.prototype.draw = function (mapOrGeoModel, ecModel, api, fromView, payload) { var isGeo = mapOrGeoModel.mainType === 'geo'; // Map series has data. GEO model that controlled by map series // will be assigned with map data. Other GEO model has no data. var data = mapOrGeoModel.getData && mapOrGeoModel.getData(); isGeo && ecModel.eachComponent({ mainType: 'series', subType: 'map' }, function (mapSeries) { if (!data && mapSeries.getHostGeoModel() === mapOrGeoModel) { data = mapSeries.getData(); } }); var geo = mapOrGeoModel.coordinateSystem; var regionsGroup = this._regionsGroup; var group = this.group; var transformInfo = geo.getTransformInfo(); var transformInfoRaw = transformInfo.raw; var transformInfoRoam = transformInfo.roam; // No animation when first draw or in action var isFirstDraw = !regionsGroup.childAt(0) || payload; if (isFirstDraw) { group.x = transformInfoRoam.x; group.y = transformInfoRoam.y; group.scaleX = transformInfoRoam.scaleX; group.scaleY = transformInfoRoam.scaleY; group.dirty(); } else { updateProps(group, transformInfoRoam, mapOrGeoModel); } var isVisualEncodedByVisualMap = data && data.getVisual('visualMeta') && data.getVisual('visualMeta').length > 0; var viewBuildCtx = { api: api, geo: geo, mapOrGeoModel: mapOrGeoModel, data: data, isVisualEncodedByVisualMap: isVisualEncodedByVisualMap, isGeo: isGeo, transformInfoRaw: transformInfoRaw }; if (geo.resourceType === 'geoJSON') { this._buildGeoJSON(viewBuildCtx); } else if (geo.resourceType === 'geoSVG') { this._buildSVG(viewBuildCtx); } this._updateController(mapOrGeoModel, ecModel, api); this._updateMapSelectHandler(mapOrGeoModel, regionsGroup, api, fromView); }; MapDraw.prototype._buildGeoJSON = function (viewBuildCtx) { var regionsGroupByName = this._regionsGroupByName = core_util["createHashMap"](); var regionsInfoByName = core_util["createHashMap"](); var regionsGroup = this._regionsGroup; var transformInfoRaw = viewBuildCtx.transformInfoRaw; var mapOrGeoModel = viewBuildCtx.mapOrGeoModel; var data = viewBuildCtx.data; var projection = viewBuildCtx.geo.projection; var projectionStream = projection && projection.stream; function transformPoint(point, project) { if (project) { // projection may return null point. point = project(point); } return point && [point[0] * transformInfoRaw.scaleX + transformInfoRaw.x, point[1] * transformInfoRaw.scaleY + transformInfoRaw.y]; } ; function transformPolygonPoints(inPoints) { var outPoints = []; // If projectionStream is provided. Use it instead of single point project. var project = !projectionStream && projection && projection.project; for (var i = 0; i < inPoints.length; ++i) { var newPt = transformPoint(inPoints[i], project); newPt && outPoints.push(newPt); } return outPoints; } function getPolyShape(points) { return { shape: { points: transformPolygonPoints(points) } }; } regionsGroup.removeAll(); // Only when the resource is GeoJSON, there is `geo.regions`. core_util["each"](viewBuildCtx.geo.regions, function (region) { var regionName = region.name; // Consider in GeoJson properties.name may be duplicated, for example, // there is multiple region named "United Kindom" or "France" (so many // colonies). And it is not appropriate to merge them in geo, which // will make them share the same label and bring trouble in label // location calculation. var regionGroup = regionsGroupByName.get(regionName); var _a = regionsInfoByName.get(regionName) || {}, dataIdx = _a.dataIdx, regionModel = _a.regionModel; if (!regionGroup) { regionGroup = regionsGroupByName.set(regionName, new graphic_Group()); regionsGroup.add(regionGroup); dataIdx = data ? data.indexOfName(regionName) : null; regionModel = viewBuildCtx.isGeo ? mapOrGeoModel.getRegionModel(regionName) : data ? data.getItemModel(dataIdx) : null; var silent = regionModel.get('silent', true); silent != null && (regionGroup.silent = silent); regionsInfoByName.set(regionName, { dataIdx: dataIdx, regionModel: regionModel }); } var polygonSubpaths = []; var polylineSubpaths = []; core_util["each"](region.geometries, function (geometry) { // Polygon and MultiPolygon if (geometry.type === 'polygon') { var polys = [geometry.exterior].concat(geometry.interiors || []); if (projectionStream) { polys = projectPolys(polys, projectionStream); } core_util["each"](polys, function (poly) { polygonSubpaths.push(new shape_Polygon(getPolyShape(poly))); }); } // LineString and MultiLineString else { var points = geometry.points; if (projectionStream) { points = projectPolys(points, projectionStream, true); } core_util["each"](points, function (points) { polylineSubpaths.push(new shape_Polyline(getPolyShape(points))); }); } }); var centerPt = transformPoint(region.getCenter(), projection && projection.project); function createCompoundPath(subpaths, isLine) { if (!subpaths.length) { return; } var compoundPath = new graphic_CompoundPath({ culling: true, segmentIgnoreThreshold: 1, shape: { paths: subpaths } }); regionGroup.add(compoundPath); applyOptionStyleForRegion(viewBuildCtx, compoundPath, dataIdx, regionModel); resetLabelForRegion(viewBuildCtx, compoundPath, regionName, regionModel, mapOrGeoModel, dataIdx, centerPt); if (isLine) { fixLineStyle(compoundPath); core_util["each"](compoundPath.states, fixLineStyle); } } createCompoundPath(polygonSubpaths); createCompoundPath(polylineSubpaths, true); }); // Ensure children have been added to `regionGroup` before calling them. regionsGroupByName.each(function (regionGroup, regionName) { var _a = regionsInfoByName.get(regionName), dataIdx = _a.dataIdx, regionModel = _a.regionModel; resetEventTriggerForRegion(viewBuildCtx, regionGroup, regionName, regionModel, mapOrGeoModel, dataIdx); resetTooltipForRegion(viewBuildCtx, regionGroup, regionName, regionModel, mapOrGeoModel); resetStateTriggerForRegion(viewBuildCtx, regionGroup, regionName, regionModel, mapOrGeoModel); }, this); }; MapDraw.prototype._buildSVG = function (viewBuildCtx) { var mapName = viewBuildCtx.geo.map; var transformInfoRaw = viewBuildCtx.transformInfoRaw; this._svgGroup.x = transformInfoRaw.x; this._svgGroup.y = transformInfoRaw.y; this._svgGroup.scaleX = transformInfoRaw.scaleX; this._svgGroup.scaleY = transformInfoRaw.scaleY; if (this._svgResourceChanged(mapName)) { this._freeSVG(); this._useSVG(mapName); } var svgDispatcherMap = this._svgDispatcherMap = core_util["createHashMap"](); var focusSelf = false; core_util["each"](this._svgGraphicRecord.named, function (namedItem) { // Note that we also allow different elements have the same name. // For example, a glyph of a city and the label of the city have // the same name and their tooltip info can be defined in a single // region option. var regionName = namedItem.name; var mapOrGeoModel = viewBuildCtx.mapOrGeoModel; var data = viewBuildCtx.data; var svgNodeTagLower = namedItem.svgNodeTagLower; var el = namedItem.el; var dataIdx = data ? data.indexOfName(regionName) : null; var regionModel = mapOrGeoModel.getRegionModel(regionName); if (OPTION_STYLE_ENABLED_TAG_MAP.get(svgNodeTagLower) != null && el instanceof graphic_Displayable) { applyOptionStyleForRegion(viewBuildCtx, el, dataIdx, regionModel); } if (el instanceof graphic_Displayable) { el.culling = true; } var silent = regionModel.get('silent', true); silent != null && (el.silent = silent); // We do not know how the SVG like so we'd better not to change z2. // Otherwise it might bring some unexpected result. For example, // an area hovered that make some inner city can not be clicked. el.z2EmphasisLift = 0; // If self named: if (!namedItem.namedFrom) { // label should batter to be displayed based on the center of // if it is named rather than displayed on each child. if (LABEL_HOST_MAP.get(svgNodeTagLower) != null) { resetLabelForRegion(viewBuildCtx, el, regionName, regionModel, mapOrGeoModel, dataIdx, null); } resetEventTriggerForRegion(viewBuildCtx, el, regionName, regionModel, mapOrGeoModel, dataIdx); resetTooltipForRegion(viewBuildCtx, el, regionName, regionModel, mapOrGeoModel); if (STATE_TRIGGER_TAG_MAP.get(svgNodeTagLower) != null) { var focus_1 = resetStateTriggerForRegion(viewBuildCtx, el, regionName, regionModel, mapOrGeoModel); if (focus_1 === 'self') { focusSelf = true; } var els = svgDispatcherMap.get(regionName) || svgDispatcherMap.set(regionName, []); els.push(el); } } }, this); this._enableBlurEntireSVG(focusSelf, viewBuildCtx); }; MapDraw.prototype._enableBlurEntireSVG = function (focusSelf, viewBuildCtx) { // It's a little complicated to support blurring the entire geoSVG in series-map. // So do not support it until some requirements come. // At present, in series-map, only regions can be blurred. if (focusSelf && viewBuildCtx.isGeo) { var blurStyle = viewBuildCtx.mapOrGeoModel.getModel(['blur', 'itemStyle']).getItemStyle(); // Only support `opacity` here. Because not sure that other props are suitable for // all of the elements generated by SVG (especially for Text/TSpan/Image/... ). var opacity_1 = blurStyle.opacity; this._svgGraphicRecord.root.traverse(function (el) { if (!el.isGroup) { // PENDING: clear those settings to SVG elements when `_freeSVG`. // (Currently it happen not to be needed.) setDefaultStateProxy(el); var style = el.ensureState('blur').style || {}; // Do not overwrite the region style that already set from region option. if (style.opacity == null && opacity_1 != null) { style.opacity = opacity_1; } // If `ensureState('blur').style = {}`, there will be default opacity. // Enable `stateTransition` (animation). el.ensureState('emphasis'); } }); } }; MapDraw.prototype.remove = function () { this._regionsGroup.removeAll(); this._regionsGroupByName = null; this._svgGroup.removeAll(); this._freeSVG(); this._controller.dispose(); this._controllerHost = null; }; MapDraw.prototype.findHighDownDispatchers = function (name, geoModel) { if (name == null) { return []; } var geo = geoModel.coordinateSystem; if (geo.resourceType === 'geoJSON') { var regionsGroupByName = this._regionsGroupByName; if (regionsGroupByName) { var regionGroup = regionsGroupByName.get(name); return regionGroup ? [regionGroup] : []; } } else if (geo.resourceType === 'geoSVG') { return this._svgDispatcherMap && this._svgDispatcherMap.get(name) || []; } }; MapDraw.prototype._svgResourceChanged = function (mapName) { return this._svgMapName !== mapName; }; MapDraw.prototype._useSVG = function (mapName) { var resource = geoSourceManager.getGeoResource(mapName); if (resource && resource.type === 'geoSVG') { var svgGraphic = resource.useGraphic(this.uid); this._svgGroup.add(svgGraphic.root); this._svgGraphicRecord = svgGraphic; this._svgMapName = mapName; } }; MapDraw.prototype._freeSVG = function () { var mapName = this._svgMapName; if (mapName == null) { return; } var resource = geoSourceManager.getGeoResource(mapName); if (resource && resource.type === 'geoSVG') { resource.freeGraphic(this.uid); } this._svgGraphicRecord = null; this._svgDispatcherMap = null; this._svgGroup.removeAll(); this._svgMapName = null; }; MapDraw.prototype._updateController = function (mapOrGeoModel, ecModel, api) { var geo = mapOrGeoModel.coordinateSystem; var controller = this._controller; var controllerHost = this._controllerHost; // @ts-ignore FIXME:TS controllerHost.zoomLimit = mapOrGeoModel.get('scaleLimit'); controllerHost.zoom = geo.getZoom(); // roamType is will be set default true if it is null // @ts-ignore FIXME:TS controller.enable(mapOrGeoModel.get('roam') || false); var mainType = mapOrGeoModel.mainType; function makeActionBase() { var action = { type: 'geoRoam', componentType: mainType }; action[mainType + 'Id'] = mapOrGeoModel.id; return action; } controller.off('pan').on('pan', function (e) { this._mouseDownFlag = false; updateViewOnPan(controllerHost, e.dx, e.dy); api.dispatchAction(core_util["extend"](makeActionBase(), { dx: e.dx, dy: e.dy, animation: { duration: 0 } })); }, this); controller.off('zoom').on('zoom', function (e) { this._mouseDownFlag = false; updateViewOnZoom(controllerHost, e.scale, e.originX, e.originY); api.dispatchAction(core_util["extend"](makeActionBase(), { totalZoom: controllerHost.zoom, zoom: e.scale, originX: e.originX, originY: e.originY, animation: { duration: 0 } })); }, this); controller.setPointerChecker(function (e, x, y) { return geo.containPoint([x, y]) && !onIrrelevantElement(e, api, mapOrGeoModel); }); }; /** * FIXME: this is a temporarily workaround. * When `geoRoam` the elements need to be reset in `MapView['render']`, because the props like * `ignore` might have been modified by `LabelManager`, and `LabelManager#addLabelsOfSeries` * will subsequently cache `defaultAttr` like `ignore`. If do not do this reset, the modified * props will have no chance to be restored. * Note: This reset should be after `clearStates` in `renderSeries` because `useStates` in * `renderSeries` will cache the modified `ignore` to `el._normalState`. * TODO: * Use clone/immutable in `LabelManager`? */ MapDraw.prototype.resetForLabelLayout = function () { this.group.traverse(function (el) { var label = el.getTextContent(); if (label) { label.ignore = mapLabelRaw(label).ignore; } }); }; MapDraw.prototype._updateMapSelectHandler = function (mapOrGeoModel, regionsGroup, api, fromView) { var mapDraw = this; regionsGroup.off('mousedown'); regionsGroup.off('click'); // @ts-ignore FIXME:TS resolve type conflict if (mapOrGeoModel.get('selectedMode')) { regionsGroup.on('mousedown', function () { mapDraw._mouseDownFlag = true; }); regionsGroup.on('click', function (e) { if (!mapDraw._mouseDownFlag) { return; } mapDraw._mouseDownFlag = false; }); } }; return MapDraw; }(); ; function applyOptionStyleForRegion(viewBuildCtx, el, dataIndex, regionModel) { // All of the path are using `itemStyle`, because // (1) Some SVG also use fill on polyline (The different between // polyline and polygon is "open" or "close" but not fill or not). // (2) For the common props like opacity, if some use itemStyle // and some use `lineStyle`, it might confuse users. // (3) Most SVG use , where can not detect whether to draw a "line" // or a filled shape, so use `itemStyle` for . var normalStyleModel = regionModel.getModel('itemStyle'); var emphasisStyleModel = regionModel.getModel(['emphasis', 'itemStyle']); var blurStyleModel = regionModel.getModel(['blur', 'itemStyle']); var selectStyleModel = regionModel.getModel(['select', 'itemStyle']); // NOTE: DON'T use 'style' in visual when drawing map. // This component is used for drawing underlying map for both geo component and map series. var normalStyle = getFixedItemStyle(normalStyleModel); var emphasisStyle = getFixedItemStyle(emphasisStyleModel); var selectStyle = getFixedItemStyle(selectStyleModel); var blurStyle = getFixedItemStyle(blurStyleModel); // Update the itemStyle if has data visual var data = viewBuildCtx.data; if (data) { // Only visual color of each item will be used. It can be encoded by visualMap // But visual color of series is used in symbol drawing // Visual color for each series is for the symbol draw var style = data.getItemVisual(dataIndex, 'style'); var decal = data.getItemVisual(dataIndex, 'decal'); if (viewBuildCtx.isVisualEncodedByVisualMap && style.fill) { normalStyle.fill = style.fill; } if (decal) { normalStyle.decal = createOrUpdatePatternFromDecal(decal, viewBuildCtx.api); } } // SVG text, tspan and image can be named but not supporeted // to be styled by region option yet. el.setStyle(normalStyle); el.style.strokeNoScale = true; el.ensureState('emphasis').style = emphasisStyle; el.ensureState('select').style = selectStyle; el.ensureState('blur').style = blurStyle; // Enable blur setDefaultStateProxy(el); } function resetLabelForRegion(viewBuildCtx, el, regionName, regionModel, mapOrGeoModel, // Exist only if `viewBuildCtx.data` exists. dataIdx, // If labelXY not provided, use `textConfig.position: 'inside'` labelXY) { var data = viewBuildCtx.data; var isGeo = viewBuildCtx.isGeo; var isDataNaN = data && isNaN(data.get(data.mapDimension('value'), dataIdx)); var itemLayout = data && data.getItemLayout(dataIdx); // In the following cases label will be drawn // 1. In map series and data value is NaN // 2. In geo component // 3. Region has no series legendIcon, which will be add a showLabel flag in mapSymbolLayout if (isGeo || isDataNaN || itemLayout && itemLayout.showLabel) { var query = !isGeo ? dataIdx : regionName; var labelFetcher = void 0; // Consider dataIdx not found. if (!data || dataIdx >= 0) { labelFetcher = mapOrGeoModel; } var specifiedTextOpt = labelXY ? { normal: { align: 'center', verticalAlign: 'middle' } } : null; // Caveat: must be called after `setDefaultStateProxy(el);` called. // because textContent will be assign with `el.stateProxy` inside. setLabelStyle(el, getLabelStatesModels(regionModel), { labelFetcher: labelFetcher, labelDataIndex: query, defaultText: regionName }, specifiedTextOpt); var textEl = el.getTextContent(); if (textEl) { mapLabelRaw(textEl).ignore = textEl.ignore; if (el.textConfig && labelXY) { // Compute a relative offset based on the el bounding rect. var rect = el.getBoundingRect().clone(); // Need to make sure the percent position base on the same rect in normal and // emphasis state. Otherwise if using boundingRect of el, but the emphasis state // has borderWidth (even 0.5px), the text position will be changed obviously // if the position is very big like ['1234%', '1345%']. el.textConfig.layoutRect = rect; el.textConfig.position = [(labelXY[0] - rect.x) / rect.width * 100 + '%', (labelXY[1] - rect.y) / rect.height * 100 + '%']; } } // PENDING: // If labelLayout is enabled (test/label-layout.html), el.dataIndex should be specified. // But el.dataIndex is also used to determine whether user event should be triggered, // where el.seriesIndex or el.dataModel must be specified. At present for a single el // there is not case that "only label layout enabled but user event disabled", so here // we depends `resetEventTriggerForRegion` to do the job of setting `el.dataIndex`. el.disableLabelAnimation = true; } else { el.removeTextContent(); el.removeTextConfig(); el.disableLabelAnimation = null; } } function resetEventTriggerForRegion(viewBuildCtx, eventTrigger, regionName, regionModel, mapOrGeoModel, // Exist only if `viewBuildCtx.data` exists. dataIdx) { // setItemGraphicEl, setHoverStyle after all polygons and labels // are added to the regionGroup if (viewBuildCtx.data) { // FIXME: when series-map use a SVG map, and there are duplicated name specified // on different SVG elements, after `data.setItemGraphicEl(...)`: // (1) all of them will be mounted with `dataIndex`, `seriesIndex`, so that tooltip // can be triggered only mouse hover. That's correct. // (2) only the last element will be kept in `data`, so that if trigger tooltip // by `dispatchAction`, only the last one can be found and triggered. That might be // not correct. We will fix it in future if anyone demanding that. viewBuildCtx.data.setItemGraphicEl(dataIdx, eventTrigger); } // series-map will not trigger "geoselectchange" no matter it is // based on a declared geo component. Because series-map will // trigger "selectchange". If it trigger both the two events, // If users call `chart.dispatchAction({type: 'toggleSelect'})`, // it not easy to also fire event "geoselectchanged". else { // Package custom mouse event for geo component getECData(eventTrigger).eventData = { componentType: 'geo', componentIndex: mapOrGeoModel.componentIndex, geoIndex: mapOrGeoModel.componentIndex, name: regionName, region: regionModel && regionModel.option || {} }; } } function resetTooltipForRegion(viewBuildCtx, el, regionName, regionModel, mapOrGeoModel) { if (!viewBuildCtx.data) { setTooltipConfig({ el: el, componentModel: mapOrGeoModel, itemName: regionName, // @ts-ignore FIXME:TS fix the "compatible with each other"? itemTooltipOption: regionModel.get('tooltip') }); } } function resetStateTriggerForRegion(viewBuildCtx, el, regionName, regionModel, mapOrGeoModel) { // @ts-ignore FIXME:TS fix the "compatible with each other"? el.highDownSilentOnTouch = !!mapOrGeoModel.get('selectedMode'); // @ts-ignore FIXME:TS fix the "compatible with each other"? var emphasisModel = regionModel.getModel('emphasis'); var focus = emphasisModel.get('focus'); toggleHoverEmphasis(el, focus, emphasisModel.get('blurScope'), emphasisModel.get('disabled')); if (viewBuildCtx.isGeo) { enableComponentHighDownFeatures(el, mapOrGeoModel, regionName); } return focus; } function projectPolys(rings, // Polygons include exterior and interiors. Or polylines. createStream, isLine) { var polygons = []; var curPoly; function startPolygon() { curPoly = []; } function endPolygon() { if (curPoly.length) { polygons.push(curPoly); curPoly = []; } } var stream = createStream({ polygonStart: startPolygon, polygonEnd: endPolygon, lineStart: startPolygon, lineEnd: endPolygon, point: function (x, y) { // May have NaN values from stream. if (isFinite(x) && isFinite(y)) { curPoly.push([x, y]); } }, sphere: function () {} }); !isLine && stream.polygonStart(); core_util["each"](rings, function (ring) { stream.lineStart(); for (var i = 0; i < ring.length; i++) { stream.point(ring[i][0], ring[i][1]); } stream.lineEnd(); }); !isLine && stream.polygonEnd(); return polygons; } /* harmony default export */ var helper_MapDraw = (MapDraw_MapDraw); // @ts-ignore FIXME:TS fix the "compatible with each other"? // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/map/MapView.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 MapView_MapView = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(MapView, _super); function MapView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = MapView.type; return _this; } MapView.prototype.render = function (mapModel, ecModel, api, payload) { // Not render if it is an toggleSelect action from self if (payload && payload.type === 'mapToggleSelect' && payload.from === this.uid) { return; } var group = this.group; group.removeAll(); if (mapModel.getHostGeoModel()) { return; } if (this._mapDraw && payload && payload.type === 'geoRoam') { this._mapDraw.resetForLabelLayout(); } // Not update map if it is an roam action from self if (!(payload && payload.type === 'geoRoam' && payload.componentType === 'series' && payload.seriesId === mapModel.id)) { if (mapModel.needsDrawMap) { var mapDraw = this._mapDraw || new helper_MapDraw(api); group.add(mapDraw.group); mapDraw.draw(mapModel, ecModel, api, this, payload); this._mapDraw = mapDraw; } else { // Remove drawn map this._mapDraw && this._mapDraw.remove(); this._mapDraw = null; } } else { var mapDraw = this._mapDraw; mapDraw && group.add(mapDraw.group); } mapModel.get('showLegendSymbol') && ecModel.getComponent('legend') && this._renderSymbols(mapModel, ecModel, api); }; MapView.prototype.remove = function () { this._mapDraw && this._mapDraw.remove(); this._mapDraw = null; this.group.removeAll(); }; MapView.prototype.dispose = function () { this._mapDraw && this._mapDraw.remove(); this._mapDraw = null; }; MapView.prototype._renderSymbols = function (mapModel, ecModel, api) { var originalData = mapModel.originalData; var group = this.group; originalData.each(originalData.mapDimension('value'), function (value, originalDataIndex) { if (isNaN(value)) { return; } var layout = originalData.getItemLayout(originalDataIndex); if (!layout || !layout.point) { // Not exists in map return; } var point = layout.point; var offset = layout.offset; var circle = new shape_Circle({ style: { // Because the special of map draw. // Which needs statistic of multiple series and draw on one map. // And each series also need a symbol with legend color // // Layout and visual are put one the different data // TODO fill: mapModel.getData().getVisual('style').fill }, shape: { cx: point[0] + offset * 9, cy: point[1], r: 3 }, silent: true, // Do not overlap the first series, on which labels are displayed. z2: 8 + (!offset ? Z2_EMPHASIS_LIFT + 1 : 0) }); // Only the series that has the first value on the same region is in charge of rendering the label. // But consider the case: // series: [ // {id: 'X', type: 'map', map: 'm', {data: [{name: 'A', value: 11}, {name: 'B', {value: 22}]}, // {id: 'Y', type: 'map', map: 'm', {data: [{name: 'A', value: 21}, {name: 'C', {value: 33}]} // ] // The offset `0` of item `A` is at series `X`, but of item `C` is at series `Y`. // For backward compatibility, we follow the rule that render label `A` by the // settings on series `X` but render label `C` by the settings on series `Y`. if (!offset) { var fullData = mapModel.mainSeries.getData(); var name_1 = originalData.getName(originalDataIndex); var fullIndex_1 = fullData.indexOfName(name_1); var itemModel = originalData.getItemModel(originalDataIndex); var labelModel = itemModel.getModel('label'); var regionGroup = fullData.getItemGraphicEl(fullIndex_1); // `getFormattedLabel` needs to use `getData` inside. Here // `mapModel.getData()` is shallow cloned from `mainSeries.getData()`. // FIXME // If this is not the `mainSeries`, the item model (like label formatter) // set on original data item will never get. But it has been working // like that from the beginning, and this scenario is rarely encountered. // So it won't be fixed until we have to. setLabelStyle(circle, getLabelStatesModels(itemModel), { labelFetcher: { getFormattedLabel: function (idx, state) { return mapModel.getFormattedLabel(fullIndex_1, state); } }, defaultText: name_1 }); circle.disableLabelAnimation = true; if (!labelModel.get('position')) { circle.setTextConfig({ position: 'bottom' }); } regionGroup.onHoverStateChange = function (toState) { setStatesFlag(circle, toState); }; } group.add(circle); }); }; MapView.type = 'map'; return MapView; }(Chart); /* harmony default export */ var map_MapView = (MapView_MapView); // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/map/MapSeries.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 MapSeries_MapSeries = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(MapSeries, _super); function MapSeries() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = MapSeries.type; // Only first map series of same mapType will drawMap. _this.needsDrawMap = false; // Group of all map series with same mapType _this.seriesGroup = []; _this.getTooltipPosition = function (dataIndex) { if (dataIndex != null) { var name_1 = this.getData().getName(dataIndex); var geo = this.coordinateSystem; var region = geo.getRegion(name_1); return region && geo.dataToPoint(region.getCenter()); } }; return _this; } MapSeries.prototype.getInitialData = function (option) { var data = createSeriesDataSimply(this, { coordDimensions: ['value'], encodeDefaulter: core_util["curry"](makeSeriesEncodeForNameBased, this) }); var dataNameIndexMap = core_util["createHashMap"](); var toAppendItems = []; for (var i = 0, len = data.count(); i < len; i++) { var name_2 = data.getName(i); dataNameIndexMap.set(name_2, i); } var geoSource = geoSourceManager.load(this.getMapType(), this.option.nameMap, this.option.nameProperty); core_util["each"](geoSource.regions, function (region) { var name = region.name; var dataNameIdx = dataNameIndexMap.get(name); // apply specified echarts style in GeoJSON data var specifiedGeoJSONRegionStyle = region.properties && region.properties.echartsStyle; var dataItem; if (dataNameIdx == null) { dataItem = { name: name }; toAppendItems.push(dataItem); } else { dataItem = data.getRawDataItem(dataNameIdx); } specifiedGeoJSONRegionStyle && core_util["merge"](dataItem, specifiedGeoJSONRegionStyle); }); // Complete data with missing regions. The consequent processes (like visual // map and render) can not be performed without a "full data". For example, // find `dataIndex` by name. data.appendData(toAppendItems); return data; }; /** * If no host geo model, return null, which means using a * inner exclusive geo model. */ MapSeries.prototype.getHostGeoModel = function () { var geoIndex = this.option.geoIndex; return geoIndex != null ? this.ecModel.getComponent('geo', geoIndex) : null; }; MapSeries.prototype.getMapType = function () { return (this.getHostGeoModel() || this).option.map; }; // _fillOption(option, mapName) { // Shallow clone // option = zrUtil.extend({}, option); // option.data = geoCreator.getFilledRegions(option.data, mapName, option.nameMap); // return option; // } MapSeries.prototype.getRawValue = function (dataIndex) { // Use value stored in data instead because it is calculated from multiple series // FIXME Provide all value of multiple series ? var data = this.getData(); return data.get(data.mapDimension('value'), dataIndex); }; /** * Get model of region */ MapSeries.prototype.getRegionModel = function (regionName) { var data = this.getData(); return data.getItemModel(data.indexOfName(regionName)); }; /** * Map tooltip formatter */ MapSeries.prototype.formatTooltip = function (dataIndex, multipleSeries, dataType) { // FIXME orignalData and data is a bit confusing var data = this.getData(); var value = this.getRawValue(dataIndex); var name = data.getName(dataIndex); var seriesGroup = this.seriesGroup; var seriesNames = []; for (var i = 0; i < seriesGroup.length; i++) { var otherIndex = seriesGroup[i].originalData.indexOfName(name); var valueDim = data.mapDimension('value'); if (!isNaN(seriesGroup[i].originalData.get(valueDim, otherIndex))) { seriesNames.push(seriesGroup[i].name); } } return createTooltipMarkup('section', { header: seriesNames.join(', '), noHeader: !seriesNames.length, blocks: [createTooltipMarkup('nameValue', { name: name, value: value })] }); }; MapSeries.prototype.setZoom = function (zoom) { this.option.zoom = zoom; }; MapSeries.prototype.setCenter = function (center) { this.option.center = center; }; MapSeries.prototype.getLegendIcon = function (opt) { var iconType = opt.icon || 'roundRect'; var icon = symbol_createSymbol(iconType, 0, 0, opt.itemWidth, opt.itemHeight, opt.itemStyle.fill); icon.setStyle(opt.itemStyle); // Map do not use itemStyle.borderWidth as border width icon.style.stroke = 'none'; // No rotation because no series visual symbol for map if (iconType.indexOf('empty') > -1) { icon.style.stroke = icon.style.fill; icon.style.fill = '#fff'; icon.style.lineWidth = 2; } return icon; }; MapSeries.type = 'series.map'; MapSeries.dependencies = ['geo']; MapSeries.layoutMode = 'box'; MapSeries.defaultOption = { // 一级层叠 // zlevel: 0, // 二级层叠 z: 2, coordinateSystem: 'geo', // map should be explicitly specified since ec3. map: '', // If `geoIndex` is not specified, a exclusive geo will be // created. Otherwise use the specified geo component, and // `map` and `mapType` are ignored. // geoIndex: 0, // 'center' | 'left' | 'right' | 'x%' | {number} left: 'center', // 'center' | 'top' | 'bottom' | 'x%' | {number} top: 'center', // right // bottom // width: // height // Aspect is width / height. Inited to be geoJson bbox aspect // This parameter is used for scale this aspect // Default value: // for geoSVG source: 1, // for geoJSON source: 0.75. aspectScale: null, // Layout with center and size // If you want to put map in a fixed size box with right aspect ratio // This two properties may be more convenient. // layoutCenter: [50%, 50%] // layoutSize: 100 showLegendSymbol: true, // Define left-top, right-bottom coords to control view // For example, [ [180, 90], [-180, -90] ], // higher priority than center and zoom boundingCoords: null, // Default on center of map center: null, zoom: 1, scaleLimit: null, selectedMode: true, label: { show: false, color: '#000' }, // scaleLimit: null, itemStyle: { borderWidth: 0.5, borderColor: '#444', areaColor: '#eee' }, emphasis: { label: { show: true, color: 'rgb(100,0,0)' }, itemStyle: { areaColor: 'rgba(255,215,0,0.8)' } }, select: { label: { show: true, color: 'rgb(100,0,0)' }, itemStyle: { color: 'rgba(255,215,0,0.8)' } }, nameProperty: 'name' }; return MapSeries; }(Series); /* harmony default export */ var map_MapSeries = (MapSeries_MapSeries); // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/map/mapDataStatistic.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ // FIXME 公用? function dataStatistics(datas, statisticType) { var dataNameMap = {}; core_util["each"](datas, function (data) { data.each(data.mapDimension('value'), function (value, idx) { // Add prefix to avoid conflict with Object.prototype. var mapKey = 'ec-' + data.getName(idx); dataNameMap[mapKey] = dataNameMap[mapKey] || []; if (!isNaN(value)) { dataNameMap[mapKey].push(value); } }); }); return datas[0].map(datas[0].mapDimension('value'), function (value, idx) { var mapKey = 'ec-' + datas[0].getName(idx); var sum = 0; var min = Infinity; var max = -Infinity; var len = dataNameMap[mapKey].length; for (var i = 0; i < len; i++) { min = Math.min(min, dataNameMap[mapKey][i]); max = Math.max(max, dataNameMap[mapKey][i]); sum += dataNameMap[mapKey][i]; } var result; if (statisticType === 'min') { result = min; } else if (statisticType === 'max') { result = max; } else if (statisticType === 'average') { result = sum / len; } else { result = sum; } return len === 0 ? NaN : result; }); } function mapDataStatistic(ecModel) { var seriesGroups = {}; ecModel.eachSeriesByType('map', function (seriesModel) { var hostGeoModel = seriesModel.getHostGeoModel(); var key = hostGeoModel ? 'o' + hostGeoModel.id : 'i' + seriesModel.getMapType(); (seriesGroups[key] = seriesGroups[key] || []).push(seriesModel); }); core_util["each"](seriesGroups, function (seriesList, key) { var data = dataStatistics(core_util["map"](seriesList, function (seriesModel) { return seriesModel.getData(); }), seriesList[0].get('mapValueCalculation')); for (var i = 0; i < seriesList.length; i++) { seriesList[i].originalData = seriesList[i].getData(); } // FIXME Put where? for (var i = 0; i < seriesList.length; i++) { seriesList[i].seriesGroup = seriesList; seriesList[i].needsDrawMap = i === 0 && !seriesList[i].getHostGeoModel(); seriesList[i].setData(data.cloneShallow()); seriesList[i].mainSeries = seriesList[0]; } }); } // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/map/mapSymbolLayout.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 mapSymbolLayout(ecModel) { var processedMapType = {}; ecModel.eachSeriesByType('map', function (mapSeries) { var mapType = mapSeries.getMapType(); if (mapSeries.getHostGeoModel() || processedMapType[mapType]) { return; } var mapSymbolOffsets = {}; core_util["each"](mapSeries.seriesGroup, function (subMapSeries) { var geo = subMapSeries.coordinateSystem; var data = subMapSeries.originalData; if (subMapSeries.get('showLegendSymbol') && ecModel.getComponent('legend')) { data.each(data.mapDimension('value'), function (value, idx) { var name = data.getName(idx); var region = geo.getRegion(name); // If input series.data is [11, 22, '-'/null/undefined, 44], // it will be filled with NaN: [11, 22, NaN, 44] and NaN will // not be drawn. So here must validate if value is NaN. if (!region || isNaN(value)) { return; } var offset = mapSymbolOffsets[name] || 0; var point = geo.dataToPoint(region.getCenter()); mapSymbolOffsets[name] = offset + 1; data.setItemLayout(idx, { point: point, offset: offset }); }); } }); // Show label of those region not has legendIcon (which is offset 0) var data = mapSeries.getData(); data.each(function (idx) { var name = data.getName(idx); var layout = data.getItemLayout(idx) || {}; layout.showLabel = !mapSymbolOffsets[name]; data.setItemLayout(idx, layout); }); processedMapType[mapType] = true; }); } // CONCATENATED MODULE: ./node_modules/echarts/lib/coord/View.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ /** * Simple view coordinate system * Mapping given x, y to transformd view x, y */ var v2ApplyTransform = applyTransform; var View_View = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(View, _super); function View(name) { var _this = _super.call(this) || this; _this.type = 'view'; _this.dimensions = ['x', 'y']; /** * Represents the transform brought by roam/zoom. * If `View['_viewRect']` applies roam transform, * we can get the final displayed rect. */ _this._roamTransformable = new core_Transformable(); /** * Represents the transform from `View['_rect']` to `View['_viewRect']`. */ _this._rawTransformable = new core_Transformable(); _this.name = name; return _this; } View.prototype.setBoundingRect = function (x, y, width, height) { this._rect = new core_BoundingRect(x, y, width, height); return this._rect; }; /** * @return {module:zrender/core/BoundingRect} */ View.prototype.getBoundingRect = function () { return this._rect; }; View.prototype.setViewRect = function (x, y, width, height) { this._transformTo(x, y, width, height); this._viewRect = new core_BoundingRect(x, y, width, height); }; /** * Transformed to particular position and size */ View.prototype._transformTo = function (x, y, width, height) { var rect = this.getBoundingRect(); var rawTransform = this._rawTransformable; rawTransform.transform = rect.calculateTransform(new core_BoundingRect(x, y, width, height)); var rawParent = rawTransform.parent; rawTransform.parent = null; rawTransform.decomposeTransform(); rawTransform.parent = rawParent; this._updateTransform(); }; /** * Set center of view */ View.prototype.setCenter = function (centerCoord, api) { if (!centerCoord) { return; } this._center = [number_parsePercent(centerCoord[0], api.getWidth()), number_parsePercent(centerCoord[1], api.getHeight())]; this._updateCenterAndZoom(); }; View.prototype.setZoom = function (zoom) { zoom = zoom || 1; var zoomLimit = this.zoomLimit; if (zoomLimit) { if (zoomLimit.max != null) { zoom = Math.min(zoomLimit.max, zoom); } if (zoomLimit.min != null) { zoom = Math.max(zoomLimit.min, zoom); } } this._zoom = zoom; this._updateCenterAndZoom(); }; /** * Get default center without roam */ View.prototype.getDefaultCenter = function () { // Rect before any transform var rawRect = this.getBoundingRect(); var cx = rawRect.x + rawRect.width / 2; var cy = rawRect.y + rawRect.height / 2; return [cx, cy]; }; View.prototype.getCenter = function () { return this._center || this.getDefaultCenter(); }; View.prototype.getZoom = function () { return this._zoom || 1; }; View.prototype.getRoamTransform = function () { return this._roamTransformable.getLocalTransform(); }; /** * Remove roam */ View.prototype._updateCenterAndZoom = function () { // Must update after view transform updated var rawTransformMatrix = this._rawTransformable.getLocalTransform(); var roamTransform = this._roamTransformable; var defaultCenter = this.getDefaultCenter(); var center = this.getCenter(); var zoom = this.getZoom(); center = applyTransform([], center, rawTransformMatrix); defaultCenter = applyTransform([], defaultCenter, rawTransformMatrix); roamTransform.originX = center[0]; roamTransform.originY = center[1]; roamTransform.x = defaultCenter[0] - center[0]; roamTransform.y = defaultCenter[1] - center[1]; roamTransform.scaleX = roamTransform.scaleY = zoom; this._updateTransform(); }; /** * Update transform props on `this` based on the current * `this._roamTransformable` and `this._rawTransformable`. */ View.prototype._updateTransform = function () { var roamTransformable = this._roamTransformable; var rawTransformable = this._rawTransformable; rawTransformable.parent = roamTransformable; roamTransformable.updateTransform(); rawTransformable.updateTransform(); matrix_copy(this.transform || (this.transform = []), rawTransformable.transform || matrix_create()); this._rawTransform = rawTransformable.getLocalTransform(); this.invTransform = this.invTransform || []; matrix_invert(this.invTransform, this.transform); this.decomposeTransform(); }; View.prototype.getTransformInfo = function () { var rawTransformable = this._rawTransformable; var roamTransformable = this._roamTransformable; // Because roamTransformabel has `originX/originY` modified, // but the caller of `getTransformInfo` can not handle `originX/originY`, // so need to recalculate them. var dummyTransformable = new core_Transformable(); dummyTransformable.transform = roamTransformable.transform; dummyTransformable.decomposeTransform(); return { roam: { x: dummyTransformable.x, y: dummyTransformable.y, scaleX: dummyTransformable.scaleX, scaleY: dummyTransformable.scaleY }, raw: { x: rawTransformable.x, y: rawTransformable.y, scaleX: rawTransformable.scaleX, scaleY: rawTransformable.scaleY } }; }; View.prototype.getViewRect = function () { return this._viewRect; }; /** * Get view rect after roam transform */ View.prototype.getViewRectAfterRoam = function () { var rect = this.getBoundingRect().clone(); rect.applyTransform(this.transform); return rect; }; /** * Convert a single (lon, lat) data item to (x, y) point. */ View.prototype.dataToPoint = function (data, noRoam, out) { var transform = noRoam ? this._rawTransform : this.transform; out = out || []; return transform ? v2ApplyTransform(out, data, transform) : vector_copy(out, data); }; /** * Convert a (x, y) point to (lon, lat) data */ View.prototype.pointToData = function (point) { var invTransform = this.invTransform; return invTransform ? v2ApplyTransform([], point, invTransform) : [point[0], point[1]]; }; View.prototype.convertToPixel = function (ecModel, finder, value) { var coordSys = getCoordSys(finder); return coordSys === this ? coordSys.dataToPoint(value) : null; }; View.prototype.convertFromPixel = function (ecModel, finder, pixel) { var coordSys = getCoordSys(finder); return coordSys === this ? coordSys.pointToData(pixel) : null; }; /** * @implements */ View.prototype.containPoint = function (point) { return this.getViewRectAfterRoam().contain(point[0], point[1]); }; View.dimensions = ['x', 'y']; return View; }(core_Transformable); function getCoordSys(finder) { var seriesModel = finder.seriesModel; return seriesModel ? seriesModel.coordinateSystem : null; // e.g., graph. } /* harmony default export */ var coord_View = (View_View); // CONCATENATED MODULE: ./node_modules/echarts/lib/coord/geo/Geo.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 GEO_DEFAULT_PARAMS = { 'geoJSON': { aspectScale: 0.75, invertLongitute: true }, 'geoSVG': { aspectScale: 1, invertLongitute: false } }; var geo2DDimensions = ['lng', 'lat']; var Geo_Geo = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(Geo, _super); function Geo(name, map, opt) { var _this = _super.call(this, name) || this; _this.dimensions = geo2DDimensions; _this.type = 'geo'; // Only store specified name coord via `addGeoCoord`. _this._nameCoordMap = core_util["createHashMap"](); _this.map = map; var projection = opt.projection; var source = geoSourceManager.load(map, opt.nameMap, opt.nameProperty); var resource = geoSourceManager.getGeoResource(map); var resourceType = _this.resourceType = resource ? resource.type : null; var regions = _this.regions = source.regions; var defaultParams = GEO_DEFAULT_PARAMS[resource.type]; _this._regionsMap = source.regionsMap; _this.regions = source.regions; if (false) { // Do some check if (resourceType === 'geoSVG') { if (process.env.NODE_ENV !== 'production') { warn("Map " + map + " with SVG source can't use projection. Only GeoJSON source supports projection."); } projection = null; } if (!(projection.project && projection.unproject)) { if (process.env.NODE_ENV !== 'production') { warn('project and unproject must be both provided in the projeciton.'); } projection = null; } } _this.projection = projection; var boundingRect; if (projection) { // Can't reuse the raw bounding rect for (var i = 0; i < regions.length; i++) { var regionRect = regions[i].getBoundingRect(projection); boundingRect = boundingRect || regionRect.clone(); boundingRect.union(regionRect); } } else { boundingRect = source.boundingRect; } _this.setBoundingRect(boundingRect.x, boundingRect.y, boundingRect.width, boundingRect.height); // aspectScale and invertLongitute actually is the parameters default raw projection. // So we ignore them if projection is given. // Ignore default aspect scale if projection exits. _this.aspectScale = projection ? 1 : core_util["retrieve2"](opt.aspectScale, defaultParams.aspectScale); // Not invert longitude if projection exits. _this._invertLongitute = projection ? false : defaultParams.invertLongitute; return _this; } Geo.prototype._transformTo = function (x, y, width, height) { var rect = this.getBoundingRect(); var invertLongitute = this._invertLongitute; rect = rect.clone(); if (invertLongitute) { // Longitude is inverted. rect.y = -rect.y - rect.height; } var rawTransformable = this._rawTransformable; rawTransformable.transform = rect.calculateTransform(new core_BoundingRect(x, y, width, height)); var rawParent = rawTransformable.parent; rawTransformable.parent = null; rawTransformable.decomposeTransform(); rawTransformable.parent = rawParent; if (invertLongitute) { rawTransformable.scaleY = -rawTransformable.scaleY; } this._updateTransform(); }; Geo.prototype.getRegion = function (name) { return this._regionsMap.get(name); }; Geo.prototype.getRegionByCoord = function (coord) { var regions = this.regions; for (var i = 0; i < regions.length; i++) { var region = regions[i]; if (region.type === 'geoJSON' && region.contain(coord)) { return regions[i]; } } }; /** * Add geoCoord for indexing by name */ Geo.prototype.addGeoCoord = function (name, geoCoord) { this._nameCoordMap.set(name, geoCoord); }; /** * Get geoCoord by name */ Geo.prototype.getGeoCoord = function (name) { var region = this._regionsMap.get(name); // Calculate center only on demand. return this._nameCoordMap.get(name) || region && region.getCenter(); }; Geo.prototype.dataToPoint = function (data, noRoam, out) { if (core_util["isString"](data)) { // Map area name to geoCoord data = this.getGeoCoord(data); } if (data) { var projection = this.projection; if (projection) { // projection may return null point. data = projection.project(data); } return data && this.projectedToPoint(data, noRoam, out); } }; Geo.prototype.pointToData = function (point) { var projection = this.projection; if (projection) { // projection may return null point. point = projection.unproject(point); } return point && this.pointToProjected(point); }; /** * Point to projected data. Same with pointToData when projection is used. */ Geo.prototype.pointToProjected = function (point) { return _super.prototype.pointToData.call(this, point); }; Geo.prototype.projectedToPoint = function (projected, noRoam, out) { return _super.prototype.dataToPoint.call(this, projected, noRoam, out); }; Geo.prototype.convertToPixel = function (ecModel, finder, value) { var coordSys = Geo_getCoordSys(finder); return coordSys === this ? coordSys.dataToPoint(value) : null; }; Geo.prototype.convertFromPixel = function (ecModel, finder, pixel) { var coordSys = Geo_getCoordSys(finder); return coordSys === this ? coordSys.pointToData(pixel) : null; }; return Geo; }(coord_View); ; core_util["mixin"](Geo_Geo, coord_View); function Geo_getCoordSys(finder) { var geoModel = finder.geoModel; var seriesModel = finder.seriesModel; return geoModel ? geoModel.coordinateSystem : seriesModel ? seriesModel.coordinateSystem // For map series. || (seriesModel.getReferringComponents('geo', SINGLE_REFERRING).models[0] || {}).coordinateSystem : null; } /* harmony default export */ var geo_Geo = (Geo_Geo); // CONCATENATED MODULE: ./node_modules/echarts/lib/coord/geo/geoCreator.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ /** * Resize method bound to the geo */ function resizeGeo(geoModel, api) { var boundingCoords = geoModel.get('boundingCoords'); if (boundingCoords != null) { var leftTop_1 = boundingCoords[0]; var rightBottom_1 = boundingCoords[1]; if (!(isFinite(leftTop_1[0]) && isFinite(leftTop_1[1]) && isFinite(rightBottom_1[0]) && isFinite(rightBottom_1[1]))) { if (false) { console.error('Invalid boundingCoords'); } } else { // Sample around the lng/lat rect and use projection to calculate actual bounding rect. var projection_1 = this.projection; if (projection_1) { var xMin = leftTop_1[0]; var yMin = leftTop_1[1]; var xMax = rightBottom_1[0]; var yMax = rightBottom_1[1]; leftTop_1 = [Infinity, Infinity]; rightBottom_1 = [-Infinity, -Infinity]; // TODO better way? var sampleLine = function (x0, y0, x1, y1) { var dx = x1 - x0; var dy = y1 - y0; for (var i = 0; i <= 100; i++) { var p = i / 100; var pt = projection_1.project([x0 + dx * p, y0 + dy * p]); vector_min(leftTop_1, leftTop_1, pt); vector_max(rightBottom_1, rightBottom_1, pt); } }; // Top sampleLine(xMin, yMin, xMax, yMin); // Right sampleLine(xMax, yMin, xMax, yMax); // Bottom sampleLine(xMax, yMax, xMin, yMax); // Left sampleLine(xMin, yMax, xMax, yMin); } this.setBoundingRect(leftTop_1[0], leftTop_1[1], rightBottom_1[0] - leftTop_1[0], rightBottom_1[1] - leftTop_1[1]); } } var rect = this.getBoundingRect(); var centerOption = geoModel.get('layoutCenter'); var sizeOption = geoModel.get('layoutSize'); var viewWidth = api.getWidth(); var viewHeight = api.getHeight(); var aspect = rect.width / rect.height * this.aspectScale; var useCenterAndSize = false; var center; var size; if (centerOption && sizeOption) { center = [number_parsePercent(centerOption[0], viewWidth), number_parsePercent(centerOption[1], viewHeight)]; size = number_parsePercent(sizeOption, Math.min(viewWidth, viewHeight)); if (!isNaN(center[0]) && !isNaN(center[1]) && !isNaN(size)) { useCenterAndSize = true; } else { if (false) { console.warn('Given layoutCenter or layoutSize data are invalid. Use left/top/width/height instead.'); } } } var viewRect; if (useCenterAndSize) { viewRect = {}; if (aspect > 1) { // Width is same with size viewRect.width = size; viewRect.height = size / aspect; } else { viewRect.height = size; viewRect.width = size * aspect; } viewRect.y = center[1] - viewRect.height / 2; viewRect.x = center[0] - viewRect.width / 2; } else { // Use left/top/width/height var boxLayoutOption = geoModel.getBoxLayoutParams(); boxLayoutOption.aspect = aspect; viewRect = getLayoutRect(boxLayoutOption, { width: viewWidth, height: viewHeight }); } this.setViewRect(viewRect.x, viewRect.y, viewRect.width, viewRect.height); this.setCenter(geoModel.get('center'), api); this.setZoom(geoModel.get('zoom')); } // Back compat for ECharts2, where the coord map is set on map series: // {type: 'map', geoCoord: {'cityA': [116.46,39.92], 'cityA': [119.12,24.61]}}, function setGeoCoords(geo, model) { core_util["each"](model.get('geoCoord'), function (geoCoord, name) { geo.addGeoCoord(name, geoCoord); }); } var geoCreator_GeoCreator = /** @class */function () { function GeoCreator() { // For deciding which dimensions to use when creating list data this.dimensions = geo2DDimensions; } GeoCreator.prototype.create = function (ecModel, api) { var geoList = []; function getCommonGeoProperties(model) { return { nameProperty: model.get('nameProperty'), aspectScale: model.get('aspectScale'), projection: model.get('projection') }; } // FIXME Create each time may be slow ecModel.eachComponent('geo', function (geoModel, idx) { var mapName = geoModel.get('map'); var geo = new geo_Geo(mapName + idx, mapName, core_util["extend"]({ nameMap: geoModel.get('nameMap') }, getCommonGeoProperties(geoModel))); geo.zoomLimit = geoModel.get('scaleLimit'); geoList.push(geo); // setGeoCoords(geo, geoModel); geoModel.coordinateSystem = geo; geo.model = geoModel; // Inject resize method geo.resize = resizeGeo; geo.resize(geoModel, api); }); ecModel.eachSeries(function (seriesModel) { var coordSys = seriesModel.get('coordinateSystem'); if (coordSys === 'geo') { var geoIndex = seriesModel.get('geoIndex') || 0; seriesModel.coordinateSystem = geoList[geoIndex]; } }); // If has map series var mapModelGroupBySeries = {}; ecModel.eachSeriesByType('map', function (seriesModel) { if (!seriesModel.getHostGeoModel()) { var mapType = seriesModel.getMapType(); mapModelGroupBySeries[mapType] = mapModelGroupBySeries[mapType] || []; mapModelGroupBySeries[mapType].push(seriesModel); } }); core_util["each"](mapModelGroupBySeries, function (mapSeries, mapType) { var nameMapList = core_util["map"](mapSeries, function (singleMapSeries) { return singleMapSeries.get('nameMap'); }); var geo = new geo_Geo(mapType, mapType, core_util["extend"]({ nameMap: core_util["mergeAll"](nameMapList) }, getCommonGeoProperties(mapSeries[0]))); geo.zoomLimit = core_util["retrieve"].apply(null, core_util["map"](mapSeries, function (singleMapSeries) { return singleMapSeries.get('scaleLimit'); })); geoList.push(geo); // Inject resize method geo.resize = resizeGeo; geo.resize(mapSeries[0], api); core_util["each"](mapSeries, function (singleMapSeries) { singleMapSeries.coordinateSystem = geo; setGeoCoords(geo, singleMapSeries); }); }); return geoList; }; /** * Fill given regions array */ GeoCreator.prototype.getFilledRegions = function (originRegionArr, mapName, nameMap, nameProperty) { // Not use the original var regionsArr = (originRegionArr || []).slice(); var dataNameMap = core_util["createHashMap"](); for (var i = 0; i < regionsArr.length; i++) { dataNameMap.set(regionsArr[i].name, regionsArr[i]); } var source = geoSourceManager.load(mapName, nameMap, nameProperty); core_util["each"](source.regions, function (region) { var name = region.name; var regionOption = dataNameMap.get(name); // apply specified echarts style in GeoJSON data var specifiedGeoJSONRegionStyle = region.properties && region.properties.echartsStyle; if (!regionOption) { regionOption = { name: name }; regionsArr.push(regionOption); } specifiedGeoJSONRegionStyle && core_util["merge"](regionOption, specifiedGeoJSONRegionStyle); }); return regionsArr; }; return GeoCreator; }(); var geoCreator = new geoCreator_GeoCreator(); /* harmony default export */ var geo_geoCreator = (geoCreator); // CONCATENATED MODULE: ./node_modules/echarts/lib/coord/geo/GeoModel.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 GeoModel_GeoModel = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(GeoModel, _super); function GeoModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = GeoModel.type; return _this; } GeoModel.prototype.init = function (option, parentModel, ecModel) { var source = geoSourceManager.getGeoResource(option.map); if (source && source.type === 'geoJSON') { var itemStyle = option.itemStyle = option.itemStyle || {}; if (!('color' in itemStyle)) { itemStyle.color = '#eee'; } } this.mergeDefaultAndTheme(option, ecModel); // Default label emphasis `show` defaultEmphasis(option, 'label', ['show']); }; GeoModel.prototype.optionUpdated = function () { var _this = this; var option = this.option; option.regions = geo_geoCreator.getFilledRegions(option.regions, option.map, option.nameMap, option.nameProperty); var selectedMap = {}; this._optionModelMap = core_util["reduce"](option.regions || [], function (optionModelMap, regionOpt) { var regionName = regionOpt.name; if (regionName) { optionModelMap.set(regionName, new model_Model(regionOpt, _this, _this.ecModel)); if (regionOpt.selected) { selectedMap[regionName] = true; } } return optionModelMap; }, core_util["createHashMap"]()); if (!option.selectedMap) { option.selectedMap = selectedMap; } }; /** * Get model of region. */ GeoModel.prototype.getRegionModel = function (name) { return this._optionModelMap.get(name) || new model_Model(null, this, this.ecModel); }; /** * Format label * @param name Region name */ GeoModel.prototype.getFormattedLabel = function (name, status) { var regionModel = this.getRegionModel(name); var formatter = status === 'normal' ? regionModel.get(['label', 'formatter']) : regionModel.get(['emphasis', 'label', 'formatter']); var params = { name: name }; if (core_util["isFunction"](formatter)) { params.status = status; return formatter(params); } else if (core_util["isString"](formatter)) { return formatter.replace('{a}', name != null ? name : ''); } }; GeoModel.prototype.setZoom = function (zoom) { this.option.zoom = zoom; }; GeoModel.prototype.setCenter = function (center) { this.option.center = center; }; // PENGING If selectedMode is null ? GeoModel.prototype.select = function (name) { var option = this.option; var selectedMode = option.selectedMode; if (!selectedMode) { return; } if (selectedMode !== 'multiple') { option.selectedMap = null; } var selectedMap = option.selectedMap || (option.selectedMap = {}); selectedMap[name] = true; }; GeoModel.prototype.unSelect = function (name) { var selectedMap = this.option.selectedMap; if (selectedMap) { selectedMap[name] = false; } }; GeoModel.prototype.toggleSelected = function (name) { this[this.isSelected(name) ? 'unSelect' : 'select'](name); }; GeoModel.prototype.isSelected = function (name) { var selectedMap = this.option.selectedMap; return !!(selectedMap && selectedMap[name]); }; GeoModel.type = 'geo'; GeoModel.layoutMode = 'box'; GeoModel.defaultOption = { // zlevel: 0, z: 0, show: true, left: 'center', top: 'center', // Default value: // for geoSVG source: 1, // for geoJSON source: 0.75. aspectScale: null, // /// Layout with center and size // If you want to put map in a fixed size box with right aspect ratio // This two properties may be more convenient // layoutCenter: [50%, 50%] // layoutSize: 100 silent: false, // Map type map: '', // Define left-top, right-bottom coords to control view // For example, [ [180, 90], [-180, -90] ] boundingCoords: null, // Default on center of map center: null, zoom: 1, scaleLimit: null, // selectedMode: false label: { show: false, color: '#000' }, itemStyle: { borderWidth: 0.5, borderColor: '#444' // Default color: // + geoJSON: #eee // + geoSVG: null (use SVG original `fill`) // color: '#eee' }, emphasis: { label: { show: true, color: 'rgb(100,0,0)' }, itemStyle: { color: 'rgba(255,215,0,0.8)' } }, select: { label: { show: true, color: 'rgb(100,0,0)' }, itemStyle: { color: 'rgba(255,215,0,0.8)' } }, regions: [] // tooltip: { // show: false // } }; return GeoModel; }(Component); /* harmony default export */ var geo_GeoModel = (GeoModel_GeoModel); // CONCATENATED MODULE: ./node_modules/echarts/lib/action/roamHelper.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 getCenterCoord(view, point) { // Use projected coord as center because it's linear. return view.pointToProjected ? view.pointToProjected(point) : view.pointToData(point); } function updateCenterAndZoom(view, payload, zoomLimit, api) { var previousZoom = view.getZoom(); var center = view.getCenter(); var zoom = payload.zoom; var point = view.projectedToPoint ? view.projectedToPoint(center) : view.dataToPoint(center); if (payload.dx != null && payload.dy != null) { point[0] -= payload.dx; point[1] -= payload.dy; view.setCenter(getCenterCoord(view, point), api); } if (zoom != null) { if (zoomLimit) { var zoomMin = zoomLimit.min || 0; var zoomMax = zoomLimit.max || Infinity; zoom = Math.max(Math.min(previousZoom * zoom, zoomMax), zoomMin) / previousZoom; } // Zoom on given point(originX, originY) view.scaleX *= zoom; view.scaleY *= zoom; var fixX = (payload.originX - view.x) * (zoom - 1); var fixY = (payload.originY - view.y) * (zoom - 1); view.x -= fixX; view.y -= fixY; view.updateTransform(); // Get the new center view.setCenter(getCenterCoord(view, point), api); view.setZoom(zoom * previousZoom); } return { center: view.getCenter(), zoom: view.getZoom() }; } // CONCATENATED MODULE: ./node_modules/echarts/lib/component/geo/GeoView.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 GeoView_GeoView = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(GeoView, _super); function GeoView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = GeoView.type; _this.focusBlurEnabled = true; return _this; } GeoView.prototype.init = function (ecModel, api) { this._api = api; }; GeoView.prototype.render = function (geoModel, ecModel, api, payload) { this._model = geoModel; if (!geoModel.get('show')) { this._mapDraw && this._mapDraw.remove(); this._mapDraw = null; return; } if (!this._mapDraw) { this._mapDraw = new helper_MapDraw(api); } var mapDraw = this._mapDraw; mapDraw.draw(geoModel, ecModel, api, this, payload); mapDraw.group.on('click', this._handleRegionClick, this); mapDraw.group.silent = geoModel.get('silent'); this.group.add(mapDraw.group); this.updateSelectStatus(geoModel, ecModel, api); }; GeoView.prototype._handleRegionClick = function (e) { var eventData; findEventDispatcher(e.target, function (current) { return (eventData = getECData(current).eventData) != null; }, true); if (eventData) { this._api.dispatchAction({ type: 'geoToggleSelect', geoId: this._model.id, name: eventData.name }); } }; GeoView.prototype.updateSelectStatus = function (model, ecModel, api) { var _this = this; this._mapDraw.group.traverse(function (node) { var eventData = getECData(node).eventData; if (eventData) { _this._model.isSelected(eventData.name) ? api.enterSelect(node) : api.leaveSelect(node); // No need to traverse children. return true; } }); }; GeoView.prototype.findHighDownDispatchers = function (name) { return this._mapDraw && this._mapDraw.findHighDownDispatchers(name, this._model); }; GeoView.prototype.dispose = function () { this._mapDraw && this._mapDraw.remove(); }; GeoView.type = 'geo'; return GeoView; }(view_Component); /* harmony default export */ var geo_GeoView = (GeoView_GeoView); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/geo/install.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 install_registerMap(mapName, geoJson, specialAreas) { geoSourceManager.registerMap(mapName, geoJson, specialAreas); } function geo_install_install(registers) { registers.registerCoordinateSystem('geo', geo_geoCreator); registers.registerComponentModel(geo_GeoModel); registers.registerComponentView(geo_GeoView); registers.registerImpl('registerMap', install_registerMap); registers.registerImpl('getMap', function (mapName) { return geoSourceManager.getMapForUser(mapName); }); function makeAction(method, actionInfo) { actionInfo.update = 'geo:updateSelectStatus'; registers.registerAction(actionInfo, function (payload, ecModel) { var selected = {}; var allSelected = []; ecModel.eachComponent({ mainType: 'geo', query: payload }, function (geoModel) { geoModel[method](payload.name); var geo = geoModel.coordinateSystem; Object(core_util["each"])(geo.regions, function (region) { selected[region.name] = geoModel.isSelected(region.name) || false; }); // Notice: there might be duplicated name in different regions. var names = []; Object(core_util["each"])(selected, function (v, name) { selected[name] && names.push(name); }); allSelected.push({ geoIndex: geoModel.componentIndex, // Use singular, the same naming convention as the event `selectchanged`. name: names }); }); return { selected: selected, allSelected: allSelected, name: payload.name }; }); } makeAction('toggleSelected', { type: 'geoToggleSelect', event: 'geoselectchanged' }); makeAction('select', { type: 'geoSelect', event: 'geoselected' }); makeAction('unSelect', { type: 'geoUnSelect', event: 'geounselected' }); /** * @payload * @property {string} [componentType=series] * @property {number} [dx] * @property {number} [dy] * @property {number} [zoom] * @property {number} [originX] * @property {number} [originY] */ registers.registerAction({ type: 'geoRoam', event: 'geoRoam', update: 'updateTransform' }, function (payload, ecModel, api) { var componentType = payload.componentType || 'series'; ecModel.eachComponent({ mainType: componentType, query: payload }, function (componentModel) { var geo = componentModel.coordinateSystem; if (geo.type !== 'geo') { return; } var res = updateCenterAndZoom(geo, payload, componentModel.get('scaleLimit'), api); componentModel.setCenter && componentModel.setCenter(res.center); componentModel.setZoom && componentModel.setZoom(res.zoom); // All map series with same `map` use the same geo coordinate system // So the center and zoom must be in sync. Include the series not selected by legend if (componentType === 'series') { Object(core_util["each"])(componentModel.seriesGroup, function (seriesModel) { seriesModel.setCenter(res.center); seriesModel.setZoom(res.zoom); }); } }); }); } // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/map/install.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 map_install_install(registers) { use(geo_install_install); registers.registerChartView(map_MapView); registers.registerSeriesModel(map_MapSeries); registers.registerLayout(mapSymbolLayout); registers.registerProcessor(registers.PRIORITY.PROCESSOR.STATISTIC, mapDataStatistic); createLegacyDataSelectAction('map', registers.registerAction); } // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/tree/layoutHelper.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ /* * A third-party license is embedded for some of the code in this file: * The tree layoutHelper implementation was originally copied from * "d3.js"(https://github.com/d3/d3-hierarchy) with * some modifications made for this project. * (see more details in the comment of the specific method below.) * The use of the source code of this file is also subject to the terms * and consitions of the licence of "d3.js" (BSD-3Clause, see * ). */ /** * @file The layout algorithm of node-link tree diagrams. Here we using Reingold-Tilford algorithm to drawing * the tree. */ /** * Initialize all computational message for following algorithm. */ function layoutHelper_init(inRoot) { var root = inRoot; root.hierNode = { defaultAncestor: null, ancestor: root, prelim: 0, modifier: 0, change: 0, shift: 0, i: 0, thread: null }; var nodes = [root]; var node; var children; while (node = nodes.pop()) { // jshint ignore:line children = node.children; if (node.isExpand && children.length) { var n = children.length; for (var i = n - 1; i >= 0; i--) { var child = children[i]; child.hierNode = { defaultAncestor: null, ancestor: child, prelim: 0, modifier: 0, change: 0, shift: 0, i: i, thread: null }; nodes.push(child); } } } } /** * The implementation of this function was originally copied from "d3.js" * * with some modifications made for this program. * See the license statement at the head of this file. * * Computes a preliminary x coordinate for node. Before that, this function is * applied recursively to the children of node, as well as the function * apportion(). After spacing out the children by calling executeShifts(), the * node is placed to the midpoint of its outermost children. */ function firstWalk(node, separation) { var children = node.isExpand ? node.children : []; var siblings = node.parentNode.children; var subtreeW = node.hierNode.i ? siblings[node.hierNode.i - 1] : null; if (children.length) { executeShifts(node); var midPoint = (children[0].hierNode.prelim + children[children.length - 1].hierNode.prelim) / 2; if (subtreeW) { node.hierNode.prelim = subtreeW.hierNode.prelim + separation(node, subtreeW); node.hierNode.modifier = node.hierNode.prelim - midPoint; } else { node.hierNode.prelim = midPoint; } } else if (subtreeW) { node.hierNode.prelim = subtreeW.hierNode.prelim + separation(node, subtreeW); } node.parentNode.hierNode.defaultAncestor = apportion(node, subtreeW, node.parentNode.hierNode.defaultAncestor || siblings[0], separation); } /** * The implementation of this function was originally copied from "d3.js" * * with some modifications made for this program. * See the license statement at the head of this file. * * Computes all real x-coordinates by summing up the modifiers recursively. */ function secondWalk(node) { var nodeX = node.hierNode.prelim + node.parentNode.hierNode.modifier; node.setLayout({ x: nodeX }, true); node.hierNode.modifier += node.parentNode.hierNode.modifier; } function layoutHelper_separation(cb) { return arguments.length ? cb : defaultSeparation; } /** * Transform the common coordinate to radial coordinate. */ function radialCoordinate(rad, r) { rad -= Math.PI / 2; return { x: r * Math.cos(rad), y: r * Math.sin(rad) }; } /** * Get the layout position of the whole view. */ function layoutHelper_getViewRect(seriesModel, api) { return getLayoutRect(seriesModel.getBoxLayoutParams(), { width: api.getWidth(), height: api.getHeight() }); } /** * All other shifts, applied to the smaller subtrees between w- and w+, are * performed by this function. * * The implementation of this function was originally copied from "d3.js" * * with some modifications made for this program. * See the license statement at the head of this file. */ function executeShifts(node) { var children = node.children; var n = children.length; var shift = 0; var change = 0; while (--n >= 0) { var child = children[n]; child.hierNode.prelim += shift; child.hierNode.modifier += shift; change += child.hierNode.change; shift += child.hierNode.shift + change; } } /** * The implementation of this function was originally copied from "d3.js" * * with some modifications made for this program. * See the license statement at the head of this file. * * The core of the algorithm. Here, a new subtree is combined with the * previous subtrees. Threads are used to traverse the inside and outside * contours of the left and right subtree up to the highest common level. * Whenever two nodes of the inside contours conflict, we compute the left * one of the greatest uncommon ancestors using the function nextAncestor() * and call moveSubtree() to shift the subtree and prepare the shifts of * smaller subtrees. Finally, we add a new thread (if necessary). */ function apportion(subtreeV, subtreeW, ancestor, separation) { if (subtreeW) { var nodeOutRight = subtreeV; var nodeInRight = subtreeV; var nodeOutLeft = nodeInRight.parentNode.children[0]; var nodeInLeft = subtreeW; var sumOutRight = nodeOutRight.hierNode.modifier; var sumInRight = nodeInRight.hierNode.modifier; var sumOutLeft = nodeOutLeft.hierNode.modifier; var sumInLeft = nodeInLeft.hierNode.modifier; while (nodeInLeft = nextRight(nodeInLeft), nodeInRight = nextLeft(nodeInRight), nodeInLeft && nodeInRight) { nodeOutRight = nextRight(nodeOutRight); nodeOutLeft = nextLeft(nodeOutLeft); nodeOutRight.hierNode.ancestor = subtreeV; var shift = nodeInLeft.hierNode.prelim + sumInLeft - nodeInRight.hierNode.prelim - sumInRight + separation(nodeInLeft, nodeInRight); if (shift > 0) { moveSubtree(nextAncestor(nodeInLeft, subtreeV, ancestor), subtreeV, shift); sumInRight += shift; sumOutRight += shift; } sumInLeft += nodeInLeft.hierNode.modifier; sumInRight += nodeInRight.hierNode.modifier; sumOutRight += nodeOutRight.hierNode.modifier; sumOutLeft += nodeOutLeft.hierNode.modifier; } if (nodeInLeft && !nextRight(nodeOutRight)) { nodeOutRight.hierNode.thread = nodeInLeft; nodeOutRight.hierNode.modifier += sumInLeft - sumOutRight; } if (nodeInRight && !nextLeft(nodeOutLeft)) { nodeOutLeft.hierNode.thread = nodeInRight; nodeOutLeft.hierNode.modifier += sumInRight - sumOutLeft; ancestor = subtreeV; } } return ancestor; } /** * This function is used to traverse the right contour of a subtree. * It returns the rightmost child of node or the thread of node. The function * returns null if and only if node is on the highest depth of its subtree. */ function nextRight(node) { var children = node.children; return children.length && node.isExpand ? children[children.length - 1] : node.hierNode.thread; } /** * This function is used to traverse the left contour of a subtree (or a subforest). * It returns the leftmost child of node or the thread of node. The function * returns null if and only if node is on the highest depth of its subtree. */ function nextLeft(node) { var children = node.children; return children.length && node.isExpand ? children[0] : node.hierNode.thread; } /** * If nodeInLeft’s ancestor is a sibling of node, returns nodeInLeft’s ancestor. * Otherwise, returns the specified ancestor. */ function nextAncestor(nodeInLeft, node, ancestor) { return nodeInLeft.hierNode.ancestor.parentNode === node.parentNode ? nodeInLeft.hierNode.ancestor : ancestor; } /** * The implementation of this function was originally copied from "d3.js" * * with some modifications made for this program. * See the license statement at the head of this file. * * Shifts the current subtree rooted at wr. * This is done by increasing prelim(w+) and modifier(w+) by shift. */ function moveSubtree(wl, wr, shift) { var change = shift / (wr.hierNode.i - wl.hierNode.i); wr.hierNode.change -= change; wr.hierNode.shift += shift; wr.hierNode.modifier += shift; wr.hierNode.prelim += shift; wl.hierNode.change += change; } /** * The implementation of this function was originally copied from "d3.js" * * with some modifications made for this program. * See the license statement at the head of this file. */ function defaultSeparation(node1, node2) { return node1.parentNode === node2.parentNode ? 1 : 2; } // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/tree/TreeView.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 TreeEdgeShape = /** @class */function () { function TreeEdgeShape() { this.parentPoint = []; this.childPoints = []; } return TreeEdgeShape; }(); var TreeView_TreePath = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(TreePath, _super); function TreePath(opts) { return _super.call(this, opts) || this; } TreePath.prototype.getDefaultStyle = function () { return { stroke: '#000', fill: null }; }; TreePath.prototype.getDefaultShape = function () { return new TreeEdgeShape(); }; TreePath.prototype.buildPath = function (ctx, shape) { var childPoints = shape.childPoints; var childLen = childPoints.length; var parentPoint = shape.parentPoint; var firstChildPos = childPoints[0]; var lastChildPos = childPoints[childLen - 1]; if (childLen === 1) { ctx.moveTo(parentPoint[0], parentPoint[1]); ctx.lineTo(firstChildPos[0], firstChildPos[1]); return; } var orient = shape.orient; var forkDim = orient === 'TB' || orient === 'BT' ? 0 : 1; var otherDim = 1 - forkDim; var forkPosition = number_parsePercent(shape.forkPosition, 1); var tmpPoint = []; tmpPoint[forkDim] = parentPoint[forkDim]; tmpPoint[otherDim] = parentPoint[otherDim] + (lastChildPos[otherDim] - parentPoint[otherDim]) * forkPosition; ctx.moveTo(parentPoint[0], parentPoint[1]); ctx.lineTo(tmpPoint[0], tmpPoint[1]); ctx.moveTo(firstChildPos[0], firstChildPos[1]); tmpPoint[forkDim] = firstChildPos[forkDim]; ctx.lineTo(tmpPoint[0], tmpPoint[1]); tmpPoint[forkDim] = lastChildPos[forkDim]; ctx.lineTo(tmpPoint[0], tmpPoint[1]); ctx.lineTo(lastChildPos[0], lastChildPos[1]); for (var i = 1; i < childLen - 1; i++) { var point = childPoints[i]; ctx.moveTo(point[0], point[1]); tmpPoint[forkDim] = point[forkDim]; ctx.lineTo(tmpPoint[0], tmpPoint[1]); } }; return TreePath; }(graphic_Path); var TreeView_TreeView = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(TreeView, _super); function TreeView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = TreeView.type; _this._mainGroup = new graphic_Group(); return _this; } TreeView.prototype.init = function (ecModel, api) { this._controller = new helper_RoamController(api.getZr()); this._controllerHost = { target: this.group }; this.group.add(this._mainGroup); }; TreeView.prototype.render = function (seriesModel, ecModel, api) { var data = seriesModel.getData(); var layoutInfo = seriesModel.layoutInfo; var group = this._mainGroup; var layout = seriesModel.get('layout'); if (layout === 'radial') { group.x = layoutInfo.x + layoutInfo.width / 2; group.y = layoutInfo.y + layoutInfo.height / 2; } else { group.x = layoutInfo.x; group.y = layoutInfo.y; } this._updateViewCoordSys(seriesModel, api); this._updateController(seriesModel, ecModel, api); var oldData = this._data; data.diff(oldData).add(function (newIdx) { if (TreeView_symbolNeedsDraw(data, newIdx)) { // Create node and edge updateNode(data, newIdx, null, group, seriesModel); } }).update(function (newIdx, oldIdx) { var symbolEl = oldData.getItemGraphicEl(oldIdx); if (!TreeView_symbolNeedsDraw(data, newIdx)) { symbolEl && TreeView_removeNode(oldData, oldIdx, symbolEl, group, seriesModel); return; } // Update node and edge updateNode(data, newIdx, symbolEl, group, seriesModel); }).remove(function (oldIdx) { var symbolEl = oldData.getItemGraphicEl(oldIdx); // When remove a collapsed node of subtree, since the collapsed // node haven't been initialized with a symbol element, // you can't found it's symbol element through index. // so if we want to remove the symbol element we should insure // that the symbol element is not null. if (symbolEl) { TreeView_removeNode(oldData, oldIdx, symbolEl, group, seriesModel); } }).execute(); this._nodeScaleRatio = seriesModel.get('nodeScaleRatio'); this._updateNodeAndLinkScale(seriesModel); if (seriesModel.get('expandAndCollapse') === true) { data.eachItemGraphicEl(function (el, dataIndex) { el.off('click').on('click', function () { api.dispatchAction({ type: 'treeExpandAndCollapse', seriesId: seriesModel.id, dataIndex: dataIndex }); }); }); } this._data = data; }; TreeView.prototype._updateViewCoordSys = function (seriesModel, api) { var data = seriesModel.getData(); var points = []; data.each(function (idx) { var layout = data.getItemLayout(idx); if (layout && !isNaN(layout.x) && !isNaN(layout.y)) { points.push([+layout.x, +layout.y]); } }); var min = []; var max = []; fromPoints(points, min, max); // If don't Store min max when collapse the root node after roam, // the root node will disappear. var oldMin = this._min; var oldMax = this._max; // If width or height is 0 if (max[0] - min[0] === 0) { min[0] = oldMin ? oldMin[0] : min[0] - 1; max[0] = oldMax ? oldMax[0] : max[0] + 1; } if (max[1] - min[1] === 0) { min[1] = oldMin ? oldMin[1] : min[1] - 1; max[1] = oldMax ? oldMax[1] : max[1] + 1; } var viewCoordSys = seriesModel.coordinateSystem = new coord_View(); viewCoordSys.zoomLimit = seriesModel.get('scaleLimit'); viewCoordSys.setBoundingRect(min[0], min[1], max[0] - min[0], max[1] - min[1]); viewCoordSys.setCenter(seriesModel.get('center'), api); viewCoordSys.setZoom(seriesModel.get('zoom')); // Here we use viewCoordSys just for computing the 'position' and 'scale' of the group this.group.attr({ x: viewCoordSys.x, y: viewCoordSys.y, scaleX: viewCoordSys.scaleX, scaleY: viewCoordSys.scaleY }); this._min = min; this._max = max; }; TreeView.prototype._updateController = function (seriesModel, ecModel, api) { var _this = this; var controller = this._controller; var controllerHost = this._controllerHost; var group = this.group; controller.setPointerChecker(function (e, x, y) { var rect = group.getBoundingRect(); rect.applyTransform(group.transform); return rect.contain(x, y) && !onIrrelevantElement(e, api, seriesModel); }); controller.enable(seriesModel.get('roam')); controllerHost.zoomLimit = seriesModel.get('scaleLimit'); controllerHost.zoom = seriesModel.coordinateSystem.getZoom(); controller.off('pan').off('zoom').on('pan', function (e) { updateViewOnPan(controllerHost, e.dx, e.dy); api.dispatchAction({ seriesId: seriesModel.id, type: 'treeRoam', dx: e.dx, dy: e.dy }); }).on('zoom', function (e) { updateViewOnZoom(controllerHost, e.scale, e.originX, e.originY); api.dispatchAction({ seriesId: seriesModel.id, type: 'treeRoam', zoom: e.scale, originX: e.originX, originY: e.originY }); _this._updateNodeAndLinkScale(seriesModel); // Only update label layout on zoom api.updateLabelLayout(); }); }; TreeView.prototype._updateNodeAndLinkScale = function (seriesModel) { var data = seriesModel.getData(); var nodeScale = this._getNodeGlobalScale(seriesModel); data.eachItemGraphicEl(function (el, idx) { el.setSymbolScale(nodeScale); }); }; TreeView.prototype._getNodeGlobalScale = function (seriesModel) { var coordSys = seriesModel.coordinateSystem; if (coordSys.type !== 'view') { return 1; } var nodeScaleRatio = this._nodeScaleRatio; var groupZoom = coordSys.scaleX || 1; // Scale node when zoom changes var roamZoom = coordSys.getZoom(); var nodeScale = (roamZoom - 1) * nodeScaleRatio + 1; return nodeScale / groupZoom; }; TreeView.prototype.dispose = function () { this._controller && this._controller.dispose(); this._controllerHost = null; }; TreeView.prototype.remove = function () { this._mainGroup.removeAll(); this._data = null; }; TreeView.type = 'tree'; return TreeView; }(Chart); function TreeView_symbolNeedsDraw(data, dataIndex) { var layout = data.getItemLayout(dataIndex); return layout && !isNaN(layout.x) && !isNaN(layout.y); } function updateNode(data, dataIndex, symbolEl, group, seriesModel) { var isInit = !symbolEl; var node = data.tree.getNodeByDataIndex(dataIndex); var itemModel = node.getModel(); var visualColor = node.getVisual('style').fill; var symbolInnerColor = node.isExpand === false && node.children.length !== 0 ? visualColor : '#fff'; var virtualRoot = data.tree.root; var source = node.parentNode === virtualRoot ? node : node.parentNode || node; var sourceSymbolEl = data.getItemGraphicEl(source.dataIndex); var sourceLayout = source.getLayout(); var sourceOldLayout = sourceSymbolEl ? { x: sourceSymbolEl.__oldX, y: sourceSymbolEl.__oldY, rawX: sourceSymbolEl.__radialOldRawX, rawY: sourceSymbolEl.__radialOldRawY } : sourceLayout; var targetLayout = node.getLayout(); if (isInit) { symbolEl = new helper_Symbol(data, dataIndex, null, { symbolInnerColor: symbolInnerColor, useNameLabel: true }); symbolEl.x = sourceOldLayout.x; symbolEl.y = sourceOldLayout.y; } else { symbolEl.updateData(data, dataIndex, null, { symbolInnerColor: symbolInnerColor, useNameLabel: true }); } symbolEl.__radialOldRawX = symbolEl.__radialRawX; symbolEl.__radialOldRawY = symbolEl.__radialRawY; symbolEl.__radialRawX = targetLayout.rawX; symbolEl.__radialRawY = targetLayout.rawY; group.add(symbolEl); data.setItemGraphicEl(dataIndex, symbolEl); symbolEl.__oldX = symbolEl.x; symbolEl.__oldY = symbolEl.y; updateProps(symbolEl, { x: targetLayout.x, y: targetLayout.y }, seriesModel); var symbolPath = symbolEl.getSymbolPath(); if (seriesModel.get('layout') === 'radial') { var realRoot = virtualRoot.children[0]; var rootLayout = realRoot.getLayout(); var length_1 = realRoot.children.length; var rad = void 0; var isLeft = void 0; if (targetLayout.x === rootLayout.x && node.isExpand === true && realRoot.children.length) { var center = { x: (realRoot.children[0].getLayout().x + realRoot.children[length_1 - 1].getLayout().x) / 2, y: (realRoot.children[0].getLayout().y + realRoot.children[length_1 - 1].getLayout().y) / 2 }; rad = Math.atan2(center.y - rootLayout.y, center.x - rootLayout.x); if (rad < 0) { rad = Math.PI * 2 + rad; } isLeft = center.x < rootLayout.x; if (isLeft) { rad = rad - Math.PI; } } else { rad = Math.atan2(targetLayout.y - rootLayout.y, targetLayout.x - rootLayout.x); if (rad < 0) { rad = Math.PI * 2 + rad; } if (node.children.length === 0 || node.children.length !== 0 && node.isExpand === false) { isLeft = targetLayout.x < rootLayout.x; if (isLeft) { rad = rad - Math.PI; } } else { isLeft = targetLayout.x > rootLayout.x; if (!isLeft) { rad = rad - Math.PI; } } } var textPosition = isLeft ? 'left' : 'right'; var normalLabelModel = itemModel.getModel('label'); var rotate = normalLabelModel.get('rotate'); var labelRotateRadian = rotate * (Math.PI / 180); var textContent = symbolPath.getTextContent(); if (textContent) { symbolPath.setTextConfig({ position: normalLabelModel.get('position') || textPosition, rotation: rotate == null ? -rad : labelRotateRadian, origin: 'center' }); textContent.setStyle('verticalAlign', 'middle'); } } // Handle status var focus = itemModel.get(['emphasis', 'focus']); var focusDataIndices = focus === 'relative' ? core_util["concatArray"](node.getAncestorsIndices(), node.getDescendantIndices()) : focus === 'ancestor' ? node.getAncestorsIndices() : focus === 'descendant' ? node.getDescendantIndices() : null; if (focusDataIndices) { // Modify the focus to data indices. getECData(symbolEl).focus = focusDataIndices; } drawEdge(seriesModel, node, virtualRoot, symbolEl, sourceOldLayout, sourceLayout, targetLayout, group); if (symbolEl.__edge) { symbolEl.onHoverStateChange = function (toState) { if (toState !== 'blur') { // NOTE: Ensure the parent elements will been blurred firstly. // According to the return of getAncestorsIndices and getDescendantIndices // TODO: A bit tricky. var parentEl = node.parentNode && data.getItemGraphicEl(node.parentNode.dataIndex); if (!(parentEl && parentEl.hoverState === HOVER_STATE_BLUR)) { setStatesFlag(symbolEl.__edge, toState); } } }; } } function drawEdge(seriesModel, node, virtualRoot, symbolEl, sourceOldLayout, sourceLayout, targetLayout, group) { var itemModel = node.getModel(); var edgeShape = seriesModel.get('edgeShape'); var layout = seriesModel.get('layout'); var orient = seriesModel.getOrient(); var curvature = seriesModel.get(['lineStyle', 'curveness']); var edgeForkPosition = seriesModel.get('edgeForkPosition'); var lineStyle = itemModel.getModel('lineStyle').getLineStyle(); var edge = symbolEl.__edge; // curve edge from node -> parent // polyline edge from node -> children if (edgeShape === 'curve') { if (node.parentNode && node.parentNode !== virtualRoot) { if (!edge) { edge = symbolEl.__edge = new shape_BezierCurve({ shape: getEdgeShape(layout, orient, curvature, sourceOldLayout, sourceOldLayout) }); } updateProps(edge, { shape: getEdgeShape(layout, orient, curvature, sourceLayout, targetLayout) }, seriesModel); } } else if (edgeShape === 'polyline') { if (layout === 'orthogonal') { if (node !== virtualRoot && node.children && node.children.length !== 0 && node.isExpand === true) { var children = node.children; var childPoints = []; for (var i = 0; i < children.length; i++) { var childLayout = children[i].getLayout(); childPoints.push([childLayout.x, childLayout.y]); } if (!edge) { edge = symbolEl.__edge = new TreeView_TreePath({ shape: { parentPoint: [targetLayout.x, targetLayout.y], childPoints: [[targetLayout.x, targetLayout.y]], orient: orient, forkPosition: edgeForkPosition } }); } updateProps(edge, { shape: { parentPoint: [targetLayout.x, targetLayout.y], childPoints: childPoints } }, seriesModel); } } else { if (false) { throw new Error('The polyline edgeShape can only be used in orthogonal layout'); } } } // show all edge when edgeShape is 'curve', filter node `isExpand` is false when edgeShape is 'polyline' if (edge && !(edgeShape === 'polyline' && !node.isExpand)) { edge.useStyle(core_util["defaults"]({ strokeNoScale: true, fill: null }, lineStyle)); setStatesStylesFromModel(edge, itemModel, 'lineStyle'); setDefaultStateProxy(edge); group.add(edge); } } function removeNodeEdge(node, data, group, seriesModel, removeAnimationOpt) { var virtualRoot = data.tree.root; var _a = getSourceNode(virtualRoot, node), source = _a.source, sourceLayout = _a.sourceLayout; var symbolEl = data.getItemGraphicEl(node.dataIndex); if (!symbolEl) { return; } var sourceSymbolEl = data.getItemGraphicEl(source.dataIndex); var sourceEdge = sourceSymbolEl.__edge; // 1. when expand the sub tree, delete the children node should delete the edge of // the source at the same time. because the polyline edge shape is only owned by the source. // 2.when the node is the only children of the source, delete the node should delete the edge of // the source at the same time. the same reason as above. var edge = symbolEl.__edge || (source.isExpand === false || source.children.length === 1 ? sourceEdge : undefined); var edgeShape = seriesModel.get('edgeShape'); var layoutOpt = seriesModel.get('layout'); var orient = seriesModel.get('orient'); var curvature = seriesModel.get(['lineStyle', 'curveness']); if (edge) { if (edgeShape === 'curve') { removeElement(edge, { shape: getEdgeShape(layoutOpt, orient, curvature, sourceLayout, sourceLayout), style: { opacity: 0 } }, seriesModel, { cb: function () { group.remove(edge); }, removeOpt: removeAnimationOpt }); } else if (edgeShape === 'polyline' && seriesModel.get('layout') === 'orthogonal') { removeElement(edge, { shape: { parentPoint: [sourceLayout.x, sourceLayout.y], childPoints: [[sourceLayout.x, sourceLayout.y]] }, style: { opacity: 0 } }, seriesModel, { cb: function () { group.remove(edge); }, removeOpt: removeAnimationOpt }); } } } function getSourceNode(virtualRoot, node) { var source = node.parentNode === virtualRoot ? node : node.parentNode || node; var sourceLayout; while (sourceLayout = source.getLayout(), sourceLayout == null) { source = source.parentNode === virtualRoot ? source : source.parentNode || source; } return { source: source, sourceLayout: sourceLayout }; } function TreeView_removeNode(data, dataIndex, symbolEl, group, seriesModel) { var node = data.tree.getNodeByDataIndex(dataIndex); var virtualRoot = data.tree.root; var sourceLayout = getSourceNode(virtualRoot, node).sourceLayout; // Use same duration and easing with update to have more consistent animation. var removeAnimationOpt = { duration: seriesModel.get('animationDurationUpdate'), easing: seriesModel.get('animationEasingUpdate') }; removeElement(symbolEl, { x: sourceLayout.x + 1, y: sourceLayout.y + 1 }, seriesModel, { cb: function () { group.remove(symbolEl); data.setItemGraphicEl(dataIndex, null); }, removeOpt: removeAnimationOpt }); symbolEl.fadeOut(null, data.hostModel, { fadeLabel: true, animation: removeAnimationOpt }); // remove edge as parent node node.children.forEach(function (childNode) { removeNodeEdge(childNode, data, group, seriesModel, removeAnimationOpt); }); // remove edge as child node removeNodeEdge(node, data, group, seriesModel, removeAnimationOpt); } function getEdgeShape(layoutOpt, orient, curvature, sourceLayout, targetLayout) { var cpx1; var cpy1; var cpx2; var cpy2; var x1; var x2; var y1; var y2; if (layoutOpt === 'radial') { x1 = sourceLayout.rawX; y1 = sourceLayout.rawY; x2 = targetLayout.rawX; y2 = targetLayout.rawY; var radialCoor1 = radialCoordinate(x1, y1); var radialCoor2 = radialCoordinate(x1, y1 + (y2 - y1) * curvature); var radialCoor3 = radialCoordinate(x2, y2 + (y1 - y2) * curvature); var radialCoor4 = radialCoordinate(x2, y2); return { x1: radialCoor1.x || 0, y1: radialCoor1.y || 0, x2: radialCoor4.x || 0, y2: radialCoor4.y || 0, cpx1: radialCoor2.x || 0, cpy1: radialCoor2.y || 0, cpx2: radialCoor3.x || 0, cpy2: radialCoor3.y || 0 }; } else { x1 = sourceLayout.x; y1 = sourceLayout.y; x2 = targetLayout.x; y2 = targetLayout.y; if (orient === 'LR' || orient === 'RL') { cpx1 = x1 + (x2 - x1) * curvature; cpy1 = y1; cpx2 = x2 + (x1 - x2) * curvature; cpy2 = y2; } if (orient === 'TB' || orient === 'BT') { cpx1 = x1; cpy1 = y1 + (y2 - y1) * curvature; cpx2 = x2; cpy2 = y2 + (y1 - y2) * curvature; } } return { x1: x1, y1: y1, x2: x2, y2: y2, cpx1: cpx1, cpy1: cpy1, cpx2: cpx2, cpy2: cpy2 }; } /* harmony default export */ var tree_TreeView = (TreeView_TreeView); // CONCATENATED MODULE: ./node_modules/echarts/lib/data/helper/linkSeriesData.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ /** * Link lists and struct (graph or tree) */ var linkSeriesData_inner = makeInner(); function linkSeriesData(opt) { var mainData = opt.mainData; var datas = opt.datas; if (!datas) { datas = { main: mainData }; opt.datasAttr = { main: 'data' }; } opt.datas = opt.mainData = null; linkAll(mainData, datas, opt); // Porxy data original methods. Object(core_util["each"])(datas, function (data) { Object(core_util["each"])(mainData.TRANSFERABLE_METHODS, function (methodName) { data.wrapMethod(methodName, Object(core_util["curry"])(transferInjection, opt)); }); }); // Beyond transfer, additional features should be added to `cloneShallow`. mainData.wrapMethod('cloneShallow', Object(core_util["curry"])(cloneShallowInjection, opt)); // Only mainData trigger change, because struct.update may trigger // another changable methods, which may bring about dead lock. Object(core_util["each"])(mainData.CHANGABLE_METHODS, function (methodName) { mainData.wrapMethod(methodName, Object(core_util["curry"])(changeInjection, opt)); }); // Make sure datas contains mainData. Object(core_util["assert"])(datas[mainData.dataType] === mainData); } function transferInjection(opt, res) { if (isMainData(this)) { // Transfer datas to new main data. var datas = Object(core_util["extend"])({}, linkSeriesData_inner(this).datas); datas[this.dataType] = res; linkAll(res, datas, opt); } else { // Modify the reference in main data to point newData. linkSingle(res, this.dataType, linkSeriesData_inner(this).mainData, opt); } return res; } function changeInjection(opt, res) { opt.struct && opt.struct.update(); return res; } function cloneShallowInjection(opt, res) { // cloneShallow, which brings about some fragilities, may be inappropriate // to be exposed as an API. So for implementation simplicity we can make // the restriction that cloneShallow of not-mainData should not be invoked // outside, but only be invoked here. Object(core_util["each"])(linkSeriesData_inner(res).datas, function (data, dataType) { data !== res && linkSingle(data.cloneShallow(), dataType, res, opt); }); return res; } /** * Supplement method to List. * * @public * @param [dataType] If not specified, return mainData. */ function getLinkedData(dataType) { var mainData = linkSeriesData_inner(this).mainData; return dataType == null || mainData == null ? mainData : linkSeriesData_inner(mainData).datas[dataType]; } /** * Get list of all linked data */ function getLinkedDataAll() { var mainData = linkSeriesData_inner(this).mainData; return mainData == null ? [{ data: mainData }] : Object(core_util["map"])(Object(core_util["keys"])(linkSeriesData_inner(mainData).datas), function (type) { return { type: type, data: linkSeriesData_inner(mainData).datas[type] }; }); } function isMainData(data) { return linkSeriesData_inner(data).mainData === data; } function linkAll(mainData, datas, opt) { linkSeriesData_inner(mainData).datas = {}; Object(core_util["each"])(datas, function (data, dataType) { linkSingle(data, dataType, mainData, opt); }); } function linkSingle(data, dataType, mainData, opt) { linkSeriesData_inner(mainData).datas[dataType] = data; linkSeriesData_inner(data).mainData = mainData; data.dataType = dataType; if (opt.struct) { data[opt.structAttr] = opt.struct; opt.struct[opt.datasAttr[dataType]] = data; } // Supplement method. data.getLinkedData = getLinkedData; data.getLinkedDataAll = getLinkedDataAll; } /* harmony default export */ var helper_linkSeriesData = (linkSeriesData); // CONCATENATED MODULE: ./node_modules/echarts/lib/data/Tree.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ /** * Tree data structure */ var Tree_TreeNode = /** @class */function () { function TreeNode(name, hostTree) { this.depth = 0; this.height = 0; /** * Reference to list item. * Do not persistent dataIndex outside, * besause it may be changed by list. * If dataIndex -1, * this node is logical deleted (filtered) in list. */ this.dataIndex = -1; this.children = []; this.viewChildren = []; this.isExpand = false; this.name = name || ''; this.hostTree = hostTree; } /** * The node is removed. */ TreeNode.prototype.isRemoved = function () { return this.dataIndex < 0; }; TreeNode.prototype.eachNode = function (options, cb, context) { if (core_util["isFunction"](options)) { context = cb; cb = options; options = null; } options = options || {}; if (core_util["isString"](options)) { options = { order: options }; } var order = options.order || 'preorder'; var children = this[options.attr || 'children']; var suppressVisitSub; order === 'preorder' && (suppressVisitSub = cb.call(context, this)); for (var i = 0; !suppressVisitSub && i < children.length; i++) { children[i].eachNode(options, cb, context); } order === 'postorder' && cb.call(context, this); }; /** * Update depth and height of this subtree. */ TreeNode.prototype.updateDepthAndHeight = function (depth) { var height = 0; this.depth = depth; for (var i = 0; i < this.children.length; i++) { var child = this.children[i]; child.updateDepthAndHeight(depth + 1); if (child.height > height) { height = child.height; } } this.height = height + 1; }; TreeNode.prototype.getNodeById = function (id) { if (this.getId() === id) { return this; } for (var i = 0, children = this.children, len = children.length; i < len; i++) { var res = children[i].getNodeById(id); if (res) { return res; } } }; TreeNode.prototype.contains = function (node) { if (node === this) { return true; } for (var i = 0, children = this.children, len = children.length; i < len; i++) { var res = children[i].contains(node); if (res) { return res; } } }; /** * @param includeSelf Default false. * @return order: [root, child, grandchild, ...] */ TreeNode.prototype.getAncestors = function (includeSelf) { var ancestors = []; var node = includeSelf ? this : this.parentNode; while (node) { ancestors.push(node); node = node.parentNode; } ancestors.reverse(); return ancestors; }; TreeNode.prototype.getAncestorsIndices = function () { var indices = []; var currNode = this; while (currNode) { indices.push(currNode.dataIndex); currNode = currNode.parentNode; } indices.reverse(); return indices; }; TreeNode.prototype.getDescendantIndices = function () { var indices = []; this.eachNode(function (childNode) { indices.push(childNode.dataIndex); }); return indices; }; TreeNode.prototype.getValue = function (dimension) { var data = this.hostTree.data; return data.getStore().get(data.getDimensionIndex(dimension || 'value'), this.dataIndex); }; TreeNode.prototype.setLayout = function (layout, merge) { this.dataIndex >= 0 && this.hostTree.data.setItemLayout(this.dataIndex, layout, merge); }; /** * @return {Object} layout */ TreeNode.prototype.getLayout = function () { return this.hostTree.data.getItemLayout(this.dataIndex); }; // @depcrecated // getModel(path: S): Model // eslint-disable-next-line @typescript-eslint/no-unused-vars TreeNode.prototype.getModel = function (path) { if (this.dataIndex < 0) { return; } var hostTree = this.hostTree; var itemModel = hostTree.data.getItemModel(this.dataIndex); return itemModel.getModel(path); }; // TODO: TYPE More specific model TreeNode.prototype.getLevelModel = function () { return (this.hostTree.levelModels || [])[this.depth]; }; TreeNode.prototype.setVisual = function (key, value) { this.dataIndex >= 0 && this.hostTree.data.setItemVisual(this.dataIndex, key, value); }; /** * Get item visual * FIXME: make return type better */ TreeNode.prototype.getVisual = function (key) { return this.hostTree.data.getItemVisual(this.dataIndex, key); }; TreeNode.prototype.getRawIndex = function () { return this.hostTree.data.getRawIndex(this.dataIndex); }; TreeNode.prototype.getId = function () { return this.hostTree.data.getId(this.dataIndex); }; /** * index in parent's children */ TreeNode.prototype.getChildIndex = function () { if (this.parentNode) { var children = this.parentNode.children; for (var i = 0; i < children.length; ++i) { if (children[i] === this) { return i; } } return -1; } return -1; }; /** * if this is an ancestor of another node * * @param node another node * @return if is ancestor */ TreeNode.prototype.isAncestorOf = function (node) { var parent = node.parentNode; while (parent) { if (parent === this) { return true; } parent = parent.parentNode; } return false; }; /** * if this is an descendant of another node * * @param node another node * @return if is descendant */ TreeNode.prototype.isDescendantOf = function (node) { return node !== this && node.isAncestorOf(this); }; return TreeNode; }(); ; var Tree_Tree = /** @class */function () { function Tree(hostModel) { this.type = 'tree'; this._nodes = []; this.hostModel = hostModel; } Tree.prototype.eachNode = function (options, cb, context) { this.root.eachNode(options, cb, context); }; Tree.prototype.getNodeByDataIndex = function (dataIndex) { var rawIndex = this.data.getRawIndex(dataIndex); return this._nodes[rawIndex]; }; Tree.prototype.getNodeById = function (name) { return this.root.getNodeById(name); }; /** * Update item available by list, * when list has been performed options like 'filterSelf' or 'map'. */ Tree.prototype.update = function () { var data = this.data; var nodes = this._nodes; for (var i = 0, len = nodes.length; i < len; i++) { nodes[i].dataIndex = -1; } for (var i = 0, len = data.count(); i < len; i++) { nodes[data.getRawIndex(i)].dataIndex = i; } }; /** * Clear all layouts */ Tree.prototype.clearLayouts = function () { this.data.clearItemLayouts(); }; /** * data node format: * { * name: ... * value: ... * children: [ * { * name: ... * value: ... * children: ... * }, * ... * ] * } */ Tree.createTree = function (dataRoot, hostModel, beforeLink) { var tree = new Tree(hostModel); var listData = []; var dimMax = 1; buildHierarchy(dataRoot); function buildHierarchy(dataNode, parentNode) { var value = dataNode.value; dimMax = Math.max(dimMax, core_util["isArray"](value) ? value.length : 1); listData.push(dataNode); var node = new Tree_TreeNode(convertOptionIdName(dataNode.name, ''), tree); parentNode ? addChild(node, parentNode) : tree.root = node; tree._nodes.push(node); var children = dataNode.children; if (children) { for (var i = 0; i < children.length; i++) { buildHierarchy(children[i], node); } } } tree.root.updateDepthAndHeight(0); var dimensions = prepareSeriesDataSchema(listData, { coordDimensions: ['value'], dimensionsCount: dimMax }).dimensions; var list = new data_SeriesData(dimensions, hostModel); list.initData(listData); beforeLink && beforeLink(list); helper_linkSeriesData({ mainData: list, struct: tree, structAttr: 'tree' }); tree.update(); return tree; }; return Tree; }(); /** * It is needed to consider the mess of 'list', 'hostModel' when creating a TreeNote, * so this function is not ready and not necessary to be public. */ function addChild(child, node) { var children = node.children; if (child.parentNode === node) { return; } children.push(child); child.parentNode = node; } /* harmony default export */ var data_Tree = (Tree_Tree); // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/helper/treeHelper.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 retrieveTargetInfo(payload, validPayloadTypes, seriesModel) { if (payload && core_util["indexOf"](validPayloadTypes, payload.type) >= 0) { var root = seriesModel.getData().tree.root; var targetNode = payload.targetNode; if (core_util["isString"](targetNode)) { targetNode = root.getNodeById(targetNode); } if (targetNode && root.contains(targetNode)) { return { node: targetNode }; } var targetNodeId = payload.targetNodeId; if (targetNodeId != null && (targetNode = root.getNodeById(targetNodeId))) { return { node: targetNode }; } } } // Not includes the given node at the last item. function getPathToRoot(node) { var path = []; while (node) { node = node.parentNode; node && path.push(node); } return path.reverse(); } function aboveViewRoot(viewRoot, node) { var viewPath = getPathToRoot(viewRoot); return core_util["indexOf"](viewPath, node) >= 0; } // From root to the input node (the input node will be included). function wrapTreePathInfo(node, seriesModel) { var treePathInfo = []; while (node) { var nodeDataIndex = node.dataIndex; treePathInfo.push({ name: node.name, dataIndex: nodeDataIndex, value: seriesModel.getRawValue(nodeDataIndex) }); node = node.parentNode; } treePathInfo.reverse(); return treePathInfo; } // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/tree/TreeSeries.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 TreeSeries_TreeSeriesModel = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(TreeSeriesModel, _super); function TreeSeriesModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.hasSymbolVisual = true; // Do it self. _this.ignoreStyleOnData = true; return _this; } /** * Init a tree data structure from data in option series */ TreeSeriesModel.prototype.getInitialData = function (option) { // create a virtual root var root = { name: option.name, children: option.data }; var leaves = option.leaves || {}; var leavesModel = new model_Model(leaves, this, this.ecModel); var tree = data_Tree.createTree(root, this, beforeLink); function beforeLink(nodeData) { nodeData.wrapMethod('getItemModel', function (model, idx) { var node = tree.getNodeByDataIndex(idx); if (!(node && node.children.length && node.isExpand)) { model.parentModel = leavesModel; } return model; }); } var treeDepth = 0; tree.eachNode('preorder', function (node) { if (node.depth > treeDepth) { treeDepth = node.depth; } }); var expandAndCollapse = option.expandAndCollapse; var expandTreeDepth = expandAndCollapse && option.initialTreeDepth >= 0 ? option.initialTreeDepth : treeDepth; tree.root.eachNode('preorder', function (node) { var item = node.hostTree.data.getRawDataItem(node.dataIndex); // Add item.collapsed != null, because users can collapse node original in the series.data. node.isExpand = item && item.collapsed != null ? !item.collapsed : node.depth <= expandTreeDepth; }); return tree.data; }; /** * Make the configuration 'orient' backward compatibly, with 'horizontal = LR', 'vertical = TB'. * @returns {string} orient */ TreeSeriesModel.prototype.getOrient = function () { var orient = this.get('orient'); if (orient === 'horizontal') { orient = 'LR'; } else if (orient === 'vertical') { orient = 'TB'; } return orient; }; TreeSeriesModel.prototype.setZoom = function (zoom) { this.option.zoom = zoom; }; TreeSeriesModel.prototype.setCenter = function (center) { this.option.center = center; }; TreeSeriesModel.prototype.formatTooltip = function (dataIndex, multipleSeries, dataType) { var tree = this.getData().tree; var realRoot = tree.root.children[0]; var node = tree.getNodeByDataIndex(dataIndex); var value = node.getValue(); var name = node.name; while (node && node !== realRoot) { name = node.parentNode.name + '.' + name; node = node.parentNode; } return createTooltipMarkup('nameValue', { name: name, value: value, noValue: isNaN(value) || value == null }); }; // Add tree path to tooltip param TreeSeriesModel.prototype.getDataParams = function (dataIndex) { var params = _super.prototype.getDataParams.apply(this, arguments); var node = this.getData().tree.getNodeByDataIndex(dataIndex); params.treeAncestors = wrapTreePathInfo(node, this); params.collapsed = !node.isExpand; return params; }; TreeSeriesModel.type = 'series.tree'; // can support the position parameters 'left', 'top','right','bottom', 'width', // 'height' in the setOption() with 'merge' mode normal. TreeSeriesModel.layoutMode = 'box'; TreeSeriesModel.defaultOption = { // zlevel: 0, z: 2, coordinateSystem: 'view', // the position of the whole view left: '12%', top: '12%', right: '12%', bottom: '12%', // the layout of the tree, two value can be selected, 'orthogonal' or 'radial' layout: 'orthogonal', // value can be 'polyline' edgeShape: 'curve', edgeForkPosition: '50%', // true | false | 'move' | 'scale', see module:component/helper/RoamController. roam: false, // Symbol size scale ratio in roam nodeScaleRatio: 0.4, // Default on center of graph center: null, zoom: 1, orient: 'LR', symbol: 'emptyCircle', symbolSize: 7, expandAndCollapse: true, initialTreeDepth: 2, lineStyle: { color: '#ccc', width: 1.5, curveness: 0.5 }, itemStyle: { color: 'lightsteelblue', // borderColor: '#c23531', borderWidth: 1.5 }, label: { show: true }, animationEasing: 'linear', animationDuration: 700, animationDurationUpdate: 500 }; return TreeSeriesModel; }(Series); /* harmony default export */ var TreeSeries = (TreeSeries_TreeSeriesModel); // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/tree/traversalHelper.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ /** * Traverse the tree from bottom to top and do something */ function eachAfter(root, callback, separation) { var nodes = [root]; var next = []; var node; while (node = nodes.pop()) { // jshint ignore:line next.push(node); if (node.isExpand) { var children = node.children; if (children.length) { for (var i = 0; i < children.length; i++) { nodes.push(children[i]); } } } } while (node = next.pop()) { // jshint ignore:line callback(node, separation); } } /** * Traverse the tree from top to bottom and do something */ function eachBefore(root, callback) { var nodes = [root]; var node; while (node = nodes.pop()) { // jshint ignore:line callback(node); if (node.isExpand) { var children = node.children; if (children.length) { for (var i = children.length - 1; i >= 0; i--) { nodes.push(children[i]); } } } } } // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/tree/treeLayout.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 treeLayout(ecModel, api) { ecModel.eachSeriesByType('tree', function (seriesModel) { commonLayout(seriesModel, api); }); } function commonLayout(seriesModel, api) { var layoutInfo = layoutHelper_getViewRect(seriesModel, api); seriesModel.layoutInfo = layoutInfo; var layout = seriesModel.get('layout'); var width = 0; var height = 0; var separation = null; if (layout === 'radial') { width = 2 * Math.PI; height = Math.min(layoutInfo.height, layoutInfo.width) / 2; separation = layoutHelper_separation(function (node1, node2) { return (node1.parentNode === node2.parentNode ? 1 : 2) / node1.depth; }); } else { width = layoutInfo.width; height = layoutInfo.height; separation = layoutHelper_separation(); } var virtualRoot = seriesModel.getData().tree.root; var realRoot = virtualRoot.children[0]; if (realRoot) { layoutHelper_init(virtualRoot); eachAfter(realRoot, firstWalk, separation); virtualRoot.hierNode.modifier = -realRoot.hierNode.prelim; eachBefore(realRoot, secondWalk); var left_1 = realRoot; var right_1 = realRoot; var bottom_1 = realRoot; eachBefore(realRoot, function (node) { var x = node.getLayout().x; if (x < left_1.getLayout().x) { left_1 = node; } if (x > right_1.getLayout().x) { right_1 = node; } if (node.depth > bottom_1.depth) { bottom_1 = node; } }); var delta = left_1 === right_1 ? 1 : separation(left_1, right_1) / 2; var tx_1 = delta - left_1.getLayout().x; var kx_1 = 0; var ky_1 = 0; var coorX_1 = 0; var coorY_1 = 0; if (layout === 'radial') { kx_1 = width / (right_1.getLayout().x + delta + tx_1); // here we use (node.depth - 1), bucause the real root's depth is 1 ky_1 = height / (bottom_1.depth - 1 || 1); eachBefore(realRoot, function (node) { coorX_1 = (node.getLayout().x + tx_1) * kx_1; coorY_1 = (node.depth - 1) * ky_1; var finalCoor = radialCoordinate(coorX_1, coorY_1); node.setLayout({ x: finalCoor.x, y: finalCoor.y, rawX: coorX_1, rawY: coorY_1 }, true); }); } else { var orient_1 = seriesModel.getOrient(); if (orient_1 === 'RL' || orient_1 === 'LR') { ky_1 = height / (right_1.getLayout().x + delta + tx_1); kx_1 = width / (bottom_1.depth - 1 || 1); eachBefore(realRoot, function (node) { coorY_1 = (node.getLayout().x + tx_1) * ky_1; coorX_1 = orient_1 === 'LR' ? (node.depth - 1) * kx_1 : width - (node.depth - 1) * kx_1; node.setLayout({ x: coorX_1, y: coorY_1 }, true); }); } else if (orient_1 === 'TB' || orient_1 === 'BT') { kx_1 = width / (right_1.getLayout().x + delta + tx_1); ky_1 = height / (bottom_1.depth - 1 || 1); eachBefore(realRoot, function (node) { coorX_1 = (node.getLayout().x + tx_1) * kx_1; coorY_1 = orient_1 === 'TB' ? (node.depth - 1) * ky_1 : height - (node.depth - 1) * ky_1; node.setLayout({ x: coorX_1, y: coorY_1 }, true); }); } } } } // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/tree/treeVisual.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 treeVisual(ecModel) { ecModel.eachSeriesByType('tree', function (seriesModel) { var data = seriesModel.getData(); var tree = data.tree; tree.eachNode(function (node) { var model = node.getModel(); // TODO Optimize var style = model.getModel('itemStyle').getItemStyle(); var existsStyle = data.ensureUniqueItemVisual(node.dataIndex, 'style'); Object(core_util["extend"])(existsStyle, style); }); }); } // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/tree/treeAction.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 installTreeAction(registers) { registers.registerAction({ type: 'treeExpandAndCollapse', event: 'treeExpandAndCollapse', update: 'update' }, function (payload, ecModel) { ecModel.eachComponent({ mainType: 'series', subType: 'tree', query: payload }, function (seriesModel) { var dataIndex = payload.dataIndex; var tree = seriesModel.getData().tree; var node = tree.getNodeByDataIndex(dataIndex); node.isExpand = !node.isExpand; }); }); registers.registerAction({ type: 'treeRoam', event: 'treeRoam', // Here we set 'none' instead of 'update', because roam action // just need to update the transform matrix without having to recalculate // the layout. So don't need to go through the whole update process, such // as 'dataPrcocess', 'coordSystemUpdate', 'layout' and so on. update: 'none' }, function (payload, ecModel, api) { ecModel.eachComponent({ mainType: 'series', subType: 'tree', query: payload }, function (seriesModel) { var coordSys = seriesModel.coordinateSystem; var res = updateCenterAndZoom(coordSys, payload, undefined, api); seriesModel.setCenter && seriesModel.setCenter(res.center); seriesModel.setZoom && seriesModel.setZoom(res.zoom); }); }); } // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/tree/install.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 tree_install_install(registers) { registers.registerChartView(tree_TreeView); registers.registerSeriesModel(TreeSeries); registers.registerLayout(treeLayout); registers.registerVisual(treeVisual); installTreeAction(registers); } // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/treemap/treemapAction.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 actionTypes = ['treemapZoomToNode', 'treemapRender', 'treemapMove']; function installTreemapAction(registers) { for (var i = 0; i < actionTypes.length; i++) { registers.registerAction({ type: actionTypes[i], update: 'updateView' }, core_util["noop"]); } registers.registerAction({ type: 'treemapRootToNode', update: 'updateView' }, function (payload, ecModel) { ecModel.eachComponent({ mainType: 'series', subType: 'treemap', query: payload }, handleRootToNode); function handleRootToNode(model, index) { var types = ['treemapZoomToNode', 'treemapRootToNode']; var targetInfo = retrieveTargetInfo(payload, types, model); if (targetInfo) { var originViewRoot = model.getViewRoot(); if (originViewRoot) { payload.direction = aboveViewRoot(originViewRoot, targetInfo.node) ? 'rollUp' : 'drillDown'; } model.resetViewRoot(targetInfo.node); } } }); } // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/helper/enableAriaDecalForTree.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 enableAriaDecalForTree(seriesModel) { var data = seriesModel.getData(); var tree = data.tree; var decalPaletteScope = {}; tree.eachNode(function (node) { // Use decal of level 1 node var current = node; while (current && current.depth > 1) { current = current.parentNode; } var decal = getDecalFromPalette(seriesModel.ecModel, current.name || current.dataIndex + '', decalPaletteScope); node.setVisual('decal', decal); }); } // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/treemap/TreemapSeries.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 TreemapSeries_TreemapSeriesModel = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(TreemapSeriesModel, _super); function TreemapSeriesModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = TreemapSeriesModel.type; _this.preventUsingHoverLayer = true; return _this; } /** * @override */ TreemapSeriesModel.prototype.getInitialData = function (option, ecModel) { // Create a virtual root. var root = { name: option.name, children: option.data }; completeTreeValue(root); var levels = option.levels || []; // Used in "visual priority" in `treemapVisual.js`. // This way is a little tricky, must satisfy the precondition: // 1. There is no `treeNode.getModel('itemStyle.xxx')` used. // 2. The `Model.prototype.getModel()` will not use any clone-like way. var designatedVisualItemStyle = this.designatedVisualItemStyle = {}; var designatedVisualModel = new model_Model({ itemStyle: designatedVisualItemStyle }, this, ecModel); levels = option.levels = setDefault(levels, ecModel); var levelModels = core_util["map"](levels || [], function (levelDefine) { return new model_Model(levelDefine, designatedVisualModel, ecModel); }, this); // Make sure always a new tree is created when setOption, // in TreemapView, we check whether oldTree === newTree // to choose mappings approach among old shapes and new shapes. var tree = data_Tree.createTree(root, this, beforeLink); function beforeLink(nodeData) { nodeData.wrapMethod('getItemModel', function (model, idx) { var node = tree.getNodeByDataIndex(idx); var levelModel = node ? levelModels[node.depth] : null; // If no levelModel, we also need `designatedVisualModel`. model.parentModel = levelModel || designatedVisualModel; return model; }); } return tree.data; }; TreemapSeriesModel.prototype.optionUpdated = function () { this.resetViewRoot(); }; /** * @override * @param {number} dataIndex * @param {boolean} [mutipleSeries=false] */ TreemapSeriesModel.prototype.formatTooltip = function (dataIndex, multipleSeries, dataType) { var data = this.getData(); var value = this.getRawValue(dataIndex); var name = data.getName(dataIndex); return createTooltipMarkup('nameValue', { name: name, value: value }); }; /** * Add tree path to tooltip param * * @override * @param {number} dataIndex * @return {Object} */ TreemapSeriesModel.prototype.getDataParams = function (dataIndex) { var params = _super.prototype.getDataParams.apply(this, arguments); var node = this.getData().tree.getNodeByDataIndex(dataIndex); params.treeAncestors = wrapTreePathInfo(node, this); // compatitable the previous code. params.treePathInfo = params.treeAncestors; return params; }; /** * @public * @param {Object} layoutInfo { * x: containerGroup x * y: containerGroup y * width: containerGroup width * height: containerGroup height * } */ TreemapSeriesModel.prototype.setLayoutInfo = function (layoutInfo) { /** * @readOnly * @type {Object} */ this.layoutInfo = this.layoutInfo || {}; core_util["extend"](this.layoutInfo, layoutInfo); }; /** * @param {string} id * @return {number} index */ TreemapSeriesModel.prototype.mapIdToIndex = function (id) { // A feature is implemented: // index is monotone increasing with the sequence of // input id at the first time. // This feature can make sure that each data item and its // mapped color have the same index between data list and // color list at the beginning, which is useful for user // to adjust data-color mapping. /** * @private * @type {Object} */ var idIndexMap = this._idIndexMap; if (!idIndexMap) { idIndexMap = this._idIndexMap = core_util["createHashMap"](); /** * @private * @type {number} */ this._idIndexMapCount = 0; } var index = idIndexMap.get(id); if (index == null) { idIndexMap.set(id, index = this._idIndexMapCount++); } return index; }; TreemapSeriesModel.prototype.getViewRoot = function () { return this._viewRoot; }; TreemapSeriesModel.prototype.resetViewRoot = function (viewRoot) { viewRoot ? this._viewRoot = viewRoot : viewRoot = this._viewRoot; var root = this.getRawData().tree.root; if (!viewRoot || viewRoot !== root && !root.contains(viewRoot)) { this._viewRoot = root; } }; TreemapSeriesModel.prototype.enableAriaDecal = function () { enableAriaDecalForTree(this); }; TreemapSeriesModel.type = 'series.treemap'; TreemapSeriesModel.layoutMode = 'box'; TreemapSeriesModel.defaultOption = { // Disable progressive rendering progressive: 0, // size: ['80%', '80%'], // deprecated, compatible with ec2. left: 'center', top: 'middle', width: '80%', height: '80%', sort: true, clipWindow: 'origin', squareRatio: 0.5 * (1 + Math.sqrt(5)), leafDepth: null, drillDownIcon: '▶', // to align specialized icon. ▷▶❒❐▼✚ zoomToNodeRatio: 0.32 * 0.32, scaleLimit: null, roam: true, nodeClick: 'zoomToNode', animation: true, animationDurationUpdate: 900, animationEasing: 'quinticInOut', breadcrumb: { show: true, height: 22, left: 'center', top: 'bottom', // right // bottom emptyItemWidth: 25, itemStyle: { color: 'rgba(0,0,0,0.7)', textStyle: { color: '#fff' } }, emphasis: { itemStyle: { color: 'rgba(0,0,0,0.9)' // '#5793f3', } } }, label: { show: true, // Do not use textDistance, for ellipsis rect just the same as treemap node rect. distance: 0, padding: 5, position: 'inside', // formatter: null, color: '#fff', overflow: 'truncate' // align // verticalAlign }, upperLabel: { show: false, position: [0, '50%'], height: 20, // formatter: null, // color: '#fff', overflow: 'truncate', // align: null, verticalAlign: 'middle' }, itemStyle: { color: null, colorAlpha: null, colorSaturation: null, borderWidth: 0, gapWidth: 0, borderColor: '#fff', borderColorSaturation: null // If specified, borderColor will be ineffective, and the // border color is evaluated by color of current node and // borderColorSaturation. }, emphasis: { upperLabel: { show: true, position: [0, '50%'], overflow: 'truncate', verticalAlign: 'middle' } }, visualDimension: 0, visualMin: null, visualMax: null, color: [], // level[n].color (if necessary). // + Specify color list of each level. level[0].color would be global // color list if not specified. (see method `setDefault`). // + But set as a empty array to forbid fetch color from global palette // when using nodeModel.get('color'), otherwise nodes on deep level // will always has color palette set and are not able to inherit color // from parent node. // + TreemapSeries.color can not be set as 'none', otherwise effect // legend color fetching (see seriesColor.js). colorAlpha: null, colorSaturation: null, colorMappingBy: 'index', visibleMin: 10, // be rendered. Only works when sort is 'asc' or 'desc'. childrenVisibleMin: null, // grandchildren will not show. // Why grandchildren? If not grandchildren but children, // some siblings show children and some not, // the appearance may be mess and not consistent, levels: [] // Each item: { // visibleMin, itemStyle, visualDimension, label // } }; return TreemapSeriesModel; }(Series); /** * @param {Object} dataNode */ function completeTreeValue(dataNode) { // Postorder travel tree. // If value of none-leaf node is not set, // calculate it by suming up the value of all children. var sum = 0; core_util["each"](dataNode.children, function (child) { completeTreeValue(child); var childValue = child.value; core_util["isArray"](childValue) && (childValue = childValue[0]); sum += childValue; }); var thisValue = dataNode.value; if (core_util["isArray"](thisValue)) { thisValue = thisValue[0]; } if (thisValue == null || isNaN(thisValue)) { thisValue = sum; } // Value should not less than 0. if (thisValue < 0) { thisValue = 0; } core_util["isArray"](dataNode.value) ? dataNode.value[0] = thisValue : dataNode.value = thisValue; } /** * set default to level configuration */ function setDefault(levels, ecModel) { var globalColorList = normalizeToArray(ecModel.get('color')); var globalDecalList = normalizeToArray(ecModel.get(['aria', 'decal', 'decals'])); if (!globalColorList) { return; } levels = levels || []; var hasColorDefine; var hasDecalDefine; core_util["each"](levels, function (levelDefine) { var model = new model_Model(levelDefine); var modelColor = model.get('color'); var modelDecal = model.get('decal'); if (model.get(['itemStyle', 'color']) || modelColor && modelColor !== 'none') { hasColorDefine = true; } if (model.get(['itemStyle', 'decal']) || modelDecal && modelDecal !== 'none') { hasDecalDefine = true; } }); var level0 = levels[0] || (levels[0] = {}); if (!hasColorDefine) { level0.color = globalColorList.slice(); } if (!hasDecalDefine && globalDecalList) { level0.decal = globalDecalList.slice(); } return levels; } /* harmony default export */ var TreemapSeries = (TreemapSeries_TreemapSeriesModel); // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/treemap/Breadcrumb.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 TEXT_PADDING = 8; var ITEM_GAP = 8; var ARRAY_LENGTH = 5; var Breadcrumb_Breadcrumb = /** @class */function () { function Breadcrumb(containerGroup) { this.group = new graphic_Group(); containerGroup.add(this.group); } Breadcrumb.prototype.render = function (seriesModel, api, targetNode, onSelect) { var model = seriesModel.getModel('breadcrumb'); var thisGroup = this.group; thisGroup.removeAll(); if (!model.get('show') || !targetNode) { return; } var normalStyleModel = model.getModel('itemStyle'); var emphasisModel = model.getModel('emphasis'); var textStyleModel = normalStyleModel.getModel('textStyle'); var emphasisTextStyleModel = emphasisModel.getModel(['itemStyle', 'textStyle']); var layoutParam = { pos: { left: model.get('left'), right: model.get('right'), top: model.get('top'), bottom: model.get('bottom') }, box: { width: api.getWidth(), height: api.getHeight() }, emptyItemWidth: model.get('emptyItemWidth'), totalWidth: 0, renderList: [] }; this._prepare(targetNode, layoutParam, textStyleModel); this._renderContent(seriesModel, layoutParam, normalStyleModel, emphasisModel, textStyleModel, emphasisTextStyleModel, onSelect); positionElement(thisGroup, layoutParam.pos, layoutParam.box); }; /** * Prepare render list and total width * @private */ Breadcrumb.prototype._prepare = function (targetNode, layoutParam, textStyleModel) { for (var node = targetNode; node; node = node.parentNode) { var text = convertOptionIdName(node.getModel().get('name'), ''); var textRect = textStyleModel.getTextRect(text); var itemWidth = Math.max(textRect.width + TEXT_PADDING * 2, layoutParam.emptyItemWidth); layoutParam.totalWidth += itemWidth + ITEM_GAP; layoutParam.renderList.push({ node: node, text: text, width: itemWidth }); } }; /** * @private */ Breadcrumb.prototype._renderContent = function (seriesModel, layoutParam, normalStyleModel, emphasisModel, textStyleModel, emphasisTextStyleModel, onSelect) { // Start rendering. var lastX = 0; var emptyItemWidth = layoutParam.emptyItemWidth; var height = seriesModel.get(['breadcrumb', 'height']); var availableSize = getAvailableSize(layoutParam.pos, layoutParam.box); var totalWidth = layoutParam.totalWidth; var renderList = layoutParam.renderList; var emphasisItemStyle = emphasisModel.getModel('itemStyle').getItemStyle(); for (var i = renderList.length - 1; i >= 0; i--) { var item = renderList[i]; var itemNode = item.node; var itemWidth = item.width; var text = item.text; // Hdie text and shorten width if necessary. if (totalWidth > availableSize.width) { totalWidth -= itemWidth - emptyItemWidth; itemWidth = emptyItemWidth; text = null; } var el = new shape_Polygon({ shape: { points: makeItemPoints(lastX, 0, itemWidth, height, i === renderList.length - 1, i === 0) }, style: Object(core_util["defaults"])(normalStyleModel.getItemStyle(), { lineJoin: 'bevel' }), textContent: new Text({ style: createTextStyle(textStyleModel, { text: text }) }), textConfig: { position: 'inside' }, z2: Z2_EMPHASIS_LIFT * 1e4, onclick: Object(core_util["curry"])(onSelect, itemNode) }); el.disableLabelAnimation = true; el.getTextContent().ensureState('emphasis').style = createTextStyle(emphasisTextStyleModel, { text: text }); el.ensureState('emphasis').style = emphasisItemStyle; toggleHoverEmphasis(el, emphasisModel.get('focus'), emphasisModel.get('blurScope'), emphasisModel.get('disabled')); this.group.add(el); packEventData(el, seriesModel, itemNode); lastX += itemWidth + ITEM_GAP; } }; Breadcrumb.prototype.remove = function () { this.group.removeAll(); }; return Breadcrumb; }(); function makeItemPoints(x, y, itemWidth, itemHeight, head, tail) { var points = [[head ? x : x - ARRAY_LENGTH, y], [x + itemWidth, y], [x + itemWidth, y + itemHeight], [head ? x : x - ARRAY_LENGTH, y + itemHeight]]; !tail && points.splice(2, 0, [x + itemWidth + ARRAY_LENGTH, y + itemHeight / 2]); !head && points.push([x, y + itemHeight / 2]); return points; } // Package custom mouse event. function packEventData(el, seriesModel, itemNode) { getECData(el).eventData = { componentType: 'series', componentSubType: 'treemap', componentIndex: seriesModel.componentIndex, seriesIndex: seriesModel.seriesIndex, seriesName: seriesModel.name, seriesType: 'treemap', selfType: 'breadcrumb', nodeData: { dataIndex: itemNode && itemNode.dataIndex, name: itemNode && itemNode.name }, treePathInfo: itemNode && wrapTreePathInfo(itemNode, seriesModel) }; } /* harmony default export */ var treemap_Breadcrumb = (Breadcrumb_Breadcrumb); // CONCATENATED MODULE: ./node_modules/echarts/lib/util/animation.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ /** * Animate multiple elements with a single done-callback. * * @example * animation * .createWrap() * .add(el1, {x: 10, y: 10}) * .add(el2, {shape: {width: 500}, style: {fill: 'red'}}, 400) * .done(function () { // done }) * .start('cubicOut'); */ var AnimationWrap = /** @class */function () { function AnimationWrap() { this._storage = []; this._elExistsMap = {}; } /** * Caution: a el can only be added once, otherwise 'done' * might not be called. This method checks this (by el.id), * suppresses adding and returns false when existing el found. * * @return Whether adding succeeded. */ AnimationWrap.prototype.add = function (el, target, duration, delay, easing) { if (this._elExistsMap[el.id]) { return false; } this._elExistsMap[el.id] = true; this._storage.push({ el: el, target: target, duration: duration, delay: delay, easing: easing }); return true; }; /** * Only execute when animation done/aborted. */ AnimationWrap.prototype.finished = function (callback) { this._finishedCallback = callback; return this; }; /** * Will stop exist animation firstly. */ AnimationWrap.prototype.start = function () { var _this = this; var count = this._storage.length; var checkTerminate = function () { count--; if (count <= 0) { // Guard. _this._storage.length = 0; _this._elExistsMap = {}; _this._finishedCallback && _this._finishedCallback(); } }; for (var i = 0, len = this._storage.length; i < len; i++) { var item = this._storage[i]; item.el.animateTo(item.target, { duration: item.duration, delay: item.delay, easing: item.easing, setToFinal: true, done: checkTerminate, aborted: checkTerminate }); } return this; }; return AnimationWrap; }(); function createWrap() { return new AnimationWrap(); } // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/treemap/TreemapView.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 TreemapView_Group = graphic_Group; var TreemapView_Rect = shape_Rect; var DRAG_THRESHOLD = 3; var PATH_LABEL_NOAMAL = 'label'; var PATH_UPPERLABEL_NORMAL = 'upperLabel'; // Should larger than emphasis states lift z var Z2_BASE = Z2_EMPHASIS_LIFT * 10; // Should bigger than every z2. var Z2_BG = Z2_EMPHASIS_LIFT * 2; var Z2_CONTENT = Z2_EMPHASIS_LIFT * 3; var getStateItemStyle = makeStyleMapper([['fill', 'color'], // `borderColor` and `borderWidth` has been occupied, // so use `stroke` to indicate the stroke of the rect. ['stroke', 'strokeColor'], ['lineWidth', 'strokeWidth'], ['shadowBlur'], ['shadowOffsetX'], ['shadowOffsetY'], ['shadowColor'] // Option decal is in `DecalObject` but style.decal is in `PatternObject`. // So do not transfer decal directly. ]); var getItemStyleNormal = function (model) { // Normal style props should include emphasis style props. var itemStyle = getStateItemStyle(model); // Clear styles set by emphasis. itemStyle.stroke = itemStyle.fill = itemStyle.lineWidth = null; return itemStyle; }; var TreemapView_inner = makeInner(); var TreemapView_TreemapView = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(TreemapView, _super); function TreemapView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = TreemapView.type; _this._state = 'ready'; _this._storage = createStorage(); return _this; } /** * @override */ TreemapView.prototype.render = function (seriesModel, ecModel, api, payload) { var models = ecModel.findComponents({ mainType: 'series', subType: 'treemap', query: payload }); if (Object(core_util["indexOf"])(models, seriesModel) < 0) { return; } this.seriesModel = seriesModel; this.api = api; this.ecModel = ecModel; var types = ['treemapZoomToNode', 'treemapRootToNode']; var targetInfo = retrieveTargetInfo(payload, types, seriesModel); var payloadType = payload && payload.type; var layoutInfo = seriesModel.layoutInfo; var isInit = !this._oldTree; var thisStorage = this._storage; // Mark new root when action is treemapRootToNode. var reRoot = payloadType === 'treemapRootToNode' && targetInfo && thisStorage ? { rootNodeGroup: thisStorage.nodeGroup[targetInfo.node.getRawIndex()], direction: payload.direction } : null; var containerGroup = this._giveContainerGroup(layoutInfo); var hasAnimation = seriesModel.get('animation'); var renderResult = this._doRender(containerGroup, seriesModel, reRoot); hasAnimation && !isInit && (!payloadType || payloadType === 'treemapZoomToNode' || payloadType === 'treemapRootToNode') ? this._doAnimation(containerGroup, renderResult, seriesModel, reRoot) : renderResult.renderFinally(); this._resetController(api); this._renderBreadcrumb(seriesModel, api, targetInfo); }; TreemapView.prototype._giveContainerGroup = function (layoutInfo) { var containerGroup = this._containerGroup; if (!containerGroup) { // FIXME // 加一层containerGroup是为了clip,但是现在clip功能并没有实现。 containerGroup = this._containerGroup = new TreemapView_Group(); this._initEvents(containerGroup); this.group.add(containerGroup); } containerGroup.x = layoutInfo.x; containerGroup.y = layoutInfo.y; return containerGroup; }; TreemapView.prototype._doRender = function (containerGroup, seriesModel, reRoot) { var thisTree = seriesModel.getData().tree; var oldTree = this._oldTree; // Clear last shape records. var lastsForAnimation = createStorage(); var thisStorage = createStorage(); var oldStorage = this._storage; var willInvisibleEls = []; function doRenderNode(thisNode, oldNode, parentGroup, depth) { return TreemapView_renderNode(seriesModel, thisStorage, oldStorage, reRoot, lastsForAnimation, willInvisibleEls, thisNode, oldNode, parentGroup, depth); } // Notice: When thisTree and oldTree are the same tree (see list.cloneShallow), // the oldTree is actually losted, so we cannot find all of the old graphic // elements from tree. So we use this strategy: make element storage, move // from old storage to new storage, clear old storage. dualTravel(thisTree.root ? [thisTree.root] : [], oldTree && oldTree.root ? [oldTree.root] : [], containerGroup, thisTree === oldTree || !oldTree, 0); // Process all removing. var willDeleteEls = clearStorage(oldStorage); this._oldTree = thisTree; this._storage = thisStorage; if (this._controllerHost) { var _oldRootLayout = this.seriesModel.layoutInfo; var rootLayout = thisTree.root.getLayout(); if (rootLayout.width === _oldRootLayout.width && rootLayout.height === _oldRootLayout.height) { this._controllerHost.zoom = 1; } } return { lastsForAnimation: lastsForAnimation, willDeleteEls: willDeleteEls, renderFinally: renderFinally }; function dualTravel(thisViewChildren, oldViewChildren, parentGroup, sameTree, depth) { // When 'render' is triggered by action, // 'this' and 'old' may be the same tree, // we use rawIndex in that case. if (sameTree) { oldViewChildren = thisViewChildren; Object(core_util["each"])(thisViewChildren, function (child, index) { !child.isRemoved() && processNode(index, index); }); } // Diff hierarchically (diff only in each subtree, but not whole). // because, consistency of view is important. else { new data_DataDiffer(oldViewChildren, thisViewChildren, getKey, getKey).add(processNode).update(processNode).remove(Object(core_util["curry"])(processNode, null)).execute(); } function getKey(node) { // Identify by name or raw index. return node.getId(); } function processNode(newIndex, oldIndex) { var thisNode = newIndex != null ? thisViewChildren[newIndex] : null; var oldNode = oldIndex != null ? oldViewChildren[oldIndex] : null; var group = doRenderNode(thisNode, oldNode, parentGroup, depth); group && dualTravel(thisNode && thisNode.viewChildren || [], oldNode && oldNode.viewChildren || [], group, sameTree, depth + 1); } } function clearStorage(storage) { var willDeleteEls = createStorage(); storage && Object(core_util["each"])(storage, function (store, storageName) { var delEls = willDeleteEls[storageName]; Object(core_util["each"])(store, function (el) { el && (delEls.push(el), TreemapView_inner(el).willDelete = true); }); }); return willDeleteEls; } function renderFinally() { Object(core_util["each"])(willDeleteEls, function (els) { Object(core_util["each"])(els, function (el) { el.parent && el.parent.remove(el); }); }); Object(core_util["each"])(willInvisibleEls, function (el) { el.invisible = true; // Setting invisible is for optimizing, so no need to set dirty, // just mark as invisible. el.dirty(); }); } }; TreemapView.prototype._doAnimation = function (containerGroup, renderResult, seriesModel, reRoot) { var durationOption = seriesModel.get('animationDurationUpdate'); var easingOption = seriesModel.get('animationEasing'); // TODO: do not support function until necessary. var duration = (Object(core_util["isFunction"])(durationOption) ? 0 : durationOption) || 0; var easing = (Object(core_util["isFunction"])(easingOption) ? null : easingOption) || 'cubicOut'; var animationWrap = createWrap(); // Make delete animations. Object(core_util["each"])(renderResult.willDeleteEls, function (store, storageName) { Object(core_util["each"])(store, function (el, rawIndex) { if (el.invisible) { return; } var parent = el.parent; // Always has parent, and parent is nodeGroup. var target; var innerStore = TreemapView_inner(parent); if (reRoot && reRoot.direction === 'drillDown') { target = parent === reRoot.rootNodeGroup // This is the content element of view root. // Only `content` will enter this branch, because // `background` and `nodeGroup` will not be deleted. ? { shape: { x: 0, y: 0, width: innerStore.nodeWidth, height: innerStore.nodeHeight }, style: { opacity: 0 } } // Others. : { style: { opacity: 0 } }; } else { var targetX = 0; var targetY = 0; if (!innerStore.willDelete) { // Let node animate to right-bottom corner, cooperating with fadeout, // which is appropriate for user understanding. // Divided by 2 for reRoot rolling up effect. targetX = innerStore.nodeWidth / 2; targetY = innerStore.nodeHeight / 2; } target = storageName === 'nodeGroup' ? { x: targetX, y: targetY, style: { opacity: 0 } } : { shape: { x: targetX, y: targetY, width: 0, height: 0 }, style: { opacity: 0 } }; } // TODO: do not support delay until necessary. target && animationWrap.add(el, target, duration, 0, easing); }); }); // Make other animations Object(core_util["each"])(this._storage, function (store, storageName) { Object(core_util["each"])(store, function (el, rawIndex) { var last = renderResult.lastsForAnimation[storageName][rawIndex]; var target = {}; if (!last) { return; } if (el instanceof graphic_Group) { if (last.oldX != null) { target.x = el.x; target.y = el.y; el.x = last.oldX; el.y = last.oldY; } } else { if (last.oldShape) { target.shape = Object(core_util["extend"])({}, el.shape); el.setShape(last.oldShape); } if (last.fadein) { el.setStyle('opacity', 0); target.style = { opacity: 1 }; } // When animation is stopped for succedent animation starting, // el.style.opacity might not be 1 else if (el.style.opacity !== 1) { target.style = { opacity: 1 }; } } animationWrap.add(el, target, duration, 0, easing); }); }, this); this._state = 'animating'; animationWrap.finished(Object(core_util["bind"])(function () { this._state = 'ready'; renderResult.renderFinally(); }, this)).start(); }; TreemapView.prototype._resetController = function (api) { var controller = this._controller; var controllerHost = this._controllerHost; if (!controllerHost) { this._controllerHost = { target: this.group }; controllerHost = this._controllerHost; } // Init controller. if (!controller) { controller = this._controller = new helper_RoamController(api.getZr()); controller.enable(this.seriesModel.get('roam')); controllerHost.zoomLimit = this.seriesModel.get('scaleLimit'); controllerHost.zoom = this.seriesModel.get('zoom'); controller.on('pan', Object(core_util["bind"])(this._onPan, this)); controller.on('zoom', Object(core_util["bind"])(this._onZoom, this)); } var rect = new core_BoundingRect(0, 0, api.getWidth(), api.getHeight()); controller.setPointerChecker(function (e, x, y) { return rect.contain(x, y); }); }; TreemapView.prototype._clearController = function () { var controller = this._controller; this._controllerHost = null; if (controller) { controller.dispose(); controller = null; } }; TreemapView.prototype._onPan = function (e) { if (this._state !== 'animating' && (Math.abs(e.dx) > DRAG_THRESHOLD || Math.abs(e.dy) > DRAG_THRESHOLD)) { // These param must not be cached. var root = this.seriesModel.getData().tree.root; if (!root) { return; } var rootLayout = root.getLayout(); if (!rootLayout) { return; } this.api.dispatchAction({ type: 'treemapMove', from: this.uid, seriesId: this.seriesModel.id, rootRect: { x: rootLayout.x + e.dx, y: rootLayout.y + e.dy, width: rootLayout.width, height: rootLayout.height } }); } }; TreemapView.prototype._onZoom = function (e) { var mouseX = e.originX; var mouseY = e.originY; var zoomDelta = e.scale; if (this._state !== 'animating') { // These param must not be cached. var root = this.seriesModel.getData().tree.root; if (!root) { return; } var rootLayout = root.getLayout(); if (!rootLayout) { return; } var rect = new core_BoundingRect(rootLayout.x, rootLayout.y, rootLayout.width, rootLayout.height); // scaleLimit var zoomLimit = null; var _controllerHost = this._controllerHost; zoomLimit = _controllerHost.zoomLimit; var newZoom = _controllerHost.zoom = _controllerHost.zoom || 1; newZoom *= zoomDelta; if (zoomLimit) { var zoomMin = zoomLimit.min || 0; var zoomMax = zoomLimit.max || Infinity; newZoom = Math.max(Math.min(zoomMax, newZoom), zoomMin); } var zoomScale = newZoom / _controllerHost.zoom; _controllerHost.zoom = newZoom; var layoutInfo = this.seriesModel.layoutInfo; // Transform mouse coord from global to containerGroup. mouseX -= layoutInfo.x; mouseY -= layoutInfo.y; // Scale root bounding rect. var m = matrix_create(); matrix_translate(m, m, [-mouseX, -mouseY]); matrix_scale(m, m, [zoomScale, zoomScale]); matrix_translate(m, m, [mouseX, mouseY]); rect.applyTransform(m); this.api.dispatchAction({ type: 'treemapRender', from: this.uid, seriesId: this.seriesModel.id, rootRect: { x: rect.x, y: rect.y, width: rect.width, height: rect.height } }); } }; TreemapView.prototype._initEvents = function (containerGroup) { var _this = this; containerGroup.on('click', function (e) { if (_this._state !== 'ready') { return; } var nodeClick = _this.seriesModel.get('nodeClick', true); if (!nodeClick) { return; } var targetInfo = _this.findTarget(e.offsetX, e.offsetY); if (!targetInfo) { return; } var node = targetInfo.node; if (node.getLayout().isLeafRoot) { _this._rootToNode(targetInfo); } else { if (nodeClick === 'zoomToNode') { _this._zoomToNode(targetInfo); } else if (nodeClick === 'link') { var itemModel = node.hostTree.data.getItemModel(node.dataIndex); var link = itemModel.get('link', true); var linkTarget = itemModel.get('target', true) || 'blank'; link && windowOpen(link, linkTarget); } } }, this); }; TreemapView.prototype._renderBreadcrumb = function (seriesModel, api, targetInfo) { var _this = this; if (!targetInfo) { targetInfo = seriesModel.get('leafDepth', true) != null ? { node: seriesModel.getViewRoot() } // FIXME // better way? // Find breadcrumb tail on center of containerGroup. : this.findTarget(api.getWidth() / 2, api.getHeight() / 2); if (!targetInfo) { targetInfo = { node: seriesModel.getData().tree.root }; } } (this._breadcrumb || (this._breadcrumb = new treemap_Breadcrumb(this.group))).render(seriesModel, api, targetInfo.node, function (node) { if (_this._state !== 'animating') { aboveViewRoot(seriesModel.getViewRoot(), node) ? _this._rootToNode({ node: node }) : _this._zoomToNode({ node: node }); } }); }; /** * @override */ TreemapView.prototype.remove = function () { this._clearController(); this._containerGroup && this._containerGroup.removeAll(); this._storage = createStorage(); this._state = 'ready'; this._breadcrumb && this._breadcrumb.remove(); }; TreemapView.prototype.dispose = function () { this._clearController(); }; TreemapView.prototype._zoomToNode = function (targetInfo) { this.api.dispatchAction({ type: 'treemapZoomToNode', from: this.uid, seriesId: this.seriesModel.id, targetNode: targetInfo.node }); }; TreemapView.prototype._rootToNode = function (targetInfo) { this.api.dispatchAction({ type: 'treemapRootToNode', from: this.uid, seriesId: this.seriesModel.id, targetNode: targetInfo.node }); }; /** * @public * @param {number} x Global coord x. * @param {number} y Global coord y. * @return {Object} info If not found, return undefined; * @return {number} info.node Target node. * @return {number} info.offsetX x refer to target node. * @return {number} info.offsetY y refer to target node. */ TreemapView.prototype.findTarget = function (x, y) { var targetInfo; var viewRoot = this.seriesModel.getViewRoot(); viewRoot.eachNode({ attr: 'viewChildren', order: 'preorder' }, function (node) { var bgEl = this._storage.background[node.getRawIndex()]; // If invisible, there might be no element. if (bgEl) { var point = bgEl.transformCoordToLocal(x, y); var shape = bgEl.shape; // For performance consideration, don't use 'getBoundingRect'. if (shape.x <= point[0] && point[0] <= shape.x + shape.width && shape.y <= point[1] && point[1] <= shape.y + shape.height) { targetInfo = { node: node, offsetX: point[0], offsetY: point[1] }; } else { return false; // Suppress visit subtree. } } }, this); return targetInfo; }; TreemapView.type = 'treemap'; return TreemapView; }(Chart); /** * @inner */ function createStorage() { return { nodeGroup: [], background: [], content: [] }; } /** * @inner * @return Return undefined means do not travel further. */ function TreemapView_renderNode(seriesModel, thisStorage, oldStorage, reRoot, lastsForAnimation, willInvisibleEls, thisNode, oldNode, parentGroup, depth) { // Whether under viewRoot. if (!thisNode) { // Deleting nodes will be performed finally. This method just find // element from old storage, or create new element, set them to new // storage, and set styles. return; } // ------------------------------------------------------------------- // Start of closure variables available in "Procedures in renderNode". var thisLayout = thisNode.getLayout(); var data = seriesModel.getData(); var nodeModel = thisNode.getModel(); // Only for enabling highlight/downplay. Clear firstly. // Because some node will not be rendered. data.setItemGraphicEl(thisNode.dataIndex, null); if (!thisLayout || !thisLayout.isInView) { return; } var thisWidth = thisLayout.width; var thisHeight = thisLayout.height; var borderWidth = thisLayout.borderWidth; var thisInvisible = thisLayout.invisible; var thisRawIndex = thisNode.getRawIndex(); var oldRawIndex = oldNode && oldNode.getRawIndex(); var thisViewChildren = thisNode.viewChildren; var upperHeight = thisLayout.upperHeight; var isParent = thisViewChildren && thisViewChildren.length; var itemStyleNormalModel = nodeModel.getModel('itemStyle'); var itemStyleEmphasisModel = nodeModel.getModel(['emphasis', 'itemStyle']); var itemStyleBlurModel = nodeModel.getModel(['blur', 'itemStyle']); var itemStyleSelectModel = nodeModel.getModel(['select', 'itemStyle']); var borderRadius = itemStyleNormalModel.get('borderRadius') || 0; // End of closure ariables available in "Procedures in renderNode". // ----------------------------------------------------------------- // Node group var group = giveGraphic('nodeGroup', TreemapView_Group); if (!group) { return; } parentGroup.add(group); // x,y are not set when el is above view root. group.x = thisLayout.x || 0; group.y = thisLayout.y || 0; group.markRedraw(); TreemapView_inner(group).nodeWidth = thisWidth; TreemapView_inner(group).nodeHeight = thisHeight; if (thisLayout.isAboveViewRoot) { return group; } // Background var bg = giveGraphic('background', TreemapView_Rect, depth, Z2_BG); bg && renderBackground(group, bg, isParent && thisLayout.upperLabelHeight); var emphasisModel = nodeModel.getModel('emphasis'); var focus = emphasisModel.get('focus'); var blurScope = emphasisModel.get('blurScope'); var isDisabled = emphasisModel.get('disabled'); var focusOrIndices = focus === 'ancestor' ? thisNode.getAncestorsIndices() : focus === 'descendant' ? thisNode.getDescendantIndices() : focus; // No children, render content. if (isParent) { // Because of the implementation about "traverse" in graphic hover style, we // can not set hover listener on the "group" of non-leaf node. Otherwise the // hover event from the descendents will be listenered. if (isHighDownDispatcher(group)) { setAsHighDownDispatcher(group, false); } if (bg) { setAsHighDownDispatcher(bg, !isDisabled); // Only for enabling highlight/downplay. data.setItemGraphicEl(thisNode.dataIndex, bg); enableHoverFocus(bg, focusOrIndices, blurScope); } } else { var content = giveGraphic('content', TreemapView_Rect, depth, Z2_CONTENT); content && renderContent(group, content); bg.disableMorphing = true; if (bg && isHighDownDispatcher(bg)) { setAsHighDownDispatcher(bg, false); } setAsHighDownDispatcher(group, !isDisabled); // Only for enabling highlight/downplay. data.setItemGraphicEl(thisNode.dataIndex, group); var cursorStyle = nodeModel.getShallow('cursor'); cursorStyle && content.attr('cursor', cursorStyle); enableHoverFocus(group, focusOrIndices, blurScope); } return group; // ---------------------------- // | Procedures in renderNode | // ---------------------------- function renderBackground(group, bg, useUpperLabel) { var ecData = getECData(bg); // For tooltip. ecData.dataIndex = thisNode.dataIndex; ecData.seriesIndex = seriesModel.seriesIndex; bg.setShape({ x: 0, y: 0, width: thisWidth, height: thisHeight, r: borderRadius }); if (thisInvisible) { // If invisible, do not set visual, otherwise the element will // change immediately before animation. We think it is OK to // remain its origin color when moving out of the view window. processInvisible(bg); } else { bg.invisible = false; var style = thisNode.getVisual('style'); var visualBorderColor = style.stroke; var normalStyle = getItemStyleNormal(itemStyleNormalModel); normalStyle.fill = visualBorderColor; var emphasisStyle = getStateItemStyle(itemStyleEmphasisModel); emphasisStyle.fill = itemStyleEmphasisModel.get('borderColor'); var blurStyle = getStateItemStyle(itemStyleBlurModel); blurStyle.fill = itemStyleBlurModel.get('borderColor'); var selectStyle = getStateItemStyle(itemStyleSelectModel); selectStyle.fill = itemStyleSelectModel.get('borderColor'); if (useUpperLabel) { var upperLabelWidth = thisWidth - 2 * borderWidth; prepareText( // PENDING: convert ZRColor to ColorString for text. bg, visualBorderColor, style.opacity, { x: borderWidth, y: 0, width: upperLabelWidth, height: upperHeight }); } // For old bg. else { bg.removeTextContent(); } bg.setStyle(normalStyle); bg.ensureState('emphasis').style = emphasisStyle; bg.ensureState('blur').style = blurStyle; bg.ensureState('select').style = selectStyle; setDefaultStateProxy(bg); } group.add(bg); } function renderContent(group, content) { var ecData = getECData(content); // For tooltip. ecData.dataIndex = thisNode.dataIndex; ecData.seriesIndex = seriesModel.seriesIndex; var contentWidth = Math.max(thisWidth - 2 * borderWidth, 0); var contentHeight = Math.max(thisHeight - 2 * borderWidth, 0); content.culling = true; content.setShape({ x: borderWidth, y: borderWidth, width: contentWidth, height: contentHeight, r: borderRadius }); if (thisInvisible) { // If invisible, do not set visual, otherwise the element will // change immediately before animation. We think it is OK to // remain its origin color when moving out of the view window. processInvisible(content); } else { content.invisible = false; var nodeStyle = thisNode.getVisual('style'); var visualColor = nodeStyle.fill; var normalStyle = getItemStyleNormal(itemStyleNormalModel); normalStyle.fill = visualColor; normalStyle.decal = nodeStyle.decal; var emphasisStyle = getStateItemStyle(itemStyleEmphasisModel); var blurStyle = getStateItemStyle(itemStyleBlurModel); var selectStyle = getStateItemStyle(itemStyleSelectModel); // PENDING: convert ZRColor to ColorString for text. prepareText(content, visualColor, nodeStyle.opacity, null); content.setStyle(normalStyle); content.ensureState('emphasis').style = emphasisStyle; content.ensureState('blur').style = blurStyle; content.ensureState('select').style = selectStyle; setDefaultStateProxy(content); } group.add(content); } function processInvisible(element) { // Delay invisible setting utill animation finished, // avoid element vanish suddenly before animation. !element.invisible && willInvisibleEls.push(element); } function prepareText(rectEl, visualColor, visualOpacity, // Can be null/undefined upperLabelRect) { var normalLabelModel = nodeModel.getModel(upperLabelRect ? PATH_UPPERLABEL_NORMAL : PATH_LABEL_NOAMAL); var defaultText = convertOptionIdName(nodeModel.get('name'), null); var isShow = normalLabelModel.getShallow('show'); setLabelStyle(rectEl, getLabelStatesModels(nodeModel, upperLabelRect ? PATH_UPPERLABEL_NORMAL : PATH_LABEL_NOAMAL), { defaultText: isShow ? defaultText : null, inheritColor: visualColor, defaultOpacity: visualOpacity, labelFetcher: seriesModel, labelDataIndex: thisNode.dataIndex }); var textEl = rectEl.getTextContent(); if (!textEl) { return; } var textStyle = textEl.style; var textPadding = Object(core_util["normalizeCssArray"])(textStyle.padding || 0); if (upperLabelRect) { rectEl.setTextConfig({ layoutRect: upperLabelRect }); textEl.disableLabelLayout = true; } textEl.beforeUpdate = function () { var width = Math.max((upperLabelRect ? upperLabelRect.width : rectEl.shape.width) - textPadding[1] - textPadding[3], 0); var height = Math.max((upperLabelRect ? upperLabelRect.height : rectEl.shape.height) - textPadding[0] - textPadding[2], 0); if (textStyle.width !== width || textStyle.height !== height) { textEl.setStyle({ width: width, height: height }); } }; textStyle.truncateMinChar = 2; textStyle.lineOverflow = 'truncate'; addDrillDownIcon(textStyle, upperLabelRect, thisLayout); var textEmphasisState = textEl.getState('emphasis'); addDrillDownIcon(textEmphasisState ? textEmphasisState.style : null, upperLabelRect, thisLayout); } function addDrillDownIcon(style, upperLabelRect, thisLayout) { var text = style ? style.text : null; if (!upperLabelRect && thisLayout.isLeafRoot && text != null) { var iconChar = seriesModel.get('drillDownIcon', true); style.text = iconChar ? iconChar + ' ' + text : text; } } function giveGraphic(storageName, Ctor, depth, z) { var element = oldRawIndex != null && oldStorage[storageName][oldRawIndex]; var lasts = lastsForAnimation[storageName]; if (element) { // Remove from oldStorage oldStorage[storageName][oldRawIndex] = null; prepareAnimationWhenHasOld(lasts, element); } // If invisible and no old element, do not create new element (for optimizing). else if (!thisInvisible) { element = new Ctor(); if (element instanceof graphic_Displayable) { element.z2 = calculateZ2(depth, z); } prepareAnimationWhenNoOld(lasts, element); } // Set to thisStorage return thisStorage[storageName][thisRawIndex] = element; } function prepareAnimationWhenHasOld(lasts, element) { var lastCfg = lasts[thisRawIndex] = {}; if (element instanceof TreemapView_Group) { lastCfg.oldX = element.x; lastCfg.oldY = element.y; } else { lastCfg.oldShape = Object(core_util["extend"])({}, element.shape); } } // If a element is new, we need to find the animation start point carefully, // otherwise it will looks strange when 'zoomToNode'. function prepareAnimationWhenNoOld(lasts, element) { var lastCfg = lasts[thisRawIndex] = {}; var parentNode = thisNode.parentNode; var isGroup = element instanceof graphic_Group; if (parentNode && (!reRoot || reRoot.direction === 'drillDown')) { var parentOldX = 0; var parentOldY = 0; // New nodes appear from right-bottom corner in 'zoomToNode' animation. // For convenience, get old bounding rect from background. var parentOldBg = lastsForAnimation.background[parentNode.getRawIndex()]; if (!reRoot && parentOldBg && parentOldBg.oldShape) { parentOldX = parentOldBg.oldShape.width; parentOldY = parentOldBg.oldShape.height; } // When no parent old shape found, its parent is new too, // so we can just use {x:0, y:0}. if (isGroup) { lastCfg.oldX = 0; lastCfg.oldY = parentOldY; } else { lastCfg.oldShape = { x: parentOldX, y: parentOldY, width: 0, height: 0 }; } } // Fade in, user can be aware that these nodes are new. lastCfg.fadein = !isGroup; } } // We cannot set all background with the same z, because the behaviour of // drill down and roll up differ background creation sequence from tree // hierarchy sequence, which cause lower background elements to overlap // upper ones. So we calculate z based on depth. // Moreover, we try to shrink down z interval to [0, 1] to avoid that // treemap with large z overlaps other components. function calculateZ2(depth, z2InLevel) { return depth * Z2_BASE + z2InLevel; } /* harmony default export */ var treemap_TreemapView = (TreemapView_TreemapView); // CONCATENATED MODULE: ./node_modules/echarts/lib/visual/VisualMapping.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 VisualMapping_each = core_util["each"]; var VisualMapping_isObject = core_util["isObject"]; var CATEGORY_DEFAULT_VISUAL_INDEX = -1; var VisualMapping_VisualMapping = /** @class */function () { function VisualMapping(option) { var mappingMethod = option.mappingMethod; var visualType = option.type; var thisOption = this.option = core_util["clone"](option); this.type = visualType; this.mappingMethod = mappingMethod; this._normalizeData = normalizers[mappingMethod]; var visualHandler = VisualMapping.visualHandlers[visualType]; this.applyVisual = visualHandler.applyVisual; this.getColorMapper = visualHandler.getColorMapper; this._normalizedToVisual = visualHandler._normalizedToVisual[mappingMethod]; if (mappingMethod === 'piecewise') { normalizeVisualRange(thisOption); preprocessForPiecewise(thisOption); } else if (mappingMethod === 'category') { thisOption.categories ? preprocessForSpecifiedCategory(thisOption) // categories is ordinal when thisOption.categories not specified, // which need no more preprocess except normalize visual. : normalizeVisualRange(thisOption, true); } else { // mappingMethod === 'linear' or 'fixed' core_util["assert"](mappingMethod !== 'linear' || thisOption.dataExtent); normalizeVisualRange(thisOption); } } VisualMapping.prototype.mapValueToVisual = function (value) { var normalized = this._normalizeData(value); return this._normalizedToVisual(normalized, value); }; VisualMapping.prototype.getNormalizer = function () { return core_util["bind"](this._normalizeData, this); }; /** * List available visual types. * * @public * @return {Array.} */ VisualMapping.listVisualTypes = function () { return core_util["keys"](VisualMapping.visualHandlers); }; // /** // * @public // */ // static addVisualHandler(name, handler) { // visualHandlers[name] = handler; // } /** * @public */ VisualMapping.isValidType = function (visualType) { return VisualMapping.visualHandlers.hasOwnProperty(visualType); }; /** * Convenient method. * Visual can be Object or Array or primary type. */ VisualMapping.eachVisual = function (visual, callback, context) { if (core_util["isObject"](visual)) { core_util["each"](visual, callback, context); } else { callback.call(context, visual); } }; VisualMapping.mapVisual = function (visual, callback, context) { var isPrimary; var newVisual = core_util["isArray"](visual) ? [] : core_util["isObject"](visual) ? {} : (isPrimary = true, null); VisualMapping.eachVisual(visual, function (v, key) { var newVal = callback.call(context, v, key); isPrimary ? newVisual = newVal : newVisual[key] = newVal; }); return newVisual; }; /** * Retrieve visual properties from given object. */ VisualMapping.retrieveVisuals = function (obj) { var ret = {}; var hasVisual; obj && VisualMapping_each(VisualMapping.visualHandlers, function (h, visualType) { if (obj.hasOwnProperty(visualType)) { ret[visualType] = obj[visualType]; hasVisual = true; } }); return hasVisual ? ret : null; }; /** * Give order to visual types, considering colorSaturation, colorAlpha depends on color. * * @public * @param {(Object|Array)} visualTypes If Object, like: {color: ..., colorSaturation: ...} * IF Array, like: ['color', 'symbol', 'colorSaturation'] * @return {Array.} Sorted visual types. */ VisualMapping.prepareVisualTypes = function (visualTypes) { if (core_util["isArray"](visualTypes)) { visualTypes = visualTypes.slice(); } else if (VisualMapping_isObject(visualTypes)) { var types_1 = []; VisualMapping_each(visualTypes, function (item, type) { types_1.push(type); }); visualTypes = types_1; } else { return []; } visualTypes.sort(function (type1, type2) { // color should be front of colorSaturation, colorAlpha, ... // symbol and symbolSize do not matter. return type2 === 'color' && type1 !== 'color' && type1.indexOf('color') === 0 ? 1 : -1; }); return visualTypes; }; /** * 'color', 'colorSaturation', 'colorAlpha', ... are depends on 'color'. * Other visuals are only depends on themself. */ VisualMapping.dependsOn = function (visualType1, visualType2) { return visualType2 === 'color' ? !!(visualType1 && visualType1.indexOf(visualType2) === 0) : visualType1 === visualType2; }; /** * @param value * @param pieceList [{value: ..., interval: [min, max]}, ...] * Always from small to big. * @param findClosestWhenOutside Default to be false * @return index */ VisualMapping.findPieceIndex = function (value, pieceList, findClosestWhenOutside) { var possibleI; var abs = Infinity; // value has the higher priority. for (var i = 0, len = pieceList.length; i < len; i++) { var pieceValue = pieceList[i].value; if (pieceValue != null) { if (pieceValue === value // FIXME // It is supposed to compare value according to value type of dimension, // but currently value type can exactly be string or number. // Compromise for numeric-like string (like '12'), especially // in the case that visualMap.categories is ['22', '33']. || core_util["isString"](pieceValue) && pieceValue === value + '') { return i; } findClosestWhenOutside && updatePossible(pieceValue, i); } } for (var i = 0, len = pieceList.length; i < len; i++) { var piece = pieceList[i]; var interval = piece.interval; var close_1 = piece.close; if (interval) { if (interval[0] === -Infinity) { if (VisualMapping_littleThan(close_1[1], value, interval[1])) { return i; } } else if (interval[1] === Infinity) { if (VisualMapping_littleThan(close_1[0], interval[0], value)) { return i; } } else if (VisualMapping_littleThan(close_1[0], interval[0], value) && VisualMapping_littleThan(close_1[1], value, interval[1])) { return i; } findClosestWhenOutside && updatePossible(interval[0], i); findClosestWhenOutside && updatePossible(interval[1], i); } } if (findClosestWhenOutside) { return value === Infinity ? pieceList.length - 1 : value === -Infinity ? 0 : possibleI; } function updatePossible(val, index) { var newAbs = Math.abs(val - value); if (newAbs < abs) { abs = newAbs; possibleI = index; } } }; VisualMapping.visualHandlers = { color: { applyVisual: makeApplyVisual('color'), getColorMapper: function () { var thisOption = this.option; return core_util["bind"](thisOption.mappingMethod === 'category' ? function (value, isNormalized) { !isNormalized && (value = this._normalizeData(value)); return doMapCategory.call(this, value); } : function (value, isNormalized, out) { // If output rgb array // which will be much faster and useful in pixel manipulation var returnRGBArray = !!out; !isNormalized && (value = this._normalizeData(value)); out = tool_color["fastLerp"](value, thisOption.parsedVisual, out); return returnRGBArray ? out : tool_color["stringify"](out, 'rgba'); }, this); }, _normalizedToVisual: { linear: function (normalized) { return tool_color["stringify"](tool_color["fastLerp"](normalized, this.option.parsedVisual), 'rgba'); }, category: doMapCategory, piecewise: function (normalized, value) { var result = getSpecifiedVisual.call(this, value); if (result == null) { result = tool_color["stringify"](tool_color["fastLerp"](normalized, this.option.parsedVisual), 'rgba'); } return result; }, fixed: doMapFixed } }, colorHue: makePartialColorVisualHandler(function (color, value) { return tool_color["modifyHSL"](color, value); }), colorSaturation: makePartialColorVisualHandler(function (color, value) { return tool_color["modifyHSL"](color, null, value); }), colorLightness: makePartialColorVisualHandler(function (color, value) { return tool_color["modifyHSL"](color, null, null, value); }), colorAlpha: makePartialColorVisualHandler(function (color, value) { return tool_color["modifyAlpha"](color, value); }), decal: { applyVisual: makeApplyVisual('decal'), _normalizedToVisual: { linear: null, category: doMapCategory, piecewise: null, fixed: null } }, opacity: { applyVisual: makeApplyVisual('opacity'), _normalizedToVisual: createNormalizedToNumericVisual([0, 1]) }, liftZ: { applyVisual: makeApplyVisual('liftZ'), _normalizedToVisual: { linear: doMapFixed, category: doMapFixed, piecewise: doMapFixed, fixed: doMapFixed } }, symbol: { applyVisual: function (value, getter, setter) { var symbolCfg = this.mapValueToVisual(value); setter('symbol', symbolCfg); }, _normalizedToVisual: { linear: doMapToArray, category: doMapCategory, piecewise: function (normalized, value) { var result = getSpecifiedVisual.call(this, value); if (result == null) { result = doMapToArray.call(this, normalized); } return result; }, fixed: doMapFixed } }, symbolSize: { applyVisual: makeApplyVisual('symbolSize'), _normalizedToVisual: createNormalizedToNumericVisual([0, 1]) } }; return VisualMapping; }(); function preprocessForPiecewise(thisOption) { var pieceList = thisOption.pieceList; thisOption.hasSpecialVisual = false; core_util["each"](pieceList, function (piece, index) { piece.originIndex = index; // piece.visual is "result visual value" but not // a visual range, so it does not need to be normalized. if (piece.visual != null) { thisOption.hasSpecialVisual = true; } }); } function preprocessForSpecifiedCategory(thisOption) { // Hash categories. var categories = thisOption.categories; var categoryMap = thisOption.categoryMap = {}; var visual = thisOption.visual; VisualMapping_each(categories, function (cate, index) { categoryMap[cate] = index; }); // Process visual map input. if (!core_util["isArray"](visual)) { var visualArr_1 = []; if (core_util["isObject"](visual)) { VisualMapping_each(visual, function (v, cate) { var index = categoryMap[cate]; visualArr_1[index != null ? index : CATEGORY_DEFAULT_VISUAL_INDEX] = v; }); } else { // Is primary type, represents default visual. visualArr_1[CATEGORY_DEFAULT_VISUAL_INDEX] = visual; } visual = setVisualToOption(thisOption, visualArr_1); } // Remove categories that has no visual, // then we can mapping them to CATEGORY_DEFAULT_VISUAL_INDEX. for (var i = categories.length - 1; i >= 0; i--) { if (visual[i] == null) { delete categoryMap[categories[i]]; categories.pop(); } } } function normalizeVisualRange(thisOption, isCategory) { var visual = thisOption.visual; var visualArr = []; if (core_util["isObject"](visual)) { VisualMapping_each(visual, function (v) { visualArr.push(v); }); } else if (visual != null) { visualArr.push(visual); } var doNotNeedPair = { color: 1, symbol: 1 }; if (!isCategory && visualArr.length === 1 && !doNotNeedPair.hasOwnProperty(thisOption.type)) { // Do not care visualArr.length === 0, which is illegal. visualArr[1] = visualArr[0]; } setVisualToOption(thisOption, visualArr); } function makePartialColorVisualHandler(applyValue) { return { applyVisual: function (value, getter, setter) { // Only used in HSL var colorChannel = this.mapValueToVisual(value); // Must not be array value setter('color', applyValue(getter('color'), colorChannel)); }, _normalizedToVisual: createNormalizedToNumericVisual([0, 1]) }; } function doMapToArray(normalized) { var visual = this.option.visual; return visual[Math.round(linearMap(normalized, [0, 1], [0, visual.length - 1], true))] || {}; // TODO {}? } function makeApplyVisual(visualType) { return function (value, getter, setter) { setter(visualType, this.mapValueToVisual(value)); }; } function doMapCategory(normalized) { var visual = this.option.visual; return visual[this.option.loop && normalized !== CATEGORY_DEFAULT_VISUAL_INDEX ? normalized % visual.length : normalized]; } function doMapFixed() { // visual will be convert to array. return this.option.visual[0]; } /** * Create mapped to numeric visual */ function createNormalizedToNumericVisual(sourceExtent) { return { linear: function (normalized) { return linearMap(normalized, sourceExtent, this.option.visual, true); }, category: doMapCategory, piecewise: function (normalized, value) { var result = getSpecifiedVisual.call(this, value); if (result == null) { result = linearMap(normalized, sourceExtent, this.option.visual, true); } return result; }, fixed: doMapFixed }; } function getSpecifiedVisual(value) { var thisOption = this.option; var pieceList = thisOption.pieceList; if (thisOption.hasSpecialVisual) { var pieceIndex = VisualMapping_VisualMapping.findPieceIndex(value, pieceList); var piece = pieceList[pieceIndex]; if (piece && piece.visual) { return piece.visual[this.type]; } } } function setVisualToOption(thisOption, visualArr) { thisOption.visual = visualArr; if (thisOption.type === 'color') { thisOption.parsedVisual = core_util["map"](visualArr, function (item) { var color = tool_color["parse"](item); if (!color && "production" !== 'production') { log_warn("'" + item + "' is an illegal color, fallback to '#000000'", true); } return color || [0, 0, 0, 1]; }); } return visualArr; } /** * Normalizers by mapping methods. */ var normalizers = { linear: function (value) { return linearMap(value, this.option.dataExtent, [0, 1], true); }, piecewise: function (value) { var pieceList = this.option.pieceList; var pieceIndex = VisualMapping_VisualMapping.findPieceIndex(value, pieceList, true); if (pieceIndex != null) { return linearMap(pieceIndex, [0, pieceList.length - 1], [0, 1], true); } }, category: function (value) { var index = this.option.categories ? this.option.categoryMap[value] : value; // ordinal value return index == null ? CATEGORY_DEFAULT_VISUAL_INDEX : index; }, fixed: core_util["noop"] }; function VisualMapping_littleThan(close, a, b) { return close ? a <= b : a < b; } /* harmony default export */ var visual_VisualMapping = (VisualMapping_VisualMapping); // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/treemap/treemapVisual.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 ITEM_STYLE_NORMAL = 'itemStyle'; var treemapVisual_inner = makeInner(); /* harmony default export */ var treemapVisual = ({ seriesType: 'treemap', reset: function (seriesModel) { var tree = seriesModel.getData().tree; var root = tree.root; if (root.isRemoved()) { return; } travelTree(root, // Visual should calculate from tree root but not view root. {}, seriesModel.getViewRoot().getAncestors(), seriesModel); } }); function travelTree(node, designatedVisual, viewRootAncestors, seriesModel) { var nodeModel = node.getModel(); var nodeLayout = node.getLayout(); var data = node.hostTree.data; // Optimize if (!nodeLayout || nodeLayout.invisible || !nodeLayout.isInView) { return; } var nodeItemStyleModel = nodeModel.getModel(ITEM_STYLE_NORMAL); var visuals = buildVisuals(nodeItemStyleModel, designatedVisual, seriesModel); var existsStyle = data.ensureUniqueItemVisual(node.dataIndex, 'style'); // calculate border color var borderColor = nodeItemStyleModel.get('borderColor'); var borderColorSaturation = nodeItemStyleModel.get('borderColorSaturation'); var thisNodeColor; if (borderColorSaturation != null) { // For performance, do not always execute 'calculateColor'. thisNodeColor = calculateColor(visuals); borderColor = calculateBorderColor(borderColorSaturation, thisNodeColor); } existsStyle.stroke = borderColor; var viewChildren = node.viewChildren; if (!viewChildren || !viewChildren.length) { thisNodeColor = calculateColor(visuals); // Apply visual to this node. existsStyle.fill = thisNodeColor; } else { var mapping_1 = buildVisualMapping(node, nodeModel, nodeLayout, nodeItemStyleModel, visuals, viewChildren); // Designate visual to children. Object(core_util["each"])(viewChildren, function (child, index) { // If higher than viewRoot, only ancestors of viewRoot is needed to visit. if (child.depth >= viewRootAncestors.length || child === viewRootAncestors[child.depth]) { var childVisual = mapVisual(nodeModel, visuals, child, index, mapping_1, seriesModel); travelTree(child, childVisual, viewRootAncestors, seriesModel); } }); } } function buildVisuals(nodeItemStyleModel, designatedVisual, seriesModel) { var visuals = Object(core_util["extend"])({}, designatedVisual); var designatedVisualItemStyle = seriesModel.designatedVisualItemStyle; Object(core_util["each"])(['color', 'colorAlpha', 'colorSaturation'], function (visualName) { // Priority: thisNode > thisLevel > parentNodeDesignated > seriesModel designatedVisualItemStyle[visualName] = designatedVisual[visualName]; var val = nodeItemStyleModel.get(visualName); designatedVisualItemStyle[visualName] = null; val != null && (visuals[visualName] = val); }); return visuals; } function calculateColor(visuals) { var color = getValueVisualDefine(visuals, 'color'); if (color) { var colorAlpha = getValueVisualDefine(visuals, 'colorAlpha'); var colorSaturation = getValueVisualDefine(visuals, 'colorSaturation'); if (colorSaturation) { color = Object(tool_color["modifyHSL"])(color, null, null, colorSaturation); } if (colorAlpha) { color = Object(tool_color["modifyAlpha"])(color, colorAlpha); } return color; } } function calculateBorderColor(borderColorSaturation, thisNodeColor) { return thisNodeColor != null // Can only be string ? Object(tool_color["modifyHSL"])(thisNodeColor, null, null, borderColorSaturation) : null; } function getValueVisualDefine(visuals, name) { var value = visuals[name]; if (value != null && value !== 'none') { return value; } } function buildVisualMapping(node, nodeModel, nodeLayout, nodeItemStyleModel, visuals, viewChildren) { if (!viewChildren || !viewChildren.length) { return; } var rangeVisual = getRangeVisual(nodeModel, 'color') || visuals.color != null && visuals.color !== 'none' && (getRangeVisual(nodeModel, 'colorAlpha') || getRangeVisual(nodeModel, 'colorSaturation')); if (!rangeVisual) { return; } var visualMin = nodeModel.get('visualMin'); var visualMax = nodeModel.get('visualMax'); var dataExtent = nodeLayout.dataExtent.slice(); visualMin != null && visualMin < dataExtent[0] && (dataExtent[0] = visualMin); visualMax != null && visualMax > dataExtent[1] && (dataExtent[1] = visualMax); var colorMappingBy = nodeModel.get('colorMappingBy'); var opt = { type: rangeVisual.name, dataExtent: dataExtent, visual: rangeVisual.range }; if (opt.type === 'color' && (colorMappingBy === 'index' || colorMappingBy === 'id')) { opt.mappingMethod = 'category'; opt.loop = true; // categories is ordinal, so do not set opt.categories. } else { opt.mappingMethod = 'linear'; } var mapping = new visual_VisualMapping(opt); treemapVisual_inner(mapping).drColorMappingBy = colorMappingBy; return mapping; } // Notice: If we don't have the attribute 'colorRange', but only use // attribute 'color' to represent both concepts of 'colorRange' and 'color', // (It means 'colorRange' when 'color' is Array, means 'color' when not array), // this problem will be encountered: // If a level-1 node doesn't have children, and its siblings have children, // and colorRange is set on level-1, then the node cannot be colored. // So we separate 'colorRange' and 'color' to different attributes. function getRangeVisual(nodeModel, name) { // 'colorRange', 'colorARange', 'colorSRange'. // If not exists on this node, fetch from levels and series. var range = nodeModel.get(name); return Object(core_util["isArray"])(range) && range.length ? { name: name, range: range } : null; } function mapVisual(nodeModel, visuals, child, index, mapping, seriesModel) { var childVisuals = Object(core_util["extend"])({}, visuals); if (mapping) { // Only support color, colorAlpha, colorSaturation. var mappingType = mapping.type; var colorMappingBy = mappingType === 'color' && treemapVisual_inner(mapping).drColorMappingBy; var value = colorMappingBy === 'index' ? index : colorMappingBy === 'id' ? seriesModel.mapIdToIndex(child.getId()) : child.getValue(nodeModel.get('visualDimension')); childVisuals[mappingType] = mapping.mapValueToVisual(value); } return childVisuals; } // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/treemap/treemapLayout.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ /* * A third-party license is embedded for some of the code in this file: * The treemap layout implementation was originally copied from * "d3.js" with some modifications made for this project. * (See more details in the comment of the method "squarify" below.) * The use of the source code of this file is also subject to the terms * and consitions of the license of "d3.js" (BSD-3Clause, see * ). */ var treemapLayout_mathMax = Math.max; var treemapLayout_mathMin = Math.min; var retrieveValue = core_util["retrieve"]; var treemapLayout_each = core_util["each"]; var PATH_BORDER_WIDTH = ['itemStyle', 'borderWidth']; var PATH_GAP_WIDTH = ['itemStyle', 'gapWidth']; var PATH_UPPER_LABEL_SHOW = ['upperLabel', 'show']; var PATH_UPPER_LABEL_HEIGHT = ['upperLabel', 'height']; ; /** * @public */ /* harmony default export */ var treemapLayout = ({ seriesType: 'treemap', reset: function (seriesModel, ecModel, api, payload) { // Layout result in each node: // {x, y, width, height, area, borderWidth} var ecWidth = api.getWidth(); var ecHeight = api.getHeight(); var seriesOption = seriesModel.option; var layoutInfo = getLayoutRect(seriesModel.getBoxLayoutParams(), { width: api.getWidth(), height: api.getHeight() }); var size = seriesOption.size || []; // Compatible with ec2. var containerWidth = number_parsePercent(retrieveValue(layoutInfo.width, size[0]), ecWidth); var containerHeight = number_parsePercent(retrieveValue(layoutInfo.height, size[1]), ecHeight); // Fetch payload info. var payloadType = payload && payload.type; var types = ['treemapZoomToNode', 'treemapRootToNode']; var targetInfo = retrieveTargetInfo(payload, types, seriesModel); var rootRect = payloadType === 'treemapRender' || payloadType === 'treemapMove' ? payload.rootRect : null; var viewRoot = seriesModel.getViewRoot(); var viewAbovePath = getPathToRoot(viewRoot); if (payloadType !== 'treemapMove') { var rootSize = payloadType === 'treemapZoomToNode' ? estimateRootSize(seriesModel, targetInfo, viewRoot, containerWidth, containerHeight) : rootRect ? [rootRect.width, rootRect.height] : [containerWidth, containerHeight]; var sort_1 = seriesOption.sort; if (sort_1 && sort_1 !== 'asc' && sort_1 !== 'desc') { // Default to be desc order. sort_1 = 'desc'; } var options = { squareRatio: seriesOption.squareRatio, sort: sort_1, leafDepth: seriesOption.leafDepth }; // layout should be cleared because using updateView but not update. viewRoot.hostTree.clearLayouts(); // TODO // optimize: if out of view clip, do not layout. // But take care that if do not render node out of view clip, // how to calculate start po var viewRootLayout_1 = { x: 0, y: 0, width: rootSize[0], height: rootSize[1], area: rootSize[0] * rootSize[1] }; viewRoot.setLayout(viewRootLayout_1); squarify(viewRoot, options, false, 0); // Supplement layout. viewRootLayout_1 = viewRoot.getLayout(); treemapLayout_each(viewAbovePath, function (node, index) { var childValue = (viewAbovePath[index + 1] || viewRoot).getValue(); node.setLayout(core_util["extend"]({ dataExtent: [childValue, childValue], borderWidth: 0, upperHeight: 0 }, viewRootLayout_1)); }); } var treeRoot = seriesModel.getData().tree.root; treeRoot.setLayout(calculateRootPosition(layoutInfo, rootRect, targetInfo), true); seriesModel.setLayoutInfo(layoutInfo); // FIXME // 现在没有clip功能,暂时取ec高宽。 prunning(treeRoot, // Transform to base element coordinate system. new core_BoundingRect(-layoutInfo.x, -layoutInfo.y, ecWidth, ecHeight), viewAbovePath, viewRoot, 0); } }); /** * Layout treemap with squarify algorithm. * The original presentation of this algorithm * was made by Mark Bruls, Kees Huizing, and Jarke J. van Wijk * . * The implementation of this algorithm was originally copied from "d3.js" * * with some modifications made for this program. * See the license statement at the head of this file. * * @protected * @param {module:echarts/data/Tree~TreeNode} node * @param {Object} options * @param {string} options.sort 'asc' or 'desc' * @param {number} options.squareRatio * @param {boolean} hideChildren * @param {number} depth */ function squarify(node, options, hideChildren, depth) { var width; var height; if (node.isRemoved()) { return; } var thisLayout = node.getLayout(); width = thisLayout.width; height = thisLayout.height; // Considering border and gap var nodeModel = node.getModel(); var borderWidth = nodeModel.get(PATH_BORDER_WIDTH); var halfGapWidth = nodeModel.get(PATH_GAP_WIDTH) / 2; var upperLabelHeight = getUpperLabelHeight(nodeModel); var upperHeight = Math.max(borderWidth, upperLabelHeight); var layoutOffset = borderWidth - halfGapWidth; var layoutOffsetUpper = upperHeight - halfGapWidth; node.setLayout({ borderWidth: borderWidth, upperHeight: upperHeight, upperLabelHeight: upperLabelHeight }, true); width = treemapLayout_mathMax(width - 2 * layoutOffset, 0); height = treemapLayout_mathMax(height - layoutOffset - layoutOffsetUpper, 0); var totalArea = width * height; var viewChildren = initChildren(node, nodeModel, totalArea, options, hideChildren, depth); if (!viewChildren.length) { return; } var rect = { x: layoutOffset, y: layoutOffsetUpper, width: width, height: height }; var rowFixedLength = treemapLayout_mathMin(width, height); var best = Infinity; // the best row score so far var row = []; row.area = 0; for (var i = 0, len = viewChildren.length; i < len;) { var child = viewChildren[i]; row.push(child); row.area += child.getLayout().area; var score = worst(row, rowFixedLength, options.squareRatio); // continue with this orientation if (score <= best) { i++; best = score; } // abort, and try a different orientation else { row.area -= row.pop().getLayout().area; treemapLayout_position(row, rowFixedLength, rect, halfGapWidth, false); rowFixedLength = treemapLayout_mathMin(rect.width, rect.height); row.length = row.area = 0; best = Infinity; } } if (row.length) { treemapLayout_position(row, rowFixedLength, rect, halfGapWidth, true); } if (!hideChildren) { var childrenVisibleMin = nodeModel.get('childrenVisibleMin'); if (childrenVisibleMin != null && totalArea < childrenVisibleMin) { hideChildren = true; } } for (var i = 0, len = viewChildren.length; i < len; i++) { squarify(viewChildren[i], options, hideChildren, depth + 1); } } /** * Set area to each child, and calculate data extent for visual coding. */ function initChildren(node, nodeModel, totalArea, options, hideChildren, depth) { var viewChildren = node.children || []; var orderBy = options.sort; orderBy !== 'asc' && orderBy !== 'desc' && (orderBy = null); var overLeafDepth = options.leafDepth != null && options.leafDepth <= depth; // leafDepth has higher priority. if (hideChildren && !overLeafDepth) { return node.viewChildren = []; } // Sort children, order by desc. viewChildren = core_util["filter"](viewChildren, function (child) { return !child.isRemoved(); }); treemapLayout_sort(viewChildren, orderBy); var info = statistic(nodeModel, viewChildren, orderBy); if (info.sum === 0) { return node.viewChildren = []; } info.sum = filterByThreshold(nodeModel, totalArea, info.sum, orderBy, viewChildren); if (info.sum === 0) { return node.viewChildren = []; } // Set area to each child. for (var i = 0, len = viewChildren.length; i < len; i++) { var area = viewChildren[i].getValue() / info.sum * totalArea; // Do not use setLayout({...}, true), because it is needed to clear last layout. viewChildren[i].setLayout({ area: area }); } if (overLeafDepth) { viewChildren.length && node.setLayout({ isLeafRoot: true }, true); viewChildren.length = 0; } node.viewChildren = viewChildren; node.setLayout({ dataExtent: info.dataExtent }, true); return viewChildren; } /** * Consider 'visibleMin'. Modify viewChildren and get new sum. */ function filterByThreshold(nodeModel, totalArea, sum, orderBy, orderedChildren) { // visibleMin is not supported yet when no option.sort. if (!orderBy) { return sum; } var visibleMin = nodeModel.get('visibleMin'); var len = orderedChildren.length; var deletePoint = len; // Always travel from little value to big value. for (var i = len - 1; i >= 0; i--) { var value = orderedChildren[orderBy === 'asc' ? len - i - 1 : i].getValue(); if (value / sum * totalArea < visibleMin) { deletePoint = i; sum -= value; } } orderBy === 'asc' ? orderedChildren.splice(0, len - deletePoint) : orderedChildren.splice(deletePoint, len - deletePoint); return sum; } /** * Sort */ function treemapLayout_sort(viewChildren, orderBy) { if (orderBy) { viewChildren.sort(function (a, b) { var diff = orderBy === 'asc' ? a.getValue() - b.getValue() : b.getValue() - a.getValue(); return diff === 0 ? orderBy === 'asc' ? a.dataIndex - b.dataIndex : b.dataIndex - a.dataIndex : diff; }); } return viewChildren; } /** * Statistic */ function statistic(nodeModel, children, orderBy) { // Calculate sum. var sum = 0; for (var i = 0, len = children.length; i < len; i++) { sum += children[i].getValue(); } // Statistic data extent for latter visual coding. // Notice: data extent should be calculate based on raw children // but not filtered view children, otherwise visual mapping will not // be stable when zoom (where children is filtered by visibleMin). var dimension = nodeModel.get('visualDimension'); var dataExtent; // The same as area dimension. if (!children || !children.length) { dataExtent = [NaN, NaN]; } else if (dimension === 'value' && orderBy) { dataExtent = [children[children.length - 1].getValue(), children[0].getValue()]; orderBy === 'asc' && dataExtent.reverse(); } // Other dimension. else { dataExtent = [Infinity, -Infinity]; treemapLayout_each(children, function (child) { var value = child.getValue(dimension); value < dataExtent[0] && (dataExtent[0] = value); value > dataExtent[1] && (dataExtent[1] = value); }); } return { sum: sum, dataExtent: dataExtent }; } /** * Computes the score for the specified row, * as the worst aspect ratio. */ function worst(row, rowFixedLength, ratio) { var areaMax = 0; var areaMin = Infinity; for (var i = 0, area = void 0, len = row.length; i < len; i++) { area = row[i].getLayout().area; if (area) { area < areaMin && (areaMin = area); area > areaMax && (areaMax = area); } } var squareArea = row.area * row.area; var f = rowFixedLength * rowFixedLength * ratio; return squareArea ? treemapLayout_mathMax(f * areaMax / squareArea, squareArea / (f * areaMin)) : Infinity; } /** * Positions the specified row of nodes. Modifies `rect`. */ function treemapLayout_position(row, rowFixedLength, rect, halfGapWidth, flush) { // When rowFixedLength === rect.width, // it is horizontal subdivision, // rowFixedLength is the width of the subdivision, // rowOtherLength is the height of the subdivision, // and nodes will be positioned from left to right. // wh[idx0WhenH] means: when horizontal, // wh[idx0WhenH] => wh[0] => 'width'. // xy[idx1WhenH] => xy[1] => 'y'. var idx0WhenH = rowFixedLength === rect.width ? 0 : 1; var idx1WhenH = 1 - idx0WhenH; var xy = ['x', 'y']; var wh = ['width', 'height']; var last = rect[xy[idx0WhenH]]; var rowOtherLength = rowFixedLength ? row.area / rowFixedLength : 0; if (flush || rowOtherLength > rect[wh[idx1WhenH]]) { rowOtherLength = rect[wh[idx1WhenH]]; // over+underflow } for (var i = 0, rowLen = row.length; i < rowLen; i++) { var node = row[i]; var nodeLayout = {}; var step = rowOtherLength ? node.getLayout().area / rowOtherLength : 0; var wh1 = nodeLayout[wh[idx1WhenH]] = treemapLayout_mathMax(rowOtherLength - 2 * halfGapWidth, 0); // We use Math.max/min to avoid negative width/height when considering gap width. var remain = rect[xy[idx0WhenH]] + rect[wh[idx0WhenH]] - last; var modWH = i === rowLen - 1 || remain < step ? remain : step; var wh0 = nodeLayout[wh[idx0WhenH]] = treemapLayout_mathMax(modWH - 2 * halfGapWidth, 0); nodeLayout[xy[idx1WhenH]] = rect[xy[idx1WhenH]] + treemapLayout_mathMin(halfGapWidth, wh1 / 2); nodeLayout[xy[idx0WhenH]] = last + treemapLayout_mathMin(halfGapWidth, wh0 / 2); last += modWH; node.setLayout(nodeLayout, true); } rect[xy[idx1WhenH]] += rowOtherLength; rect[wh[idx1WhenH]] -= rowOtherLength; } // Return [containerWidth, containerHeight] as default. function estimateRootSize(seriesModel, targetInfo, viewRoot, containerWidth, containerHeight) { // If targetInfo.node exists, we zoom to the node, // so estimate whole width and height by target node. var currNode = (targetInfo || {}).node; var defaultSize = [containerWidth, containerHeight]; if (!currNode || currNode === viewRoot) { return defaultSize; } var parent; var viewArea = containerWidth * containerHeight; var area = viewArea * seriesModel.option.zoomToNodeRatio; while (parent = currNode.parentNode) { // jshint ignore:line var sum = 0; var siblings = parent.children; for (var i = 0, len = siblings.length; i < len; i++) { sum += siblings[i].getValue(); } var currNodeValue = currNode.getValue(); if (currNodeValue === 0) { return defaultSize; } area *= sum / currNodeValue; // Considering border, suppose aspect ratio is 1. var parentModel = parent.getModel(); var borderWidth = parentModel.get(PATH_BORDER_WIDTH); var upperHeight = Math.max(borderWidth, getUpperLabelHeight(parentModel)); area += 4 * borderWidth * borderWidth + (3 * borderWidth + upperHeight) * Math.pow(area, 0.5); area > MAX_SAFE_INTEGER && (area = MAX_SAFE_INTEGER); currNode = parent; } area < viewArea && (area = viewArea); var scale = Math.pow(area / viewArea, 0.5); return [containerWidth * scale, containerHeight * scale]; } // Root position based on coord of containerGroup function calculateRootPosition(layoutInfo, rootRect, targetInfo) { if (rootRect) { return { x: rootRect.x, y: rootRect.y }; } var defaultPosition = { x: 0, y: 0 }; if (!targetInfo) { return defaultPosition; } // If targetInfo is fetched by 'retrieveTargetInfo', // old tree and new tree are the same tree, // so the node still exists and we can visit it. var targetNode = targetInfo.node; var layout = targetNode.getLayout(); if (!layout) { return defaultPosition; } // Transform coord from local to container. var targetCenter = [layout.width / 2, layout.height / 2]; var node = targetNode; while (node) { var nodeLayout = node.getLayout(); targetCenter[0] += nodeLayout.x; targetCenter[1] += nodeLayout.y; node = node.parentNode; } return { x: layoutInfo.width / 2 - targetCenter[0], y: layoutInfo.height / 2 - targetCenter[1] }; } // Mark nodes visible for prunning when visual coding and rendering. // Prunning depends on layout and root position, so we have to do it after layout. function prunning(node, clipRect, viewAbovePath, viewRoot, depth) { var nodeLayout = node.getLayout(); var nodeInViewAbovePath = viewAbovePath[depth]; var isAboveViewRoot = nodeInViewAbovePath && nodeInViewAbovePath === node; if (nodeInViewAbovePath && !isAboveViewRoot || depth === viewAbovePath.length && node !== viewRoot) { return; } node.setLayout({ // isInView means: viewRoot sub tree + viewAbovePath isInView: true, // invisible only means: outside view clip so that the node can not // see but still layout for animation preparation but not render. invisible: !isAboveViewRoot && !clipRect.intersect(nodeLayout), isAboveViewRoot: isAboveViewRoot }, true); // Transform to child coordinate. var childClipRect = new core_BoundingRect(clipRect.x - nodeLayout.x, clipRect.y - nodeLayout.y, clipRect.width, clipRect.height); treemapLayout_each(node.viewChildren || [], function (child) { prunning(child, childClipRect, viewAbovePath, viewRoot, depth + 1); }); } function getUpperLabelHeight(model) { return model.get(PATH_UPPER_LABEL_SHOW) ? model.get(PATH_UPPER_LABEL_HEIGHT) : 0; } // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/treemap/install.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 treemap_install_install(registers) { registers.registerSeriesModel(TreemapSeries); registers.registerChartView(treemap_TreemapView); registers.registerVisual(treemapVisual); registers.registerLayout(treemapLayout); installTreemapAction(registers); } // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/graph/categoryFilter.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 categoryFilter(ecModel) { var legendModels = ecModel.findComponents({ mainType: 'legend' }); if (!legendModels || !legendModels.length) { return; } ecModel.eachSeriesByType('graph', function (graphSeries) { var categoriesData = graphSeries.getCategoriesData(); var graph = graphSeries.getGraph(); var data = graph.data; var categoryNames = categoriesData.mapArray(categoriesData.getName); data.filterSelf(function (idx) { var model = data.getItemModel(idx); var category = model.getShallow('category'); if (category != null) { if (Object(core_util["isNumber"])(category)) { category = categoryNames[category]; } // If in any legend component the status is not selected. for (var i = 0; i < legendModels.length; i++) { if (!legendModels[i].isSelected(category)) { return false; } } } return true; }); }); } // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/graph/categoryVisual.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 categoryVisual(ecModel) { var paletteScope = {}; ecModel.eachSeriesByType('graph', function (seriesModel) { var categoriesData = seriesModel.getCategoriesData(); var data = seriesModel.getData(); var categoryNameIdxMap = {}; categoriesData.each(function (idx) { var name = categoriesData.getName(idx); // Add prefix to avoid conflict with Object.prototype. categoryNameIdxMap['ec-' + name] = idx; var itemModel = categoriesData.getItemModel(idx); var style = itemModel.getModel('itemStyle').getItemStyle(); if (!style.fill) { // Get color from palette. style.fill = seriesModel.getColorFromPalette(name, paletteScope); } categoriesData.setItemVisual(idx, 'style', style); var symbolVisualList = ['symbol', 'symbolSize', 'symbolKeepAspect']; for (var i = 0; i < symbolVisualList.length; i++) { var symbolVisual = itemModel.getShallow(symbolVisualList[i], true); if (symbolVisual != null) { categoriesData.setItemVisual(idx, symbolVisualList[i], symbolVisual); } } }); // Assign category color to visual if (categoriesData.count()) { data.each(function (idx) { var model = data.getItemModel(idx); var categoryIdx = model.getShallow('category'); if (categoryIdx != null) { if (Object(core_util["isString"])(categoryIdx)) { categoryIdx = categoryNameIdxMap['ec-' + categoryIdx]; } var categoryStyle = categoriesData.getItemVisual(categoryIdx, 'style'); var style = data.ensureUniqueItemVisual(idx, 'style'); Object(core_util["extend"])(style, categoryStyle); var visualList = ['symbol', 'symbolSize', 'symbolKeepAspect']; for (var i = 0; i < visualList.length; i++) { data.setItemVisual(idx, visualList[i], categoriesData.getItemVisual(categoryIdx, visualList[i])); } } }); } }); } // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/graph/edgeVisual.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 edgeVisual_normalize(a) { if (!(a instanceof Array)) { a = [a, a]; } return a; } function graphEdgeVisual(ecModel) { ecModel.eachSeriesByType('graph', function (seriesModel) { var graph = seriesModel.getGraph(); var edgeData = seriesModel.getEdgeData(); var symbolType = edgeVisual_normalize(seriesModel.get('edgeSymbol')); var symbolSize = edgeVisual_normalize(seriesModel.get('edgeSymbolSize')); // const colorQuery = ['lineStyle', 'color'] as const; // const opacityQuery = ['lineStyle', 'opacity'] as const; edgeData.setVisual('fromSymbol', symbolType && symbolType[0]); edgeData.setVisual('toSymbol', symbolType && symbolType[1]); edgeData.setVisual('fromSymbolSize', symbolSize && symbolSize[0]); edgeData.setVisual('toSymbolSize', symbolSize && symbolSize[1]); edgeData.setVisual('style', seriesModel.getModel('lineStyle').getLineStyle()); edgeData.each(function (idx) { var itemModel = edgeData.getItemModel(idx); var edge = graph.getEdgeByIndex(idx); var symbolType = edgeVisual_normalize(itemModel.getShallow('symbol', true)); var symbolSize = edgeVisual_normalize(itemModel.getShallow('symbolSize', true)); // Edge visual must after node visual var style = itemModel.getModel('lineStyle').getLineStyle(); var existsStyle = edgeData.ensureUniqueItemVisual(idx, 'style'); Object(core_util["extend"])(existsStyle, style); switch (existsStyle.stroke) { case 'source': { var nodeStyle = edge.node1.getVisual('style'); existsStyle.stroke = nodeStyle && nodeStyle.fill; break; } case 'target': { var nodeStyle = edge.node2.getVisual('style'); existsStyle.stroke = nodeStyle && nodeStyle.fill; break; } } symbolType[0] && edge.setVisual('fromSymbol', symbolType[0]); symbolType[1] && edge.setVisual('toSymbol', symbolType[1]); symbolSize[0] && edge.setVisual('fromSymbolSize', symbolSize[0]); symbolSize[1] && edge.setVisual('toSymbolSize', symbolSize[1]); }); }); } // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/helper/multipleGraphEdgeHelper.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ // @ts-nocheck var KEY_DELIMITER = '-->'; /** * params handler * @param {module:echarts/model/SeriesModel} seriesModel * @returns {*} */ var getAutoCurvenessParams = function (seriesModel) { return seriesModel.get('autoCurveness') || null; }; /** * Generate a list of edge curvatures, 20 is the default * @param {module:echarts/model/SeriesModel} seriesModel * @param {number} appendLength * @return 20 => [0, -0.2, 0.2, -0.4, 0.4, -0.6, 0.6, -0.8, 0.8, -1, 1, -1.2, 1.2, -1.4, 1.4, -1.6, 1.6, -1.8, 1.8, -2] */ var createCurveness = function (seriesModel, appendLength) { var autoCurvenessParmas = getAutoCurvenessParams(seriesModel); var length = 20; var curvenessList = []; // handler the function set if (core_util["isNumber"](autoCurvenessParmas)) { length = autoCurvenessParmas; } else if (core_util["isArray"](autoCurvenessParmas)) { seriesModel.__curvenessList = autoCurvenessParmas; return; } // append length if (appendLength > length) { length = appendLength; } // make sure the length is even var len = length % 2 ? length + 2 : length + 3; curvenessList = []; for (var i = 0; i < len; i++) { curvenessList.push((i % 2 ? i + 1 : i) / 10 * (i % 2 ? -1 : 1)); } seriesModel.__curvenessList = curvenessList; }; /** * Create different cache key data in the positive and negative directions, in order to set the curvature later * @param {number|string|module:echarts/data/Graph.Node} n1 * @param {number|string|module:echarts/data/Graph.Node} n2 * @param {module:echarts/model/SeriesModel} seriesModel * @returns {string} key */ var getKeyOfEdges = function (n1, n2, seriesModel) { var source = [n1.id, n1.dataIndex].join('.'); var target = [n2.id, n2.dataIndex].join('.'); return [seriesModel.uid, source, target].join(KEY_DELIMITER); }; /** * get opposite key * @param {string} key * @returns {string} */ var getOppositeKey = function (key) { var keys = key.split(KEY_DELIMITER); return [keys[0], keys[2], keys[1]].join(KEY_DELIMITER); }; /** * get edgeMap with key * @param edge * @param {module:echarts/model/SeriesModel} seriesModel */ var getEdgeFromMap = function (edge, seriesModel) { var key = getKeyOfEdges(edge.node1, edge.node2, seriesModel); return seriesModel.__edgeMap[key]; }; /** * calculate all cases total length * @param edge * @param seriesModel * @returns {number} */ var getTotalLengthBetweenNodes = function (edge, seriesModel) { var len = getEdgeMapLengthWithKey(getKeyOfEdges(edge.node1, edge.node2, seriesModel), seriesModel); var lenV = getEdgeMapLengthWithKey(getKeyOfEdges(edge.node2, edge.node1, seriesModel), seriesModel); return len + lenV; }; /** * * @param key */ var getEdgeMapLengthWithKey = function (key, seriesModel) { var edgeMap = seriesModel.__edgeMap; return edgeMap[key] ? edgeMap[key].length : 0; }; /** * Count the number of edges between the same two points, used to obtain the curvature table and the parity of the edge * @see /graph/GraphSeries.js@getInitialData * @param {module:echarts/model/SeriesModel} seriesModel */ function initCurvenessList(seriesModel) { if (!getAutoCurvenessParams(seriesModel)) { return; } seriesModel.__curvenessList = []; seriesModel.__edgeMap = {}; // calc the array of curveness List createCurveness(seriesModel); } /** * set edgeMap with key * @param {number|string|module:echarts/data/Graph.Node} n1 * @param {number|string|module:echarts/data/Graph.Node} n2 * @param {module:echarts/model/SeriesModel} seriesModel * @param {number} index */ function createEdgeMapForCurveness(n1, n2, seriesModel, index) { if (!getAutoCurvenessParams(seriesModel)) { return; } var key = getKeyOfEdges(n1, n2, seriesModel); var edgeMap = seriesModel.__edgeMap; var oppositeEdges = edgeMap[getOppositeKey(key)]; // set direction if (edgeMap[key] && !oppositeEdges) { edgeMap[key].isForward = true; } else if (oppositeEdges && edgeMap[key]) { oppositeEdges.isForward = true; edgeMap[key].isForward = false; } edgeMap[key] = edgeMap[key] || []; edgeMap[key].push(index); } /** * get curvature for edge * @param edge * @param {module:echarts/model/SeriesModel} seriesModel * @param index */ function getCurvenessForEdge(edge, seriesModel, index, needReverse) { var autoCurvenessParams = getAutoCurvenessParams(seriesModel); var isArrayParam = core_util["isArray"](autoCurvenessParams); if (!autoCurvenessParams) { return null; } var edgeArray = getEdgeFromMap(edge, seriesModel); if (!edgeArray) { return null; } var edgeIndex = -1; for (var i = 0; i < edgeArray.length; i++) { if (edgeArray[i] === index) { edgeIndex = i; break; } } // if totalLen is Longer createCurveness var totalLen = getTotalLengthBetweenNodes(edge, seriesModel); createCurveness(seriesModel, totalLen); edge.lineStyle = edge.lineStyle || {}; // if is opposite edge, must set curvenss to opposite number var curKey = getKeyOfEdges(edge.node1, edge.node2, seriesModel); var curvenessList = seriesModel.__curvenessList; // if pass array no need parity var parityCorrection = isArrayParam ? 0 : totalLen % 2 ? 0 : 1; if (!edgeArray.isForward) { // the opposite edge show outside var oppositeKey = getOppositeKey(curKey); var len = getEdgeMapLengthWithKey(oppositeKey, seriesModel); var resValue = curvenessList[edgeIndex + len + parityCorrection]; // isNeedReverse, simple, force type need reverse the curveness in the junction of the forword and the opposite if (needReverse) { // set as array may make the parity handle with the len of opposite if (isArrayParam) { if (autoCurvenessParams && autoCurvenessParams[0] === 0) { return (len + parityCorrection) % 2 ? resValue : -resValue; } else { return ((len % 2 ? 0 : 1) + parityCorrection) % 2 ? resValue : -resValue; } } else { return (len + parityCorrection) % 2 ? resValue : -resValue; } } else { return curvenessList[edgeIndex + len + parityCorrection]; } } else { return curvenessList[parityCorrection + edgeIndex]; } } // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/graph/simpleLayoutHelper.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 simpleLayout(seriesModel) { var coordSys = seriesModel.coordinateSystem; if (coordSys && coordSys.type !== 'view') { return; } var graph = seriesModel.getGraph(); graph.eachNode(function (node) { var model = node.getModel(); node.setLayout([+model.get('x'), +model.get('y')]); }); simpleLayoutEdge(graph, seriesModel); } function simpleLayoutEdge(graph, seriesModel) { graph.eachEdge(function (edge, index) { var curveness = core_util["retrieve3"](edge.getModel().get(['lineStyle', 'curveness']), -getCurvenessForEdge(edge, seriesModel, index, true), 0); var p1 = clone(edge.node1.getLayout()); var p2 = clone(edge.node2.getLayout()); var points = [p1, p2]; if (+curveness) { points.push([(p1[0] + p2[0]) / 2 - (p1[1] - p2[1]) * curveness, (p1[1] + p2[1]) / 2 - (p2[0] - p1[0]) * curveness]); } edge.setLayout(points); }); } // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/graph/simpleLayout.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 graphSimpleLayout(ecModel, api) { ecModel.eachSeriesByType('graph', function (seriesModel) { var layout = seriesModel.get('layout'); var coordSys = seriesModel.coordinateSystem; if (coordSys && coordSys.type !== 'view') { var data_1 = seriesModel.getData(); var dimensions_1 = []; Object(core_util["each"])(coordSys.dimensions, function (coordDim) { dimensions_1 = dimensions_1.concat(data_1.mapDimensionsAll(coordDim)); }); for (var dataIndex = 0; dataIndex < data_1.count(); dataIndex++) { var value = []; var hasValue = false; for (var i = 0; i < dimensions_1.length; i++) { var val = data_1.get(dimensions_1[i], dataIndex); if (!isNaN(val)) { hasValue = true; } value.push(val); } if (hasValue) { data_1.setItemLayout(dataIndex, coordSys.dataToPoint(value)); } else { // Also {Array.}, not undefined to avoid if...else... statement data_1.setItemLayout(dataIndex, [NaN, NaN]); } } simpleLayoutEdge(data_1.graph, seriesModel); } else if (!layout || layout === 'none') { simpleLayout(seriesModel); } }); } // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/graph/graphHelper.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 getNodeGlobalScale(seriesModel) { var coordSys = seriesModel.coordinateSystem; if (coordSys.type !== 'view') { return 1; } var nodeScaleRatio = seriesModel.option.nodeScaleRatio; var groupZoom = coordSys.scaleX; // Scale node when zoom changes var roamZoom = coordSys.getZoom(); var nodeScale = (roamZoom - 1) * nodeScaleRatio + 1; return nodeScale / groupZoom; } function getSymbolSize(node) { var symbolSize = node.getVisual('symbolSize'); if (symbolSize instanceof Array) { symbolSize = (symbolSize[0] + symbolSize[1]) / 2; } return +symbolSize; } // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/graph/circularLayoutHelper.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 circularLayoutHelper_PI = Math.PI; var _symbolRadiansHalf = []; /** * `basedOn` can be: * 'value': * This layout is not accurate and have same bad case. For example, * if the min value is very smaller than the max value, the nodes * with the min value probably overlap even though there is enough * space to layout them. So we only use this approach in the as the * init layout of the force layout. * FIXME * Probably we do not need this method any more but use * `basedOn: 'symbolSize'` in force layout if * delay its init operations to GraphView. * 'symbolSize': * This approach work only if all of the symbol size calculated. * That is, the progressive rendering is not applied to graph. * FIXME * If progressive rendering is applied to graph some day, * probably we have to use `basedOn: 'value'`. */ function circularLayout(seriesModel, basedOn, draggingNode, pointer) { var coordSys = seriesModel.coordinateSystem; if (coordSys && coordSys.type !== 'view') { return; } var rect = coordSys.getBoundingRect(); var nodeData = seriesModel.getData(); var graph = nodeData.graph; var cx = rect.width / 2 + rect.x; var cy = rect.height / 2 + rect.y; var r = Math.min(rect.width, rect.height) / 2; var count = nodeData.count(); nodeData.setLayout({ cx: cx, cy: cy }); if (!count) { return; } if (draggingNode) { var _a = coordSys.pointToData(pointer), tempX = _a[0], tempY = _a[1]; var v = [tempX - cx, tempY - cy]; normalize(v, v); vector_scale(v, v, r); draggingNode.setLayout([cx + v[0], cy + v[1]], true); var circularRotateLabel = seriesModel.get(['circular', 'rotateLabel']); rotateNodeLabel(draggingNode, circularRotateLabel, cx, cy); } _layoutNodesBasedOn[basedOn](seriesModel, graph, nodeData, r, cx, cy, count); graph.eachEdge(function (edge, index) { var curveness = core_util["retrieve3"](edge.getModel().get(['lineStyle', 'curveness']), getCurvenessForEdge(edge, seriesModel, index), 0); var p1 = clone(edge.node1.getLayout()); var p2 = clone(edge.node2.getLayout()); var cp1; var x12 = (p1[0] + p2[0]) / 2; var y12 = (p1[1] + p2[1]) / 2; if (+curveness) { curveness *= 3; cp1 = [cx * curveness + x12 * (1 - curveness), cy * curveness + y12 * (1 - curveness)]; } edge.setLayout([p1, p2, cp1]); }); } var _layoutNodesBasedOn = { value: function (seriesModel, graph, nodeData, r, cx, cy, count) { var angle = 0; var sum = nodeData.getSum('value'); var unitAngle = Math.PI * 2 / (sum || count); graph.eachNode(function (node) { var value = node.getValue('value'); var radianHalf = unitAngle * (sum ? value : 1) / 2; angle += radianHalf; node.setLayout([r * Math.cos(angle) + cx, r * Math.sin(angle) + cy]); angle += radianHalf; }); }, symbolSize: function (seriesModel, graph, nodeData, r, cx, cy, count) { var sumRadian = 0; _symbolRadiansHalf.length = count; var nodeScale = getNodeGlobalScale(seriesModel); graph.eachNode(function (node) { var symbolSize = getSymbolSize(node); // Normally this case will not happen, but we still add // some the defensive code (2px is an arbitrary value). isNaN(symbolSize) && (symbolSize = 2); symbolSize < 0 && (symbolSize = 0); symbolSize *= nodeScale; var symbolRadianHalf = Math.asin(symbolSize / 2 / r); // when `symbolSize / 2` is bigger than `r`. isNaN(symbolRadianHalf) && (symbolRadianHalf = circularLayoutHelper_PI / 2); _symbolRadiansHalf[node.dataIndex] = symbolRadianHalf; sumRadian += symbolRadianHalf * 2; }); var halfRemainRadian = (2 * circularLayoutHelper_PI - sumRadian) / count / 2; var angle = 0; graph.eachNode(function (node) { var radianHalf = halfRemainRadian + _symbolRadiansHalf[node.dataIndex]; angle += radianHalf; // init circular layout for // 1. layout undefined node // 2. not fixed node (!node.getLayout() || !node.getLayout().fixed) && node.setLayout([r * Math.cos(angle) + cx, r * Math.sin(angle) + cy]); angle += radianHalf; }); } }; function rotateNodeLabel(node, circularRotateLabel, cx, cy) { var el = node.getGraphicEl(); // need to check if el exists. '-' value may not create node element. if (!el) { return; } var nodeModel = node.getModel(); var labelRotate = nodeModel.get(['label', 'rotate']) || 0; var symbolPath = el.getSymbolPath(); if (circularRotateLabel) { var pos = node.getLayout(); var rad = Math.atan2(pos[1] - cy, pos[0] - cx); if (rad < 0) { rad = Math.PI * 2 + rad; } var isLeft = pos[0] < cx; if (isLeft) { rad = rad - Math.PI; } var textPosition = isLeft ? 'left' : 'right'; symbolPath.setTextConfig({ rotation: -rad, position: textPosition, origin: 'center' }); var emphasisState = symbolPath.ensureState('emphasis'); core_util["extend"](emphasisState.textConfig || (emphasisState.textConfig = {}), { position: textPosition }); } else { symbolPath.setTextConfig({ rotation: labelRotate *= Math.PI / 180 }); } } // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/graph/circularLayout.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 graphCircularLayout(ecModel) { ecModel.eachSeriesByType('graph', function (seriesModel) { if (seriesModel.get('layout') === 'circular') { circularLayout(seriesModel, 'symbolSize'); } }); } // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/graph/forceHelper.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ /* * A third-party license is embedded for some of the code in this file: * Some formulas were originally copied from "d3.js" with some * modifications made for this project. * (See more details in the comment of the method "step" below.) * The use of the source code of this file is also subject to the terms * and consitions of the license of "d3.js" (BSD-3Clause, see * ). */ var forceHelper_scaleAndAdd = scaleAndAdd; // function adjacentNode(n, e) { // return e.n1 === n ? e.n2 : e.n1; // } function forceHelper_forceLayout(inNodes, inEdges, opts) { var nodes = inNodes; var edges = inEdges; var rect = opts.rect; var width = rect.width; var height = rect.height; var center = [rect.x + width / 2, rect.y + height / 2]; // let scale = opts.scale || 1; var gravity = opts.gravity == null ? 0.1 : opts.gravity; // for (let i = 0; i < edges.length; i++) { // let e = edges[i]; // let n1 = e.n1; // let n2 = e.n2; // n1.edges = n1.edges || []; // n2.edges = n2.edges || []; // n1.edges.push(e); // n2.edges.push(e); // } // Init position for (var i = 0; i < nodes.length; i++) { var n = nodes[i]; if (!n.p) { n.p = vector_create(width * (Math.random() - 0.5) + center[0], height * (Math.random() - 0.5) + center[1]); } n.pp = clone(n.p); n.edges = null; } // Formula in 'Graph Drawing by Force-directed Placement' // let k = scale * Math.sqrt(width * height / nodes.length); // let k2 = k * k; var initialFriction = opts.friction == null ? 0.6 : opts.friction; var friction = initialFriction; var beforeStepCallback; var afterStepCallback; return { warmUp: function () { friction = initialFriction * 0.8; }, setFixed: function (idx) { nodes[idx].fixed = true; }, setUnfixed: function (idx) { nodes[idx].fixed = false; }, /** * Before step hook */ beforeStep: function (cb) { beforeStepCallback = cb; }, /** * After step hook */ afterStep: function (cb) { afterStepCallback = cb; }, /** * Some formulas were originally copied from "d3.js" * https://github.com/d3/d3/blob/b516d77fb8566b576088e73410437494717ada26/src/layout/force.js * with some modifications made for this project. * See the license statement at the head of this file. */ step: function (cb) { beforeStepCallback && beforeStepCallback(nodes, edges); var v12 = []; var nLen = nodes.length; for (var i = 0; i < edges.length; i++) { var e = edges[i]; if (e.ignoreForceLayout) { continue; } var n1 = e.n1; var n2 = e.n2; sub(v12, n2.p, n1.p); var d = vector_len(v12) - e.d; var w = n2.w / (n1.w + n2.w); if (isNaN(w)) { w = 0; } normalize(v12, v12); !n1.fixed && forceHelper_scaleAndAdd(n1.p, n1.p, v12, w * d * friction); !n2.fixed && forceHelper_scaleAndAdd(n2.p, n2.p, v12, -(1 - w) * d * friction); } // Gravity for (var i = 0; i < nLen; i++) { var n = nodes[i]; if (!n.fixed) { sub(v12, center, n.p); // let d = vec2.len(v12); // vec2.scale(v12, v12, 1 / d); // let gravityFactor = gravity; forceHelper_scaleAndAdd(n.p, n.p, v12, gravity * friction); } } // Repulsive // PENDING for (var i = 0; i < nLen; i++) { var n1 = nodes[i]; for (var j = i + 1; j < nLen; j++) { var n2 = nodes[j]; sub(v12, n2.p, n1.p); var d = vector_len(v12); if (d === 0) { // Random repulse set(v12, Math.random() - 0.5, Math.random() - 0.5); d = 1; } var repFact = (n1.rep + n2.rep) / d / d; !n1.fixed && forceHelper_scaleAndAdd(n1.pp, n1.pp, v12, repFact); !n2.fixed && forceHelper_scaleAndAdd(n2.pp, n2.pp, v12, -repFact); } } var v = []; for (var i = 0; i < nLen; i++) { var n = nodes[i]; if (!n.fixed) { sub(v, n.p, n.pp); forceHelper_scaleAndAdd(n.p, n.p, v, friction); vector_copy(n.pp, n.p); } } friction = friction * 0.992; var finished = friction < 0.01; afterStepCallback && afterStepCallback(nodes, edges, finished); cb && cb(finished); } }; } // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/graph/forceLayout.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 graphForceLayout(ecModel) { ecModel.eachSeriesByType('graph', function (graphSeries) { var coordSys = graphSeries.coordinateSystem; if (coordSys && coordSys.type !== 'view') { return; } if (graphSeries.get('layout') === 'force') { var preservedPoints_1 = graphSeries.preservedPoints || {}; var graph_1 = graphSeries.getGraph(); var nodeData_1 = graph_1.data; var edgeData = graph_1.edgeData; var forceModel = graphSeries.getModel('force'); var initLayout = forceModel.get('initLayout'); if (graphSeries.preservedPoints) { nodeData_1.each(function (idx) { var id = nodeData_1.getId(idx); nodeData_1.setItemLayout(idx, preservedPoints_1[id] || [NaN, NaN]); }); } else if (!initLayout || initLayout === 'none') { simpleLayout(graphSeries); } else if (initLayout === 'circular') { circularLayout(graphSeries, 'value'); } var nodeDataExtent_1 = nodeData_1.getDataExtent('value'); var edgeDataExtent_1 = edgeData.getDataExtent('value'); // let edgeDataExtent = edgeData.getDataExtent('value'); var repulsion = forceModel.get('repulsion'); var edgeLength = forceModel.get('edgeLength'); var repulsionArr_1 = core_util["isArray"](repulsion) ? repulsion : [repulsion, repulsion]; var edgeLengthArr_1 = core_util["isArray"](edgeLength) ? edgeLength : [edgeLength, edgeLength]; // Larger value has smaller length edgeLengthArr_1 = [edgeLengthArr_1[1], edgeLengthArr_1[0]]; var nodes_1 = nodeData_1.mapArray('value', function (value, idx) { var point = nodeData_1.getItemLayout(idx); var rep = linearMap(value, nodeDataExtent_1, repulsionArr_1); if (isNaN(rep)) { rep = (repulsionArr_1[0] + repulsionArr_1[1]) / 2; } return { w: rep, rep: rep, fixed: nodeData_1.getItemModel(idx).get('fixed'), p: !point || isNaN(point[0]) || isNaN(point[1]) ? null : point }; }); var edges = edgeData.mapArray('value', function (value, idx) { var edge = graph_1.getEdgeByIndex(idx); var d = linearMap(value, edgeDataExtent_1, edgeLengthArr_1); if (isNaN(d)) { d = (edgeLengthArr_1[0] + edgeLengthArr_1[1]) / 2; } var edgeModel = edge.getModel(); var curveness = core_util["retrieve3"](edge.getModel().get(['lineStyle', 'curveness']), -getCurvenessForEdge(edge, graphSeries, idx, true), 0); return { n1: nodes_1[edge.node1.dataIndex], n2: nodes_1[edge.node2.dataIndex], d: d, curveness: curveness, ignoreForceLayout: edgeModel.get('ignoreForceLayout') }; }); // let coordSys = graphSeries.coordinateSystem; var rect = coordSys.getBoundingRect(); var forceInstance = forceHelper_forceLayout(nodes_1, edges, { rect: rect, gravity: forceModel.get('gravity'), friction: forceModel.get('friction') }); forceInstance.beforeStep(function (nodes, edges) { for (var i = 0, l = nodes.length; i < l; i++) { if (nodes[i].fixed) { // Write back to layout instance vector_copy(nodes[i].p, graph_1.getNodeByIndex(i).getLayout()); } } }); forceInstance.afterStep(function (nodes, edges, stopped) { for (var i = 0, l = nodes.length; i < l; i++) { if (!nodes[i].fixed) { graph_1.getNodeByIndex(i).setLayout(nodes[i].p); } preservedPoints_1[nodeData_1.getId(i)] = nodes[i].p; } for (var i = 0, l = edges.length; i < l; i++) { var e = edges[i]; var edge = graph_1.getEdgeByIndex(i); var p1 = e.n1.p; var p2 = e.n2.p; var points = edge.getLayout(); points = points ? points.slice() : []; points[0] = points[0] || []; points[1] = points[1] || []; vector_copy(points[0], p1); vector_copy(points[1], p2); if (+e.curveness) { points[2] = [(p1[0] + p2[0]) / 2 - (p1[1] - p2[1]) * e.curveness, (p1[1] + p2[1]) / 2 - (p2[0] - p1[0]) * e.curveness]; } edge.setLayout(points); } }); graphSeries.forceLayout = forceInstance; graphSeries.preservedPoints = preservedPoints_1; // Step to get the layout forceInstance.step(); } else { // Remove prev injected forceLayout instance graphSeries.forceLayout = null; } }); } // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/graph/createView.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ // FIXME Where to create the simple view coordinate system function createView_getViewRect(seriesModel, api, aspect) { var option = Object(core_util["extend"])(seriesModel.getBoxLayoutParams(), { aspect: aspect }); return getLayoutRect(option, { width: api.getWidth(), height: api.getHeight() }); } function createViewCoordSys(ecModel, api) { var viewList = []; ecModel.eachSeriesByType('graph', function (seriesModel) { var coordSysType = seriesModel.get('coordinateSystem'); if (!coordSysType || coordSysType === 'view') { var data_1 = seriesModel.getData(); var positions = data_1.mapArray(function (idx) { var itemModel = data_1.getItemModel(idx); return [+itemModel.get('x'), +itemModel.get('y')]; }); var min = []; var max = []; fromPoints(positions, min, max); // If width or height is 0 if (max[0] - min[0] === 0) { max[0] += 1; min[0] -= 1; } if (max[1] - min[1] === 0) { max[1] += 1; min[1] -= 1; } var aspect = (max[0] - min[0]) / (max[1] - min[1]); // FIXME If get view rect after data processed? var viewRect = createView_getViewRect(seriesModel, api, aspect); // Position may be NaN, use view rect instead if (isNaN(aspect)) { min = [viewRect.x, viewRect.y]; max = [viewRect.x + viewRect.width, viewRect.y + viewRect.height]; } var bbWidth = max[0] - min[0]; var bbHeight = max[1] - min[1]; var viewWidth = viewRect.width; var viewHeight = viewRect.height; var viewCoordSys = seriesModel.coordinateSystem = new coord_View(); viewCoordSys.zoomLimit = seriesModel.get('scaleLimit'); viewCoordSys.setBoundingRect(min[0], min[1], bbWidth, bbHeight); viewCoordSys.setViewRect(viewRect.x, viewRect.y, viewWidth, viewHeight); // Update roam info viewCoordSys.setCenter(seriesModel.get('center'), api); viewCoordSys.setZoom(seriesModel.get('zoom')); viewList.push(viewCoordSys); } }); return viewList; } // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/helper/LinePath.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ /** * Line path for bezier and straight line draw */ var straightLineProto = shape_Line.prototype; var bezierCurveProto = shape_BezierCurve.prototype; var StraightLineShape = /** @class */function () { function StraightLineShape() { // Start point this.x1 = 0; this.y1 = 0; // End point this.x2 = 0; this.y2 = 0; this.percent = 1; } return StraightLineShape; }(); var LinePath_CurveShape = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(CurveShape, _super); function CurveShape() { return _super !== null && _super.apply(this, arguments) || this; } return CurveShape; }(StraightLineShape); function isStraightLine(shape) { return isNaN(+shape.cpx1) || isNaN(+shape.cpy1); } var LinePath_ECLinePath = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(ECLinePath, _super); function ECLinePath(opts) { var _this = _super.call(this, opts) || this; _this.type = 'ec-line'; return _this; } ECLinePath.prototype.getDefaultStyle = function () { return { stroke: '#000', fill: null }; }; ECLinePath.prototype.getDefaultShape = function () { return new StraightLineShape(); }; ECLinePath.prototype.buildPath = function (ctx, shape) { if (isStraightLine(shape)) { straightLineProto.buildPath.call(this, ctx, shape); } else { bezierCurveProto.buildPath.call(this, ctx, shape); } }; ECLinePath.prototype.pointAt = function (t) { if (isStraightLine(this.shape)) { return straightLineProto.pointAt.call(this, t); } else { return bezierCurveProto.pointAt.call(this, t); } }; ECLinePath.prototype.tangentAt = function (t) { var shape = this.shape; var p = isStraightLine(shape) ? [shape.x2 - shape.x1, shape.y2 - shape.y1] : bezierCurveProto.tangentAt.call(this, t); return normalize(p, p); }; return ECLinePath; }(graphic_Path); /* harmony default export */ var LinePath = (LinePath_ECLinePath); // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/helper/Line.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 SYMBOL_CATEGORIES = ['fromSymbol', 'toSymbol']; function makeSymbolTypeKey(symbolCategory) { return '_' + symbolCategory + 'Type'; } function makeSymbolTypeValue(name, lineData, idx) { var symbolType = lineData.getItemVisual(idx, name); if (!symbolType || symbolType === 'none') { return symbolType; } var symbolSize = lineData.getItemVisual(idx, name + 'Size'); var symbolRotate = lineData.getItemVisual(idx, name + 'Rotate'); var symbolOffset = lineData.getItemVisual(idx, name + 'Offset'); var symbolKeepAspect = lineData.getItemVisual(idx, name + 'KeepAspect'); var symbolSizeArr = normalizeSymbolSize(symbolSize); var symbolOffsetArr = normalizeSymbolOffset(symbolOffset || 0, symbolSizeArr); return symbolType + symbolSizeArr + symbolOffsetArr + (symbolRotate || '') + (symbolKeepAspect || ''); } /** * @inner */ function Line_createSymbol(name, lineData, idx) { var symbolType = lineData.getItemVisual(idx, name); if (!symbolType || symbolType === 'none') { return; } var symbolSize = lineData.getItemVisual(idx, name + 'Size'); var symbolRotate = lineData.getItemVisual(idx, name + 'Rotate'); var symbolOffset = lineData.getItemVisual(idx, name + 'Offset'); var symbolKeepAspect = lineData.getItemVisual(idx, name + 'KeepAspect'); var symbolSizeArr = normalizeSymbolSize(symbolSize); var symbolOffsetArr = normalizeSymbolOffset(symbolOffset || 0, symbolSizeArr); var symbolPath = symbol_createSymbol(symbolType, -symbolSizeArr[0] / 2 + symbolOffsetArr[0], -symbolSizeArr[1] / 2 + symbolOffsetArr[1], symbolSizeArr[0], symbolSizeArr[1], null, symbolKeepAspect); symbolPath.__specifiedRotation = symbolRotate == null || isNaN(symbolRotate) ? void 0 : +symbolRotate * Math.PI / 180 || 0; symbolPath.name = name; return symbolPath; } function createLine(points) { var line = new LinePath({ name: 'line', subPixelOptimize: true }); setLinePoints(line.shape, points); return line; } function setLinePoints(targetShape, points) { targetShape.x1 = points[0][0]; targetShape.y1 = points[0][1]; targetShape.x2 = points[1][0]; targetShape.y2 = points[1][1]; targetShape.percent = 1; var cp1 = points[2]; if (cp1) { targetShape.cpx1 = cp1[0]; targetShape.cpy1 = cp1[1]; } else { targetShape.cpx1 = NaN; targetShape.cpy1 = NaN; } } var helper_Line_Line = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(Line, _super); function Line(lineData, idx, seriesScope) { var _this = _super.call(this) || this; _this._createLine(lineData, idx, seriesScope); return _this; } Line.prototype._createLine = function (lineData, idx, seriesScope) { var seriesModel = lineData.hostModel; var linePoints = lineData.getItemLayout(idx); var line = createLine(linePoints); line.shape.percent = 0; initProps(line, { shape: { percent: 1 } }, seriesModel, idx); this.add(line); Object(core_util["each"])(SYMBOL_CATEGORIES, function (symbolCategory) { var symbol = Line_createSymbol(symbolCategory, lineData, idx); // symbols must added after line to make sure // it will be updated after line#update. // Or symbol position and rotation update in line#beforeUpdate will be one frame slow this.add(symbol); this[makeSymbolTypeKey(symbolCategory)] = makeSymbolTypeValue(symbolCategory, lineData, idx); }, this); this._updateCommonStl(lineData, idx, seriesScope); }; // TODO More strict on the List type in parameters? Line.prototype.updateData = function (lineData, idx, seriesScope) { var seriesModel = lineData.hostModel; var line = this.childOfName('line'); var linePoints = lineData.getItemLayout(idx); var target = { shape: {} }; setLinePoints(target.shape, linePoints); updateProps(line, target, seriesModel, idx); Object(core_util["each"])(SYMBOL_CATEGORIES, function (symbolCategory) { var symbolType = makeSymbolTypeValue(symbolCategory, lineData, idx); var key = makeSymbolTypeKey(symbolCategory); // Symbol changed if (this[key] !== symbolType) { this.remove(this.childOfName(symbolCategory)); var symbol = Line_createSymbol(symbolCategory, lineData, idx); this.add(symbol); } this[key] = symbolType; }, this); this._updateCommonStl(lineData, idx, seriesScope); }; ; Line.prototype.getLinePath = function () { return this.childAt(0); }; Line.prototype._updateCommonStl = function (lineData, idx, seriesScope) { var seriesModel = lineData.hostModel; var line = this.childOfName('line'); var emphasisLineStyle = seriesScope && seriesScope.emphasisLineStyle; var blurLineStyle = seriesScope && seriesScope.blurLineStyle; var selectLineStyle = seriesScope && seriesScope.selectLineStyle; var labelStatesModels = seriesScope && seriesScope.labelStatesModels; var emphasisDisabled = seriesScope && seriesScope.emphasisDisabled; var focus = seriesScope && seriesScope.focus; var blurScope = seriesScope && seriesScope.blurScope; // Optimization for large dataset if (!seriesScope || lineData.hasItemOption) { var itemModel = lineData.getItemModel(idx); var emphasisModel = itemModel.getModel('emphasis'); emphasisLineStyle = emphasisModel.getModel('lineStyle').getLineStyle(); blurLineStyle = itemModel.getModel(['blur', 'lineStyle']).getLineStyle(); selectLineStyle = itemModel.getModel(['select', 'lineStyle']).getLineStyle(); emphasisDisabled = emphasisModel.get('disabled'); focus = emphasisModel.get('focus'); blurScope = emphasisModel.get('blurScope'); labelStatesModels = getLabelStatesModels(itemModel); } var lineStyle = lineData.getItemVisual(idx, 'style'); var visualColor = lineStyle.stroke; line.useStyle(lineStyle); line.style.fill = null; line.style.strokeNoScale = true; line.ensureState('emphasis').style = emphasisLineStyle; line.ensureState('blur').style = blurLineStyle; line.ensureState('select').style = selectLineStyle; // Update symbol Object(core_util["each"])(SYMBOL_CATEGORIES, function (symbolCategory) { var symbol = this.childOfName(symbolCategory); if (symbol) { // Share opacity and color with line. symbol.setColor(visualColor); symbol.style.opacity = lineStyle.opacity; for (var i = 0; i < SPECIAL_STATES.length; i++) { var stateName = SPECIAL_STATES[i]; var lineState = line.getState(stateName); if (lineState) { var lineStateStyle = lineState.style || {}; var state = symbol.ensureState(stateName); var stateStyle = state.style || (state.style = {}); if (lineStateStyle.stroke != null) { stateStyle[symbol.__isEmptyBrush ? 'stroke' : 'fill'] = lineStateStyle.stroke; } if (lineStateStyle.opacity != null) { stateStyle.opacity = lineStateStyle.opacity; } } } symbol.markRedraw(); } }, this); var rawVal = seriesModel.getRawValue(idx); setLabelStyle(this, labelStatesModels, { labelDataIndex: idx, labelFetcher: { getFormattedLabel: function (dataIndex, stateName) { return seriesModel.getFormattedLabel(dataIndex, stateName, lineData.dataType); } }, inheritColor: visualColor || '#000', defaultOpacity: lineStyle.opacity, defaultText: (rawVal == null ? lineData.getName(idx) : isFinite(rawVal) ? round(rawVal) : rawVal) + '' }); var label = this.getTextContent(); // Always set `textStyle` even if `normalStyle.text` is null, because default // values have to be set on `normalStyle`. if (label) { var labelNormalModel = labelStatesModels.normal; label.__align = label.style.align; label.__verticalAlign = label.style.verticalAlign; // 'start', 'middle', 'end' label.__position = labelNormalModel.get('position') || 'middle'; var distance = labelNormalModel.get('distance'); if (!Object(core_util["isArray"])(distance)) { distance = [distance, distance]; } label.__labelDistance = distance; } this.setTextConfig({ position: null, local: true, inside: false // Can't be inside for stroke element. }); toggleHoverEmphasis(this, focus, blurScope, emphasisDisabled); }; Line.prototype.highlight = function () { enterEmphasis(this); }; Line.prototype.downplay = function () { leaveEmphasis(this); }; Line.prototype.updateLayout = function (lineData, idx) { this.setLinePoints(lineData.getItemLayout(idx)); }; Line.prototype.setLinePoints = function (points) { var linePath = this.childOfName('line'); setLinePoints(linePath.shape, points); linePath.dirty(); }; Line.prototype.beforeUpdate = function () { var lineGroup = this; var symbolFrom = lineGroup.childOfName('fromSymbol'); var symbolTo = lineGroup.childOfName('toSymbol'); var label = lineGroup.getTextContent(); // Quick reject if (!symbolFrom && !symbolTo && (!label || label.ignore)) { return; } var invScale = 1; var parentNode = this.parent; while (parentNode) { if (parentNode.scaleX) { invScale /= parentNode.scaleX; } parentNode = parentNode.parent; } var line = lineGroup.childOfName('line'); // If line not changed // FIXME Parent scale changed if (!this.__dirty && !line.__dirty) { return; } var percent = line.shape.percent; var fromPos = line.pointAt(0); var toPos = line.pointAt(percent); var d = sub([], toPos, fromPos); normalize(d, d); function setSymbolRotation(symbol, percent) { // Fix #12388 // when symbol is set to be 'arrow' in markLine, // symbolRotate value will be ignored, and compulsively use tangent angle. // rotate by default if symbol rotation is not specified var specifiedRotation = symbol.__specifiedRotation; if (specifiedRotation == null) { var tangent = line.tangentAt(percent); symbol.attr('rotation', (percent === 1 ? -1 : 1) * Math.PI / 2 - Math.atan2(tangent[1], tangent[0])); } else { symbol.attr('rotation', specifiedRotation); } } if (symbolFrom) { symbolFrom.setPosition(fromPos); setSymbolRotation(symbolFrom, 0); symbolFrom.scaleX = symbolFrom.scaleY = invScale * percent; symbolFrom.markRedraw(); } if (symbolTo) { symbolTo.setPosition(toPos); setSymbolRotation(symbolTo, 1); symbolTo.scaleX = symbolTo.scaleY = invScale * percent; symbolTo.markRedraw(); } if (label && !label.ignore) { label.x = label.y = 0; label.originX = label.originY = 0; var textAlign = void 0; var textVerticalAlign = void 0; var distance = label.__labelDistance; var distanceX = distance[0] * invScale; var distanceY = distance[1] * invScale; var halfPercent = percent / 2; var tangent = line.tangentAt(halfPercent); var n = [tangent[1], -tangent[0]]; var cp = line.pointAt(halfPercent); if (n[1] > 0) { n[0] = -n[0]; n[1] = -n[1]; } var dir = tangent[0] < 0 ? -1 : 1; if (label.__position !== 'start' && label.__position !== 'end') { var rotation = -Math.atan2(tangent[1], tangent[0]); if (toPos[0] < fromPos[0]) { rotation = Math.PI + rotation; } label.rotation = rotation; } var dy = void 0; switch (label.__position) { case 'insideStartTop': case 'insideMiddleTop': case 'insideEndTop': case 'middle': dy = -distanceY; textVerticalAlign = 'bottom'; break; case 'insideStartBottom': case 'insideMiddleBottom': case 'insideEndBottom': dy = distanceY; textVerticalAlign = 'top'; break; default: dy = 0; textVerticalAlign = 'middle'; } switch (label.__position) { case 'end': label.x = d[0] * distanceX + toPos[0]; label.y = d[1] * distanceY + toPos[1]; textAlign = d[0] > 0.8 ? 'left' : d[0] < -0.8 ? 'right' : 'center'; textVerticalAlign = d[1] > 0.8 ? 'top' : d[1] < -0.8 ? 'bottom' : 'middle'; break; case 'start': label.x = -d[0] * distanceX + fromPos[0]; label.y = -d[1] * distanceY + fromPos[1]; textAlign = d[0] > 0.8 ? 'right' : d[0] < -0.8 ? 'left' : 'center'; textVerticalAlign = d[1] > 0.8 ? 'bottom' : d[1] < -0.8 ? 'top' : 'middle'; break; case 'insideStartTop': case 'insideStart': case 'insideStartBottom': label.x = distanceX * dir + fromPos[0]; label.y = fromPos[1] + dy; textAlign = tangent[0] < 0 ? 'right' : 'left'; label.originX = -distanceX * dir; label.originY = -dy; break; case 'insideMiddleTop': case 'insideMiddle': case 'insideMiddleBottom': case 'middle': label.x = cp[0]; label.y = cp[1] + dy; textAlign = 'center'; label.originY = -dy; break; case 'insideEndTop': case 'insideEnd': case 'insideEndBottom': label.x = -distanceX * dir + toPos[0]; label.y = toPos[1] + dy; textAlign = tangent[0] >= 0 ? 'right' : 'left'; label.originX = distanceX * dir; label.originY = -dy; break; } label.scaleX = label.scaleY = invScale; label.setStyle({ // Use the user specified text align and baseline first verticalAlign: label.__verticalAlign || textVerticalAlign, align: label.__align || textAlign }); } }; return Line; }(graphic_Group); /* harmony default export */ var helper_Line = (helper_Line_Line); // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/helper/LineDraw.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 LineDraw_LineDraw = /** @class */function () { function LineDraw(LineCtor) { this.group = new graphic_Group(); this._LineCtor = LineCtor || helper_Line; } LineDraw.prototype.updateData = function (lineData) { var _this = this; // Remove progressive els. this._progressiveEls = null; var lineDraw = this; var group = lineDraw.group; var oldLineData = lineDraw._lineData; lineDraw._lineData = lineData; // There is no oldLineData only when first rendering or switching from // stream mode to normal mode, where previous elements should be removed. if (!oldLineData) { group.removeAll(); } var seriesScope = LineDraw_makeSeriesScope(lineData); lineData.diff(oldLineData).add(function (idx) { _this._doAdd(lineData, idx, seriesScope); }).update(function (newIdx, oldIdx) { _this._doUpdate(oldLineData, lineData, oldIdx, newIdx, seriesScope); }).remove(function (idx) { group.remove(oldLineData.getItemGraphicEl(idx)); }).execute(); }; ; LineDraw.prototype.updateLayout = function () { var lineData = this._lineData; // Do not support update layout in incremental mode. if (!lineData) { return; } lineData.eachItemGraphicEl(function (el, idx) { el.updateLayout(lineData, idx); }, this); }; ; LineDraw.prototype.incrementalPrepareUpdate = function (lineData) { this._seriesScope = LineDraw_makeSeriesScope(lineData); this._lineData = null; this.group.removeAll(); }; ; LineDraw.prototype.incrementalUpdate = function (taskParams, lineData) { this._progressiveEls = []; function updateIncrementalAndHover(el) { if (!el.isGroup && !isEffectObject(el)) { el.incremental = true; el.ensureState('emphasis').hoverLayer = true; } } for (var idx = taskParams.start; idx < taskParams.end; idx++) { var itemLayout = lineData.getItemLayout(idx); if (lineNeedsDraw(itemLayout)) { var el = new this._LineCtor(lineData, idx, this._seriesScope); el.traverse(updateIncrementalAndHover); this.group.add(el); lineData.setItemGraphicEl(idx, el); this._progressiveEls.push(el); } } }; ; LineDraw.prototype.remove = function () { this.group.removeAll(); }; ; LineDraw.prototype.eachRendered = function (cb) { traverseElements(this._progressiveEls || this.group, cb); }; LineDraw.prototype._doAdd = function (lineData, idx, seriesScope) { var itemLayout = lineData.getItemLayout(idx); if (!lineNeedsDraw(itemLayout)) { return; } var el = new this._LineCtor(lineData, idx, seriesScope); lineData.setItemGraphicEl(idx, el); this.group.add(el); }; LineDraw.prototype._doUpdate = function (oldLineData, newLineData, oldIdx, newIdx, seriesScope) { var itemEl = oldLineData.getItemGraphicEl(oldIdx); if (!lineNeedsDraw(newLineData.getItemLayout(newIdx))) { this.group.remove(itemEl); return; } if (!itemEl) { itemEl = new this._LineCtor(newLineData, newIdx, seriesScope); } else { itemEl.updateData(newLineData, newIdx, seriesScope); } newLineData.setItemGraphicEl(newIdx, itemEl); this.group.add(itemEl); }; return LineDraw; }(); function isEffectObject(el) { return el.animators && el.animators.length > 0; } function LineDraw_makeSeriesScope(lineData) { var hostModel = lineData.hostModel; var emphasisModel = hostModel.getModel('emphasis'); return { lineStyle: hostModel.getModel('lineStyle').getLineStyle(), emphasisLineStyle: emphasisModel.getModel(['lineStyle']).getLineStyle(), blurLineStyle: hostModel.getModel(['blur', 'lineStyle']).getLineStyle(), selectLineStyle: hostModel.getModel(['select', 'lineStyle']).getLineStyle(), emphasisDisabled: emphasisModel.get('disabled'), blurScope: emphasisModel.get('blurScope'), focus: emphasisModel.get('focus'), labelStatesModels: getLabelStatesModels(hostModel) }; } function isPointNaN(pt) { return isNaN(pt[0]) || isNaN(pt[1]); } function lineNeedsDraw(pts) { return pts && !isPointNaN(pts[0]) && !isPointNaN(pts[1]); } /* harmony default export */ var helper_LineDraw = (LineDraw_LineDraw); // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/graph/adjustEdge.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 adjustEdge_v1 = []; var adjustEdge_v2 = []; var v3 = []; var adjustEdge_quadraticAt = curve_quadraticAt; var v2DistSquare = distSquare; var adjustEdge_mathAbs = Math.abs; function intersectCurveCircle(curvePoints, center, radius) { var p0 = curvePoints[0]; var p1 = curvePoints[1]; var p2 = curvePoints[2]; var d = Infinity; var t; var radiusSquare = radius * radius; var interval = 0.1; for (var _t = 0.1; _t <= 0.9; _t += 0.1) { adjustEdge_v1[0] = adjustEdge_quadraticAt(p0[0], p1[0], p2[0], _t); adjustEdge_v1[1] = adjustEdge_quadraticAt(p0[1], p1[1], p2[1], _t); var diff = adjustEdge_mathAbs(v2DistSquare(adjustEdge_v1, center) - radiusSquare); if (diff < d) { d = diff; t = _t; } } // Assume the segment is monotone,Find root through Bisection method // At most 32 iteration for (var i = 0; i < 32; i++) { // let prev = t - interval; var next = t + interval; // v1[0] = quadraticAt(p0[0], p1[0], p2[0], prev); // v1[1] = quadraticAt(p0[1], p1[1], p2[1], prev); adjustEdge_v2[0] = adjustEdge_quadraticAt(p0[0], p1[0], p2[0], t); adjustEdge_v2[1] = adjustEdge_quadraticAt(p0[1], p1[1], p2[1], t); v3[0] = adjustEdge_quadraticAt(p0[0], p1[0], p2[0], next); v3[1] = adjustEdge_quadraticAt(p0[1], p1[1], p2[1], next); var diff = v2DistSquare(adjustEdge_v2, center) - radiusSquare; if (adjustEdge_mathAbs(diff) < 1e-2) { break; } // let prevDiff = v2DistSquare(v1, center) - radiusSquare; var nextDiff = v2DistSquare(v3, center) - radiusSquare; interval /= 2; if (diff < 0) { if (nextDiff >= 0) { t = t + interval; } else { t = t - interval; } } else { if (nextDiff >= 0) { t = t - interval; } else { t = t + interval; } } } return t; } // Adjust edge to avoid function adjustEdge(graph, scale) { var tmp0 = []; var quadraticSubdivide = curve_quadraticSubdivide; var pts = [[], [], []]; var pts2 = [[], []]; var v = []; scale /= 2; graph.eachEdge(function (edge, idx) { var linePoints = edge.getLayout(); var fromSymbol = edge.getVisual('fromSymbol'); var toSymbol = edge.getVisual('toSymbol'); if (!linePoints.__original) { linePoints.__original = [clone(linePoints[0]), clone(linePoints[1])]; if (linePoints[2]) { linePoints.__original.push(clone(linePoints[2])); } } var originalPoints = linePoints.__original; // Quadratic curve if (linePoints[2] != null) { vector_copy(pts[0], originalPoints[0]); vector_copy(pts[1], originalPoints[2]); vector_copy(pts[2], originalPoints[1]); if (fromSymbol && fromSymbol !== 'none') { var symbolSize = getSymbolSize(edge.node1); var t = intersectCurveCircle(pts, originalPoints[0], symbolSize * scale); // Subdivide and get the second quadraticSubdivide(pts[0][0], pts[1][0], pts[2][0], t, tmp0); pts[0][0] = tmp0[3]; pts[1][0] = tmp0[4]; quadraticSubdivide(pts[0][1], pts[1][1], pts[2][1], t, tmp0); pts[0][1] = tmp0[3]; pts[1][1] = tmp0[4]; } if (toSymbol && toSymbol !== 'none') { var symbolSize = getSymbolSize(edge.node2); var t = intersectCurveCircle(pts, originalPoints[1], symbolSize * scale); // Subdivide and get the first quadraticSubdivide(pts[0][0], pts[1][0], pts[2][0], t, tmp0); pts[1][0] = tmp0[1]; pts[2][0] = tmp0[2]; quadraticSubdivide(pts[0][1], pts[1][1], pts[2][1], t, tmp0); pts[1][1] = tmp0[1]; pts[2][1] = tmp0[2]; } // Copy back to layout vector_copy(linePoints[0], pts[0]); vector_copy(linePoints[1], pts[2]); vector_copy(linePoints[2], pts[1]); } // Line else { vector_copy(pts2[0], originalPoints[0]); vector_copy(pts2[1], originalPoints[1]); sub(v, pts2[1], pts2[0]); normalize(v, v); if (fromSymbol && fromSymbol !== 'none') { var symbolSize = getSymbolSize(edge.node1); scaleAndAdd(pts2[0], pts2[0], v, symbolSize * scale); } if (toSymbol && toSymbol !== 'none') { var symbolSize = getSymbolSize(edge.node2); scaleAndAdd(pts2[1], pts2[1], v, -symbolSize * scale); } vector_copy(linePoints[0], pts2[0]); vector_copy(linePoints[1], pts2[1]); } }); } // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/graph/GraphView.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 isViewCoordSys(coordSys) { return coordSys.type === 'view'; } var GraphView_GraphView = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(GraphView, _super); function GraphView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = GraphView.type; return _this; } GraphView.prototype.init = function (ecModel, api) { var symbolDraw = new helper_SymbolDraw(); var lineDraw = new helper_LineDraw(); var group = this.group; this._controller = new helper_RoamController(api.getZr()); this._controllerHost = { target: group }; group.add(symbolDraw.group); group.add(lineDraw.group); this._symbolDraw = symbolDraw; this._lineDraw = lineDraw; this._firstRender = true; }; GraphView.prototype.render = function (seriesModel, ecModel, api) { var _this = this; var coordSys = seriesModel.coordinateSystem; this._model = seriesModel; var symbolDraw = this._symbolDraw; var lineDraw = this._lineDraw; var group = this.group; if (isViewCoordSys(coordSys)) { var groupNewProp = { x: coordSys.x, y: coordSys.y, scaleX: coordSys.scaleX, scaleY: coordSys.scaleY }; if (this._firstRender) { group.attr(groupNewProp); } else { updateProps(group, groupNewProp, seriesModel); } } // Fix edge contact point with node adjustEdge(seriesModel.getGraph(), getNodeGlobalScale(seriesModel)); var data = seriesModel.getData(); symbolDraw.updateData(data); var edgeData = seriesModel.getEdgeData(); // TODO: TYPE lineDraw.updateData(edgeData); this._updateNodeAndLinkScale(); this._updateController(seriesModel, ecModel, api); clearTimeout(this._layoutTimeout); var forceLayout = seriesModel.forceLayout; var layoutAnimation = seriesModel.get(['force', 'layoutAnimation']); if (forceLayout) { this._startForceLayoutIteration(forceLayout, layoutAnimation); } var layout = seriesModel.get('layout'); data.graph.eachNode(function (node) { var idx = node.dataIndex; var el = node.getGraphicEl(); var itemModel = node.getModel(); if (!el) { return; } // Update draggable el.off('drag').off('dragend'); var draggable = itemModel.get('draggable'); if (draggable) { el.on('drag', function (e) { switch (layout) { case 'force': forceLayout.warmUp(); !_this._layouting && _this._startForceLayoutIteration(forceLayout, layoutAnimation); forceLayout.setFixed(idx); // Write position back to layout data.setItemLayout(idx, [el.x, el.y]); break; case 'circular': data.setItemLayout(idx, [el.x, el.y]); // mark node fixed node.setLayout({ fixed: true }, true); // recalculate circular layout circularLayout(seriesModel, 'symbolSize', node, [e.offsetX, e.offsetY]); _this.updateLayout(seriesModel); break; case 'none': default: data.setItemLayout(idx, [el.x, el.y]); // update edge simpleLayoutEdge(seriesModel.getGraph(), seriesModel); _this.updateLayout(seriesModel); break; } }).on('dragend', function () { if (forceLayout) { forceLayout.setUnfixed(idx); } }); } el.setDraggable(draggable, !!itemModel.get('cursor')); var focus = itemModel.get(['emphasis', 'focus']); if (focus === 'adjacency') { getECData(el).focus = node.getAdjacentDataIndices(); } }); data.graph.eachEdge(function (edge) { var el = edge.getGraphicEl(); var focus = edge.getModel().get(['emphasis', 'focus']); if (!el) { return; } if (focus === 'adjacency') { getECData(el).focus = { edge: [edge.dataIndex], node: [edge.node1.dataIndex, edge.node2.dataIndex] }; } }); var circularRotateLabel = seriesModel.get('layout') === 'circular' && seriesModel.get(['circular', 'rotateLabel']); var cx = data.getLayout('cx'); var cy = data.getLayout('cy'); data.graph.eachNode(function (node) { rotateNodeLabel(node, circularRotateLabel, cx, cy); }); this._firstRender = false; }; GraphView.prototype.dispose = function () { this.remove(); this._controller && this._controller.dispose(); this._controllerHost = null; }; GraphView.prototype._startForceLayoutIteration = function (forceLayout, layoutAnimation) { var self = this; (function step() { forceLayout.step(function (stopped) { self.updateLayout(self._model); (self._layouting = !stopped) && (layoutAnimation ? self._layoutTimeout = setTimeout(step, 16) : step()); }); })(); }; GraphView.prototype._updateController = function (seriesModel, ecModel, api) { var _this = this; var controller = this._controller; var controllerHost = this._controllerHost; var group = this.group; controller.setPointerChecker(function (e, x, y) { var rect = group.getBoundingRect(); rect.applyTransform(group.transform); return rect.contain(x, y) && !onIrrelevantElement(e, api, seriesModel); }); if (!isViewCoordSys(seriesModel.coordinateSystem)) { controller.disable(); return; } controller.enable(seriesModel.get('roam')); controllerHost.zoomLimit = seriesModel.get('scaleLimit'); controllerHost.zoom = seriesModel.coordinateSystem.getZoom(); controller.off('pan').off('zoom').on('pan', function (e) { updateViewOnPan(controllerHost, e.dx, e.dy); api.dispatchAction({ seriesId: seriesModel.id, type: 'graphRoam', dx: e.dx, dy: e.dy }); }).on('zoom', function (e) { updateViewOnZoom(controllerHost, e.scale, e.originX, e.originY); api.dispatchAction({ seriesId: seriesModel.id, type: 'graphRoam', zoom: e.scale, originX: e.originX, originY: e.originY }); _this._updateNodeAndLinkScale(); adjustEdge(seriesModel.getGraph(), getNodeGlobalScale(seriesModel)); _this._lineDraw.updateLayout(); // Only update label layout on zoom api.updateLabelLayout(); }); }; GraphView.prototype._updateNodeAndLinkScale = function () { var seriesModel = this._model; var data = seriesModel.getData(); var nodeScale = getNodeGlobalScale(seriesModel); data.eachItemGraphicEl(function (el, idx) { el && el.setSymbolScale(nodeScale); }); }; GraphView.prototype.updateLayout = function (seriesModel) { adjustEdge(seriesModel.getGraph(), getNodeGlobalScale(seriesModel)); this._symbolDraw.updateLayout(); this._lineDraw.updateLayout(); }; GraphView.prototype.remove = function () { clearTimeout(this._layoutTimeout); this._layouting = false; this._layoutTimeout = null; this._symbolDraw && this._symbolDraw.remove(); this._lineDraw && this._lineDraw.remove(); }; GraphView.type = 'graph'; return GraphView; }(Chart); /* harmony default export */ var graph_GraphView = (GraphView_GraphView); // CONCATENATED MODULE: ./node_modules/echarts/lib/data/Graph.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ // id may be function name of Object, add a prefix to avoid this problem. function generateNodeKey(id) { return '_EC_' + id; } var Graph_Graph = /** @class */function () { function Graph(directed) { this.type = 'graph'; this.nodes = []; this.edges = []; this._nodesMap = {}; /** * @type {Object.} * @private */ this._edgesMap = {}; this._directed = directed || false; } /** * If is directed graph */ Graph.prototype.isDirected = function () { return this._directed; }; ; /** * Add a new node */ Graph.prototype.addNode = function (id, dataIndex) { id = id == null ? '' + dataIndex : '' + id; var nodesMap = this._nodesMap; if (nodesMap[generateNodeKey(id)]) { if (false) { console.error('Graph nodes have duplicate name or id'); } return; } var node = new Graph_GraphNode(id, dataIndex); node.hostGraph = this; this.nodes.push(node); nodesMap[generateNodeKey(id)] = node; return node; }; ; /** * Get node by data index */ Graph.prototype.getNodeByIndex = function (dataIndex) { var rawIdx = this.data.getRawIndex(dataIndex); return this.nodes[rawIdx]; }; ; /** * Get node by id */ Graph.prototype.getNodeById = function (id) { return this._nodesMap[generateNodeKey(id)]; }; ; /** * Add a new edge */ Graph.prototype.addEdge = function (n1, n2, dataIndex) { var nodesMap = this._nodesMap; var edgesMap = this._edgesMap; // PENDING if (core_util["isNumber"](n1)) { n1 = this.nodes[n1]; } if (core_util["isNumber"](n2)) { n2 = this.nodes[n2]; } if (!(n1 instanceof Graph_GraphNode)) { n1 = nodesMap[generateNodeKey(n1)]; } if (!(n2 instanceof Graph_GraphNode)) { n2 = nodesMap[generateNodeKey(n2)]; } if (!n1 || !n2) { return; } var key = n1.id + '-' + n2.id; var edge = new Graph_GraphEdge(n1, n2, dataIndex); edge.hostGraph = this; if (this._directed) { n1.outEdges.push(edge); n2.inEdges.push(edge); } n1.edges.push(edge); if (n1 !== n2) { n2.edges.push(edge); } this.edges.push(edge); edgesMap[key] = edge; return edge; }; ; /** * Get edge by data index */ Graph.prototype.getEdgeByIndex = function (dataIndex) { var rawIdx = this.edgeData.getRawIndex(dataIndex); return this.edges[rawIdx]; }; ; /** * Get edge by two linked nodes */ Graph.prototype.getEdge = function (n1, n2) { if (n1 instanceof Graph_GraphNode) { n1 = n1.id; } if (n2 instanceof Graph_GraphNode) { n2 = n2.id; } var edgesMap = this._edgesMap; if (this._directed) { return edgesMap[n1 + '-' + n2]; } else { return edgesMap[n1 + '-' + n2] || edgesMap[n2 + '-' + n1]; } }; ; /** * Iterate all nodes */ Graph.prototype.eachNode = function (cb, context) { var nodes = this.nodes; var len = nodes.length; for (var i = 0; i < len; i++) { if (nodes[i].dataIndex >= 0) { cb.call(context, nodes[i], i); } } }; ; /** * Iterate all edges */ Graph.prototype.eachEdge = function (cb, context) { var edges = this.edges; var len = edges.length; for (var i = 0; i < len; i++) { if (edges[i].dataIndex >= 0 && edges[i].node1.dataIndex >= 0 && edges[i].node2.dataIndex >= 0) { cb.call(context, edges[i], i); } } }; ; /** * Breadth first traverse * Return true to stop traversing */ Graph.prototype.breadthFirstTraverse = function (cb, startNode, direction, context) { if (!(startNode instanceof Graph_GraphNode)) { startNode = this._nodesMap[generateNodeKey(startNode)]; } if (!startNode) { return; } var edgeType = direction === 'out' ? 'outEdges' : direction === 'in' ? 'inEdges' : 'edges'; for (var i = 0; i < this.nodes.length; i++) { this.nodes[i].__visited = false; } if (cb.call(context, startNode, null)) { return; } var queue = [startNode]; while (queue.length) { var currentNode = queue.shift(); var edges = currentNode[edgeType]; for (var i = 0; i < edges.length; i++) { var e = edges[i]; var otherNode = e.node1 === currentNode ? e.node2 : e.node1; if (!otherNode.__visited) { if (cb.call(context, otherNode, currentNode)) { // Stop traversing return; } queue.push(otherNode); otherNode.__visited = true; } } } }; ; // TODO // depthFirstTraverse( // cb, startNode, direction, context // ) { // }; // Filter update Graph.prototype.update = function () { var data = this.data; var edgeData = this.edgeData; var nodes = this.nodes; var edges = this.edges; for (var i = 0, len = nodes.length; i < len; i++) { nodes[i].dataIndex = -1; } for (var i = 0, len = data.count(); i < len; i++) { nodes[data.getRawIndex(i)].dataIndex = i; } edgeData.filterSelf(function (idx) { var edge = edges[edgeData.getRawIndex(idx)]; return edge.node1.dataIndex >= 0 && edge.node2.dataIndex >= 0; }); // Update edge for (var i = 0, len = edges.length; i < len; i++) { edges[i].dataIndex = -1; } for (var i = 0, len = edgeData.count(); i < len; i++) { edges[edgeData.getRawIndex(i)].dataIndex = i; } }; ; /** * @return {module:echarts/data/Graph} */ Graph.prototype.clone = function () { var graph = new Graph(this._directed); var nodes = this.nodes; var edges = this.edges; for (var i = 0; i < nodes.length; i++) { graph.addNode(nodes[i].id, nodes[i].dataIndex); } for (var i = 0; i < edges.length; i++) { var e = edges[i]; graph.addEdge(e.node1.id, e.node2.id, e.dataIndex); } return graph; }; ; return Graph; }(); var Graph_GraphNode = /** @class */function () { function GraphNode(id, dataIndex) { this.inEdges = []; this.outEdges = []; this.edges = []; this.dataIndex = -1; this.id = id == null ? '' : id; this.dataIndex = dataIndex == null ? -1 : dataIndex; } /** * @return {number} */ GraphNode.prototype.degree = function () { return this.edges.length; }; /** * @return {number} */ GraphNode.prototype.inDegree = function () { return this.inEdges.length; }; /** * @return {number} */ GraphNode.prototype.outDegree = function () { return this.outEdges.length; }; GraphNode.prototype.getModel = function (path) { if (this.dataIndex < 0) { return; } var graph = this.hostGraph; var itemModel = graph.data.getItemModel(this.dataIndex); return itemModel.getModel(path); }; GraphNode.prototype.getAdjacentDataIndices = function () { var dataIndices = { edge: [], node: [] }; for (var i = 0; i < this.edges.length; i++) { var adjacentEdge = this.edges[i]; if (adjacentEdge.dataIndex < 0) { continue; } dataIndices.edge.push(adjacentEdge.dataIndex); dataIndices.node.push(adjacentEdge.node1.dataIndex, adjacentEdge.node2.dataIndex); } return dataIndices; }; GraphNode.prototype.getTrajectoryDataIndices = function () { var connectedEdgesMap = core_util["createHashMap"](); var connectedNodesMap = core_util["createHashMap"](); for (var i = 0; i < this.edges.length; i++) { var adjacentEdge = this.edges[i]; if (adjacentEdge.dataIndex < 0) { continue; } connectedEdgesMap.set(adjacentEdge.dataIndex, true); var sourceNodesQueue = [adjacentEdge.node1]; var targetNodesQueue = [adjacentEdge.node2]; var nodeIteratorIndex = 0; while (nodeIteratorIndex < sourceNodesQueue.length) { var sourceNode = sourceNodesQueue[nodeIteratorIndex]; nodeIteratorIndex++; connectedNodesMap.set(sourceNode.dataIndex, true); for (var j = 0; j < sourceNode.inEdges.length; j++) { connectedEdgesMap.set(sourceNode.inEdges[j].dataIndex, true); sourceNodesQueue.push(sourceNode.inEdges[j].node1); } } nodeIteratorIndex = 0; while (nodeIteratorIndex < targetNodesQueue.length) { var targetNode = targetNodesQueue[nodeIteratorIndex]; nodeIteratorIndex++; connectedNodesMap.set(targetNode.dataIndex, true); for (var j = 0; j < targetNode.outEdges.length; j++) { connectedEdgesMap.set(targetNode.outEdges[j].dataIndex, true); targetNodesQueue.push(targetNode.outEdges[j].node2); } } } return { edge: connectedEdgesMap.keys(), node: connectedNodesMap.keys() }; }; return GraphNode; }(); var Graph_GraphEdge = /** @class */function () { function GraphEdge(n1, n2, dataIndex) { this.dataIndex = -1; this.node1 = n1; this.node2 = n2; this.dataIndex = dataIndex == null ? -1 : dataIndex; } // eslint-disable-next-line @typescript-eslint/no-unused-vars GraphEdge.prototype.getModel = function (path) { if (this.dataIndex < 0) { return; } var graph = this.hostGraph; var itemModel = graph.edgeData.getItemModel(this.dataIndex); return itemModel.getModel(path); }; GraphEdge.prototype.getAdjacentDataIndices = function () { return { edge: [this.dataIndex], node: [this.node1.dataIndex, this.node2.dataIndex] }; }; GraphEdge.prototype.getTrajectoryDataIndices = function () { var connectedEdgesMap = core_util["createHashMap"](); var connectedNodesMap = core_util["createHashMap"](); connectedEdgesMap.set(this.dataIndex, true); var sourceNodes = [this.node1]; var targetNodes = [this.node2]; var nodeIteratorIndex = 0; while (nodeIteratorIndex < sourceNodes.length) { var sourceNode = sourceNodes[nodeIteratorIndex]; nodeIteratorIndex++; connectedNodesMap.set(sourceNode.dataIndex, true); for (var j = 0; j < sourceNode.inEdges.length; j++) { connectedEdgesMap.set(sourceNode.inEdges[j].dataIndex, true); sourceNodes.push(sourceNode.inEdges[j].node1); } } nodeIteratorIndex = 0; while (nodeIteratorIndex < targetNodes.length) { var targetNode = targetNodes[nodeIteratorIndex]; nodeIteratorIndex++; connectedNodesMap.set(targetNode.dataIndex, true); for (var j = 0; j < targetNode.outEdges.length; j++) { connectedEdgesMap.set(targetNode.outEdges[j].dataIndex, true); targetNodes.push(targetNode.outEdges[j].node2); } } return { edge: connectedEdgesMap.keys(), node: connectedNodesMap.keys() }; }; return GraphEdge; }(); function createGraphDataProxyMixin(hostName, dataName) { return { /** * @param Default 'value'. can be 'a', 'b', 'c', 'd', 'e'. */ getValue: function (dimension) { var data = this[hostName][dataName]; return data.getStore().get(data.getDimensionIndex(dimension || 'value'), this.dataIndex); }, // TODO: TYPE stricter type. setVisual: function (key, value) { this.dataIndex >= 0 && this[hostName][dataName].setItemVisual(this.dataIndex, key, value); }, getVisual: function (key) { return this[hostName][dataName].getItemVisual(this.dataIndex, key); }, setLayout: function (layout, merge) { this.dataIndex >= 0 && this[hostName][dataName].setItemLayout(this.dataIndex, layout, merge); }, getLayout: function () { return this[hostName][dataName].getItemLayout(this.dataIndex); }, getGraphicEl: function () { return this[hostName][dataName].getItemGraphicEl(this.dataIndex); }, getRawIndex: function () { return this[hostName][dataName].getRawIndex(this.dataIndex); } }; } ; ; ; core_util["mixin"](Graph_GraphNode, createGraphDataProxyMixin('hostGraph', 'data')); core_util["mixin"](Graph_GraphEdge, createGraphDataProxyMixin('hostGraph', 'edgeData')); /* harmony default export */ var data_Graph = (Graph_Graph); // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/helper/createGraphFromNodeEdge.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 createGraphFromNodeEdge(nodes, edges, seriesModel, directed, beforeLink) { // ??? TODO // support dataset? var graph = new data_Graph(directed); for (var i = 0; i < nodes.length; i++) { graph.addNode(core_util["retrieve"]( // Id, name, dataIndex nodes[i].id, nodes[i].name, i), i); } var linkNameList = []; var validEdges = []; var linkCount = 0; for (var i = 0; i < edges.length; i++) { var link = edges[i]; var source = link.source; var target = link.target; // addEdge may fail when source or target not exists if (graph.addEdge(source, target, linkCount)) { validEdges.push(link); linkNameList.push(core_util["retrieve"](convertOptionIdName(link.id, null), source + ' > ' + target)); linkCount++; } } var coordSys = seriesModel.get('coordinateSystem'); var nodeData; if (coordSys === 'cartesian2d' || coordSys === 'polar') { nodeData = helper_createSeriesData(nodes, seriesModel); } else { var coordSysCtor = core_CoordinateSystem.get(coordSys); var coordDimensions = coordSysCtor ? coordSysCtor.dimensions || [] : []; // FIXME: Some geo do not need `value` dimenson, whereas `calendar` needs // `value` dimension, but graph need `value` dimension. It's better to // uniform this behavior. if (core_util["indexOf"](coordDimensions, 'value') < 0) { coordDimensions.concat(['value']); } var dimensions = prepareSeriesDataSchema(nodes, { coordDimensions: coordDimensions, encodeDefine: seriesModel.getEncode() }).dimensions; nodeData = new data_SeriesData(dimensions, seriesModel); nodeData.initData(nodes); } var edgeData = new data_SeriesData(['value'], seriesModel); edgeData.initData(validEdges, linkNameList); beforeLink && beforeLink(nodeData, edgeData); helper_linkSeriesData({ mainData: nodeData, struct: graph, structAttr: 'graph', datas: { node: nodeData, edge: edgeData }, datasAttr: { node: 'data', edge: 'edgeData' } }); // Update dataIndex of nodes and edges because invalid edge may be removed graph.update(); return graph; } // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/graph/GraphSeries.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 GraphSeries_GraphSeriesModel = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(GraphSeriesModel, _super); function GraphSeriesModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = GraphSeriesModel.type; _this.hasSymbolVisual = true; return _this; } GraphSeriesModel.prototype.init = function (option) { _super.prototype.init.apply(this, arguments); var self = this; function getCategoriesData() { return self._categoriesData; } // Provide data for legend select this.legendVisualProvider = new visual_LegendVisualProvider(getCategoriesData, getCategoriesData); this.fillDataTextStyle(option.edges || option.links); this._updateCategoriesData(); }; GraphSeriesModel.prototype.mergeOption = function (option) { _super.prototype.mergeOption.apply(this, arguments); this.fillDataTextStyle(option.edges || option.links); this._updateCategoriesData(); }; GraphSeriesModel.prototype.mergeDefaultAndTheme = function (option) { _super.prototype.mergeDefaultAndTheme.apply(this, arguments); defaultEmphasis(option, 'edgeLabel', ['show']); }; GraphSeriesModel.prototype.getInitialData = function (option, ecModel) { var edges = option.edges || option.links || []; var nodes = option.data || option.nodes || []; var self = this; if (nodes && edges) { // auto curveness initCurvenessList(this); var graph = createGraphFromNodeEdge(nodes, edges, this, true, beforeLink); core_util["each"](graph.edges, function (edge) { createEdgeMapForCurveness(edge.node1, edge.node2, this, edge.dataIndex); }, this); return graph.data; } function beforeLink(nodeData, edgeData) { // Overwrite nodeData.getItemModel to nodeData.wrapMethod('getItemModel', function (model) { var categoriesModels = self._categoriesModels; var categoryIdx = model.getShallow('category'); var categoryModel = categoriesModels[categoryIdx]; if (categoryModel) { categoryModel.parentModel = model.parentModel; model.parentModel = categoryModel; } return model; }); // TODO Inherit resolveParentPath by default in Model#getModel? var oldGetModel = model_Model.prototype.getModel; function newGetModel(path, parentModel) { var model = oldGetModel.call(this, path, parentModel); model.resolveParentPath = resolveParentPath; return model; } edgeData.wrapMethod('getItemModel', function (model) { model.resolveParentPath = resolveParentPath; model.getModel = newGetModel; return model; }); function resolveParentPath(pathArr) { if (pathArr && (pathArr[0] === 'label' || pathArr[1] === 'label')) { var newPathArr = pathArr.slice(); if (pathArr[0] === 'label') { newPathArr[0] = 'edgeLabel'; } else if (pathArr[1] === 'label') { newPathArr[1] = 'edgeLabel'; } return newPathArr; } return pathArr; } } }; GraphSeriesModel.prototype.getGraph = function () { return this.getData().graph; }; GraphSeriesModel.prototype.getEdgeData = function () { return this.getGraph().edgeData; }; GraphSeriesModel.prototype.getCategoriesData = function () { return this._categoriesData; }; GraphSeriesModel.prototype.formatTooltip = function (dataIndex, multipleSeries, dataType) { if (dataType === 'edge') { var nodeData = this.getData(); var params = this.getDataParams(dataIndex, dataType); var edge = nodeData.graph.getEdgeByIndex(dataIndex); var sourceName = nodeData.getName(edge.node1.dataIndex); var targetName = nodeData.getName(edge.node2.dataIndex); var nameArr = []; sourceName != null && nameArr.push(sourceName); targetName != null && nameArr.push(targetName); return createTooltipMarkup('nameValue', { name: nameArr.join(' > '), value: params.value, noValue: params.value == null }); } // dataType === 'node' or empty var nodeMarkup = defaultSeriesFormatTooltip({ series: this, dataIndex: dataIndex, multipleSeries: multipleSeries }); return nodeMarkup; }; GraphSeriesModel.prototype._updateCategoriesData = function () { var categories = core_util["map"](this.option.categories || [], function (category) { // Data must has value return category.value != null ? category : core_util["extend"]({ value: 0 }, category); }); var categoriesData = new data_SeriesData(['value'], this); categoriesData.initData(categories); this._categoriesData = categoriesData; this._categoriesModels = categoriesData.mapArray(function (idx) { return categoriesData.getItemModel(idx); }); }; GraphSeriesModel.prototype.setZoom = function (zoom) { this.option.zoom = zoom; }; GraphSeriesModel.prototype.setCenter = function (center) { this.option.center = center; }; GraphSeriesModel.prototype.isAnimationEnabled = function () { return _super.prototype.isAnimationEnabled.call(this) // Not enable animation when do force layout && !(this.get('layout') === 'force' && this.get(['force', 'layoutAnimation'])); }; GraphSeriesModel.type = 'series.graph'; GraphSeriesModel.dependencies = ['grid', 'polar', 'geo', 'singleAxis', 'calendar']; GraphSeriesModel.defaultOption = { // zlevel: 0, z: 2, coordinateSystem: 'view', // Default option for all coordinate systems // xAxisIndex: 0, // yAxisIndex: 0, // polarIndex: 0, // geoIndex: 0, legendHoverLink: true, layout: null, // Configuration of circular layout circular: { rotateLabel: false }, // Configuration of force directed layout force: { initLayout: null, // Node repulsion. Can be an array to represent range. repulsion: [0, 50], gravity: 0.1, // Initial friction friction: 0.6, // Edge length. Can be an array to represent range. edgeLength: 30, layoutAnimation: true }, left: 'center', top: 'center', // right: null, // bottom: null, // width: '80%', // height: '80%', symbol: 'circle', symbolSize: 10, edgeSymbol: ['none', 'none'], edgeSymbolSize: 10, edgeLabel: { position: 'middle', distance: 5 }, draggable: false, roam: false, // Default on center of graph center: null, zoom: 1, // Symbol size scale ratio in roam nodeScaleRatio: 0.6, // cursor: null, // categories: [], // data: [] // Or // nodes: [] // // links: [] // Or // edges: [] label: { show: false, formatter: '{b}' }, itemStyle: {}, lineStyle: { color: '#aaa', width: 1, opacity: 0.5 }, emphasis: { scale: true, label: { show: true } }, select: { itemStyle: { borderColor: '#212121' } } }; return GraphSeriesModel; }(Series); /* harmony default export */ var GraphSeries = (GraphSeries_GraphSeriesModel); // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/graph/install.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 install_actionInfo = { type: 'graphRoam', event: 'graphRoam', update: 'none' }; function graph_install_install(registers) { registers.registerChartView(graph_GraphView); registers.registerSeriesModel(GraphSeries); registers.registerProcessor(categoryFilter); registers.registerVisual(categoryVisual); registers.registerVisual(graphEdgeVisual); registers.registerLayout(graphSimpleLayout); registers.registerLayout(registers.PRIORITY.VISUAL.POST_CHART_LAYOUT, graphCircularLayout); registers.registerLayout(graphForceLayout); registers.registerCoordinateSystem('graphView', { dimensions: coord_View.dimensions, create: createViewCoordSys }); // Register legacy focus actions registers.registerAction({ type: 'focusNodeAdjacency', event: 'focusNodeAdjacency', update: 'series:focusNodeAdjacency' }, core_util["noop"]); registers.registerAction({ type: 'unfocusNodeAdjacency', event: 'unfocusNodeAdjacency', update: 'series:unfocusNodeAdjacency' }, core_util["noop"]); // Register roam action. registers.registerAction(install_actionInfo, function (payload, ecModel, api) { ecModel.eachComponent({ mainType: 'series', query: payload }, function (seriesModel) { var coordSys = seriesModel.coordinateSystem; var res = updateCenterAndZoom(coordSys, payload, undefined, api); seriesModel.setCenter && seriesModel.setCenter(res.center); seriesModel.setZoom && seriesModel.setZoom(res.zoom); }); }); } // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/gauge/PointerPath.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 PointerShape = /** @class */function () { function PointerShape() { this.angle = 0; this.width = 10; this.r = 10; this.x = 0; this.y = 0; } return PointerShape; }(); var PointerPath_PointerPath = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(PointerPath, _super); function PointerPath(opts) { var _this = _super.call(this, opts) || this; _this.type = 'pointer'; return _this; } PointerPath.prototype.getDefaultShape = function () { return new PointerShape(); }; PointerPath.prototype.buildPath = function (ctx, shape) { var mathCos = Math.cos; var mathSin = Math.sin; var r = shape.r; var width = shape.width; var angle = shape.angle; var x = shape.x - mathCos(angle) * width * (width >= r / 3 ? 1 : 2); var y = shape.y - mathSin(angle) * width * (width >= r / 3 ? 1 : 2); angle = shape.angle - Math.PI / 2; ctx.moveTo(x, y); ctx.lineTo(shape.x + mathCos(angle) * width, shape.y + mathSin(angle) * width); ctx.lineTo(shape.x + mathCos(shape.angle) * r, shape.y + mathSin(shape.angle) * r); ctx.lineTo(shape.x - mathCos(angle) * width, shape.y - mathSin(angle) * width); ctx.lineTo(x, y); }; return PointerPath; }(graphic_Path); /* harmony default export */ var gauge_PointerPath = (PointerPath_PointerPath); // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/gauge/GaugeView.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 parsePosition(seriesModel, api) { var center = seriesModel.get('center'); var width = api.getWidth(); var height = api.getHeight(); var size = Math.min(width, height); var cx = number_parsePercent(center[0], api.getWidth()); var cy = number_parsePercent(center[1], api.getHeight()); var r = number_parsePercent(seriesModel.get('radius'), size / 2); return { cx: cx, cy: cy, r: r }; } function formatLabel(value, labelFormatter) { var label = value == null ? '' : value + ''; if (labelFormatter) { if (Object(core_util["isString"])(labelFormatter)) { label = labelFormatter.replace('{value}', label); } else if (Object(core_util["isFunction"])(labelFormatter)) { label = labelFormatter(value); } } return label; } var GaugeView_GaugeView = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(GaugeView, _super); function GaugeView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = GaugeView.type; return _this; } GaugeView.prototype.render = function (seriesModel, ecModel, api) { this.group.removeAll(); var colorList = seriesModel.get(['axisLine', 'lineStyle', 'color']); var posInfo = parsePosition(seriesModel, api); this._renderMain(seriesModel, ecModel, api, colorList, posInfo); this._data = seriesModel.getData(); }; GaugeView.prototype.dispose = function () {}; GaugeView.prototype._renderMain = function (seriesModel, ecModel, api, colorList, posInfo) { var group = this.group; var clockwise = seriesModel.get('clockwise'); var startAngle = -seriesModel.get('startAngle') / 180 * Math.PI; var endAngle = -seriesModel.get('endAngle') / 180 * Math.PI; var axisLineModel = seriesModel.getModel('axisLine'); var roundCap = axisLineModel.get('roundCap'); var MainPath = roundCap ? sausage : shape_Sector; var showAxis = axisLineModel.get('show'); var lineStyleModel = axisLineModel.getModel('lineStyle'); var axisLineWidth = lineStyleModel.get('width'); var angles = [startAngle, endAngle]; normalizeArcAngles(angles, !clockwise); startAngle = angles[0]; endAngle = angles[1]; var angleRangeSpan = endAngle - startAngle; var prevEndAngle = startAngle; var sectors = []; for (var i = 0; showAxis && i < colorList.length; i++) { // Clamp var percent = Math.min(Math.max(colorList[i][0], 0), 1); endAngle = startAngle + angleRangeSpan * percent; var sector = new MainPath({ shape: { startAngle: prevEndAngle, endAngle: endAngle, cx: posInfo.cx, cy: posInfo.cy, clockwise: clockwise, r0: posInfo.r - axisLineWidth, r: posInfo.r }, silent: true }); sector.setStyle({ fill: colorList[i][1] }); sector.setStyle(lineStyleModel.getLineStyle( // Because we use sector to simulate arc // so the properties for stroking are useless ['color', 'width'])); sectors.push(sector); prevEndAngle = endAngle; } sectors.reverse(); Object(core_util["each"])(sectors, function (sector) { return group.add(sector); }); var getColor = function (percent) { // Less than 0 if (percent <= 0) { return colorList[0][1]; } var i; for (i = 0; i < colorList.length; i++) { if (colorList[i][0] >= percent && (i === 0 ? 0 : colorList[i - 1][0]) < percent) { return colorList[i][1]; } } // More than 1 return colorList[i - 1][1]; }; this._renderTicks(seriesModel, ecModel, api, getColor, posInfo, startAngle, endAngle, clockwise, axisLineWidth); this._renderTitleAndDetail(seriesModel, ecModel, api, getColor, posInfo); this._renderAnchor(seriesModel, posInfo); this._renderPointer(seriesModel, ecModel, api, getColor, posInfo, startAngle, endAngle, clockwise, axisLineWidth); }; GaugeView.prototype._renderTicks = function (seriesModel, ecModel, api, getColor, posInfo, startAngle, endAngle, clockwise, axisLineWidth) { var group = this.group; var cx = posInfo.cx; var cy = posInfo.cy; var r = posInfo.r; var minVal = +seriesModel.get('min'); var maxVal = +seriesModel.get('max'); var splitLineModel = seriesModel.getModel('splitLine'); var tickModel = seriesModel.getModel('axisTick'); var labelModel = seriesModel.getModel('axisLabel'); var splitNumber = seriesModel.get('splitNumber'); var subSplitNumber = tickModel.get('splitNumber'); var splitLineLen = number_parsePercent(splitLineModel.get('length'), r); var tickLen = number_parsePercent(tickModel.get('length'), r); var angle = startAngle; var step = (endAngle - startAngle) / splitNumber; var subStep = step / subSplitNumber; var splitLineStyle = splitLineModel.getModel('lineStyle').getLineStyle(); var tickLineStyle = tickModel.getModel('lineStyle').getLineStyle(); var splitLineDistance = splitLineModel.get('distance'); var unitX; var unitY; for (var i = 0; i <= splitNumber; i++) { unitX = Math.cos(angle); unitY = Math.sin(angle); // Split line if (splitLineModel.get('show')) { var distance = splitLineDistance ? splitLineDistance + axisLineWidth : axisLineWidth; var splitLine = new shape_Line({ shape: { x1: unitX * (r - distance) + cx, y1: unitY * (r - distance) + cy, x2: unitX * (r - splitLineLen - distance) + cx, y2: unitY * (r - splitLineLen - distance) + cy }, style: splitLineStyle, silent: true }); if (splitLineStyle.stroke === 'auto') { splitLine.setStyle({ stroke: getColor(i / splitNumber) }); } group.add(splitLine); } // Label if (labelModel.get('show')) { var distance = labelModel.get('distance') + splitLineDistance; var label = formatLabel(round(i / splitNumber * (maxVal - minVal) + minVal), labelModel.get('formatter')); var autoColor = getColor(i / splitNumber); var textStyleX = unitX * (r - splitLineLen - distance) + cx; var textStyleY = unitY * (r - splitLineLen - distance) + cy; var rotateType = labelModel.get('rotate'); var rotate = 0; if (rotateType === 'radial') { rotate = -angle + 2 * Math.PI; if (rotate > Math.PI / 2) { rotate += Math.PI; } } else if (rotateType === 'tangential') { rotate = -angle - Math.PI / 2; } else if (Object(core_util["isNumber"])(rotateType)) { rotate = rotateType * Math.PI / 180; } if (rotate === 0) { group.add(new Text({ style: createTextStyle(labelModel, { text: label, x: textStyleX, y: textStyleY, verticalAlign: unitY < -0.8 ? 'top' : unitY > 0.8 ? 'bottom' : 'middle', align: unitX < -0.4 ? 'left' : unitX > 0.4 ? 'right' : 'center' }, { inheritColor: autoColor }), silent: true })); } else { group.add(new Text({ style: createTextStyle(labelModel, { text: label, x: textStyleX, y: textStyleY, verticalAlign: 'middle', align: 'center' }, { inheritColor: autoColor }), silent: true, originX: textStyleX, originY: textStyleY, rotation: rotate })); } } // Axis tick if (tickModel.get('show') && i !== splitNumber) { var distance = tickModel.get('distance'); distance = distance ? distance + axisLineWidth : axisLineWidth; for (var j = 0; j <= subSplitNumber; j++) { unitX = Math.cos(angle); unitY = Math.sin(angle); var tickLine = new shape_Line({ shape: { x1: unitX * (r - distance) + cx, y1: unitY * (r - distance) + cy, x2: unitX * (r - tickLen - distance) + cx, y2: unitY * (r - tickLen - distance) + cy }, silent: true, style: tickLineStyle }); if (tickLineStyle.stroke === 'auto') { tickLine.setStyle({ stroke: getColor((i + j / subSplitNumber) / splitNumber) }); } group.add(tickLine); angle += subStep; } angle -= subStep; } else { angle += step; } } }; GaugeView.prototype._renderPointer = function (seriesModel, ecModel, api, getColor, posInfo, startAngle, endAngle, clockwise, axisLineWidth) { var group = this.group; var oldData = this._data; var oldProgressData = this._progressEls; var progressList = []; var showPointer = seriesModel.get(['pointer', 'show']); var progressModel = seriesModel.getModel('progress'); var showProgress = progressModel.get('show'); var data = seriesModel.getData(); var valueDim = data.mapDimension('value'); var minVal = +seriesModel.get('min'); var maxVal = +seriesModel.get('max'); var valueExtent = [minVal, maxVal]; var angleExtent = [startAngle, endAngle]; function createPointer(idx, angle) { var itemModel = data.getItemModel(idx); var pointerModel = itemModel.getModel('pointer'); var pointerWidth = number_parsePercent(pointerModel.get('width'), posInfo.r); var pointerLength = number_parsePercent(pointerModel.get('length'), posInfo.r); var pointerStr = seriesModel.get(['pointer', 'icon']); var pointerOffset = pointerModel.get('offsetCenter'); var pointerOffsetX = number_parsePercent(pointerOffset[0], posInfo.r); var pointerOffsetY = number_parsePercent(pointerOffset[1], posInfo.r); var pointerKeepAspect = pointerModel.get('keepAspect'); var pointer; // not exist icon type will be set 'rect' if (pointerStr) { pointer = symbol_createSymbol(pointerStr, pointerOffsetX - pointerWidth / 2, pointerOffsetY - pointerLength, pointerWidth, pointerLength, null, pointerKeepAspect); } else { pointer = new gauge_PointerPath({ shape: { angle: -Math.PI / 2, width: pointerWidth, r: pointerLength, x: pointerOffsetX, y: pointerOffsetY } }); } pointer.rotation = -(angle + Math.PI / 2); pointer.x = posInfo.cx; pointer.y = posInfo.cy; return pointer; } function createProgress(idx, endAngle) { var roundCap = progressModel.get('roundCap'); var ProgressPath = roundCap ? sausage : shape_Sector; var isOverlap = progressModel.get('overlap'); var progressWidth = isOverlap ? progressModel.get('width') : axisLineWidth / data.count(); var r0 = isOverlap ? posInfo.r - progressWidth : posInfo.r - (idx + 1) * progressWidth; var r = isOverlap ? posInfo.r : posInfo.r - idx * progressWidth; var progress = new ProgressPath({ shape: { startAngle: startAngle, endAngle: endAngle, cx: posInfo.cx, cy: posInfo.cy, clockwise: clockwise, r0: r0, r: r } }); isOverlap && (progress.z2 = linearMap(data.get(valueDim, idx), [minVal, maxVal], [100, 0], true)); return progress; } if (showProgress || showPointer) { data.diff(oldData).add(function (idx) { var val = data.get(valueDim, idx); if (showPointer) { var pointer = createPointer(idx, startAngle); // TODO hide pointer on NaN value? initProps(pointer, { rotation: -((isNaN(+val) ? angleExtent[0] : linearMap(val, valueExtent, angleExtent, true)) + Math.PI / 2) }, seriesModel); group.add(pointer); data.setItemGraphicEl(idx, pointer); } if (showProgress) { var progress = createProgress(idx, startAngle); var isClip = progressModel.get('clip'); initProps(progress, { shape: { endAngle: linearMap(val, valueExtent, angleExtent, isClip) } }, seriesModel); group.add(progress); // Add data index and series index for indexing the data by element // Useful in tooltip setCommonECData(seriesModel.seriesIndex, data.dataType, idx, progress); progressList[idx] = progress; } }).update(function (newIdx, oldIdx) { var val = data.get(valueDim, newIdx); if (showPointer) { var previousPointer = oldData.getItemGraphicEl(oldIdx); var previousRotate = previousPointer ? previousPointer.rotation : startAngle; var pointer = createPointer(newIdx, previousRotate); pointer.rotation = previousRotate; updateProps(pointer, { rotation: -((isNaN(+val) ? angleExtent[0] : linearMap(val, valueExtent, angleExtent, true)) + Math.PI / 2) }, seriesModel); group.add(pointer); data.setItemGraphicEl(newIdx, pointer); } if (showProgress) { var previousProgress = oldProgressData[oldIdx]; var previousEndAngle = previousProgress ? previousProgress.shape.endAngle : startAngle; var progress = createProgress(newIdx, previousEndAngle); var isClip = progressModel.get('clip'); updateProps(progress, { shape: { endAngle: linearMap(val, valueExtent, angleExtent, isClip) } }, seriesModel); group.add(progress); // Add data index and series index for indexing the data by element // Useful in tooltip setCommonECData(seriesModel.seriesIndex, data.dataType, newIdx, progress); progressList[newIdx] = progress; } }).execute(); data.each(function (idx) { var itemModel = data.getItemModel(idx); var emphasisModel = itemModel.getModel('emphasis'); var focus = emphasisModel.get('focus'); var blurScope = emphasisModel.get('blurScope'); var emphasisDisabled = emphasisModel.get('disabled'); if (showPointer) { var pointer = data.getItemGraphicEl(idx); var symbolStyle = data.getItemVisual(idx, 'style'); var visualColor = symbolStyle.fill; if (pointer instanceof graphic_Image) { var pathStyle = pointer.style; pointer.useStyle(Object(core_util["extend"])({ image: pathStyle.image, x: pathStyle.x, y: pathStyle.y, width: pathStyle.width, height: pathStyle.height }, symbolStyle)); } else { pointer.useStyle(symbolStyle); pointer.type !== 'pointer' && pointer.setColor(visualColor); } pointer.setStyle(itemModel.getModel(['pointer', 'itemStyle']).getItemStyle()); if (pointer.style.fill === 'auto') { pointer.setStyle('fill', getColor(linearMap(data.get(valueDim, idx), valueExtent, [0, 1], true))); } pointer.z2EmphasisLift = 0; setStatesStylesFromModel(pointer, itemModel); toggleHoverEmphasis(pointer, focus, blurScope, emphasisDisabled); } if (showProgress) { var progress = progressList[idx]; progress.useStyle(data.getItemVisual(idx, 'style')); progress.setStyle(itemModel.getModel(['progress', 'itemStyle']).getItemStyle()); progress.z2EmphasisLift = 0; setStatesStylesFromModel(progress, itemModel); toggleHoverEmphasis(progress, focus, blurScope, emphasisDisabled); } }); this._progressEls = progressList; } }; GaugeView.prototype._renderAnchor = function (seriesModel, posInfo) { var anchorModel = seriesModel.getModel('anchor'); var showAnchor = anchorModel.get('show'); if (showAnchor) { var anchorSize = anchorModel.get('size'); var anchorType = anchorModel.get('icon'); var offsetCenter = anchorModel.get('offsetCenter'); var anchorKeepAspect = anchorModel.get('keepAspect'); var anchor = symbol_createSymbol(anchorType, posInfo.cx - anchorSize / 2 + number_parsePercent(offsetCenter[0], posInfo.r), posInfo.cy - anchorSize / 2 + number_parsePercent(offsetCenter[1], posInfo.r), anchorSize, anchorSize, null, anchorKeepAspect); anchor.z2 = anchorModel.get('showAbove') ? 1 : 0; anchor.setStyle(anchorModel.getModel('itemStyle').getItemStyle()); this.group.add(anchor); } }; GaugeView.prototype._renderTitleAndDetail = function (seriesModel, ecModel, api, getColor, posInfo) { var _this = this; var data = seriesModel.getData(); var valueDim = data.mapDimension('value'); var minVal = +seriesModel.get('min'); var maxVal = +seriesModel.get('max'); var contentGroup = new graphic_Group(); var newTitleEls = []; var newDetailEls = []; var hasAnimation = seriesModel.isAnimationEnabled(); var showPointerAbove = seriesModel.get(['pointer', 'showAbove']); data.diff(this._data).add(function (idx) { newTitleEls[idx] = new Text({ silent: true }); newDetailEls[idx] = new Text({ silent: true }); }).update(function (idx, oldIdx) { newTitleEls[idx] = _this._titleEls[oldIdx]; newDetailEls[idx] = _this._detailEls[oldIdx]; }).execute(); data.each(function (idx) { var itemModel = data.getItemModel(idx); var value = data.get(valueDim, idx); var itemGroup = new graphic_Group(); var autoColor = getColor(linearMap(value, [minVal, maxVal], [0, 1], true)); var itemTitleModel = itemModel.getModel('title'); if (itemTitleModel.get('show')) { var titleOffsetCenter = itemTitleModel.get('offsetCenter'); var titleX = posInfo.cx + number_parsePercent(titleOffsetCenter[0], posInfo.r); var titleY = posInfo.cy + number_parsePercent(titleOffsetCenter[1], posInfo.r); var labelEl = newTitleEls[idx]; labelEl.attr({ z2: showPointerAbove ? 0 : 2, style: createTextStyle(itemTitleModel, { x: titleX, y: titleY, text: data.getName(idx), align: 'center', verticalAlign: 'middle' }, { inheritColor: autoColor }) }); itemGroup.add(labelEl); } var itemDetailModel = itemModel.getModel('detail'); if (itemDetailModel.get('show')) { var detailOffsetCenter = itemDetailModel.get('offsetCenter'); var detailX = posInfo.cx + number_parsePercent(detailOffsetCenter[0], posInfo.r); var detailY = posInfo.cy + number_parsePercent(detailOffsetCenter[1], posInfo.r); var width = number_parsePercent(itemDetailModel.get('width'), posInfo.r); var height = number_parsePercent(itemDetailModel.get('height'), posInfo.r); var detailColor = seriesModel.get(['progress', 'show']) ? data.getItemVisual(idx, 'style').fill : autoColor; var labelEl = newDetailEls[idx]; var formatter_1 = itemDetailModel.get('formatter'); labelEl.attr({ z2: showPointerAbove ? 0 : 2, style: createTextStyle(itemDetailModel, { x: detailX, y: detailY, text: formatLabel(value, formatter_1), width: isNaN(width) ? null : width, height: isNaN(height) ? null : height, align: 'center', verticalAlign: 'middle' }, { inheritColor: detailColor }) }); setLabelValueAnimation(labelEl, { normal: itemDetailModel }, value, function (value) { return formatLabel(value, formatter_1); }); hasAnimation && animateLabelValue(labelEl, idx, data, seriesModel, { getFormattedLabel: function (labelDataIndex, status, dataType, labelDimIndex, fmt, extendParams) { return formatLabel(extendParams ? extendParams.interpolatedValue : value, formatter_1); } }); itemGroup.add(labelEl); } contentGroup.add(itemGroup); }); this.group.add(contentGroup); this._titleEls = newTitleEls; this._detailEls = newDetailEls; }; GaugeView.type = 'gauge'; return GaugeView; }(Chart); /* harmony default export */ var gauge_GaugeView = (GaugeView_GaugeView); // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/gauge/GaugeSeries.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 GaugeSeries_GaugeSeriesModel = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(GaugeSeriesModel, _super); function GaugeSeriesModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = GaugeSeriesModel.type; _this.visualStyleAccessPath = 'itemStyle'; return _this; } GaugeSeriesModel.prototype.getInitialData = function (option, ecModel) { return createSeriesDataSimply(this, ['value']); }; GaugeSeriesModel.type = 'series.gauge'; GaugeSeriesModel.defaultOption = { // zlevel: 0, z: 2, colorBy: 'data', // 默认全局居中 center: ['50%', '50%'], legendHoverLink: true, radius: '75%', startAngle: 225, endAngle: -45, clockwise: true, // 最小值 min: 0, // 最大值 max: 100, // 分割段数,默认为10 splitNumber: 10, // 坐标轴线 axisLine: { // 默认显示,属性show控制显示与否 show: true, roundCap: false, lineStyle: { color: [[1, '#E6EBF8']], width: 10 } }, // 坐标轴线 progress: { // 默认显示,属性show控制显示与否 show: false, overlap: true, width: 10, roundCap: false, clip: true }, // 分隔线 splitLine: { // 默认显示,属性show控制显示与否 show: true, // 属性length控制线长 length: 10, distance: 10, // 属性lineStyle(详见lineStyle)控制线条样式 lineStyle: { color: '#63677A', width: 3, type: 'solid' } }, // 坐标轴小标记 axisTick: { // 属性show控制显示与否,默认不显示 show: true, // 每份split细分多少段 splitNumber: 5, // 属性length控制线长 length: 6, distance: 10, // 属性lineStyle控制线条样式 lineStyle: { color: '#63677A', width: 1, type: 'solid' } }, axisLabel: { show: true, distance: 15, // formatter: null, color: '#464646', fontSize: 12, rotate: 0 }, pointer: { icon: null, offsetCenter: [0, 0], show: true, showAbove: true, length: '60%', width: 6, keepAspect: false }, anchor: { show: false, showAbove: false, size: 6, icon: 'circle', offsetCenter: [0, 0], keepAspect: false, itemStyle: { color: '#fff', borderWidth: 0, borderColor: '#5470c6' } }, title: { show: true, // x, y,单位px offsetCenter: [0, '20%'], // 其余属性默认使用全局文本样式,详见TEXTSTYLE color: '#464646', fontSize: 16, valueAnimation: false }, detail: { show: true, backgroundColor: 'rgba(0,0,0,0)', borderWidth: 0, borderColor: '#ccc', width: 100, height: null, padding: [5, 10], // x, y,单位px offsetCenter: [0, '40%'], // formatter: null, // 其余属性默认使用全局文本样式,详见TEXTSTYLE color: '#464646', fontSize: 30, fontWeight: 'bold', lineHeight: 30, valueAnimation: false } }; return GaugeSeriesModel; }(Series); /* harmony default export */ var GaugeSeries = (GaugeSeries_GaugeSeriesModel); // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/gauge/install.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 gauge_install_install(registers) { registers.registerChartView(gauge_GaugeView); registers.registerSeriesModel(GaugeSeries); } // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/funnel/FunnelView.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 opacityAccessPath = ['itemStyle', 'opacity']; /** * Piece of pie including Sector, Label, LabelLine */ var FunnelView_FunnelPiece = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(FunnelPiece, _super); function FunnelPiece(data, idx) { var _this = _super.call(this) || this; var polygon = _this; var labelLine = new shape_Polyline(); var text = new Text(); polygon.setTextContent(text); _this.setTextGuideLine(labelLine); _this.updateData(data, idx, true); return _this; } FunnelPiece.prototype.updateData = function (data, idx, firstCreate) { var polygon = this; var seriesModel = data.hostModel; var itemModel = data.getItemModel(idx); var layout = data.getItemLayout(idx); var emphasisModel = itemModel.getModel('emphasis'); var opacity = itemModel.get(opacityAccessPath); opacity = opacity == null ? 1 : opacity; if (!firstCreate) { saveOldStyle(polygon); } // Update common style polygon.useStyle(data.getItemVisual(idx, 'style')); polygon.style.lineJoin = 'round'; if (firstCreate) { polygon.setShape({ points: layout.points }); polygon.style.opacity = 0; initProps(polygon, { style: { opacity: opacity } }, seriesModel, idx); } else { updateProps(polygon, { style: { opacity: opacity }, shape: { points: layout.points } }, seriesModel, idx); } setStatesStylesFromModel(polygon, itemModel); this._updateLabel(data, idx); toggleHoverEmphasis(this, emphasisModel.get('focus'), emphasisModel.get('blurScope'), emphasisModel.get('disabled')); }; FunnelPiece.prototype._updateLabel = function (data, idx) { var polygon = this; var labelLine = this.getTextGuideLine(); var labelText = polygon.getTextContent(); var seriesModel = data.hostModel; var itemModel = data.getItemModel(idx); var layout = data.getItemLayout(idx); var labelLayout = layout.label; var style = data.getItemVisual(idx, 'style'); var visualColor = style.fill; setLabelStyle( // position will not be used in setLabelStyle labelText, getLabelStatesModels(itemModel), { labelFetcher: data.hostModel, labelDataIndex: idx, defaultOpacity: style.opacity, defaultText: data.getName(idx) }, { normal: { align: labelLayout.textAlign, verticalAlign: labelLayout.verticalAlign } }); polygon.setTextConfig({ local: true, inside: !!labelLayout.inside, insideStroke: visualColor, // insideFill: 'auto', outsideFill: visualColor }); var linePoints = labelLayout.linePoints; labelLine.setShape({ points: linePoints }); polygon.textGuideLineConfig = { anchor: linePoints ? new core_Point(linePoints[0][0], linePoints[0][1]) : null }; // Make sure update style on labelText after setLabelStyle. // Because setLabelStyle will replace a new style on it. updateProps(labelText, { style: { x: labelLayout.x, y: labelLayout.y } }, seriesModel, idx); labelText.attr({ rotation: labelLayout.rotation, originX: labelLayout.x, originY: labelLayout.y, z2: 10 }); setLabelLineStyle(polygon, getLabelLineStatesModels(itemModel), { // Default use item visual color stroke: visualColor }); }; return FunnelPiece; }(shape_Polygon); var FunnelView_FunnelView = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(FunnelView, _super); function FunnelView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = FunnelView.type; _this.ignoreLabelLineUpdate = true; return _this; } FunnelView.prototype.render = function (seriesModel, ecModel, api) { var data = seriesModel.getData(); var oldData = this._data; var group = this.group; data.diff(oldData).add(function (idx) { var funnelPiece = new FunnelView_FunnelPiece(data, idx); data.setItemGraphicEl(idx, funnelPiece); group.add(funnelPiece); }).update(function (newIdx, oldIdx) { var piece = oldData.getItemGraphicEl(oldIdx); piece.updateData(data, newIdx); group.add(piece); data.setItemGraphicEl(newIdx, piece); }).remove(function (idx) { var piece = oldData.getItemGraphicEl(idx); removeElementWithFadeOut(piece, seriesModel, idx); }).execute(); this._data = data; }; FunnelView.prototype.remove = function () { this.group.removeAll(); this._data = null; }; FunnelView.prototype.dispose = function () {}; FunnelView.type = 'funnel'; return FunnelView; }(Chart); /* harmony default export */ var funnel_FunnelView = (FunnelView_FunnelView); // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/funnel/FunnelSeries.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 FunnelSeries_FunnelSeriesModel = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(FunnelSeriesModel, _super); function FunnelSeriesModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = FunnelSeriesModel.type; return _this; } FunnelSeriesModel.prototype.init = function (option) { _super.prototype.init.apply(this, arguments); // Enable legend selection for each data item // Use a function instead of direct access because data reference may changed this.legendVisualProvider = new visual_LegendVisualProvider(core_util["bind"](this.getData, this), core_util["bind"](this.getRawData, this)); // Extend labelLine emphasis this._defaultLabelLine(option); }; FunnelSeriesModel.prototype.getInitialData = function (option, ecModel) { return createSeriesDataSimply(this, { coordDimensions: ['value'], encodeDefaulter: core_util["curry"](makeSeriesEncodeForNameBased, this) }); }; FunnelSeriesModel.prototype._defaultLabelLine = function (option) { // Extend labelLine emphasis defaultEmphasis(option, 'labelLine', ['show']); var labelLineNormalOpt = option.labelLine; var labelLineEmphasisOpt = option.emphasis.labelLine; // Not show label line if `label.normal.show = false` labelLineNormalOpt.show = labelLineNormalOpt.show && option.label.show; labelLineEmphasisOpt.show = labelLineEmphasisOpt.show && option.emphasis.label.show; }; // Overwrite FunnelSeriesModel.prototype.getDataParams = function (dataIndex) { var data = this.getData(); var params = _super.prototype.getDataParams.call(this, dataIndex); var valueDim = data.mapDimension('value'); var sum = data.getSum(valueDim); // Percent is 0 if sum is 0 params.percent = !sum ? 0 : +(data.get(valueDim, dataIndex) / sum * 100).toFixed(2); params.$vars.push('percent'); return params; }; FunnelSeriesModel.type = 'series.funnel'; FunnelSeriesModel.defaultOption = { // zlevel: 0, // 一级层叠 z: 2, legendHoverLink: true, colorBy: 'data', left: 80, top: 60, right: 80, bottom: 60, // width: {totalWidth} - left - right, // height: {totalHeight} - top - bottom, // 默认取数据最小最大值 // min: 0, // max: 100, minSize: '0%', maxSize: '100%', sort: 'descending', orient: 'vertical', gap: 0, funnelAlign: 'center', label: { show: true, position: 'outer' // formatter: 标签文本格式器,同Tooltip.formatter,不支持异步回调 }, labelLine: { show: true, length: 20, lineStyle: { // color: 各异, width: 1 } }, itemStyle: { // color: 各异, borderColor: '#fff', borderWidth: 1 }, emphasis: { label: { show: true } }, select: { itemStyle: { borderColor: '#212121' } } }; return FunnelSeriesModel; }(Series); /* harmony default export */ var FunnelSeries = (FunnelSeries_FunnelSeriesModel); // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/funnel/funnelLayout.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 funnelLayout_getViewRect(seriesModel, api) { return getLayoutRect(seriesModel.getBoxLayoutParams(), { width: api.getWidth(), height: api.getHeight() }); } function getSortedIndices(data, sort) { var valueDim = data.mapDimension('value'); var valueArr = data.mapArray(valueDim, function (val) { return val; }); var indices = []; var isAscending = sort === 'ascending'; for (var i = 0, len = data.count(); i < len; i++) { indices[i] = i; } // Add custom sortable function & none sortable opetion by "options.sort" if (Object(core_util["isFunction"])(sort)) { indices.sort(sort); } else if (sort !== 'none') { indices.sort(function (a, b) { return isAscending ? valueArr[a] - valueArr[b] : valueArr[b] - valueArr[a]; }); } return indices; } function funnelLayout_labelLayout(data) { var seriesModel = data.hostModel; var orient = seriesModel.get('orient'); data.each(function (idx) { var itemModel = data.getItemModel(idx); var labelModel = itemModel.getModel('label'); var labelPosition = labelModel.get('position'); var labelLineModel = itemModel.getModel('labelLine'); var layout = data.getItemLayout(idx); var points = layout.points; var isLabelInside = labelPosition === 'inner' || labelPosition === 'inside' || labelPosition === 'center' || labelPosition === 'insideLeft' || labelPosition === 'insideRight'; var textAlign; var textX; var textY; var linePoints; if (isLabelInside) { if (labelPosition === 'insideLeft') { textX = (points[0][0] + points[3][0]) / 2 + 5; textY = (points[0][1] + points[3][1]) / 2; textAlign = 'left'; } else if (labelPosition === 'insideRight') { textX = (points[1][0] + points[2][0]) / 2 - 5; textY = (points[1][1] + points[2][1]) / 2; textAlign = 'right'; } else { textX = (points[0][0] + points[1][0] + points[2][0] + points[3][0]) / 4; textY = (points[0][1] + points[1][1] + points[2][1] + points[3][1]) / 4; textAlign = 'center'; } linePoints = [[textX, textY], [textX, textY]]; } else { var x1 = void 0; var y1 = void 0; var x2 = void 0; var y2 = void 0; var labelLineLen = labelLineModel.get('length'); if (false) { if (orient === 'vertical' && ['top', 'bottom'].indexOf(labelPosition) > -1) { labelPosition = 'left'; console.warn('Position error: Funnel chart on vertical orient dose not support top and bottom.'); } if (orient === 'horizontal' && ['left', 'right'].indexOf(labelPosition) > -1) { labelPosition = 'bottom'; console.warn('Position error: Funnel chart on horizontal orient dose not support left and right.'); } } if (labelPosition === 'left') { // Left side x1 = (points[3][0] + points[0][0]) / 2; y1 = (points[3][1] + points[0][1]) / 2; x2 = x1 - labelLineLen; textX = x2 - 5; textAlign = 'right'; } else if (labelPosition === 'right') { // Right side x1 = (points[1][0] + points[2][0]) / 2; y1 = (points[1][1] + points[2][1]) / 2; x2 = x1 + labelLineLen; textX = x2 + 5; textAlign = 'left'; } else if (labelPosition === 'top') { // Top side x1 = (points[3][0] + points[0][0]) / 2; y1 = (points[3][1] + points[0][1]) / 2; y2 = y1 - labelLineLen; textY = y2 - 5; textAlign = 'center'; } else if (labelPosition === 'bottom') { // Bottom side x1 = (points[1][0] + points[2][0]) / 2; y1 = (points[1][1] + points[2][1]) / 2; y2 = y1 + labelLineLen; textY = y2 + 5; textAlign = 'center'; } else if (labelPosition === 'rightTop') { // RightTop side x1 = orient === 'horizontal' ? points[3][0] : points[1][0]; y1 = orient === 'horizontal' ? points[3][1] : points[1][1]; if (orient === 'horizontal') { y2 = y1 - labelLineLen; textY = y2 - 5; textAlign = 'center'; } else { x2 = x1 + labelLineLen; textX = x2 + 5; textAlign = 'top'; } } else if (labelPosition === 'rightBottom') { // RightBottom side x1 = points[2][0]; y1 = points[2][1]; if (orient === 'horizontal') { y2 = y1 + labelLineLen; textY = y2 + 5; textAlign = 'center'; } else { x2 = x1 + labelLineLen; textX = x2 + 5; textAlign = 'bottom'; } } else if (labelPosition === 'leftTop') { // LeftTop side x1 = points[0][0]; y1 = orient === 'horizontal' ? points[0][1] : points[1][1]; if (orient === 'horizontal') { y2 = y1 - labelLineLen; textY = y2 - 5; textAlign = 'center'; } else { x2 = x1 - labelLineLen; textX = x2 - 5; textAlign = 'right'; } } else if (labelPosition === 'leftBottom') { // LeftBottom side x1 = orient === 'horizontal' ? points[1][0] : points[3][0]; y1 = orient === 'horizontal' ? points[1][1] : points[2][1]; if (orient === 'horizontal') { y2 = y1 + labelLineLen; textY = y2 + 5; textAlign = 'center'; } else { x2 = x1 - labelLineLen; textX = x2 - 5; textAlign = 'right'; } } else { // Right side or Bottom side x1 = (points[1][0] + points[2][0]) / 2; y1 = (points[1][1] + points[2][1]) / 2; if (orient === 'horizontal') { y2 = y1 + labelLineLen; textY = y2 + 5; textAlign = 'center'; } else { x2 = x1 + labelLineLen; textX = x2 + 5; textAlign = 'left'; } } if (orient === 'horizontal') { x2 = x1; textX = x2; } else { y2 = y1; textY = y2; } linePoints = [[x1, y1], [x2, y2]]; } layout.label = { linePoints: linePoints, x: textX, y: textY, verticalAlign: 'middle', textAlign: textAlign, inside: isLabelInside }; }); } function funnelLayout(ecModel, api) { ecModel.eachSeriesByType('funnel', function (seriesModel) { var data = seriesModel.getData(); var valueDim = data.mapDimension('value'); var sort = seriesModel.get('sort'); var viewRect = funnelLayout_getViewRect(seriesModel, api); var orient = seriesModel.get('orient'); var viewWidth = viewRect.width; var viewHeight = viewRect.height; var indices = getSortedIndices(data, sort); var x = viewRect.x; var y = viewRect.y; var sizeExtent = orient === 'horizontal' ? [number_parsePercent(seriesModel.get('minSize'), viewHeight), number_parsePercent(seriesModel.get('maxSize'), viewHeight)] : [number_parsePercent(seriesModel.get('minSize'), viewWidth), number_parsePercent(seriesModel.get('maxSize'), viewWidth)]; var dataExtent = data.getDataExtent(valueDim); var min = seriesModel.get('min'); var max = seriesModel.get('max'); if (min == null) { min = Math.min(dataExtent[0], 0); } if (max == null) { max = dataExtent[1]; } var funnelAlign = seriesModel.get('funnelAlign'); var gap = seriesModel.get('gap'); var viewSize = orient === 'horizontal' ? viewWidth : viewHeight; var itemSize = (viewSize - gap * (data.count() - 1)) / data.count(); var getLinePoints = function (idx, offset) { // End point index is data.count() and we assign it 0 if (orient === 'horizontal') { var val_1 = data.get(valueDim, idx) || 0; var itemHeight = linearMap(val_1, [min, max], sizeExtent, true); var y0 = void 0; switch (funnelAlign) { case 'top': y0 = y; break; case 'center': y0 = y + (viewHeight - itemHeight) / 2; break; case 'bottom': y0 = y + (viewHeight - itemHeight); break; } return [[offset, y0], [offset, y0 + itemHeight]]; } var val = data.get(valueDim, idx) || 0; var itemWidth = linearMap(val, [min, max], sizeExtent, true); var x0; switch (funnelAlign) { case 'left': x0 = x; break; case 'center': x0 = x + (viewWidth - itemWidth) / 2; break; case 'right': x0 = x + viewWidth - itemWidth; break; } return [[x0, offset], [x0 + itemWidth, offset]]; }; if (sort === 'ascending') { // From bottom to top itemSize = -itemSize; gap = -gap; if (orient === 'horizontal') { x += viewWidth; } else { y += viewHeight; } indices = indices.reverse(); } for (var i = 0; i < indices.length; i++) { var idx = indices[i]; var nextIdx = indices[i + 1]; var itemModel = data.getItemModel(idx); if (orient === 'horizontal') { var width = itemModel.get(['itemStyle', 'width']); if (width == null) { width = itemSize; } else { width = number_parsePercent(width, viewWidth); if (sort === 'ascending') { width = -width; } } var start = getLinePoints(idx, x); var end = getLinePoints(nextIdx, x + width); x += width + gap; data.setItemLayout(idx, { points: start.concat(end.slice().reverse()) }); } else { var height = itemModel.get(['itemStyle', 'height']); if (height == null) { height = itemSize; } else { height = number_parsePercent(height, viewHeight); if (sort === 'ascending') { height = -height; } } var start = getLinePoints(idx, y); var end = getLinePoints(nextIdx, y + height); y += height + gap; data.setItemLayout(idx, { points: start.concat(end.slice().reverse()) }); } } funnelLayout_labelLayout(data); }); } // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/funnel/install.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 funnel_install_install(registers) { registers.registerChartView(funnel_FunnelView); registers.registerSeriesModel(FunnelSeries); registers.registerLayout(funnelLayout); registers.registerProcessor(dataFilter('funnel')); } // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/parallel/ParallelView.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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_SMOOTH = 0.3; var ParallelView_ParallelView = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(ParallelView, _super); function ParallelView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = ParallelView.type; _this._dataGroup = new graphic_Group(); _this._initialized = false; return _this; } ParallelView.prototype.init = function () { this.group.add(this._dataGroup); }; /** * @override */ ParallelView.prototype.render = function (seriesModel, ecModel, api, payload) { // Clear previously rendered progressive elements. this._progressiveEls = null; var dataGroup = this._dataGroup; var data = seriesModel.getData(); var oldData = this._data; var coordSys = seriesModel.coordinateSystem; var dimensions = coordSys.dimensions; var seriesScope = ParallelView_makeSeriesScope(seriesModel); data.diff(oldData).add(add).update(update).remove(remove).execute(); function add(newDataIndex) { var line = addEl(data, dataGroup, newDataIndex, dimensions, coordSys); updateElCommon(line, data, newDataIndex, seriesScope); } function update(newDataIndex, oldDataIndex) { var line = oldData.getItemGraphicEl(oldDataIndex); var points = createLinePoints(data, newDataIndex, dimensions, coordSys); data.setItemGraphicEl(newDataIndex, line); updateProps(line, { shape: { points: points } }, seriesModel, newDataIndex); saveOldStyle(line); updateElCommon(line, data, newDataIndex, seriesScope); } function remove(oldDataIndex) { var line = oldData.getItemGraphicEl(oldDataIndex); dataGroup.remove(line); } // First create if (!this._initialized) { this._initialized = true; var clipPath = createGridClipShape(coordSys, seriesModel, function () { // Callback will be invoked immediately if there is no animation setTimeout(function () { dataGroup.removeClipPath(); }); }); dataGroup.setClipPath(clipPath); } this._data = data; }; ParallelView.prototype.incrementalPrepareRender = function (seriesModel, ecModel, api) { this._initialized = true; this._data = null; this._dataGroup.removeAll(); }; ParallelView.prototype.incrementalRender = function (taskParams, seriesModel, ecModel) { var data = seriesModel.getData(); var coordSys = seriesModel.coordinateSystem; var dimensions = coordSys.dimensions; var seriesScope = ParallelView_makeSeriesScope(seriesModel); var progressiveEls = this._progressiveEls = []; for (var dataIndex = taskParams.start; dataIndex < taskParams.end; dataIndex++) { var line = addEl(data, this._dataGroup, dataIndex, dimensions, coordSys); line.incremental = true; updateElCommon(line, data, dataIndex, seriesScope); progressiveEls.push(line); } }; ParallelView.prototype.remove = function () { this._dataGroup && this._dataGroup.removeAll(); this._data = null; }; ParallelView.type = 'parallel'; return ParallelView; }(Chart); function createGridClipShape(coordSys, seriesModel, cb) { var parallelModel = coordSys.model; var rect = coordSys.getRect(); var rectEl = new shape_Rect({ shape: { x: rect.x, y: rect.y, width: rect.width, height: rect.height } }); var dim = parallelModel.get('layout') === 'horizontal' ? 'width' : 'height'; rectEl.setShape(dim, 0); initProps(rectEl, { shape: { width: rect.width, height: rect.height } }, seriesModel, cb); return rectEl; } function createLinePoints(data, dataIndex, dimensions, coordSys) { var points = []; for (var i = 0; i < dimensions.length; i++) { var dimName = dimensions[i]; var value = data.get(data.mapDimension(dimName), dataIndex); if (!isEmptyValue(value, coordSys.getAxis(dimName).type)) { points.push(coordSys.dataToPoint(value, dimName)); } } return points; } function addEl(data, dataGroup, dataIndex, dimensions, coordSys) { var points = createLinePoints(data, dataIndex, dimensions, coordSys); var line = new shape_Polyline({ shape: { points: points }, // silent: true, z2: 10 }); dataGroup.add(line); data.setItemGraphicEl(dataIndex, line); return line; } function ParallelView_makeSeriesScope(seriesModel) { var smooth = seriesModel.get('smooth', true); smooth === true && (smooth = DEFAULT_SMOOTH); smooth = numericToNumber(smooth); Object(core_util["eqNaN"])(smooth) && (smooth = 0); return { smooth: smooth }; } function updateElCommon(el, data, dataIndex, seriesScope) { el.useStyle(data.getItemVisual(dataIndex, 'style')); el.style.fill = null; el.setShape('smooth', seriesScope.smooth); var itemModel = data.getItemModel(dataIndex); var emphasisModel = itemModel.getModel('emphasis'); setStatesStylesFromModel(el, itemModel, 'lineStyle'); toggleHoverEmphasis(el, emphasisModel.get('focus'), emphasisModel.get('blurScope'), emphasisModel.get('disabled')); } // function simpleDiff(oldData, newData, dimensions) { // let oldLen; // if (!oldData // || !oldData.__plProgressive // || (oldLen = oldData.count()) !== newData.count() // ) { // return true; // } // let dimLen = dimensions.length; // for (let i = 0; i < oldLen; i++) { // for (let j = 0; j < dimLen; j++) { // if (oldData.get(dimensions[j], i) !== newData.get(dimensions[j], i)) { // return true; // } // } // } // return false; // } // FIXME put in common util? function isEmptyValue(val, axisType) { return axisType === 'category' ? val == null : val == null || isNaN(val); // axisType === 'value' } /* harmony default export */ var parallel_ParallelView = (ParallelView_ParallelView); // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/parallel/ParallelSeries.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 ParallelSeries_ParallelSeriesModel = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(ParallelSeriesModel, _super); function ParallelSeriesModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = ParallelSeriesModel.type; _this.visualStyleAccessPath = 'lineStyle'; _this.visualDrawType = 'stroke'; return _this; } ParallelSeriesModel.prototype.getInitialData = function (option, ecModel) { return helper_createSeriesData(null, this, { useEncodeDefaulter: Object(core_util["bind"])(makeDefaultEncode, null, this) }); }; /** * User can get data raw indices on 'axisAreaSelected' event received. * * @return Raw indices */ ParallelSeriesModel.prototype.getRawIndicesByActiveState = function (activeState) { var coordSys = this.coordinateSystem; var data = this.getData(); var indices = []; coordSys.eachActiveState(data, function (theActiveState, dataIndex) { if (activeState === theActiveState) { indices.push(data.getRawIndex(dataIndex)); } }); return indices; }; ParallelSeriesModel.type = 'series.parallel'; ParallelSeriesModel.dependencies = ['parallel']; ParallelSeriesModel.defaultOption = { // zlevel: 0, z: 2, coordinateSystem: 'parallel', parallelIndex: 0, label: { show: false }, inactiveOpacity: 0.05, activeOpacity: 1, lineStyle: { width: 1, opacity: 0.45, type: 'solid' }, emphasis: { label: { show: false } }, progressive: 500, smooth: false, animationEasing: 'linear' }; return ParallelSeriesModel; }(Series); function makeDefaultEncode(seriesModel) { // The mapping of parallelAxis dimension to data dimension can // be specified in parallelAxis.option.dim. For example, if // parallelAxis.option.dim is 'dim3', it mapping to the third // dimension of data. But `data.encode` has higher priority. // Moreover, parallelModel.dimension should not be regarded as data // dimensions. Consider dimensions = ['dim4', 'dim2', 'dim6']; var parallelModel = seriesModel.ecModel.getComponent('parallel', seriesModel.get('parallelIndex')); if (!parallelModel) { return; } var encodeDefine = {}; Object(core_util["each"])(parallelModel.dimensions, function (axisDim) { var dataDimIndex = convertDimNameToNumber(axisDim); encodeDefine[axisDim] = dataDimIndex; }); return encodeDefine; } function convertDimNameToNumber(dimName) { return +dimName.replace('dim', ''); } /* harmony default export */ var ParallelSeries = (ParallelSeries_ParallelSeriesModel); // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/parallel/parallelVisual.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 parallelVisual_opacityAccessPath = ['lineStyle', 'opacity']; var parallelVisual = { seriesType: 'parallel', reset: function (seriesModel, ecModel) { var coordSys = seriesModel.coordinateSystem; var opacityMap = { normal: seriesModel.get(['lineStyle', 'opacity']), active: seriesModel.get('activeOpacity'), inactive: seriesModel.get('inactiveOpacity') }; return { progress: function (params, data) { coordSys.eachActiveState(data, function (activeState, dataIndex) { var opacity = opacityMap[activeState]; if (activeState === 'normal' && data.hasItemOption) { var itemOpacity = data.getItemModel(dataIndex).get(parallelVisual_opacityAccessPath, true); itemOpacity != null && (opacity = itemOpacity); } var existsStyle = data.ensureUniqueItemVisual(dataIndex, 'style'); existsStyle.opacity = opacity; }, params.start, params.end); } }; } }; /* harmony default export */ var parallel_parallelVisual = (parallelVisual); // CONCATENATED MODULE: ./node_modules/echarts/lib/coord/parallel/parallelPreprocessor.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 parallelPreprocessor(option) { createParallelIfNeeded(option); mergeAxisOptionFromParallel(option); } /** * Create a parallel coordinate if not exists. * @inner */ function createParallelIfNeeded(option) { if (option.parallel) { return; } var hasParallelSeries = false; core_util["each"](option.series, function (seriesOpt) { if (seriesOpt && seriesOpt.type === 'parallel') { hasParallelSeries = true; } }); if (hasParallelSeries) { option.parallel = [{}]; } } /** * Merge aixs definition from parallel option (if exists) to axis option. * @inner */ function mergeAxisOptionFromParallel(option) { var axes = normalizeToArray(option.parallelAxis); core_util["each"](axes, function (axisOption) { if (!core_util["isObject"](axisOption)) { return; } var parallelIndex = axisOption.parallelIndex || 0; var parallelOption = normalizeToArray(option.parallel)[parallelIndex]; if (parallelOption && parallelOption.parallelAxisDefault) { core_util["merge"](axisOption, parallelOption.parallelAxisDefault, false); } }); } // CONCATENATED MODULE: ./node_modules/echarts/lib/component/parallel/ParallelView.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 CLICK_THRESHOLD = 5; // > 4 var parallel_ParallelView_ParallelView = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(ParallelView, _super); function ParallelView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = ParallelView.type; return _this; } ParallelView.prototype.render = function (parallelModel, ecModel, api) { this._model = parallelModel; this._api = api; if (!this._handlers) { this._handlers = {}; Object(core_util["each"])(handlers, function (handler, eventName) { api.getZr().on(eventName, this._handlers[eventName] = Object(core_util["bind"])(handler, this)); }, this); } createOrUpdate(this, '_throttledDispatchExpand', parallelModel.get('axisExpandRate'), 'fixRate'); }; ParallelView.prototype.dispose = function (ecModel, api) { clear(this, '_throttledDispatchExpand'); Object(core_util["each"])(this._handlers, function (handler, eventName) { api.getZr().off(eventName, handler); }); this._handlers = null; }; /** * @internal * @param {Object} [opt] If null, cancel the last action triggering for debounce. */ ParallelView.prototype._throttledDispatchExpand = function (opt) { this._dispatchExpand(opt); }; /** * @internal */ ParallelView.prototype._dispatchExpand = function (opt) { opt && this._api.dispatchAction(Object(core_util["extend"])({ type: 'parallelAxisExpand' }, opt)); }; ParallelView.type = 'parallel'; return ParallelView; }(view_Component); var handlers = { mousedown: function (e) { if (checkTrigger(this, 'click')) { this._mouseDownPoint = [e.offsetX, e.offsetY]; } }, mouseup: function (e) { var mouseDownPoint = this._mouseDownPoint; if (checkTrigger(this, 'click') && mouseDownPoint) { var point = [e.offsetX, e.offsetY]; var dist = Math.pow(mouseDownPoint[0] - point[0], 2) + Math.pow(mouseDownPoint[1] - point[1], 2); if (dist > CLICK_THRESHOLD) { return; } var result = this._model.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX, e.offsetY]); result.behavior !== 'none' && this._dispatchExpand({ axisExpandWindow: result.axisExpandWindow }); } this._mouseDownPoint = null; }, mousemove: function (e) { // Should do nothing when brushing. if (this._mouseDownPoint || !checkTrigger(this, 'mousemove')) { return; } var model = this._model; var result = model.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX, e.offsetY]); var behavior = result.behavior; behavior === 'jump' && this._throttledDispatchExpand.debounceNextCall(model.get('axisExpandDebounce')); this._throttledDispatchExpand(behavior === 'none' ? null // Cancel the last trigger, in case that mouse slide out of the area quickly. : { axisExpandWindow: result.axisExpandWindow, // Jumping uses animation, and sliding suppresses animation. animation: behavior === 'jump' ? null : { duration: 0 // Disable animation. } }); } }; function checkTrigger(view, triggerOn) { var model = view._model; return model.get('axisExpandable') && model.get('axisExpandTriggerOn') === triggerOn; } /* harmony default export */ var component_parallel_ParallelView = (parallel_ParallelView_ParallelView); // CONCATENATED MODULE: ./node_modules/echarts/lib/coord/parallel/ParallelModel.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 ParallelModel_ParallelModel = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(ParallelModel, _super); function ParallelModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = ParallelModel.type; return _this; } ParallelModel.prototype.init = function () { _super.prototype.init.apply(this, arguments); this.mergeOption({}); }; ParallelModel.prototype.mergeOption = function (newOption) { var thisOption = this.option; newOption && core_util["merge"](thisOption, newOption, true); this._initDimensions(); }; /** * Whether series or axis is in this coordinate system. */ ParallelModel.prototype.contains = function (model, ecModel) { var parallelIndex = model.get('parallelIndex'); return parallelIndex != null && ecModel.getComponent('parallel', parallelIndex) === this; }; ParallelModel.prototype.setAxisExpand = function (opt) { core_util["each"](['axisExpandable', 'axisExpandCenter', 'axisExpandCount', 'axisExpandWidth', 'axisExpandWindow'], function (name) { if (opt.hasOwnProperty(name)) { // @ts-ignore FIXME: why "never" inferred in this.option[name]? this.option[name] = opt[name]; } }, this); }; ParallelModel.prototype._initDimensions = function () { var dimensions = this.dimensions = []; var parallelAxisIndex = this.parallelAxisIndex = []; var axisModels = core_util["filter"](this.ecModel.queryComponents({ mainType: 'parallelAxis' }), function (axisModel) { // Can not use this.contains here, because // initialization has not been completed yet. return (axisModel.get('parallelIndex') || 0) === this.componentIndex; }, this); core_util["each"](axisModels, function (axisModel) { dimensions.push('dim' + axisModel.get('dim')); parallelAxisIndex.push(axisModel.componentIndex); }); }; ParallelModel.type = 'parallel'; ParallelModel.dependencies = ['parallelAxis']; ParallelModel.layoutMode = 'box'; ParallelModel.defaultOption = { // zlevel: 0, z: 0, left: 80, top: 60, right: 80, bottom: 60, // width: {totalWidth} - left - right, // height: {totalHeight} - top - bottom, layout: 'horizontal', // FIXME // naming? axisExpandable: false, axisExpandCenter: null, axisExpandCount: 0, axisExpandWidth: 50, axisExpandRate: 17, axisExpandDebounce: 50, // [out, in, jumpTarget]. In percentage. If use [null, 0.05], null means full. // Do not doc to user until necessary. axisExpandSlideTriggerArea: [-0.15, 0.05, 0.4], axisExpandTriggerOn: 'click', parallelAxisDefault: null }; return ParallelModel; }(Component); /* harmony default export */ var parallel_ParallelModel = (ParallelModel_ParallelModel); // CONCATENATED MODULE: ./node_modules/echarts/lib/coord/parallel/ParallelAxis.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 ParallelAxis_ParallelAxis = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(ParallelAxis, _super); function ParallelAxis(dim, scale, coordExtent, axisType, axisIndex) { var _this = _super.call(this, dim, scale, coordExtent) || this; _this.type = axisType || 'value'; _this.axisIndex = axisIndex; return _this; } ParallelAxis.prototype.isHorizontal = function () { return this.coordinateSystem.getModel().get('layout') !== 'horizontal'; }; return ParallelAxis; }(coord_Axis); /* harmony default export */ var parallel_ParallelAxis = (ParallelAxis_ParallelAxis); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/helper/sliderMove.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ /** * Calculate slider move result. * Usage: * (1) If both handle0 and handle1 are needed to be moved, set minSpan the same as * maxSpan and the same as `Math.abs(handleEnd[1] - handleEnds[0])`. * (2) If handle0 is forbidden to cross handle1, set minSpan as `0`. * * @param delta Move length. * @param handleEnds handleEnds[0] can be bigger then handleEnds[1]. * handleEnds will be modified in this method. * @param extent handleEnds is restricted by extent. * extent[0] should less or equals than extent[1]. * @param handleIndex Can be 'all', means that both move the two handleEnds. * @param minSpan The range of dataZoom can not be smaller than that. * If not set, handle0 and cross handle1. If set as a non-negative * number (including `0`), handles will push each other when reaching * the minSpan. * @param maxSpan The range of dataZoom can not be larger than that. * @return The input handleEnds. */ function sliderMove(delta, handleEnds, extent, handleIndex, minSpan, maxSpan) { delta = delta || 0; var extentSpan = extent[1] - extent[0]; // Notice maxSpan and minSpan can be null/undefined. if (minSpan != null) { minSpan = restrict(minSpan, [0, extentSpan]); } if (maxSpan != null) { maxSpan = Math.max(maxSpan, minSpan != null ? minSpan : 0); } if (handleIndex === 'all') { var handleSpan = Math.abs(handleEnds[1] - handleEnds[0]); handleSpan = restrict(handleSpan, [0, extentSpan]); minSpan = maxSpan = restrict(handleSpan, [minSpan, maxSpan]); handleIndex = 0; } handleEnds[0] = restrict(handleEnds[0], extent); handleEnds[1] = restrict(handleEnds[1], extent); var originalDistSign = getSpanSign(handleEnds, handleIndex); handleEnds[handleIndex] += delta; // Restrict in extent. var extentMinSpan = minSpan || 0; var realExtent = extent.slice(); originalDistSign.sign < 0 ? realExtent[0] += extentMinSpan : realExtent[1] -= extentMinSpan; handleEnds[handleIndex] = restrict(handleEnds[handleIndex], realExtent); // Expand span. var currDistSign; currDistSign = getSpanSign(handleEnds, handleIndex); if (minSpan != null && (currDistSign.sign !== originalDistSign.sign || currDistSign.span < minSpan)) { // If minSpan exists, 'cross' is forbidden. handleEnds[1 - handleIndex] = handleEnds[handleIndex] + originalDistSign.sign * minSpan; } // Shrink span. currDistSign = getSpanSign(handleEnds, handleIndex); if (maxSpan != null && currDistSign.span > maxSpan) { handleEnds[1 - handleIndex] = handleEnds[handleIndex] + currDistSign.sign * maxSpan; } return handleEnds; } function getSpanSign(handleEnds, handleIndex) { var dist = handleEnds[handleIndex] - handleEnds[1 - handleIndex]; // If `handleEnds[0] === handleEnds[1]`, always believe that handleEnd[0] // is at left of handleEnds[1] for non-cross case. return { span: Math.abs(dist), sign: dist > 0 ? -1 : dist < 0 ? 1 : handleIndex ? -1 : 1 }; } function restrict(value, extend) { return Math.min(extend[1] != null ? extend[1] : Infinity, Math.max(extend[0] != null ? extend[0] : -Infinity, value)); } // CONCATENATED MODULE: ./node_modules/echarts/lib/coord/parallel/Parallel.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ /** * Parallel Coordinates * */ var Parallel_each = core_util["each"]; var Parallel_mathMin = Math.min; var Parallel_mathMax = Math.max; var Parallel_mathFloor = Math.floor; var Parallel_mathCeil = Math.ceil; var Parallel_round = round; var Parallel_PI = Math.PI; var Parallel_Parallel = /** @class */function () { function Parallel(parallelModel, ecModel, api) { this.type = 'parallel'; /** * key: dimension */ this._axesMap = core_util["createHashMap"](); /** * key: dimension * value: {position: [], rotation, } */ this._axesLayout = {}; this.dimensions = parallelModel.dimensions; this._model = parallelModel; this._init(parallelModel, ecModel, api); } Parallel.prototype._init = function (parallelModel, ecModel, api) { var dimensions = parallelModel.dimensions; var parallelAxisIndex = parallelModel.parallelAxisIndex; Parallel_each(dimensions, function (dim, idx) { var axisIndex = parallelAxisIndex[idx]; var axisModel = ecModel.getComponent('parallelAxis', axisIndex); var axis = this._axesMap.set(dim, new parallel_ParallelAxis(dim, createScaleByModel(axisModel), [0, 0], axisModel.get('type'), axisIndex)); var isCategory = axis.type === 'category'; axis.onBand = isCategory && axisModel.get('boundaryGap'); axis.inverse = axisModel.get('inverse'); // Injection axisModel.axis = axis; axis.model = axisModel; axis.coordinateSystem = axisModel.coordinateSystem = this; }, this); }; /** * Update axis scale after data processed */ Parallel.prototype.update = function (ecModel, api) { this._updateAxesFromSeries(this._model, ecModel); }; Parallel.prototype.containPoint = function (point) { var layoutInfo = this._makeLayoutInfo(); var axisBase = layoutInfo.axisBase; var layoutBase = layoutInfo.layoutBase; var pixelDimIndex = layoutInfo.pixelDimIndex; var pAxis = point[1 - pixelDimIndex]; var pLayout = point[pixelDimIndex]; return pAxis >= axisBase && pAxis <= axisBase + layoutInfo.axisLength && pLayout >= layoutBase && pLayout <= layoutBase + layoutInfo.layoutLength; }; Parallel.prototype.getModel = function () { return this._model; }; /** * Update properties from series */ Parallel.prototype._updateAxesFromSeries = function (parallelModel, ecModel) { ecModel.eachSeries(function (seriesModel) { if (!parallelModel.contains(seriesModel, ecModel)) { return; } var data = seriesModel.getData(); Parallel_each(this.dimensions, function (dim) { var axis = this._axesMap.get(dim); axis.scale.unionExtentFromData(data, data.mapDimension(dim)); niceScaleExtent(axis.scale, axis.model); }, this); }, this); }; /** * Resize the parallel coordinate system. */ Parallel.prototype.resize = function (parallelModel, api) { this._rect = getLayoutRect(parallelModel.getBoxLayoutParams(), { width: api.getWidth(), height: api.getHeight() }); this._layoutAxes(); }; Parallel.prototype.getRect = function () { return this._rect; }; Parallel.prototype._makeLayoutInfo = function () { var parallelModel = this._model; var rect = this._rect; var xy = ['x', 'y']; var wh = ['width', 'height']; var layout = parallelModel.get('layout'); var pixelDimIndex = layout === 'horizontal' ? 0 : 1; var layoutLength = rect[wh[pixelDimIndex]]; var layoutExtent = [0, layoutLength]; var axisCount = this.dimensions.length; var axisExpandWidth = Parallel_restrict(parallelModel.get('axisExpandWidth'), layoutExtent); var axisExpandCount = Parallel_restrict(parallelModel.get('axisExpandCount') || 0, [0, axisCount]); var axisExpandable = parallelModel.get('axisExpandable') && axisCount > 3 && axisCount > axisExpandCount && axisExpandCount > 1 && axisExpandWidth > 0 && layoutLength > 0; // `axisExpandWindow` is According to the coordinates of [0, axisExpandLength], // for sake of consider the case that axisCollapseWidth is 0 (when screen is narrow), // where collapsed axes should be overlapped. var axisExpandWindow = parallelModel.get('axisExpandWindow'); var winSize; if (!axisExpandWindow) { winSize = Parallel_restrict(axisExpandWidth * (axisExpandCount - 1), layoutExtent); var axisExpandCenter = parallelModel.get('axisExpandCenter') || Parallel_mathFloor(axisCount / 2); axisExpandWindow = [axisExpandWidth * axisExpandCenter - winSize / 2]; axisExpandWindow[1] = axisExpandWindow[0] + winSize; } else { winSize = Parallel_restrict(axisExpandWindow[1] - axisExpandWindow[0], layoutExtent); axisExpandWindow[1] = axisExpandWindow[0] + winSize; } var axisCollapseWidth = (layoutLength - winSize) / (axisCount - axisExpandCount); // Avoid axisCollapseWidth is too small. axisCollapseWidth < 3 && (axisCollapseWidth = 0); // Find the first and last indices > ewin[0] and < ewin[1]. var winInnerIndices = [Parallel_mathFloor(Parallel_round(axisExpandWindow[0] / axisExpandWidth, 1)) + 1, Parallel_mathCeil(Parallel_round(axisExpandWindow[1] / axisExpandWidth, 1)) - 1]; // Pos in ec coordinates. var axisExpandWindow0Pos = axisCollapseWidth / axisExpandWidth * axisExpandWindow[0]; return { layout: layout, pixelDimIndex: pixelDimIndex, layoutBase: rect[xy[pixelDimIndex]], layoutLength: layoutLength, axisBase: rect[xy[1 - pixelDimIndex]], axisLength: rect[wh[1 - pixelDimIndex]], axisExpandable: axisExpandable, axisExpandWidth: axisExpandWidth, axisCollapseWidth: axisCollapseWidth, axisExpandWindow: axisExpandWindow, axisCount: axisCount, winInnerIndices: winInnerIndices, axisExpandWindow0Pos: axisExpandWindow0Pos }; }; Parallel.prototype._layoutAxes = function () { var rect = this._rect; var axes = this._axesMap; var dimensions = this.dimensions; var layoutInfo = this._makeLayoutInfo(); var layout = layoutInfo.layout; axes.each(function (axis) { var axisExtent = [0, layoutInfo.axisLength]; var idx = axis.inverse ? 1 : 0; axis.setExtent(axisExtent[idx], axisExtent[1 - idx]); }); Parallel_each(dimensions, function (dim, idx) { var posInfo = (layoutInfo.axisExpandable ? layoutAxisWithExpand : layoutAxisWithoutExpand)(idx, layoutInfo); var positionTable = { horizontal: { x: posInfo.position, y: layoutInfo.axisLength }, vertical: { x: 0, y: posInfo.position } }; var rotationTable = { horizontal: Parallel_PI / 2, vertical: 0 }; var position = [positionTable[layout].x + rect.x, positionTable[layout].y + rect.y]; var rotation = rotationTable[layout]; var transform = matrix_create(); matrix_rotate(transform, transform, rotation); matrix_translate(transform, transform, position); // TODO // tick layout info // TODO // update dimensions info based on axis order. this._axesLayout[dim] = { position: position, rotation: rotation, transform: transform, axisNameAvailableWidth: posInfo.axisNameAvailableWidth, axisLabelShow: posInfo.axisLabelShow, nameTruncateMaxWidth: posInfo.nameTruncateMaxWidth, tickDirection: 1, labelDirection: 1 }; }, this); }; /** * Get axis by dim. */ Parallel.prototype.getAxis = function (dim) { return this._axesMap.get(dim); }; /** * Convert a dim value of a single item of series data to Point. */ Parallel.prototype.dataToPoint = function (value, dim) { return this.axisCoordToPoint(this._axesMap.get(dim).dataToCoord(value), dim); }; /** * Travel data for one time, get activeState of each data item. * @param start the start dataIndex that travel from. * @param end the next dataIndex of the last dataIndex will be travel. */ Parallel.prototype.eachActiveState = function (data, callback, start, end) { start == null && (start = 0); end == null && (end = data.count()); var axesMap = this._axesMap; var dimensions = this.dimensions; var dataDimensions = []; var axisModels = []; core_util["each"](dimensions, function (axisDim) { dataDimensions.push(data.mapDimension(axisDim)); axisModels.push(axesMap.get(axisDim).model); }); var hasActiveSet = this.hasAxisBrushed(); for (var dataIndex = start; dataIndex < end; dataIndex++) { var activeState = void 0; if (!hasActiveSet) { activeState = 'normal'; } else { activeState = 'active'; var values = data.getValues(dataDimensions, dataIndex); for (var j = 0, lenj = dimensions.length; j < lenj; j++) { var state = axisModels[j].getActiveState(values[j]); if (state === 'inactive') { activeState = 'inactive'; break; } } } callback(activeState, dataIndex); } }; /** * Whether has any activeSet. */ Parallel.prototype.hasAxisBrushed = function () { var dimensions = this.dimensions; var axesMap = this._axesMap; var hasActiveSet = false; for (var j = 0, lenj = dimensions.length; j < lenj; j++) { if (axesMap.get(dimensions[j]).model.getActiveState() !== 'normal') { hasActiveSet = true; } } return hasActiveSet; }; /** * Convert coords of each axis to Point. * Return point. For example: [10, 20] */ Parallel.prototype.axisCoordToPoint = function (coord, dim) { var axisLayout = this._axesLayout[dim]; return graphic_applyTransform([coord, 0], axisLayout.transform); }; /** * Get axis layout. */ Parallel.prototype.getAxisLayout = function (dim) { return core_util["clone"](this._axesLayout[dim]); }; /** * @return {Object} {axisExpandWindow, delta, behavior: 'jump' | 'slide' | 'none'}. */ Parallel.prototype.getSlidedAxisExpandWindow = function (point) { var layoutInfo = this._makeLayoutInfo(); var pixelDimIndex = layoutInfo.pixelDimIndex; var axisExpandWindow = layoutInfo.axisExpandWindow.slice(); var winSize = axisExpandWindow[1] - axisExpandWindow[0]; var extent = [0, layoutInfo.axisExpandWidth * (layoutInfo.axisCount - 1)]; // Out of the area of coordinate system. if (!this.containPoint(point)) { return { behavior: 'none', axisExpandWindow: axisExpandWindow }; } // Convert the point from global to expand coordinates. var pointCoord = point[pixelDimIndex] - layoutInfo.layoutBase - layoutInfo.axisExpandWindow0Pos; // For dragging operation convenience, the window should not be // slided when mouse is the center area of the window. var delta; var behavior = 'slide'; var axisCollapseWidth = layoutInfo.axisCollapseWidth; var triggerArea = this._model.get('axisExpandSlideTriggerArea'); // But consider touch device, jump is necessary. var useJump = triggerArea[0] != null; if (axisCollapseWidth) { if (useJump && axisCollapseWidth && pointCoord < winSize * triggerArea[0]) { behavior = 'jump'; delta = pointCoord - winSize * triggerArea[2]; } else if (useJump && axisCollapseWidth && pointCoord > winSize * (1 - triggerArea[0])) { behavior = 'jump'; delta = pointCoord - winSize * (1 - triggerArea[2]); } else { (delta = pointCoord - winSize * triggerArea[1]) >= 0 && (delta = pointCoord - winSize * (1 - triggerArea[1])) <= 0 && (delta = 0); } delta *= layoutInfo.axisExpandWidth / axisCollapseWidth; delta ? sliderMove(delta, axisExpandWindow, extent, 'all') // Avoid nonsense triger on mousemove. : behavior = 'none'; } // When screen is too narrow, make it visible and slidable, although it is hard to interact. else { var winSize2 = axisExpandWindow[1] - axisExpandWindow[0]; var pos = extent[1] * pointCoord / winSize2; axisExpandWindow = [Parallel_mathMax(0, pos - winSize2 / 2)]; axisExpandWindow[1] = Parallel_mathMin(extent[1], axisExpandWindow[0] + winSize2); axisExpandWindow[0] = axisExpandWindow[1] - winSize2; } return { axisExpandWindow: axisExpandWindow, behavior: behavior }; }; return Parallel; }(); function Parallel_restrict(len, extent) { return Parallel_mathMin(Parallel_mathMax(len, extent[0]), extent[1]); } function layoutAxisWithoutExpand(axisIndex, layoutInfo) { var step = layoutInfo.layoutLength / (layoutInfo.axisCount - 1); return { position: step * axisIndex, axisNameAvailableWidth: step, axisLabelShow: true }; } function layoutAxisWithExpand(axisIndex, layoutInfo) { var layoutLength = layoutInfo.layoutLength; var axisExpandWidth = layoutInfo.axisExpandWidth; var axisCount = layoutInfo.axisCount; var axisCollapseWidth = layoutInfo.axisCollapseWidth; var winInnerIndices = layoutInfo.winInnerIndices; var position; var axisNameAvailableWidth = axisCollapseWidth; var axisLabelShow = false; var nameTruncateMaxWidth; if (axisIndex < winInnerIndices[0]) { position = axisIndex * axisCollapseWidth; nameTruncateMaxWidth = axisCollapseWidth; } else if (axisIndex <= winInnerIndices[1]) { position = layoutInfo.axisExpandWindow0Pos + axisIndex * axisExpandWidth - layoutInfo.axisExpandWindow[0]; axisNameAvailableWidth = axisExpandWidth; axisLabelShow = true; } else { position = layoutLength - (axisCount - 1 - axisIndex) * axisCollapseWidth; nameTruncateMaxWidth = axisCollapseWidth; } return { position: position, axisNameAvailableWidth: axisNameAvailableWidth, axisLabelShow: axisLabelShow, nameTruncateMaxWidth: nameTruncateMaxWidth }; } /* harmony default export */ var parallel_Parallel = (Parallel_Parallel); // CONCATENATED MODULE: ./node_modules/echarts/lib/coord/parallel/parallelCreator.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ /** * Parallel coordinate system creater. */ function createParallelCoordSys(ecModel, api) { var coordSysList = []; ecModel.eachComponent('parallel', function (parallelModel, idx) { var coordSys = new parallel_Parallel(parallelModel, ecModel, api); coordSys.name = 'parallel_' + idx; coordSys.resize(parallelModel, api); parallelModel.coordinateSystem = coordSys; coordSys.model = parallelModel; coordSysList.push(coordSys); }); // Inject the coordinateSystems into seriesModel ecModel.eachSeries(function (seriesModel) { if (seriesModel.get('coordinateSystem') === 'parallel') { var parallelModel = seriesModel.getReferringComponents('parallel', SINGLE_REFERRING).models[0]; seriesModel.coordinateSystem = parallelModel.coordinateSystem; } }); return coordSysList; } var parallelCoordSysCreator = { create: createParallelCoordSys }; /* harmony default export */ var parallelCreator = (parallelCoordSysCreator); // CONCATENATED MODULE: ./node_modules/echarts/lib/coord/parallel/AxisModel.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 AxisModel_ParallelAxisModel = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(ParallelAxisModel, _super); function ParallelAxisModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = ParallelAxisModel.type; /** * @readOnly */ _this.activeIntervals = []; return _this; } ParallelAxisModel.prototype.getAreaSelectStyle = function () { return makeStyleMapper([['fill', 'color'], ['lineWidth', 'borderWidth'], ['stroke', 'borderColor'], ['width', 'width'], ['opacity', 'opacity'] // Option decal is in `DecalObject` but style.decal is in `PatternObject`. // So do not transfer decal directly. ])(this.getModel('areaSelectStyle')); }; /** * The code of this feature is put on AxisModel but not ParallelAxis, * because axisModel can be alive after echarts updating but instance of * ParallelAxis having been disposed. this._activeInterval should be kept * when action dispatched (i.e. legend click). * * @param intervals `interval.length === 0` means set all active. */ ParallelAxisModel.prototype.setActiveIntervals = function (intervals) { var activeIntervals = this.activeIntervals = core_util["clone"](intervals); // Normalize if (activeIntervals) { for (var i = activeIntervals.length - 1; i >= 0; i--) { asc(activeIntervals[i]); } } }; /** * @param value When only attempting detect whether 'no activeIntervals set', * `value` is not needed to be input. */ ParallelAxisModel.prototype.getActiveState = function (value) { var activeIntervals = this.activeIntervals; if (!activeIntervals.length) { return 'normal'; } if (value == null || isNaN(+value)) { return 'inactive'; } // Simple optimization if (activeIntervals.length === 1) { var interval = activeIntervals[0]; if (interval[0] <= value && value <= interval[1]) { return 'active'; } } else { for (var i = 0, len = activeIntervals.length; i < len; i++) { if (activeIntervals[i][0] <= value && value <= activeIntervals[i][1]) { return 'active'; } } } return 'inactive'; }; return ParallelAxisModel; }(Component); core_util["mixin"](AxisModel_ParallelAxisModel, AxisModelCommonMixin); /* harmony default export */ var parallel_AxisModel = (AxisModel_ParallelAxisModel); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/helper/BrushController.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 BRUSH_PANEL_GLOBAL = true; var BrushController_mathMin = Math.min; var BrushController_mathMax = Math.max; var BrushController_mathPow = Math.pow; var COVER_Z = 10000; var UNSELECT_THRESHOLD = 6; var MIN_RESIZE_LINE_WIDTH = 6; var MUTEX_RESOURCE_KEY = 'globalPan'; var DIRECTION_MAP = { w: [0, 0], e: [0, 1], n: [1, 0], s: [1, 1] }; var CURSOR_MAP = { w: 'ew', e: 'ew', n: 'ns', s: 'ns', ne: 'nesw', sw: 'nesw', nw: 'nwse', se: 'nwse' }; var DEFAULT_BRUSH_OPT = { brushStyle: { lineWidth: 2, stroke: 'rgba(210,219,238,0.3)', fill: '#D2DBEE' }, transformable: true, brushMode: 'single', removeOnClick: false }; var baseUID = 0; /** * params: * areas: Array., coord relates to container group, * If no container specified, to global. * opt { * isEnd: boolean, * removeOnClick: boolean * } */ var BrushController_BrushController = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(BrushController, _super); function BrushController(zr) { var _this = _super.call(this) || this; /** * @internal */ _this._track = []; /** * @internal */ _this._covers = []; _this._handlers = {}; if (false) { assert(zr); } _this._zr = zr; _this.group = new graphic_Group(); _this._uid = 'brushController_' + baseUID++; Object(core_util["each"])(pointerHandlers, function (handler, eventName) { this._handlers[eventName] = Object(core_util["bind"])(handler, this); }, _this); return _this; } /** * If set to `false`, select disabled. */ BrushController.prototype.enableBrush = function (brushOption) { if (false) { assert(this._mounted); } this._brushType && this._doDisableBrush(); brushOption.brushType && this._doEnableBrush(brushOption); return this; }; BrushController.prototype._doEnableBrush = function (brushOption) { var zr = this._zr; // Consider roam, which takes globalPan too. if (!this._enableGlobalPan) { take(zr, MUTEX_RESOURCE_KEY, this._uid); } Object(core_util["each"])(this._handlers, function (handler, eventName) { zr.on(eventName, handler); }); this._brushType = brushOption.brushType; this._brushOption = Object(core_util["merge"])(Object(core_util["clone"])(DEFAULT_BRUSH_OPT), brushOption, true); }; BrushController.prototype._doDisableBrush = function () { var zr = this._zr; release(zr, MUTEX_RESOURCE_KEY, this._uid); Object(core_util["each"])(this._handlers, function (handler, eventName) { zr.off(eventName, handler); }); this._brushType = this._brushOption = null; }; /** * @param panelOpts If not pass, it is global brush. */ BrushController.prototype.setPanels = function (panelOpts) { if (panelOpts && panelOpts.length) { var panels_1 = this._panels = {}; Object(core_util["each"])(panelOpts, function (panelOpts) { panels_1[panelOpts.panelId] = Object(core_util["clone"])(panelOpts); }); } else { this._panels = null; } return this; }; BrushController.prototype.mount = function (opt) { opt = opt || {}; if (false) { this._mounted = true; // should be at first. } this._enableGlobalPan = opt.enableGlobalPan; var thisGroup = this.group; this._zr.add(thisGroup); thisGroup.attr({ x: opt.x || 0, y: opt.y || 0, rotation: opt.rotation || 0, scaleX: opt.scaleX || 1, scaleY: opt.scaleY || 1 }); this._transform = thisGroup.getLocalTransform(); return this; }; // eachCover(cb, context): void { // each(this._covers, cb, context); // } /** * Update covers. * @param coverConfigList * If coverConfigList is null/undefined, all covers removed. */ BrushController.prototype.updateCovers = function (coverConfigList) { if (false) { assert(this._mounted); } coverConfigList = Object(core_util["map"])(coverConfigList, function (coverConfig) { return Object(core_util["merge"])(Object(core_util["clone"])(DEFAULT_BRUSH_OPT), coverConfig, true); }); var tmpIdPrefix = '\0-brush-index-'; var oldCovers = this._covers; var newCovers = this._covers = []; var controller = this; var creatingCover = this._creatingCover; new data_DataDiffer(oldCovers, coverConfigList, oldGetKey, getKey).add(addOrUpdate).update(addOrUpdate).remove(remove).execute(); return this; function getKey(brushOption, index) { return (brushOption.id != null ? brushOption.id : tmpIdPrefix + index) + '-' + brushOption.brushType; } function oldGetKey(cover, index) { return getKey(cover.__brushOption, index); } function addOrUpdate(newIndex, oldIndex) { var newBrushInternal = coverConfigList[newIndex]; // Consider setOption in event listener of brushSelect, // where updating cover when creating should be forbidden. if (oldIndex != null && oldCovers[oldIndex] === creatingCover) { newCovers[newIndex] = oldCovers[oldIndex]; } else { var cover = newCovers[newIndex] = oldIndex != null ? (oldCovers[oldIndex].__brushOption = newBrushInternal, oldCovers[oldIndex]) : endCreating(controller, createCover(controller, newBrushInternal)); updateCoverAfterCreation(controller, cover); } } function remove(oldIndex) { if (oldCovers[oldIndex] !== creatingCover) { controller.group.remove(oldCovers[oldIndex]); } } }; BrushController.prototype.unmount = function () { if (false) { if (!this._mounted) { return; } } this.enableBrush(false); // container may 'removeAll' outside. clearCovers(this); this._zr.remove(this.group); if (false) { this._mounted = false; // should be at last. } return this; }; BrushController.prototype.dispose = function () { this.unmount(); this.off(); }; return BrushController; }(core_Eventful); function createCover(controller, brushOption) { var cover = coverRenderers[brushOption.brushType].createCover(controller, brushOption); cover.__brushOption = brushOption; BrushController_updateZ(cover, brushOption); controller.group.add(cover); return cover; } function endCreating(controller, creatingCover) { var coverRenderer = getCoverRenderer(creatingCover); if (coverRenderer.endCreating) { coverRenderer.endCreating(controller, creatingCover); BrushController_updateZ(creatingCover, creatingCover.__brushOption); } return creatingCover; } function updateCoverShape(controller, cover) { var brushOption = cover.__brushOption; getCoverRenderer(cover).updateCoverShape(controller, cover, brushOption.range, brushOption); } function BrushController_updateZ(cover, brushOption) { var z = brushOption.z; z == null && (z = COVER_Z); cover.traverse(function (el) { el.z = z; el.z2 = z; // Consider in given container. }); } function updateCoverAfterCreation(controller, cover) { getCoverRenderer(cover).updateCommon(controller, cover); updateCoverShape(controller, cover); } function getCoverRenderer(cover) { return coverRenderers[cover.__brushOption.brushType]; } // return target panel or `true` (means global panel) function getPanelByPoint(controller, e, localCursorPoint) { var panels = controller._panels; if (!panels) { return BRUSH_PANEL_GLOBAL; // Global panel } var panel; var transform = controller._transform; Object(core_util["each"])(panels, function (pn) { pn.isTargetByCursor(e, localCursorPoint, transform) && (panel = pn); }); return panel; } // Return a panel or true function getPanelByCover(controller, cover) { var panels = controller._panels; if (!panels) { return BRUSH_PANEL_GLOBAL; // Global panel } var panelId = cover.__brushOption.panelId; // User may give cover without coord sys info, // which is then treated as global panel. return panelId != null ? panels[panelId] : BRUSH_PANEL_GLOBAL; } function clearCovers(controller) { var covers = controller._covers; var originalLength = covers.length; Object(core_util["each"])(covers, function (cover) { controller.group.remove(cover); }, controller); covers.length = 0; return !!originalLength; } function BrushController_trigger(controller, opt) { var areas = Object(core_util["map"])(controller._covers, function (cover) { var brushOption = cover.__brushOption; var range = Object(core_util["clone"])(brushOption.range); return { brushType: brushOption.brushType, panelId: brushOption.panelId, range: range }; }); controller.trigger('brush', { areas: areas, isEnd: !!opt.isEnd, removeOnClick: !!opt.removeOnClick }); } function shouldShowCover(controller) { var track = controller._track; if (!track.length) { return false; } var p2 = track[track.length - 1]; var p1 = track[0]; var dx = p2[0] - p1[0]; var dy = p2[1] - p1[1]; var dist = BrushController_mathPow(dx * dx + dy * dy, 0.5); return dist > UNSELECT_THRESHOLD; } function getTrackEnds(track) { var tail = track.length - 1; tail < 0 && (tail = 0); return [track[0], track[tail]]; } ; function createBaseRectCover(rectRangeConverter, controller, brushOption, edgeNameSequences) { var cover = new graphic_Group(); cover.add(new shape_Rect({ name: 'main', style: makeStyle(brushOption), silent: true, draggable: true, cursor: 'move', drift: Object(core_util["curry"])(driftRect, rectRangeConverter, controller, cover, ['n', 's', 'w', 'e']), ondragend: Object(core_util["curry"])(BrushController_trigger, controller, { isEnd: true }) })); Object(core_util["each"])(edgeNameSequences, function (nameSequence) { cover.add(new shape_Rect({ name: nameSequence.join(''), style: { opacity: 0 }, draggable: true, silent: true, invisible: true, drift: Object(core_util["curry"])(driftRect, rectRangeConverter, controller, cover, nameSequence), ondragend: Object(core_util["curry"])(BrushController_trigger, controller, { isEnd: true }) })); }); return cover; } function updateBaseRect(controller, cover, localRange, brushOption) { var lineWidth = brushOption.brushStyle.lineWidth || 0; var handleSize = BrushController_mathMax(lineWidth, MIN_RESIZE_LINE_WIDTH); var x = localRange[0][0]; var y = localRange[1][0]; var xa = x - lineWidth / 2; var ya = y - lineWidth / 2; var x2 = localRange[0][1]; var y2 = localRange[1][1]; var x2a = x2 - handleSize + lineWidth / 2; var y2a = y2 - handleSize + lineWidth / 2; var width = x2 - x; var height = y2 - y; var widtha = width + lineWidth; var heighta = height + lineWidth; updateRectShape(controller, cover, 'main', x, y, width, height); if (brushOption.transformable) { updateRectShape(controller, cover, 'w', xa, ya, handleSize, heighta); updateRectShape(controller, cover, 'e', x2a, ya, handleSize, heighta); updateRectShape(controller, cover, 'n', xa, ya, widtha, handleSize); updateRectShape(controller, cover, 's', xa, y2a, widtha, handleSize); updateRectShape(controller, cover, 'nw', xa, ya, handleSize, handleSize); updateRectShape(controller, cover, 'ne', x2a, ya, handleSize, handleSize); updateRectShape(controller, cover, 'sw', xa, y2a, handleSize, handleSize); updateRectShape(controller, cover, 'se', x2a, y2a, handleSize, handleSize); } } function updateCommon(controller, cover) { var brushOption = cover.__brushOption; var transformable = brushOption.transformable; var mainEl = cover.childAt(0); mainEl.useStyle(makeStyle(brushOption)); mainEl.attr({ silent: !transformable, cursor: transformable ? 'move' : 'default' }); Object(core_util["each"])([['w'], ['e'], ['n'], ['s'], ['s', 'e'], ['s', 'w'], ['n', 'e'], ['n', 'w']], function (nameSequence) { var el = cover.childOfName(nameSequence.join('')); var globalDir = nameSequence.length === 1 ? getGlobalDirection1(controller, nameSequence[0]) : getGlobalDirection2(controller, nameSequence); el && el.attr({ silent: !transformable, invisible: !transformable, cursor: transformable ? CURSOR_MAP[globalDir] + '-resize' : null }); }); } function updateRectShape(controller, cover, name, x, y, w, h) { var el = cover.childOfName(name); el && el.setShape(pointsToRect(clipByPanel(controller, cover, [[x, y], [x + w, y + h]]))); } function makeStyle(brushOption) { return Object(core_util["defaults"])({ strokeNoScale: true }, brushOption.brushStyle); } function formatRectRange(x, y, x2, y2) { var min = [BrushController_mathMin(x, x2), BrushController_mathMin(y, y2)]; var max = [BrushController_mathMax(x, x2), BrushController_mathMax(y, y2)]; return [[min[0], max[0]], [min[1], max[1]] // y range ]; } function BrushController_getTransform(controller) { return getTransform(controller.group); } function getGlobalDirection1(controller, localDirName) { var map = { w: 'left', e: 'right', n: 'top', s: 'bottom' }; var inverseMap = { left: 'w', right: 'e', top: 'n', bottom: 's' }; var dir = transformDirection(map[localDirName], BrushController_getTransform(controller)); return inverseMap[dir]; } function getGlobalDirection2(controller, localDirNameSeq) { var globalDir = [getGlobalDirection1(controller, localDirNameSeq[0]), getGlobalDirection1(controller, localDirNameSeq[1])]; (globalDir[0] === 'e' || globalDir[0] === 'w') && globalDir.reverse(); return globalDir.join(''); } function driftRect(rectRangeConverter, controller, cover, dirNameSequence, dx, dy) { var brushOption = cover.__brushOption; var rectRange = rectRangeConverter.toRectRange(brushOption.range); var localDelta = toLocalDelta(controller, dx, dy); Object(core_util["each"])(dirNameSequence, function (dirName) { var ind = DIRECTION_MAP[dirName]; rectRange[ind[0]][ind[1]] += localDelta[ind[0]]; }); brushOption.range = rectRangeConverter.fromRectRange(formatRectRange(rectRange[0][0], rectRange[1][0], rectRange[0][1], rectRange[1][1])); updateCoverAfterCreation(controller, cover); BrushController_trigger(controller, { isEnd: false }); } function driftPolygon(controller, cover, dx, dy) { var range = cover.__brushOption.range; var localDelta = toLocalDelta(controller, dx, dy); Object(core_util["each"])(range, function (point) { point[0] += localDelta[0]; point[1] += localDelta[1]; }); updateCoverAfterCreation(controller, cover); BrushController_trigger(controller, { isEnd: false }); } function toLocalDelta(controller, dx, dy) { var thisGroup = controller.group; var localD = thisGroup.transformCoordToLocal(dx, dy); var localZero = thisGroup.transformCoordToLocal(0, 0); return [localD[0] - localZero[0], localD[1] - localZero[1]]; } function clipByPanel(controller, cover, data) { var panel = getPanelByCover(controller, cover); return panel && panel !== BRUSH_PANEL_GLOBAL ? panel.clipPath(data, controller._transform) : Object(core_util["clone"])(data); } function pointsToRect(points) { var xmin = BrushController_mathMin(points[0][0], points[1][0]); var ymin = BrushController_mathMin(points[0][1], points[1][1]); var xmax = BrushController_mathMax(points[0][0], points[1][0]); var ymax = BrushController_mathMax(points[0][1], points[1][1]); return { x: xmin, y: ymin, width: xmax - xmin, height: ymax - ymin }; } function resetCursor(controller, e, localCursorPoint) { if ( // Check active !controller._brushType // resetCursor should be always called when mouse is in zr area, // but not called when mouse is out of zr area to avoid bad influence // if `mousemove`, `mouseup` are triggered from `document` event. || isOutsideZrArea(controller, e.offsetX, e.offsetY)) { return; } var zr = controller._zr; var covers = controller._covers; var currPanel = getPanelByPoint(controller, e, localCursorPoint); // Check whether in covers. if (!controller._dragging) { for (var i = 0; i < covers.length; i++) { var brushOption = covers[i].__brushOption; if (currPanel && (currPanel === BRUSH_PANEL_GLOBAL || brushOption.panelId === currPanel.panelId) && coverRenderers[brushOption.brushType].contain(covers[i], localCursorPoint[0], localCursorPoint[1])) { // Use cursor style set on cover. return; } } } currPanel && zr.setCursorStyle('crosshair'); } function preventDefault(e) { var rawE = e.event; rawE.preventDefault && rawE.preventDefault(); } function mainShapeContain(cover, x, y) { return cover.childOfName('main').contain(x, y); } function updateCoverByMouse(controller, e, localCursorPoint, isEnd) { var creatingCover = controller._creatingCover; var panel = controller._creatingPanel; var thisBrushOption = controller._brushOption; var eventParams; controller._track.push(localCursorPoint.slice()); if (shouldShowCover(controller) || creatingCover) { if (panel && !creatingCover) { thisBrushOption.brushMode === 'single' && clearCovers(controller); var brushOption = Object(core_util["clone"])(thisBrushOption); brushOption.brushType = determineBrushType(brushOption.brushType, panel); brushOption.panelId = panel === BRUSH_PANEL_GLOBAL ? null : panel.panelId; creatingCover = controller._creatingCover = createCover(controller, brushOption); controller._covers.push(creatingCover); } if (creatingCover) { var coverRenderer = coverRenderers[determineBrushType(controller._brushType, panel)]; var coverBrushOption = creatingCover.__brushOption; coverBrushOption.range = coverRenderer.getCreatingRange(clipByPanel(controller, creatingCover, controller._track)); if (isEnd) { endCreating(controller, creatingCover); coverRenderer.updateCommon(controller, creatingCover); } updateCoverShape(controller, creatingCover); eventParams = { isEnd: isEnd }; } } else if (isEnd && thisBrushOption.brushMode === 'single' && thisBrushOption.removeOnClick) { // Help user to remove covers easily, only by a tiny drag, in 'single' mode. // But a single click do not clear covers, because user may have casual // clicks (for example, click on other component and do not expect covers // disappear). // Only some cover removed, trigger action, but not every click trigger action. if (getPanelByPoint(controller, e, localCursorPoint) && clearCovers(controller)) { eventParams = { isEnd: isEnd, removeOnClick: true }; } } return eventParams; } function determineBrushType(brushType, panel) { if (brushType === 'auto') { if (false) { assert(panel && panel.defaultBrushType, 'MUST have defaultBrushType when brushType is "atuo"'); } return panel.defaultBrushType; } return brushType; } var pointerHandlers = { mousedown: function (e) { if (this._dragging) { // In case some browser do not support globalOut, // and release mouse out side the browser. handleDragEnd(this, e); } else if (!e.target || !e.target.draggable) { preventDefault(e); var localCursorPoint = this.group.transformCoordToLocal(e.offsetX, e.offsetY); this._creatingCover = null; var panel = this._creatingPanel = getPanelByPoint(this, e, localCursorPoint); if (panel) { this._dragging = true; this._track = [localCursorPoint.slice()]; } } }, mousemove: function (e) { var x = e.offsetX; var y = e.offsetY; var localCursorPoint = this.group.transformCoordToLocal(x, y); resetCursor(this, e, localCursorPoint); if (this._dragging) { preventDefault(e); var eventParams = updateCoverByMouse(this, e, localCursorPoint, false); eventParams && BrushController_trigger(this, eventParams); } }, mouseup: function (e) { handleDragEnd(this, e); } }; function handleDragEnd(controller, e) { if (controller._dragging) { preventDefault(e); var x = e.offsetX; var y = e.offsetY; var localCursorPoint = controller.group.transformCoordToLocal(x, y); var eventParams = updateCoverByMouse(controller, e, localCursorPoint, true); controller._dragging = false; controller._track = []; controller._creatingCover = null; // trigger event should be at final, after procedure will be nested. eventParams && BrushController_trigger(controller, eventParams); } } function isOutsideZrArea(controller, x, y) { var zr = controller._zr; return x < 0 || x > zr.getWidth() || y < 0 || y > zr.getHeight(); } /** * key: brushType */ var coverRenderers = { lineX: getLineRenderer(0), lineY: getLineRenderer(1), rect: { createCover: function (controller, brushOption) { function returnInput(range) { return range; } return createBaseRectCover({ toRectRange: returnInput, fromRectRange: returnInput }, controller, brushOption, [['w'], ['e'], ['n'], ['s'], ['s', 'e'], ['s', 'w'], ['n', 'e'], ['n', 'w']]); }, getCreatingRange: function (localTrack) { var ends = getTrackEnds(localTrack); return formatRectRange(ends[1][0], ends[1][1], ends[0][0], ends[0][1]); }, updateCoverShape: function (controller, cover, localRange, brushOption) { updateBaseRect(controller, cover, localRange, brushOption); }, updateCommon: updateCommon, contain: mainShapeContain }, polygon: { createCover: function (controller, brushOption) { var cover = new graphic_Group(); // Do not use graphic.Polygon because graphic.Polyline do not close the // border of the shape when drawing, which is a better experience for user. cover.add(new shape_Polyline({ name: 'main', style: makeStyle(brushOption), silent: true })); return cover; }, getCreatingRange: function (localTrack) { return localTrack; }, endCreating: function (controller, cover) { cover.remove(cover.childAt(0)); // Use graphic.Polygon close the shape. cover.add(new shape_Polygon({ name: 'main', draggable: true, drift: Object(core_util["curry"])(driftPolygon, controller, cover), ondragend: Object(core_util["curry"])(BrushController_trigger, controller, { isEnd: true }) })); }, updateCoverShape: function (controller, cover, localRange, brushOption) { cover.childAt(0).setShape({ points: clipByPanel(controller, cover, localRange) }); }, updateCommon: updateCommon, contain: mainShapeContain } }; function getLineRenderer(xyIndex) { return { createCover: function (controller, brushOption) { return createBaseRectCover({ toRectRange: function (range) { var rectRange = [range, [0, 100]]; xyIndex && rectRange.reverse(); return rectRange; }, fromRectRange: function (rectRange) { return rectRange[xyIndex]; } }, controller, brushOption, [[['w'], ['e']], [['n'], ['s']]][xyIndex]); }, getCreatingRange: function (localTrack) { var ends = getTrackEnds(localTrack); var min = BrushController_mathMin(ends[0][xyIndex], ends[1][xyIndex]); var max = BrushController_mathMax(ends[0][xyIndex], ends[1][xyIndex]); return [min, max]; }, updateCoverShape: function (controller, cover, localRange, brushOption) { var otherExtent; // If brushWidth not specified, fit the panel. var panel = getPanelByCover(controller, cover); if (panel !== BRUSH_PANEL_GLOBAL && panel.getLinearBrushOtherExtent) { otherExtent = panel.getLinearBrushOtherExtent(xyIndex); } else { var zr = controller._zr; otherExtent = [0, [zr.getWidth(), zr.getHeight()][1 - xyIndex]]; } var rectRange = [localRange, otherExtent]; xyIndex && rectRange.reverse(); updateBaseRect(controller, cover, rectRange, brushOption); }, updateCommon: updateCommon, contain: mainShapeContain }; } /* harmony default export */ var helper_BrushController = (BrushController_BrushController); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/helper/brushHelper.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 makeRectPanelClipPath(rect) { rect = normalizeRect(rect); return function (localPoints) { return clipPointsByRect(localPoints, rect); }; } function makeLinearBrushOtherExtent(rect, specifiedXYIndex) { rect = normalizeRect(rect); return function (xyIndex) { var idx = specifiedXYIndex != null ? specifiedXYIndex : xyIndex; var brushWidth = idx ? rect.width : rect.height; var base = idx ? rect.x : rect.y; return [base, base + (brushWidth || 0)]; }; } function makeRectIsTargetByCursor(rect, api, targetModel) { var boundingRect = normalizeRect(rect); return function (e, localCursorPoint) { return boundingRect.contain(localCursorPoint[0], localCursorPoint[1]) && !onIrrelevantElement(e, api, targetModel); }; } // Consider width/height is negative. function normalizeRect(rect) { return core_BoundingRect.create(rect); } // CONCATENATED MODULE: ./node_modules/echarts/lib/component/axis/ParallelAxisView.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 elementList = ['axisLine', 'axisTickLabel', 'axisName']; var ParallelAxisView_ParallelAxisView = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(ParallelAxisView, _super); function ParallelAxisView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = ParallelAxisView.type; return _this; } ParallelAxisView.prototype.init = function (ecModel, api) { _super.prototype.init.apply(this, arguments); (this._brushController = new helper_BrushController(api.getZr())).on('brush', core_util["bind"](this._onBrush, this)); }; ParallelAxisView.prototype.render = function (axisModel, ecModel, api, payload) { if (fromAxisAreaSelect(axisModel, ecModel, payload)) { return; } this.axisModel = axisModel; this.api = api; this.group.removeAll(); var oldAxisGroup = this._axisGroup; this._axisGroup = new graphic_Group(); this.group.add(this._axisGroup); if (!axisModel.get('show')) { return; } var coordSysModel = getCoordSysModel(axisModel, ecModel); var coordSys = coordSysModel.coordinateSystem; var areaSelectStyle = axisModel.getAreaSelectStyle(); var areaWidth = areaSelectStyle.width; var dim = axisModel.axis.dim; var axisLayout = coordSys.getAxisLayout(dim); var builderOpt = core_util["extend"]({ strokeContainThreshold: areaWidth }, axisLayout); var axisBuilder = new axis_AxisBuilder(axisModel, builderOpt); core_util["each"](elementList, axisBuilder.add, axisBuilder); this._axisGroup.add(axisBuilder.getGroup()); this._refreshBrushController(builderOpt, areaSelectStyle, axisModel, coordSysModel, areaWidth, api); groupTransition(oldAxisGroup, this._axisGroup, axisModel); }; // /** // * @override // */ // updateVisual(axisModel, ecModel, api, payload) { // this._brushController && this._brushController // .updateCovers(getCoverInfoList(axisModel)); // } ParallelAxisView.prototype._refreshBrushController = function (builderOpt, areaSelectStyle, axisModel, coordSysModel, areaWidth, api) { // After filtering, axis may change, select area needs to be update. var extent = axisModel.axis.getExtent(); var extentLen = extent[1] - extent[0]; var extra = Math.min(30, Math.abs(extentLen) * 0.1); // Arbitrary value. // width/height might be negative, which will be // normalized in BoundingRect. var rect = core_BoundingRect.create({ x: extent[0], y: -areaWidth / 2, width: extentLen, height: areaWidth }); rect.x -= extra; rect.width += 2 * extra; this._brushController.mount({ enableGlobalPan: true, rotation: builderOpt.rotation, x: builderOpt.position[0], y: builderOpt.position[1] }).setPanels([{ panelId: 'pl', clipPath: makeRectPanelClipPath(rect), isTargetByCursor: makeRectIsTargetByCursor(rect, api, coordSysModel), getLinearBrushOtherExtent: makeLinearBrushOtherExtent(rect, 0) }]).enableBrush({ brushType: 'lineX', brushStyle: areaSelectStyle, removeOnClick: true }).updateCovers(getCoverInfoList(axisModel)); }; ParallelAxisView.prototype._onBrush = function (eventParam) { var coverInfoList = eventParam.areas; // Do not cache these object, because the mey be changed. var axisModel = this.axisModel; var axis = axisModel.axis; var intervals = core_util["map"](coverInfoList, function (coverInfo) { return [axis.coordToData(coverInfo.range[0], true), axis.coordToData(coverInfo.range[1], true)]; }); // If realtime is true, action is not dispatched on drag end, because // the drag end emits the same params with the last drag move event, // and may have some delay when using touch pad. if (!axisModel.option.realtime === eventParam.isEnd || eventParam.removeOnClick) { // jshint ignore:line this.api.dispatchAction({ type: 'axisAreaSelect', parallelAxisId: axisModel.id, intervals: intervals }); } }; ParallelAxisView.prototype.dispose = function () { this._brushController.dispose(); }; ParallelAxisView.type = 'parallelAxis'; return ParallelAxisView; }(view_Component); function fromAxisAreaSelect(axisModel, ecModel, payload) { return payload && payload.type === 'axisAreaSelect' && ecModel.findComponents({ mainType: 'parallelAxis', query: payload })[0] === axisModel; } function getCoverInfoList(axisModel) { var axis = axisModel.axis; return core_util["map"](axisModel.activeIntervals, function (interval) { return { brushType: 'lineX', panelId: 'pl', range: [axis.dataToCoord(interval[0], true), axis.dataToCoord(interval[1], true)] }; }); } function getCoordSysModel(axisModel, ecModel) { return ecModel.getComponent('parallel', axisModel.get('parallelIndex')); } /* harmony default export */ var axis_ParallelAxisView = (ParallelAxisView_ParallelAxisView); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/axis/parallelAxisAction.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 parallelAxisAction_actionInfo = { type: 'axisAreaSelect', event: 'axisAreaSelected' // update: 'updateVisual' }; function installParallelActions(registers) { registers.registerAction(parallelAxisAction_actionInfo, function (payload, ecModel) { ecModel.eachComponent({ mainType: 'parallelAxis', query: payload }, function (parallelAxisModel) { parallelAxisModel.axis.model.setActiveIntervals(payload.intervals); }); }); /** * @payload */ registers.registerAction('parallelAxisExpand', function (payload, ecModel) { ecModel.eachComponent({ mainType: 'parallel', query: payload }, function (parallelModel) { parallelModel.setAxisExpand(payload); }); }); } // CONCATENATED MODULE: ./node_modules/echarts/lib/component/parallel/install.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 defaultAxisOption = { type: 'value', areaSelectStyle: { width: 20, borderWidth: 1, borderColor: 'rgba(160,197,232)', color: 'rgba(160,197,232)', opacity: 0.3 }, realtime: true, z: 10 }; function parallel_install_install(registers) { registers.registerComponentView(component_parallel_ParallelView); registers.registerComponentModel(parallel_ParallelModel); registers.registerCoordinateSystem('parallel', parallelCreator); registers.registerPreprocessor(parallelPreprocessor); registers.registerComponentModel(parallel_AxisModel); registers.registerComponentView(axis_ParallelAxisView); axisModelCreator(registers, 'parallel', parallel_AxisModel, defaultAxisOption); installParallelActions(registers); } // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/parallel/install.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 chart_parallel_install_install(registers) { use(parallel_install_install); registers.registerChartView(parallel_ParallelView); registers.registerSeriesModel(ParallelSeries); registers.registerVisual(registers.PRIORITY.VISUAL.BRUSH, parallel_parallelVisual); } // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/sankey/SankeyView.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 SankeyPathShape = /** @class */function () { function SankeyPathShape() { this.x1 = 0; this.y1 = 0; this.x2 = 0; this.y2 = 0; this.cpx1 = 0; this.cpy1 = 0; this.cpx2 = 0; this.cpy2 = 0; this.extent = 0; } return SankeyPathShape; }(); var SankeyView_SankeyPath = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(SankeyPath, _super); function SankeyPath(opts) { return _super.call(this, opts) || this; } SankeyPath.prototype.getDefaultShape = function () { return new SankeyPathShape(); }; SankeyPath.prototype.buildPath = function (ctx, shape) { var extent = shape.extent; ctx.moveTo(shape.x1, shape.y1); ctx.bezierCurveTo(shape.cpx1, shape.cpy1, shape.cpx2, shape.cpy2, shape.x2, shape.y2); if (shape.orient === 'vertical') { ctx.lineTo(shape.x2 + extent, shape.y2); ctx.bezierCurveTo(shape.cpx2 + extent, shape.cpy2, shape.cpx1 + extent, shape.cpy1, shape.x1 + extent, shape.y1); } else { ctx.lineTo(shape.x2, shape.y2 + extent); ctx.bezierCurveTo(shape.cpx2, shape.cpy2 + extent, shape.cpx1, shape.cpy1 + extent, shape.x1, shape.y1 + extent); } ctx.closePath(); }; SankeyPath.prototype.highlight = function () { enterEmphasis(this); }; SankeyPath.prototype.downplay = function () { leaveEmphasis(this); }; return SankeyPath; }(graphic_Path); var SankeyView_SankeyView = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(SankeyView, _super); function SankeyView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = SankeyView.type; _this._focusAdjacencyDisabled = false; return _this; } SankeyView.prototype.render = function (seriesModel, ecModel, api) { var sankeyView = this; var graph = seriesModel.getGraph(); var group = this.group; var layoutInfo = seriesModel.layoutInfo; // view width var width = layoutInfo.width; // view height var height = layoutInfo.height; var nodeData = seriesModel.getData(); var edgeData = seriesModel.getData('edge'); var orient = seriesModel.get('orient'); this._model = seriesModel; group.removeAll(); group.x = layoutInfo.x; group.y = layoutInfo.y; // generate a bezire Curve for each edge graph.eachEdge(function (edge) { var curve = new SankeyView_SankeyPath(); var ecData = getECData(curve); ecData.dataIndex = edge.dataIndex; ecData.seriesIndex = seriesModel.seriesIndex; ecData.dataType = 'edge'; var edgeModel = edge.getModel(); var lineStyleModel = edgeModel.getModel('lineStyle'); var curvature = lineStyleModel.get('curveness'); var n1Layout = edge.node1.getLayout(); var node1Model = edge.node1.getModel(); var dragX1 = node1Model.get('localX'); var dragY1 = node1Model.get('localY'); var n2Layout = edge.node2.getLayout(); var node2Model = edge.node2.getModel(); var dragX2 = node2Model.get('localX'); var dragY2 = node2Model.get('localY'); var edgeLayout = edge.getLayout(); var x1; var y1; var x2; var y2; var cpx1; var cpy1; var cpx2; var cpy2; curve.shape.extent = Math.max(1, edgeLayout.dy); curve.shape.orient = orient; if (orient === 'vertical') { x1 = (dragX1 != null ? dragX1 * width : n1Layout.x) + edgeLayout.sy; y1 = (dragY1 != null ? dragY1 * height : n1Layout.y) + n1Layout.dy; x2 = (dragX2 != null ? dragX2 * width : n2Layout.x) + edgeLayout.ty; y2 = dragY2 != null ? dragY2 * height : n2Layout.y; cpx1 = x1; cpy1 = y1 * (1 - curvature) + y2 * curvature; cpx2 = x2; cpy2 = y1 * curvature + y2 * (1 - curvature); } else { x1 = (dragX1 != null ? dragX1 * width : n1Layout.x) + n1Layout.dx; y1 = (dragY1 != null ? dragY1 * height : n1Layout.y) + edgeLayout.sy; x2 = dragX2 != null ? dragX2 * width : n2Layout.x; y2 = (dragY2 != null ? dragY2 * height : n2Layout.y) + edgeLayout.ty; cpx1 = x1 * (1 - curvature) + x2 * curvature; cpy1 = y1; cpx2 = x1 * curvature + x2 * (1 - curvature); cpy2 = y2; } curve.setShape({ x1: x1, y1: y1, x2: x2, y2: y2, cpx1: cpx1, cpy1: cpy1, cpx2: cpx2, cpy2: cpy2 }); curve.useStyle(lineStyleModel.getItemStyle()); // Special color, use source node color or target node color applyCurveStyle(curve.style, orient, edge); var defaultEdgeLabelText = "" + edgeModel.get('value'); var edgeLabelStateModels = getLabelStatesModels(edgeModel, 'edgeLabel'); setLabelStyle(curve, edgeLabelStateModels, { labelFetcher: { getFormattedLabel: function (dataIndex, stateName, dataType, labelDimIndex, formatter, extendParams) { return seriesModel.getFormattedLabel(dataIndex, stateName, 'edge', labelDimIndex, // ensure edgeLabel formatter is provided // to prevent the inheritance from `label.formatter` of the series Object(core_util["retrieve3"])(formatter, edgeLabelStateModels.normal && edgeLabelStateModels.normal.get('formatter'), defaultEdgeLabelText), extendParams); } }, labelDataIndex: edge.dataIndex, defaultText: defaultEdgeLabelText }); curve.setTextConfig({ position: 'inside' }); var emphasisModel = edgeModel.getModel('emphasis'); setStatesStylesFromModel(curve, edgeModel, 'lineStyle', function (model) { var style = model.getItemStyle(); applyCurveStyle(style, orient, edge); return style; }); group.add(curve); edgeData.setItemGraphicEl(edge.dataIndex, curve); var focus = emphasisModel.get('focus'); toggleHoverEmphasis(curve, focus === 'adjacency' ? edge.getAdjacentDataIndices() : focus === 'trajectory' ? edge.getTrajectoryDataIndices() : focus, emphasisModel.get('blurScope'), emphasisModel.get('disabled')); }); // Generate a rect for each node graph.eachNode(function (node) { var layout = node.getLayout(); var itemModel = node.getModel(); var dragX = itemModel.get('localX'); var dragY = itemModel.get('localY'); var emphasisModel = itemModel.getModel('emphasis'); var borderRadius = itemModel.get(['itemStyle', 'borderRadius']) || 0; var rect = new shape_Rect({ shape: { x: dragX != null ? dragX * width : layout.x, y: dragY != null ? dragY * height : layout.y, width: layout.dx, height: layout.dy, r: borderRadius }, style: itemModel.getModel('itemStyle').getItemStyle(), z2: 10 }); setLabelStyle(rect, getLabelStatesModels(itemModel), { labelFetcher: { getFormattedLabel: function (dataIndex, stateName) { return seriesModel.getFormattedLabel(dataIndex, stateName, 'node'); } }, labelDataIndex: node.dataIndex, defaultText: node.id }); rect.disableLabelAnimation = true; rect.setStyle('fill', node.getVisual('color')); rect.setStyle('decal', node.getVisual('style').decal); setStatesStylesFromModel(rect, itemModel); group.add(rect); nodeData.setItemGraphicEl(node.dataIndex, rect); getECData(rect).dataType = 'node'; var focus = emphasisModel.get('focus'); toggleHoverEmphasis(rect, focus === 'adjacency' ? node.getAdjacentDataIndices() : focus === 'trajectory' ? node.getTrajectoryDataIndices() : focus, emphasisModel.get('blurScope'), emphasisModel.get('disabled')); }); nodeData.eachItemGraphicEl(function (el, dataIndex) { var itemModel = nodeData.getItemModel(dataIndex); if (itemModel.get('draggable')) { el.drift = function (dx, dy) { sankeyView._focusAdjacencyDisabled = true; this.shape.x += dx; this.shape.y += dy; this.dirty(); api.dispatchAction({ type: 'dragNode', seriesId: seriesModel.id, dataIndex: nodeData.getRawIndex(dataIndex), localX: this.shape.x / width, localY: this.shape.y / height }); }; el.ondragend = function () { sankeyView._focusAdjacencyDisabled = false; }; el.draggable = true; el.cursor = 'move'; } }); if (!this._data && seriesModel.isAnimationEnabled()) { group.setClipPath(SankeyView_createGridClipShape(group.getBoundingRect(), seriesModel, function () { group.removeClipPath(); })); } this._data = seriesModel.getData(); }; SankeyView.prototype.dispose = function () {}; SankeyView.type = 'sankey'; return SankeyView; }(Chart); /** * Special color, use source node color or target node color * @param curveProps curve's style to parse * @param orient direction * @param edge current curve data */ function applyCurveStyle(curveProps, orient, edge) { switch (curveProps.fill) { case 'source': curveProps.fill = edge.node1.getVisual('color'); curveProps.decal = edge.node1.getVisual('style').decal; break; case 'target': curveProps.fill = edge.node2.getVisual('color'); curveProps.decal = edge.node2.getVisual('style').decal; break; case 'gradient': var sourceColor = edge.node1.getVisual('color'); var targetColor = edge.node2.getVisual('color'); if (Object(core_util["isString"])(sourceColor) && Object(core_util["isString"])(targetColor)) { curveProps.fill = new graphic_LinearGradient(0, 0, +(orient === 'horizontal'), +(orient === 'vertical'), [{ color: sourceColor, offset: 0 }, { color: targetColor, offset: 1 }]); } } } // Add animation to the view function SankeyView_createGridClipShape(rect, seriesModel, cb) { var rectEl = new shape_Rect({ shape: { x: rect.x - 10, y: rect.y - 10, width: 0, height: rect.height + 20 } }); initProps(rectEl, { shape: { width: rect.width + 20 } }, seriesModel, cb); return rectEl; } /* harmony default export */ var sankey_SankeyView = (SankeyView_SankeyView); // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/sankey/SankeySeries.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 SankeySeries_SankeySeriesModel = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(SankeySeriesModel, _super); function SankeySeriesModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = SankeySeriesModel.type; return _this; } /** * Init a graph data structure from data in option series */ SankeySeriesModel.prototype.getInitialData = function (option, ecModel) { var links = option.edges || option.links || []; var nodes = option.data || option.nodes || []; var levels = option.levels || []; this.levelModels = []; var levelModels = this.levelModels; for (var i = 0; i < levels.length; i++) { if (levels[i].depth != null && levels[i].depth >= 0) { levelModels[levels[i].depth] = new model_Model(levels[i], this, ecModel); } else { if (false) { throw new Error('levels[i].depth is mandatory and should be natural number'); } } } var graph = createGraphFromNodeEdge(nodes, links, this, true, beforeLink); return graph.data; function beforeLink(nodeData, edgeData) { nodeData.wrapMethod('getItemModel', function (model, idx) { var seriesModel = model.parentModel; var layout = seriesModel.getData().getItemLayout(idx); if (layout) { var nodeDepth = layout.depth; var levelModel = seriesModel.levelModels[nodeDepth]; if (levelModel) { model.parentModel = levelModel; } } return model; }); edgeData.wrapMethod('getItemModel', function (model, idx) { var seriesModel = model.parentModel; var edge = seriesModel.getGraph().getEdgeByIndex(idx); var layout = edge.node1.getLayout(); if (layout) { var depth = layout.depth; var levelModel = seriesModel.levelModels[depth]; if (levelModel) { model.parentModel = levelModel; } } return model; }); } }; SankeySeriesModel.prototype.setNodePosition = function (dataIndex, localPosition) { var nodes = this.option.data || this.option.nodes; var dataItem = nodes[dataIndex]; dataItem.localX = localPosition[0]; dataItem.localY = localPosition[1]; }; /** * Return the graphic data structure * * @return graphic data structure */ SankeySeriesModel.prototype.getGraph = function () { return this.getData().graph; }; /** * Get edge data of graphic data structure * * @return data structure of list */ SankeySeriesModel.prototype.getEdgeData = function () { return this.getGraph().edgeData; }; SankeySeriesModel.prototype.formatTooltip = function (dataIndex, multipleSeries, dataType) { function noValue(val) { return isNaN(val) || val == null; } // dataType === 'node' or empty do not show tooltip by default if (dataType === 'edge') { var params = this.getDataParams(dataIndex, dataType); var rawDataOpt = params.data; var edgeValue = params.value; var edgeName = rawDataOpt.source + ' -- ' + rawDataOpt.target; return createTooltipMarkup('nameValue', { name: edgeName, value: edgeValue, noValue: noValue(edgeValue) }); } // dataType === 'node' else { var node = this.getGraph().getNodeByIndex(dataIndex); var value = node.getLayout().value; var name_1 = this.getDataParams(dataIndex, dataType).data.name; return createTooltipMarkup('nameValue', { name: name_1 != null ? name_1 + '' : null, value: value, noValue: noValue(value) }); } }; SankeySeriesModel.prototype.optionUpdated = function () {}; // Override Series.getDataParams() SankeySeriesModel.prototype.getDataParams = function (dataIndex, dataType) { var params = _super.prototype.getDataParams.call(this, dataIndex, dataType); if (params.value == null && dataType === 'node') { var node = this.getGraph().getNodeByIndex(dataIndex); var nodeValue = node.getLayout().value; params.value = nodeValue; } return params; }; SankeySeriesModel.type = 'series.sankey'; SankeySeriesModel.defaultOption = { // zlevel: 0, z: 2, coordinateSystem: 'view', left: '5%', top: '5%', right: '20%', bottom: '5%', orient: 'horizontal', nodeWidth: 20, nodeGap: 8, draggable: true, layoutIterations: 32, label: { show: true, position: 'right', fontSize: 12 }, edgeLabel: { show: false, fontSize: 12 }, levels: [], nodeAlign: 'justify', lineStyle: { color: '#314656', opacity: 0.2, curveness: 0.5 }, emphasis: { label: { show: true }, lineStyle: { opacity: 0.5 } }, select: { itemStyle: { borderColor: '#212121' } }, animationEasing: 'linear', animationDuration: 1000 }; return SankeySeriesModel; }(Series); /* harmony default export */ var SankeySeries = (SankeySeries_SankeySeriesModel); // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/sankey/sankeyLayout.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 sankeyLayout(ecModel, api) { ecModel.eachSeriesByType('sankey', function (seriesModel) { var nodeWidth = seriesModel.get('nodeWidth'); var nodeGap = seriesModel.get('nodeGap'); var layoutInfo = sankeyLayout_getViewRect(seriesModel, api); seriesModel.layoutInfo = layoutInfo; var width = layoutInfo.width; var height = layoutInfo.height; var graph = seriesModel.getGraph(); var nodes = graph.nodes; var edges = graph.edges; computeNodeValues(nodes); var filteredNodes = core_util["filter"](nodes, function (node) { return node.getLayout().value === 0; }); var iterations = filteredNodes.length !== 0 ? 0 : seriesModel.get('layoutIterations'); var orient = seriesModel.get('orient'); var nodeAlign = seriesModel.get('nodeAlign'); layoutSankey(nodes, edges, nodeWidth, nodeGap, width, height, iterations, orient, nodeAlign); }); } /** * Get the layout position of the whole view */ function sankeyLayout_getViewRect(seriesModel, api) { return getLayoutRect(seriesModel.getBoxLayoutParams(), { width: api.getWidth(), height: api.getHeight() }); } function layoutSankey(nodes, edges, nodeWidth, nodeGap, width, height, iterations, orient, nodeAlign) { computeNodeBreadths(nodes, edges, nodeWidth, width, height, orient, nodeAlign); computeNodeDepths(nodes, edges, height, width, nodeGap, iterations, orient); computeEdgeDepths(nodes, orient); } /** * Compute the value of each node by summing the associated edge's value */ function computeNodeValues(nodes) { core_util["each"](nodes, function (node) { var value1 = sankeyLayout_sum(node.outEdges, getEdgeValue); var value2 = sankeyLayout_sum(node.inEdges, getEdgeValue); var nodeRawValue = node.getValue() || 0; var value = Math.max(value1, value2, nodeRawValue); node.setLayout({ value: value }, true); }); } /** * Compute the x-position for each node. * * Here we use Kahn algorithm to detect cycle when we traverse * the node to computer the initial x position. */ function computeNodeBreadths(nodes, edges, nodeWidth, width, height, orient, nodeAlign) { // Used to mark whether the edge is deleted. if it is deleted, // the value is 0, otherwise it is 1. var remainEdges = []; // Storage each node's indegree. var indegreeArr = []; // Used to storage the node with indegree is equal to 0. var zeroIndegrees = []; var nextTargetNode = []; var x = 0; // let kx = 0; for (var i = 0; i < edges.length; i++) { remainEdges[i] = 1; } for (var i = 0; i < nodes.length; i++) { indegreeArr[i] = nodes[i].inEdges.length; if (indegreeArr[i] === 0) { zeroIndegrees.push(nodes[i]); } } var maxNodeDepth = -1; // Traversing nodes using topological sorting to calculate the // horizontal(if orient === 'horizontal') or vertical(if orient === 'vertical') // position of the nodes. while (zeroIndegrees.length) { for (var idx = 0; idx < zeroIndegrees.length; idx++) { var node = zeroIndegrees[idx]; var item = node.hostGraph.data.getRawDataItem(node.dataIndex); var isItemDepth = item.depth != null && item.depth >= 0; if (isItemDepth && item.depth > maxNodeDepth) { maxNodeDepth = item.depth; } node.setLayout({ depth: isItemDepth ? item.depth : x }, true); orient === 'vertical' ? node.setLayout({ dy: nodeWidth }, true) : node.setLayout({ dx: nodeWidth }, true); for (var edgeIdx = 0; edgeIdx < node.outEdges.length; edgeIdx++) { var edge = node.outEdges[edgeIdx]; var indexEdge = edges.indexOf(edge); remainEdges[indexEdge] = 0; var targetNode = edge.node2; var nodeIndex = nodes.indexOf(targetNode); if (--indegreeArr[nodeIndex] === 0 && nextTargetNode.indexOf(targetNode) < 0) { nextTargetNode.push(targetNode); } } } ++x; zeroIndegrees = nextTargetNode; nextTargetNode = []; } for (var i = 0; i < remainEdges.length; i++) { if (remainEdges[i] === 1) { throw new Error('Sankey is a DAG, the original data has cycle!'); } } var maxDepth = maxNodeDepth > x - 1 ? maxNodeDepth : x - 1; if (nodeAlign && nodeAlign !== 'left') { adjustNodeWithNodeAlign(nodes, nodeAlign, orient, maxDepth); } var kx = orient === 'vertical' ? (height - nodeWidth) / maxDepth : (width - nodeWidth) / maxDepth; scaleNodeBreadths(nodes, kx, orient); } function isNodeDepth(node) { var item = node.hostGraph.data.getRawDataItem(node.dataIndex); return item.depth != null && item.depth >= 0; } function adjustNodeWithNodeAlign(nodes, nodeAlign, orient, maxDepth) { if (nodeAlign === 'right') { var nextSourceNode = []; var remainNodes = nodes; var nodeHeight = 0; while (remainNodes.length) { for (var i = 0; i < remainNodes.length; i++) { var node = remainNodes[i]; node.setLayout({ skNodeHeight: nodeHeight }, true); for (var j = 0; j < node.inEdges.length; j++) { var edge = node.inEdges[j]; if (nextSourceNode.indexOf(edge.node1) < 0) { nextSourceNode.push(edge.node1); } } } remainNodes = nextSourceNode; nextSourceNode = []; ++nodeHeight; } core_util["each"](nodes, function (node) { if (!isNodeDepth(node)) { node.setLayout({ depth: Math.max(0, maxDepth - node.getLayout().skNodeHeight) }, true); } }); } else if (nodeAlign === 'justify') { moveSinksRight(nodes, maxDepth); } } /** * All the node without outEgdes are assigned maximum x-position and * be aligned in the last column. * * @param nodes. node of sankey view. * @param maxDepth. use to assign to node without outEdges as x-position. */ function moveSinksRight(nodes, maxDepth) { core_util["each"](nodes, function (node) { if (!isNodeDepth(node) && !node.outEdges.length) { node.setLayout({ depth: maxDepth }, true); } }); } /** * Scale node x-position to the width * * @param nodes node of sankey view * @param kx multiple used to scale nodes */ function scaleNodeBreadths(nodes, kx, orient) { core_util["each"](nodes, function (node) { var nodeDepth = node.getLayout().depth * kx; orient === 'vertical' ? node.setLayout({ y: nodeDepth }, true) : node.setLayout({ x: nodeDepth }, true); }); } /** * Using Gauss-Seidel iterations method to compute the node depth(y-position) * * @param nodes node of sankey view * @param edges edge of sankey view * @param height the whole height of the area to draw the view * @param nodeGap the vertical distance between two nodes * in the same column. * @param iterations the number of iterations for the algorithm */ function computeNodeDepths(nodes, edges, height, width, nodeGap, iterations, orient) { var nodesByBreadth = prepareNodesByBreadth(nodes, orient); initializeNodeDepth(nodesByBreadth, edges, height, width, nodeGap, orient); resolveCollisions(nodesByBreadth, nodeGap, height, width, orient); for (var alpha = 1; iterations > 0; iterations--) { // 0.99 is a experience parameter, ensure that each iterations of // changes as small as possible. alpha *= 0.99; relaxRightToLeft(nodesByBreadth, alpha, orient); resolveCollisions(nodesByBreadth, nodeGap, height, width, orient); relaxLeftToRight(nodesByBreadth, alpha, orient); resolveCollisions(nodesByBreadth, nodeGap, height, width, orient); } } function prepareNodesByBreadth(nodes, orient) { var nodesByBreadth = []; var keyAttr = orient === 'vertical' ? 'y' : 'x'; var groupResult = groupData(nodes, function (node) { return node.getLayout()[keyAttr]; }); groupResult.keys.sort(function (a, b) { return a - b; }); core_util["each"](groupResult.keys, function (key) { nodesByBreadth.push(groupResult.buckets.get(key)); }); return nodesByBreadth; } /** * Compute the original y-position for each node */ function initializeNodeDepth(nodesByBreadth, edges, height, width, nodeGap, orient) { var minKy = Infinity; core_util["each"](nodesByBreadth, function (nodes) { var n = nodes.length; var sum = 0; core_util["each"](nodes, function (node) { sum += node.getLayout().value; }); var ky = orient === 'vertical' ? (width - (n - 1) * nodeGap) / sum : (height - (n - 1) * nodeGap) / sum; if (ky < minKy) { minKy = ky; } }); core_util["each"](nodesByBreadth, function (nodes) { core_util["each"](nodes, function (node, i) { var nodeDy = node.getLayout().value * minKy; if (orient === 'vertical') { node.setLayout({ x: i }, true); node.setLayout({ dx: nodeDy }, true); } else { node.setLayout({ y: i }, true); node.setLayout({ dy: nodeDy }, true); } }); }); core_util["each"](edges, function (edge) { var edgeDy = +edge.getValue() * minKy; edge.setLayout({ dy: edgeDy }, true); }); } /** * Resolve the collision of initialized depth (y-position) */ function resolveCollisions(nodesByBreadth, nodeGap, height, width, orient) { var keyAttr = orient === 'vertical' ? 'x' : 'y'; core_util["each"](nodesByBreadth, function (nodes) { nodes.sort(function (a, b) { return a.getLayout()[keyAttr] - b.getLayout()[keyAttr]; }); var nodeX; var node; var dy; var y0 = 0; var n = nodes.length; var nodeDyAttr = orient === 'vertical' ? 'dx' : 'dy'; for (var i = 0; i < n; i++) { node = nodes[i]; dy = y0 - node.getLayout()[keyAttr]; if (dy > 0) { nodeX = node.getLayout()[keyAttr] + dy; orient === 'vertical' ? node.setLayout({ x: nodeX }, true) : node.setLayout({ y: nodeX }, true); } y0 = node.getLayout()[keyAttr] + node.getLayout()[nodeDyAttr] + nodeGap; } var viewWidth = orient === 'vertical' ? width : height; // If the bottommost node goes outside the bounds, push it back up dy = y0 - nodeGap - viewWidth; if (dy > 0) { nodeX = node.getLayout()[keyAttr] - dy; orient === 'vertical' ? node.setLayout({ x: nodeX }, true) : node.setLayout({ y: nodeX }, true); y0 = nodeX; for (var i = n - 2; i >= 0; --i) { node = nodes[i]; dy = node.getLayout()[keyAttr] + node.getLayout()[nodeDyAttr] + nodeGap - y0; if (dy > 0) { nodeX = node.getLayout()[keyAttr] - dy; orient === 'vertical' ? node.setLayout({ x: nodeX }, true) : node.setLayout({ y: nodeX }, true); } y0 = node.getLayout()[keyAttr]; } } }); } /** * Change the y-position of the nodes, except most the right side nodes * @param nodesByBreadth * @param alpha parameter used to adjust the nodes y-position */ function relaxRightToLeft(nodesByBreadth, alpha, orient) { core_util["each"](nodesByBreadth.slice().reverse(), function (nodes) { core_util["each"](nodes, function (node) { if (node.outEdges.length) { var y = sankeyLayout_sum(node.outEdges, weightedTarget, orient) / sankeyLayout_sum(node.outEdges, getEdgeValue); if (isNaN(y)) { var len = node.outEdges.length; y = len ? sankeyLayout_sum(node.outEdges, centerTarget, orient) / len : 0; } if (orient === 'vertical') { var nodeX = node.getLayout().x + (y - sankeyLayout_center(node, orient)) * alpha; node.setLayout({ x: nodeX }, true); } else { var nodeY = node.getLayout().y + (y - sankeyLayout_center(node, orient)) * alpha; node.setLayout({ y: nodeY }, true); } } }); }); } function weightedTarget(edge, orient) { return sankeyLayout_center(edge.node2, orient) * edge.getValue(); } function centerTarget(edge, orient) { return sankeyLayout_center(edge.node2, orient); } function weightedSource(edge, orient) { return sankeyLayout_center(edge.node1, orient) * edge.getValue(); } function centerSource(edge, orient) { return sankeyLayout_center(edge.node1, orient); } function sankeyLayout_center(node, orient) { return orient === 'vertical' ? node.getLayout().x + node.getLayout().dx / 2 : node.getLayout().y + node.getLayout().dy / 2; } function getEdgeValue(edge) { return edge.getValue(); } function sankeyLayout_sum(array, cb, orient) { var sum = 0; var len = array.length; var i = -1; while (++i < len) { var value = +cb(array[i], orient); if (!isNaN(value)) { sum += value; } } return sum; } /** * Change the y-position of the nodes, except most the left side nodes */ function relaxLeftToRight(nodesByBreadth, alpha, orient) { core_util["each"](nodesByBreadth, function (nodes) { core_util["each"](nodes, function (node) { if (node.inEdges.length) { var y = sankeyLayout_sum(node.inEdges, weightedSource, orient) / sankeyLayout_sum(node.inEdges, getEdgeValue); if (isNaN(y)) { var len = node.inEdges.length; y = len ? sankeyLayout_sum(node.inEdges, centerSource, orient) / len : 0; } if (orient === 'vertical') { var nodeX = node.getLayout().x + (y - sankeyLayout_center(node, orient)) * alpha; node.setLayout({ x: nodeX }, true); } else { var nodeY = node.getLayout().y + (y - sankeyLayout_center(node, orient)) * alpha; node.setLayout({ y: nodeY }, true); } } }); }); } /** * Compute the depth(y-position) of each edge */ function computeEdgeDepths(nodes, orient) { var keyAttr = orient === 'vertical' ? 'x' : 'y'; core_util["each"](nodes, function (node) { node.outEdges.sort(function (a, b) { return a.node2.getLayout()[keyAttr] - b.node2.getLayout()[keyAttr]; }); node.inEdges.sort(function (a, b) { return a.node1.getLayout()[keyAttr] - b.node1.getLayout()[keyAttr]; }); }); core_util["each"](nodes, function (node) { var sy = 0; var ty = 0; core_util["each"](node.outEdges, function (edge) { edge.setLayout({ sy: sy }, true); sy += edge.getLayout().dy; }); core_util["each"](node.inEdges, function (edge) { edge.setLayout({ ty: ty }, true); ty += edge.getLayout().dy; }); }); } // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/sankey/sankeyVisual.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 sankeyVisual(ecModel) { ecModel.eachSeriesByType('sankey', function (seriesModel) { var graph = seriesModel.getGraph(); var nodes = graph.nodes; var edges = graph.edges; if (nodes.length) { var minValue_1 = Infinity; var maxValue_1 = -Infinity; core_util["each"](nodes, function (node) { var nodeValue = node.getLayout().value; if (nodeValue < minValue_1) { minValue_1 = nodeValue; } if (nodeValue > maxValue_1) { maxValue_1 = nodeValue; } }); core_util["each"](nodes, function (node) { var mapping = new visual_VisualMapping({ type: 'color', mappingMethod: 'linear', dataExtent: [minValue_1, maxValue_1], visual: seriesModel.get('color') }); var mapValueToColor = mapping.mapValueToVisual(node.getLayout().value); var customColor = node.getModel().get(['itemStyle', 'color']); if (customColor != null) { node.setVisual('color', customColor); node.setVisual('style', { fill: customColor }); } else { node.setVisual('color', mapValueToColor); node.setVisual('style', { fill: mapValueToColor }); } }); } if (edges.length) { core_util["each"](edges, function (edge) { var edgeStyle = edge.getModel().get('lineStyle'); edge.setVisual('style', edgeStyle); }); } }); } // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/sankey/install.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 sankey_install_install(registers) { registers.registerChartView(sankey_SankeyView); registers.registerSeriesModel(SankeySeries); registers.registerLayout(sankeyLayout); registers.registerVisual(sankeyVisual); registers.registerAction({ type: 'dragNode', event: 'dragnode', // here can only use 'update' now, other value is not support in echarts. update: 'update' }, function (payload, ecModel) { ecModel.eachComponent({ mainType: 'series', subType: 'sankey', query: payload }, function (seriesModel) { seriesModel.setNodePosition(payload.dataIndex, [payload.localX, payload.localY]); }); }); } // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/helper/whiskerBoxCommon.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 whiskerBoxCommon_WhiskerBoxCommonMixin = /** @class */function () { function WhiskerBoxCommonMixin() {} /** * @private */ WhiskerBoxCommonMixin.prototype._hasEncodeRule = function (key) { var encodeRules = this.getEncode(); return encodeRules && encodeRules.get(key) != null; }; /** * @override */ WhiskerBoxCommonMixin.prototype.getInitialData = function (option, ecModel) { // When both types of xAxis and yAxis are 'value', layout is // needed to be specified by user. Otherwise, layout can be // judged by which axis is category. var ordinalMeta; var xAxisModel = ecModel.getComponent('xAxis', this.get('xAxisIndex')); var yAxisModel = ecModel.getComponent('yAxis', this.get('yAxisIndex')); var xAxisType = xAxisModel.get('type'); var yAxisType = yAxisModel.get('type'); var addOrdinal; // FIXME // Consider time axis. if (xAxisType === 'category') { option.layout = 'horizontal'; ordinalMeta = xAxisModel.getOrdinalMeta(); addOrdinal = !this._hasEncodeRule('x'); } else if (yAxisType === 'category') { option.layout = 'vertical'; ordinalMeta = yAxisModel.getOrdinalMeta(); addOrdinal = !this._hasEncodeRule('y'); } else { option.layout = option.layout || 'horizontal'; } var coordDims = ['x', 'y']; var baseAxisDimIndex = option.layout === 'horizontal' ? 0 : 1; var baseAxisDim = this._baseAxisDim = coordDims[baseAxisDimIndex]; var otherAxisDim = coordDims[1 - baseAxisDimIndex]; var axisModels = [xAxisModel, yAxisModel]; var baseAxisType = axisModels[baseAxisDimIndex].get('type'); var otherAxisType = axisModels[1 - baseAxisDimIndex].get('type'); var data = option.data; // Clone a new data for next setOption({}) usage. // Avoid modifying current data will affect further update. if (data && addOrdinal) { var newOptionData_1 = []; core_util["each"](data, function (item, index) { var newItem; if (core_util["isArray"](item)) { newItem = item.slice(); // Modify current using data. item.unshift(index); } else if (core_util["isArray"](item.value)) { newItem = core_util["extend"]({}, item); newItem.value = newItem.value.slice(); // Modify current using data. item.value.unshift(index); } else { newItem = item; } newOptionData_1.push(newItem); }); option.data = newOptionData_1; } var defaultValueDimensions = this.defaultValueDimensions; var coordDimensions = [{ name: baseAxisDim, type: getDimensionTypeByAxis(baseAxisType), ordinalMeta: ordinalMeta, otherDims: { tooltip: false, itemName: 0 }, dimsDef: ['base'] }, { name: otherAxisDim, type: getDimensionTypeByAxis(otherAxisType), dimsDef: defaultValueDimensions.slice() }]; return createSeriesDataSimply(this, { coordDimensions: coordDimensions, dimensionsCount: defaultValueDimensions.length + 1, encodeDefaulter: core_util["curry"](makeSeriesEncodeForAxisCoordSys, coordDimensions, this) }); }; /** * If horizontal, base axis is x, otherwise y. * @override */ WhiskerBoxCommonMixin.prototype.getBaseAxis = function () { var dim = this._baseAxisDim; return this.ecModel.getComponent(dim + 'Axis', this.get(dim + 'AxisIndex')).axis; }; return WhiskerBoxCommonMixin; }(); ; // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/boxplot/BoxplotSeries.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 BoxplotSeries_BoxplotSeriesModel = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(BoxplotSeriesModel, _super); function BoxplotSeriesModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = BoxplotSeriesModel.type; // TODO // box width represents group size, so dimension should have 'size'. /** * @see * The meanings of 'min' and 'max' depend on user, * and echarts do not need to know it. * @readOnly */ _this.defaultValueDimensions = [{ name: 'min', defaultTooltip: true }, { name: 'Q1', defaultTooltip: true }, { name: 'median', defaultTooltip: true }, { name: 'Q3', defaultTooltip: true }, { name: 'max', defaultTooltip: true }]; _this.visualDrawType = 'stroke'; return _this; } BoxplotSeriesModel.type = 'series.boxplot'; BoxplotSeriesModel.dependencies = ['xAxis', 'yAxis', 'grid']; BoxplotSeriesModel.defaultOption = { // zlevel: 0, z: 2, coordinateSystem: 'cartesian2d', legendHoverLink: true, layout: null, boxWidth: [7, 50], itemStyle: { color: '#fff', borderWidth: 1 }, emphasis: { scale: true, itemStyle: { borderWidth: 2, shadowBlur: 5, shadowOffsetX: 1, shadowOffsetY: 1, shadowColor: 'rgba(0,0,0,0.2)' } }, animationDuration: 800 }; return BoxplotSeriesModel; }(Series); Object(core_util["mixin"])(BoxplotSeries_BoxplotSeriesModel, whiskerBoxCommon_WhiskerBoxCommonMixin, true); /* harmony default export */ var BoxplotSeries = (BoxplotSeries_BoxplotSeriesModel); // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/boxplot/BoxplotView.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 BoxplotView_BoxplotView = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(BoxplotView, _super); function BoxplotView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = BoxplotView.type; return _this; } BoxplotView.prototype.render = function (seriesModel, ecModel, api) { var data = seriesModel.getData(); var group = this.group; var oldData = this._data; // There is no old data only when first rendering or switching from // stream mode to normal mode, where previous elements should be removed. if (!this._data) { group.removeAll(); } var constDim = seriesModel.get('layout') === 'horizontal' ? 1 : 0; data.diff(oldData).add(function (newIdx) { if (data.hasValue(newIdx)) { var itemLayout = data.getItemLayout(newIdx); var symbolEl = createNormalBox(itemLayout, data, newIdx, constDim, true); data.setItemGraphicEl(newIdx, symbolEl); group.add(symbolEl); } }).update(function (newIdx, oldIdx) { var symbolEl = oldData.getItemGraphicEl(oldIdx); // Empty data if (!data.hasValue(newIdx)) { group.remove(symbolEl); return; } var itemLayout = data.getItemLayout(newIdx); if (!symbolEl) { symbolEl = createNormalBox(itemLayout, data, newIdx, constDim); } else { saveOldStyle(symbolEl); updateNormalBoxData(itemLayout, symbolEl, data, newIdx); } group.add(symbolEl); data.setItemGraphicEl(newIdx, symbolEl); }).remove(function (oldIdx) { var el = oldData.getItemGraphicEl(oldIdx); el && group.remove(el); }).execute(); this._data = data; }; BoxplotView.prototype.remove = function (ecModel) { var group = this.group; var data = this._data; this._data = null; data && data.eachItemGraphicEl(function (el) { el && group.remove(el); }); }; BoxplotView.type = 'boxplot'; return BoxplotView; }(Chart); var BoxPathShape = /** @class */function () { function BoxPathShape() {} return BoxPathShape; }(); var BoxplotView_BoxPath = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(BoxPath, _super); function BoxPath(opts) { var _this = _super.call(this, opts) || this; _this.type = 'boxplotBoxPath'; return _this; } BoxPath.prototype.getDefaultShape = function () { return new BoxPathShape(); }; BoxPath.prototype.buildPath = function (ctx, shape) { var ends = shape.points; var i = 0; ctx.moveTo(ends[i][0], ends[i][1]); i++; for (; i < 4; i++) { ctx.lineTo(ends[i][0], ends[i][1]); } ctx.closePath(); for (; i < ends.length; i++) { ctx.moveTo(ends[i][0], ends[i][1]); i++; ctx.lineTo(ends[i][0], ends[i][1]); } }; return BoxPath; }(graphic_Path); function createNormalBox(itemLayout, data, dataIndex, constDim, isInit) { var ends = itemLayout.ends; var el = new BoxplotView_BoxPath({ shape: { points: isInit ? transInit(ends, constDim, itemLayout) : ends } }); updateNormalBoxData(itemLayout, el, data, dataIndex, isInit); return el; } function updateNormalBoxData(itemLayout, el, data, dataIndex, isInit) { var seriesModel = data.hostModel; var updateMethod = graphic_namespaceObject[isInit ? 'initProps' : 'updateProps']; updateMethod(el, { shape: { points: itemLayout.ends } }, seriesModel, dataIndex); el.useStyle(data.getItemVisual(dataIndex, 'style')); el.style.strokeNoScale = true; el.z2 = 100; var itemModel = data.getItemModel(dataIndex); var emphasisModel = itemModel.getModel('emphasis'); setStatesStylesFromModel(el, itemModel); toggleHoverEmphasis(el, emphasisModel.get('focus'), emphasisModel.get('blurScope'), emphasisModel.get('disabled')); } function transInit(points, dim, itemLayout) { return core_util["map"](points, function (point) { point = point.slice(); point[dim] = itemLayout.initBaseline; return point; }); } /* harmony default export */ var boxplot_BoxplotView = (BoxplotView_BoxplotView); // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/boxplot/boxplotLayout.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 boxplotLayout_each = core_util["each"]; function boxplotLayout(ecModel) { var groupResult = groupSeriesByAxis(ecModel); boxplotLayout_each(groupResult, function (groupItem) { var seriesModels = groupItem.seriesModels; if (!seriesModels.length) { return; } calculateBase(groupItem); boxplotLayout_each(seriesModels, function (seriesModel, idx) { layoutSingleSeries(seriesModel, groupItem.boxOffsetList[idx], groupItem.boxWidthList[idx]); }); }); } /** * Group series by axis. */ function groupSeriesByAxis(ecModel) { var result = []; var axisList = []; ecModel.eachSeriesByType('boxplot', function (seriesModel) { var baseAxis = seriesModel.getBaseAxis(); var idx = core_util["indexOf"](axisList, baseAxis); if (idx < 0) { idx = axisList.length; axisList[idx] = baseAxis; result[idx] = { axis: baseAxis, seriesModels: [] }; } result[idx].seriesModels.push(seriesModel); }); return result; } /** * Calculate offset and box width for each series. */ function calculateBase(groupItem) { var baseAxis = groupItem.axis; var seriesModels = groupItem.seriesModels; var seriesCount = seriesModels.length; var boxWidthList = groupItem.boxWidthList = []; var boxOffsetList = groupItem.boxOffsetList = []; var boundList = []; var bandWidth; if (baseAxis.type === 'category') { bandWidth = baseAxis.getBandWidth(); } else { var maxDataCount_1 = 0; boxplotLayout_each(seriesModels, function (seriesModel) { maxDataCount_1 = Math.max(maxDataCount_1, seriesModel.getData().count()); }); var extent = baseAxis.getExtent(); bandWidth = Math.abs(extent[1] - extent[0]) / maxDataCount_1; } boxplotLayout_each(seriesModels, function (seriesModel) { var boxWidthBound = seriesModel.get('boxWidth'); if (!core_util["isArray"](boxWidthBound)) { boxWidthBound = [boxWidthBound, boxWidthBound]; } boundList.push([number_parsePercent(boxWidthBound[0], bandWidth) || 0, number_parsePercent(boxWidthBound[1], bandWidth) || 0]); }); var availableWidth = bandWidth * 0.8 - 2; var boxGap = availableWidth / seriesCount * 0.3; var boxWidth = (availableWidth - boxGap * (seriesCount - 1)) / seriesCount; var base = boxWidth / 2 - availableWidth / 2; boxplotLayout_each(seriesModels, function (seriesModel, idx) { boxOffsetList.push(base); base += boxGap + boxWidth; boxWidthList.push(Math.min(Math.max(boxWidth, boundList[idx][0]), boundList[idx][1])); }); } /** * Calculate points location for each series. */ function layoutSingleSeries(seriesModel, offset, boxWidth) { var coordSys = seriesModel.coordinateSystem; var data = seriesModel.getData(); var halfWidth = boxWidth / 2; var cDimIdx = seriesModel.get('layout') === 'horizontal' ? 0 : 1; var vDimIdx = 1 - cDimIdx; var coordDims = ['x', 'y']; var cDim = data.mapDimension(coordDims[cDimIdx]); var vDims = data.mapDimensionsAll(coordDims[vDimIdx]); if (cDim == null || vDims.length < 5) { return; } for (var dataIndex = 0; dataIndex < data.count(); dataIndex++) { var axisDimVal = data.get(cDim, dataIndex); var median = getPoint(axisDimVal, vDims[2], dataIndex); var end1 = getPoint(axisDimVal, vDims[0], dataIndex); var end2 = getPoint(axisDimVal, vDims[1], dataIndex); var end4 = getPoint(axisDimVal, vDims[3], dataIndex); var end5 = getPoint(axisDimVal, vDims[4], dataIndex); var ends = []; addBodyEnd(ends, end2, false); addBodyEnd(ends, end4, true); ends.push(end1, end2, end5, end4); layEndLine(ends, end1); layEndLine(ends, end5); layEndLine(ends, median); data.setItemLayout(dataIndex, { initBaseline: median[vDimIdx], ends: ends }); } function getPoint(axisDimVal, dim, dataIndex) { var val = data.get(dim, dataIndex); var p = []; p[cDimIdx] = axisDimVal; p[vDimIdx] = val; var point; if (isNaN(axisDimVal) || isNaN(val)) { point = [NaN, NaN]; } else { point = coordSys.dataToPoint(p); point[cDimIdx] += offset; } return point; } function addBodyEnd(ends, point, start) { var point1 = point.slice(); var point2 = point.slice(); point1[cDimIdx] += halfWidth; point2[cDimIdx] -= halfWidth; start ? ends.push(point1, point2) : ends.push(point2, point1); } function layEndLine(ends, endCenter) { var from = endCenter.slice(); var to = endCenter.slice(); from[cDimIdx] -= halfWidth; to[cDimIdx] += halfWidth; ends.push(from, to); } } // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/boxplot/prepareBoxplotData.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ /** * See: * * * * Helper method for preparing data. * * @param rawData like * [ * [12,232,443], (raw data set for the first box) * [3843,5545,1232], (raw data set for the second box) * ... * ] * @param opt.boundIQR=1.5 Data less than min bound is outlier. * default 1.5, means Q1 - 1.5 * (Q3 - Q1). * If 'none'/0 passed, min bound will not be used. */ function prepareBoxplotData(rawData, opt) { opt = opt || {}; var boxData = []; var outliers = []; var boundIQR = opt.boundIQR; var useExtreme = boundIQR === 'none' || boundIQR === 0; for (var i = 0; i < rawData.length; i++) { var ascList = asc(rawData[i].slice()); var Q1 = quantile(ascList, 0.25); var Q2 = quantile(ascList, 0.5); var Q3 = quantile(ascList, 0.75); var min = ascList[0]; var max = ascList[ascList.length - 1]; var bound = (boundIQR == null ? 1.5 : boundIQR) * (Q3 - Q1); var low = useExtreme ? min : Math.max(min, Q1 - bound); var high = useExtreme ? max : Math.min(max, Q3 + bound); var itemNameFormatter = opt.itemNameFormatter; var itemName = Object(core_util["isFunction"])(itemNameFormatter) ? itemNameFormatter({ value: i }) : Object(core_util["isString"])(itemNameFormatter) ? itemNameFormatter.replace('{value}', i + '') : i + ''; boxData.push([itemName, low, Q1, Q2, Q3, high]); for (var j = 0; j < ascList.length; j++) { var dataItem = ascList[j]; if (dataItem < low || dataItem > high) { var outlier = [itemName, dataItem]; outliers.push(outlier); } } } return { boxData: boxData, outliers: outliers }; } // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/boxplot/boxplotTransform.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 boxplotTransform = { type: 'echarts:boxplot', transform: function transform(params) { var upstream = params.upstream; if (upstream.sourceFormat !== SOURCE_FORMAT_ARRAY_ROWS) { var errMsg = ''; if (false) { errMsg = makePrintable('source data is not applicable for this boxplot transform. Expect number[][].'); } throwError(errMsg); } var result = prepareBoxplotData(upstream.getRawData(), params.config); return [{ dimensions: ['ItemName', 'Low', 'Q1', 'Q2', 'Q3', 'High'], data: result.boxData }, { data: result.outliers }]; } }; // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/boxplot/install.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 boxplot_install_install(registers) { registers.registerSeriesModel(BoxplotSeries); registers.registerChartView(boxplot_BoxplotView); registers.registerLayout(boxplotLayout); registers.registerTransform(boxplotTransform); } // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/candlestick/candlestickVisual.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 positiveBorderColorQuery = ['itemStyle', 'borderColor']; var negativeBorderColorQuery = ['itemStyle', 'borderColor0']; var dojiBorderColorQuery = ['itemStyle', 'borderColorDoji']; var positiveColorQuery = ['itemStyle', 'color']; var negativeColorQuery = ['itemStyle', 'color0']; function candlestickVisual_getColor(sign, model) { return model.get(sign > 0 ? positiveColorQuery : negativeColorQuery); } function getBorderColor(sign, model) { return model.get(sign === 0 ? dojiBorderColorQuery : sign > 0 ? positiveBorderColorQuery : negativeBorderColorQuery); } var candlestickVisual = { seriesType: 'candlestick', plan: createRenderPlanner(), // For legend. performRawSeries: true, reset: function (seriesModel, ecModel) { // Only visible series has each data be visual encoded if (ecModel.isSeriesFiltered(seriesModel)) { return; } var isLargeRender = seriesModel.pipelineContext.large; return !isLargeRender && { progress: function (params, data) { var dataIndex; while ((dataIndex = params.next()) != null) { var itemModel = data.getItemModel(dataIndex); var sign = data.getItemLayout(dataIndex).sign; var style = itemModel.getItemStyle(); style.fill = candlestickVisual_getColor(sign, itemModel); style.stroke = getBorderColor(sign, itemModel) || style.fill; var existsStyle = data.ensureUniqueItemVisual(dataIndex, 'style'); Object(core_util["extend"])(existsStyle, style); } } }; } }; /* harmony default export */ var candlestick_candlestickVisual = (candlestickVisual); // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/candlestick/CandlestickView.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 SKIP_PROPS = ['color', 'borderColor']; var CandlestickView_CandlestickView = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(CandlestickView, _super); function CandlestickView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = CandlestickView.type; return _this; } CandlestickView.prototype.render = function (seriesModel, ecModel, api) { // If there is clipPath created in large mode. Remove it. this.group.removeClipPath(); // Clear previously rendered progressive elements. this._progressiveEls = null; this._updateDrawMode(seriesModel); this._isLargeDraw ? this._renderLarge(seriesModel) : this._renderNormal(seriesModel); }; CandlestickView.prototype.incrementalPrepareRender = function (seriesModel, ecModel, api) { this._clear(); this._updateDrawMode(seriesModel); }; CandlestickView.prototype.incrementalRender = function (params, seriesModel, ecModel, api) { this._progressiveEls = []; this._isLargeDraw ? this._incrementalRenderLarge(params, seriesModel) : this._incrementalRenderNormal(params, seriesModel); }; CandlestickView.prototype.eachRendered = function (cb) { traverseElements(this._progressiveEls || this.group, cb); }; CandlestickView.prototype._updateDrawMode = function (seriesModel) { var isLargeDraw = seriesModel.pipelineContext.large; if (this._isLargeDraw == null || isLargeDraw !== this._isLargeDraw) { this._isLargeDraw = isLargeDraw; this._clear(); } }; CandlestickView.prototype._renderNormal = function (seriesModel) { var data = seriesModel.getData(); var oldData = this._data; var group = this.group; var isSimpleBox = data.getLayout('isSimpleBox'); var needsClip = seriesModel.get('clip', true); var coord = seriesModel.coordinateSystem; var clipArea = coord.getArea && coord.getArea(); // There is no old data only when first rendering or switching from // stream mode to normal mode, where previous elements should be removed. if (!this._data) { group.removeAll(); } data.diff(oldData).add(function (newIdx) { if (data.hasValue(newIdx)) { var itemLayout = data.getItemLayout(newIdx); if (needsClip && isNormalBoxClipped(clipArea, itemLayout)) { return; } var el = CandlestickView_createNormalBox(itemLayout, newIdx, true); initProps(el, { shape: { points: itemLayout.ends } }, seriesModel, newIdx); setBoxCommon(el, data, newIdx, isSimpleBox); group.add(el); data.setItemGraphicEl(newIdx, el); } }).update(function (newIdx, oldIdx) { var el = oldData.getItemGraphicEl(oldIdx); // Empty data if (!data.hasValue(newIdx)) { group.remove(el); return; } var itemLayout = data.getItemLayout(newIdx); if (needsClip && isNormalBoxClipped(clipArea, itemLayout)) { group.remove(el); return; } if (!el) { el = CandlestickView_createNormalBox(itemLayout, newIdx); } else { updateProps(el, { shape: { points: itemLayout.ends } }, seriesModel, newIdx); saveOldStyle(el); } setBoxCommon(el, data, newIdx, isSimpleBox); group.add(el); data.setItemGraphicEl(newIdx, el); }).remove(function (oldIdx) { var el = oldData.getItemGraphicEl(oldIdx); el && group.remove(el); }).execute(); this._data = data; }; CandlestickView.prototype._renderLarge = function (seriesModel) { this._clear(); CandlestickView_createLarge(seriesModel, this.group); var clipPath = seriesModel.get('clip', true) ? createClipPath(seriesModel.coordinateSystem, false, seriesModel) : null; if (clipPath) { this.group.setClipPath(clipPath); } else { this.group.removeClipPath(); } }; CandlestickView.prototype._incrementalRenderNormal = function (params, seriesModel) { var data = seriesModel.getData(); var isSimpleBox = data.getLayout('isSimpleBox'); var dataIndex; while ((dataIndex = params.next()) != null) { var itemLayout = data.getItemLayout(dataIndex); var el = CandlestickView_createNormalBox(itemLayout, dataIndex); setBoxCommon(el, data, dataIndex, isSimpleBox); el.incremental = true; this.group.add(el); this._progressiveEls.push(el); } }; CandlestickView.prototype._incrementalRenderLarge = function (params, seriesModel) { CandlestickView_createLarge(seriesModel, this.group, this._progressiveEls, true); }; CandlestickView.prototype.remove = function (ecModel) { this._clear(); }; CandlestickView.prototype._clear = function () { this.group.removeAll(); this._data = null; }; CandlestickView.type = 'candlestick'; return CandlestickView; }(Chart); var NormalBoxPathShape = /** @class */function () { function NormalBoxPathShape() {} return NormalBoxPathShape; }(); var CandlestickView_NormalBoxPath = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(NormalBoxPath, _super); function NormalBoxPath(opts) { var _this = _super.call(this, opts) || this; _this.type = 'normalCandlestickBox'; return _this; } NormalBoxPath.prototype.getDefaultShape = function () { return new NormalBoxPathShape(); }; NormalBoxPath.prototype.buildPath = function (ctx, shape) { var ends = shape.points; if (this.__simpleBox) { ctx.moveTo(ends[4][0], ends[4][1]); ctx.lineTo(ends[6][0], ends[6][1]); } else { ctx.moveTo(ends[0][0], ends[0][1]); ctx.lineTo(ends[1][0], ends[1][1]); ctx.lineTo(ends[2][0], ends[2][1]); ctx.lineTo(ends[3][0], ends[3][1]); ctx.closePath(); ctx.moveTo(ends[4][0], ends[4][1]); ctx.lineTo(ends[5][0], ends[5][1]); ctx.moveTo(ends[6][0], ends[6][1]); ctx.lineTo(ends[7][0], ends[7][1]); } }; return NormalBoxPath; }(graphic_Path); function CandlestickView_createNormalBox(itemLayout, dataIndex, isInit) { var ends = itemLayout.ends; return new CandlestickView_NormalBoxPath({ shape: { points: isInit ? CandlestickView_transInit(ends, itemLayout) : ends }, z2: 100 }); } function isNormalBoxClipped(clipArea, itemLayout) { var clipped = true; for (var i = 0; i < itemLayout.ends.length; i++) { // If any point are in the region. if (clipArea.contain(itemLayout.ends[i][0], itemLayout.ends[i][1])) { clipped = false; break; } } return clipped; } function setBoxCommon(el, data, dataIndex, isSimpleBox) { var itemModel = data.getItemModel(dataIndex); el.useStyle(data.getItemVisual(dataIndex, 'style')); el.style.strokeNoScale = true; el.__simpleBox = isSimpleBox; setStatesStylesFromModel(el, itemModel); var sign = data.getItemLayout(dataIndex).sign; core_util["each"](el.states, function (state, stateName) { var stateModel = itemModel.getModel(stateName); var color = candlestickVisual_getColor(sign, stateModel); var borderColor = getBorderColor(sign, stateModel) || color; var stateStyle = state.style || (state.style = {}); color && (stateStyle.fill = color); borderColor && (stateStyle.stroke = borderColor); }); var emphasisModel = itemModel.getModel('emphasis'); toggleHoverEmphasis(el, emphasisModel.get('focus'), emphasisModel.get('blurScope'), emphasisModel.get('disabled')); } function CandlestickView_transInit(points, itemLayout) { return core_util["map"](points, function (point) { point = point.slice(); point[1] = itemLayout.initBaseline; return point; }); } var LargeBoxPathShape = /** @class */function () { function LargeBoxPathShape() {} return LargeBoxPathShape; }(); var CandlestickView_LargeBoxPath = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(LargeBoxPath, _super); function LargeBoxPath(opts) { var _this = _super.call(this, opts) || this; _this.type = 'largeCandlestickBox'; return _this; } LargeBoxPath.prototype.getDefaultShape = function () { return new LargeBoxPathShape(); }; LargeBoxPath.prototype.buildPath = function (ctx, shape) { // Drawing lines is more efficient than drawing // a whole line or drawing rects. var points = shape.points; for (var i = 0; i < points.length;) { if (this.__sign === points[i++]) { var x = points[i++]; ctx.moveTo(x, points[i++]); ctx.lineTo(x, points[i++]); } else { i += 3; } } }; return LargeBoxPath; }(graphic_Path); function CandlestickView_createLarge(seriesModel, group, progressiveEls, incremental) { var data = seriesModel.getData(); var largePoints = data.getLayout('largePoints'); var elP = new CandlestickView_LargeBoxPath({ shape: { points: largePoints }, __sign: 1, ignoreCoarsePointer: true }); group.add(elP); var elN = new CandlestickView_LargeBoxPath({ shape: { points: largePoints }, __sign: -1, ignoreCoarsePointer: true }); group.add(elN); var elDoji = new CandlestickView_LargeBoxPath({ shape: { points: largePoints }, __sign: 0, ignoreCoarsePointer: true }); group.add(elDoji); setLargeStyle(1, elP, seriesModel, data); setLargeStyle(-1, elN, seriesModel, data); setLargeStyle(0, elDoji, seriesModel, data); if (incremental) { elP.incremental = true; elN.incremental = true; } if (progressiveEls) { progressiveEls.push(elP, elN); } } function setLargeStyle(sign, el, seriesModel, data) { // TODO put in visual? var borderColor = getBorderColor(sign, seriesModel) // Use color for border color by default. || candlestickVisual_getColor(sign, seriesModel); // Color must be excluded. // Because symbol provide setColor individually to set fill and stroke var itemStyle = seriesModel.getModel('itemStyle').getItemStyle(SKIP_PROPS); el.useStyle(itemStyle); el.style.fill = null; el.style.stroke = borderColor; } /* harmony default export */ var candlestick_CandlestickView = (CandlestickView_CandlestickView); // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/candlestick/CandlestickSeries.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 CandlestickSeries_CandlestickSeriesModel = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(CandlestickSeriesModel, _super); function CandlestickSeriesModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = CandlestickSeriesModel.type; _this.defaultValueDimensions = [{ name: 'open', defaultTooltip: true }, { name: 'close', defaultTooltip: true }, { name: 'lowest', defaultTooltip: true }, { name: 'highest', defaultTooltip: true }]; return _this; } /** * Get dimension for shadow in dataZoom * @return dimension name */ CandlestickSeriesModel.prototype.getShadowDim = function () { return 'open'; }; CandlestickSeriesModel.prototype.brushSelector = function (dataIndex, data, selectors) { var itemLayout = data.getItemLayout(dataIndex); return itemLayout && selectors.rect(itemLayout.brushRect); }; CandlestickSeriesModel.type = 'series.candlestick'; CandlestickSeriesModel.dependencies = ['xAxis', 'yAxis', 'grid']; CandlestickSeriesModel.defaultOption = { // zlevel: 0, z: 2, coordinateSystem: 'cartesian2d', legendHoverLink: true, // xAxisIndex: 0, // yAxisIndex: 0, layout: null, clip: true, itemStyle: { color: '#eb5454', color0: '#47b262', borderColor: '#eb5454', borderColor0: '#47b262', borderColorDoji: null, // borderColor: '#d24040', // borderColor0: '#398f4f', borderWidth: 1 }, emphasis: { itemStyle: { borderWidth: 2 } }, barMaxWidth: null, barMinWidth: null, barWidth: null, large: true, largeThreshold: 600, progressive: 3e3, progressiveThreshold: 1e4, progressiveChunkMode: 'mod', animationEasing: 'linear', animationDuration: 300 }; return CandlestickSeriesModel; }(Series); Object(core_util["mixin"])(CandlestickSeries_CandlestickSeriesModel, whiskerBoxCommon_WhiskerBoxCommonMixin, true); /* harmony default export */ var CandlestickSeries = (CandlestickSeries_CandlestickSeriesModel); // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/candlestick/preprocessor.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 candlestickPreprocessor(option) { if (!option || !core_util["isArray"](option.series)) { return; } // Translate 'k' to 'candlestick'. core_util["each"](option.series, function (seriesItem) { if (core_util["isObject"](seriesItem) && seriesItem.type === 'k') { seriesItem.type = 'candlestick'; } }); } // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/candlestick/candlestickLayout.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 candlestickLayout = { seriesType: 'candlestick', plan: createRenderPlanner(), reset: function (seriesModel) { var coordSys = seriesModel.coordinateSystem; var data = seriesModel.getData(); var candleWidth = calculateCandleWidth(seriesModel, data); var cDimIdx = 0; var vDimIdx = 1; var coordDims = ['x', 'y']; var cDimI = data.getDimensionIndex(data.mapDimension(coordDims[cDimIdx])); var vDimsI = Object(core_util["map"])(data.mapDimensionsAll(coordDims[vDimIdx]), data.getDimensionIndex, data); var openDimI = vDimsI[0]; var closeDimI = vDimsI[1]; var lowestDimI = vDimsI[2]; var highestDimI = vDimsI[3]; data.setLayout({ candleWidth: candleWidth, // The value is experimented visually. isSimpleBox: candleWidth <= 1.3 }); if (cDimI < 0 || vDimsI.length < 4) { return; } return { progress: seriesModel.pipelineContext.large ? largeProgress : normalProgress }; function normalProgress(params, data) { var dataIndex; var store = data.getStore(); while ((dataIndex = params.next()) != null) { var axisDimVal = store.get(cDimI, dataIndex); var openVal = store.get(openDimI, dataIndex); var closeVal = store.get(closeDimI, dataIndex); var lowestVal = store.get(lowestDimI, dataIndex); var highestVal = store.get(highestDimI, dataIndex); var ocLow = Math.min(openVal, closeVal); var ocHigh = Math.max(openVal, closeVal); var ocLowPoint = getPoint(ocLow, axisDimVal); var ocHighPoint = getPoint(ocHigh, axisDimVal); var lowestPoint = getPoint(lowestVal, axisDimVal); var highestPoint = getPoint(highestVal, axisDimVal); var ends = []; addBodyEnd(ends, ocHighPoint, 0); addBodyEnd(ends, ocLowPoint, 1); ends.push(subPixelOptimizePoint(highestPoint), subPixelOptimizePoint(ocHighPoint), subPixelOptimizePoint(lowestPoint), subPixelOptimizePoint(ocLowPoint)); var itemModel = data.getItemModel(dataIndex); var hasDojiColor = !!itemModel.get(['itemStyle', 'borderColorDoji']); data.setItemLayout(dataIndex, { sign: getSign(store, dataIndex, openVal, closeVal, closeDimI, hasDojiColor), initBaseline: openVal > closeVal ? ocHighPoint[vDimIdx] : ocLowPoint[vDimIdx], ends: ends, brushRect: makeBrushRect(lowestVal, highestVal, axisDimVal) }); } function getPoint(val, axisDimVal) { var p = []; p[cDimIdx] = axisDimVal; p[vDimIdx] = val; return isNaN(axisDimVal) || isNaN(val) ? [NaN, NaN] : coordSys.dataToPoint(p); } function addBodyEnd(ends, point, start) { var point1 = point.slice(); var point2 = point.slice(); point1[cDimIdx] = graphic_subPixelOptimize(point1[cDimIdx] + candleWidth / 2, 1, false); point2[cDimIdx] = graphic_subPixelOptimize(point2[cDimIdx] - candleWidth / 2, 1, true); start ? ends.push(point1, point2) : ends.push(point2, point1); } function makeBrushRect(lowestVal, highestVal, axisDimVal) { var pmin = getPoint(lowestVal, axisDimVal); var pmax = getPoint(highestVal, axisDimVal); pmin[cDimIdx] -= candleWidth / 2; pmax[cDimIdx] -= candleWidth / 2; return { x: pmin[0], y: pmin[1], width: vDimIdx ? candleWidth : pmax[0] - pmin[0], height: vDimIdx ? pmax[1] - pmin[1] : candleWidth }; } function subPixelOptimizePoint(point) { point[cDimIdx] = graphic_subPixelOptimize(point[cDimIdx], 1); return point; } } function largeProgress(params, data) { // Structure: [sign, x, yhigh, ylow, sign, x, yhigh, ylow, ...] var points = createFloat32Array(params.count * 4); var offset = 0; var point; var tmpIn = []; var tmpOut = []; var dataIndex; var store = data.getStore(); var hasDojiColor = !!seriesModel.get(['itemStyle', 'borderColorDoji']); while ((dataIndex = params.next()) != null) { var axisDimVal = store.get(cDimI, dataIndex); var openVal = store.get(openDimI, dataIndex); var closeVal = store.get(closeDimI, dataIndex); var lowestVal = store.get(lowestDimI, dataIndex); var highestVal = store.get(highestDimI, dataIndex); if (isNaN(axisDimVal) || isNaN(lowestVal) || isNaN(highestVal)) { points[offset++] = NaN; offset += 3; continue; } points[offset++] = getSign(store, dataIndex, openVal, closeVal, closeDimI, hasDojiColor); tmpIn[cDimIdx] = axisDimVal; tmpIn[vDimIdx] = lowestVal; point = coordSys.dataToPoint(tmpIn, null, tmpOut); points[offset++] = point ? point[0] : NaN; points[offset++] = point ? point[1] : NaN; tmpIn[vDimIdx] = highestVal; point = coordSys.dataToPoint(tmpIn, null, tmpOut); points[offset++] = point ? point[1] : NaN; } data.setLayout('largePoints', points); } } }; /** * Get the sign of a single data. * * @returns 0 for doji with hasDojiColor: true, * 1 for positive, * -1 for negative. */ function getSign(store, dataIndex, openVal, closeVal, closeDimI, hasDojiColor) { var sign; if (openVal > closeVal) { sign = -1; } else if (openVal < closeVal) { sign = 1; } else { sign = hasDojiColor // When doji color is set, use it instead of color/color0. ? 0 : dataIndex > 0 // If close === open, compare with close of last record ? store.get(closeDimI, dataIndex - 1) <= closeVal ? 1 : -1 // No record of previous, set to be positive : 1; } return sign; } function calculateCandleWidth(seriesModel, data) { var baseAxis = seriesModel.getBaseAxis(); var extent; var bandWidth = baseAxis.type === 'category' ? baseAxis.getBandWidth() : (extent = baseAxis.getExtent(), Math.abs(extent[1] - extent[0]) / data.count()); var barMaxWidth = number_parsePercent(Object(core_util["retrieve2"])(seriesModel.get('barMaxWidth'), bandWidth), bandWidth); var barMinWidth = number_parsePercent(Object(core_util["retrieve2"])(seriesModel.get('barMinWidth'), 1), bandWidth); var barWidth = seriesModel.get('barWidth'); return barWidth != null ? number_parsePercent(barWidth, bandWidth) // Put max outer to ensure bar visible in spite of overlap. : Math.max(Math.min(bandWidth / 2, barMaxWidth), barMinWidth); } /* harmony default export */ var candlestick_candlestickLayout = (candlestickLayout); // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/candlestick/install.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 candlestick_install_install(registers) { registers.registerChartView(candlestick_CandlestickView); registers.registerSeriesModel(CandlestickSeries); registers.registerPreprocessor(candlestickPreprocessor); registers.registerVisual(candlestick_candlestickVisual); registers.registerLayout(candlestick_candlestickLayout); } // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/helper/EffectSymbol.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 updateRipplePath(rippleGroup, effectCfg) { var color = effectCfg.rippleEffectColor || effectCfg.color; rippleGroup.eachChild(function (ripplePath) { ripplePath.attr({ z: effectCfg.z, zlevel: effectCfg.zlevel, style: { stroke: effectCfg.brushType === 'stroke' ? color : null, fill: effectCfg.brushType === 'fill' ? color : null } }); }); } var EffectSymbol_EffectSymbol = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(EffectSymbol, _super); function EffectSymbol(data, idx) { var _this = _super.call(this) || this; var symbol = new helper_Symbol(data, idx); var rippleGroup = new graphic_Group(); _this.add(symbol); _this.add(rippleGroup); _this.updateData(data, idx); return _this; } EffectSymbol.prototype.stopEffectAnimation = function () { this.childAt(1).removeAll(); }; EffectSymbol.prototype.startEffectAnimation = function (effectCfg) { var symbolType = effectCfg.symbolType; var color = effectCfg.color; var rippleNumber = effectCfg.rippleNumber; var rippleGroup = this.childAt(1); for (var i = 0; i < rippleNumber; i++) { // If width/height are set too small (e.g., set to 1) on ios10 // and macOS Sierra, a circle stroke become a rect, no matter what // the scale is set. So we set width/height as 2. See #4136. var ripplePath = symbol_createSymbol(symbolType, -1, -1, 2, 2, color); ripplePath.attr({ style: { strokeNoScale: true }, z2: 99, silent: true, scaleX: 0.5, scaleY: 0.5 }); var delay = -i / rippleNumber * effectCfg.period + effectCfg.effectOffset; ripplePath.animate('', true).when(effectCfg.period, { scaleX: effectCfg.rippleScale / 2, scaleY: effectCfg.rippleScale / 2 }).delay(delay).start(); ripplePath.animateStyle(true).when(effectCfg.period, { opacity: 0 }).delay(delay).start(); rippleGroup.add(ripplePath); } updateRipplePath(rippleGroup, effectCfg); }; /** * Update effect symbol */ EffectSymbol.prototype.updateEffectAnimation = function (effectCfg) { var oldEffectCfg = this._effectCfg; var rippleGroup = this.childAt(1); // Must reinitialize effect if following configuration changed var DIFFICULT_PROPS = ['symbolType', 'period', 'rippleScale', 'rippleNumber']; for (var i = 0; i < DIFFICULT_PROPS.length; i++) { var propName = DIFFICULT_PROPS[i]; if (oldEffectCfg[propName] !== effectCfg[propName]) { this.stopEffectAnimation(); this.startEffectAnimation(effectCfg); return; } } updateRipplePath(rippleGroup, effectCfg); }; /** * Highlight symbol */ EffectSymbol.prototype.highlight = function () { enterEmphasis(this); }; /** * Downplay symbol */ EffectSymbol.prototype.downplay = function () { leaveEmphasis(this); }; EffectSymbol.prototype.getSymbolType = function () { var symbol = this.childAt(0); return symbol && symbol.getSymbolType(); }; /** * Update symbol properties */ EffectSymbol.prototype.updateData = function (data, idx) { var _this = this; var seriesModel = data.hostModel; this.childAt(0).updateData(data, idx); var rippleGroup = this.childAt(1); var itemModel = data.getItemModel(idx); var symbolType = data.getItemVisual(idx, 'symbol'); var symbolSize = normalizeSymbolSize(data.getItemVisual(idx, 'symbolSize')); var symbolStyle = data.getItemVisual(idx, 'style'); var color = symbolStyle && symbolStyle.fill; var emphasisModel = itemModel.getModel('emphasis'); rippleGroup.setScale(symbolSize); rippleGroup.traverse(function (ripplePath) { ripplePath.setStyle('fill', color); }); var symbolOffset = normalizeSymbolOffset(data.getItemVisual(idx, 'symbolOffset'), symbolSize); if (symbolOffset) { rippleGroup.x = symbolOffset[0]; rippleGroup.y = symbolOffset[1]; } var symbolRotate = data.getItemVisual(idx, 'symbolRotate'); rippleGroup.rotation = (symbolRotate || 0) * Math.PI / 180 || 0; var effectCfg = {}; effectCfg.showEffectOn = seriesModel.get('showEffectOn'); effectCfg.rippleScale = itemModel.get(['rippleEffect', 'scale']); effectCfg.brushType = itemModel.get(['rippleEffect', 'brushType']); effectCfg.period = itemModel.get(['rippleEffect', 'period']) * 1000; effectCfg.effectOffset = idx / data.count(); effectCfg.z = seriesModel.getShallow('z') || 0; effectCfg.zlevel = seriesModel.getShallow('zlevel') || 0; effectCfg.symbolType = symbolType; effectCfg.color = color; effectCfg.rippleEffectColor = itemModel.get(['rippleEffect', 'color']); effectCfg.rippleNumber = itemModel.get(['rippleEffect', 'number']); if (effectCfg.showEffectOn === 'render') { this._effectCfg ? this.updateEffectAnimation(effectCfg) : this.startEffectAnimation(effectCfg); this._effectCfg = effectCfg; } else { // Not keep old effect config this._effectCfg = null; this.stopEffectAnimation(); this.onHoverStateChange = function (toState) { if (toState === 'emphasis') { if (effectCfg.showEffectOn !== 'render') { _this.startEffectAnimation(effectCfg); } } else if (toState === 'normal') { if (effectCfg.showEffectOn !== 'render') { _this.stopEffectAnimation(); } } }; } this._effectCfg = effectCfg; toggleHoverEmphasis(this, emphasisModel.get('focus'), emphasisModel.get('blurScope'), emphasisModel.get('disabled')); }; ; EffectSymbol.prototype.fadeOut = function (cb) { cb && cb(); }; ; return EffectSymbol; }(graphic_Group); /* harmony default export */ var helper_EffectSymbol = (EffectSymbol_EffectSymbol); // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/effectScatter/EffectScatterView.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 EffectScatterView_EffectScatterView = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(EffectScatterView, _super); function EffectScatterView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = EffectScatterView.type; return _this; } EffectScatterView.prototype.init = function () { this._symbolDraw = new helper_SymbolDraw(helper_EffectSymbol); }; EffectScatterView.prototype.render = function (seriesModel, ecModel, api) { var data = seriesModel.getData(); var effectSymbolDraw = this._symbolDraw; effectSymbolDraw.updateData(data, { clipShape: this._getClipShape(seriesModel) }); this.group.add(effectSymbolDraw.group); }; EffectScatterView.prototype._getClipShape = function (seriesModel) { var coordSys = seriesModel.coordinateSystem; var clipArea = coordSys && coordSys.getArea && coordSys.getArea(); return seriesModel.get('clip', true) ? clipArea : null; }; EffectScatterView.prototype.updateTransform = function (seriesModel, ecModel, api) { var data = seriesModel.getData(); this.group.dirty(); var res = pointsLayout('').reset(seriesModel, ecModel, api); if (res.progress) { res.progress({ start: 0, end: data.count(), count: data.count() }, data); } this._symbolDraw.updateLayout(); }; EffectScatterView.prototype._updateGroupTransform = function (seriesModel) { var coordSys = seriesModel.coordinateSystem; if (coordSys && coordSys.getRoamTransform) { this.group.transform = matrix_clone(coordSys.getRoamTransform()); this.group.decomposeTransform(); } }; EffectScatterView.prototype.remove = function (ecModel, api) { this._symbolDraw && this._symbolDraw.remove(true); }; EffectScatterView.type = 'effectScatter'; return EffectScatterView; }(Chart); /* harmony default export */ var effectScatter_EffectScatterView = (EffectScatterView_EffectScatterView); // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/effectScatter/EffectScatterSeries.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 EffectScatterSeries_EffectScatterSeriesModel = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(EffectScatterSeriesModel, _super); function EffectScatterSeriesModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = EffectScatterSeriesModel.type; _this.hasSymbolVisual = true; return _this; } EffectScatterSeriesModel.prototype.getInitialData = function (option, ecModel) { return helper_createSeriesData(null, this, { useEncodeDefaulter: true }); }; EffectScatterSeriesModel.prototype.brushSelector = function (dataIndex, data, selectors) { return selectors.point(data.getItemLayout(dataIndex)); }; EffectScatterSeriesModel.type = 'series.effectScatter'; EffectScatterSeriesModel.dependencies = ['grid', 'polar']; EffectScatterSeriesModel.defaultOption = { coordinateSystem: 'cartesian2d', // zlevel: 0, z: 2, legendHoverLink: true, effectType: 'ripple', progressive: 0, // When to show the effect, option: 'render'|'emphasis' showEffectOn: 'render', clip: true, // Ripple effect config rippleEffect: { period: 4, // Scale of ripple scale: 2.5, // Brush type can be fill or stroke brushType: 'fill', // Ripple number number: 3 }, universalTransition: { divideShape: 'clone' }, // Cartesian coordinate system // xAxisIndex: 0, // yAxisIndex: 0, // Polar coordinate system // polarIndex: 0, // Geo coordinate system // geoIndex: 0, // symbol: null, // 图形类型 symbolSize: 10 // 图形大小,半宽(半径)参数,当图形为方向或菱形则总宽度为symbolSize * 2 // symbolRotate: null, // 图形旋转控制 // itemStyle: { // opacity: 1 // } }; return EffectScatterSeriesModel; }(Series); /* harmony default export */ var EffectScatterSeries = (EffectScatterSeries_EffectScatterSeriesModel); // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/effectScatter/install.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 effectScatter_install_install(registers) { registers.registerChartView(effectScatter_EffectScatterView); registers.registerSeriesModel(EffectScatterSeries); registers.registerLayout(pointsLayout('effectScatter')); } // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/helper/EffectLine.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ /** * Provide effect for line */ var EffectLine_EffectLine = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(EffectLine, _super); function EffectLine(lineData, idx, seriesScope) { var _this = _super.call(this) || this; _this.add(_this.createLine(lineData, idx, seriesScope)); _this._updateEffectSymbol(lineData, idx); return _this; } EffectLine.prototype.createLine = function (lineData, idx, seriesScope) { return new helper_Line(lineData, idx, seriesScope); }; EffectLine.prototype._updateEffectSymbol = function (lineData, idx) { var itemModel = lineData.getItemModel(idx); var effectModel = itemModel.getModel('effect'); var size = effectModel.get('symbolSize'); var symbolType = effectModel.get('symbol'); if (!core_util["isArray"](size)) { size = [size, size]; } var lineStyle = lineData.getItemVisual(idx, 'style'); var color = effectModel.get('color') || lineStyle && lineStyle.stroke; var symbol = this.childAt(1); if (this._symbolType !== symbolType) { // Remove previous this.remove(symbol); symbol = symbol_createSymbol(symbolType, -0.5, -0.5, 1, 1, color); symbol.z2 = 100; symbol.culling = true; this.add(symbol); } // Symbol may be removed if loop is false if (!symbol) { return; } // Shadow color is same with color in default symbol.setStyle('shadowColor', color); symbol.setStyle(effectModel.getItemStyle(['color'])); symbol.scaleX = size[0]; symbol.scaleY = size[1]; symbol.setColor(color); this._symbolType = symbolType; this._symbolScale = size; this._updateEffectAnimation(lineData, effectModel, idx); }; EffectLine.prototype._updateEffectAnimation = function (lineData, effectModel, idx) { var symbol = this.childAt(1); if (!symbol) { return; } var points = lineData.getItemLayout(idx); var period = effectModel.get('period') * 1000; var loop = effectModel.get('loop'); var roundTrip = effectModel.get('roundTrip'); var constantSpeed = effectModel.get('constantSpeed'); var delayExpr = core_util["retrieve"](effectModel.get('delay'), function (idx) { return idx / lineData.count() * period / 3; }); // Ignore when updating symbol.ignore = true; this._updateAnimationPoints(symbol, points); if (constantSpeed > 0) { period = this._getLineLength(symbol) / constantSpeed * 1000; } if (period !== this._period || loop !== this._loop || roundTrip !== this._roundTrip) { symbol.stopAnimation(); var delayNum = void 0; if (core_util["isFunction"](delayExpr)) { delayNum = delayExpr(idx); } else { delayNum = delayExpr; } if (symbol.__t > 0) { delayNum = -period * symbol.__t; } this._animateSymbol(symbol, period, delayNum, loop, roundTrip); } this._period = period; this._loop = loop; this._roundTrip = roundTrip; }; EffectLine.prototype._animateSymbol = function (symbol, period, delayNum, loop, roundTrip) { if (period > 0) { symbol.__t = 0; var self_1 = this; var animator = symbol.animate('', loop).when(roundTrip ? period * 2 : period, { __t: roundTrip ? 2 : 1 }).delay(delayNum).during(function () { self_1._updateSymbolPosition(symbol); }); if (!loop) { animator.done(function () { self_1.remove(symbol); }); } animator.start(); } }; EffectLine.prototype._getLineLength = function (symbol) { // Not so accurate return vector_dist(symbol.__p1, symbol.__cp1) + vector_dist(symbol.__cp1, symbol.__p2); }; EffectLine.prototype._updateAnimationPoints = function (symbol, points) { symbol.__p1 = points[0]; symbol.__p2 = points[1]; symbol.__cp1 = points[2] || [(points[0][0] + points[1][0]) / 2, (points[0][1] + points[1][1]) / 2]; }; EffectLine.prototype.updateData = function (lineData, idx, seriesScope) { this.childAt(0).updateData(lineData, idx, seriesScope); this._updateEffectSymbol(lineData, idx); }; EffectLine.prototype._updateSymbolPosition = function (symbol) { var p1 = symbol.__p1; var p2 = symbol.__p2; var cp1 = symbol.__cp1; var t = symbol.__t < 1 ? symbol.__t : 2 - symbol.__t; var pos = [symbol.x, symbol.y]; var lastPos = pos.slice(); var quadraticAt = curve_quadraticAt; var quadraticDerivativeAt = curve_quadraticDerivativeAt; pos[0] = quadraticAt(p1[0], cp1[0], p2[0], t); pos[1] = quadraticAt(p1[1], cp1[1], p2[1], t); // Tangent var tx = symbol.__t < 1 ? quadraticDerivativeAt(p1[0], cp1[0], p2[0], t) : quadraticDerivativeAt(p2[0], cp1[0], p1[0], 1 - t); var ty = symbol.__t < 1 ? quadraticDerivativeAt(p1[1], cp1[1], p2[1], t) : quadraticDerivativeAt(p2[1], cp1[1], p1[1], 1 - t); symbol.rotation = -Math.atan2(ty, tx) - Math.PI / 2; // enable continuity trail for 'line', 'rect', 'roundRect' symbolType if (this._symbolType === 'line' || this._symbolType === 'rect' || this._symbolType === 'roundRect') { if (symbol.__lastT !== undefined && symbol.__lastT < symbol.__t) { symbol.scaleY = vector_dist(lastPos, pos) * 1.05; // make sure the last segment render within endPoint if (t === 1) { pos[0] = lastPos[0] + (pos[0] - lastPos[0]) / 2; pos[1] = lastPos[1] + (pos[1] - lastPos[1]) / 2; } } else if (symbol.__lastT === 1) { // After first loop, symbol.__t does NOT start with 0, so connect p1 to pos directly. symbol.scaleY = 2 * vector_dist(p1, pos); } else { symbol.scaleY = this._symbolScale[1]; } } symbol.__lastT = symbol.__t; symbol.ignore = false; symbol.x = pos[0]; symbol.y = pos[1]; }; EffectLine.prototype.updateLayout = function (lineData, idx) { this.childAt(0).updateLayout(lineData, idx); var effectModel = lineData.getItemModel(idx).getModel('effect'); this._updateEffectAnimation(lineData, effectModel, idx); }; return EffectLine; }(graphic_Group); /* harmony default export */ var helper_EffectLine = (EffectLine_EffectLine); // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/helper/Polyline.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 helper_Polyline_Polyline = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(Polyline, _super); function Polyline(lineData, idx, seriesScope) { var _this = _super.call(this) || this; _this._createPolyline(lineData, idx, seriesScope); return _this; } Polyline.prototype._createPolyline = function (lineData, idx, seriesScope) { // let seriesModel = lineData.hostModel; var points = lineData.getItemLayout(idx); var line = new shape_Polyline({ shape: { points: points } }); this.add(line); this._updateCommonStl(lineData, idx, seriesScope); }; ; Polyline.prototype.updateData = function (lineData, idx, seriesScope) { var seriesModel = lineData.hostModel; var line = this.childAt(0); var target = { shape: { points: lineData.getItemLayout(idx) } }; updateProps(line, target, seriesModel, idx); this._updateCommonStl(lineData, idx, seriesScope); }; ; Polyline.prototype._updateCommonStl = function (lineData, idx, seriesScope) { var line = this.childAt(0); var itemModel = lineData.getItemModel(idx); var emphasisLineStyle = seriesScope && seriesScope.emphasisLineStyle; var focus = seriesScope && seriesScope.focus; var blurScope = seriesScope && seriesScope.blurScope; var emphasisDisabled = seriesScope && seriesScope.emphasisDisabled; if (!seriesScope || lineData.hasItemOption) { var emphasisModel = itemModel.getModel('emphasis'); emphasisLineStyle = emphasisModel.getModel('lineStyle').getLineStyle(); emphasisDisabled = emphasisModel.get('disabled'); focus = emphasisModel.get('focus'); blurScope = emphasisModel.get('blurScope'); } line.useStyle(lineData.getItemVisual(idx, 'style')); line.style.fill = null; line.style.strokeNoScale = true; var lineEmphasisState = line.ensureState('emphasis'); lineEmphasisState.style = emphasisLineStyle; toggleHoverEmphasis(this, focus, blurScope, emphasisDisabled); }; ; Polyline.prototype.updateLayout = function (lineData, idx) { var polyline = this.childAt(0); polyline.setShape('points', lineData.getItemLayout(idx)); }; ; return Polyline; }(graphic_Group); /* harmony default export */ var helper_Polyline = (helper_Polyline_Polyline); // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/helper/EffectPolyline.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 EffectPolyline_EffectPolyline = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(EffectPolyline, _super); function EffectPolyline() { var _this = _super !== null && _super.apply(this, arguments) || this; _this._lastFrame = 0; _this._lastFramePercent = 0; return _this; } // Override EffectPolyline.prototype.createLine = function (lineData, idx, seriesScope) { return new helper_Polyline(lineData, idx, seriesScope); }; ; // Override EffectPolyline.prototype._updateAnimationPoints = function (symbol, points) { this._points = points; var accLenArr = [0]; var len = 0; for (var i = 1; i < points.length; i++) { var p1 = points[i - 1]; var p2 = points[i]; len += vector_dist(p1, p2); accLenArr.push(len); } if (len === 0) { this._length = 0; return; } for (var i = 0; i < accLenArr.length; i++) { accLenArr[i] /= len; } this._offsets = accLenArr; this._length = len; }; ; // Override EffectPolyline.prototype._getLineLength = function () { return this._length; }; ; // Override EffectPolyline.prototype._updateSymbolPosition = function (symbol) { var t = symbol.__t < 1 ? symbol.__t : 2 - symbol.__t; var points = this._points; var offsets = this._offsets; var len = points.length; if (!offsets) { // Has length 0 return; } var lastFrame = this._lastFrame; var frame; if (t < this._lastFramePercent) { // Start from the next frame // PENDING start from lastFrame ? var start = Math.min(lastFrame + 1, len - 1); for (frame = start; frame >= 0; frame--) { if (offsets[frame] <= t) { break; } } // PENDING really need to do this ? frame = Math.min(frame, len - 2); } else { for (frame = lastFrame; frame < len; frame++) { if (offsets[frame] > t) { break; } } frame = Math.min(frame - 1, len - 2); } var p = (t - offsets[frame]) / (offsets[frame + 1] - offsets[frame]); var p0 = points[frame]; var p1 = points[frame + 1]; symbol.x = p0[0] * (1 - p) + p * p1[0]; symbol.y = p0[1] * (1 - p) + p * p1[1]; var tx = symbol.__t < 1 ? p1[0] - p0[0] : p0[0] - p1[0]; var ty = symbol.__t < 1 ? p1[1] - p0[1] : p0[1] - p1[1]; symbol.rotation = -Math.atan2(ty, tx) - Math.PI / 2; this._lastFrame = frame; this._lastFramePercent = t; symbol.ignore = false; }; ; return EffectPolyline; }(helper_EffectLine); /* harmony default export */ var helper_EffectPolyline = (EffectPolyline_EffectPolyline); // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/helper/LargeLineDraw.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 Batch by color var LargeLinesPathShape = /** @class */function () { function LargeLinesPathShape() { this.polyline = false; this.curveness = 0; this.segs = []; } return LargeLinesPathShape; }(); var LargeLineDraw_LargeLinesPath = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(LargeLinesPath, _super); function LargeLinesPath(opts) { var _this = _super.call(this, opts) || this; _this._off = 0; _this.hoverDataIdx = -1; return _this; } LargeLinesPath.prototype.reset = function () { this.notClear = false; this._off = 0; }; LargeLinesPath.prototype.getDefaultStyle = function () { return { stroke: '#000', fill: null }; }; LargeLinesPath.prototype.getDefaultShape = function () { return new LargeLinesPathShape(); }; LargeLinesPath.prototype.buildPath = function (ctx, shape) { var segs = shape.segs; var curveness = shape.curveness; var i; if (shape.polyline) { for (i = this._off; i < segs.length;) { var count = segs[i++]; if (count > 0) { ctx.moveTo(segs[i++], segs[i++]); for (var k = 1; k < count; k++) { ctx.lineTo(segs[i++], segs[i++]); } } } } else { for (i = this._off; i < segs.length;) { var x0 = segs[i++]; var y0 = segs[i++]; var x1 = segs[i++]; var y1 = segs[i++]; ctx.moveTo(x0, y0); if (curveness > 0) { var x2 = (x0 + x1) / 2 - (y0 - y1) * curveness; var y2 = (y0 + y1) / 2 - (x1 - x0) * curveness; ctx.quadraticCurveTo(x2, y2, x1, y1); } else { ctx.lineTo(x1, y1); } } } if (this.incremental) { this._off = i; this.notClear = true; } }; LargeLinesPath.prototype.findDataIndex = function (x, y) { var shape = this.shape; var segs = shape.segs; var curveness = shape.curveness; var lineWidth = this.style.lineWidth; if (shape.polyline) { var dataIndex = 0; for (var i = 0; i < segs.length;) { var count = segs[i++]; if (count > 0) { var x0 = segs[i++]; var y0 = segs[i++]; for (var k = 1; k < count; k++) { var x1 = segs[i++]; var y1 = segs[i++]; if (containStroke(x0, y0, x1, y1, lineWidth, x, y)) { return dataIndex; } } } dataIndex++; } } else { var dataIndex = 0; for (var i = 0; i < segs.length;) { var x0 = segs[i++]; var y0 = segs[i++]; var x1 = segs[i++]; var y1 = segs[i++]; if (curveness > 0) { var x2 = (x0 + x1) / 2 - (y0 - y1) * curveness; var y2 = (y0 + y1) / 2 - (x1 - x0) * curveness; if (quadratic_containStroke(x0, y0, x2, y2, x1, y1, lineWidth, x, y)) { return dataIndex; } } else { if (containStroke(x0, y0, x1, y1, lineWidth, x, y)) { return dataIndex; } } dataIndex++; } } return -1; }; LargeLinesPath.prototype.contain = function (x, y) { var localPos = this.transformCoordToLocal(x, y); var rect = this.getBoundingRect(); x = localPos[0]; y = localPos[1]; if (rect.contain(x, y)) { // Cache found data index. var dataIdx = this.hoverDataIdx = this.findDataIndex(x, y); return dataIdx >= 0; } this.hoverDataIdx = -1; return false; }; LargeLinesPath.prototype.getBoundingRect = function () { // Ignore stroke for large symbol draw. var rect = this._rect; if (!rect) { var shape = this.shape; var points = shape.segs; var minX = Infinity; var minY = Infinity; var maxX = -Infinity; var maxY = -Infinity; for (var i = 0; i < points.length;) { var x = points[i++]; var y = points[i++]; minX = Math.min(x, minX); maxX = Math.max(x, maxX); minY = Math.min(y, minY); maxY = Math.max(y, maxY); } rect = this._rect = new core_BoundingRect(minX, minY, maxX, maxY); } return rect; }; return LargeLinesPath; }(graphic_Path); var LargeLineDraw_LargeLineDraw = /** @class */function () { function LargeLineDraw() { this.group = new graphic_Group(); } /** * Update symbols draw by new data */ LargeLineDraw.prototype.updateData = function (data) { this._clear(); var lineEl = this._create(); lineEl.setShape({ segs: data.getLayout('linesPoints') }); this._setCommon(lineEl, data); }; ; /** * @override */ LargeLineDraw.prototype.incrementalPrepareUpdate = function (data) { this.group.removeAll(); this._clear(); }; ; /** * @override */ LargeLineDraw.prototype.incrementalUpdate = function (taskParams, data) { var lastAdded = this._newAdded[0]; var linePoints = data.getLayout('linesPoints'); var oldSegs = lastAdded && lastAdded.shape.segs; // Merging the exists. Each element has 1e4 points. // Consider the performance balance between too much elements and too much points in one shape(may affect hover optimization) if (oldSegs && oldSegs.length < 2e4) { var oldLen = oldSegs.length; var newSegs = new Float32Array(oldLen + linePoints.length); // Concat two array newSegs.set(oldSegs); newSegs.set(linePoints, oldLen); lastAdded.setShape({ segs: newSegs }); } else { // Clear this._newAdded = []; var lineEl = this._create(); lineEl.incremental = true; lineEl.setShape({ segs: linePoints }); this._setCommon(lineEl, data); lineEl.__startIndex = taskParams.start; } }; /** * @override */ LargeLineDraw.prototype.remove = function () { this._clear(); }; LargeLineDraw.prototype.eachRendered = function (cb) { this._newAdded[0] && cb(this._newAdded[0]); }; LargeLineDraw.prototype._create = function () { var lineEl = new LargeLineDraw_LargeLinesPath({ cursor: 'default', ignoreCoarsePointer: true }); this._newAdded.push(lineEl); this.group.add(lineEl); return lineEl; }; LargeLineDraw.prototype._setCommon = function (lineEl, data, isIncremental) { var hostModel = data.hostModel; lineEl.setShape({ polyline: hostModel.get('polyline'), curveness: hostModel.get(['lineStyle', 'curveness']) }); lineEl.useStyle(hostModel.getModel('lineStyle').getLineStyle()); lineEl.style.strokeNoScale = true; var style = data.getVisual('style'); if (style && style.stroke) { lineEl.setStyle('stroke', style.stroke); } lineEl.setStyle('fill', null); var ecData = getECData(lineEl); // Enable tooltip // PENDING May have performance issue when path is extremely large ecData.seriesIndex = hostModel.seriesIndex; lineEl.on('mousemove', function (e) { ecData.dataIndex = null; var dataIndex = lineEl.hoverDataIdx; if (dataIndex > 0) { // Provide dataIndex for tooltip ecData.dataIndex = dataIndex + lineEl.__startIndex; } }); }; ; LargeLineDraw.prototype._clear = function () { this._newAdded = []; this.group.removeAll(); }; ; return LargeLineDraw; }(); /* harmony default export */ var helper_LargeLineDraw = (LargeLineDraw_LargeLineDraw); // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/lines/linesLayout.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 linesLayout = { seriesType: 'lines', plan: createRenderPlanner(), reset: function (seriesModel) { var coordSys = seriesModel.coordinateSystem; if (!coordSys) { if (false) { error('The lines series must have a coordinate system.'); } return; } var isPolyline = seriesModel.get('polyline'); var isLarge = seriesModel.pipelineContext.large; return { progress: function (params, lineData) { var lineCoords = []; if (isLarge) { var points = void 0; var segCount = params.end - params.start; if (isPolyline) { var totalCoordsCount = 0; for (var i = params.start; i < params.end; i++) { totalCoordsCount += seriesModel.getLineCoordsCount(i); } points = new Float32Array(segCount + totalCoordsCount * 2); } else { points = new Float32Array(segCount * 4); } var offset = 0; var pt = []; for (var i = params.start; i < params.end; i++) { var len = seriesModel.getLineCoords(i, lineCoords); if (isPolyline) { points[offset++] = len; } for (var k = 0; k < len; k++) { pt = coordSys.dataToPoint(lineCoords[k], false, pt); points[offset++] = pt[0]; points[offset++] = pt[1]; } } lineData.setLayout('linesPoints', points); } else { for (var i = params.start; i < params.end; i++) { var itemModel = lineData.getItemModel(i); var len = seriesModel.getLineCoords(i, lineCoords); var pts = []; if (isPolyline) { for (var j = 0; j < len; j++) { pts.push(coordSys.dataToPoint(lineCoords[j])); } } else { pts[0] = coordSys.dataToPoint(lineCoords[0]); pts[1] = coordSys.dataToPoint(lineCoords[1]); var curveness = itemModel.get(['lineStyle', 'curveness']); if (+curveness) { pts[2] = [(pts[0][0] + pts[1][0]) / 2 - (pts[0][1] - pts[1][1]) * curveness, (pts[0][1] + pts[1][1]) / 2 - (pts[1][0] - pts[0][0]) * curveness]; } } lineData.setItemLayout(i, pts); } } } }; } }; /* harmony default export */ var lines_linesLayout = (linesLayout); // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/lines/LinesView.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 LinesView_LinesView = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(LinesView, _super); function LinesView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = LinesView.type; return _this; } LinesView.prototype.render = function (seriesModel, ecModel, api) { var data = seriesModel.getData(); var lineDraw = this._updateLineDraw(data, seriesModel); var zlevel = seriesModel.get('zlevel'); var trailLength = seriesModel.get(['effect', 'trailLength']); var zr = api.getZr(); // Avoid the drag cause ghost shadow // FIXME Better way ? // SVG doesn't support var isSvg = zr.painter.getType() === 'svg'; if (!isSvg) { zr.painter.getLayer(zlevel).clear(true); } // Config layer with motion blur if (this._lastZlevel != null && !isSvg) { zr.configLayer(this._lastZlevel, { motionBlur: false }); } if (this._showEffect(seriesModel) && trailLength > 0) { if (!isSvg) { zr.configLayer(zlevel, { motionBlur: true, lastFrameAlpha: Math.max(Math.min(trailLength / 10 + 0.9, 1), 0) }); } else if (false) { console.warn('SVG render mode doesn\'t support lines with trail effect'); } } lineDraw.updateData(data); var clipPath = seriesModel.get('clip', true) && createClipPath(seriesModel.coordinateSystem, false, seriesModel); if (clipPath) { this.group.setClipPath(clipPath); } else { this.group.removeClipPath(); } this._lastZlevel = zlevel; this._finished = true; }; LinesView.prototype.incrementalPrepareRender = function (seriesModel, ecModel, api) { var data = seriesModel.getData(); var lineDraw = this._updateLineDraw(data, seriesModel); lineDraw.incrementalPrepareUpdate(data); this._clearLayer(api); this._finished = false; }; LinesView.prototype.incrementalRender = function (taskParams, seriesModel, ecModel) { this._lineDraw.incrementalUpdate(taskParams, seriesModel.getData()); this._finished = taskParams.end === seriesModel.getData().count(); }; LinesView.prototype.eachRendered = function (cb) { this._lineDraw && this._lineDraw.eachRendered(cb); }; LinesView.prototype.updateTransform = function (seriesModel, ecModel, api) { var data = seriesModel.getData(); var pipelineContext = seriesModel.pipelineContext; if (!this._finished || pipelineContext.large || pipelineContext.progressiveRender) { // TODO Don't have to do update in large mode. Only do it when there are millions of data. return { update: true }; } else { // TODO Use same logic with ScatterView. // Manually update layout var res = lines_linesLayout.reset(seriesModel, ecModel, api); if (res.progress) { res.progress({ start: 0, end: data.count(), count: data.count() }, data); } // Not in large mode this._lineDraw.updateLayout(); this._clearLayer(api); } }; LinesView.prototype._updateLineDraw = function (data, seriesModel) { var lineDraw = this._lineDraw; var hasEffect = this._showEffect(seriesModel); var isPolyline = !!seriesModel.get('polyline'); var pipelineContext = seriesModel.pipelineContext; var isLargeDraw = pipelineContext.large; if (false) { if (hasEffect && isLargeDraw) { console.warn('Large lines not support effect'); } } if (!lineDraw || hasEffect !== this._hasEffet || isPolyline !== this._isPolyline || isLargeDraw !== this._isLargeDraw) { if (lineDraw) { lineDraw.remove(); } lineDraw = this._lineDraw = isLargeDraw ? new helper_LargeLineDraw() : new helper_LineDraw(isPolyline ? hasEffect ? helper_EffectPolyline : helper_Polyline : hasEffect ? helper_EffectLine : helper_Line); this._hasEffet = hasEffect; this._isPolyline = isPolyline; this._isLargeDraw = isLargeDraw; } this.group.add(lineDraw.group); return lineDraw; }; LinesView.prototype._showEffect = function (seriesModel) { return !!seriesModel.get(['effect', 'show']); }; LinesView.prototype._clearLayer = function (api) { // Not use motion when dragging or zooming var zr = api.getZr(); var isSvg = zr.painter.getType() === 'svg'; if (!isSvg && this._lastZlevel != null) { zr.painter.getLayer(this._lastZlevel).clear(true); } }; LinesView.prototype.remove = function (ecModel, api) { this._lineDraw && this._lineDraw.remove(); this._lineDraw = null; // Clear motion when lineDraw is removed this._clearLayer(api); }; LinesView.prototype.dispose = function (ecModel, api) { this.remove(ecModel, api); }; LinesView.type = 'lines'; return LinesView; }(Chart); /* harmony default export */ var lines_LinesView = (LinesView_LinesView); // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/lines/LinesSeries.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 Uint32Array, Float64Array, Float32Array */ var Uint32Arr = typeof Uint32Array === 'undefined' ? Array : Uint32Array; var Float64Arr = typeof Float64Array === 'undefined' ? Array : Float64Array; function compatEc2(seriesOpt) { var data = seriesOpt.data; if (data && data[0] && data[0][0] && data[0][0].coord) { if (false) { console.warn('Lines data configuration has been changed to' + ' { coords:[[1,2],[2,3]] }'); } seriesOpt.data = Object(core_util["map"])(data, function (itemOpt) { var coords = [itemOpt[0].coord, itemOpt[1].coord]; var target = { coords: coords }; if (itemOpt[0].name) { target.fromName = itemOpt[0].name; } if (itemOpt[1].name) { target.toName = itemOpt[1].name; } return Object(core_util["mergeAll"])([target, itemOpt[0], itemOpt[1]]); }); } } var LinesSeries_LinesSeriesModel = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(LinesSeriesModel, _super); function LinesSeriesModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = LinesSeriesModel.type; _this.visualStyleAccessPath = 'lineStyle'; _this.visualDrawType = 'stroke'; return _this; } LinesSeriesModel.prototype.init = function (option) { // The input data may be null/undefined. option.data = option.data || []; // Not using preprocessor because mergeOption may not have series.type compatEc2(option); var result = this._processFlatCoordsArray(option.data); this._flatCoords = result.flatCoords; this._flatCoordsOffset = result.flatCoordsOffset; if (result.flatCoords) { option.data = new Float32Array(result.count); } _super.prototype.init.apply(this, arguments); }; LinesSeriesModel.prototype.mergeOption = function (option) { compatEc2(option); if (option.data) { // Only update when have option data to merge. var result = this._processFlatCoordsArray(option.data); this._flatCoords = result.flatCoords; this._flatCoordsOffset = result.flatCoordsOffset; if (result.flatCoords) { option.data = new Float32Array(result.count); } } _super.prototype.mergeOption.apply(this, arguments); }; LinesSeriesModel.prototype.appendData = function (params) { var result = this._processFlatCoordsArray(params.data); if (result.flatCoords) { if (!this._flatCoords) { this._flatCoords = result.flatCoords; this._flatCoordsOffset = result.flatCoordsOffset; } else { this._flatCoords = Object(core_util["concatArray"])(this._flatCoords, result.flatCoords); this._flatCoordsOffset = Object(core_util["concatArray"])(this._flatCoordsOffset, result.flatCoordsOffset); } params.data = new Float32Array(result.count); } this.getRawData().appendData(params.data); }; LinesSeriesModel.prototype._getCoordsFromItemModel = function (idx) { var itemModel = this.getData().getItemModel(idx); var coords = itemModel.option instanceof Array ? itemModel.option : itemModel.getShallow('coords'); if (false) { if (!(coords instanceof Array && coords.length > 0 && coords[0] instanceof Array)) { throw new Error('Invalid coords ' + JSON.stringify(coords) + '. Lines must have 2d coords array in data item.'); } } return coords; }; LinesSeriesModel.prototype.getLineCoordsCount = function (idx) { if (this._flatCoordsOffset) { return this._flatCoordsOffset[idx * 2 + 1]; } else { return this._getCoordsFromItemModel(idx).length; } }; LinesSeriesModel.prototype.getLineCoords = function (idx, out) { if (this._flatCoordsOffset) { var offset = this._flatCoordsOffset[idx * 2]; var len = this._flatCoordsOffset[idx * 2 + 1]; for (var i = 0; i < len; i++) { out[i] = out[i] || []; out[i][0] = this._flatCoords[offset + i * 2]; out[i][1] = this._flatCoords[offset + i * 2 + 1]; } return len; } else { var coords = this._getCoordsFromItemModel(idx); for (var i = 0; i < coords.length; i++) { out[i] = out[i] || []; out[i][0] = coords[i][0]; out[i][1] = coords[i][1]; } return coords.length; } }; LinesSeriesModel.prototype._processFlatCoordsArray = function (data) { var startOffset = 0; if (this._flatCoords) { startOffset = this._flatCoords.length; } // Stored as a typed array. In format // Points Count(2) | x | y | x | y | Points Count(3) | x | y | x | y | x | y | if (Object(core_util["isNumber"])(data[0])) { var len = data.length; // Store offset and len of each segment var coordsOffsetAndLenStorage = new Uint32Arr(len); var coordsStorage = new Float64Arr(len); var coordsCursor = 0; var offsetCursor = 0; var dataCount = 0; for (var i = 0; i < len;) { dataCount++; var count = data[i++]; // Offset coordsOffsetAndLenStorage[offsetCursor++] = coordsCursor + startOffset; // Len coordsOffsetAndLenStorage[offsetCursor++] = count; for (var k = 0; k < count; k++) { var x = data[i++]; var y = data[i++]; coordsStorage[coordsCursor++] = x; coordsStorage[coordsCursor++] = y; if (i > len) { if (false) { throw new Error('Invalid data format.'); } } } } return { flatCoordsOffset: new Uint32Array(coordsOffsetAndLenStorage.buffer, 0, offsetCursor), flatCoords: coordsStorage, count: dataCount }; } return { flatCoordsOffset: null, flatCoords: null, count: data.length }; }; LinesSeriesModel.prototype.getInitialData = function (option, ecModel) { if (false) { var CoordSys = CoordinateSystem.get(option.coordinateSystem); if (!CoordSys) { throw new Error('Unknown coordinate system ' + option.coordinateSystem); } } var lineData = new data_SeriesData(['value'], this); lineData.hasItemOption = false; lineData.initData(option.data, [], function (dataItem, dimName, dataIndex, dimIndex) { // dataItem is simply coords if (dataItem instanceof Array) { return NaN; } else { lineData.hasItemOption = true; var value = dataItem.value; if (value != null) { return value instanceof Array ? value[dimIndex] : value; } } }); return lineData; }; LinesSeriesModel.prototype.formatTooltip = function (dataIndex, multipleSeries, dataType) { var data = this.getData(); var itemModel = data.getItemModel(dataIndex); var name = itemModel.get('name'); if (name) { return name; } var fromName = itemModel.get('fromName'); var toName = itemModel.get('toName'); var nameArr = []; fromName != null && nameArr.push(fromName); toName != null && nameArr.push(toName); return createTooltipMarkup('nameValue', { name: nameArr.join(' > ') }); }; LinesSeriesModel.prototype.preventIncremental = function () { return !!this.get(['effect', 'show']); }; LinesSeriesModel.prototype.getProgressive = function () { var progressive = this.option.progressive; if (progressive == null) { return this.option.large ? 1e4 : this.get('progressive'); } return progressive; }; LinesSeriesModel.prototype.getProgressiveThreshold = function () { var progressiveThreshold = this.option.progressiveThreshold; if (progressiveThreshold == null) { return this.option.large ? 2e4 : this.get('progressiveThreshold'); } return progressiveThreshold; }; LinesSeriesModel.prototype.getZLevelKey = function () { var effectModel = this.getModel('effect'); var trailLength = effectModel.get('trailLength'); return this.getData().count() > this.getProgressiveThreshold() // Each progressive series has individual key. ? this.id : effectModel.get('show') && trailLength > 0 ? trailLength + '' : ''; }; LinesSeriesModel.type = 'series.lines'; LinesSeriesModel.dependencies = ['grid', 'polar', 'geo', 'calendar']; LinesSeriesModel.defaultOption = { coordinateSystem: 'geo', // zlevel: 0, z: 2, legendHoverLink: true, // Cartesian coordinate system xAxisIndex: 0, yAxisIndex: 0, symbol: ['none', 'none'], symbolSize: [10, 10], // Geo coordinate system geoIndex: 0, effect: { show: false, period: 4, constantSpeed: 0, symbol: 'circle', symbolSize: 3, loop: true, trailLength: 0.2 }, large: false, // Available when large is true largeThreshold: 2000, polyline: false, clip: true, label: { show: false, position: 'end' // distance: 5, // formatter: 标签文本格式器,同Tooltip.formatter,不支持异步回调 }, lineStyle: { opacity: 0.5 } }; return LinesSeriesModel; }(Series); /* harmony default export */ var LinesSeries = (LinesSeries_LinesSeriesModel); // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/lines/linesVisual.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 linesVisual_normalize(a) { if (!(a instanceof Array)) { a = [a, a]; } return a; } var linesVisual = { seriesType: 'lines', reset: function (seriesModel) { var symbolType = linesVisual_normalize(seriesModel.get('symbol')); var symbolSize = linesVisual_normalize(seriesModel.get('symbolSize')); var data = seriesModel.getData(); data.setVisual('fromSymbol', symbolType && symbolType[0]); data.setVisual('toSymbol', symbolType && symbolType[1]); data.setVisual('fromSymbolSize', symbolSize && symbolSize[0]); data.setVisual('toSymbolSize', symbolSize && symbolSize[1]); function dataEach(data, idx) { var itemModel = data.getItemModel(idx); var symbolType = linesVisual_normalize(itemModel.getShallow('symbol', true)); var symbolSize = linesVisual_normalize(itemModel.getShallow('symbolSize', true)); symbolType[0] && data.setItemVisual(idx, 'fromSymbol', symbolType[0]); symbolType[1] && data.setItemVisual(idx, 'toSymbol', symbolType[1]); symbolSize[0] && data.setItemVisual(idx, 'fromSymbolSize', symbolSize[0]); symbolSize[1] && data.setItemVisual(idx, 'toSymbolSize', symbolSize[1]); } return { dataEach: data.hasItemOption ? dataEach : null }; } }; /* harmony default export */ var lines_linesVisual = (linesVisual); // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/lines/install.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 lines_install_install(registers) { registers.registerChartView(lines_LinesView); registers.registerSeriesModel(LinesSeries); registers.registerLayout(lines_linesLayout); registers.registerVisual(lines_linesVisual); } // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/heatmap/HeatmapLayer.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 Uint8ClampedArray */ var GRADIENT_LEVELS = 256; var HeatmapLayer_HeatmapLayer = /** @class */function () { function HeatmapLayer() { this.blurSize = 30; this.pointSize = 20; this.maxOpacity = 1; this.minOpacity = 0; this._gradientPixels = { inRange: null, outOfRange: null }; var canvas = platform["d" /* platformApi */].createCanvas(); this.canvas = canvas; } /** * Renders Heatmap and returns the rendered canvas * @param data array of data, each has x, y, value * @param width canvas width * @param height canvas height */ HeatmapLayer.prototype.update = function (data, width, height, normalize, colorFunc, isInRange) { var brush = this._getBrush(); var gradientInRange = this._getGradient(colorFunc, 'inRange'); var gradientOutOfRange = this._getGradient(colorFunc, 'outOfRange'); var r = this.pointSize + this.blurSize; var canvas = this.canvas; var ctx = canvas.getContext('2d'); var len = data.length; canvas.width = width; canvas.height = height; for (var i = 0; i < len; ++i) { var p = data[i]; var x = p[0]; var y = p[1]; var value = p[2]; // calculate alpha using value var alpha = normalize(value); // draw with the circle brush with alpha ctx.globalAlpha = alpha; ctx.drawImage(brush, x - r, y - r); } if (!canvas.width || !canvas.height) { // Avoid "Uncaught DOMException: Failed to execute 'getImageData' on // 'CanvasRenderingContext2D': The source height is 0." return canvas; } // colorize the canvas using alpha value and set with gradient var imageData = ctx.getImageData(0, 0, canvas.width, canvas.height); var pixels = imageData.data; var offset = 0; var pixelLen = pixels.length; var minOpacity = this.minOpacity; var maxOpacity = this.maxOpacity; var diffOpacity = maxOpacity - minOpacity; while (offset < pixelLen) { var alpha = pixels[offset + 3] / 256; var gradientOffset = Math.floor(alpha * (GRADIENT_LEVELS - 1)) * 4; // Simple optimize to ignore the empty data if (alpha > 0) { var gradient = isInRange(alpha) ? gradientInRange : gradientOutOfRange; // Any alpha > 0 will be mapped to [minOpacity, maxOpacity] alpha > 0 && (alpha = alpha * diffOpacity + minOpacity); pixels[offset++] = gradient[gradientOffset]; pixels[offset++] = gradient[gradientOffset + 1]; pixels[offset++] = gradient[gradientOffset + 2]; pixels[offset++] = gradient[gradientOffset + 3] * alpha * 256; } else { offset += 4; } } ctx.putImageData(imageData, 0, 0); return canvas; }; /** * get canvas of a black circle brush used for canvas to draw later */ HeatmapLayer.prototype._getBrush = function () { var brushCanvas = this._brushCanvas || (this._brushCanvas = platform["d" /* platformApi */].createCanvas()); // set brush size var r = this.pointSize + this.blurSize; var d = r * 2; brushCanvas.width = d; brushCanvas.height = d; var ctx = brushCanvas.getContext('2d'); ctx.clearRect(0, 0, d, d); // in order to render shadow without the distinct circle, // draw the distinct circle in an invisible place, // and use shadowOffset to draw shadow in the center of the canvas ctx.shadowOffsetX = d; ctx.shadowBlur = this.blurSize; // draw the shadow in black, and use alpha and shadow blur to generate // color in color map ctx.shadowColor = '#000'; // draw circle in the left to the canvas ctx.beginPath(); ctx.arc(-r, r, this.pointSize, 0, Math.PI * 2, true); ctx.closePath(); ctx.fill(); return brushCanvas; }; /** * get gradient color map * @private */ HeatmapLayer.prototype._getGradient = function (colorFunc, state) { var gradientPixels = this._gradientPixels; var pixelsSingleState = gradientPixels[state] || (gradientPixels[state] = new Uint8ClampedArray(256 * 4)); var color = [0, 0, 0, 0]; var off = 0; for (var i = 0; i < 256; i++) { colorFunc[state](i / 255, true, color); pixelsSingleState[off++] = color[0]; pixelsSingleState[off++] = color[1]; pixelsSingleState[off++] = color[2]; pixelsSingleState[off++] = color[3]; } return pixelsSingleState; }; return HeatmapLayer; }(); /* harmony default export */ var heatmap_HeatmapLayer = (HeatmapLayer_HeatmapLayer); // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/heatmap/HeatmapView.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 getIsInPiecewiseRange(dataExtent, pieceList, selected) { var dataSpan = dataExtent[1] - dataExtent[0]; pieceList = core_util["map"](pieceList, function (piece) { return { interval: [(piece.interval[0] - dataExtent[0]) / dataSpan, (piece.interval[1] - dataExtent[0]) / dataSpan] }; }); var len = pieceList.length; var lastIndex = 0; return function (val) { var i; // Try to find in the location of the last found for (i = lastIndex; i < len; i++) { var interval = pieceList[i].interval; if (interval[0] <= val && val <= interval[1]) { lastIndex = i; break; } } if (i === len) { // Not found, back interation for (i = lastIndex - 1; i >= 0; i--) { var interval = pieceList[i].interval; if (interval[0] <= val && val <= interval[1]) { lastIndex = i; break; } } } return i >= 0 && i < len && selected[i]; }; } function getIsInContinuousRange(dataExtent, range) { var dataSpan = dataExtent[1] - dataExtent[0]; range = [(range[0] - dataExtent[0]) / dataSpan, (range[1] - dataExtent[0]) / dataSpan]; return function (val) { return val >= range[0] && val <= range[1]; }; } function isGeoCoordSys(coordSys) { var dimensions = coordSys.dimensions; // Not use coordSys.type === 'geo' because coordSys maybe extended return dimensions[0] === 'lng' && dimensions[1] === 'lat'; } var HeatmapView_HeatmapView = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(HeatmapView, _super); function HeatmapView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = HeatmapView.type; return _this; } HeatmapView.prototype.render = function (seriesModel, ecModel, api) { var visualMapOfThisSeries; ecModel.eachComponent('visualMap', function (visualMap) { visualMap.eachTargetSeries(function (targetSeries) { if (targetSeries === seriesModel) { visualMapOfThisSeries = visualMap; } }); }); if (false) { if (!visualMapOfThisSeries) { throw new Error('Heatmap must use with visualMap'); } } // Clear previously rendered progressive elements. this._progressiveEls = null; this.group.removeAll(); var coordSys = seriesModel.coordinateSystem; if (coordSys.type === 'cartesian2d' || coordSys.type === 'calendar') { this._renderOnCartesianAndCalendar(seriesModel, api, 0, seriesModel.getData().count()); } else if (isGeoCoordSys(coordSys)) { this._renderOnGeo(coordSys, seriesModel, visualMapOfThisSeries, api); } }; HeatmapView.prototype.incrementalPrepareRender = function (seriesModel, ecModel, api) { this.group.removeAll(); }; HeatmapView.prototype.incrementalRender = function (params, seriesModel, ecModel, api) { var coordSys = seriesModel.coordinateSystem; if (coordSys) { // geo does not support incremental rendering? if (isGeoCoordSys(coordSys)) { this.render(seriesModel, ecModel, api); } else { this._progressiveEls = []; this._renderOnCartesianAndCalendar(seriesModel, api, params.start, params.end, true); } } }; HeatmapView.prototype.eachRendered = function (cb) { traverseElements(this._progressiveEls || this.group, cb); }; HeatmapView.prototype._renderOnCartesianAndCalendar = function (seriesModel, api, start, end, incremental) { var coordSys = seriesModel.coordinateSystem; var isCartesian2d = isCoordinateSystemType(coordSys, 'cartesian2d'); var width; var height; var xAxisExtent; var yAxisExtent; if (isCartesian2d) { var xAxis = coordSys.getAxis('x'); var yAxis = coordSys.getAxis('y'); if (false) { if (!(xAxis.type === 'category' && yAxis.type === 'category')) { throw new Error('Heatmap on cartesian must have two category axes'); } if (!(xAxis.onBand && yAxis.onBand)) { throw new Error('Heatmap on cartesian must have two axes with boundaryGap true'); } } // add 0.5px to avoid the gaps width = xAxis.getBandWidth() + .5; height = yAxis.getBandWidth() + .5; xAxisExtent = xAxis.scale.getExtent(); yAxisExtent = yAxis.scale.getExtent(); } var group = this.group; var data = seriesModel.getData(); var emphasisStyle = seriesModel.getModel(['emphasis', 'itemStyle']).getItemStyle(); var blurStyle = seriesModel.getModel(['blur', 'itemStyle']).getItemStyle(); var selectStyle = seriesModel.getModel(['select', 'itemStyle']).getItemStyle(); var borderRadius = seriesModel.get(['itemStyle', 'borderRadius']); var labelStatesModels = getLabelStatesModels(seriesModel); var emphasisModel = seriesModel.getModel('emphasis'); var focus = emphasisModel.get('focus'); var blurScope = emphasisModel.get('blurScope'); var emphasisDisabled = emphasisModel.get('disabled'); var dataDims = isCartesian2d ? [data.mapDimension('x'), data.mapDimension('y'), data.mapDimension('value')] : [data.mapDimension('time'), data.mapDimension('value')]; for (var idx = start; idx < end; idx++) { var rect = void 0; var style = data.getItemVisual(idx, 'style'); if (isCartesian2d) { var dataDimX = data.get(dataDims[0], idx); var dataDimY = data.get(dataDims[1], idx); // Ignore empty data and out of extent data if (isNaN(data.get(dataDims[2], idx)) || isNaN(dataDimX) || isNaN(dataDimY) || dataDimX < xAxisExtent[0] || dataDimX > xAxisExtent[1] || dataDimY < yAxisExtent[0] || dataDimY > yAxisExtent[1]) { continue; } var point = coordSys.dataToPoint([dataDimX, dataDimY]); rect = new shape_Rect({ shape: { x: point[0] - width / 2, y: point[1] - height / 2, width: width, height: height }, style: style }); } else { // Ignore empty data if (isNaN(data.get(dataDims[1], idx))) { continue; } rect = new shape_Rect({ z2: 1, shape: coordSys.dataToRect([data.get(dataDims[0], idx)]).contentShape, style: style }); } // Optimization for large dataset if (data.hasItemOption) { var itemModel = data.getItemModel(idx); var emphasisModel_1 = itemModel.getModel('emphasis'); emphasisStyle = emphasisModel_1.getModel('itemStyle').getItemStyle(); blurStyle = itemModel.getModel(['blur', 'itemStyle']).getItemStyle(); selectStyle = itemModel.getModel(['select', 'itemStyle']).getItemStyle(); // Each item value struct in the data would be firstly // { // itemStyle: { borderRadius: [30, 30] }, // value: [2022, 02, 22] // } borderRadius = itemModel.get(['itemStyle', 'borderRadius']); focus = emphasisModel_1.get('focus'); blurScope = emphasisModel_1.get('blurScope'); emphasisDisabled = emphasisModel_1.get('disabled'); labelStatesModels = getLabelStatesModels(itemModel); } rect.shape.r = borderRadius; var rawValue = seriesModel.getRawValue(idx); var defaultText = '-'; if (rawValue && rawValue[2] != null) { defaultText = rawValue[2] + ''; } setLabelStyle(rect, labelStatesModels, { labelFetcher: seriesModel, labelDataIndex: idx, defaultOpacity: style.opacity, defaultText: defaultText }); rect.ensureState('emphasis').style = emphasisStyle; rect.ensureState('blur').style = blurStyle; rect.ensureState('select').style = selectStyle; toggleHoverEmphasis(rect, focus, blurScope, emphasisDisabled); rect.incremental = incremental; // PENDING if (incremental) { // Rect must use hover layer if it's incremental. rect.states.emphasis.hoverLayer = true; } group.add(rect); data.setItemGraphicEl(idx, rect); if (this._progressiveEls) { this._progressiveEls.push(rect); } } }; HeatmapView.prototype._renderOnGeo = function (geo, seriesModel, visualMapModel, api) { var inRangeVisuals = visualMapModel.targetVisuals.inRange; var outOfRangeVisuals = visualMapModel.targetVisuals.outOfRange; // if (!visualMapping) { // throw new Error('Data range must have color visuals'); // } var data = seriesModel.getData(); var hmLayer = this._hmLayer || this._hmLayer || new heatmap_HeatmapLayer(); hmLayer.blurSize = seriesModel.get('blurSize'); hmLayer.pointSize = seriesModel.get('pointSize'); hmLayer.minOpacity = seriesModel.get('minOpacity'); hmLayer.maxOpacity = seriesModel.get('maxOpacity'); var rect = geo.getViewRect().clone(); var roamTransform = geo.getRoamTransform(); rect.applyTransform(roamTransform); // Clamp on viewport var x = Math.max(rect.x, 0); var y = Math.max(rect.y, 0); var x2 = Math.min(rect.width + rect.x, api.getWidth()); var y2 = Math.min(rect.height + rect.y, api.getHeight()); var width = x2 - x; var height = y2 - y; var dims = [data.mapDimension('lng'), data.mapDimension('lat'), data.mapDimension('value')]; var points = data.mapArray(dims, function (lng, lat, value) { var pt = geo.dataToPoint([lng, lat]); pt[0] -= x; pt[1] -= y; pt.push(value); return pt; }); var dataExtent = visualMapModel.getExtent(); var isInRange = visualMapModel.type === 'visualMap.continuous' ? getIsInContinuousRange(dataExtent, visualMapModel.option.range) : getIsInPiecewiseRange(dataExtent, visualMapModel.getPieceList(), visualMapModel.option.selected); hmLayer.update(points, width, height, inRangeVisuals.color.getNormalizer(), { inRange: inRangeVisuals.color.getColorMapper(), outOfRange: outOfRangeVisuals.color.getColorMapper() }, isInRange); var img = new graphic_Image({ style: { width: width, height: height, x: x, y: y, image: hmLayer.canvas }, silent: true }); this.group.add(img); }; HeatmapView.type = 'heatmap'; return HeatmapView; }(Chart); /* harmony default export */ var heatmap_HeatmapView = (HeatmapView_HeatmapView); // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/heatmap/HeatmapSeries.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 HeatmapSeries_HeatmapSeriesModel = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(HeatmapSeriesModel, _super); function HeatmapSeriesModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = HeatmapSeriesModel.type; return _this; } HeatmapSeriesModel.prototype.getInitialData = function (option, ecModel) { return helper_createSeriesData(null, this, { generateCoord: 'value' }); }; HeatmapSeriesModel.prototype.preventIncremental = function () { var coordSysCreator = core_CoordinateSystem.get(this.get('coordinateSystem')); if (coordSysCreator && coordSysCreator.dimensions) { return coordSysCreator.dimensions[0] === 'lng' && coordSysCreator.dimensions[1] === 'lat'; } }; HeatmapSeriesModel.type = 'series.heatmap'; HeatmapSeriesModel.dependencies = ['grid', 'geo', 'calendar']; HeatmapSeriesModel.defaultOption = { coordinateSystem: 'cartesian2d', // zlevel: 0, z: 2, // Cartesian coordinate system // xAxisIndex: 0, // yAxisIndex: 0, // Geo coordinate system geoIndex: 0, blurSize: 30, pointSize: 20, maxOpacity: 1, minOpacity: 0, select: { itemStyle: { borderColor: '#212121' } } }; return HeatmapSeriesModel; }(Series); /* harmony default export */ var HeatmapSeries = (HeatmapSeries_HeatmapSeriesModel); // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/heatmap/install.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 heatmap_install_install(registers) { registers.registerChartView(heatmap_HeatmapView); registers.registerSeriesModel(HeatmapSeries); } // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/bar/PictorialBarView.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 shape_Circle(); var PictorialBarView_PictorialBarView = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(PictorialBarView, _super); function PictorialBarView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = PictorialBarView.type; return _this; } PictorialBarView.prototype.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.master.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 = PictorialBarView_getItemModel(data, dataIndex); var symbolMeta = getSymbolMeta(data, dataIndex, itemModel, opt); var bar = createBar(data, opt, symbolMeta); data.setItemGraphicEl(dataIndex, bar); group.add(bar); PictorialBarView_updateCommon(bar, opt, symbolMeta); }).update(function (newIndex, oldIndex) { var bar = oldData.getItemGraphicEl(oldIndex); if (!data.hasValue(newIndex)) { group.remove(bar); return; } var itemModel = PictorialBarView_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); PictorialBarView_updateCommon(bar, opt, symbolMeta); }).remove(function (dataIndex) { var bar = oldData.getItemGraphicEl(dataIndex); bar && removeBar(oldData, dataIndex, bar.__pictorialSymbolMeta.animationModel, bar); }).execute(); // Do clipping var clipPath = seriesModel.get('clip', true) ? createClipPath(seriesModel.coordinateSystem, false, seriesModel) : null; if (clipPath) { group.setClipPath(clipPath); } else { group.removeClipPath(); } this._data = data; return this.group; }; PictorialBarView.prototype.remove = function (ecModel, api) { var group = this.group; var data = this._data; if (ecModel.get('animation')) { if (data) { data.eachItemGraphicEl(function (bar) { removeBar(data, getECData(bar).dataIndex, ecModel, bar); }); } } else { group.removeAll(); } }; PictorialBarView.type = 'pictorialBar'; return PictorialBarView; }(Chart); // 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', style: data.getItemVisual(dataIndex, 'style'), symbolClip: symbolClip, symbolRepeat: symbolRepeat, symbolRepeatDirection: itemModel.get('symbolRepeatDirection'), symbolPatternSize: symbolPatternSize, rotation: rotation, animationModel: isAnimationEnabled ? itemModel : null, hoverScale: isAnimationEnabled && itemModel.get(['emphasis', 'scale']), 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 = normalizeSymbolOffset(itemModel.get('symbolOffset'), symbolSize); 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, outputSymbolMeta) { 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 (core_util["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]; } outputSymbolMeta.boundingLength = boundingLength; if (symbolRepeat) { outputSymbolMeta.repeatCutLength = layout[valueDim.wh]; } // if 'pxSign' means sign of pixel, it can't be zero, or symbolScale will be zero // and when borderWidth be settled, the actual linewidth will be NaN var isXAxis = valueDim.xy === 'x'; var isInverse = valueAxis.inverse; outputSymbolMeta.pxSign = isXAxis && !isInverse || !isXAxis && isInverse ? boundingLength >= 0 ? 1 : -1 : boundingLength > 0 ? 1 : -1; } 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, outputSymbolMeta) { var valueDim = opt.valueDim; var categoryDim = opt.categoryDim; var categorySize = Math.abs(layout[categoryDim.wh]); var symbolSize = data.getItemVisual(dataIndex, 'symbolSize'); var parsedSymbolSize; if (core_util["isArray"](symbolSize)) { parsedSymbolSize = symbolSize.slice(); } else { if (symbolSize == null) { // will parse to number below parsedSymbolSize = ['100%', '100%']; } else { parsedSymbolSize = [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. parsedSymbolSize[categoryDim.index] = number_parsePercent(parsedSymbolSize[categoryDim.index], categorySize); parsedSymbolSize[valueDim.index] = number_parsePercent(parsedSymbolSize[valueDim.index], symbolRepeat ? categorySize : Math.abs(boundingLength)); outputSymbolMeta.symbolSize = parsedSymbolSize; // If x or y is less than zero, show reversed shape. var symbolScale = outputSymbolMeta.symbolScale = [parsedSymbolSize[0] / symbolPatternSize, parsedSymbolSize[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, outputSymbolMeta) { // 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({ scaleX: symbolScale[0], scaleY: symbolScale[1], rotation: rotation }); pathForLineWidth.updateTransform(); valueLineWidth /= pathForLineWidth.getLineScale(); valueLineWidth *= symbolScale[opt.valueDim.index]; } outputSymbolMeta.valueLineWidth = valueLineWidth || 0; } function prepareLayoutInfo(itemModel, symbolSize, layout, symbolRepeat, symbolClip, symbolOffset, symbolPosition, valueLineWidth, boundingLength, repeatCutLength, opt, outputSymbolMeta) { var categoryDim = opt.categoryDim; var valueDim = opt.valueDim; var pxSign = outputSymbolMeta.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 = core_util["retrieve"](itemModel.get('symbolMargin'), '15%') + ''; var hasEndGap = false; if (symbolMargin.lastIndexOf('!') === symbolMargin.length - 1) { hasEndGap = true; symbolMargin = symbolMargin.slice(0, symbolMargin.length - 1); } var symbolMarginNumeric = number_parsePercent(symbolMargin, symbolSize[valueDim.index]); var uLenWithMargin = Math.max(unitLength + symbolMarginNumeric * 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 : symbolMarginNumeric * 2; // Both final repeatTimes and final symbolMarginNumeric 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; symbolMarginNumeric = mDiff / 2 / (hasEndGap ? repeatTimes : Math.max(repeatTimes - 1, 1)); uLenWithMargin = unitLength + symbolMarginNumeric * 2; endFix = hasEndGap ? 0 : symbolMarginNumeric * 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; outputSymbolMeta.repeatTimes = repeatTimes; outputSymbolMeta.symbolMargin = symbolMarginNumeric; } var sizeFix = pxSign * (pathLen / 2); var pathPosition = outputSymbolMeta.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 = outputSymbolMeta.bundlePosition = []; bundlePosition[categoryDim.index] = layout[categoryDim.xy]; bundlePosition[valueDim.index] = layout[valueDim.xy]; var barRectShape = outputSymbolMeta.barRectShape = core_util["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 = outputSymbolMeta.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 = symbol_createSymbol( // Consider texture img, make a big size. symbolMeta.symbolType, -symbolPatternSize / 2, -symbolPatternSize / 2, symbolPatternSize, symbolPatternSize); 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) { PictorialBarView_updateAttr(path, null, makeTarget(index), symbolMeta, isUpdate); } else { PictorialBarView_updateAttr(path, null, { scaleX: 0, scaleY: 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); PictorialBarView_updateAttr(path, { x: target.x, y: target.y, scaleX: 0, scaleY: 0 }, { scaleX: target.scaleX, scaleY: target.scaleY, rotation: target.rotation }, symbolMeta, isUpdate); } 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 { x: position[0], y: position[1], scaleX: symbolMeta.symbolScale[0], scaleY: symbolMeta.symbolScale[1], rotation: symbolMeta.rotation }; } } function createOrUpdateSingleSymbol(bar, opt, symbolMeta, isUpdate) { var bundle = bar.__pictorialBundle; var mainPath = bar.__pictorialMainPath; if (!mainPath) { mainPath = bar.__pictorialMainPath = createPath(symbolMeta); bundle.add(mainPath); PictorialBarView_updateAttr(mainPath, { x: symbolMeta.pathPosition[0], y: symbolMeta.pathPosition[1], scaleX: 0, scaleY: 0, rotation: symbolMeta.rotation }, { scaleX: symbolMeta.symbolScale[0], scaleY: symbolMeta.symbolScale[1] }, symbolMeta, isUpdate); } else { PictorialBarView_updateAttr(mainPath, null, { x: symbolMeta.pathPosition[0], y: symbolMeta.pathPosition[1], scaleX: symbolMeta.symbolScale[0], scaleY: symbolMeta.symbolScale[1], rotation: symbolMeta.rotation }, symbolMeta, isUpdate); } } // bar rect is used for label. function createOrUpdateBarRect(bar, symbolMeta, isUpdate) { var rectShape = core_util["extend"]({}, symbolMeta.barRectShape); var barRect = bar.__pictorialBarRect; if (!barRect) { barRect = bar.__pictorialBarRect = new shape_Rect({ z2: 2, shape: rectShape, silent: true, style: { stroke: 'transparent', fill: 'transparent', lineWidth: 0 } }); barRect.disableMorphing = true; bar.add(barRect); } else { PictorialBarView_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 = core_util["extend"]({}, symbolMeta.clipShape); var valueDim = opt.valueDim; var animationModel = symbolMeta.animationModel; var dataIndex = symbolMeta.dataIndex; if (clipPath) { updateProps(clipPath, { shape: clipShape }, animationModel, dataIndex); } else { clipShape[valueDim.wh] = 0; clipPath = new shape_Rect({ shape: clipShape }); bar.__pictorialBundle.setClipPath(clipPath); bar.__pictorialClipPath = clipPath; var target = {}; target[valueDim.wh] = symbolMeta.clipShape[valueDim.wh]; graphic_namespaceObject[isUpdate ? 'updateProps' : 'initProps'](clipPath, { shape: target }, animationModel, dataIndex); } } } function PictorialBarView_getItemModel(data, dataIndex) { var itemModel = data.getItemModel(dataIndex); itemModel.getAnimationDelayParams = getAnimationDelayParams; itemModel.isAnimationEnabled = PictorialBarView_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 PictorialBarView_isAnimationEnabled() { // `animation` prop can be set on itemModel in pictorial bar chart. return this.parentModel.isAnimationEnabled() && !!this.getShallow('animation'); } 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.x = symbolMeta.bundlePosition[0]; bundle.y = symbolMeta.bundlePosition[1]; 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; updateProps(bundle, { x: symbolMeta.bundlePosition[0], y: symbolMeta.bundlePosition[1] }, 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.removeTextContent(); var paths = []; eachPath(bar, function (path) { paths.push(path); }); bar.__pictorialMainPath && paths.push(bar.__pictorialMainPath); // I do not find proper remove animation for clip yet. bar.__pictorialClipPath && (animationModel = null); core_util["each"](paths, function (path) { removeElement(path, { scaleX: 0, scaleY: 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. core_util["each"](bar.__pictorialBundle.children(), function (el) { el !== bar.__pictorialBarRect && cb.call(context, el); }); } function PictorialBarView_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_namespaceObject[isUpdate ? 'updateProps' : 'initProps'](el, animationAttrs, symbolMeta.animationModel, symbolMeta.dataIndex, cb); } } function PictorialBarView_updateCommon(bar, opt, symbolMeta) { var dataIndex = symbolMeta.dataIndex; var itemModel = symbolMeta.itemModel; // Color must be excluded. // Because symbol provide setColor individually to set fill and stroke var emphasisModel = itemModel.getModel('emphasis'); var emphasisStyle = emphasisModel.getModel('itemStyle').getItemStyle(); var blurStyle = itemModel.getModel(['blur', 'itemStyle']).getItemStyle(); var selectStyle = itemModel.getModel(['select', 'itemStyle']).getItemStyle(); var cursorStyle = itemModel.getShallow('cursor'); var focus = emphasisModel.get('focus'); var blurScope = emphasisModel.get('blurScope'); var hoverScale = emphasisModel.get('scale'); eachPath(bar, function (path) { if (path instanceof graphic_Image) { var pathStyle = path.style; path.useStyle(core_util["extend"]({ // TODO other properties like dx, dy ? image: pathStyle.image, x: pathStyle.x, y: pathStyle.y, width: pathStyle.width, height: pathStyle.height }, symbolMeta.style)); } else { path.useStyle(symbolMeta.style); } var emphasisState = path.ensureState('emphasis'); emphasisState.style = emphasisStyle; if (hoverScale) { // NOTE: Must after scale is set after updateAttr emphasisState.scaleX = path.scaleX * 1.1; emphasisState.scaleY = path.scaleY * 1.1; } path.ensureState('blur').style = blurStyle; path.ensureState('select').style = selectStyle; cursorStyle && (path.cursor = cursorStyle); path.z2 = symbolMeta.z2; }); var barPositionOutside = opt.valueDim.posDesc[+(symbolMeta.boundingLength > 0)]; var barRect = bar.__pictorialBarRect; barRect.ignoreClip = true; setLabelStyle(barRect, getLabelStatesModels(itemModel), { labelFetcher: opt.seriesModel, labelDataIndex: dataIndex, defaultText: getDefaultLabel(opt.seriesModel.getData(), dataIndex), inheritColor: symbolMeta.style.fill, defaultOpacity: symbolMeta.style.opacity, defaultOutsidePosition: barPositionOutside }); toggleHoverEmphasis(bar, focus, blurScope, emphasisModel.get('disabled')); } function toIntTimes(times) { var roundedTimes = Math.round(times); // Escapse accurate error return Math.abs(times - roundedTimes) < 1e-4 ? roundedTimes : Math.ceil(times); } /* harmony default export */ var bar_PictorialBarView = (PictorialBarView_PictorialBarView); // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/bar/PictorialBarSeries.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 PictorialBarSeries_PictorialBarSeriesModel = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(PictorialBarSeriesModel, _super); function PictorialBarSeriesModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = PictorialBarSeriesModel.type; _this.hasSymbolVisual = true; _this.defaultSymbol = 'roundRect'; return _this; } PictorialBarSeriesModel.prototype.getInitialData = function (option) { // Disable stack. option.stack = null; return _super.prototype.getInitialData.apply(this, arguments); }; PictorialBarSeriesModel.type = 'series.pictorialBar'; PictorialBarSeriesModel.dependencies = ['grid']; PictorialBarSeriesModel.defaultOption = inheritDefaultOption(BaseBarSeries.defaultOption, { symbol: 'circle', symbolSize: null, symbolRotate: null, symbolPosition: null, symbolOffset: null, symbolMargin: null, symbolRepeat: false, symbolRepeatDirection: 'end', symbolClip: false, symbolBoundingData: null, symbolPatternSize: 400, barGap: '-100%', // Pictorial bar do not clip by default because in many cases // xAxis and yAxis are not displayed and it's expected not to clip clip: false, // z can be set in data item, which is z2 actually. // Disable progressive progressive: 0, emphasis: { // By default pictorialBar do not hover scale. Hover scale is not suitable // for the case that both has foreground and background. scale: false }, select: { itemStyle: { borderColor: '#212121' } } }); return PictorialBarSeriesModel; }(BaseBarSeries); /* harmony default export */ var PictorialBarSeries = (PictorialBarSeries_PictorialBarSeriesModel); // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/bar/installPictorialBar.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 installPictorialBar_install(registers) { registers.registerChartView(bar_PictorialBarView); registers.registerSeriesModel(PictorialBarSeries); registers.registerLayout(registers.PRIORITY.VISUAL.LAYOUT, Object(core_util["curry"])(barGrid_layout, 'pictorialBar')); // Do layout after other overall layout, which can prepare some information. registers.registerLayout(registers.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT, createProgressiveLayout('pictorialBar')); } // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/themeRiver/ThemeRiverView.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 ThemeRiverView_ThemeRiverView = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(ThemeRiverView, _super); function ThemeRiverView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = ThemeRiverView.type; _this._layers = []; return _this; } ThemeRiverView.prototype.render = function (seriesModel, ecModel, api) { var data = seriesModel.getData(); var self = this; var group = this.group; var layersSeries = seriesModel.getLayerSeries(); var layoutInfo = data.getLayout('layoutInfo'); var rect = layoutInfo.rect; var boundaryGap = layoutInfo.boundaryGap; group.x = 0; group.y = rect.y + boundaryGap[0]; function keyGetter(item) { return item.name; } var dataDiffer = new data_DataDiffer(this._layersSeries || [], layersSeries, keyGetter, keyGetter); var newLayersGroups = []; dataDiffer.add(Object(core_util["bind"])(process, this, 'add')).update(Object(core_util["bind"])(process, this, 'update')).remove(Object(core_util["bind"])(process, this, 'remove')).execute(); function process(status, idx, oldIdx) { var oldLayersGroups = self._layers; if (status === 'remove') { group.remove(oldLayersGroups[idx]); return; } var points0 = []; var points1 = []; var style; var indices = layersSeries[idx].indices; var j = 0; for (; j < indices.length; j++) { var layout = data.getItemLayout(indices[j]); var x = layout.x; var y0 = layout.y0; var y = layout.y; points0.push(x, y0); points1.push(x, y0 + y); style = data.getItemVisual(indices[j], 'style'); } var polygon; var textLayout = data.getItemLayout(indices[0]); var labelModel = seriesModel.getModel('label'); var margin = labelModel.get('margin'); var emphasisModel = seriesModel.getModel('emphasis'); if (status === 'add') { var layerGroup = newLayersGroups[idx] = new graphic_Group(); polygon = new poly_ECPolygon({ shape: { points: points0, stackedOnPoints: points1, smooth: 0.4, stackedOnSmooth: 0.4, smoothConstraint: false }, z2: 0 }); layerGroup.add(polygon); group.add(layerGroup); if (seriesModel.isAnimationEnabled()) { polygon.setClipPath(ThemeRiverView_createGridClipShape(polygon.getBoundingRect(), seriesModel, function () { polygon.removeClipPath(); })); } } else { var layerGroup = oldLayersGroups[oldIdx]; polygon = layerGroup.childAt(0); group.add(layerGroup); newLayersGroups[idx] = layerGroup; updateProps(polygon, { shape: { points: points0, stackedOnPoints: points1 } }, seriesModel); saveOldStyle(polygon); } setLabelStyle(polygon, getLabelStatesModels(seriesModel), { labelDataIndex: indices[j - 1], defaultText: data.getName(indices[j - 1]), inheritColor: style.fill }, { normal: { verticalAlign: 'middle' // align: 'right' } }); polygon.setTextConfig({ position: null, local: true }); var labelEl = polygon.getTextContent(); // TODO More label position options. if (labelEl) { labelEl.x = textLayout.x - margin; labelEl.y = textLayout.y0 + textLayout.y / 2; } polygon.useStyle(style); data.setItemGraphicEl(idx, polygon); setStatesStylesFromModel(polygon, seriesModel); toggleHoverEmphasis(polygon, emphasisModel.get('focus'), emphasisModel.get('blurScope'), emphasisModel.get('disabled')); } this._layersSeries = layersSeries; this._layers = newLayersGroups; }; ThemeRiverView.type = 'themeRiver'; return ThemeRiverView; }(Chart); ; // add animation to the view function ThemeRiverView_createGridClipShape(rect, seriesModel, cb) { var rectEl = new shape_Rect({ shape: { x: rect.x - 10, y: rect.y - 10, width: 0, height: rect.height + 20 } }); initProps(rectEl, { shape: { x: rect.x - 50, width: rect.width + 100, height: rect.height + 20 } }, seriesModel, cb); return rectEl; } /* harmony default export */ var themeRiver_ThemeRiverView = (ThemeRiverView_ThemeRiverView); // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/themeRiver/ThemeRiverSeries.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 DATA_NAME_INDEX = 2; var ThemeRiverSeries_ThemeRiverSeriesModel = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(ThemeRiverSeriesModel, _super); function ThemeRiverSeriesModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = ThemeRiverSeriesModel.type; return _this; } /** * @override */ ThemeRiverSeriesModel.prototype.init = function (option) { // eslint-disable-next-line _super.prototype.init.apply(this, arguments); // Put this function here is for the sake of consistency of code style. // Enable legend selection for each data item // Use a function instead of direct access because data reference may changed this.legendVisualProvider = new visual_LegendVisualProvider(core_util["bind"](this.getData, this), core_util["bind"](this.getRawData, this)); }; /** * If there is no value of a certain point in the time for some event,set it value to 0. * * @param {Array} data initial data in the option * @return {Array} */ ThemeRiverSeriesModel.prototype.fixData = function (data) { var rawDataLength = data.length; /** * Make sure every layer data get the same keys. * The value index tells which layer has visited. * { * 2014/01/01: -1 * } */ var timeValueKeys = {}; // grouped data by name var groupResult = groupData(data, function (item) { if (!timeValueKeys.hasOwnProperty(item[0] + '')) { timeValueKeys[item[0] + ''] = -1; } return item[2]; }); var layerData = []; groupResult.buckets.each(function (items, key) { layerData.push({ name: key, dataList: items }); }); var layerNum = layerData.length; for (var k = 0; k < layerNum; ++k) { var name_1 = layerData[k].name; for (var j = 0; j < layerData[k].dataList.length; ++j) { var timeValue = layerData[k].dataList[j][0] + ''; timeValueKeys[timeValue] = k; } for (var timeValue in timeValueKeys) { if (timeValueKeys.hasOwnProperty(timeValue) && timeValueKeys[timeValue] !== k) { timeValueKeys[timeValue] = k; data[rawDataLength] = [timeValue, 0, name_1]; rawDataLength++; } } } return data; }; /** * @override * @param option the initial option that user gave * @param ecModel the model object for themeRiver option */ ThemeRiverSeriesModel.prototype.getInitialData = function (option, ecModel) { var singleAxisModel = this.getReferringComponents('singleAxis', SINGLE_REFERRING).models[0]; var axisType = singleAxisModel.get('type'); // filter the data item with the value of label is undefined var filterData = core_util["filter"](option.data, function (dataItem) { return dataItem[2] !== undefined; }); // ??? TODO design a stage to transfer data for themeRiver and lines? var data = this.fixData(filterData || []); var nameList = []; var nameMap = this.nameMap = core_util["createHashMap"](); var count = 0; for (var i = 0; i < data.length; ++i) { nameList.push(data[i][DATA_NAME_INDEX]); if (!nameMap.get(data[i][DATA_NAME_INDEX])) { nameMap.set(data[i][DATA_NAME_INDEX], count); count++; } } var dimensions = prepareSeriesDataSchema(data, { coordDimensions: ['single'], dimensionsDefine: [{ name: 'time', type: getDimensionTypeByAxis(axisType) }, { name: 'value', type: 'float' }, { name: 'name', type: 'ordinal' }], encodeDefine: { single: 0, value: 1, itemName: 2 } }).dimensions; var list = new data_SeriesData(dimensions, this); list.initData(data); return list; }; /** * The raw data is divided into multiple layers and each layer * has same name. */ ThemeRiverSeriesModel.prototype.getLayerSeries = function () { var data = this.getData(); var lenCount = data.count(); var indexArr = []; for (var i = 0; i < lenCount; ++i) { indexArr[i] = i; } var timeDim = data.mapDimension('single'); // data group by name var groupResult = groupData(indexArr, function (index) { return data.get('name', index); }); var layerSeries = []; groupResult.buckets.each(function (items, key) { items.sort(function (index1, index2) { return data.get(timeDim, index1) - data.get(timeDim, index2); }); layerSeries.push({ name: key, indices: items }); }); return layerSeries; }; /** * Get data indices for show tooltip content */ ThemeRiverSeriesModel.prototype.getAxisTooltipData = function (dim, value, baseAxis) { if (!core_util["isArray"](dim)) { dim = dim ? [dim] : []; } var data = this.getData(); var layerSeries = this.getLayerSeries(); var indices = []; var layerNum = layerSeries.length; var nestestValue; for (var i = 0; i < layerNum; ++i) { var minDist = Number.MAX_VALUE; var nearestIdx = -1; var pointNum = layerSeries[i].indices.length; for (var j = 0; j < pointNum; ++j) { var theValue = data.get(dim[0], layerSeries[i].indices[j]); var dist = Math.abs(theValue - value); if (dist <= minDist) { nestestValue = theValue; minDist = dist; nearestIdx = layerSeries[i].indices[j]; } } indices.push(nearestIdx); } return { dataIndices: indices, nestestValue: nestestValue }; }; ThemeRiverSeriesModel.prototype.formatTooltip = function (dataIndex, multipleSeries, dataType) { var data = this.getData(); var name = data.getName(dataIndex); var value = data.get(data.mapDimension('value'), dataIndex); return createTooltipMarkup('nameValue', { name: name, value: value }); }; ThemeRiverSeriesModel.type = 'series.themeRiver'; ThemeRiverSeriesModel.dependencies = ['singleAxis']; ThemeRiverSeriesModel.defaultOption = { // zlevel: 0, z: 2, colorBy: 'data', coordinateSystem: 'singleAxis', // gap in axis's orthogonal orientation boundaryGap: ['10%', '10%'], // legendHoverLink: true, singleAxisIndex: 0, animationEasing: 'linear', label: { margin: 4, show: true, position: 'left', fontSize: 11 }, emphasis: { label: { show: true } } }; return ThemeRiverSeriesModel; }(Series); /* harmony default export */ var ThemeRiverSeries = (ThemeRiverSeries_ThemeRiverSeriesModel); // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/themeRiver/themeRiverLayout.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 themeRiverLayout(ecModel, api) { ecModel.eachSeriesByType('themeRiver', function (seriesModel) { var data = seriesModel.getData(); var single = seriesModel.coordinateSystem; var layoutInfo = {}; // use the axis boundingRect for view var rect = single.getRect(); layoutInfo.rect = rect; var boundaryGap = seriesModel.get('boundaryGap'); var axis = single.getAxis(); layoutInfo.boundaryGap = boundaryGap; if (axis.orient === 'horizontal') { boundaryGap[0] = number_parsePercent(boundaryGap[0], rect.height); boundaryGap[1] = number_parsePercent(boundaryGap[1], rect.height); var height = rect.height - boundaryGap[0] - boundaryGap[1]; doThemeRiverLayout(data, seriesModel, height); } else { boundaryGap[0] = number_parsePercent(boundaryGap[0], rect.width); boundaryGap[1] = number_parsePercent(boundaryGap[1], rect.width); var width = rect.width - boundaryGap[0] - boundaryGap[1]; doThemeRiverLayout(data, seriesModel, width); } data.setLayout('layoutInfo', layoutInfo); }); } /** * The layout information about themeriver * * @param data data in the series * @param seriesModel the model object of themeRiver series * @param height value used to compute every series height */ function doThemeRiverLayout(data, seriesModel, height) { if (!data.count()) { return; } var coordSys = seriesModel.coordinateSystem; // the data in each layer are organized into a series. var layerSeries = seriesModel.getLayerSeries(); // the points in each layer. var timeDim = data.mapDimension('single'); var valueDim = data.mapDimension('value'); var layerPoints = core_util["map"](layerSeries, function (singleLayer) { return core_util["map"](singleLayer.indices, function (idx) { var pt = coordSys.dataToPoint(data.get(timeDim, idx)); pt[1] = data.get(valueDim, idx); return pt; }); }); var base = computeBaseline(layerPoints); var baseLine = base.y0; var ky = height / base.max; // set layout information for each item. var n = layerSeries.length; var m = layerSeries[0].indices.length; var baseY0; for (var j = 0; j < m; ++j) { baseY0 = baseLine[j] * ky; data.setItemLayout(layerSeries[0].indices[j], { layerIndex: 0, x: layerPoints[0][j][0], y0: baseY0, y: layerPoints[0][j][1] * ky }); for (var i = 1; i < n; ++i) { baseY0 += layerPoints[i - 1][j][1] * ky; data.setItemLayout(layerSeries[i].indices[j], { layerIndex: i, x: layerPoints[i][j][0], y0: baseY0, y: layerPoints[i][j][1] * ky }); } } } /** * Compute the baseLine of the rawdata * Inspired by Lee Byron's paper Stacked Graphs - Geometry & Aesthetics * * @param data the points in each layer */ function computeBaseline(data) { var layerNum = data.length; var pointNum = data[0].length; var sums = []; var y0 = []; var max = 0; for (var i = 0; i < pointNum; ++i) { var temp = 0; for (var j = 0; j < layerNum; ++j) { temp += data[j][i][1]; } if (temp > max) { max = temp; } sums.push(temp); } for (var k = 0; k < pointNum; ++k) { y0[k] = (max - sums[k]) / 2; } max = 0; for (var l = 0; l < pointNum; ++l) { var sum = sums[l] + y0[l]; if (sum > max) { max = sum; } } return { y0: y0, max: max }; } // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/themeRiver/install.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ function themeRiver_install_install(registers) { registers.registerChartView(themeRiver_ThemeRiverView); registers.registerSeriesModel(ThemeRiverSeries); registers.registerLayout(themeRiverLayout); registers.registerProcessor(dataFilter('themeRiver')); } // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/sunburst/SunburstPiece.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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_SECTOR_Z = 2; var DEFAULT_TEXT_Z = 4; /** * Sunburstce of Sunburst including Sector, Label, LabelLine */ var SunburstPiece_SunburstPiece = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(SunburstPiece, _super); function SunburstPiece(node, seriesModel, ecModel, api) { var _this = _super.call(this) || this; _this.z2 = DEFAULT_SECTOR_Z; _this.textConfig = { inside: true }; getECData(_this).seriesIndex = seriesModel.seriesIndex; var text = new Text({ z2: DEFAULT_TEXT_Z, silent: node.getModel().get(['label', 'silent']) }); _this.setTextContent(text); _this.updateData(true, node, seriesModel, ecModel, api); return _this; } SunburstPiece.prototype.updateData = function (firstCreate, node, // state: 'emphasis' | 'normal' | 'highlight' | 'downplay', seriesModel, ecModel, api) { this.node = node; node.piece = this; seriesModel = seriesModel || this._seriesModel; ecModel = ecModel || this._ecModel; var sector = this; getECData(sector).dataIndex = node.dataIndex; var itemModel = node.getModel(); var emphasisModel = itemModel.getModel('emphasis'); var layout = node.getLayout(); var sectorShape = core_util["extend"]({}, layout); sectorShape.label = null; var normalStyle = node.getVisual('style'); normalStyle.lineJoin = 'bevel'; var decal = node.getVisual('decal'); if (decal) { normalStyle.decal = createOrUpdatePatternFromDecal(decal, api); } var cornerRadius = getSectorCornerRadius(itemModel.getModel('itemStyle'), sectorShape, true); core_util["extend"](sectorShape, cornerRadius); core_util["each"](SPECIAL_STATES, function (stateName) { var state = sector.ensureState(stateName); var itemStyleModel = itemModel.getModel([stateName, 'itemStyle']); state.style = itemStyleModel.getItemStyle(); // border radius var cornerRadius = getSectorCornerRadius(itemStyleModel, sectorShape); if (cornerRadius) { state.shape = cornerRadius; } }); if (firstCreate) { sector.setShape(sectorShape); sector.shape.r = layout.r0; initProps(sector, { shape: { r: layout.r } }, seriesModel, node.dataIndex); } else { // Disable animation for gradient since no interpolation method // is supported for gradient updateProps(sector, { shape: sectorShape }, seriesModel); saveOldStyle(sector); } sector.useStyle(normalStyle); this._updateLabel(seriesModel); var cursorStyle = itemModel.getShallow('cursor'); cursorStyle && sector.attr('cursor', cursorStyle); this._seriesModel = seriesModel || this._seriesModel; this._ecModel = ecModel || this._ecModel; var focus = emphasisModel.get('focus'); var focusOrIndices = focus === 'relative' ? core_util["concatArray"](node.getAncestorsIndices(), node.getDescendantIndices()) : focus === 'ancestor' ? node.getAncestorsIndices() : focus === 'descendant' ? node.getDescendantIndices() : focus; toggleHoverEmphasis(this, focusOrIndices, emphasisModel.get('blurScope'), emphasisModel.get('disabled')); }; SunburstPiece.prototype._updateLabel = function (seriesModel) { var _this = this; var itemModel = this.node.getModel(); var normalLabelModel = itemModel.getModel('label'); var layout = this.node.getLayout(); var angle = layout.endAngle - layout.startAngle; var midAngle = (layout.startAngle + layout.endAngle) / 2; var dx = Math.cos(midAngle); var dy = Math.sin(midAngle); var sector = this; var label = sector.getTextContent(); var dataIndex = this.node.dataIndex; var labelMinAngle = normalLabelModel.get('minAngle') / 180 * Math.PI; var isNormalShown = normalLabelModel.get('show') && !(labelMinAngle != null && Math.abs(angle) < labelMinAngle); label.ignore = !isNormalShown; // TODO use setLabelStyle core_util["each"](DISPLAY_STATES, function (stateName) { var labelStateModel = stateName === 'normal' ? itemModel.getModel('label') : itemModel.getModel([stateName, 'label']); var isNormal = stateName === 'normal'; var state = isNormal ? label : label.ensureState(stateName); var text = seriesModel.getFormattedLabel(dataIndex, stateName); if (isNormal) { text = text || _this.node.name; } state.style = createTextStyle(labelStateModel, {}, null, stateName !== 'normal', true); if (text) { state.style.text = text; } // Not displaying text when angle is too small var isShown = labelStateModel.get('show'); if (isShown != null && !isNormal) { state.ignore = !isShown; } var labelPosition = getLabelAttr(labelStateModel, 'position'); var sectorState = isNormal ? sector : sector.states[stateName]; var labelColor = sectorState.style.fill; sectorState.textConfig = { outsideFill: labelStateModel.get('color') === 'inherit' ? labelColor : null, inside: labelPosition !== 'outside' }; var r; var labelPadding = getLabelAttr(labelStateModel, 'distance') || 0; var textAlign = getLabelAttr(labelStateModel, 'align'); var rotateType = getLabelAttr(labelStateModel, 'rotate'); var flipStartAngle = Math.PI * 0.5; var flipEndAngle = Math.PI * 1.5; var midAngleNormal = normalizeRadian(rotateType === 'tangential' ? Math.PI / 2 - midAngle : midAngle); // For text that is up-side down, rotate 180 degrees to make sure // it's readable var needsFlip = midAngleNormal > flipStartAngle && !isRadianAroundZero(midAngleNormal - flipStartAngle) && midAngleNormal < flipEndAngle; if (labelPosition === 'outside') { r = layout.r + labelPadding; textAlign = needsFlip ? 'right' : 'left'; } else { if (!textAlign || textAlign === 'center') { // Put label in the center if it's a circle if (angle === 2 * Math.PI && layout.r0 === 0) { r = 0; } else { r = (layout.r + layout.r0) / 2; } textAlign = 'center'; } else if (textAlign === 'left') { r = layout.r0 + labelPadding; textAlign = needsFlip ? 'right' : 'left'; } else if (textAlign === 'right') { r = layout.r - labelPadding; textAlign = needsFlip ? 'left' : 'right'; } } state.style.align = textAlign; state.style.verticalAlign = getLabelAttr(labelStateModel, 'verticalAlign') || 'middle'; state.x = r * dx + layout.cx; state.y = r * dy + layout.cy; var rotate = 0; if (rotateType === 'radial') { rotate = normalizeRadian(-midAngle) + (needsFlip ? Math.PI : 0); } else if (rotateType === 'tangential') { rotate = normalizeRadian(Math.PI / 2 - midAngle) + (needsFlip ? Math.PI : 0); } else if (core_util["isNumber"](rotateType)) { rotate = rotateType * Math.PI / 180; } state.rotation = normalizeRadian(rotate); }); function getLabelAttr(model, name) { var stateAttr = model.get(name); if (stateAttr == null) { return normalLabelModel.get(name); } return stateAttr; } label.dirtyStyle(); }; return SunburstPiece; }(shape_Sector); /* harmony default export */ var sunburst_SunburstPiece = (SunburstPiece_SunburstPiece); // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/sunburst/sunburstAction.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 ROOT_TO_NODE_ACTION = 'sunburstRootToNode'; var HIGHLIGHT_ACTION = 'sunburstHighlight'; var UNHIGHLIGHT_ACTION = 'sunburstUnhighlight'; function installSunburstAction(registers) { registers.registerAction({ type: ROOT_TO_NODE_ACTION, update: 'updateView' }, function (payload, ecModel) { ecModel.eachComponent({ mainType: 'series', subType: 'sunburst', query: payload }, handleRootToNode); function handleRootToNode(model, index) { var targetInfo = retrieveTargetInfo(payload, [ROOT_TO_NODE_ACTION], model); if (targetInfo) { var originViewRoot = model.getViewRoot(); if (originViewRoot) { payload.direction = aboveViewRoot(originViewRoot, targetInfo.node) ? 'rollUp' : 'drillDown'; } model.resetViewRoot(targetInfo.node); } } }); registers.registerAction({ type: HIGHLIGHT_ACTION, update: 'none' }, function (payload, ecModel, api) { // Clone payload = Object(core_util["extend"])({}, payload); ecModel.eachComponent({ mainType: 'series', subType: 'sunburst', query: payload }, handleHighlight); function handleHighlight(model) { var targetInfo = retrieveTargetInfo(payload, [HIGHLIGHT_ACTION], model); if (targetInfo) { payload.dataIndex = targetInfo.node.dataIndex; } } if (false) { deprecateReplaceLog('sunburstHighlight', 'highlight'); } // Fast forward action api.dispatchAction(Object(core_util["extend"])(payload, { type: 'highlight' })); }); registers.registerAction({ type: UNHIGHLIGHT_ACTION, update: 'updateView' }, function (payload, ecModel, api) { payload = Object(core_util["extend"])({}, payload); if (false) { deprecateReplaceLog('sunburstUnhighlight', 'downplay'); } api.dispatchAction(Object(core_util["extend"])(payload, { type: 'downplay' })); }); } // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/sunburst/SunburstView.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 SunburstView_SunburstView = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(SunburstView, _super); function SunburstView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = SunburstView.type; return _this; } SunburstView.prototype.render = function (seriesModel, ecModel, api, // @ts-ignore payload) { var self = this; this.seriesModel = seriesModel; this.api = api; this.ecModel = ecModel; var data = seriesModel.getData(); var virtualRoot = data.tree.root; var newRoot = seriesModel.getViewRoot(); var group = this.group; var renderLabelForZeroData = seriesModel.get('renderLabelForZeroData'); var newChildren = []; newRoot.eachNode(function (node) { newChildren.push(node); }); var oldChildren = this._oldChildren || []; dualTravel(newChildren, oldChildren); renderRollUp(virtualRoot, newRoot); this._initEvents(); this._oldChildren = newChildren; function dualTravel(newChildren, oldChildren) { if (newChildren.length === 0 && oldChildren.length === 0) { return; } new data_DataDiffer(oldChildren, newChildren, getKey, getKey).add(processNode).update(processNode).remove(core_util["curry"](processNode, null)).execute(); function getKey(node) { return node.getId(); } function processNode(newIdx, oldIdx) { var newNode = newIdx == null ? null : newChildren[newIdx]; var oldNode = oldIdx == null ? null : oldChildren[oldIdx]; doRenderNode(newNode, oldNode); } } function doRenderNode(newNode, oldNode) { if (!renderLabelForZeroData && newNode && !newNode.getValue()) { // Not render data with value 0 newNode = null; } if (newNode !== virtualRoot && oldNode !== virtualRoot) { if (oldNode && oldNode.piece) { if (newNode) { // Update oldNode.piece.updateData(false, newNode, seriesModel, ecModel, api); // For tooltip data.setItemGraphicEl(newNode.dataIndex, oldNode.piece); } else { // Remove removeNode(oldNode); } } else if (newNode) { // Add var piece = new sunburst_SunburstPiece(newNode, seriesModel, ecModel, api); group.add(piece); // For tooltip data.setItemGraphicEl(newNode.dataIndex, piece); } } } function removeNode(node) { if (!node) { return; } if (node.piece) { group.remove(node.piece); node.piece = null; } } function renderRollUp(virtualRoot, viewRoot) { if (viewRoot.depth > 0) { // Render if (self.virtualPiece) { // Update self.virtualPiece.updateData(false, virtualRoot, seriesModel, ecModel, api); } else { // Add self.virtualPiece = new sunburst_SunburstPiece(virtualRoot, seriesModel, ecModel, api); group.add(self.virtualPiece); } // TODO event scope viewRoot.piece.off('click'); self.virtualPiece.on('click', function (e) { self._rootToNode(viewRoot.parentNode); }); } else if (self.virtualPiece) { // Remove group.remove(self.virtualPiece); self.virtualPiece = null; } } }; /** * @private */ SunburstView.prototype._initEvents = function () { var _this = this; this.group.off('click'); this.group.on('click', function (e) { var targetFound = false; var viewRoot = _this.seriesModel.getViewRoot(); viewRoot.eachNode(function (node) { if (!targetFound && node.piece && node.piece === e.target) { var nodeClick = node.getModel().get('nodeClick'); if (nodeClick === 'rootToNode') { _this._rootToNode(node); } else if (nodeClick === 'link') { var itemModel = node.getModel(); var link = itemModel.get('link'); if (link) { var linkTarget = itemModel.get('target', true) || '_blank'; windowOpen(link, linkTarget); } } targetFound = true; } }); }); }; /** * @private */ SunburstView.prototype._rootToNode = function (node) { if (node !== this.seriesModel.getViewRoot()) { this.api.dispatchAction({ type: ROOT_TO_NODE_ACTION, from: this.uid, seriesId: this.seriesModel.id, targetNode: node }); } }; /** * @implement */ SunburstView.prototype.containPoint = function (point, seriesModel) { var treeRoot = seriesModel.getData(); var itemLayout = treeRoot.getItemLayout(0); if (itemLayout) { var dx = point[0] - itemLayout.cx; var dy = point[1] - itemLayout.cy; var radius = Math.sqrt(dx * dx + dy * dy); return radius <= itemLayout.r && radius >= itemLayout.r0; } }; SunburstView.type = 'sunburst'; return SunburstView; }(Chart); /* harmony default export */ var sunburst_SunburstView = (SunburstView_SunburstView); // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/sunburst/SunburstSeries.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 SunburstSeries_SunburstSeriesModel = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(SunburstSeriesModel, _super); function SunburstSeriesModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = SunburstSeriesModel.type; _this.ignoreStyleOnData = true; return _this; } SunburstSeriesModel.prototype.getInitialData = function (option, ecModel) { // Create a virtual root. var root = { name: option.name, children: option.data }; SunburstSeries_completeTreeValue(root); var levelModels = this._levelModels = core_util["map"](option.levels || [], function (levelDefine) { return new model_Model(levelDefine, this, ecModel); }, this); // Make sure always a new tree is created when setOption, // in TreemapView, we check whether oldTree === newTree // to choose mappings approach among old shapes and new shapes. var tree = data_Tree.createTree(root, this, beforeLink); function beforeLink(nodeData) { nodeData.wrapMethod('getItemModel', function (model, idx) { var node = tree.getNodeByDataIndex(idx); var levelModel = levelModels[node.depth]; levelModel && (model.parentModel = levelModel); return model; }); } return tree.data; }; SunburstSeriesModel.prototype.optionUpdated = function () { this.resetViewRoot(); }; /* * @override */ SunburstSeriesModel.prototype.getDataParams = function (dataIndex) { var params = _super.prototype.getDataParams.apply(this, arguments); var node = this.getData().tree.getNodeByDataIndex(dataIndex); params.treePathInfo = wrapTreePathInfo(node, this); return params; }; SunburstSeriesModel.prototype.getLevelModel = function (node) { return this._levelModels && this._levelModels[node.depth]; }; SunburstSeriesModel.prototype.getViewRoot = function () { return this._viewRoot; }; SunburstSeriesModel.prototype.resetViewRoot = function (viewRoot) { viewRoot ? this._viewRoot = viewRoot : viewRoot = this._viewRoot; var root = this.getRawData().tree.root; if (!viewRoot || viewRoot !== root && !root.contains(viewRoot)) { this._viewRoot = root; } }; SunburstSeriesModel.prototype.enableAriaDecal = function () { enableAriaDecalForTree(this); }; SunburstSeriesModel.type = 'series.sunburst'; SunburstSeriesModel.defaultOption = { // zlevel: 0, z: 2, // 默认全局居中 center: ['50%', '50%'], radius: [0, '75%'], // 默认顺时针 clockwise: true, startAngle: 90, // 最小角度改为0 minAngle: 0, // If still show when all data zero. stillShowZeroSum: true, // 'rootToNode', 'link', or false nodeClick: 'rootToNode', renderLabelForZeroData: false, label: { // could be: 'radial', 'tangential', or 'none' rotate: 'radial', show: true, opacity: 1, // 'left' is for inner side of inside, and 'right' is for outer // side for inside align: 'center', position: 'inside', distance: 5, silent: true }, itemStyle: { borderWidth: 1, borderColor: 'white', borderType: 'solid', shadowBlur: 0, shadowColor: 'rgba(0, 0, 0, 0.2)', shadowOffsetX: 0, shadowOffsetY: 0, opacity: 1 }, emphasis: { focus: 'descendant' }, blur: { itemStyle: { opacity: 0.2 }, label: { opacity: 0.1 } }, // Animation type can be expansion, scale. animationType: 'expansion', animationDuration: 1000, animationDurationUpdate: 500, data: [], /** * Sort order. * * Valid values: 'desc', 'asc', null, or callback function. * 'desc' and 'asc' for descend and ascendant order; * null for not sorting; * example of callback function: * function(nodeA, nodeB) { * return nodeA.getValue() - nodeB.getValue(); * } */ sort: 'desc' }; return SunburstSeriesModel; }(Series); function SunburstSeries_completeTreeValue(dataNode) { // Postorder travel tree. // If value of none-leaf node is not set, // calculate it by suming up the value of all children. var sum = 0; core_util["each"](dataNode.children, function (child) { SunburstSeries_completeTreeValue(child); var childValue = child.value; // TODO First value of array must be a number core_util["isArray"](childValue) && (childValue = childValue[0]); sum += childValue; }); var thisValue = dataNode.value; if (core_util["isArray"](thisValue)) { thisValue = thisValue[0]; } if (thisValue == null || isNaN(thisValue)) { thisValue = sum; } // Value should not less than 0. if (thisValue < 0) { thisValue = 0; } core_util["isArray"](dataNode.value) ? dataNode.value[0] = thisValue : dataNode.value = thisValue; } /* harmony default export */ var SunburstSeries = (SunburstSeries_SunburstSeriesModel); // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/sunburst/sunburstLayout.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ // let PI2 = Math.PI * 2; var sunburstLayout_RADIAN = Math.PI / 180; function sunburstLayout(seriesType, ecModel, api) { ecModel.eachSeriesByType(seriesType, function (seriesModel) { var center = seriesModel.get('center'); var radius = seriesModel.get('radius'); if (!core_util["isArray"](radius)) { radius = [0, radius]; } if (!core_util["isArray"](center)) { center = [center, center]; } var width = api.getWidth(); var height = api.getHeight(); var size = Math.min(width, height); var cx = number_parsePercent(center[0], width); var cy = number_parsePercent(center[1], height); var r0 = number_parsePercent(radius[0], size / 2); var r = number_parsePercent(radius[1], size / 2); var startAngle = -seriesModel.get('startAngle') * sunburstLayout_RADIAN; var minAngle = seriesModel.get('minAngle') * sunburstLayout_RADIAN; var virtualRoot = seriesModel.getData().tree.root; var treeRoot = seriesModel.getViewRoot(); var rootDepth = treeRoot.depth; var sort = seriesModel.get('sort'); if (sort != null) { sunburstLayout_initChildren(treeRoot, sort); } var validDataCount = 0; core_util["each"](treeRoot.children, function (child) { !isNaN(child.getValue()) && validDataCount++; }); var sum = treeRoot.getValue(); // Sum may be 0 var unitRadian = Math.PI / (sum || validDataCount) * 2; var renderRollupNode = treeRoot.depth > 0; var levels = treeRoot.height - (renderRollupNode ? -1 : 1); var rPerLevel = (r - r0) / (levels || 1); var clockwise = seriesModel.get('clockwise'); var stillShowZeroSum = seriesModel.get('stillShowZeroSum'); // In the case some sector angle is smaller than minAngle // let restAngle = PI2; // let valueSumLargerThanMinAngle = 0; var dir = clockwise ? 1 : -1; /** * Render a tree * @return increased angle */ var renderNode = function (node, startAngle) { if (!node) { return; } var endAngle = startAngle; // Render self if (node !== virtualRoot) { // Tree node is virtual, so it doesn't need to be drawn var value = node.getValue(); var angle = sum === 0 && stillShowZeroSum ? unitRadian : value * unitRadian; if (angle < minAngle) { angle = minAngle; // restAngle -= minAngle; } // else { // valueSumLargerThanMinAngle += value; // } endAngle = startAngle + dir * angle; var depth = node.depth - rootDepth - (renderRollupNode ? -1 : 1); var rStart = r0 + rPerLevel * depth; var rEnd = r0 + rPerLevel * (depth + 1); var levelModel = seriesModel.getLevelModel(node); if (levelModel) { var r0_1 = levelModel.get('r0', true); var r_1 = levelModel.get('r', true); var radius_1 = levelModel.get('radius', true); if (radius_1 != null) { r0_1 = radius_1[0]; r_1 = radius_1[1]; } r0_1 != null && (rStart = number_parsePercent(r0_1, size / 2)); r_1 != null && (rEnd = number_parsePercent(r_1, size / 2)); } node.setLayout({ angle: angle, startAngle: startAngle, endAngle: endAngle, clockwise: clockwise, cx: cx, cy: cy, r0: rStart, r: rEnd }); } // Render children if (node.children && node.children.length) { // currentAngle = startAngle; var siblingAngle_1 = 0; core_util["each"](node.children, function (node) { siblingAngle_1 += renderNode(node, startAngle + siblingAngle_1); }); } return endAngle - startAngle; }; // Virtual root node for roll up if (renderRollupNode) { var rStart = r0; var rEnd = r0 + rPerLevel; var angle = Math.PI * 2; virtualRoot.setLayout({ angle: angle, startAngle: startAngle, endAngle: startAngle + angle, clockwise: clockwise, cx: cx, cy: cy, r0: rStart, r: rEnd }); } renderNode(treeRoot, startAngle); }); } /** * Init node children by order and update visual */ function sunburstLayout_initChildren(node, sortOrder) { var children = node.children || []; node.children = sunburstLayout_sort(children, sortOrder); // Init children recursively if (children.length) { core_util["each"](node.children, function (child) { sunburstLayout_initChildren(child, sortOrder); }); } } /** * Sort children nodes * * @param {TreeNode[]} children children of node to be sorted * @param {string | function | null} sort sort method * See SunburstSeries.js for details. */ function sunburstLayout_sort(children, sortOrder) { if (core_util["isFunction"](sortOrder)) { var sortTargets = core_util["map"](children, function (child, idx) { var value = child.getValue(); return { params: { depth: child.depth, height: child.height, dataIndex: child.dataIndex, getValue: function () { return value; } }, index: idx }; }); sortTargets.sort(function (a, b) { return sortOrder(a.params, b.params); }); return core_util["map"](sortTargets, function (target) { return children[target.index]; }); } else { var isAsc_1 = sortOrder === 'asc'; return children.sort(function (a, b) { var diff = (a.getValue() - b.getValue()) * (isAsc_1 ? 1 : -1); return diff === 0 ? (a.dataIndex - b.dataIndex) * (isAsc_1 ? -1 : 1) : diff; }); } } // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/sunburst/sunburstVisual.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 sunburstVisual(ecModel) { var paletteScope = {}; // Default color strategy function pickColor(node, seriesModel, treeHeight) { // Choose color from palette based on the first level. var current = node; while (current && current.depth > 1) { current = current.parentNode; } var color = seriesModel.getColorFromPalette(current.name || current.dataIndex + '', paletteScope); if (node.depth > 1 && Object(core_util["isString"])(color)) { // Lighter on the deeper level. color = Object(tool_color["lift"])(color, (node.depth - 1) / (treeHeight - 1) * 0.5); } return color; } ecModel.eachSeriesByType('sunburst', function (seriesModel) { var data = seriesModel.getData(); var tree = data.tree; tree.eachNode(function (node) { var model = node.getModel(); var style = model.getModel('itemStyle').getItemStyle(); if (!style.fill) { style.fill = pickColor(node, seriesModel, tree.root.height); } var existsStyle = data.ensureUniqueItemVisual(node.dataIndex, 'style'); Object(core_util["extend"])(existsStyle, style); }); }); } // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/sunburst/install.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 sunburst_install_install(registers) { registers.registerChartView(sunburst_SunburstView); registers.registerSeriesModel(SunburstSeries); registers.registerLayout(Object(core_util["curry"])(sunburstLayout, 'sunburst')); registers.registerProcessor(Object(core_util["curry"])(dataFilter, 'sunburst')); registers.registerVisual(sunburstVisual); installSunburstAction(registers); } // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/custom/CustomSeries.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ // Also compat with ec4, where // `visual('color') visual('borderColor')` is supported. var STYLE_VISUAL_TYPE = { color: 'fill', borderColor: 'stroke' }; var NON_STYLE_VISUAL_PROPS = { symbol: 1, symbolSize: 1, symbolKeepAspect: 1, legendIcon: 1, visualMeta: 1, liftZ: 1, decal: 1 }; ; var customInnerStore = makeInner(); var CustomSeries_CustomSeriesModel = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(CustomSeriesModel, _super); function CustomSeriesModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = CustomSeriesModel.type; return _this; } CustomSeriesModel.prototype.optionUpdated = function () { this.currentZLevel = this.get('zlevel', true); this.currentZ = this.get('z', true); }; CustomSeriesModel.prototype.getInitialData = function (option, ecModel) { return helper_createSeriesData(null, this); }; CustomSeriesModel.prototype.getDataParams = function (dataIndex, dataType, el) { var params = _super.prototype.getDataParams.call(this, dataIndex, dataType); el && (params.info = customInnerStore(el).info); return params; }; CustomSeriesModel.type = 'series.custom'; CustomSeriesModel.dependencies = ['grid', 'polar', 'geo', 'singleAxis', 'calendar']; CustomSeriesModel.defaultOption = { coordinateSystem: 'cartesian2d', // zlevel: 0, z: 2, legendHoverLink: true, // Custom series will not clip by default. // Some case will use custom series to draw label // For example https://echarts.apache.org/examples/en/editor.html?c=custom-gantt-flight clip: false // Cartesian coordinate system // xAxisIndex: 0, // yAxisIndex: 0, // Polar coordinate system // polarIndex: 0, // Geo coordinate system // geoIndex: 0, }; return CustomSeriesModel; }(Series); /* harmony default export */ var CustomSeries = (CustomSeries_CustomSeriesModel); // CONCATENATED MODULE: ./node_modules/echarts/lib/coord/cartesian/prepareCustom.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 dataToCoordSize(dataSize, dataItem) { // dataItem is necessary in log axis. dataItem = dataItem || [0, 0]; return core_util["map"](['x', 'y'], function (dim, dimIdx) { var axis = this.getAxis(dim); var val = dataItem[dimIdx]; var halfSize = dataSize[dimIdx] / 2; return axis.type === 'category' ? axis.getBandWidth() : Math.abs(axis.dataToCoord(val - halfSize) - axis.dataToCoord(val + halfSize)); }, this); } function cartesianPrepareCustom(coordSys) { var rect = coordSys.master.getRect(); return { coordSys: { // The name exposed to user is always 'cartesian2d' but not 'grid'. type: 'cartesian2d', x: rect.x, y: rect.y, width: rect.width, height: rect.height }, api: { coord: function (data) { // do not provide "out" param return coordSys.dataToPoint(data); }, size: core_util["bind"](dataToCoordSize, coordSys) } }; } // CONCATENATED MODULE: ./node_modules/echarts/lib/coord/geo/prepareCustom.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 prepareCustom_dataToCoordSize(dataSize, dataItem) { dataItem = dataItem || [0, 0]; return core_util["map"]([0, 1], function (dimIdx) { var val = dataItem[dimIdx]; var halfSize = dataSize[dimIdx] / 2; var p1 = []; var p2 = []; p1[dimIdx] = val - halfSize; p2[dimIdx] = val + halfSize; p1[1 - dimIdx] = p2[1 - dimIdx] = dataItem[1 - dimIdx]; return Math.abs(this.dataToPoint(p1)[dimIdx] - this.dataToPoint(p2)[dimIdx]); }, this); } function geoPrepareCustom(coordSys) { var rect = coordSys.getBoundingRect(); return { coordSys: { type: 'geo', x: rect.x, y: rect.y, width: rect.width, height: rect.height, zoom: coordSys.getZoom() }, api: { coord: function (data) { // do not provide "out" and noRoam param, // Compatible with this usage: // echarts.util.map(item.points, api.coord) return coordSys.dataToPoint(data); }, size: core_util["bind"](prepareCustom_dataToCoordSize, coordSys) } }; } // CONCATENATED MODULE: ./node_modules/echarts/lib/coord/single/prepareCustom.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 single_prepareCustom_dataToCoordSize(dataSize, dataItem) { // dataItem is necessary in log axis. var axis = this.getAxis(); var val = dataItem instanceof Array ? dataItem[0] : dataItem; var halfSize = (dataSize instanceof Array ? dataSize[0] : dataSize) / 2; return axis.type === 'category' ? axis.getBandWidth() : Math.abs(axis.dataToCoord(val - halfSize) - axis.dataToCoord(val + halfSize)); } function singlePrepareCustom(coordSys) { var rect = coordSys.getRect(); return { coordSys: { type: 'singleAxis', x: rect.x, y: rect.y, width: rect.width, height: rect.height }, api: { coord: function (val) { // do not provide "out" param return coordSys.dataToPoint(val); }, size: Object(core_util["bind"])(single_prepareCustom_dataToCoordSize, coordSys) } }; } // CONCATENATED MODULE: ./node_modules/echarts/lib/coord/polar/prepareCustom.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ // import AngleAxis from './AngleAxis.js'; function polar_prepareCustom_dataToCoordSize(dataSize, dataItem) { // dataItem is necessary in log axis. dataItem = dataItem || [0, 0]; return core_util["map"](['Radius', 'Angle'], function (dim, dimIdx) { var getterName = 'get' + dim + 'Axis'; // TODO: TYPE Check Angle Axis var axis = this[getterName](); var val = dataItem[dimIdx]; var halfSize = dataSize[dimIdx] / 2; var result = axis.type === 'category' ? axis.getBandWidth() : Math.abs(axis.dataToCoord(val - halfSize) - axis.dataToCoord(val + halfSize)); if (dim === 'Angle') { result = result * Math.PI / 180; } return result; }, this); } function polarPrepareCustom(coordSys) { var radiusAxis = coordSys.getRadiusAxis(); var angleAxis = coordSys.getAngleAxis(); var radius = radiusAxis.getExtent(); radius[0] > radius[1] && radius.reverse(); return { coordSys: { type: 'polar', cx: coordSys.cx, cy: coordSys.cy, r: radius[1], r0: radius[0] }, api: { coord: function (data) { var radius = radiusAxis.dataToRadius(data[0]); var angle = angleAxis.dataToAngle(data[1]); var coord = coordSys.coordToPoint([radius, angle]); coord.push(radius, angle * Math.PI / 180); return coord; }, size: core_util["bind"](polar_prepareCustom_dataToCoordSize, coordSys) } }; } // CONCATENATED MODULE: ./node_modules/echarts/lib/coord/calendar/prepareCustom.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 calendarPrepareCustom(coordSys) { var rect = coordSys.getRect(); var rangeInfo = coordSys.getRangeInfo(); return { coordSys: { type: 'calendar', x: rect.x, y: rect.y, width: rect.width, height: rect.height, cellWidth: coordSys.getCellWidth(), cellHeight: coordSys.getCellHeight(), rangeInfo: { start: rangeInfo.start, end: rangeInfo.end, weeks: rangeInfo.weeks, dayCount: rangeInfo.allDay } }, api: { coord: function (data, clamp) { return coordSys.dataToPoint(data, clamp); } } }; } // CONCATENATED MODULE: ./node_modules/echarts/lib/util/styleCompat.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 deprecatedLogs = {}; /** * Whether need to call `convertEC4CompatibleStyle`. */ function isEC4CompatibleStyle(style, elType, hasOwnTextContentOption, hasOwnTextConfig) { // Since echarts5, `RectText` is separated from its host element and style.text // does not exist any more. The compat work brings some extra burden on performance. // So we provide: // `legacy: true` force make compat. // `legacy: false`, force do not compat. // `legacy` not set: auto detect whether legacy. // But in this case we do not compat (difficult to detect and rare case): // Becuse custom series and graphic component support "merge", users may firstly // only set `textStrokeWidth` style or secondly only set `text`. return style && (style.legacy || style.legacy !== false && !hasOwnTextContentOption && !hasOwnTextConfig && elType !== 'tspan' // Difficult to detect whether legacy for a "text" el. && (elType === 'text' || Object(core_util["hasOwn"])(style, 'text'))); } /** * `EC4CompatibleStyle` is style that might be in echarts4 format or echarts5 format. * @param hostStyle The properties might be modified. * @return If be text el, `textContentStyle` and `textConfig` will not be returned. * Otherwise a `textContentStyle` and `textConfig` will be created, whose props area * retried from the `hostStyle`. */ function convertFromEC4CompatibleStyle(hostStyle, elType, isNormal) { var srcStyle = hostStyle; var textConfig; var textContent; var textContentStyle; if (elType === 'text') { textContentStyle = srcStyle; } else { textContentStyle = {}; Object(core_util["hasOwn"])(srcStyle, 'text') && (textContentStyle.text = srcStyle.text); Object(core_util["hasOwn"])(srcStyle, 'rich') && (textContentStyle.rich = srcStyle.rich); Object(core_util["hasOwn"])(srcStyle, 'textFill') && (textContentStyle.fill = srcStyle.textFill); Object(core_util["hasOwn"])(srcStyle, 'textStroke') && (textContentStyle.stroke = srcStyle.textStroke); Object(core_util["hasOwn"])(srcStyle, 'fontFamily') && (textContentStyle.fontFamily = srcStyle.fontFamily); Object(core_util["hasOwn"])(srcStyle, 'fontSize') && (textContentStyle.fontSize = srcStyle.fontSize); Object(core_util["hasOwn"])(srcStyle, 'fontStyle') && (textContentStyle.fontStyle = srcStyle.fontStyle); Object(core_util["hasOwn"])(srcStyle, 'fontWeight') && (textContentStyle.fontWeight = srcStyle.fontWeight); textContent = { type: 'text', style: textContentStyle, // ec4 does not support rectText trigger. // And when text position is different in normal and emphasis // => hover text trigger emphasis; // => text position changed, leave mouse pointer immediately; // That might cause incorrect state. silent: true }; textConfig = {}; var hasOwnPos = Object(core_util["hasOwn"])(srcStyle, 'textPosition'); if (isNormal) { textConfig.position = hasOwnPos ? srcStyle.textPosition : 'inside'; } else { hasOwnPos && (textConfig.position = srcStyle.textPosition); } Object(core_util["hasOwn"])(srcStyle, 'textPosition') && (textConfig.position = srcStyle.textPosition); Object(core_util["hasOwn"])(srcStyle, 'textOffset') && (textConfig.offset = srcStyle.textOffset); Object(core_util["hasOwn"])(srcStyle, 'textRotation') && (textConfig.rotation = srcStyle.textRotation); Object(core_util["hasOwn"])(srcStyle, 'textDistance') && (textConfig.distance = srcStyle.textDistance); } convertEC4CompatibleRichItem(textContentStyle, hostStyle); Object(core_util["each"])(textContentStyle.rich, function (richItem) { convertEC4CompatibleRichItem(richItem, richItem); }); return { textConfig: textConfig, textContent: textContent }; } /** * The result will be set to `out`. */ function convertEC4CompatibleRichItem(out, richItem) { if (!richItem) { return; } // (1) For simplicity, make textXXX properties (deprecated since ec5) has // higher priority. For example, consider in ec4 `borderColor: 5, textBorderColor: 10` // on a rect means `borderColor: 4` on the rect and `borderColor: 10` on an attached // richText in ec5. // (2) `out === richItem` if and only if `out` is text el or rich item. // So we can overwrite existing props in `out` since textXXX has higher priority. richItem.font = richItem.textFont || richItem.font; Object(core_util["hasOwn"])(richItem, 'textStrokeWidth') && (out.lineWidth = richItem.textStrokeWidth); Object(core_util["hasOwn"])(richItem, 'textAlign') && (out.align = richItem.textAlign); Object(core_util["hasOwn"])(richItem, 'textVerticalAlign') && (out.verticalAlign = richItem.textVerticalAlign); Object(core_util["hasOwn"])(richItem, 'textLineHeight') && (out.lineHeight = richItem.textLineHeight); Object(core_util["hasOwn"])(richItem, 'textWidth') && (out.width = richItem.textWidth); Object(core_util["hasOwn"])(richItem, 'textHeight') && (out.height = richItem.textHeight); Object(core_util["hasOwn"])(richItem, 'textBackgroundColor') && (out.backgroundColor = richItem.textBackgroundColor); Object(core_util["hasOwn"])(richItem, 'textPadding') && (out.padding = richItem.textPadding); Object(core_util["hasOwn"])(richItem, 'textBorderColor') && (out.borderColor = richItem.textBorderColor); Object(core_util["hasOwn"])(richItem, 'textBorderWidth') && (out.borderWidth = richItem.textBorderWidth); Object(core_util["hasOwn"])(richItem, 'textBorderRadius') && (out.borderRadius = richItem.textBorderRadius); Object(core_util["hasOwn"])(richItem, 'textBoxShadowColor') && (out.shadowColor = richItem.textBoxShadowColor); Object(core_util["hasOwn"])(richItem, 'textBoxShadowBlur') && (out.shadowBlur = richItem.textBoxShadowBlur); Object(core_util["hasOwn"])(richItem, 'textBoxShadowOffsetX') && (out.shadowOffsetX = richItem.textBoxShadowOffsetX); Object(core_util["hasOwn"])(richItem, 'textBoxShadowOffsetY') && (out.shadowOffsetY = richItem.textBoxShadowOffsetY); } /** * Convert to pure echarts4 format style. * `itemStyle` will be modified, added with ec4 style properties from * `textStyle` and `textConfig`. * * [Caveat]: For simplicity, `insideRollback` in ec4 does not compat, where * `styleEmphasis: {textFill: 'red'}` will remove the normal auto added stroke. */ function convertToEC4StyleForCustomSerise(itemStl, txStl, txCfg) { var out = itemStl; // See `custom.ts`, a trick to set extra `textPosition` firstly. out.textPosition = out.textPosition || txCfg.position || 'inside'; txCfg.offset != null && (out.textOffset = txCfg.offset); txCfg.rotation != null && (out.textRotation = txCfg.rotation); txCfg.distance != null && (out.textDistance = txCfg.distance); var isInside = out.textPosition.indexOf('inside') >= 0; var hostFill = itemStl.fill || '#000'; convertToEC4RichItem(out, txStl); var textFillNotSet = out.textFill == null; if (isInside) { if (textFillNotSet) { out.textFill = txCfg.insideFill || '#fff'; !out.textStroke && txCfg.insideStroke && (out.textStroke = txCfg.insideStroke); !out.textStroke && (out.textStroke = hostFill); out.textStrokeWidth == null && (out.textStrokeWidth = 2); } } else { if (textFillNotSet) { out.textFill = itemStl.fill || txCfg.outsideFill || '#000'; } !out.textStroke && txCfg.outsideStroke && (out.textStroke = txCfg.outsideStroke); } out.text = txStl.text; out.rich = txStl.rich; Object(core_util["each"])(txStl.rich, function (richItem) { convertToEC4RichItem(richItem, richItem); }); return out; } function convertToEC4RichItem(out, richItem) { if (!richItem) { return; } Object(core_util["hasOwn"])(richItem, 'fill') && (out.textFill = richItem.fill); Object(core_util["hasOwn"])(richItem, 'stroke') && (out.textStroke = richItem.fill); Object(core_util["hasOwn"])(richItem, 'lineWidth') && (out.textStrokeWidth = richItem.lineWidth); Object(core_util["hasOwn"])(richItem, 'font') && (out.font = richItem.font); Object(core_util["hasOwn"])(richItem, 'fontStyle') && (out.fontStyle = richItem.fontStyle); Object(core_util["hasOwn"])(richItem, 'fontWeight') && (out.fontWeight = richItem.fontWeight); Object(core_util["hasOwn"])(richItem, 'fontSize') && (out.fontSize = richItem.fontSize); Object(core_util["hasOwn"])(richItem, 'fontFamily') && (out.fontFamily = richItem.fontFamily); Object(core_util["hasOwn"])(richItem, 'align') && (out.textAlign = richItem.align); Object(core_util["hasOwn"])(richItem, 'verticalAlign') && (out.textVerticalAlign = richItem.verticalAlign); Object(core_util["hasOwn"])(richItem, 'lineHeight') && (out.textLineHeight = richItem.lineHeight); Object(core_util["hasOwn"])(richItem, 'width') && (out.textWidth = richItem.width); Object(core_util["hasOwn"])(richItem, 'height') && (out.textHeight = richItem.height); Object(core_util["hasOwn"])(richItem, 'backgroundColor') && (out.textBackgroundColor = richItem.backgroundColor); Object(core_util["hasOwn"])(richItem, 'padding') && (out.textPadding = richItem.padding); Object(core_util["hasOwn"])(richItem, 'borderColor') && (out.textBorderColor = richItem.borderColor); Object(core_util["hasOwn"])(richItem, 'borderWidth') && (out.textBorderWidth = richItem.borderWidth); Object(core_util["hasOwn"])(richItem, 'borderRadius') && (out.textBorderRadius = richItem.borderRadius); Object(core_util["hasOwn"])(richItem, 'shadowColor') && (out.textBoxShadowColor = richItem.shadowColor); Object(core_util["hasOwn"])(richItem, 'shadowBlur') && (out.textBoxShadowBlur = richItem.shadowBlur); Object(core_util["hasOwn"])(richItem, 'shadowOffsetX') && (out.textBoxShadowOffsetX = richItem.shadowOffsetX); Object(core_util["hasOwn"])(richItem, 'shadowOffsetY') && (out.textBoxShadowOffsetY = richItem.shadowOffsetY); Object(core_util["hasOwn"])(richItem, 'textShadowColor') && (out.textShadowColor = richItem.textShadowColor); Object(core_util["hasOwn"])(richItem, 'textShadowBlur') && (out.textShadowBlur = richItem.textShadowBlur); Object(core_util["hasOwn"])(richItem, 'textShadowOffsetX') && (out.textShadowOffsetX = richItem.textShadowOffsetX); Object(core_util["hasOwn"])(richItem, 'textShadowOffsetY') && (out.textShadowOffsetY = richItem.textShadowOffsetY); } function styleCompat_warnDeprecated(deprecated, insteadApproach) { if (false) { var key = deprecated + '^_^' + insteadApproach; if (!deprecatedLogs[key]) { console.warn("[ECharts] DEPRECATED: \"" + deprecated + "\" has been deprecated. " + insteadApproach); deprecatedLogs[key] = true; } } } // CONCATENATED MODULE: ./node_modules/echarts/lib/animation/customGraphicTransition.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 LEGACY_TRANSFORM_PROPS_MAP = { position: ['x', 'y'], scale: ['scaleX', 'scaleY'], origin: ['originX', 'originY'] }; var LEGACY_TRANSFORM_PROPS = Object(core_util["keys"])(LEGACY_TRANSFORM_PROPS_MAP); var TRANSFORM_PROPS_MAP = Object(core_util["reduce"])(TRANSFORMABLE_PROPS, function (obj, key) { obj[key] = 1; return obj; }, {}); var transformPropNamesStr = TRANSFORMABLE_PROPS.join(', '); // '' means root var ELEMENT_ANIMATABLE_PROPS = ['', 'style', 'shape', 'extra']; ; var transitionInnerStore = makeInner(); ; function getElementAnimationConfig(animationType, el, elOption, parentModel, dataIndex) { var animationProp = animationType + "Animation"; var config = getAnimationConfig(animationType, parentModel, dataIndex) || {}; var userDuring = transitionInnerStore(el).userDuring; // Only set when duration is > 0 and it's need to be animated. if (config.duration > 0) { // For simplicity, if during not specified, the previous during will not work any more. config.during = userDuring ? Object(core_util["bind"])(duringCall, { el: el, userDuring: userDuring }) : null; config.setToFinal = true; config.scope = animationType; } Object(core_util["extend"])(config, elOption[animationProp]); return config; } function applyUpdateTransition(el, elOption, animatableModel, opts) { opts = opts || {}; var dataIndex = opts.dataIndex, isInit = opts.isInit, clearStyle = opts.clearStyle; var hasAnimation = animatableModel.isAnimationEnabled(); // Save the meta info for further morphing. Like apply on the sub morphing elements. var store = transitionInnerStore(el); var styleOpt = elOption.style; store.userDuring = elOption.during; var transFromProps = {}; var propsToSet = {}; prepareTransformAllPropsFinal(el, elOption, propsToSet); prepareShapeOrExtraAllPropsFinal('shape', elOption, propsToSet); prepareShapeOrExtraAllPropsFinal('extra', elOption, propsToSet); if (!isInit && hasAnimation) { prepareTransformTransitionFrom(el, elOption, transFromProps); prepareShapeOrExtraTransitionFrom('shape', el, elOption, transFromProps); prepareShapeOrExtraTransitionFrom('extra', el, elOption, transFromProps); prepareStyleTransitionFrom(el, elOption, styleOpt, transFromProps); } propsToSet.style = styleOpt; applyPropsDirectly(el, propsToSet, clearStyle); applyMiscProps(el, elOption); if (hasAnimation) { if (isInit) { var enterFromProps_1 = {}; Object(core_util["each"])(ELEMENT_ANIMATABLE_PROPS, function (propName) { var prop = propName ? elOption[propName] : elOption; if (prop && prop.enterFrom) { if (propName) { enterFromProps_1[propName] = enterFromProps_1[propName] || {}; } Object(core_util["extend"])(propName ? enterFromProps_1[propName] : enterFromProps_1, prop.enterFrom); } }); var config = getElementAnimationConfig('enter', el, elOption, animatableModel, dataIndex); if (config.duration > 0) { el.animateFrom(enterFromProps_1, config); } } else { applyPropsTransition(el, elOption, dataIndex || 0, animatableModel, transFromProps); } } // Store leave to be used in leave transition. updateLeaveTo(el, elOption); styleOpt ? el.dirty() : el.markRedraw(); } function updateLeaveTo(el, elOption) { // Try merge to previous set leaveTo var leaveToProps = transitionInnerStore(el).leaveToProps; for (var i = 0; i < ELEMENT_ANIMATABLE_PROPS.length; i++) { var propName = ELEMENT_ANIMATABLE_PROPS[i]; var prop = propName ? elOption[propName] : elOption; if (prop && prop.leaveTo) { if (!leaveToProps) { leaveToProps = transitionInnerStore(el).leaveToProps = {}; } if (propName) { leaveToProps[propName] = leaveToProps[propName] || {}; } Object(core_util["extend"])(propName ? leaveToProps[propName] : leaveToProps, prop.leaveTo); } } } function applyLeaveTransition(el, elOption, animatableModel, onRemove) { if (el) { var parent_1 = el.parent; var leaveToProps = transitionInnerStore(el).leaveToProps; if (leaveToProps) { // TODO TODO use leave after leaveAnimation in series is introduced // TODO Data index? var config = getElementAnimationConfig('update', el, elOption, animatableModel, 0); config.done = function () { parent_1.remove(el); onRemove && onRemove(); }; el.animateTo(leaveToProps, config); } else { parent_1.remove(el); onRemove && onRemove(); } } } function isTransitionAll(transition) { return transition === 'all'; } function applyPropsDirectly(el, // Can be null/undefined allPropsFinal, clearStyle) { var styleOpt = allPropsFinal.style; if (!el.isGroup && styleOpt) { if (clearStyle) { el.useStyle({}); // When style object changed, how to trade the existing animation? // It is probably complicated and not needed to cover all the cases. // But still need consider the case: // (1) When using init animation on `style.opacity`, and before the animation // ended users triggers an update by mousewhel. At that time the init // animation should better be continued rather than terminated. // So after `useStyle` called, we should change the animation target manually // to continue the effect of the init animation. // (2) PENDING: If the previous animation targeted at a `val1`, and currently we need // to update the value to `val2` and no animation declared, should be terminate // the previous animation or just modify the target of the animation? // Therotically That will happen not only on `style` but also on `shape` and // `transfrom` props. But we haven't handle this case at present yet. // (3) PENDING: Is it proper to visit `animators` and `targetName`? var animators = el.animators; for (var i = 0; i < animators.length; i++) { var animator = animators[i]; // targetName is the "topKey". if (animator.targetName === 'style') { animator.changeTarget(el.style); } } } el.setStyle(styleOpt); } if (allPropsFinal) { // Not set style here. allPropsFinal.style = null; // Set el to the final state firstly. allPropsFinal && el.attr(allPropsFinal); allPropsFinal.style = styleOpt; } } function applyPropsTransition(el, elOption, dataIndex, model, // Can be null/undefined transFromProps) { if (transFromProps) { var config = getElementAnimationConfig('update', el, elOption, model, dataIndex); if (config.duration > 0) { el.animateFrom(transFromProps, config); } } } function applyMiscProps(el, elOption) { // Merge by default. Object(core_util["hasOwn"])(elOption, 'silent') && (el.silent = elOption.silent); Object(core_util["hasOwn"])(elOption, 'ignore') && (el.ignore = elOption.ignore); if (el instanceof graphic_Displayable) { Object(core_util["hasOwn"])(elOption, 'invisible') && (el.invisible = elOption.invisible); } if (el instanceof graphic_Path) { Object(core_util["hasOwn"])(elOption, 'autoBatch') && (el.autoBatch = elOption.autoBatch); } } // Use it to avoid it be exposed to user. var tmpDuringScope = {}; var transitionDuringAPI = { // Usually other props do not need to be changed in animation during. setTransform: function (key, val) { if (false) { assert(hasOwn(TRANSFORM_PROPS_MAP, key), 'Only ' + transformPropNamesStr + ' available in `setTransform`.'); } tmpDuringScope.el[key] = val; return this; }, getTransform: function (key) { if (false) { assert(hasOwn(TRANSFORM_PROPS_MAP, key), 'Only ' + transformPropNamesStr + ' available in `getTransform`.'); } return tmpDuringScope.el[key]; }, setShape: function (key, val) { if (false) { assertNotReserved(key); } var el = tmpDuringScope.el; var shape = el.shape || (el.shape = {}); shape[key] = val; el.dirtyShape && el.dirtyShape(); return this; }, getShape: function (key) { if (false) { assertNotReserved(key); } var shape = tmpDuringScope.el.shape; if (shape) { return shape[key]; } }, setStyle: function (key, val) { if (false) { assertNotReserved(key); } var el = tmpDuringScope.el; var style = el.style; if (style) { if (false) { if (eqNaN(val)) { warn('style.' + key + ' must not be assigned with NaN.'); } } style[key] = val; el.dirtyStyle && el.dirtyStyle(); } return this; }, getStyle: function (key) { if (false) { assertNotReserved(key); } var style = tmpDuringScope.el.style; if (style) { return style[key]; } }, setExtra: function (key, val) { if (false) { assertNotReserved(key); } var extra = tmpDuringScope.el.extra || (tmpDuringScope.el.extra = {}); extra[key] = val; return this; }, getExtra: function (key) { if (false) { assertNotReserved(key); } var extra = tmpDuringScope.el.extra; if (extra) { return extra[key]; } } }; function assertNotReserved(key) { if (false) { if (key === 'transition' || key === 'enterFrom' || key === 'leaveTo') { throw new Error('key must not be "' + key + '"'); } } } function duringCall() { // Do not provide "percent" until some requirements come. // Because consider thies case: // enterFrom: {x: 100, y: 30}, transition: 'x'. // And enter duration is different from update duration. // Thus it might be confused about the meaning of "percent" in during callback. var scope = this; var el = scope.el; if (!el) { return; } // If el is remove from zr by reason like legend, during still need to called, // because el will be added back to zr and the prop value should not be incorrect. var latestUserDuring = transitionInnerStore(el).userDuring; var scopeUserDuring = scope.userDuring; // Ensured a during is only called once in each animation frame. // If a during is called multiple times in one frame, maybe some users' calculation logic // might be wrong (not sure whether this usage exists). // The case of a during might be called twice can be: by default there is a animator for // 'x', 'y' when init. Before the init animation finished, call `setOption` to start // another animators for 'style'/'shape'/'extra'. if (latestUserDuring !== scopeUserDuring) { // release scope.el = scope.userDuring = null; return; } tmpDuringScope.el = el; // Give no `this` to user in "during" calling. scopeUserDuring(transitionDuringAPI); // FIXME: if in future meet the case that some prop will be both modified in `during` and `state`, // consider the issue that the prop might be incorrect when return to "normal" state. } function prepareShapeOrExtraTransitionFrom(mainAttr, fromEl, elOption, transFromProps) { var attrOpt = elOption[mainAttr]; if (!attrOpt) { return; } var elPropsInAttr = fromEl[mainAttr]; var transFromPropsInAttr; if (elPropsInAttr) { var transition = elOption.transition; var attrTransition = attrOpt.transition; if (attrTransition) { !transFromPropsInAttr && (transFromPropsInAttr = transFromProps[mainAttr] = {}); if (isTransitionAll(attrTransition)) { Object(core_util["extend"])(transFromPropsInAttr, elPropsInAttr); } else { var transitionKeys = normalizeToArray(attrTransition); for (var i = 0; i < transitionKeys.length; i++) { var key = transitionKeys[i]; var elVal = elPropsInAttr[key]; transFromPropsInAttr[key] = elVal; } } } else if (isTransitionAll(transition) || Object(core_util["indexOf"])(transition, mainAttr) >= 0) { !transFromPropsInAttr && (transFromPropsInAttr = transFromProps[mainAttr] = {}); var elPropsInAttrKeys = Object(core_util["keys"])(elPropsInAttr); for (var i = 0; i < elPropsInAttrKeys.length; i++) { var key = elPropsInAttrKeys[i]; var elVal = elPropsInAttr[key]; if (isNonStyleTransitionEnabled(attrOpt[key], elVal)) { transFromPropsInAttr[key] = elVal; } } } } } function prepareShapeOrExtraAllPropsFinal(mainAttr, elOption, allProps) { var attrOpt = elOption[mainAttr]; if (!attrOpt) { return; } var allPropsInAttr = allProps[mainAttr] = {}; var keysInAttr = Object(core_util["keys"])(attrOpt); for (var i = 0; i < keysInAttr.length; i++) { var key = keysInAttr[i]; // To avoid share one object with different element, and // to avoid user modify the object inexpectedly, have to clone. allPropsInAttr[key] = cloneValue(attrOpt[key]); } } function prepareTransformTransitionFrom(el, elOption, transFromProps) { var transition = elOption.transition; var transitionKeys = isTransitionAll(transition) ? TRANSFORMABLE_PROPS : normalizeToArray(transition || []); for (var i = 0; i < transitionKeys.length; i++) { var key = transitionKeys[i]; if (key === 'style' || key === 'shape' || key === 'extra') { continue; } var elVal = el[key]; if (false) { checkTransformPropRefer(key, 'el.transition'); } // Do not clone, animator will perform that clone. transFromProps[key] = elVal; } } function prepareTransformAllPropsFinal(el, elOption, allProps) { for (var i = 0; i < LEGACY_TRANSFORM_PROPS.length; i++) { var legacyName = LEGACY_TRANSFORM_PROPS[i]; var xyName = LEGACY_TRANSFORM_PROPS_MAP[legacyName]; var legacyArr = elOption[legacyName]; if (legacyArr) { allProps[xyName[0]] = legacyArr[0]; allProps[xyName[1]] = legacyArr[1]; } } for (var i = 0; i < TRANSFORMABLE_PROPS.length; i++) { var key = TRANSFORMABLE_PROPS[i]; if (elOption[key] != null) { allProps[key] = elOption[key]; } } } function prepareStyleTransitionFrom(fromEl, elOption, styleOpt, transFromProps) { if (!styleOpt) { return; } var fromElStyle = fromEl.style; var transFromStyleProps; if (fromElStyle) { var styleTransition = styleOpt.transition; var elTransition = elOption.transition; if (styleTransition && !isTransitionAll(styleTransition)) { var transitionKeys = normalizeToArray(styleTransition); !transFromStyleProps && (transFromStyleProps = transFromProps.style = {}); for (var i = 0; i < transitionKeys.length; i++) { var key = transitionKeys[i]; var elVal = fromElStyle[key]; // Do not clone, see `checkNonStyleTansitionRefer`. transFromStyleProps[key] = elVal; } } else if (fromEl.getAnimationStyleProps && (isTransitionAll(elTransition) || isTransitionAll(styleTransition) || Object(core_util["indexOf"])(elTransition, 'style') >= 0)) { var animationProps = fromEl.getAnimationStyleProps(); var animationStyleProps = animationProps ? animationProps.style : null; if (animationStyleProps) { !transFromStyleProps && (transFromStyleProps = transFromProps.style = {}); var styleKeys = Object(core_util["keys"])(styleOpt); for (var i = 0; i < styleKeys.length; i++) { var key = styleKeys[i]; if (animationStyleProps[key]) { var elVal = fromElStyle[key]; transFromStyleProps[key] = elVal; } } } } } } function isNonStyleTransitionEnabled(optVal, elVal) { // The same as `checkNonStyleTansitionRefer`. return !Object(core_util["isArrayLike"])(optVal) ? optVal != null && isFinite(optVal) : optVal !== elVal; } var checkTransformPropRefer; if (false) { checkTransformPropRefer = function (key, usedIn) { if (!hasOwn(TRANSFORM_PROPS_MAP, key)) { warn('Prop `' + key + '` is not a permitted in `' + usedIn + '`. ' + 'Only `' + keys(TRANSFORM_PROPS_MAP).join('`, `') + '` are permitted.'); } }; } // CONCATENATED MODULE: ./node_modules/echarts/lib/animation/customGraphicKeyframeAnimation.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 getStateToRestore = makeInner(); var KEYFRAME_EXCLUDE_KEYS = ['percent', 'easing', 'shape', 'style', 'extra']; /** * Stop previous keyframe animation and restore the attributes. * Avoid new keyframe animation starts with wrong internal state when the percent: 0 is not set. */ function stopPreviousKeyframeAnimationAndRestore(el) { // Stop previous keyframe animation. el.stopAnimation('keyframe'); // Restore el.attr(getStateToRestore(el)); } function applyKeyframeAnimation(el, animationOpts, animatableModel) { if (!animatableModel.isAnimationEnabled() || !animationOpts) { return; } if (Object(core_util["isArray"])(animationOpts)) { Object(core_util["each"])(animationOpts, function (singleAnimationOpts) { applyKeyframeAnimation(el, singleAnimationOpts, animatableModel); }); return; } var keyframes = animationOpts.keyframes; var duration = animationOpts.duration; if (animatableModel && duration == null) { // Default to use duration of config. // NOTE: animation config from payload will be ignored because they are mainly for transitions. var config = getAnimationConfig('enter', animatableModel, 0); duration = config && config.duration; } if (!keyframes || !duration) { return; } var stateToRestore = getStateToRestore(el); Object(core_util["each"])(ELEMENT_ANIMATABLE_PROPS, function (targetPropName) { if (targetPropName && !el[targetPropName]) { return; } var animator; var endFrameIsSet = false; // Sort keyframes by percent. keyframes.sort(function (a, b) { return a.percent - b.percent; }); Object(core_util["each"])(keyframes, function (kf) { // Stop current animation. var animators = el.animators; var kfValues = targetPropName ? kf[targetPropName] : kf; if (false) { if (kf.percent >= 1) { endFrameIsSet = true; } } if (!kfValues) { return; } var propKeys = Object(core_util["keys"])(kfValues); if (!targetPropName) { // PENDING performance? propKeys = Object(core_util["filter"])(propKeys, function (key) { return Object(core_util["indexOf"])(KEYFRAME_EXCLUDE_KEYS, key) < 0; }); } if (!propKeys.length) { return; } if (!animator) { animator = el.animate(targetPropName, animationOpts.loop, true); animator.scope = 'keyframe'; } for (var i = 0; i < animators.length; i++) { // Stop all other animation that is not keyframe. if (animators[i] !== animator && animators[i].targetName === animator.targetName) { animators[i].stopTracks(propKeys); } } targetPropName && (stateToRestore[targetPropName] = stateToRestore[targetPropName] || {}); var savedTarget = targetPropName ? stateToRestore[targetPropName] : stateToRestore; Object(core_util["each"])(propKeys, function (key) { // Save original value. savedTarget[key] = ((targetPropName ? el[targetPropName] : el) || {})[key]; }); animator.whenWithKeys(duration * kf.percent, kfValues, propKeys, kf.easing); }); if (!animator) { return; } if (false) { if (!endFrameIsSet) { warn('End frame with percent: 1 is missing in the keyframeAnimation.', true); } } animator.delay(animationOpts.delay || 0).duration(duration).start(animationOpts.easing); }); } // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/custom/CustomView.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 EMPHASIS = 'emphasis'; var NORMAL = 'normal'; var BLUR = 'blur'; var SELECT = 'select'; var STATES = [NORMAL, EMPHASIS, BLUR, SELECT]; var PATH_ITEM_STYLE = { normal: ['itemStyle'], emphasis: [EMPHASIS, 'itemStyle'], blur: [BLUR, 'itemStyle'], select: [SELECT, 'itemStyle'] }; var PATH_LABEL = { normal: ['label'], emphasis: [EMPHASIS, 'label'], blur: [BLUR, 'label'], select: [SELECT, 'label'] }; var DEFAULT_TRANSITION = ['x', 'y']; // Use prefix to avoid index to be the same as el.name, // which will cause weird update animation. var GROUP_DIFF_PREFIX = 'e\0\0'; var attachedTxInfoTmp = { normal: {}, emphasis: {}, blur: {}, select: {} }; /** * To reduce total package size of each coordinate systems, the modules `prepareCustom` * of each coordinate systems are not required by each coordinate systems directly, but * required by the module `custom`. * * prepareInfoForCustomSeries {Function}: optional * @return {Object} {coordSys: {...}, api: { * coord: function (data, clamp) {}, // return point in global. * size: function (dataSize, dataItem) {} // return size of each axis in coordSys. * }} */ var prepareCustoms = { cartesian2d: cartesianPrepareCustom, geo: geoPrepareCustom, single: singlePrepareCustom, polar: polarPrepareCustom, calendar: calendarPrepareCustom }; function CustomView_isPath(el) { return el instanceof graphic_Path; } function isDisplayable(el) { return el instanceof graphic_Displayable; } function copyElement(sourceEl, targetEl) { targetEl.copyTransform(sourceEl); if (isDisplayable(targetEl) && isDisplayable(sourceEl)) { targetEl.setStyle(sourceEl.style); targetEl.z = sourceEl.z; targetEl.z2 = sourceEl.z2; targetEl.zlevel = sourceEl.zlevel; targetEl.invisible = sourceEl.invisible; targetEl.ignore = sourceEl.ignore; if (CustomView_isPath(targetEl) && CustomView_isPath(sourceEl)) { targetEl.setShape(sourceEl.shape); } } } var CustomView_CustomChartView = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(CustomChartView, _super); function CustomChartView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = CustomChartView.type; return _this; } CustomChartView.prototype.render = function (customSeries, ecModel, api, payload) { // Clear previously rendered progressive elements. this._progressiveEls = null; var oldData = this._data; var data = customSeries.getData(); var group = this.group; var renderItem = makeRenderItem(customSeries, data, ecModel, api); if (!oldData) { // Previous render is incremental render or first render. // Needs remove the incremental rendered elements. group.removeAll(); } data.diff(oldData).add(function (newIdx) { createOrUpdateItem(api, null, newIdx, renderItem(newIdx, payload), customSeries, group, data); }).remove(function (oldIdx) { var el = oldData.getItemGraphicEl(oldIdx); el && applyLeaveTransition(el, customInnerStore(el).option, customSeries); }).update(function (newIdx, oldIdx) { var oldEl = oldData.getItemGraphicEl(oldIdx); createOrUpdateItem(api, oldEl, newIdx, renderItem(newIdx, payload), customSeries, group, data); }).execute(); // Do clipping var clipPath = customSeries.get('clip', true) ? createClipPath(customSeries.coordinateSystem, false, customSeries) : null; if (clipPath) { group.setClipPath(clipPath); } else { group.removeClipPath(); } this._data = data; }; CustomChartView.prototype.incrementalPrepareRender = function (customSeries, ecModel, api) { this.group.removeAll(); this._data = null; }; CustomChartView.prototype.incrementalRender = function (params, customSeries, ecModel, api, payload) { var data = customSeries.getData(); var renderItem = makeRenderItem(customSeries, data, ecModel, api); var progressiveEls = this._progressiveEls = []; function setIncrementalAndHoverLayer(el) { if (!el.isGroup) { el.incremental = true; el.ensureState('emphasis').hoverLayer = true; } } for (var idx = params.start; idx < params.end; idx++) { var el = createOrUpdateItem(null, null, idx, renderItem(idx, payload), customSeries, this.group, data); if (el) { el.traverse(setIncrementalAndHoverLayer); progressiveEls.push(el); } } }; CustomChartView.prototype.eachRendered = function (cb) { traverseElements(this._progressiveEls || this.group, cb); }; CustomChartView.prototype.filterForExposedEvent = function (eventType, query, targetEl, packedEvent) { var elementName = query.element; if (elementName == null || targetEl.name === elementName) { return true; } // Enable to give a name on a group made by `renderItem`, and listen // events that are triggered by its descendents. while ((targetEl = targetEl.__hostTarget || targetEl.parent) && targetEl !== this.group) { if (targetEl.name === elementName) { return true; } } return false; }; CustomChartView.type = 'custom'; return CustomChartView; }(Chart); /* harmony default export */ var CustomView = (CustomView_CustomChartView); function createEl(elOption) { var graphicType = elOption.type; var el; // Those graphic elements are not shapes. They should not be // overwritten by users, so do them first. if (graphicType === 'path') { var shape = elOption.shape; // Using pathRect brings convenience to users sacle svg path. var pathRect = shape.width != null && shape.height != null ? { x: shape.x || 0, y: shape.y || 0, width: shape.width, height: shape.height } : null; var pathData = getPathData(shape); // Path is also used for icon, so layout 'center' by default. el = makePath(pathData, null, pathRect, shape.layout || 'center'); customInnerStore(el).customPathData = pathData; } else if (graphicType === 'image') { el = new graphic_Image({}); customInnerStore(el).customImagePath = elOption.style.image; } else if (graphicType === 'text') { el = new Text({}); // customInnerStore(el).customText = (elOption.style as TextStyleProps).text; } else if (graphicType === 'group') { el = new graphic_Group(); } else if (graphicType === 'compoundPath') { throw new Error('"compoundPath" is not supported yet.'); } else { var Clz = getShapeClass(graphicType); if (!Clz) { var errMsg = ''; if (false) { errMsg = 'graphic type "' + graphicType + '" can not be found.'; } throwError(errMsg); } el = new Clz(); } customInnerStore(el).customGraphicType = graphicType; el.name = elOption.name; // Compat ec4: the default z2 lift is 1. If changing the number, // some cases probably be broken: hierarchy layout along z, like circle packing, // where emphasis only intending to modify color/border rather than lift z2. el.z2EmphasisLift = 1; el.z2SelectLift = 1; return el; } function updateElNormal( // Can be null/undefined api, el, dataIndex, elOption, attachedTxInfo, seriesModel, isInit) { // Stop and restore before update any other attributes. stopPreviousKeyframeAnimationAndRestore(el); var txCfgOpt = attachedTxInfo && attachedTxInfo.normal.cfg; if (txCfgOpt) { // PENDING: whether use user object directly rather than clone? // TODO:5.0 textConfig transition animation? el.setTextConfig(txCfgOpt); } // Default transition ['x', 'y'] if (elOption && elOption.transition == null) { elOption.transition = DEFAULT_TRANSITION; } // Do some normalization on style. var styleOpt = elOption && elOption.style; if (styleOpt) { if (el.type === 'text') { var textOptionStyle = styleOpt; // Compatible with ec4: if `textFill` or `textStroke` exists use them. Object(core_util["hasOwn"])(textOptionStyle, 'textFill') && (textOptionStyle.fill = textOptionStyle.textFill); Object(core_util["hasOwn"])(textOptionStyle, 'textStroke') && (textOptionStyle.stroke = textOptionStyle.textStroke); } var decalPattern = void 0; var decalObj = CustomView_isPath(el) ? styleOpt.decal : null; if (api && decalObj) { decalObj.dirty = true; decalPattern = createOrUpdatePatternFromDecal(decalObj, api); } // Always overwrite in case user specify this prop. styleOpt.__decalPattern = decalPattern; } if (isDisplayable(el)) { if (styleOpt) { var decalPattern = styleOpt.__decalPattern; if (decalPattern) { styleOpt.decal = decalPattern; } } } applyUpdateTransition(el, elOption, seriesModel, { dataIndex: dataIndex, isInit: isInit, clearStyle: true }); applyKeyframeAnimation(el, elOption.keyframeAnimation, seriesModel); } function updateElOnState(state, el, elStateOpt, styleOpt, attachedTxInfo) { var elDisplayable = el.isGroup ? null : el; var txCfgOpt = attachedTxInfo && attachedTxInfo[state].cfg; // PENDING:5.0 support customize scale change and transition animation? if (elDisplayable) { // By default support auto lift color when hover whether `emphasis` specified. var stateObj = elDisplayable.ensureState(state); if (styleOpt === false) { var existingEmphasisState = elDisplayable.getState(state); if (existingEmphasisState) { existingEmphasisState.style = null; } } else { // style is needed to enable default emphasis. stateObj.style = styleOpt || null; } // If `elOption.styleEmphasis` or `elOption.emphasis.style` is `false`, // remove hover style. // If `elOption.textConfig` or `elOption.emphasis.textConfig` is null/undefined, it does not // make sense. So for simplicity, we do not ditinguish `hasOwnProperty` and null/undefined. if (txCfgOpt) { stateObj.textConfig = txCfgOpt; } setDefaultStateProxy(elDisplayable); } } function CustomView_updateZ(el, elOption, seriesModel) { // Group not support textContent and not support z yet. if (el.isGroup) { return; } var elDisplayable = el; var currentZ = seriesModel.currentZ; var currentZLevel = seriesModel.currentZLevel; // Always erase. elDisplayable.z = currentZ; elDisplayable.zlevel = currentZLevel; // z2 must not be null/undefined, otherwise sort error may occur. var optZ2 = elOption.z2; optZ2 != null && (elDisplayable.z2 = optZ2 || 0); for (var i = 0; i < STATES.length; i++) { updateZForEachState(elDisplayable, elOption, STATES[i]); } } function updateZForEachState(elDisplayable, elOption, state) { var isNormal = state === NORMAL; var elStateOpt = isNormal ? elOption : retrieveStateOption(elOption, state); var optZ2 = elStateOpt ? elStateOpt.z2 : null; var stateObj; if (optZ2 != null) { // Do not `ensureState` until required. stateObj = isNormal ? elDisplayable : elDisplayable.ensureState(state); stateObj.z2 = optZ2 || 0; } } function makeRenderItem(customSeries, data, ecModel, api) { var renderItem = customSeries.get('renderItem'); var coordSys = customSeries.coordinateSystem; var prepareResult = {}; if (coordSys) { if (false) { assert(renderItem, 'series.render is required.'); assert(coordSys.prepareCustoms || prepareCustoms[coordSys.type], 'This coordSys does not support custom series.'); } // `coordSys.prepareCustoms` is used for external coord sys like bmap. prepareResult = coordSys.prepareCustoms ? coordSys.prepareCustoms(coordSys) : prepareCustoms[coordSys.type](coordSys); } var userAPI = Object(core_util["defaults"])({ getWidth: api.getWidth, getHeight: api.getHeight, getZr: api.getZr, getDevicePixelRatio: api.getDevicePixelRatio, value: value, style: style, ordinalRawValue: ordinalRawValue, styleEmphasis: styleEmphasis, visual: visual, barLayout: barLayout, currentSeriesIndices: currentSeriesIndices, font: font }, prepareResult.api || {}); var userParams = { // The life cycle of context: current round of rendering. // The global life cycle is probably not necessary, because // user can store global status by themselves. context: {}, seriesId: customSeries.id, seriesName: customSeries.name, seriesIndex: customSeries.seriesIndex, coordSys: prepareResult.coordSys, dataInsideLength: data.count(), encode: wrapEncodeDef(customSeries.getData()) }; // If someday intending to refactor them to a class, should consider do not // break change: currently these attribute member are encapsulated in a closure // so that do not need to force user to call these method with a scope. // Do not support call `api` asynchronously without dataIndexInside input. var currDataIndexInside; var currItemModel; var currItemStyleModels = {}; var currLabelModels = {}; var seriesItemStyleModels = {}; var seriesLabelModels = {}; for (var i = 0; i < STATES.length; i++) { var stateName = STATES[i]; seriesItemStyleModels[stateName] = customSeries.getModel(PATH_ITEM_STYLE[stateName]); seriesLabelModels[stateName] = customSeries.getModel(PATH_LABEL[stateName]); } function getItemModel(dataIndexInside) { return dataIndexInside === currDataIndexInside ? currItemModel || (currItemModel = data.getItemModel(dataIndexInside)) : data.getItemModel(dataIndexInside); } function getItemStyleModel(dataIndexInside, state) { return !data.hasItemOption ? seriesItemStyleModels[state] : dataIndexInside === currDataIndexInside ? currItemStyleModels[state] || (currItemStyleModels[state] = getItemModel(dataIndexInside).getModel(PATH_ITEM_STYLE[state])) : getItemModel(dataIndexInside).getModel(PATH_ITEM_STYLE[state]); } function getLabelModel(dataIndexInside, state) { return !data.hasItemOption ? seriesLabelModels[state] : dataIndexInside === currDataIndexInside ? currLabelModels[state] || (currLabelModels[state] = getItemModel(dataIndexInside).getModel(PATH_LABEL[state])) : getItemModel(dataIndexInside).getModel(PATH_LABEL[state]); } return function (dataIndexInside, payload) { currDataIndexInside = dataIndexInside; currItemModel = null; currItemStyleModels = {}; currLabelModels = {}; return renderItem && renderItem(Object(core_util["defaults"])({ dataIndexInside: dataIndexInside, dataIndex: data.getRawIndex(dataIndexInside), // Can be used for optimization when zoom or roam. actionType: payload ? payload.type : null }, userParams), userAPI); }; /** * @public * @param dim by default 0. * @param dataIndexInside by default `currDataIndexInside`. */ function value(dim, dataIndexInside) { dataIndexInside == null && (dataIndexInside = currDataIndexInside); return data.getStore().get(data.getDimensionIndex(dim || 0), dataIndexInside); } /** * @public * @param dim by default 0. * @param dataIndexInside by default `currDataIndexInside`. */ function ordinalRawValue(dim, dataIndexInside) { dataIndexInside == null && (dataIndexInside = currDataIndexInside); dim = dim || 0; var dimInfo = data.getDimensionInfo(dim); if (!dimInfo) { var dimIndex = data.getDimensionIndex(dim); return dimIndex >= 0 ? data.getStore().get(dimIndex, dataIndexInside) : undefined; } var val = data.get(dimInfo.name, dataIndexInside); var ordinalMeta = dimInfo && dimInfo.ordinalMeta; return ordinalMeta ? ordinalMeta.categories[val] : val; } /** * @deprecated The original intention of `api.style` is enable to set itemStyle * like other series. But it is not necessary and not easy to give a strict definition * of what it returns. And since echarts5 it needs to be make compat work. So * deprecates it since echarts5. * * By default, `visual` is applied to style (to support visualMap). * `visual.color` is applied at `fill`. If user want apply visual.color on `stroke`, * it can be implemented as: * `api.style({stroke: api.visual('color'), fill: null})`; * * [Compat]: since ec5, RectText has been separated from its hosts el. * so `api.style()` will only return the style from `itemStyle` but not handle `label` * any more. But `series.label` config is never published in doc. * We still compat it in `api.style()`. But not encourage to use it and will still not * to pulish it to doc. * @public * @param dataIndexInside by default `currDataIndexInside`. */ function style(userProps, dataIndexInside) { if (false) { warnDeprecated('api.style', 'Please write literal style directly instead.'); } dataIndexInside == null && (dataIndexInside = currDataIndexInside); var style = data.getItemVisual(dataIndexInside, 'style'); var visualColor = style && style.fill; var opacity = style && style.opacity; var itemStyle = getItemStyleModel(dataIndexInside, NORMAL).getItemStyle(); visualColor != null && (itemStyle.fill = visualColor); opacity != null && (itemStyle.opacity = opacity); var opt = { inheritColor: Object(core_util["isString"])(visualColor) ? visualColor : '#000' }; var labelModel = getLabelModel(dataIndexInside, NORMAL); // Now that the feature of "auto adjust text fill/stroke" has been migrated to zrender // since ec5, we should set `isAttached` as `false` here and make compat in // `convertToEC4StyleForCustomSerise`. var textStyle = createTextStyle(labelModel, null, opt, false, true); textStyle.text = labelModel.getShallow('show') ? Object(core_util["retrieve2"])(customSeries.getFormattedLabel(dataIndexInside, NORMAL), getDefaultLabel(data, dataIndexInside)) : null; var textConfig = createTextConfig(labelModel, opt, false); preFetchFromExtra(userProps, itemStyle); itemStyle = convertToEC4StyleForCustomSerise(itemStyle, textStyle, textConfig); userProps && applyUserPropsAfter(itemStyle, userProps); itemStyle.legacy = true; return itemStyle; } /** * @deprecated The reason see `api.style()` * @public * @param dataIndexInside by default `currDataIndexInside`. */ function styleEmphasis(userProps, dataIndexInside) { if (false) { warnDeprecated('api.styleEmphasis', 'Please write literal style directly instead.'); } dataIndexInside == null && (dataIndexInside = currDataIndexInside); var itemStyle = getItemStyleModel(dataIndexInside, EMPHASIS).getItemStyle(); var labelModel = getLabelModel(dataIndexInside, EMPHASIS); var textStyle = createTextStyle(labelModel, null, null, true, true); textStyle.text = labelModel.getShallow('show') ? Object(core_util["retrieve3"])(customSeries.getFormattedLabel(dataIndexInside, EMPHASIS), customSeries.getFormattedLabel(dataIndexInside, NORMAL), getDefaultLabel(data, dataIndexInside)) : null; var textConfig = createTextConfig(labelModel, null, true); preFetchFromExtra(userProps, itemStyle); itemStyle = convertToEC4StyleForCustomSerise(itemStyle, textStyle, textConfig); userProps && applyUserPropsAfter(itemStyle, userProps); itemStyle.legacy = true; return itemStyle; } function applyUserPropsAfter(itemStyle, extra) { for (var key in extra) { if (Object(core_util["hasOwn"])(extra, key)) { itemStyle[key] = extra[key]; } } } function preFetchFromExtra(extra, itemStyle) { // A trick to retrieve those props firstly, which are used to // apply auto inside fill/stroke in `convertToEC4StyleForCustomSerise`. // (It's not reasonable but only for a degree of compat) if (extra) { extra.textFill && (itemStyle.textFill = extra.textFill); extra.textPosition && (itemStyle.textPosition = extra.textPosition); } } /** * @public * @param dataIndexInside by default `currDataIndexInside`. */ function visual(visualType, dataIndexInside) { dataIndexInside == null && (dataIndexInside = currDataIndexInside); if (Object(core_util["hasOwn"])(STYLE_VISUAL_TYPE, visualType)) { var style_1 = data.getItemVisual(dataIndexInside, 'style'); return style_1 ? style_1[STYLE_VISUAL_TYPE[visualType]] : null; } // Only support these visuals. Other visual might be inner tricky // for performance (like `style`), do not expose to users. if (Object(core_util["hasOwn"])(NON_STYLE_VISUAL_PROPS, visualType)) { return data.getItemVisual(dataIndexInside, visualType); } } /** * @public * @return If not support, return undefined. */ function barLayout(opt) { if (coordSys.type === 'cartesian2d') { var baseAxis = coordSys.getBaseAxis(); return getLayoutOnAxis(Object(core_util["defaults"])({ axis: baseAxis }, opt)); } } /** * @public */ function currentSeriesIndices() { return ecModel.getCurrentSeriesIndices(); } /** * @public * @return font string */ function font(opt) { return getFont(opt, ecModel); } } function wrapEncodeDef(data) { var encodeDef = {}; Object(core_util["each"])(data.dimensions, function (dimName) { var dimInfo = data.getDimensionInfo(dimName); if (!dimInfo.isExtraCoord) { var coordDim = dimInfo.coordDim; var dataDims = encodeDef[coordDim] = encodeDef[coordDim] || []; dataDims[dimInfo.coordDimIndex] = data.getDimensionIndex(dimName); } }); return encodeDef; } function createOrUpdateItem(api, existsEl, dataIndex, elOption, seriesModel, group, data) { // [Rule] // If `renderItem` returns `null`/`undefined`/`false`, remove the previous el if existing. // (It seems that violate the "merge" principle, but most of users probably intuitively // regard "return;" as "show nothing element whatever", so make a exception to meet the // most cases.) // The rule or "merge" see [STRATEGY_MERGE]. // If `elOption` is `null`/`undefined`/`false` (when `renderItem` returns nothing). if (!elOption) { group.remove(existsEl); return; } var el = doCreateOrUpdateEl(api, existsEl, dataIndex, elOption, seriesModel, group); el && data.setItemGraphicEl(dataIndex, el); el && toggleHoverEmphasis(el, elOption.focus, elOption.blurScope, elOption.emphasisDisabled); return el; } function doCreateOrUpdateEl(api, existsEl, dataIndex, elOption, seriesModel, group) { if (false) { assert(elOption, 'should not have an null/undefined element setting'); } var toBeReplacedIdx = -1; var oldEl = existsEl; if (existsEl && doesElNeedRecreate(existsEl, elOption, seriesModel) // || ( // // PENDING: even in one-to-one mapping case, if el is marked as morph, // // do not sure whether the el will be mapped to another el with different // // hierarchy in Group tree. So always recreate el rather than reuse the el. // morphHelper && morphHelper.isOneToOneFrom(el) // ) ) { // Should keep at the original index, otherwise "merge by index" will be incorrect. toBeReplacedIdx = Object(core_util["indexOf"])(group.childrenRef(), existsEl); existsEl = null; } var isInit = !existsEl; var el = existsEl; if (!el) { el = createEl(elOption); if (oldEl) { copyElement(oldEl, el); } } else { // FIMXE:NEXT unified clearState? // If in some case the performance issue arised, consider // do not clearState but update cached normal state directly. el.clearStates(); } // Need to set morph: false explictly to disable automatically morphing. if (elOption.morph === false) { el.disableMorphing = true; } else if (el.disableMorphing) { el.disableMorphing = false; } attachedTxInfoTmp.normal.cfg = attachedTxInfoTmp.normal.conOpt = attachedTxInfoTmp.emphasis.cfg = attachedTxInfoTmp.emphasis.conOpt = attachedTxInfoTmp.blur.cfg = attachedTxInfoTmp.blur.conOpt = attachedTxInfoTmp.select.cfg = attachedTxInfoTmp.select.conOpt = null; attachedTxInfoTmp.isLegacy = false; doCreateOrUpdateAttachedTx(el, dataIndex, elOption, seriesModel, isInit, attachedTxInfoTmp); doCreateOrUpdateClipPath(el, dataIndex, elOption, seriesModel, isInit); updateElNormal(api, el, dataIndex, elOption, attachedTxInfoTmp, seriesModel, isInit); // `elOption.info` enables user to mount some info on // elements and use them in event handlers. // Update them only when user specified, otherwise, remain. Object(core_util["hasOwn"])(elOption, 'info') && (customInnerStore(el).info = elOption.info); for (var i = 0; i < STATES.length; i++) { var stateName = STATES[i]; if (stateName !== NORMAL) { var otherStateOpt = retrieveStateOption(elOption, stateName); var otherStyleOpt = retrieveStyleOptionOnState(elOption, otherStateOpt, stateName); updateElOnState(stateName, el, otherStateOpt, otherStyleOpt, attachedTxInfoTmp); } } CustomView_updateZ(el, elOption, seriesModel); if (elOption.type === 'group') { mergeChildren(api, el, dataIndex, elOption, seriesModel); } if (toBeReplacedIdx >= 0) { group.replaceAt(el, toBeReplacedIdx); } else { group.add(el); } return el; } // `el` must not be null/undefined. function doesElNeedRecreate(el, elOption, seriesModel) { var elInner = customInnerStore(el); var elOptionType = elOption.type; var elOptionShape = elOption.shape; var elOptionStyle = elOption.style; return ( // Always create new if universal transition is enabled. // Because we do transition after render. It needs to know what old element is. Replacement will loose it. seriesModel.isUniversalTransitionEnabled() // If `elOptionType` is `null`, follow the merge principle. || elOptionType != null && elOptionType !== elInner.customGraphicType || elOptionType === 'path' && hasOwnPathData(elOptionShape) && getPathData(elOptionShape) !== elInner.customPathData || elOptionType === 'image' && Object(core_util["hasOwn"])(elOptionStyle, 'image') && elOptionStyle.image !== elInner.customImagePath // // FIXME test and remove this restriction? // || (elOptionType === 'text' // && hasOwn(elOptionStyle, 'text') // && (elOptionStyle as TextStyleProps).text !== elInner.customText // ) ); } function doCreateOrUpdateClipPath(el, dataIndex, elOption, seriesModel, isInit) { // Based on the "merge" principle, if no clipPath provided, // do nothing. The exists clip will be totally removed only if // `el.clipPath` is `false`. Otherwise it will be merged/replaced. var clipPathOpt = elOption.clipPath; if (clipPathOpt === false) { if (el && el.getClipPath()) { el.removeClipPath(); } } else if (clipPathOpt) { var clipPath = el.getClipPath(); if (clipPath && doesElNeedRecreate(clipPath, clipPathOpt, seriesModel)) { clipPath = null; } if (!clipPath) { clipPath = createEl(clipPathOpt); if (false) { assert(CustomView_isPath(clipPath), 'Only any type of `path` can be used in `clipPath`, rather than ' + clipPath.type + '.'); } el.setClipPath(clipPath); } updateElNormal(null, clipPath, dataIndex, clipPathOpt, null, seriesModel, isInit); } // If not define `clipPath` in option, do nothing unnecessary. } function doCreateOrUpdateAttachedTx(el, dataIndex, elOption, seriesModel, isInit, attachedTxInfo) { // Group does not support textContent temporarily until necessary. if (el.isGroup) { return; } // Normal must be called before emphasis, for `isLegacy` detection. processTxInfo(elOption, null, attachedTxInfo); processTxInfo(elOption, EMPHASIS, attachedTxInfo); // If `elOption.textConfig` or `elOption.textContent` is null/undefined, it does not make sense. // So for simplicity, if "elOption hasOwnProperty of them but be null/undefined", we do not // trade them as set to null to el. // Especially: // `elOption.textContent: false` means remove textContent. // `elOption.textContent.emphasis.style: false` means remove the style from emphasis state. var txConOptNormal = attachedTxInfo.normal.conOpt; var txConOptEmphasis = attachedTxInfo.emphasis.conOpt; var txConOptBlur = attachedTxInfo.blur.conOpt; var txConOptSelect = attachedTxInfo.select.conOpt; if (txConOptNormal != null || txConOptEmphasis != null || txConOptSelect != null || txConOptBlur != null) { var textContent = el.getTextContent(); if (txConOptNormal === false) { textContent && el.removeTextContent(); } else { txConOptNormal = attachedTxInfo.normal.conOpt = txConOptNormal || { type: 'text' }; if (!textContent) { textContent = createEl(txConOptNormal); el.setTextContent(textContent); } else { // If in some case the performance issue arised, consider // do not clearState but update cached normal state directly. textContent.clearStates(); } updateElNormal(null, textContent, dataIndex, txConOptNormal, null, seriesModel, isInit); var txConStlOptNormal = txConOptNormal && txConOptNormal.style; for (var i = 0; i < STATES.length; i++) { var stateName = STATES[i]; if (stateName !== NORMAL) { var txConOptOtherState = attachedTxInfo[stateName].conOpt; updateElOnState(stateName, textContent, txConOptOtherState, retrieveStyleOptionOnState(txConOptNormal, txConOptOtherState, stateName), null); } } txConStlOptNormal ? textContent.dirty() : textContent.markRedraw(); } } } function processTxInfo(elOption, state, attachedTxInfo) { var stateOpt = !state ? elOption : retrieveStateOption(elOption, state); var styleOpt = !state ? elOption.style : retrieveStyleOptionOnState(elOption, stateOpt, EMPHASIS); var elType = elOption.type; var txCfg = stateOpt ? stateOpt.textConfig : null; var txConOptNormal = elOption.textContent; var txConOpt = !txConOptNormal ? null : !state ? txConOptNormal : retrieveStateOption(txConOptNormal, state); if (styleOpt && ( // Because emphasis style has little info to detect legacy, // if normal is legacy, emphasis is trade as legacy. attachedTxInfo.isLegacy || isEC4CompatibleStyle(styleOpt, elType, !!txCfg, !!txConOpt))) { attachedTxInfo.isLegacy = true; var convertResult = convertFromEC4CompatibleStyle(styleOpt, elType, !state); // Explicitly specified `textConfig` and `textContent` has higher priority than // the ones generated by legacy style. Otherwise if users use them and `api.style` // at the same time, they not both work and hardly to known why. if (!txCfg && convertResult.textConfig) { txCfg = convertResult.textConfig; } if (!txConOpt && convertResult.textContent) { txConOpt = convertResult.textContent; } } if (!state && txConOpt) { var txConOptNormal_1 = txConOpt; // `textContent: {type: 'text'}`, the "type" is easy to be missing. So we tolerate it. !txConOptNormal_1.type && (txConOptNormal_1.type = 'text'); if (false) { // Do not tolerate incorrcet type for forward compat. assert(txConOptNormal_1.type === 'text', 'textContent.type must be "text"'); } } var info = !state ? attachedTxInfo.normal : attachedTxInfo[state]; info.cfg = txCfg; info.conOpt = txConOpt; } function retrieveStateOption(elOption, state) { return !state ? elOption : elOption ? elOption[state] : null; } function retrieveStyleOptionOnState(stateOptionNormal, stateOption, state) { var style = stateOption && stateOption.style; if (style == null && state === EMPHASIS && stateOptionNormal) { style = stateOptionNormal.styleEmphasis; } return style; } // Usage: // (1) By default, `elOption.$mergeChildren` is `'byIndex'`, which indicates // that the existing children will not be removed, and enables the feature // that update some of the props of some of the children simply by construct // the returned children of `renderItem` like: // `var children = group.children = []; children[3] = {opacity: 0.5};` // (2) If `elOption.$mergeChildren` is `'byName'`, add/update/remove children // by child.name. But that might be lower performance. // (3) If `elOption.$mergeChildren` is `false`, the existing children will be // replaced totally. // (4) If `!elOption.children`, following the "merge" principle, nothing will // happen. // (5) If `elOption.$mergeChildren` is not `false` neither `'byName'` and the // `el` is a group, and if any of the new child is null, it means to remove // the element at the same index, if exists. On the other hand, if the new // child is and empty object `{}`, it means to keep the element not changed. // // For implementation simpleness, do not provide a direct way to remove single // child (otherwise the total indices of the children array have to be modified). // User can remove a single child by setting its `ignore` to `true`. function mergeChildren(api, el, dataIndex, elOption, seriesModel) { var newChildren = elOption.children; var newLen = newChildren ? newChildren.length : 0; var mergeChildren = elOption.$mergeChildren; // `diffChildrenByName` has been deprecated. var byName = mergeChildren === 'byName' || elOption.diffChildrenByName; var notMerge = mergeChildren === false; // For better performance on roam update, only enter if necessary. if (!newLen && !byName && !notMerge) { return; } if (byName) { diffGroupChildren({ api: api, oldChildren: el.children() || [], newChildren: newChildren || [], dataIndex: dataIndex, seriesModel: seriesModel, group: el }); return; } notMerge && el.removeAll(); // Mapping children of a group simply by index, which // might be better performance. var index = 0; for (; index < newLen; index++) { var newChild = newChildren[index]; var oldChild = el.childAt(index); if (newChild) { if (newChild.ignore == null) { // The old child is set to be ignored if null (see comments // below). So we need to set ignore to be false back. newChild.ignore = false; } doCreateOrUpdateEl(api, oldChild, dataIndex, newChild, seriesModel, el); } else { if (false) { assert(oldChild, 'renderItem should not return a group containing elements' + ' as null/undefined/{} if they do not exist before.'); } // If the new element option is null, it means to remove the old // element. But we cannot really remove the element from the group // directly, because the element order may not be stable when this // element is added back. So we set the element to be ignored. oldChild.ignore = true; } } for (var i = el.childCount() - 1; i >= index; i--) { var child = el.childAt(i); removeChildFromGroup(el, child, seriesModel); } } function removeChildFromGroup(group, child, seriesModel) { // Do not support leave elements that are not mentioned in the latest // `renderItem` return. Otherwise users may not have a clear and simple // concept that how to control all of the elements. child && applyLeaveTransition(child, customInnerStore(group).option, seriesModel); } function diffGroupChildren(context) { new data_DataDiffer(context.oldChildren, context.newChildren, CustomView_getKey, CustomView_getKey, context).add(processAddUpdate).update(processAddUpdate).remove(processRemove).execute(); } function CustomView_getKey(item, idx) { var name = item && item.name; return name != null ? name : GROUP_DIFF_PREFIX + idx; } function processAddUpdate(newIndex, oldIndex) { var context = this.context; var childOption = newIndex != null ? context.newChildren[newIndex] : null; var child = oldIndex != null ? context.oldChildren[oldIndex] : null; doCreateOrUpdateEl(context.api, child, context.dataIndex, childOption, context.seriesModel, context.group); } function processRemove(oldIndex) { var context = this.context; var child = context.oldChildren[oldIndex]; child && applyLeaveTransition(child, customInnerStore(child).option, context.seriesModel); } /** * @return SVG Path data. */ function getPathData(shape) { // "d" follows the SVG convention. return shape && (shape.pathData || shape.d); } function hasOwnPathData(shape) { return shape && (Object(core_util["hasOwn"])(shape, 'pathData') || Object(core_util["hasOwn"])(shape, 'd')); } // CONCATENATED MODULE: ./node_modules/echarts/lib/chart/custom/install.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 custom_install_install(registers) { registers.registerChartView(CustomView); registers.registerSeriesModel(CustomSeries); } // CONCATENATED MODULE: ./node_modules/echarts/lib/export/charts.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ // In somehow. If we export like // export * as LineChart './chart/line/install' // The exported code will be transformed to // import * as LineChart_1 './chart/line/install'; export {LineChart_1 as LineChart}; // Treeshaking in webpack will not work even if we configured sideEffects to false in package.json // CONCATENATED MODULE: ./node_modules/echarts/lib/component/axisPointer/BaseAxisPointer.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 BaseAxisPointer_inner = makeInner(); var BaseAxisPointer_clone = core_util["clone"]; var bind = core_util["bind"]; /** * Base axis pointer class in 2D. */ var BaseAxisPointer_BaseAxisPointer = /** @class */function () { function BaseAxisPointer() { this._dragging = false; /** * In px, arbitrary value. Do not set too small, * no animation is ok for most cases. */ this.animationThreshold = 15; } /** * @implement */ BaseAxisPointer.prototype.render = function (axisModel, axisPointerModel, api, forceRender) { var value = axisPointerModel.get('value'); var status = axisPointerModel.get('status'); // Bind them to `this`, not in closure, otherwise they will not // be replaced when user calling setOption in not merge mode. this._axisModel = axisModel; this._axisPointerModel = axisPointerModel; this._api = api; // Optimize: `render` will be called repeatedly during mouse move. // So it is power consuming if performing `render` each time, // especially on mobile device. if (!forceRender && this._lastValue === value && this._lastStatus === status) { return; } this._lastValue = value; this._lastStatus = status; var group = this._group; var handle = this._handle; if (!status || status === 'hide') { // Do not clear here, for animation better. group && group.hide(); handle && handle.hide(); return; } group && group.show(); handle && handle.show(); // Otherwise status is 'show' var elOption = {}; this.makeElOption(elOption, value, axisModel, axisPointerModel, api); // Enable change axis pointer type. var graphicKey = elOption.graphicKey; if (graphicKey !== this._lastGraphicKey) { this.clear(api); } this._lastGraphicKey = graphicKey; var moveAnimation = this._moveAnimation = this.determineAnimation(axisModel, axisPointerModel); if (!group) { group = this._group = new graphic_Group(); this.createPointerEl(group, elOption, axisModel, axisPointerModel); this.createLabelEl(group, elOption, axisModel, axisPointerModel); api.getZr().add(group); } else { var doUpdateProps = core_util["curry"](BaseAxisPointer_updateProps, axisPointerModel, moveAnimation); this.updatePointerEl(group, elOption, doUpdateProps); this.updateLabelEl(group, elOption, doUpdateProps, axisPointerModel); } updateMandatoryProps(group, axisPointerModel, true); this._renderHandle(value); }; /** * @implement */ BaseAxisPointer.prototype.remove = function (api) { this.clear(api); }; /** * @implement */ BaseAxisPointer.prototype.dispose = function (api) { this.clear(api); }; /** * @protected */ BaseAxisPointer.prototype.determineAnimation = function (axisModel, axisPointerModel) { var animation = axisPointerModel.get('animation'); var axis = axisModel.axis; var isCategoryAxis = axis.type === 'category'; var useSnap = axisPointerModel.get('snap'); // Value axis without snap always do not snap. if (!useSnap && !isCategoryAxis) { return false; } if (animation === 'auto' || animation == null) { var animationThreshold = this.animationThreshold; if (isCategoryAxis && axis.getBandWidth() > animationThreshold) { return true; } // It is important to auto animation when snap used. Consider if there is // a dataZoom, animation will be disabled when too many points exist, while // it will be enabled for better visual effect when little points exist. if (useSnap) { var seriesDataCount = getAxisInfo(axisModel).seriesDataCount; var axisExtent = axis.getExtent(); // Approximate band width return Math.abs(axisExtent[0] - axisExtent[1]) / seriesDataCount > animationThreshold; } return false; } return animation === true; }; /** * add {pointer, label, graphicKey} to elOption * @protected */ BaseAxisPointer.prototype.makeElOption = function (elOption, value, axisModel, axisPointerModel, api) { // Should be implemenented by sub-class. }; /** * @protected */ BaseAxisPointer.prototype.createPointerEl = function (group, elOption, axisModel, axisPointerModel) { var pointerOption = elOption.pointer; if (pointerOption) { var pointerEl = BaseAxisPointer_inner(group).pointerEl = new graphic_namespaceObject[pointerOption.type](BaseAxisPointer_clone(elOption.pointer)); group.add(pointerEl); } }; /** * @protected */ BaseAxisPointer.prototype.createLabelEl = function (group, elOption, axisModel, axisPointerModel) { if (elOption.label) { var labelEl = BaseAxisPointer_inner(group).labelEl = new Text(BaseAxisPointer_clone(elOption.label)); group.add(labelEl); updateLabelShowHide(labelEl, axisPointerModel); } }; /** * @protected */ BaseAxisPointer.prototype.updatePointerEl = function (group, elOption, updateProps) { var pointerEl = BaseAxisPointer_inner(group).pointerEl; if (pointerEl && elOption.pointer) { pointerEl.setStyle(elOption.pointer.style); updateProps(pointerEl, { shape: elOption.pointer.shape }); } }; /** * @protected */ BaseAxisPointer.prototype.updateLabelEl = function (group, elOption, updateProps, axisPointerModel) { var labelEl = BaseAxisPointer_inner(group).labelEl; if (labelEl) { labelEl.setStyle(elOption.label.style); updateProps(labelEl, { // Consider text length change in vertical axis, animation should // be used on shape, otherwise the effect will be weird. // TODOTODO // shape: elOption.label.shape, x: elOption.label.x, y: elOption.label.y }); updateLabelShowHide(labelEl, axisPointerModel); } }; /** * @private */ BaseAxisPointer.prototype._renderHandle = function (value) { if (this._dragging || !this.updateHandleTransform) { return; } var axisPointerModel = this._axisPointerModel; var zr = this._api.getZr(); var handle = this._handle; var handleModel = axisPointerModel.getModel('handle'); var status = axisPointerModel.get('status'); if (!handleModel.get('show') || !status || status === 'hide') { handle && zr.remove(handle); this._handle = null; return; } var isInit; if (!this._handle) { isInit = true; handle = this._handle = createIcon(handleModel.get('icon'), { cursor: 'move', draggable: true, onmousemove: function (e) { // For mobile device, prevent screen slider on the button. stop(e.event); }, onmousedown: bind(this._onHandleDragMove, this, 0, 0), drift: bind(this._onHandleDragMove, this), ondragend: bind(this._onHandleDragEnd, this) }); zr.add(handle); } updateMandatoryProps(handle, axisPointerModel, false); // update style handle.setStyle(handleModel.getItemStyle(null, ['color', 'borderColor', 'borderWidth', 'opacity', 'shadowColor', 'shadowBlur', 'shadowOffsetX', 'shadowOffsetY'])); // update position var handleSize = handleModel.get('size'); if (!core_util["isArray"](handleSize)) { handleSize = [handleSize, handleSize]; } handle.scaleX = handleSize[0] / 2; handle.scaleY = handleSize[1] / 2; createOrUpdate(this, '_doDispatchAxisPointer', handleModel.get('throttle') || 0, 'fixRate'); this._moveHandleToValue(value, isInit); }; BaseAxisPointer.prototype._moveHandleToValue = function (value, isInit) { BaseAxisPointer_updateProps(this._axisPointerModel, !isInit && this._moveAnimation, this._handle, getHandleTransProps(this.getHandleTransform(value, this._axisModel, this._axisPointerModel))); }; BaseAxisPointer.prototype._onHandleDragMove = function (dx, dy) { var handle = this._handle; if (!handle) { return; } this._dragging = true; // Persistent for throttle. var trans = this.updateHandleTransform(getHandleTransProps(handle), [dx, dy], this._axisModel, this._axisPointerModel); this._payloadInfo = trans; handle.stopAnimation(); handle.attr(getHandleTransProps(trans)); BaseAxisPointer_inner(handle).lastProp = null; this._doDispatchAxisPointer(); }; /** * Throttled method. */ BaseAxisPointer.prototype._doDispatchAxisPointer = function () { var handle = this._handle; if (!handle) { return; } var payloadInfo = this._payloadInfo; var axisModel = this._axisModel; this._api.dispatchAction({ type: 'updateAxisPointer', x: payloadInfo.cursorPoint[0], y: payloadInfo.cursorPoint[1], tooltipOption: payloadInfo.tooltipOption, axesInfo: [{ axisDim: axisModel.axis.dim, axisIndex: axisModel.componentIndex }] }); }; BaseAxisPointer.prototype._onHandleDragEnd = function () { this._dragging = false; var handle = this._handle; if (!handle) { return; } var value = this._axisPointerModel.get('value'); // Consider snap or categroy axis, handle may be not consistent with // axisPointer. So move handle to align the exact value position when // drag ended. this._moveHandleToValue(value); // For the effect: tooltip will be shown when finger holding on handle // button, and will be hidden after finger left handle button. this._api.dispatchAction({ type: 'hideTip' }); }; /** * @private */ BaseAxisPointer.prototype.clear = function (api) { this._lastValue = null; this._lastStatus = null; var zr = api.getZr(); var group = this._group; var handle = this._handle; if (zr && group) { this._lastGraphicKey = null; group && zr.remove(group); handle && zr.remove(handle); this._group = null; this._handle = null; this._payloadInfo = null; } clear(this, '_doDispatchAxisPointer'); }; /** * @protected */ BaseAxisPointer.prototype.doClear = function () { // Implemented by sub-class if necessary. }; BaseAxisPointer.prototype.buildLabel = function (xy, wh, xDimIndex) { xDimIndex = xDimIndex || 0; return { x: xy[xDimIndex], y: xy[1 - xDimIndex], width: wh[xDimIndex], height: wh[1 - xDimIndex] }; }; return BaseAxisPointer; }(); function BaseAxisPointer_updateProps(animationModel, moveAnimation, el, props) { // Animation optimize. if (!propsEqual(BaseAxisPointer_inner(el).lastProp, props)) { BaseAxisPointer_inner(el).lastProp = props; moveAnimation ? updateProps(el, props, animationModel) : (el.stopAnimation(), el.attr(props)); } } function propsEqual(lastProps, newProps) { if (core_util["isObject"](lastProps) && core_util["isObject"](newProps)) { var equals_1 = true; core_util["each"](newProps, function (item, key) { equals_1 = equals_1 && propsEqual(lastProps[key], item); }); return !!equals_1; } else { return lastProps === newProps; } } function updateLabelShowHide(labelEl, axisPointerModel) { labelEl[axisPointerModel.get(['label', 'show']) ? 'show' : 'hide'](); } function getHandleTransProps(trans) { return { x: trans.x || 0, y: trans.y || 0, rotation: trans.rotation || 0 }; } function updateMandatoryProps(group, axisPointerModel, silent) { var z = axisPointerModel.get('z'); var zlevel = axisPointerModel.get('zlevel'); group && group.traverse(function (el) { if (el.type !== 'group') { z != null && (el.z = z); zlevel != null && (el.zlevel = zlevel); el.silent = silent; } }); } /* harmony default export */ var axisPointer_BaseAxisPointer = (BaseAxisPointer_BaseAxisPointer); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/axisPointer/viewHelper.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 buildElStyle(axisPointerModel) { var axisPointerType = axisPointerModel.get('type'); var styleModel = axisPointerModel.getModel(axisPointerType + 'Style'); var style; if (axisPointerType === 'line') { style = styleModel.getLineStyle(); style.fill = null; } else if (axisPointerType === 'shadow') { style = styleModel.getAreaStyle(); style.stroke = null; } return style; } /** * @param {Function} labelPos {align, verticalAlign, position} */ function buildLabelElOption(elOption, axisModel, axisPointerModel, api, labelPos) { var value = axisPointerModel.get('value'); var text = getValueLabel(value, axisModel.axis, axisModel.ecModel, axisPointerModel.get('seriesDataIndices'), { precision: axisPointerModel.get(['label', 'precision']), formatter: axisPointerModel.get(['label', 'formatter']) }); var labelModel = axisPointerModel.getModel('label'); var paddings = normalizeCssArray(labelModel.get('padding') || 0); var font = labelModel.getFont(); var textRect = getBoundingRect(text, font); var position = labelPos.position; var width = textRect.width + paddings[1] + paddings[3]; var height = textRect.height + paddings[0] + paddings[2]; // Adjust by align. var align = labelPos.align; align === 'right' && (position[0] -= width); align === 'center' && (position[0] -= width / 2); var verticalAlign = labelPos.verticalAlign; verticalAlign === 'bottom' && (position[1] -= height); verticalAlign === 'middle' && (position[1] -= height / 2); // Not overflow ec container confineInContainer(position, width, height, api); var bgColor = labelModel.get('backgroundColor'); if (!bgColor || bgColor === 'auto') { bgColor = axisModel.get(['axisLine', 'lineStyle', 'color']); } elOption.label = { // shape: {x: 0, y: 0, width: width, height: height, r: labelModel.get('borderRadius')}, x: position[0], y: position[1], style: createTextStyle(labelModel, { text: text, font: font, fill: labelModel.getTextColor(), padding: paddings, backgroundColor: bgColor }), // Label should be over axisPointer. z2: 10 }; } // Do not overflow ec container function confineInContainer(position, width, height, api) { var viewWidth = api.getWidth(); var viewHeight = api.getHeight(); position[0] = Math.min(position[0] + width, viewWidth) - width; position[1] = Math.min(position[1] + height, viewHeight) - height; position[0] = Math.max(position[0], 0); position[1] = Math.max(position[1], 0); } function getValueLabel(value, axis, ecModel, seriesDataIndices, opt) { value = axis.scale.parse(value); var text = axis.scale.getLabel({ value: value }, { // If `precision` is set, width can be fixed (like '12.00500'), which // helps to debounce when when moving label. precision: opt.precision }); var formatter = opt.formatter; if (formatter) { var params_1 = { value: getAxisRawValue(axis, { value: value }), axisDimension: axis.dim, axisIndex: axis.index, seriesData: [] }; core_util["each"](seriesDataIndices, function (idxItem) { var series = ecModel.getSeriesByIndex(idxItem.seriesIndex); var dataIndex = idxItem.dataIndexInside; var dataParams = series && series.getDataParams(dataIndex); dataParams && params_1.seriesData.push(dataParams); }); if (core_util["isString"](formatter)) { text = formatter.replace('{value}', text); } else if (core_util["isFunction"](formatter)) { text = formatter(params_1); } } return text; } function getTransformedPosition(axis, value, layoutInfo) { var transform = matrix_create(); matrix_rotate(transform, transform, layoutInfo.rotation); matrix_translate(transform, transform, layoutInfo.position); return graphic_applyTransform([axis.dataToCoord(value), (layoutInfo.labelOffset || 0) + (layoutInfo.labelDirection || 1) * (layoutInfo.labelMargin || 0)], transform); } function buildCartesianSingleLabelElOption(value, elOption, layoutInfo, axisModel, axisPointerModel, api) { // @ts-ignore var textLayout = axis_AxisBuilder.innerTextLayout(layoutInfo.rotation, 0, layoutInfo.labelDirection); layoutInfo.labelMargin = axisPointerModel.get(['label', 'margin']); buildLabelElOption(elOption, axisModel, axisPointerModel, api, { position: getTransformedPosition(axisModel.axis, value, layoutInfo), align: textLayout.textAlign, verticalAlign: textLayout.textVerticalAlign }); } function makeLineShape(p1, p2, xDimIndex) { xDimIndex = xDimIndex || 0; return { x1: p1[xDimIndex], y1: p1[1 - xDimIndex], x2: p2[xDimIndex], y2: p2[1 - xDimIndex] }; } function makeRectShape(xy, wh, xDimIndex) { xDimIndex = xDimIndex || 0; return { x: xy[xDimIndex], y: xy[1 - xDimIndex], width: wh[xDimIndex], height: wh[1 - xDimIndex] }; } function makeSectorShape(cx, cy, r0, r, startAngle, endAngle) { return { cx: cx, cy: cy, r0: r0, r: r, startAngle: startAngle, endAngle: endAngle, clockwise: true }; } // CONCATENATED MODULE: ./node_modules/echarts/lib/component/axisPointer/CartesianAxisPointer.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 CartesianAxisPointer_CartesianAxisPointer = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(CartesianAxisPointer, _super); function CartesianAxisPointer() { return _super !== null && _super.apply(this, arguments) || this; } /** * @override */ CartesianAxisPointer.prototype.makeElOption = function (elOption, value, axisModel, axisPointerModel, api) { var axis = axisModel.axis; var grid = axis.grid; var axisPointerType = axisPointerModel.get('type'); var otherExtent = getCartesian(grid, axis).getOtherAxis(axis).getGlobalExtent(); var pixelValue = axis.toGlobalCoord(axis.dataToCoord(value, true)); if (axisPointerType && axisPointerType !== 'none') { var elStyle = buildElStyle(axisPointerModel); var pointerOption = pointerShapeBuilder[axisPointerType](axis, pixelValue, otherExtent); pointerOption.style = elStyle; elOption.graphicKey = pointerOption.type; elOption.pointer = pointerOption; } var layoutInfo = cartesianAxisHelper_layout(grid.model, axisModel); buildCartesianSingleLabelElOption( // @ts-ignore value, elOption, layoutInfo, axisModel, axisPointerModel, api); }; /** * @override */ CartesianAxisPointer.prototype.getHandleTransform = function (value, axisModel, axisPointerModel) { var layoutInfo = cartesianAxisHelper_layout(axisModel.axis.grid.model, axisModel, { labelInside: false }); // @ts-ignore layoutInfo.labelMargin = axisPointerModel.get(['handle', 'margin']); var pos = getTransformedPosition(axisModel.axis, value, layoutInfo); return { x: pos[0], y: pos[1], rotation: layoutInfo.rotation + (layoutInfo.labelDirection < 0 ? Math.PI : 0) }; }; /** * @override */ CartesianAxisPointer.prototype.updateHandleTransform = function (transform, delta, axisModel, axisPointerModel) { var axis = axisModel.axis; var grid = axis.grid; var axisExtent = axis.getGlobalExtent(true); var otherExtent = getCartesian(grid, axis).getOtherAxis(axis).getGlobalExtent(); var dimIndex = axis.dim === 'x' ? 0 : 1; var currPosition = [transform.x, transform.y]; currPosition[dimIndex] += delta[dimIndex]; currPosition[dimIndex] = Math.min(axisExtent[1], currPosition[dimIndex]); currPosition[dimIndex] = Math.max(axisExtent[0], currPosition[dimIndex]); var cursorOtherValue = (otherExtent[1] + otherExtent[0]) / 2; var cursorPoint = [cursorOtherValue, cursorOtherValue]; cursorPoint[dimIndex] = currPosition[dimIndex]; // Make tooltip do not overlap axisPointer and in the middle of the grid. var tooltipOptions = [{ verticalAlign: 'middle' }, { align: 'center' }]; return { x: currPosition[0], y: currPosition[1], rotation: transform.rotation, cursorPoint: cursorPoint, tooltipOption: tooltipOptions[dimIndex] }; }; return CartesianAxisPointer; }(axisPointer_BaseAxisPointer); function getCartesian(grid, axis) { var opt = {}; opt[axis.dim + 'AxisIndex'] = axis.index; return grid.getCartesian(opt); } var pointerShapeBuilder = { line: function (axis, pixelValue, otherExtent) { var targetShape = makeLineShape([pixelValue, otherExtent[0]], [pixelValue, otherExtent[1]], getAxisDimIndex(axis)); return { type: 'Line', subPixelOptimize: true, shape: targetShape }; }, shadow: function (axis, pixelValue, otherExtent) { var bandWidth = Math.max(1, axis.getBandWidth()); var span = otherExtent[1] - otherExtent[0]; return { type: 'Rect', shape: makeRectShape([pixelValue - bandWidth / 2, otherExtent[0]], [bandWidth, span], getAxisDimIndex(axis)) }; } }; function getAxisDimIndex(axis) { return axis.dim === 'x' ? 0 : 1; } /* harmony default export */ var axisPointer_CartesianAxisPointer = (CartesianAxisPointer_CartesianAxisPointer); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/axisPointer/AxisPointerModel.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 AxisPointerModel_AxisPointerModel = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(AxisPointerModel, _super); function AxisPointerModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = AxisPointerModel.type; return _this; } AxisPointerModel.type = 'axisPointer'; AxisPointerModel.defaultOption = { // 'auto' means that show when triggered by tooltip or handle. show: 'auto', // zlevel: 0, z: 50, type: 'line', // axispointer triggered by tootip determine snap automatically, // see `modelHelper`. snap: false, triggerTooltip: true, triggerEmphasis: true, value: null, status: null, link: [], // Do not set 'auto' here, otherwise global animation: false // will not effect at this axispointer. animation: null, animationDurationUpdate: 200, lineStyle: { color: '#B9BEC9', width: 1, type: 'dashed' }, shadowStyle: { color: 'rgba(210,219,238,0.2)' }, label: { show: true, formatter: null, precision: 'auto', margin: 3, color: '#fff', padding: [5, 7, 5, 7], backgroundColor: 'auto', borderColor: null, borderWidth: 0, borderRadius: 3 }, handle: { show: false, // eslint-disable-next-line icon: 'M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z', size: 45, // handle margin is from symbol center to axis, which is stable when circular move. margin: 50, // color: '#1b8bbd' // color: '#2f4554' color: '#333', shadowBlur: 3, shadowColor: '#aaa', shadowOffsetX: 0, shadowOffsetY: 2, // For mobile performance throttle: 40 } }; return AxisPointerModel; }(Component); /* harmony default export */ var axisPointer_AxisPointerModel = (AxisPointerModel_AxisPointerModel); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/axisPointer/globalListener.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 globalListener_inner = makeInner(); var globalListener_each = core_util["each"]; /** * @param {string} key * @param {module:echarts/ExtensionAPI} api * @param {Function} handler * param: {string} currTrigger * param: {Array.} point */ function register(key, api, handler) { if (core_env["a" /* default */].node) { return; } var zr = api.getZr(); globalListener_inner(zr).records || (globalListener_inner(zr).records = {}); initGlobalListeners(zr, api); var record = globalListener_inner(zr).records[key] || (globalListener_inner(zr).records[key] = {}); record.handler = handler; } function initGlobalListeners(zr, api) { if (globalListener_inner(zr).initialized) { return; } globalListener_inner(zr).initialized = true; useHandler('click', core_util["curry"](doEnter, 'click')); useHandler('mousemove', core_util["curry"](doEnter, 'mousemove')); // useHandler('mouseout', onLeave); useHandler('globalout', onLeave); function useHandler(eventType, cb) { zr.on(eventType, function (e) { var dis = makeDispatchAction(api); globalListener_each(globalListener_inner(zr).records, function (record) { record && cb(record, e, dis.dispatchAction); }); dispatchTooltipFinally(dis.pendings, api); }); } } function dispatchTooltipFinally(pendings, api) { var showLen = pendings.showTip.length; var hideLen = pendings.hideTip.length; var actuallyPayload; if (showLen) { actuallyPayload = pendings.showTip[showLen - 1]; } else if (hideLen) { actuallyPayload = pendings.hideTip[hideLen - 1]; } if (actuallyPayload) { actuallyPayload.dispatchAction = null; api.dispatchAction(actuallyPayload); } } function onLeave(record, e, dispatchAction) { record.handler('leave', null, dispatchAction); } function doEnter(currTrigger, record, e, dispatchAction) { record.handler(currTrigger, e, dispatchAction); } function makeDispatchAction(api) { var pendings = { showTip: [], hideTip: [] }; // FIXME // better approach? // 'showTip' and 'hideTip' can be triggered by axisPointer and tooltip, // which may be conflict, (axisPointer call showTip but tooltip call hideTip); // So we have to add "final stage" to merge those dispatched actions. var dispatchAction = function (payload) { var pendingList = pendings[payload.type]; if (pendingList) { pendingList.push(payload); } else { payload.dispatchAction = dispatchAction; api.dispatchAction(payload); } }; return { dispatchAction: dispatchAction, pendings: pendings }; } function unregister(key, api) { if (core_env["a" /* default */].node) { return; } var zr = api.getZr(); var record = (globalListener_inner(zr).records || {})[key]; if (record) { globalListener_inner(zr).records[key] = null; } } // CONCATENATED MODULE: ./node_modules/echarts/lib/component/axisPointer/AxisPointerView.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 AxisPointerView_AxisPointerView = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(AxisPointerView, _super); function AxisPointerView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = AxisPointerView.type; return _this; } AxisPointerView.prototype.render = function (globalAxisPointerModel, ecModel, api) { var globalTooltipModel = ecModel.getComponent('tooltip'); var triggerOn = globalAxisPointerModel.get('triggerOn') || globalTooltipModel && globalTooltipModel.get('triggerOn') || 'mousemove|click'; // Register global listener in AxisPointerView to enable // AxisPointerView to be independent to Tooltip. register('axisPointer', api, function (currTrigger, e, dispatchAction) { // If 'none', it is not controlled by mouse totally. if (triggerOn !== 'none' && (currTrigger === 'leave' || triggerOn.indexOf(currTrigger) >= 0)) { dispatchAction({ type: 'updateAxisPointer', currTrigger: currTrigger, x: e && e.offsetX, y: e && e.offsetY }); } }); }; AxisPointerView.prototype.remove = function (ecModel, api) { unregister('axisPointer', api); }; AxisPointerView.prototype.dispose = function (ecModel, api) { unregister('axisPointer', api); }; AxisPointerView.type = 'axisPointer'; return AxisPointerView; }(view_Component); /* harmony default export */ var axisPointer_AxisPointerView = (AxisPointerView_AxisPointerView); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/axisPointer/findPointFromSeries.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ /** * @param finder contains {seriesIndex, dataIndex, dataIndexInside} * @param ecModel * @return {point: [x, y], el: ...} point Will not be null. */ function findPointFromSeries(finder, ecModel) { var point = []; var seriesIndex = finder.seriesIndex; var seriesModel; if (seriesIndex == null || !(seriesModel = ecModel.getSeriesByIndex(seriesIndex))) { return { point: [] }; } var data = seriesModel.getData(); var dataIndex = queryDataIndex(data, finder); if (dataIndex == null || dataIndex < 0 || core_util["isArray"](dataIndex)) { return { point: [] }; } var el = data.getItemGraphicEl(dataIndex); var coordSys = seriesModel.coordinateSystem; if (seriesModel.getTooltipPosition) { point = seriesModel.getTooltipPosition(dataIndex) || []; } else if (coordSys && coordSys.dataToPoint) { if (finder.isStacked) { var baseAxis = coordSys.getBaseAxis(); var valueAxis = coordSys.getOtherAxis(baseAxis); var valueAxisDim = valueAxis.dim; var baseAxisDim = baseAxis.dim; var baseDataOffset = valueAxisDim === 'x' || valueAxisDim === 'radius' ? 1 : 0; var baseDim = data.mapDimension(baseAxisDim); var stackedData = []; stackedData[baseDataOffset] = data.get(baseDim, dataIndex); stackedData[1 - baseDataOffset] = data.get(data.getCalculationInfo('stackResultDimension'), dataIndex); point = coordSys.dataToPoint(stackedData) || []; } else { point = coordSys.dataToPoint(data.getValues(core_util["map"](coordSys.dimensions, function (dim) { return data.mapDimension(dim); }), dataIndex)) || []; } } else if (el) { // Use graphic bounding rect var rect = el.getBoundingRect().clone(); rect.applyTransform(el.transform); point = [rect.x + rect.width / 2, rect.y + rect.height / 2]; } return { point: point, el: el }; } // CONCATENATED MODULE: ./node_modules/echarts/lib/component/axisPointer/axisTrigger.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 axisTrigger_inner = makeInner(); /** * Basic logic: check all axis, if they do not demand show/highlight, * then hide/downplay them. * * @return content of event obj for echarts.connect. */ function axisTrigger(payload, ecModel, api) { var currTrigger = payload.currTrigger; var point = [payload.x, payload.y]; var finder = payload; var dispatchAction = payload.dispatchAction || Object(core_util["bind"])(api.dispatchAction, api); var coordSysAxesInfo = ecModel.getComponent('axisPointer').coordSysAxesInfo; // Pending // See #6121. But we are not able to reproduce it yet. if (!coordSysAxesInfo) { return; } if (illegalPoint(point)) { // Used in the default behavior of `connection`: use the sample seriesIndex // and dataIndex. And also used in the tooltipView trigger. point = findPointFromSeries({ seriesIndex: finder.seriesIndex, // Do not use dataIndexInside from other ec instance. // FIXME: auto detect it? dataIndex: finder.dataIndex }, ecModel).point; } var isIllegalPoint = illegalPoint(point); // Axis and value can be specified when calling dispatchAction({type: 'updateAxisPointer'}). // Notice: In this case, it is difficult to get the `point` (which is necessary to show // tooltip, so if point is not given, we just use the point found by sample seriesIndex // and dataIndex. var inputAxesInfo = finder.axesInfo; var axesInfo = coordSysAxesInfo.axesInfo; var shouldHide = currTrigger === 'leave' || illegalPoint(point); var outputPayload = {}; var showValueMap = {}; var dataByCoordSys = { list: [], map: {} }; var updaters = { showPointer: Object(core_util["curry"])(axisTrigger_showPointer, showValueMap), showTooltip: Object(core_util["curry"])(showTooltip, dataByCoordSys) }; // Process for triggered axes. Object(core_util["each"])(coordSysAxesInfo.coordSysMap, function (coordSys, coordSysKey) { // If a point given, it must be contained by the coordinate system. var coordSysContainsPoint = isIllegalPoint || coordSys.containPoint(point); Object(core_util["each"])(coordSysAxesInfo.coordSysAxesInfo[coordSysKey], function (axisInfo, key) { var axis = axisInfo.axis; var inputAxisInfo = findInputAxisInfo(inputAxesInfo, axisInfo); // If no inputAxesInfo, no axis is restricted. if (!shouldHide && coordSysContainsPoint && (!inputAxesInfo || inputAxisInfo)) { var val = inputAxisInfo && inputAxisInfo.value; if (val == null && !isIllegalPoint) { val = axis.pointToData(point); } val != null && processOnAxis(axisInfo, val, updaters, false, outputPayload); } }); }); // Process for linked axes. var linkTriggers = {}; Object(core_util["each"])(axesInfo, function (tarAxisInfo, tarKey) { var linkGroup = tarAxisInfo.linkGroup; // If axis has been triggered in the previous stage, it should not be triggered by link. if (linkGroup && !showValueMap[tarKey]) { Object(core_util["each"])(linkGroup.axesInfo, function (srcAxisInfo, srcKey) { var srcValItem = showValueMap[srcKey]; // If srcValItem exist, source axis is triggered, so link to target axis. if (srcAxisInfo !== tarAxisInfo && srcValItem) { var val = srcValItem.value; linkGroup.mapper && (val = tarAxisInfo.axis.scale.parse(linkGroup.mapper(val, makeMapperParam(srcAxisInfo), makeMapperParam(tarAxisInfo)))); linkTriggers[tarAxisInfo.key] = val; } }); } }); Object(core_util["each"])(linkTriggers, function (val, tarKey) { processOnAxis(axesInfo[tarKey], val, updaters, true, outputPayload); }); updateModelActually(showValueMap, axesInfo, outputPayload); dispatchTooltipActually(dataByCoordSys, point, payload, dispatchAction); dispatchHighDownActually(axesInfo, dispatchAction, api); return outputPayload; } function processOnAxis(axisInfo, newValue, updaters, noSnap, outputFinder) { var axis = axisInfo.axis; if (axis.scale.isBlank() || !axis.containData(newValue)) { return; } if (!axisInfo.involveSeries) { updaters.showPointer(axisInfo, newValue); return; } // Heavy calculation. So put it after axis.containData checking. var payloadInfo = buildPayloadsBySeries(newValue, axisInfo); var payloadBatch = payloadInfo.payloadBatch; var snapToValue = payloadInfo.snapToValue; // Fill content of event obj for echarts.connect. // By default use the first involved series data as a sample to connect. if (payloadBatch[0] && outputFinder.seriesIndex == null) { Object(core_util["extend"])(outputFinder, payloadBatch[0]); } // If no linkSource input, this process is for collecting link // target, where snap should not be accepted. if (!noSnap && axisInfo.snap) { if (axis.containData(snapToValue) && snapToValue != null) { newValue = snapToValue; } } updaters.showPointer(axisInfo, newValue, payloadBatch); // Tooltip should always be snapToValue, otherwise there will be // incorrect "axis value ~ series value" mapping displayed in tooltip. updaters.showTooltip(axisInfo, payloadInfo, snapToValue); } function buildPayloadsBySeries(value, axisInfo) { var axis = axisInfo.axis; var dim = axis.dim; var snapToValue = value; var payloadBatch = []; var minDist = Number.MAX_VALUE; var minDiff = -1; Object(core_util["each"])(axisInfo.seriesModels, function (series, idx) { var dataDim = series.getData().mapDimensionsAll(dim); var seriesNestestValue; var dataIndices; if (series.getAxisTooltipData) { var result = series.getAxisTooltipData(dataDim, value, axis); dataIndices = result.dataIndices; seriesNestestValue = result.nestestValue; } else { dataIndices = series.getData().indicesOfNearest(dataDim[0], value, // Add a threshold to avoid find the wrong dataIndex // when data length is not same. // false, axis.type === 'category' ? 0.5 : null); if (!dataIndices.length) { return; } seriesNestestValue = series.getData().get(dataDim[0], dataIndices[0]); } if (seriesNestestValue == null || !isFinite(seriesNestestValue)) { return; } var diff = value - seriesNestestValue; var dist = Math.abs(diff); // Consider category case if (dist <= minDist) { if (dist < minDist || diff >= 0 && minDiff < 0) { minDist = dist; minDiff = diff; snapToValue = seriesNestestValue; payloadBatch.length = 0; } Object(core_util["each"])(dataIndices, function (dataIndex) { payloadBatch.push({ seriesIndex: series.seriesIndex, dataIndexInside: dataIndex, dataIndex: series.getData().getRawIndex(dataIndex) }); }); } }); return { payloadBatch: payloadBatch, snapToValue: snapToValue }; } function axisTrigger_showPointer(showValueMap, axisInfo, value, payloadBatch) { showValueMap[axisInfo.key] = { value: value, payloadBatch: payloadBatch }; } function showTooltip(dataByCoordSys, axisInfo, payloadInfo, value) { var payloadBatch = payloadInfo.payloadBatch; var axis = axisInfo.axis; var axisModel = axis.model; var axisPointerModel = axisInfo.axisPointerModel; // If no data, do not create anything in dataByCoordSys, // whose length will be used to judge whether dispatch action. if (!axisInfo.triggerTooltip || !payloadBatch.length) { return; } var coordSysModel = axisInfo.coordSys.model; var coordSysKey = makeKey(coordSysModel); var coordSysItem = dataByCoordSys.map[coordSysKey]; if (!coordSysItem) { coordSysItem = dataByCoordSys.map[coordSysKey] = { coordSysId: coordSysModel.id, coordSysIndex: coordSysModel.componentIndex, coordSysType: coordSysModel.type, coordSysMainType: coordSysModel.mainType, dataByAxis: [] }; dataByCoordSys.list.push(coordSysItem); } coordSysItem.dataByAxis.push({ axisDim: axis.dim, axisIndex: axisModel.componentIndex, axisType: axisModel.type, axisId: axisModel.id, value: value, // Caustion: viewHelper.getValueLabel is actually on "view stage", which // depends that all models have been updated. So it should not be performed // here. Considering axisPointerModel used here is volatile, which is hard // to be retrieve in TooltipView, we prepare parameters here. valueLabelOpt: { precision: axisPointerModel.get(['label', 'precision']), formatter: axisPointerModel.get(['label', 'formatter']) }, seriesDataIndices: payloadBatch.slice() }); } function updateModelActually(showValueMap, axesInfo, outputPayload) { var outputAxesInfo = outputPayload.axesInfo = []; // Basic logic: If no 'show' required, 'hide' this axisPointer. Object(core_util["each"])(axesInfo, function (axisInfo, key) { var option = axisInfo.axisPointerModel.option; var valItem = showValueMap[key]; if (valItem) { !axisInfo.useHandle && (option.status = 'show'); option.value = valItem.value; // For label formatter param and highlight. option.seriesDataIndices = (valItem.payloadBatch || []).slice(); } // When always show (e.g., handle used), remain // original value and status. else { // If hide, value still need to be set, consider // click legend to toggle axis blank. !axisInfo.useHandle && (option.status = 'hide'); } // If status is 'hide', should be no info in payload. option.status === 'show' && outputAxesInfo.push({ axisDim: axisInfo.axis.dim, axisIndex: axisInfo.axis.model.componentIndex, value: option.value }); }); } function dispatchTooltipActually(dataByCoordSys, point, payload, dispatchAction) { // Basic logic: If no showTip required, hideTip will be dispatched. if (illegalPoint(point) || !dataByCoordSys.list.length) { dispatchAction({ type: 'hideTip' }); return; } // In most case only one axis (or event one series is used). It is // convenient to fetch payload.seriesIndex and payload.dataIndex // directly. So put the first seriesIndex and dataIndex of the first // axis on the payload. var sampleItem = ((dataByCoordSys.list[0].dataByAxis[0] || {}).seriesDataIndices || [])[0] || {}; dispatchAction({ type: 'showTip', escapeConnect: true, x: point[0], y: point[1], tooltipOption: payload.tooltipOption, position: payload.position, dataIndexInside: sampleItem.dataIndexInside, dataIndex: sampleItem.dataIndex, seriesIndex: sampleItem.seriesIndex, dataByCoordSys: dataByCoordSys.list }); } function dispatchHighDownActually(axesInfo, dispatchAction, api) { // FIXME // highlight status modification should be a stage of main process? // (Consider confilct (e.g., legend and axisPointer) and setOption) var zr = api.getZr(); var highDownKey = 'axisPointerLastHighlights'; var lastHighlights = axisTrigger_inner(zr)[highDownKey] || {}; var newHighlights = axisTrigger_inner(zr)[highDownKey] = {}; // Update highlight/downplay status according to axisPointer model. // Build hash map and remove duplicate incidentally. Object(core_util["each"])(axesInfo, function (axisInfo, key) { var option = axisInfo.axisPointerModel.option; option.status === 'show' && axisInfo.triggerEmphasis && Object(core_util["each"])(option.seriesDataIndices, function (batchItem) { var key = batchItem.seriesIndex + ' | ' + batchItem.dataIndex; newHighlights[key] = batchItem; }); }); // Diff. var toHighlight = []; var toDownplay = []; Object(core_util["each"])(lastHighlights, function (batchItem, key) { !newHighlights[key] && toDownplay.push(batchItem); }); Object(core_util["each"])(newHighlights, function (batchItem, key) { !lastHighlights[key] && toHighlight.push(batchItem); }); toDownplay.length && api.dispatchAction({ type: 'downplay', escapeConnect: true, // Not blur others when highlight in axisPointer. notBlur: true, batch: toDownplay }); toHighlight.length && api.dispatchAction({ type: 'highlight', escapeConnect: true, // Not blur others when highlight in axisPointer. notBlur: true, batch: toHighlight }); } function findInputAxisInfo(inputAxesInfo, axisInfo) { for (var i = 0; i < (inputAxesInfo || []).length; i++) { var inputAxisInfo = inputAxesInfo[i]; if (axisInfo.axis.dim === inputAxisInfo.axisDim && axisInfo.axis.model.componentIndex === inputAxisInfo.axisIndex) { return inputAxisInfo; } } } function makeMapperParam(axisInfo) { var axisModel = axisInfo.axis.model; var item = {}; var dim = item.axisDim = axisInfo.axis.dim; item.axisIndex = item[dim + 'AxisIndex'] = axisModel.componentIndex; item.axisName = item[dim + 'AxisName'] = axisModel.name; item.axisId = item[dim + 'AxisId'] = axisModel.id; return item; } function illegalPoint(point) { return !point || point[0] == null || isNaN(point[0]) || point[1] == null || isNaN(point[1]); } // CONCATENATED MODULE: ./node_modules/echarts/lib/component/axisPointer/install.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 axisPointer_install_install(registers) { // CartesianAxisPointer is not supposed to be required here. But consider // echarts.simple.js and online build tooltip, which only require gridSimple, // CartesianAxisPointer should be able to required somewhere. axis_AxisView.registerAxisPointerClass('CartesianAxisPointer', axisPointer_CartesianAxisPointer); registers.registerComponentModel(axisPointer_AxisPointerModel); registers.registerComponentView(axisPointer_AxisPointerView); registers.registerPreprocessor(function (option) { // Always has a global axisPointerModel for default setting. if (option) { (!option.axisPointer || option.axisPointer.length === 0) && (option.axisPointer = {}); var link = option.axisPointer.link; // Normalize to array to avoid object mergin. But if link // is not set, remain null/undefined, otherwise it will // override existent link setting. if (link && !Object(core_util["isArray"])(link)) { option.axisPointer.link = [link]; } } }); // This process should proformed after coordinate systems created // and series data processed. So put it on statistic processing stage. registers.registerProcessor(registers.PRIORITY.PROCESSOR.STATISTIC, function (ecModel, api) { // Build axisPointerModel, mergin tooltip.axisPointer model for each axis. // allAxesInfo should be updated when setOption performed. ecModel.getComponent('axisPointer').coordSysAxesInfo = collect(ecModel, api); }); // Broadcast to all views. registers.registerAction({ type: 'updateAxisPointer', event: 'updateAxisPointer', update: ':updateAxisPointer' }, axisTrigger); } // CONCATENATED MODULE: ./node_modules/echarts/lib/component/grid/install.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 grid_install_install(registers) { use(installSimple_install); use(axisPointer_install_install); } // CONCATENATED MODULE: ./node_modules/echarts/lib/component/axisPointer/PolarAxisPointer.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 PolarAxisPointer_PolarAxisPointer = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(PolarAxisPointer, _super); function PolarAxisPointer() { return _super !== null && _super.apply(this, arguments) || this; } /** * @override */ PolarAxisPointer.prototype.makeElOption = function (elOption, value, axisModel, axisPointerModel, api) { var axis = axisModel.axis; if (axis.dim === 'angle') { this.animationThreshold = Math.PI / 18; } var polar = axis.polar; var otherAxis = polar.getOtherAxis(axis); var otherExtent = otherAxis.getExtent(); var coordValue = axis.dataToCoord(value); var axisPointerType = axisPointerModel.get('type'); if (axisPointerType && axisPointerType !== 'none') { var elStyle = buildElStyle(axisPointerModel); var pointerOption = PolarAxisPointer_pointerShapeBuilder[axisPointerType](axis, polar, coordValue, otherExtent); pointerOption.style = elStyle; elOption.graphicKey = pointerOption.type; elOption.pointer = pointerOption; } var labelMargin = axisPointerModel.get(['label', 'margin']); var labelPos = getLabelPosition(value, axisModel, axisPointerModel, polar, labelMargin); buildLabelElOption(elOption, axisModel, axisPointerModel, api, labelPos); }; return PolarAxisPointer; }(axisPointer_BaseAxisPointer); ; function getLabelPosition(value, axisModel, axisPointerModel, polar, labelMargin) { var axis = axisModel.axis; var coord = axis.dataToCoord(value); var axisAngle = polar.getAngleAxis().getExtent()[0]; axisAngle = axisAngle / 180 * Math.PI; var radiusExtent = polar.getRadiusAxis().getExtent(); var position; var align; var verticalAlign; if (axis.dim === 'radius') { var transform = matrix_create(); matrix_rotate(transform, transform, axisAngle); matrix_translate(transform, transform, [polar.cx, polar.cy]); position = graphic_applyTransform([coord, -labelMargin], transform); var labelRotation = axisModel.getModel('axisLabel').get('rotate') || 0; // @ts-ignore var labelLayout = axis_AxisBuilder.innerTextLayout(axisAngle, labelRotation * Math.PI / 180, -1); align = labelLayout.textAlign; verticalAlign = labelLayout.textVerticalAlign; } else { // angle axis var r = radiusExtent[1]; position = polar.coordToPoint([r + labelMargin, coord]); var cx = polar.cx; var cy = polar.cy; align = Math.abs(position[0] - cx) / r < 0.3 ? 'center' : position[0] > cx ? 'left' : 'right'; verticalAlign = Math.abs(position[1] - cy) / r < 0.3 ? 'middle' : position[1] > cy ? 'top' : 'bottom'; } return { position: position, align: align, verticalAlign: verticalAlign }; } var PolarAxisPointer_pointerShapeBuilder = { line: function (axis, polar, coordValue, otherExtent) { return axis.dim === 'angle' ? { type: 'Line', shape: makeLineShape(polar.coordToPoint([otherExtent[0], coordValue]), polar.coordToPoint([otherExtent[1], coordValue])) } : { type: 'Circle', shape: { cx: polar.cx, cy: polar.cy, r: coordValue } }; }, shadow: function (axis, polar, coordValue, otherExtent) { var bandWidth = Math.max(1, axis.getBandWidth()); var radian = Math.PI / 180; return axis.dim === 'angle' ? { type: 'Sector', shape: makeSectorShape(polar.cx, polar.cy, otherExtent[0], otherExtent[1], // In ECharts y is negative if angle is positive (-coordValue - bandWidth / 2) * radian, (-coordValue + bandWidth / 2) * radian) } : { type: 'Sector', shape: makeSectorShape(polar.cx, polar.cy, coordValue - bandWidth / 2, coordValue + bandWidth / 2, 0, Math.PI * 2) }; } }; /* harmony default export */ var axisPointer_PolarAxisPointer = (PolarAxisPointer_PolarAxisPointer); // CONCATENATED MODULE: ./node_modules/echarts/lib/coord/polar/PolarModel.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 PolarModel_PolarModel = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(PolarModel, _super); function PolarModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = PolarModel.type; return _this; } PolarModel.prototype.findAxisModel = function (axisType) { var foundAxisModel; var ecModel = this.ecModel; ecModel.eachComponent(axisType, function (axisModel) { if (axisModel.getCoordSysModel() === this) { foundAxisModel = axisModel; } }, this); return foundAxisModel; }; PolarModel.type = 'polar'; PolarModel.dependencies = ['radiusAxis', 'angleAxis']; PolarModel.defaultOption = { // zlevel: 0, z: 0, center: ['50%', '50%'], radius: '80%' }; return PolarModel; }(Component); /* harmony default export */ var polar_PolarModel = (PolarModel_PolarModel); // CONCATENATED MODULE: ./node_modules/echarts/lib/coord/polar/AxisModel.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 AxisModel_PolarAxisModel = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(PolarAxisModel, _super); function PolarAxisModel() { return _super !== null && _super.apply(this, arguments) || this; } PolarAxisModel.prototype.getCoordSysModel = function () { return this.getReferringComponents('polar', SINGLE_REFERRING).models[0]; }; PolarAxisModel.type = 'polarAxis'; return PolarAxisModel; }(Component); core_util["mixin"](AxisModel_PolarAxisModel, AxisModelCommonMixin); var AxisModel_AngleAxisModel = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(AngleAxisModel, _super); function AngleAxisModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = AngleAxisModel.type; return _this; } AngleAxisModel.type = 'angleAxis'; return AngleAxisModel; }(AxisModel_PolarAxisModel); var AxisModel_RadiusAxisModel = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(RadiusAxisModel, _super); function RadiusAxisModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = RadiusAxisModel.type; return _this; } RadiusAxisModel.type = 'radiusAxis'; return RadiusAxisModel; }(AxisModel_PolarAxisModel); // CONCATENATED MODULE: ./node_modules/echarts/lib/coord/polar/RadiusAxis.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 RadiusAxis_RadiusAxis = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(RadiusAxis, _super); function RadiusAxis(scale, radiusExtent) { return _super.call(this, 'radius', scale, radiusExtent) || this; } RadiusAxis.prototype.pointToData = function (point, clamp) { return this.polar.pointToData(point, clamp)[this.dim === 'radius' ? 0 : 1]; }; return RadiusAxis; }(coord_Axis); RadiusAxis_RadiusAxis.prototype.dataToRadius = coord_Axis.prototype.dataToCoord; RadiusAxis_RadiusAxis.prototype.radiusToData = coord_Axis.prototype.coordToData; /* harmony default export */ var polar_RadiusAxis = (RadiusAxis_RadiusAxis); // CONCATENATED MODULE: ./node_modules/echarts/lib/coord/polar/AngleAxis.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 AngleAxis_inner = makeInner(); var AngleAxis_AngleAxis = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(AngleAxis, _super); function AngleAxis(scale, angleExtent) { return _super.call(this, 'angle', scale, angleExtent || [0, 360]) || this; } AngleAxis.prototype.pointToData = function (point, clamp) { return this.polar.pointToData(point, clamp)[this.dim === 'radius' ? 0 : 1]; }; /** * Only be called in category axis. * Angle axis uses text height to decide interval * * @override * @return {number} Auto interval for cateogry axis tick and label */ AngleAxis.prototype.calculateCategoryInterval = function () { var axis = this; var labelModel = axis.getLabelModel(); var ordinalScale = axis.scale; var ordinalExtent = ordinalScale.getExtent(); // Providing this method is for optimization: // avoid generating a long array by `getTicks` // in large category data case. var tickCount = ordinalScale.count(); if (ordinalExtent[1] - ordinalExtent[0] < 1) { return 0; } var tickValue = ordinalExtent[0]; var unitSpan = axis.dataToCoord(tickValue + 1) - axis.dataToCoord(tickValue); var unitH = Math.abs(unitSpan); // Not precise, just use height as text width // and each distance from axis line yet. var rect = getBoundingRect(tickValue == null ? '' : tickValue + '', labelModel.getFont(), 'center', 'top'); var maxH = Math.max(rect.height, 7); var dh = maxH / unitH; // 0/0 is NaN, 1/0 is Infinity. isNaN(dh) && (dh = Infinity); var interval = Math.max(0, Math.floor(dh)); var cache = AngleAxis_inner(axis.model); var lastAutoInterval = cache.lastAutoInterval; var lastTickCount = cache.lastTickCount; // Use cache to keep interval stable while moving zoom window, // otherwise the calculated interval might jitter when the zoom // window size is close to the interval-changing size. if (lastAutoInterval != null && lastTickCount != null && Math.abs(lastAutoInterval - interval) <= 1 && Math.abs(lastTickCount - tickCount) <= 1 // Always choose the bigger one, otherwise the critical // point is not the same when zooming in or zooming out. && lastAutoInterval > interval) { interval = lastAutoInterval; } // Only update cache if cache not used, otherwise the // changing of interval is too insensitive. else { cache.lastTickCount = tickCount; cache.lastAutoInterval = interval; } return interval; }; return AngleAxis; }(coord_Axis); AngleAxis_AngleAxis.prototype.dataToAngle = coord_Axis.prototype.dataToCoord; AngleAxis_AngleAxis.prototype.angleToData = coord_Axis.prototype.coordToData; /* harmony default export */ var polar_AngleAxis = (AngleAxis_AngleAxis); // CONCATENATED MODULE: ./node_modules/echarts/lib/coord/polar/Polar.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 polarDimensions = ['radius', 'angle']; var Polar_Polar = /** @class */function () { function Polar(name) { this.dimensions = polarDimensions; this.type = 'polar'; /** * x of polar center */ this.cx = 0; /** * y of polar center */ this.cy = 0; this._radiusAxis = new polar_RadiusAxis(); this._angleAxis = new polar_AngleAxis(); this.axisPointerEnabled = true; this.name = name || ''; this._radiusAxis.polar = this._angleAxis.polar = this; } /** * If contain coord */ Polar.prototype.containPoint = function (point) { var coord = this.pointToCoord(point); return this._radiusAxis.contain(coord[0]) && this._angleAxis.contain(coord[1]); }; /** * If contain data */ Polar.prototype.containData = function (data) { return this._radiusAxis.containData(data[0]) && this._angleAxis.containData(data[1]); }; Polar.prototype.getAxis = function (dim) { var key = '_' + dim + 'Axis'; return this[key]; }; Polar.prototype.getAxes = function () { return [this._radiusAxis, this._angleAxis]; }; /** * Get axes by type of scale */ Polar.prototype.getAxesByScale = function (scaleType) { var axes = []; var angleAxis = this._angleAxis; var radiusAxis = this._radiusAxis; angleAxis.scale.type === scaleType && axes.push(angleAxis); radiusAxis.scale.type === scaleType && axes.push(radiusAxis); return axes; }; Polar.prototype.getAngleAxis = function () { return this._angleAxis; }; Polar.prototype.getRadiusAxis = function () { return this._radiusAxis; }; Polar.prototype.getOtherAxis = function (axis) { var angleAxis = this._angleAxis; return axis === angleAxis ? this._radiusAxis : angleAxis; }; /** * Base axis will be used on stacking. * */ Polar.prototype.getBaseAxis = function () { return this.getAxesByScale('ordinal')[0] || this.getAxesByScale('time')[0] || this.getAngleAxis(); }; Polar.prototype.getTooltipAxes = function (dim) { var baseAxis = dim != null && dim !== 'auto' ? this.getAxis(dim) : this.getBaseAxis(); return { baseAxes: [baseAxis], otherAxes: [this.getOtherAxis(baseAxis)] }; }; /** * Convert a single data item to (x, y) point. * Parameter data is an array which the first element is radius and the second is angle */ Polar.prototype.dataToPoint = function (data, clamp) { return this.coordToPoint([this._radiusAxis.dataToRadius(data[0], clamp), this._angleAxis.dataToAngle(data[1], clamp)]); }; /** * Convert a (x, y) point to data */ Polar.prototype.pointToData = function (point, clamp) { var coord = this.pointToCoord(point); return [this._radiusAxis.radiusToData(coord[0], clamp), this._angleAxis.angleToData(coord[1], clamp)]; }; /** * Convert a (x, y) point to (radius, angle) coord */ Polar.prototype.pointToCoord = function (point) { var dx = point[0] - this.cx; var dy = point[1] - this.cy; var angleAxis = this.getAngleAxis(); var extent = angleAxis.getExtent(); var minAngle = Math.min(extent[0], extent[1]); var maxAngle = Math.max(extent[0], extent[1]); // Fix fixed extent in polarCreator // FIXME angleAxis.inverse ? minAngle = maxAngle - 360 : maxAngle = minAngle + 360; var radius = Math.sqrt(dx * dx + dy * dy); dx /= radius; dy /= radius; var radian = Math.atan2(-dy, dx) / Math.PI * 180; // move to angleExtent var dir = radian < minAngle ? 1 : -1; while (radian < minAngle || radian > maxAngle) { radian += dir * 360; } return [radius, radian]; }; /** * Convert a (radius, angle) coord to (x, y) point */ Polar.prototype.coordToPoint = function (coord) { var radius = coord[0]; var radian = coord[1] / 180 * Math.PI; var x = Math.cos(radian) * radius + this.cx; // Inverse the y var y = -Math.sin(radian) * radius + this.cy; return [x, y]; }; /** * Get ring area of cartesian. * Area will have a contain function to determine if a point is in the coordinate system. */ Polar.prototype.getArea = function () { var angleAxis = this.getAngleAxis(); var radiusAxis = this.getRadiusAxis(); var radiusExtent = radiusAxis.getExtent().slice(); radiusExtent[0] > radiusExtent[1] && radiusExtent.reverse(); var angleExtent = angleAxis.getExtent(); var RADIAN = Math.PI / 180; var EPSILON = 1e-4; return { cx: this.cx, cy: this.cy, r0: radiusExtent[0], r: radiusExtent[1], startAngle: -angleExtent[0] * RADIAN, endAngle: -angleExtent[1] * RADIAN, clockwise: angleAxis.inverse, contain: function (x, y) { // It's a ring shape. // Start angle and end angle don't matter var dx = x - this.cx; var dy = y - this.cy; var d2 = dx * dx + dy * dy; var r = this.r; var r0 = this.r0; // minus a tiny value 1e-4 in double side to avoid being clipped unexpectedly // r == r0 contain nothing return r !== r0 && d2 - EPSILON <= r * r && d2 + EPSILON >= r0 * r0; } }; }; Polar.prototype.convertToPixel = function (ecModel, finder, value) { var coordSys = Polar_getCoordSys(finder); return coordSys === this ? this.dataToPoint(value) : null; }; Polar.prototype.convertFromPixel = function (ecModel, finder, pixel) { var coordSys = Polar_getCoordSys(finder); return coordSys === this ? this.pointToData(pixel) : null; }; return Polar; }(); function Polar_getCoordSys(finder) { var seriesModel = finder.seriesModel; var polarModel = finder.polarModel; return polarModel && polarModel.coordinateSystem || seriesModel && seriesModel.coordinateSystem; } /* harmony default export */ var polar_Polar = (Polar_Polar); // CONCATENATED MODULE: ./node_modules/echarts/lib/coord/polar/polarCreator.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 Axis scale /** * Resize method bound to the polar */ function resizePolar(polar, polarModel, api) { var center = polarModel.get('center'); var width = api.getWidth(); var height = api.getHeight(); polar.cx = number_parsePercent(center[0], width); polar.cy = number_parsePercent(center[1], height); var radiusAxis = polar.getRadiusAxis(); var size = Math.min(width, height) / 2; var radius = polarModel.get('radius'); if (radius == null) { radius = [0, '100%']; } else if (!core_util["isArray"](radius)) { // r0 = 0 radius = [0, radius]; } var parsedRadius = [number_parsePercent(radius[0], size), number_parsePercent(radius[1], size)]; radiusAxis.inverse ? radiusAxis.setExtent(parsedRadius[1], parsedRadius[0]) : radiusAxis.setExtent(parsedRadius[0], parsedRadius[1]); } /** * Update polar */ function updatePolarScale(ecModel, api) { var polar = this; var angleAxis = polar.getAngleAxis(); var radiusAxis = polar.getRadiusAxis(); // Reset scale angleAxis.scale.setExtent(Infinity, -Infinity); radiusAxis.scale.setExtent(Infinity, -Infinity); ecModel.eachSeries(function (seriesModel) { if (seriesModel.coordinateSystem === polar) { var data_1 = seriesModel.getData(); core_util["each"](getDataDimensionsOnAxis(data_1, 'radius'), function (dim) { radiusAxis.scale.unionExtentFromData(data_1, dim); }); core_util["each"](getDataDimensionsOnAxis(data_1, 'angle'), function (dim) { angleAxis.scale.unionExtentFromData(data_1, dim); }); } }); niceScaleExtent(angleAxis.scale, angleAxis.model); niceScaleExtent(radiusAxis.scale, radiusAxis.model); // Fix extent of category angle axis if (angleAxis.type === 'category' && !angleAxis.onBand) { var extent = angleAxis.getExtent(); var diff = 360 / angleAxis.scale.count(); angleAxis.inverse ? extent[1] += diff : extent[1] -= diff; angleAxis.setExtent(extent[0], extent[1]); } } function isAngleAxisModel(axisModel) { return axisModel.mainType === 'angleAxis'; } /** * Set common axis properties */ function setAxis(axis, axisModel) { var _a; axis.type = axisModel.get('type'); axis.scale = createScaleByModel(axisModel); axis.onBand = axisModel.get('boundaryGap') && axis.type === 'category'; axis.inverse = axisModel.get('inverse'); if (isAngleAxisModel(axisModel)) { axis.inverse = axis.inverse !== axisModel.get('clockwise'); var startAngle = axisModel.get('startAngle'); var endAngle = (_a = axisModel.get('endAngle')) !== null && _a !== void 0 ? _a : startAngle + (axis.inverse ? -360 : 360); axis.setExtent(startAngle, endAngle); } // Inject axis instance axisModel.axis = axis; axis.model = axisModel; } var polarCreator = { dimensions: polarDimensions, create: function (ecModel, api) { var polarList = []; ecModel.eachComponent('polar', function (polarModel, idx) { var polar = new polar_Polar(idx + ''); // Inject resize and update method polar.update = updatePolarScale; var radiusAxis = polar.getRadiusAxis(); var angleAxis = polar.getAngleAxis(); var radiusAxisModel = polarModel.findAxisModel('radiusAxis'); var angleAxisModel = polarModel.findAxisModel('angleAxis'); setAxis(radiusAxis, radiusAxisModel); setAxis(angleAxis, angleAxisModel); resizePolar(polar, polarModel, api); polarList.push(polar); polarModel.coordinateSystem = polar; polar.model = polarModel; }); // Inject coordinateSystem to series ecModel.eachSeries(function (seriesModel) { if (seriesModel.get('coordinateSystem') === 'polar') { var polarModel = seriesModel.getReferringComponents('polar', SINGLE_REFERRING).models[0]; if (false) { if (!polarModel) { throw new Error('Polar "' + zrUtil.retrieve(seriesModel.get('polarIndex'), seriesModel.get('polarId'), 0) + '" not found'); } } seriesModel.coordinateSystem = polarModel.coordinateSystem; } }); return polarList; } }; /* harmony default export */ var polar_polarCreator = (polarCreator); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/axis/AngleAxisView.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 AngleAxisView_elementList = ['axisLine', 'axisLabel', 'axisTick', 'minorTick', 'splitLine', 'minorSplitLine', 'splitArea']; function getAxisLineShape(polar, rExtent, angle) { rExtent[1] > rExtent[0] && (rExtent = rExtent.slice().reverse()); var start = polar.coordToPoint([rExtent[0], angle]); var end = polar.coordToPoint([rExtent[1], angle]); return { x1: start[0], y1: start[1], x2: end[0], y2: end[1] }; } function getRadiusIdx(polar) { var radiusAxis = polar.getRadiusAxis(); return radiusAxis.inverse ? 0 : 1; } // Remove the last tick which will overlap the first tick function fixAngleOverlap(list) { var firstItem = list[0]; var lastItem = list[list.length - 1]; if (firstItem && lastItem && Math.abs(Math.abs(firstItem.coord - lastItem.coord) - 360) < 1e-4) { list.pop(); } } var AngleAxisView_AngleAxisView = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(AngleAxisView, _super); function AngleAxisView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = AngleAxisView.type; _this.axisPointerClass = 'PolarAxisPointer'; return _this; } AngleAxisView.prototype.render = function (angleAxisModel, ecModel) { this.group.removeAll(); if (!angleAxisModel.get('show')) { return; } var angleAxis = angleAxisModel.axis; var polar = angleAxis.polar; var radiusExtent = polar.getRadiusAxis().getExtent(); var ticksAngles = angleAxis.getTicksCoords(); var minorTickAngles = angleAxis.getMinorTicksCoords(); var labels = core_util["map"](angleAxis.getViewLabels(), function (labelItem) { labelItem = core_util["clone"](labelItem); var scale = angleAxis.scale; var tickValue = scale.type === 'ordinal' ? scale.getRawOrdinalNumber(labelItem.tickValue) : labelItem.tickValue; labelItem.coord = angleAxis.dataToCoord(tickValue); return labelItem; }); fixAngleOverlap(labels); fixAngleOverlap(ticksAngles); core_util["each"](AngleAxisView_elementList, function (name) { if (angleAxisModel.get([name, 'show']) && (!angleAxis.scale.isBlank() || name === 'axisLine')) { angelAxisElementsBuilders[name](this.group, angleAxisModel, polar, ticksAngles, minorTickAngles, radiusExtent, labels); } }, this); }; AngleAxisView.type = 'angleAxis'; return AngleAxisView; }(axis_AxisView); var angelAxisElementsBuilders = { axisLine: function (group, angleAxisModel, polar, ticksAngles, minorTickAngles, radiusExtent) { var lineStyleModel = angleAxisModel.getModel(['axisLine', 'lineStyle']); var angleAxis = polar.getAngleAxis(); var RADIAN = Math.PI / 180; var angleExtent = angleAxis.getExtent(); // extent id of the axis radius (r0 and r) var rId = getRadiusIdx(polar); var r0Id = rId ? 0 : 1; var shape; var shapeType = Math.abs(angleExtent[1] - angleExtent[0]) === 360 ? 'Circle' : 'Arc'; if (radiusExtent[r0Id] === 0) { shape = new graphic_namespaceObject[shapeType]({ shape: { cx: polar.cx, cy: polar.cy, r: radiusExtent[rId], startAngle: -angleExtent[0] * RADIAN, endAngle: -angleExtent[1] * RADIAN, clockwise: angleAxis.inverse }, style: lineStyleModel.getLineStyle(), z2: 1, silent: true }); } else { shape = new shape_Ring({ shape: { cx: polar.cx, cy: polar.cy, r: radiusExtent[rId], r0: radiusExtent[r0Id] }, style: lineStyleModel.getLineStyle(), z2: 1, silent: true }); } shape.style.fill = null; group.add(shape); }, axisTick: function (group, angleAxisModel, polar, ticksAngles, minorTickAngles, radiusExtent) { var tickModel = angleAxisModel.getModel('axisTick'); var tickLen = (tickModel.get('inside') ? -1 : 1) * tickModel.get('length'); var radius = radiusExtent[getRadiusIdx(polar)]; var lines = core_util["map"](ticksAngles, function (tickAngleItem) { return new shape_Line({ shape: getAxisLineShape(polar, [radius, radius + tickLen], tickAngleItem.coord) }); }); group.add(graphic_mergePath(lines, { style: core_util["defaults"](tickModel.getModel('lineStyle').getLineStyle(), { stroke: angleAxisModel.get(['axisLine', 'lineStyle', 'color']) }) })); }, minorTick: function (group, angleAxisModel, polar, tickAngles, minorTickAngles, radiusExtent) { if (!minorTickAngles.length) { return; } var tickModel = angleAxisModel.getModel('axisTick'); var minorTickModel = angleAxisModel.getModel('minorTick'); var tickLen = (tickModel.get('inside') ? -1 : 1) * minorTickModel.get('length'); var radius = radiusExtent[getRadiusIdx(polar)]; var lines = []; for (var i = 0; i < minorTickAngles.length; i++) { for (var k = 0; k < minorTickAngles[i].length; k++) { lines.push(new shape_Line({ shape: getAxisLineShape(polar, [radius, radius + tickLen], minorTickAngles[i][k].coord) })); } } group.add(graphic_mergePath(lines, { style: core_util["defaults"](minorTickModel.getModel('lineStyle').getLineStyle(), core_util["defaults"](tickModel.getLineStyle(), { stroke: angleAxisModel.get(['axisLine', 'lineStyle', 'color']) })) })); }, axisLabel: function (group, angleAxisModel, polar, ticksAngles, minorTickAngles, radiusExtent, labels) { var rawCategoryData = angleAxisModel.getCategories(true); var commonLabelModel = angleAxisModel.getModel('axisLabel'); var labelMargin = commonLabelModel.get('margin'); var triggerEvent = angleAxisModel.get('triggerEvent'); // Use length of ticksAngles because it may remove the last tick to avoid overlapping core_util["each"](labels, function (labelItem, idx) { var labelModel = commonLabelModel; var tickValue = labelItem.tickValue; var r = radiusExtent[getRadiusIdx(polar)]; var p = polar.coordToPoint([r + labelMargin, labelItem.coord]); var cx = polar.cx; var cy = polar.cy; var labelTextAlign = Math.abs(p[0] - cx) / r < 0.3 ? 'center' : p[0] > cx ? 'left' : 'right'; var labelTextVerticalAlign = Math.abs(p[1] - cy) / r < 0.3 ? 'middle' : p[1] > cy ? 'top' : 'bottom'; if (rawCategoryData && rawCategoryData[tickValue]) { var rawCategoryItem = rawCategoryData[tickValue]; if (core_util["isObject"](rawCategoryItem) && rawCategoryItem.textStyle) { labelModel = new model_Model(rawCategoryItem.textStyle, commonLabelModel, commonLabelModel.ecModel); } } var textEl = new Text({ silent: axis_AxisBuilder.isLabelSilent(angleAxisModel), style: createTextStyle(labelModel, { x: p[0], y: p[1], fill: labelModel.getTextColor() || angleAxisModel.get(['axisLine', 'lineStyle', 'color']), text: labelItem.formattedLabel, align: labelTextAlign, verticalAlign: labelTextVerticalAlign }) }); group.add(textEl); // Pack data for mouse event if (triggerEvent) { var eventData = axis_AxisBuilder.makeAxisEventDataBase(angleAxisModel); eventData.targetType = 'axisLabel'; eventData.value = labelItem.rawLabel; getECData(textEl).eventData = eventData; } }, this); }, splitLine: function (group, angleAxisModel, polar, ticksAngles, minorTickAngles, radiusExtent) { var splitLineModel = angleAxisModel.getModel('splitLine'); var lineStyleModel = splitLineModel.getModel('lineStyle'); var lineColors = lineStyleModel.get('color'); var lineCount = 0; lineColors = lineColors instanceof Array ? lineColors : [lineColors]; var splitLines = []; for (var i = 0; i < ticksAngles.length; i++) { var colorIndex = lineCount++ % lineColors.length; splitLines[colorIndex] = splitLines[colorIndex] || []; splitLines[colorIndex].push(new shape_Line({ shape: getAxisLineShape(polar, radiusExtent, ticksAngles[i].coord) })); } // Simple optimization // Batching the lines if color are the same for (var i = 0; i < splitLines.length; i++) { group.add(graphic_mergePath(splitLines[i], { style: core_util["defaults"]({ stroke: lineColors[i % lineColors.length] }, lineStyleModel.getLineStyle()), silent: true, z: angleAxisModel.get('z') })); } }, minorSplitLine: function (group, angleAxisModel, polar, ticksAngles, minorTickAngles, radiusExtent) { if (!minorTickAngles.length) { return; } var minorSplitLineModel = angleAxisModel.getModel('minorSplitLine'); var lineStyleModel = minorSplitLineModel.getModel('lineStyle'); var lines = []; for (var i = 0; i < minorTickAngles.length; i++) { for (var k = 0; k < minorTickAngles[i].length; k++) { lines.push(new shape_Line({ shape: getAxisLineShape(polar, radiusExtent, minorTickAngles[i][k].coord) })); } } group.add(graphic_mergePath(lines, { style: lineStyleModel.getLineStyle(), silent: true, z: angleAxisModel.get('z') })); }, splitArea: function (group, angleAxisModel, polar, ticksAngles, minorTickAngles, radiusExtent) { if (!ticksAngles.length) { return; } var splitAreaModel = angleAxisModel.getModel('splitArea'); var areaStyleModel = splitAreaModel.getModel('areaStyle'); var areaColors = areaStyleModel.get('color'); var lineCount = 0; areaColors = areaColors instanceof Array ? areaColors : [areaColors]; var splitAreas = []; var RADIAN = Math.PI / 180; var prevAngle = -ticksAngles[0].coord * RADIAN; var r0 = Math.min(radiusExtent[0], radiusExtent[1]); var r1 = Math.max(radiusExtent[0], radiusExtent[1]); var clockwise = angleAxisModel.get('clockwise'); for (var i = 1, len = ticksAngles.length; i <= len; i++) { var coord = i === len ? ticksAngles[0].coord : ticksAngles[i].coord; var colorIndex = lineCount++ % areaColors.length; splitAreas[colorIndex] = splitAreas[colorIndex] || []; splitAreas[colorIndex].push(new shape_Sector({ shape: { cx: polar.cx, cy: polar.cy, r0: r0, r: r1, startAngle: prevAngle, endAngle: -coord * RADIAN, clockwise: clockwise }, silent: true })); prevAngle = -coord * RADIAN; } // Simple optimization // Batching the lines if color are the same for (var i = 0; i < splitAreas.length; i++) { group.add(graphic_mergePath(splitAreas[i], { style: core_util["defaults"]({ fill: areaColors[i % areaColors.length] }, areaStyleModel.getAreaStyle()), silent: true })); } } }; /* harmony default export */ var axis_AngleAxisView = (AngleAxisView_AngleAxisView); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/axis/RadiusAxisView.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 RadiusAxisView_axisBuilderAttrs = ['axisLine', 'axisTickLabel', 'axisName']; var RadiusAxisView_selfBuilderAttrs = ['splitLine', 'splitArea', 'minorSplitLine']; var RadiusAxisView_RadiusAxisView = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(RadiusAxisView, _super); function RadiusAxisView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = RadiusAxisView.type; _this.axisPointerClass = 'PolarAxisPointer'; return _this; } RadiusAxisView.prototype.render = function (radiusAxisModel, ecModel) { this.group.removeAll(); if (!radiusAxisModel.get('show')) { return; } var oldAxisGroup = this._axisGroup; var newAxisGroup = this._axisGroup = new graphic_Group(); this.group.add(newAxisGroup); var radiusAxis = radiusAxisModel.axis; var polar = radiusAxis.polar; var angleAxis = polar.getAngleAxis(); var ticksCoords = radiusAxis.getTicksCoords(); var minorTicksCoords = radiusAxis.getMinorTicksCoords(); var axisAngle = angleAxis.getExtent()[0]; var radiusExtent = radiusAxis.getExtent(); var layout = layoutAxis(polar, radiusAxisModel, axisAngle); var axisBuilder = new axis_AxisBuilder(radiusAxisModel, layout); core_util["each"](RadiusAxisView_axisBuilderAttrs, axisBuilder.add, axisBuilder); newAxisGroup.add(axisBuilder.getGroup()); groupTransition(oldAxisGroup, newAxisGroup, radiusAxisModel); core_util["each"](RadiusAxisView_selfBuilderAttrs, function (name) { if (radiusAxisModel.get([name, 'show']) && !radiusAxis.scale.isBlank()) { RadiusAxisView_axisElementBuilders[name](this.group, radiusAxisModel, polar, axisAngle, radiusExtent, ticksCoords, minorTicksCoords); } }, this); }; RadiusAxisView.type = 'radiusAxis'; return RadiusAxisView; }(axis_AxisView); var RadiusAxisView_axisElementBuilders = { splitLine: function (group, radiusAxisModel, polar, axisAngle, radiusExtent, ticksCoords) { var splitLineModel = radiusAxisModel.getModel('splitLine'); var lineStyleModel = splitLineModel.getModel('lineStyle'); var lineColors = lineStyleModel.get('color'); var lineCount = 0; var angleAxis = polar.getAngleAxis(); var RADIAN = Math.PI / 180; var angleExtent = angleAxis.getExtent(); var shapeType = Math.abs(angleExtent[1] - angleExtent[0]) === 360 ? 'Circle' : 'Arc'; lineColors = lineColors instanceof Array ? lineColors : [lineColors]; var splitLines = []; for (var i = 0; i < ticksCoords.length; i++) { var colorIndex = lineCount++ % lineColors.length; splitLines[colorIndex] = splitLines[colorIndex] || []; splitLines[colorIndex].push(new graphic_namespaceObject[shapeType]({ shape: { cx: polar.cx, cy: polar.cy, // ensure circle radius >= 0 r: Math.max(ticksCoords[i].coord, 0), startAngle: -angleExtent[0] * RADIAN, endAngle: -angleExtent[1] * RADIAN, clockwise: angleAxis.inverse } })); } // Simple optimization // Batching the lines if color are the same for (var i = 0; i < splitLines.length; i++) { group.add(graphic_mergePath(splitLines[i], { style: core_util["defaults"]({ stroke: lineColors[i % lineColors.length], fill: null }, lineStyleModel.getLineStyle()), silent: true })); } }, minorSplitLine: function (group, radiusAxisModel, polar, axisAngle, radiusExtent, ticksCoords, minorTicksCoords) { if (!minorTicksCoords.length) { return; } var minorSplitLineModel = radiusAxisModel.getModel('minorSplitLine'); var lineStyleModel = minorSplitLineModel.getModel('lineStyle'); var lines = []; for (var i = 0; i < minorTicksCoords.length; i++) { for (var k = 0; k < minorTicksCoords[i].length; k++) { lines.push(new shape_Circle({ shape: { cx: polar.cx, cy: polar.cy, r: minorTicksCoords[i][k].coord } })); } } group.add(graphic_mergePath(lines, { style: core_util["defaults"]({ fill: null }, lineStyleModel.getLineStyle()), silent: true })); }, splitArea: function (group, radiusAxisModel, polar, axisAngle, radiusExtent, ticksCoords) { if (!ticksCoords.length) { return; } var splitAreaModel = radiusAxisModel.getModel('splitArea'); var areaStyleModel = splitAreaModel.getModel('areaStyle'); var areaColors = areaStyleModel.get('color'); var lineCount = 0; areaColors = areaColors instanceof Array ? areaColors : [areaColors]; var splitAreas = []; var prevRadius = ticksCoords[0].coord; for (var i = 1; i < ticksCoords.length; i++) { var colorIndex = lineCount++ % areaColors.length; splitAreas[colorIndex] = splitAreas[colorIndex] || []; splitAreas[colorIndex].push(new shape_Sector({ shape: { cx: polar.cx, cy: polar.cy, r0: prevRadius, r: ticksCoords[i].coord, startAngle: 0, endAngle: Math.PI * 2 }, silent: true })); prevRadius = ticksCoords[i].coord; } // Simple optimization // Batching the lines if color are the same for (var i = 0; i < splitAreas.length; i++) { group.add(graphic_mergePath(splitAreas[i], { style: core_util["defaults"]({ fill: areaColors[i % areaColors.length] }, areaStyleModel.getAreaStyle()), silent: true })); } } }; /** * @inner */ function layoutAxis(polar, radiusAxisModel, axisAngle) { return { position: [polar.cx, polar.cy], rotation: axisAngle / 180 * Math.PI, labelDirection: -1, tickDirection: -1, nameDirection: 1, labelRotate: radiusAxisModel.getModel('axisLabel').get('rotate'), // Over splitLine and splitArea z2: 1 }; } /* harmony default export */ var axis_RadiusAxisView = (RadiusAxisView_RadiusAxisView); // CONCATENATED MODULE: ./node_modules/echarts/lib/layout/barPolar.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 barPolar_getSeriesStackId(seriesModel) { return seriesModel.get('stack') || '__ec_stack_' + seriesModel.seriesIndex; } function barPolar_getAxisKey(polar, axis) { return axis.dim + polar.model.componentIndex; } function barLayoutPolar(seriesType, ecModel, api) { var lastStackCoords = {}; var barWidthAndOffset = calRadialBar(core_util["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 = barPolar_getAxisKey(polar, baseAxis); var stackId = barPolar_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 valueAxisModel = valueAxis.model; var startValue = valueAxisModel.get('startValue'); var valueAxisStart = valueAxis.dataToCoord(startValue || 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, n: valueAxisStart // Negative stack }; } // Should also consider #4243 baseCoord = lastStackCoords[stackId][baseValue][sign]; } var r0 = void 0; var r = void 0; var startAngle = void 0; var endAngle = void 0; // radial sector if (valueAxis.dim === 'radius') { var radiusSpan = valueAxis.dataToCoord(value) - valueAxisStart; var angle = baseAxis.dataToCoord(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.dataToCoord(value, clampLayout) - valueAxisStart; var radius = baseAxis.dataToCoord(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 // let extent = angleAxis.getExtent(); // let 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, /** * Keep the same logic with bar in catesion: use end value to * control direction. Notice that if clockwise is true (by * default), the sector will always draw clockwisely, no matter * whether endAngle is greater or less than startAngle. */ clockwise: startAngle >= endAngle }); } }); } /** * Calculate bar width and offset for radial bar charts */ function calRadialBar(barSeries) { // Columns info on each category axis. Key is polar name var columnsMap = {}; core_util["each"](barSeries, function (seriesModel, idx) { var data = seriesModel.getData(); var polar = seriesModel.coordinateSystem; var baseAxis = polar.getBaseAxis(); var axisKey = barPolar_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 = barPolar_getSeriesStackId(seriesModel); if (!stacks[stackId]) { columnsOnAxis.autoWidthCount++; } stacks[stackId] = stacks[stackId] || { width: 0, maxWidth: 0 }; var barWidth = number_parsePercent(seriesModel.get('barWidth'), bandWidth); var barMaxWidth = number_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 = {}; core_util["each"](columnsMap, function (columnsOnAxis, coordSysName) { result[coordSysName] = {}; var stacks = columnsOnAxis.stacks; var bandWidth = columnsOnAxis.bandWidth; var categoryGap = number_parsePercent(columnsOnAxis.categoryGap, bandWidth); var barGapPercent = number_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 core_util["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; core_util["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; core_util["each"](stacks, function (column, stackId) { result[coordSysName][stackId] = result[coordSysName][stackId] || { offset: offset, width: column.width }; offset += column.width * (1 + barGapPercent); }); }); return result; } /* harmony default export */ var barPolar = (barLayoutPolar); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/polar/install.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 angleAxisExtraOption = { startAngle: 90, clockwise: true, splitNumber: 12, axisLabel: { rotate: 0 } }; var radiusAxisExtraOption = { splitNumber: 5 }; var install_PolarView = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(PolarView, _super); function PolarView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = PolarView.type; return _this; } PolarView.type = 'polar'; return PolarView; }(view_Component); function polar_install_install(registers) { use(axisPointer_install_install); axis_AxisView.registerAxisPointerClass('PolarAxisPointer', axisPointer_PolarAxisPointer); registers.registerCoordinateSystem('polar', polar_polarCreator); registers.registerComponentModel(polar_PolarModel); registers.registerComponentView(install_PolarView); // Model and view for angleAxis and radiusAxis axisModelCreator(registers, 'angle', AxisModel_AngleAxisModel, angleAxisExtraOption); axisModelCreator(registers, 'radius', AxisModel_RadiusAxisModel, radiusAxisExtraOption); registers.registerComponentView(axis_AngleAxisView); registers.registerComponentView(axis_RadiusAxisView); registers.registerLayout(Object(core_util["curry"])(barPolar, 'bar')); } // CONCATENATED MODULE: ./node_modules/echarts/lib/coord/single/singleAxisHelper.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 singleAxisHelper_layout(axisModel, opt) { opt = opt || {}; var single = axisModel.coordinateSystem; var axis = axisModel.axis; var layout = {}; var axisPosition = axis.position; var orient = axis.orient; var rect = single.getRect(); var rectBound = [rect.x, rect.x + rect.width, rect.y, rect.y + rect.height]; var positionMap = { horizontal: { top: rectBound[2], bottom: rectBound[3] }, vertical: { left: rectBound[0], right: rectBound[1] } }; layout.position = [orient === 'vertical' ? positionMap.vertical[axisPosition] : rectBound[0], orient === 'horizontal' ? positionMap.horizontal[axisPosition] : rectBound[3]]; var r = { horizontal: 0, vertical: 1 }; layout.rotation = Math.PI / 2 * r[orient]; var directionMap = { top: -1, bottom: 1, right: 1, left: -1 }; layout.labelDirection = layout.tickDirection = layout.nameDirection = directionMap[axisPosition]; if (axisModel.get(['axisTick', 'inside'])) { layout.tickDirection = -layout.tickDirection; } if (core_util["retrieve"](opt.labelInside, axisModel.get(['axisLabel', 'inside']))) { layout.labelDirection = -layout.labelDirection; } var labelRotation = opt.rotate; labelRotation == null && (labelRotation = axisModel.get(['axisLabel', 'rotate'])); layout.labelRotation = axisPosition === 'top' ? -labelRotation : labelRotation; layout.z2 = 1; return layout; } // CONCATENATED MODULE: ./node_modules/echarts/lib/component/axis/SingleAxisView.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 SingleAxisView_axisBuilderAttrs = ['axisLine', 'axisTickLabel', 'axisName']; var SingleAxisView_selfBuilderAttrs = ['splitArea', 'splitLine']; var SingleAxisView_SingleAxisView = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(SingleAxisView, _super); function SingleAxisView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = SingleAxisView.type; _this.axisPointerClass = 'SingleAxisPointer'; return _this; } SingleAxisView.prototype.render = function (axisModel, ecModel, api, payload) { var group = this.group; group.removeAll(); var oldAxisGroup = this._axisGroup; this._axisGroup = new graphic_Group(); var layout = singleAxisHelper_layout(axisModel); var axisBuilder = new axis_AxisBuilder(axisModel, layout); core_util["each"](SingleAxisView_axisBuilderAttrs, axisBuilder.add, axisBuilder); group.add(this._axisGroup); group.add(axisBuilder.getGroup()); core_util["each"](SingleAxisView_selfBuilderAttrs, function (name) { if (axisModel.get([name, 'show'])) { SingleAxisView_axisElementBuilders[name](this, this.group, this._axisGroup, axisModel); } }, this); groupTransition(oldAxisGroup, this._axisGroup, axisModel); _super.prototype.render.call(this, axisModel, ecModel, api, payload); }; SingleAxisView.prototype.remove = function () { rectCoordAxisHandleRemove(this); }; SingleAxisView.type = 'singleAxis'; return SingleAxisView; }(axis_AxisView); var SingleAxisView_axisElementBuilders = { splitLine: function (axisView, group, axisGroup, axisModel) { var axis = axisModel.axis; if (axis.scale.isBlank()) { return; } var splitLineModel = axisModel.getModel('splitLine'); var lineStyleModel = splitLineModel.getModel('lineStyle'); var lineColors = lineStyleModel.get('color'); lineColors = lineColors instanceof Array ? lineColors : [lineColors]; var lineWidth = lineStyleModel.get('width'); var gridRect = axisModel.coordinateSystem.getRect(); var isHorizontal = axis.isHorizontal(); var splitLines = []; var lineCount = 0; var ticksCoords = axis.getTicksCoords({ tickModel: splitLineModel }); var p1 = []; var p2 = []; for (var i = 0; i < ticksCoords.length; ++i) { var tickCoord = axis.toGlobalCoord(ticksCoords[i].coord); if (isHorizontal) { p1[0] = tickCoord; p1[1] = gridRect.y; p2[0] = tickCoord; p2[1] = gridRect.y + gridRect.height; } else { p1[0] = gridRect.x; p1[1] = tickCoord; p2[0] = gridRect.x + gridRect.width; p2[1] = tickCoord; } var line = new shape_Line({ shape: { x1: p1[0], y1: p1[1], x2: p2[0], y2: p2[1] }, silent: true }); graphic_subPixelOptimizeLine(line.shape, lineWidth); var colorIndex = lineCount++ % lineColors.length; splitLines[colorIndex] = splitLines[colorIndex] || []; splitLines[colorIndex].push(line); } var lineStyle = lineStyleModel.getLineStyle(['color']); for (var i = 0; i < splitLines.length; ++i) { group.add(graphic_mergePath(splitLines[i], { style: core_util["defaults"]({ stroke: lineColors[i % lineColors.length] }, lineStyle), silent: true })); } }, splitArea: function (axisView, group, axisGroup, axisModel) { rectCoordAxisBuildSplitArea(axisView, axisGroup, axisModel, axisModel); } }; /* harmony default export */ var axis_SingleAxisView = (SingleAxisView_SingleAxisView); // CONCATENATED MODULE: ./node_modules/echarts/lib/coord/single/AxisModel.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 AxisModel_SingleAxisModel = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(SingleAxisModel, _super); function SingleAxisModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = SingleAxisModel.type; return _this; } SingleAxisModel.prototype.getCoordSysModel = function () { return this; }; SingleAxisModel.type = 'singleAxis'; SingleAxisModel.layoutMode = 'box'; SingleAxisModel.defaultOption = { left: '5%', top: '5%', right: '5%', bottom: '5%', type: 'value', position: 'bottom', orient: 'horizontal', axisLine: { show: true, lineStyle: { width: 1, type: 'solid' } }, // Single coordinate system and single axis is the, // which is used as the parent tooltip model. // same model, so we set default tooltip show as true. tooltip: { show: true }, axisTick: { show: true, length: 6, lineStyle: { width: 1 } }, axisLabel: { show: true, interval: 'auto' }, splitLine: { show: true, lineStyle: { type: 'dashed', opacity: 0.2 } } }; return SingleAxisModel; }(Component); Object(core_util["mixin"])(AxisModel_SingleAxisModel, AxisModelCommonMixin.prototype); /* harmony default export */ var single_AxisModel = (AxisModel_SingleAxisModel); // CONCATENATED MODULE: ./node_modules/echarts/lib/coord/single/SingleAxis.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 SingleAxis_SingleAxis = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(SingleAxis, _super); function SingleAxis(dim, scale, coordExtent, axisType, position) { var _this = _super.call(this, dim, scale, coordExtent) || this; _this.type = axisType || 'value'; _this.position = position || 'bottom'; return _this; } /** * Judge the orient of the axis. */ SingleAxis.prototype.isHorizontal = function () { var position = this.position; return position === 'top' || position === 'bottom'; }; SingleAxis.prototype.pointToData = function (point, clamp) { return this.coordinateSystem.pointToData(point)[0]; }; return SingleAxis; }(coord_Axis); /* harmony default export */ var single_SingleAxis = (SingleAxis_SingleAxis); // CONCATENATED MODULE: ./node_modules/echarts/lib/coord/single/Single.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ /** * Single coordinates system. */ var singleDimensions = ['single']; /** * Create a single coordinates system. */ var Single_Single = /** @class */function () { function Single(axisModel, ecModel, api) { this.type = 'single'; this.dimension = 'single'; /** * Add it just for draw tooltip. */ this.dimensions = singleDimensions; this.axisPointerEnabled = true; this.model = axisModel; this._init(axisModel, ecModel, api); } /** * Initialize single coordinate system. */ Single.prototype._init = function (axisModel, ecModel, api) { var dim = this.dimension; var axis = new single_SingleAxis(dim, createScaleByModel(axisModel), [0, 0], axisModel.get('type'), axisModel.get('position')); var isCategory = axis.type === 'category'; axis.onBand = isCategory && axisModel.get('boundaryGap'); axis.inverse = axisModel.get('inverse'); axis.orient = axisModel.get('orient'); axisModel.axis = axis; axis.model = axisModel; axis.coordinateSystem = this; this._axis = axis; }; /** * Update axis scale after data processed */ Single.prototype.update = function (ecModel, api) { ecModel.eachSeries(function (seriesModel) { if (seriesModel.coordinateSystem === this) { var data_1 = seriesModel.getData(); Object(core_util["each"])(data_1.mapDimensionsAll(this.dimension), function (dim) { this._axis.scale.unionExtentFromData(data_1, dim); }, this); niceScaleExtent(this._axis.scale, this._axis.model); } }, this); }; /** * Resize the single coordinate system. */ Single.prototype.resize = function (axisModel, api) { this._rect = getLayoutRect({ left: axisModel.get('left'), top: axisModel.get('top'), right: axisModel.get('right'), bottom: axisModel.get('bottom'), width: axisModel.get('width'), height: axisModel.get('height') }, { width: api.getWidth(), height: api.getHeight() }); this._adjustAxis(); }; Single.prototype.getRect = function () { return this._rect; }; Single.prototype._adjustAxis = function () { var rect = this._rect; var axis = this._axis; var isHorizontal = axis.isHorizontal(); var extent = isHorizontal ? [0, rect.width] : [0, rect.height]; var idx = axis.inverse ? 1 : 0; axis.setExtent(extent[idx], extent[1 - idx]); this._updateAxisTransform(axis, isHorizontal ? rect.x : rect.y); }; Single.prototype._updateAxisTransform = function (axis, coordBase) { var axisExtent = axis.getExtent(); var extentSum = axisExtent[0] + axisExtent[1]; var isHorizontal = axis.isHorizontal(); axis.toGlobalCoord = isHorizontal ? function (coord) { return coord + coordBase; } : function (coord) { return extentSum - coord + coordBase; }; axis.toLocalCoord = isHorizontal ? function (coord) { return coord - coordBase; } : function (coord) { return extentSum - coord + coordBase; }; }; /** * Get axis. */ Single.prototype.getAxis = function () { return this._axis; }; /** * Get axis, add it just for draw tooltip. */ Single.prototype.getBaseAxis = function () { return this._axis; }; Single.prototype.getAxes = function () { return [this._axis]; }; Single.prototype.getTooltipAxes = function () { return { baseAxes: [this.getAxis()], // Empty otherAxes otherAxes: [] }; }; /** * If contain point. */ Single.prototype.containPoint = function (point) { var rect = this.getRect(); var axis = this.getAxis(); var orient = axis.orient; if (orient === 'horizontal') { return axis.contain(axis.toLocalCoord(point[0])) && point[1] >= rect.y && point[1] <= rect.y + rect.height; } else { return axis.contain(axis.toLocalCoord(point[1])) && point[0] >= rect.y && point[0] <= rect.y + rect.height; } }; Single.prototype.pointToData = function (point) { var axis = this.getAxis(); return [axis.coordToData(axis.toLocalCoord(point[axis.orient === 'horizontal' ? 0 : 1]))]; }; /** * Convert the series data to concrete point. * Can be [val] | val */ Single.prototype.dataToPoint = function (val) { var axis = this.getAxis(); var rect = this.getRect(); var pt = []; var idx = axis.orient === 'horizontal' ? 0 : 1; if (val instanceof Array) { val = val[0]; } pt[idx] = axis.toGlobalCoord(axis.dataToCoord(+val)); pt[1 - idx] = idx === 0 ? rect.y + rect.height / 2 : rect.x + rect.width / 2; return pt; }; Single.prototype.convertToPixel = function (ecModel, finder, value) { var coordSys = Single_getCoordSys(finder); return coordSys === this ? this.dataToPoint(value) : null; }; Single.prototype.convertFromPixel = function (ecModel, finder, pixel) { var coordSys = Single_getCoordSys(finder); return coordSys === this ? this.pointToData(pixel) : null; }; return Single; }(); function Single_getCoordSys(finder) { var seriesModel = finder.seriesModel; var singleModel = finder.singleAxisModel; return singleModel && singleModel.coordinateSystem || seriesModel && seriesModel.coordinateSystem; } /* harmony default export */ var single_Single = (Single_Single); // CONCATENATED MODULE: ./node_modules/echarts/lib/coord/single/singleCreator.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ /** * Single coordinate system creator. */ /** * Create single coordinate system and inject it into seriesModel. */ function singleCreator_create(ecModel, api) { var singles = []; ecModel.eachComponent('singleAxis', function (axisModel, idx) { var single = new single_Single(axisModel, ecModel, api); single.name = 'single_' + idx; single.resize(axisModel, api); axisModel.coordinateSystem = single; singles.push(single); }); ecModel.eachSeries(function (seriesModel) { if (seriesModel.get('coordinateSystem') === 'singleAxis') { var singleAxisModel = seriesModel.getReferringComponents('singleAxis', SINGLE_REFERRING).models[0]; seriesModel.coordinateSystem = singleAxisModel && singleAxisModel.coordinateSystem; } }); return singles; } var singleCreator = { create: singleCreator_create, dimensions: singleDimensions }; /* harmony default export */ var single_singleCreator = (singleCreator); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/axisPointer/SingleAxisPointer.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 XY = ['x', 'y']; var WH = ['width', 'height']; var SingleAxisPointer_SingleAxisPointer = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(SingleAxisPointer, _super); function SingleAxisPointer() { return _super !== null && _super.apply(this, arguments) || this; } /** * @override */ SingleAxisPointer.prototype.makeElOption = function (elOption, value, axisModel, axisPointerModel, api) { var axis = axisModel.axis; var coordSys = axis.coordinateSystem; var otherExtent = getGlobalExtent(coordSys, 1 - getPointDimIndex(axis)); var pixelValue = coordSys.dataToPoint(value)[0]; var axisPointerType = axisPointerModel.get('type'); if (axisPointerType && axisPointerType !== 'none') { var elStyle = buildElStyle(axisPointerModel); var pointerOption = SingleAxisPointer_pointerShapeBuilder[axisPointerType](axis, pixelValue, otherExtent); pointerOption.style = elStyle; elOption.graphicKey = pointerOption.type; elOption.pointer = pointerOption; } var layoutInfo = singleAxisHelper_layout(axisModel); buildCartesianSingleLabelElOption( // @ts-ignore value, elOption, layoutInfo, axisModel, axisPointerModel, api); }; /** * @override */ SingleAxisPointer.prototype.getHandleTransform = function (value, axisModel, axisPointerModel) { var layoutInfo = singleAxisHelper_layout(axisModel, { labelInside: false }); // @ts-ignore layoutInfo.labelMargin = axisPointerModel.get(['handle', 'margin']); var position = getTransformedPosition(axisModel.axis, value, layoutInfo); return { x: position[0], y: position[1], rotation: layoutInfo.rotation + (layoutInfo.labelDirection < 0 ? Math.PI : 0) }; }; /** * @override */ SingleAxisPointer.prototype.updateHandleTransform = function (transform, delta, axisModel, axisPointerModel) { var axis = axisModel.axis; var coordSys = axis.coordinateSystem; var dimIndex = getPointDimIndex(axis); var axisExtent = getGlobalExtent(coordSys, dimIndex); var currPosition = [transform.x, transform.y]; currPosition[dimIndex] += delta[dimIndex]; currPosition[dimIndex] = Math.min(axisExtent[1], currPosition[dimIndex]); currPosition[dimIndex] = Math.max(axisExtent[0], currPosition[dimIndex]); var otherExtent = getGlobalExtent(coordSys, 1 - dimIndex); var cursorOtherValue = (otherExtent[1] + otherExtent[0]) / 2; var cursorPoint = [cursorOtherValue, cursorOtherValue]; cursorPoint[dimIndex] = currPosition[dimIndex]; return { x: currPosition[0], y: currPosition[1], rotation: transform.rotation, cursorPoint: cursorPoint, tooltipOption: { verticalAlign: 'middle' } }; }; return SingleAxisPointer; }(axisPointer_BaseAxisPointer); var SingleAxisPointer_pointerShapeBuilder = { line: function (axis, pixelValue, otherExtent) { var targetShape = makeLineShape([pixelValue, otherExtent[0]], [pixelValue, otherExtent[1]], getPointDimIndex(axis)); return { type: 'Line', subPixelOptimize: true, shape: targetShape }; }, shadow: function (axis, pixelValue, otherExtent) { var bandWidth = axis.getBandWidth(); var span = otherExtent[1] - otherExtent[0]; return { type: 'Rect', shape: makeRectShape([pixelValue - bandWidth / 2, otherExtent[0]], [bandWidth, span], getPointDimIndex(axis)) }; } }; function getPointDimIndex(axis) { return axis.isHorizontal() ? 0 : 1; } function getGlobalExtent(coordSys, dimIndex) { var rect = coordSys.getRect(); return [rect[XY[dimIndex]], rect[XY[dimIndex]] + rect[WH[dimIndex]]]; } /* harmony default export */ var axisPointer_SingleAxisPointer = (SingleAxisPointer_SingleAxisPointer); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/singleAxis/install.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 install_SingleView = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(SingleView, _super); function SingleView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = SingleView.type; return _this; } SingleView.type = 'single'; return SingleView; }(view_Component); function singleAxis_install_install(registers) { use(axisPointer_install_install); axis_AxisView.registerAxisPointerClass('SingleAxisPointer', axisPointer_SingleAxisPointer); registers.registerComponentView(install_SingleView); // Axis registers.registerComponentView(axis_SingleAxisView); registers.registerComponentModel(single_AxisModel); axisModelCreator(registers, 'single', single_AxisModel, single_AxisModel.defaultOption); registers.registerCoordinateSystem('single', single_singleCreator); } // CONCATENATED MODULE: ./node_modules/echarts/lib/coord/calendar/CalendarModel.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 CalendarModel_CalendarModel = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(CalendarModel, _super); function CalendarModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = CalendarModel.type; return _this; } /** * @override */ CalendarModel.prototype.init = function (option, parentModel, ecModel) { var inputPositionParams = getLayoutParams(option); _super.prototype.init.apply(this, arguments); mergeAndNormalizeLayoutParams(option, inputPositionParams); }; /** * @override */ CalendarModel.prototype.mergeOption = function (option) { _super.prototype.mergeOption.apply(this, arguments); mergeAndNormalizeLayoutParams(this.option, option); }; CalendarModel.prototype.getCellSize = function () { // Has been normalized return this.option.cellSize; }; CalendarModel.type = 'calendar'; CalendarModel.defaultOption = { // zlevel: 0, z: 2, left: 80, top: 60, cellSize: 20, // horizontal vertical orient: 'horizontal', // month separate line style splitLine: { show: true, lineStyle: { color: '#000', width: 1, type: 'solid' } }, // rect style temporarily unused emphasis itemStyle: { color: '#fff', borderWidth: 1, borderColor: '#ccc' }, // week text style dayLabel: { show: true, firstDay: 0, // start end position: 'start', margin: '50%', color: '#000' }, // month text style monthLabel: { show: true, // start end position: 'start', margin: 5, // center or left align: 'center', formatter: null, color: '#000' }, // year text style yearLabel: { show: true, // top bottom left right position: null, margin: 30, formatter: null, color: '#ccc', fontFamily: 'sans-serif', fontWeight: 'bolder', fontSize: 20 } }; return CalendarModel; }(Component); function mergeAndNormalizeLayoutParams(target, raw) { // Normalize cellSize var cellSize = target.cellSize; var cellSizeArr; if (!core_util["isArray"](cellSize)) { cellSizeArr = target.cellSize = [cellSize, cellSize]; } else { cellSizeArr = cellSize; } if (cellSizeArr.length === 1) { cellSizeArr[1] = cellSizeArr[0]; } var ignoreSize = core_util["map"]([0, 1], function (hvIdx) { // If user have set `width` or both `left` and `right`, cellSizeArr // will be automatically set to 'auto', otherwise the default // setting of cellSizeArr will make `width` setting not work. if (sizeCalculable(raw, hvIdx)) { cellSizeArr[hvIdx] = 'auto'; } return cellSizeArr[hvIdx] != null && cellSizeArr[hvIdx] !== 'auto'; }); mergeLayoutParam(target, raw, { type: 'box', ignoreSize: ignoreSize }); } /* harmony default export */ var calendar_CalendarModel = (CalendarModel_CalendarModel); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/calendar/CalendarView.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 CalendarView_CalendarView = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(CalendarView, _super); function CalendarView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = CalendarView.type; return _this; } CalendarView.prototype.render = function (calendarModel, ecModel, api) { var group = this.group; group.removeAll(); var coordSys = calendarModel.coordinateSystem; // range info var rangeData = coordSys.getRangeInfo(); var orient = coordSys.getOrient(); // locale var localeModel = ecModel.getLocaleModel(); this._renderDayRect(calendarModel, rangeData, group); // _renderLines must be called prior to following function this._renderLines(calendarModel, rangeData, orient, group); this._renderYearText(calendarModel, rangeData, orient, group); this._renderMonthText(calendarModel, localeModel, orient, group); this._renderWeekText(calendarModel, localeModel, rangeData, orient, group); }; // render day rect CalendarView.prototype._renderDayRect = function (calendarModel, rangeData, group) { var coordSys = calendarModel.coordinateSystem; var itemRectStyleModel = calendarModel.getModel('itemStyle').getItemStyle(); var sw = coordSys.getCellWidth(); var sh = coordSys.getCellHeight(); for (var i = rangeData.start.time; i <= rangeData.end.time; i = coordSys.getNextNDay(i, 1).time) { var point = coordSys.dataToRect([i], false).tl; // every rect var rect = new shape_Rect({ shape: { x: point[0], y: point[1], width: sw, height: sh }, cursor: 'default', style: itemRectStyleModel }); group.add(rect); } }; // render separate line CalendarView.prototype._renderLines = function (calendarModel, rangeData, orient, group) { var self = this; var coordSys = calendarModel.coordinateSystem; var lineStyleModel = calendarModel.getModel(['splitLine', 'lineStyle']).getLineStyle(); var show = calendarModel.get(['splitLine', 'show']); var lineWidth = lineStyleModel.lineWidth; this._tlpoints = []; this._blpoints = []; this._firstDayOfMonth = []; this._firstDayPoints = []; var firstDay = rangeData.start; for (var i = 0; firstDay.time <= rangeData.end.time; i++) { addPoints(firstDay.formatedDate); if (i === 0) { firstDay = coordSys.getDateInfo(rangeData.start.y + '-' + rangeData.start.m); } var date = firstDay.date; date.setMonth(date.getMonth() + 1); firstDay = coordSys.getDateInfo(date); } addPoints(coordSys.getNextNDay(rangeData.end.time, 1).formatedDate); function addPoints(date) { self._firstDayOfMonth.push(coordSys.getDateInfo(date)); self._firstDayPoints.push(coordSys.dataToRect([date], false).tl); var points = self._getLinePointsOfOneWeek(calendarModel, date, orient); self._tlpoints.push(points[0]); self._blpoints.push(points[points.length - 1]); show && self._drawSplitline(points, lineStyleModel, group); } // render top/left line show && this._drawSplitline(self._getEdgesPoints(self._tlpoints, lineWidth, orient), lineStyleModel, group); // render bottom/right line show && this._drawSplitline(self._getEdgesPoints(self._blpoints, lineWidth, orient), lineStyleModel, group); }; // get points at both ends CalendarView.prototype._getEdgesPoints = function (points, lineWidth, orient) { var rs = [points[0].slice(), points[points.length - 1].slice()]; var idx = orient === 'horizontal' ? 0 : 1; // both ends of the line are extend half lineWidth rs[0][idx] = rs[0][idx] - lineWidth / 2; rs[1][idx] = rs[1][idx] + lineWidth / 2; return rs; }; // render split line CalendarView.prototype._drawSplitline = function (points, lineStyle, group) { var poyline = new shape_Polyline({ z2: 20, shape: { points: points }, style: lineStyle }); group.add(poyline); }; // render month line of one week points CalendarView.prototype._getLinePointsOfOneWeek = function (calendarModel, date, orient) { var coordSys = calendarModel.coordinateSystem; var parsedDate = coordSys.getDateInfo(date); var points = []; for (var i = 0; i < 7; i++) { var tmpD = coordSys.getNextNDay(parsedDate.time, i); var point = coordSys.dataToRect([tmpD.time], false); points[2 * tmpD.day] = point.tl; points[2 * tmpD.day + 1] = point[orient === 'horizontal' ? 'bl' : 'tr']; } return points; }; CalendarView.prototype._formatterLabel = function (formatter, params) { if (Object(core_util["isString"])(formatter) && formatter) { return formatTplSimple(formatter, params); } if (Object(core_util["isFunction"])(formatter)) { return formatter(params); } return params.nameMap; }; CalendarView.prototype._yearTextPositionControl = function (textEl, point, orient, position, margin) { var x = point[0]; var y = point[1]; var aligns = ['center', 'bottom']; if (position === 'bottom') { y += margin; aligns = ['center', 'top']; } else if (position === 'left') { x -= margin; } else if (position === 'right') { x += margin; aligns = ['center', 'top']; } else { // top y -= margin; } var rotate = 0; if (position === 'left' || position === 'right') { rotate = Math.PI / 2; } return { rotation: rotate, x: x, y: y, style: { align: aligns[0], verticalAlign: aligns[1] } }; }; // render year CalendarView.prototype._renderYearText = function (calendarModel, rangeData, orient, group) { var yearLabel = calendarModel.getModel('yearLabel'); if (!yearLabel.get('show')) { return; } var margin = yearLabel.get('margin'); var pos = yearLabel.get('position'); if (!pos) { pos = orient !== 'horizontal' ? 'top' : 'left'; } var points = [this._tlpoints[this._tlpoints.length - 1], this._blpoints[0]]; var xc = (points[0][0] + points[1][0]) / 2; var yc = (points[0][1] + points[1][1]) / 2; var idx = orient === 'horizontal' ? 0 : 1; var posPoints = { top: [xc, points[idx][1]], bottom: [xc, points[1 - idx][1]], left: [points[1 - idx][0], yc], right: [points[idx][0], yc] }; var name = rangeData.start.y; if (+rangeData.end.y > +rangeData.start.y) { name = name + '-' + rangeData.end.y; } var formatter = yearLabel.get('formatter'); var params = { start: rangeData.start.y, end: rangeData.end.y, nameMap: name }; var content = this._formatterLabel(formatter, params); var yearText = new Text({ z2: 30, style: createTextStyle(yearLabel, { text: content }), silent: yearLabel.get('silent') }); yearText.attr(this._yearTextPositionControl(yearText, posPoints[pos], orient, pos, margin)); group.add(yearText); }; CalendarView.prototype._monthTextPositionControl = function (point, isCenter, orient, position, margin) { var align = 'left'; var vAlign = 'top'; var x = point[0]; var y = point[1]; if (orient === 'horizontal') { y = y + margin; if (isCenter) { align = 'center'; } if (position === 'start') { vAlign = 'bottom'; } } else { x = x + margin; if (isCenter) { vAlign = 'middle'; } if (position === 'start') { align = 'right'; } } return { x: x, y: y, align: align, verticalAlign: vAlign }; }; // render month and year text CalendarView.prototype._renderMonthText = function (calendarModel, localeModel, orient, group) { var monthLabel = calendarModel.getModel('monthLabel'); if (!monthLabel.get('show')) { return; } var nameMap = monthLabel.get('nameMap'); var margin = monthLabel.get('margin'); var pos = monthLabel.get('position'); var align = monthLabel.get('align'); var termPoints = [this._tlpoints, this._blpoints]; if (!nameMap || Object(core_util["isString"])(nameMap)) { if (nameMap) { // case-sensitive localeModel = getLocaleModel(nameMap) || localeModel; } // PENDING // for ZH locale, original form is `一月` but current form is `1月` nameMap = localeModel.get(['time', 'monthAbbr']) || []; } var idx = pos === 'start' ? 0 : 1; var axis = orient === 'horizontal' ? 0 : 1; margin = pos === 'start' ? -margin : margin; var isCenter = align === 'center'; var labelSilent = monthLabel.get('silent'); for (var i = 0; i < termPoints[idx].length - 1; i++) { var tmp = termPoints[idx][i].slice(); var firstDay = this._firstDayOfMonth[i]; if (isCenter) { var firstDayPoints = this._firstDayPoints[i]; tmp[axis] = (firstDayPoints[axis] + termPoints[0][i + 1][axis]) / 2; } var formatter = monthLabel.get('formatter'); var name_1 = nameMap[+firstDay.m - 1]; var params = { yyyy: firstDay.y, yy: (firstDay.y + '').slice(2), MM: firstDay.m, M: +firstDay.m, nameMap: name_1 }; var content = this._formatterLabel(formatter, params); var monthText = new Text({ z2: 30, style: Object(core_util["extend"])(createTextStyle(monthLabel, { text: content }), this._monthTextPositionControl(tmp, isCenter, orient, pos, margin)), silent: labelSilent }); group.add(monthText); } }; CalendarView.prototype._weekTextPositionControl = function (point, orient, position, margin, cellSize) { var align = 'center'; var vAlign = 'middle'; var x = point[0]; var y = point[1]; var isStart = position === 'start'; if (orient === 'horizontal') { x = x + margin + (isStart ? 1 : -1) * cellSize[0] / 2; align = isStart ? 'right' : 'left'; } else { y = y + margin + (isStart ? 1 : -1) * cellSize[1] / 2; vAlign = isStart ? 'bottom' : 'top'; } return { x: x, y: y, align: align, verticalAlign: vAlign }; }; // render weeks CalendarView.prototype._renderWeekText = function (calendarModel, localeModel, rangeData, orient, group) { var dayLabel = calendarModel.getModel('dayLabel'); if (!dayLabel.get('show')) { return; } var coordSys = calendarModel.coordinateSystem; var pos = dayLabel.get('position'); var nameMap = dayLabel.get('nameMap'); var margin = dayLabel.get('margin'); var firstDayOfWeek = coordSys.getFirstDayOfWeek(); if (!nameMap || Object(core_util["isString"])(nameMap)) { if (nameMap) { // case-sensitive localeModel = getLocaleModel(nameMap) || localeModel; } // Use the first letter of `dayOfWeekAbbr` if `dayOfWeekShort` doesn't exist in the locale file var dayOfWeekShort = localeModel.get(['time', 'dayOfWeekShort']); nameMap = dayOfWeekShort || Object(core_util["map"])(localeModel.get(['time', 'dayOfWeekAbbr']), function (val) { return val[0]; }); } var start = coordSys.getNextNDay(rangeData.end.time, 7 - rangeData.lweek).time; var cellSize = [coordSys.getCellWidth(), coordSys.getCellHeight()]; margin = number_parsePercent(margin, Math.min(cellSize[1], cellSize[0])); if (pos === 'start') { start = coordSys.getNextNDay(rangeData.start.time, -(7 + rangeData.fweek)).time; margin = -margin; } var labelSilent = dayLabel.get('silent'); for (var i = 0; i < 7; i++) { var tmpD = coordSys.getNextNDay(start, i); var point = coordSys.dataToRect([tmpD.time], false).center; var day = i; day = Math.abs((i + firstDayOfWeek) % 7); var weekText = new Text({ z2: 30, style: Object(core_util["extend"])(createTextStyle(dayLabel, { text: nameMap[day] }), this._weekTextPositionControl(point, orient, pos, margin, cellSize)), silent: labelSilent }); group.add(weekText); } }; CalendarView.type = 'calendar'; return CalendarView; }(view_Component); /* harmony default export */ var calendar_CalendarView = (CalendarView_CalendarView); // CONCATENATED MODULE: ./node_modules/echarts/lib/coord/calendar/Calendar.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ // (24*60*60*1000) var PROXIMATE_ONE_DAY = 86400000; var Calendar_Calendar = /** @class */function () { function Calendar(calendarModel, ecModel, api) { this.type = 'calendar'; this.dimensions = Calendar.dimensions; // Required in createListFromData this.getDimensionsInfo = Calendar.getDimensionsInfo; this._model = calendarModel; } Calendar.getDimensionsInfo = function () { return [{ name: 'time', type: 'time' }, 'value']; }; Calendar.prototype.getRangeInfo = function () { return this._rangeInfo; }; Calendar.prototype.getModel = function () { return this._model; }; Calendar.prototype.getRect = function () { return this._rect; }; Calendar.prototype.getCellWidth = function () { return this._sw; }; Calendar.prototype.getCellHeight = function () { return this._sh; }; Calendar.prototype.getOrient = function () { return this._orient; }; /** * getFirstDayOfWeek * * @example * 0 : start at Sunday * 1 : start at Monday * * @return {number} */ Calendar.prototype.getFirstDayOfWeek = function () { return this._firstDayOfWeek; }; /** * get date info * } */ Calendar.prototype.getDateInfo = function (date) { date = parseDate(date); var y = date.getFullYear(); var m = date.getMonth() + 1; var mStr = m < 10 ? '0' + m : '' + m; var d = date.getDate(); var dStr = d < 10 ? '0' + d : '' + d; var day = date.getDay(); day = Math.abs((day + 7 - this.getFirstDayOfWeek()) % 7); return { y: y + '', m: mStr, d: dStr, day: day, time: date.getTime(), formatedDate: y + '-' + mStr + '-' + dStr, date: date }; }; Calendar.prototype.getNextNDay = function (date, n) { n = n || 0; if (n === 0) { return this.getDateInfo(date); } date = new Date(this.getDateInfo(date).time); date.setDate(date.getDate() + n); return this.getDateInfo(date); }; Calendar.prototype.update = function (ecModel, api) { this._firstDayOfWeek = +this._model.getModel('dayLabel').get('firstDay'); this._orient = this._model.get('orient'); this._lineWidth = this._model.getModel('itemStyle').getItemStyle().lineWidth || 0; this._rangeInfo = this._getRangeInfo(this._initRangeOption()); var weeks = this._rangeInfo.weeks || 1; var whNames = ['width', 'height']; var cellSize = this._model.getCellSize().slice(); var layoutParams = this._model.getBoxLayoutParams(); var cellNumbers = this._orient === 'horizontal' ? [weeks, 7] : [7, weeks]; core_util["each"]([0, 1], function (idx) { if (cellSizeSpecified(cellSize, idx)) { layoutParams[whNames[idx]] = cellSize[idx] * cellNumbers[idx]; } }); var whGlobal = { width: api.getWidth(), height: api.getHeight() }; var calendarRect = this._rect = getLayoutRect(layoutParams, whGlobal); core_util["each"]([0, 1], function (idx) { if (!cellSizeSpecified(cellSize, idx)) { cellSize[idx] = calendarRect[whNames[idx]] / cellNumbers[idx]; } }); function cellSizeSpecified(cellSize, idx) { return cellSize[idx] != null && cellSize[idx] !== 'auto'; } // Has been calculated out number. this._sw = cellSize[0]; this._sh = cellSize[1]; }; /** * Convert a time data(time, value) item to (x, y) point. */ // TODO Clamp of calendar is not same with cartesian coordinate systems. // It will return NaN if data exceeds. Calendar.prototype.dataToPoint = function (data, clamp) { core_util["isArray"](data) && (data = data[0]); clamp == null && (clamp = true); var dayInfo = this.getDateInfo(data); var range = this._rangeInfo; var date = dayInfo.formatedDate; // if not in range return [NaN, NaN] if (clamp && !(dayInfo.time >= range.start.time && dayInfo.time < range.end.time + PROXIMATE_ONE_DAY)) { return [NaN, NaN]; } var week = dayInfo.day; var nthWeek = this._getRangeInfo([range.start.time, date]).nthWeek; if (this._orient === 'vertical') { return [this._rect.x + week * this._sw + this._sw / 2, this._rect.y + nthWeek * this._sh + this._sh / 2]; } return [this._rect.x + nthWeek * this._sw + this._sw / 2, this._rect.y + week * this._sh + this._sh / 2]; }; /** * Convert a (x, y) point to time data */ Calendar.prototype.pointToData = function (point) { var date = this.pointToDate(point); return date && date.time; }; /** * Convert a time date item to (x, y) four point. */ Calendar.prototype.dataToRect = function (data, clamp) { var point = this.dataToPoint(data, clamp); return { contentShape: { x: point[0] - (this._sw - this._lineWidth) / 2, y: point[1] - (this._sh - this._lineWidth) / 2, width: this._sw - this._lineWidth, height: this._sh - this._lineWidth }, center: point, tl: [point[0] - this._sw / 2, point[1] - this._sh / 2], tr: [point[0] + this._sw / 2, point[1] - this._sh / 2], br: [point[0] + this._sw / 2, point[1] + this._sh / 2], bl: [point[0] - this._sw / 2, point[1] + this._sh / 2] }; }; /** * Convert a (x, y) point to time date * * @param {Array} point point * @return {Object} date */ Calendar.prototype.pointToDate = function (point) { var nthX = Math.floor((point[0] - this._rect.x) / this._sw) + 1; var nthY = Math.floor((point[1] - this._rect.y) / this._sh) + 1; var range = this._rangeInfo.range; if (this._orient === 'vertical') { return this._getDateByWeeksAndDay(nthY, nthX - 1, range); } return this._getDateByWeeksAndDay(nthX, nthY - 1, range); }; Calendar.prototype.convertToPixel = function (ecModel, finder, value) { var coordSys = Calendar_getCoordSys(finder); return coordSys === this ? coordSys.dataToPoint(value) : null; }; Calendar.prototype.convertFromPixel = function (ecModel, finder, pixel) { var coordSys = Calendar_getCoordSys(finder); return coordSys === this ? coordSys.pointToData(pixel) : null; }; Calendar.prototype.containPoint = function (point) { console.warn('Not implemented.'); return false; }; /** * initRange * Normalize to an [start, end] array */ Calendar.prototype._initRangeOption = function () { var range = this._model.get('range'); var normalizedRange; // Convert [1990] to 1990 if (core_util["isArray"](range) && range.length === 1) { range = range[0]; } if (!core_util["isArray"](range)) { var rangeStr = range.toString(); // One year. if (/^\d{4}$/.test(rangeStr)) { normalizedRange = [rangeStr + '-01-01', rangeStr + '-12-31']; } // One month if (/^\d{4}[\/|-]\d{1,2}$/.test(rangeStr)) { var start = this.getDateInfo(rangeStr); var firstDay = start.date; firstDay.setMonth(firstDay.getMonth() + 1); var end = this.getNextNDay(firstDay, -1); normalizedRange = [start.formatedDate, end.formatedDate]; } // One day if (/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(rangeStr)) { normalizedRange = [rangeStr, rangeStr]; } } else { normalizedRange = range; } if (!normalizedRange) { if (false) { zrUtil.logError('Invalid date range.'); } // Not handling it. return range; } var tmp = this._getRangeInfo(normalizedRange); if (tmp.start.time > tmp.end.time) { normalizedRange.reverse(); } return normalizedRange; }; /** * range info * * @private * @param {Array} range range ['2017-01-01', '2017-07-08'] * If range[0] > range[1], they will not be reversed. * @return {Object} obj */ Calendar.prototype._getRangeInfo = function (range) { var parsedRange = [this.getDateInfo(range[0]), this.getDateInfo(range[1])]; var reversed; if (parsedRange[0].time > parsedRange[1].time) { reversed = true; parsedRange.reverse(); } var allDay = Math.floor(parsedRange[1].time / PROXIMATE_ONE_DAY) - Math.floor(parsedRange[0].time / PROXIMATE_ONE_DAY) + 1; // Consider case1 (#11677 #10430): // Set the system timezone as "UK", set the range to `['2016-07-01', '2016-12-31']` // Consider case2: // Firstly set system timezone as "Time Zone: America/Toronto", // ``` // let first = new Date(1478412000000 - 3600 * 1000 * 2.5); // let second = new Date(1478412000000); // let allDays = Math.floor(second / ONE_DAY) - Math.floor(first / ONE_DAY) + 1; // ``` // will get wrong result because of DST. So we should fix it. var date = new Date(parsedRange[0].time); var startDateNum = date.getDate(); var endDateNum = parsedRange[1].date.getDate(); date.setDate(startDateNum + allDay - 1); // The bias can not over a month, so just compare date. var dateNum = date.getDate(); if (dateNum !== endDateNum) { var sign = date.getTime() - parsedRange[1].time > 0 ? 1 : -1; while ((dateNum = date.getDate()) !== endDateNum && (date.getTime() - parsedRange[1].time) * sign > 0) { allDay -= sign; date.setDate(dateNum - sign); } } var weeks = Math.floor((allDay + parsedRange[0].day + 6) / 7); var nthWeek = reversed ? -weeks + 1 : weeks - 1; reversed && parsedRange.reverse(); return { range: [parsedRange[0].formatedDate, parsedRange[1].formatedDate], start: parsedRange[0], end: parsedRange[1], allDay: allDay, weeks: weeks, // From 0. nthWeek: nthWeek, fweek: parsedRange[0].day, lweek: parsedRange[1].day }; }; /** * get date by nthWeeks and week day in range * * @private * @param {number} nthWeek the week * @param {number} day the week day * @param {Array} range [d1, d2] * @return {Object} */ Calendar.prototype._getDateByWeeksAndDay = function (nthWeek, day, range) { var rangeInfo = this._getRangeInfo(range); if (nthWeek > rangeInfo.weeks || nthWeek === 0 && day < rangeInfo.fweek || nthWeek === rangeInfo.weeks && day > rangeInfo.lweek) { return null; } var nthDay = (nthWeek - 1) * 7 - rangeInfo.fweek + day; var date = new Date(rangeInfo.start.time); date.setDate(+rangeInfo.start.d + nthDay); return this.getDateInfo(date); }; Calendar.create = function (ecModel, api) { var calendarList = []; ecModel.eachComponent('calendar', function (calendarModel) { var calendar = new Calendar(calendarModel, ecModel, api); calendarList.push(calendar); calendarModel.coordinateSystem = calendar; }); ecModel.eachSeries(function (calendarSeries) { if (calendarSeries.get('coordinateSystem') === 'calendar') { // Inject coordinate system calendarSeries.coordinateSystem = calendarList[calendarSeries.get('calendarIndex') || 0]; } }); return calendarList; }; Calendar.dimensions = ['time', 'value']; return Calendar; }(); function Calendar_getCoordSys(finder) { var calendarModel = finder.calendarModel; var seriesModel = finder.seriesModel; var coordSys = calendarModel ? calendarModel.coordinateSystem : seriesModel ? seriesModel.coordinateSystem : null; return coordSys; } /* harmony default export */ var calendar_Calendar = (Calendar_Calendar); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/calendar/install.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 calendar_install_install(registers) { registers.registerComponentModel(calendar_CalendarModel); registers.registerComponentView(calendar_CalendarView); registers.registerCoordinateSystem('calendar', calendar_Calendar); } // CONCATENATED MODULE: ./node_modules/echarts/lib/component/graphic/GraphicModel.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 setKeyInfoToNewElOption(resultItem, newElOption) { var existElOption = resultItem.existing; // Set id and type after id assigned. newElOption.id = resultItem.keyInfo.id; !newElOption.type && existElOption && (newElOption.type = existElOption.type); // Set parent id if not specified if (newElOption.parentId == null) { var newElParentOption = newElOption.parentOption; if (newElParentOption) { newElOption.parentId = newElParentOption.id; } else if (existElOption) { newElOption.parentId = existElOption.parentId; } } // Clear newElOption.parentOption = null; } function isSetLoc(obj, props) { var isSet; core_util["each"](props, function (prop) { obj[prop] != null && obj[prop] !== 'auto' && (isSet = true); }); return isSet; } function mergeNewElOptionToExist(existList, index, newElOption) { // Update existing options, for `getOption` feature. var newElOptCopy = core_util["extend"]({}, newElOption); var existElOption = existList[index]; var $action = newElOption.$action || 'merge'; if ($action === 'merge') { if (existElOption) { if (false) { var newType = newElOption.type; zrUtil.assert(!newType || existElOption.type === newType, 'Please set $action: "replace" to change `type`'); } // We can ensure that newElOptCopy and existElOption are not // the same object, so `merge` will not change newElOptCopy. core_util["merge"](existElOption, newElOptCopy, true); // Rigid body, use ignoreSize. mergeLayoutParam(existElOption, newElOptCopy, { ignoreSize: true }); // Will be used in render. copyLayoutParams(newElOption, existElOption); // Copy transition info to new option so it can be used in the transition. // DO IT AFTER merge copyTransitionInfo(newElOption, existElOption); copyTransitionInfo(newElOption, existElOption, 'shape'); copyTransitionInfo(newElOption, existElOption, 'style'); copyTransitionInfo(newElOption, existElOption, 'extra'); // Copy clipPath newElOption.clipPath = existElOption.clipPath; } else { existList[index] = newElOptCopy; } } else if ($action === 'replace') { existList[index] = newElOptCopy; } else if ($action === 'remove') { // null will be cleaned later. existElOption && (existList[index] = null); } } var TRANSITION_PROPS_TO_COPY = ['transition', 'enterFrom', 'leaveTo']; var ROOT_TRANSITION_PROPS_TO_COPY = TRANSITION_PROPS_TO_COPY.concat(['enterAnimation', 'updateAnimation', 'leaveAnimation']); function copyTransitionInfo(target, source, targetProp) { if (targetProp) { if (!target[targetProp] && source[targetProp]) { // TODO avoid creating this empty object when there is no transition configuration. target[targetProp] = {}; } target = target[targetProp]; source = source[targetProp]; } if (!target || !source) { return; } var props = targetProp ? TRANSITION_PROPS_TO_COPY : ROOT_TRANSITION_PROPS_TO_COPY; for (var i = 0; i < props.length; i++) { var prop = props[i]; if (target[prop] == null && source[prop] != null) { target[prop] = source[prop]; } } } function setLayoutInfoToExist(existItem, newElOption) { if (!existItem) { return; } existItem.hv = newElOption.hv = [ // Rigid body, don't care about `width`. isSetLoc(newElOption, ['left', 'right']), // Rigid body, don't care about `height`. isSetLoc(newElOption, ['top', 'bottom'])]; // Give default group size. Otherwise layout error may occur. if (existItem.type === 'group') { var existingGroupOpt = existItem; var newGroupOpt = newElOption; existingGroupOpt.width == null && (existingGroupOpt.width = newGroupOpt.width = 0); existingGroupOpt.height == null && (existingGroupOpt.height = newGroupOpt.height = 0); } } var GraphicModel_GraphicComponentModel = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(GraphicComponentModel, _super); function GraphicComponentModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = GraphicComponentModel.type; _this.preventAutoZ = true; return _this; } GraphicComponentModel.prototype.mergeOption = function (option, ecModel) { // Prevent default merge to elements var elements = this.option.elements; this.option.elements = null; _super.prototype.mergeOption.call(this, option, ecModel); this.option.elements = elements; }; GraphicComponentModel.prototype.optionUpdated = function (newOption, isInit) { var thisOption = this.option; var newList = (isInit ? thisOption : newOption).elements; var existList = thisOption.elements = isInit ? [] : thisOption.elements; var flattenedList = []; this._flatten(newList, flattenedList, null); var mappingResult = mappingToExists(existList, flattenedList, 'normalMerge'); // Clear elOptionsToUpdate var elOptionsToUpdate = this._elOptionsToUpdate = []; core_util["each"](mappingResult, function (resultItem, index) { var newElOption = resultItem.newOption; if (false) { zrUtil.assert(zrUtil.isObject(newElOption) || resultItem.existing, 'Empty graphic option definition'); } if (!newElOption) { return; } elOptionsToUpdate.push(newElOption); setKeyInfoToNewElOption(resultItem, newElOption); mergeNewElOptionToExist(existList, index, newElOption); setLayoutInfoToExist(existList[index], newElOption); }, this); // Clean thisOption.elements = core_util["filter"](existList, function (item) { // $action should be volatile, otherwise option gotten from // `getOption` will contain unexpected $action. item && delete item.$action; return item != null; }); }; /** * Convert * [{ * type: 'group', * id: 'xx', * children: [{type: 'circle'}, {type: 'polygon'}] * }] * to * [ * {type: 'group', id: 'xx'}, * {type: 'circle', parentId: 'xx'}, * {type: 'polygon', parentId: 'xx'} * ] */ GraphicComponentModel.prototype._flatten = function (optionList, result, parentOption) { core_util["each"](optionList, function (option) { if (!option) { return; } if (parentOption) { option.parentOption = parentOption; } result.push(option); var children = option.children; // here we don't judge if option.type is `group` // when new option doesn't provide `type`, it will cause that the children can't be updated. if (children && children.length) { this._flatten(children, result, option); } // Deleting for JSON output, and for not affecting group creation. delete option.children; }, this); }; // FIXME // Pass to view using payload? setOption has a payload? GraphicComponentModel.prototype.useElOptionsToUpdate = function () { var els = this._elOptionsToUpdate; // Clear to avoid render duplicately when zooming. this._elOptionsToUpdate = null; return els; }; GraphicComponentModel.type = 'graphic'; GraphicComponentModel.defaultOption = { elements: [] // parentId: null }; return GraphicComponentModel; }(Component); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/graphic/GraphicView.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 nonShapeGraphicElements = { // Reserved but not supported in graphic component. path: null, compoundPath: null, // Supported in graphic component. group: graphic_Group, image: graphic_Image, text: Text }; var GraphicView_inner = makeInner(); // ------------------------ // View // ------------------------ var GraphicView_GraphicComponentView = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(GraphicComponentView, _super); function GraphicComponentView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = GraphicComponentView.type; return _this; } GraphicComponentView.prototype.init = function () { this._elMap = core_util["createHashMap"](); }; GraphicComponentView.prototype.render = function (graphicModel, ecModel, api) { // Having leveraged between use cases and algorithm complexity, a very // simple layout mechanism is used: // The size(width/height) can be determined by itself or its parent (not // implemented yet), but can not by its children. (Top-down travel) // The location(x/y) can be determined by the bounding rect of itself // (can including its descendants or not) and the size of its parent. // (Bottom-up travel) // When `chart.clear()` or `chart.setOption({...}, true)` with the same id, // view will be reused. if (graphicModel !== this._lastGraphicModel) { this._clear(); } this._lastGraphicModel = graphicModel; this._updateElements(graphicModel); this._relocate(graphicModel, api); }; /** * Update graphic elements. */ GraphicComponentView.prototype._updateElements = function (graphicModel) { var elOptionsToUpdate = graphicModel.useElOptionsToUpdate(); if (!elOptionsToUpdate) { return; } var elMap = this._elMap; var rootGroup = this.group; var globalZ = graphicModel.get('z'); var globalZLevel = graphicModel.get('zlevel'); // Top-down tranverse to assign graphic settings to each elements. core_util["each"](elOptionsToUpdate, function (elOption) { var id = convertOptionIdName(elOption.id, null); var elExisting = id != null ? elMap.get(id) : null; var parentId = convertOptionIdName(elOption.parentId, null); var targetElParent = parentId != null ? elMap.get(parentId) : rootGroup; var elType = elOption.type; var elOptionStyle = elOption.style; if (elType === 'text' && elOptionStyle) { // In top/bottom mode, textVerticalAlign should not be used, which cause // inaccurately locating. if (elOption.hv && elOption.hv[1]) { elOptionStyle.textVerticalAlign = elOptionStyle.textBaseline = elOptionStyle.verticalAlign = elOptionStyle.align = null; } } var textContentOption = elOption.textContent; var textConfig = elOption.textConfig; if (elOptionStyle && isEC4CompatibleStyle(elOptionStyle, elType, !!textConfig, !!textContentOption)) { var convertResult = convertFromEC4CompatibleStyle(elOptionStyle, elType, true); if (!textConfig && convertResult.textConfig) { textConfig = elOption.textConfig = convertResult.textConfig; } if (!textContentOption && convertResult.textContent) { textContentOption = convertResult.textContent; } } // Remove unnecessary props to avoid potential problems. var elOptionCleaned = getCleanedElOption(elOption); // For simple, do not support parent change, otherwise reorder is needed. if (false) { elExisting && zrUtil.assert(targetElParent === elExisting.parent, 'Changing parent is not supported.'); } var $action = elOption.$action || 'merge'; var isMerge = $action === 'merge'; var isReplace = $action === 'replace'; if (isMerge) { var isInit = !elExisting; var el_1 = elExisting; if (isInit) { el_1 = GraphicView_createEl(id, targetElParent, elOption.type, elMap); } else { el_1 && (GraphicView_inner(el_1).isNew = false); // Stop and restore before update any other attributes. stopPreviousKeyframeAnimationAndRestore(el_1); } if (el_1) { applyUpdateTransition(el_1, elOptionCleaned, graphicModel, { isInit: isInit }); updateCommonAttrs(el_1, elOption, globalZ, globalZLevel); } } else if (isReplace) { removeEl(elExisting, elOption, elMap, graphicModel); var el_2 = GraphicView_createEl(id, targetElParent, elOption.type, elMap); if (el_2) { applyUpdateTransition(el_2, elOptionCleaned, graphicModel, { isInit: true }); updateCommonAttrs(el_2, elOption, globalZ, globalZLevel); } } else if ($action === 'remove') { updateLeaveTo(elExisting, elOption); removeEl(elExisting, elOption, elMap, graphicModel); } var el = elMap.get(id); if (el && textContentOption) { if (isMerge) { var textContentExisting = el.getTextContent(); textContentExisting ? textContentExisting.attr(textContentOption) : el.setTextContent(new Text(textContentOption)); } else if (isReplace) { el.setTextContent(new Text(textContentOption)); } } if (el) { var clipPathOption = elOption.clipPath; if (clipPathOption) { var clipPathType = clipPathOption.type; var clipPath = void 0; var isInit = false; if (isMerge) { var oldClipPath = el.getClipPath(); isInit = !oldClipPath || GraphicView_inner(oldClipPath).type !== clipPathType; clipPath = isInit ? GraphicView_newEl(clipPathType) : oldClipPath; } else if (isReplace) { isInit = true; clipPath = GraphicView_newEl(clipPathType); } el.setClipPath(clipPath); applyUpdateTransition(clipPath, clipPathOption, graphicModel, { isInit: isInit }); applyKeyframeAnimation(clipPath, clipPathOption.keyframeAnimation, graphicModel); } var elInner = GraphicView_inner(el); el.setTextConfig(textConfig); elInner.option = elOption; setEventData(el, graphicModel, elOption); setTooltipConfig({ el: el, componentModel: graphicModel, itemName: el.name, itemTooltipOption: elOption.tooltip }); applyKeyframeAnimation(el, elOption.keyframeAnimation, graphicModel); } }); }; /** * Locate graphic elements. */ GraphicComponentView.prototype._relocate = function (graphicModel, api) { var elOptions = graphicModel.option.elements; var rootGroup = this.group; var elMap = this._elMap; var apiWidth = api.getWidth(); var apiHeight = api.getHeight(); var xy = ['x', 'y']; // Top-down to calculate percentage width/height of group for (var i = 0; i < elOptions.length; i++) { var elOption = elOptions[i]; var id = convertOptionIdName(elOption.id, null); var el = id != null ? elMap.get(id) : null; if (!el || !el.isGroup) { continue; } var parentEl = el.parent; var isParentRoot = parentEl === rootGroup; // Like 'position:absolut' in css, default 0. var elInner = GraphicView_inner(el); var parentElInner = GraphicView_inner(parentEl); elInner.width = number_parsePercent(elInner.option.width, isParentRoot ? apiWidth : parentElInner.width) || 0; elInner.height = number_parsePercent(elInner.option.height, isParentRoot ? apiHeight : parentElInner.height) || 0; } // Bottom-up tranvese all elements (consider ec resize) to locate elements. for (var i = elOptions.length - 1; i >= 0; i--) { var elOption = elOptions[i]; var id = convertOptionIdName(elOption.id, null); var el = id != null ? elMap.get(id) : null; if (!el) { continue; } var parentEl = el.parent; var parentElInner = GraphicView_inner(parentEl); var containerInfo = parentEl === rootGroup ? { width: apiWidth, height: apiHeight } : { width: parentElInner.width, height: parentElInner.height }; // PENDING // Currently, when `bounding: 'all'`, the union bounding rect of the group // does not include the rect of [0, 0, group.width, group.height], which // is probably weird for users. Should we make a break change for it? var layoutPos = {}; var layouted = positionElement(el, elOption, containerInfo, null, { hv: elOption.hv, boundingMode: elOption.bounding }, layoutPos); if (!GraphicView_inner(el).isNew && layouted) { var transition = elOption.transition; var animatePos = {}; for (var k = 0; k < xy.length; k++) { var key = xy[k]; var val = layoutPos[key]; if (transition && (isTransitionAll(transition) || core_util["indexOf"](transition, key) >= 0)) { animatePos[key] = val; } else { el[key] = val; } } updateProps(el, animatePos, graphicModel, 0); } else { el.attr(layoutPos); } } }; /** * Clear all elements. */ GraphicComponentView.prototype._clear = function () { var _this = this; var elMap = this._elMap; elMap.each(function (el) { removeEl(el, GraphicView_inner(el).option, elMap, _this._lastGraphicModel); }); this._elMap = core_util["createHashMap"](); }; GraphicComponentView.prototype.dispose = function () { this._clear(); }; GraphicComponentView.type = 'graphic'; return GraphicComponentView; }(view_Component); function GraphicView_newEl(graphicType) { if (false) { zrUtil.assert(graphicType, 'graphic type MUST be set'); } var Clz = core_util["hasOwn"](nonShapeGraphicElements, graphicType) // Those graphic elements are not shapes. They should not be // overwritten by users, so do them first. ? nonShapeGraphicElements[graphicType] : getShapeClass(graphicType); if (false) { zrUtil.assert(Clz, "graphic type " + graphicType + " can not be found"); } var el = new Clz({}); GraphicView_inner(el).type = graphicType; return el; } function GraphicView_createEl(id, targetElParent, graphicType, elMap) { var el = GraphicView_newEl(graphicType); targetElParent.add(el); elMap.set(id, el); GraphicView_inner(el).id = id; GraphicView_inner(el).isNew = true; return el; } function removeEl(elExisting, elOption, elMap, graphicModel) { var existElParent = elExisting && elExisting.parent; if (existElParent) { elExisting.type === 'group' && elExisting.traverse(function (el) { removeEl(el, elOption, elMap, graphicModel); }); applyLeaveTransition(elExisting, elOption, graphicModel); elMap.removeKey(GraphicView_inner(elExisting).id); } } function updateCommonAttrs(el, elOption, defaultZ, defaultZlevel) { if (!el.isGroup) { core_util["each"]([['cursor', graphic_Displayable.prototype.cursor], // We should not support configure z and zlevel in the element level. // But seems we didn't limit it previously. So here still use it to avoid breaking. ['zlevel', defaultZlevel || 0], ['z', defaultZ || 0], // z2 must not be null/undefined, otherwise sort error may occur. ['z2', 0]], function (item) { var prop = item[0]; if (core_util["hasOwn"](elOption, prop)) { el[prop] = core_util["retrieve2"](elOption[prop], item[1]); } else if (el[prop] == null) { el[prop] = item[1]; } }); } core_util["each"](core_util["keys"](elOption), function (key) { // Assign event handlers. // PENDING: should enumerate all event names or use pattern matching? if (key.indexOf('on') === 0) { var val = elOption[key]; el[key] = core_util["isFunction"](val) ? val : null; } }); if (core_util["hasOwn"](elOption, 'draggable')) { el.draggable = elOption.draggable; } // Other attributes elOption.name != null && (el.name = elOption.name); elOption.id != null && (el.id = elOption.id); } // Remove unnecessary props to avoid potential problems. function getCleanedElOption(elOption) { elOption = core_util["extend"]({}, elOption); core_util["each"](['id', 'parentId', '$action', 'hv', 'bounding', 'textContent', 'clipPath'].concat(LOCATION_PARAMS), function (name) { delete elOption[name]; }); return elOption; } function setEventData(el, graphicModel, elOption) { var eventData = getECData(el).eventData; // Simple optimize for large amount of elements that no need event. if (!el.silent && !el.ignore && !eventData) { eventData = getECData(el).eventData = { componentType: 'graphic', componentIndex: graphicModel.componentIndex, name: el.name }; } // `elOption.info` enables user to mount some info on // elements and use them in event handlers. if (eventData) { eventData.info = elOption.info; } } // CONCATENATED MODULE: ./node_modules/echarts/lib/component/graphic/install.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 graphic_install_install(registers) { registers.registerComponentModel(GraphicModel_GraphicComponentModel); registers.registerComponentView(GraphicView_GraphicComponentView); registers.registerPreprocessor(function (option) { var graphicOption = option.graphic; // Convert // {graphic: [{left: 10, type: 'circle'}, ...]} // or // {graphic: {left: 10, type: 'circle'}} // to // {graphic: [{elements: [{left: 10, type: 'circle'}, ...]}]} if (Object(core_util["isArray"])(graphicOption)) { if (!graphicOption[0] || !graphicOption[0].elements) { option.graphic = [{ elements: graphicOption }]; } else { // Only one graphic instance can be instantiated. (We don't // want that too many views are created in echarts._viewMap.) option.graphic = [option.graphic[0]]; } } else if (graphicOption && !graphicOption.elements) { option.graphic = [{ elements: [graphicOption] }]; } }); } // CONCATENATED MODULE: ./node_modules/echarts/lib/component/dataZoom/helper.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 DATA_ZOOM_AXIS_DIMENSIONS = ['x', 'y', 'radius', 'angle', 'single']; // Supported coords. // FIXME: polar has been broken (but rarely used). var SERIES_COORDS = ['cartesian2d', 'polar', 'singleAxis']; function isCoordSupported(seriesModel) { var coordType = seriesModel.get('coordinateSystem'); return Object(core_util["indexOf"])(SERIES_COORDS, coordType) >= 0; } function getAxisMainType(axisDim) { if (false) { assert(axisDim); } return axisDim + 'Axis'; } function getAxisIndexPropName(axisDim) { if (false) { assert(axisDim); } return axisDim + 'AxisIndex'; } function getAxisIdPropName(axisDim) { if (false) { assert(axisDim); } return axisDim + 'AxisId'; } /** * If two dataZoomModels has the same axis controlled, we say that they are 'linked'. * This function finds all linked dataZoomModels start from the given payload. */ function findEffectedDataZooms(ecModel, payload) { // Key: `DataZoomAxisDimension` var axisRecords = Object(core_util["createHashMap"])(); var effectedModels = []; // Key: uid of dataZoomModel var effectedModelMap = Object(core_util["createHashMap"])(); // Find the dataZooms specified by payload. ecModel.eachComponent({ mainType: 'dataZoom', query: payload }, function (dataZoomModel) { if (!effectedModelMap.get(dataZoomModel.uid)) { addToEffected(dataZoomModel); } }); // Start from the given dataZoomModels, travel the graph to find // all of the linked dataZoom models. var foundNewLink; do { foundNewLink = false; ecModel.eachComponent('dataZoom', processSingle); } while (foundNewLink); function processSingle(dataZoomModel) { if (!effectedModelMap.get(dataZoomModel.uid) && isLinked(dataZoomModel)) { addToEffected(dataZoomModel); foundNewLink = true; } } function addToEffected(dataZoom) { effectedModelMap.set(dataZoom.uid, true); effectedModels.push(dataZoom); markAxisControlled(dataZoom); } function isLinked(dataZoomModel) { var isLink = false; dataZoomModel.eachTargetAxis(function (axisDim, axisIndex) { var axisIdxArr = axisRecords.get(axisDim); if (axisIdxArr && axisIdxArr[axisIndex]) { isLink = true; } }); return isLink; } function markAxisControlled(dataZoomModel) { dataZoomModel.eachTargetAxis(function (axisDim, axisIndex) { (axisRecords.get(axisDim) || axisRecords.set(axisDim, []))[axisIndex] = true; }); } return effectedModels; } /** * Find the first target coordinate system. * Available after model built. * * @return Like { * grid: [ * {model: coord0, axisModels: [axis1, axis3], coordIndex: 1}, * {model: coord1, axisModels: [axis0, axis2], coordIndex: 0}, * ... * ], // cartesians must not be null/undefined. * polar: [ * {model: coord0, axisModels: [axis4], coordIndex: 0}, * ... * ], // polars must not be null/undefined. * singleAxis: [ * {model: coord0, axisModels: [], coordIndex: 0} * ] * } */ function collectReferCoordSysModelInfo(dataZoomModel) { var ecModel = dataZoomModel.ecModel; var coordSysInfoWrap = { infoList: [], infoMap: Object(core_util["createHashMap"])() }; dataZoomModel.eachTargetAxis(function (axisDim, axisIndex) { var axisModel = ecModel.getComponent(getAxisMainType(axisDim), axisIndex); if (!axisModel) { return; } var coordSysModel = axisModel.getCoordSysModel(); if (!coordSysModel) { return; } var coordSysUid = coordSysModel.uid; var coordSysInfo = coordSysInfoWrap.infoMap.get(coordSysUid); if (!coordSysInfo) { coordSysInfo = { model: coordSysModel, axisModels: [] }; coordSysInfoWrap.infoList.push(coordSysInfo); coordSysInfoWrap.infoMap.set(coordSysUid, coordSysInfo); } coordSysInfo.axisModels.push(axisModel); }); return coordSysInfoWrap; } // CONCATENATED MODULE: ./node_modules/echarts/lib/component/dataZoom/DataZoomModel.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 DataZoomAxisInfo = /** @class */function () { function DataZoomAxisInfo() { this.indexList = []; this.indexMap = []; } DataZoomAxisInfo.prototype.add = function (axisCmptIdx) { // Remove duplication. if (!this.indexMap[axisCmptIdx]) { this.indexList.push(axisCmptIdx); this.indexMap[axisCmptIdx] = true; } }; return DataZoomAxisInfo; }(); var DataZoomModel_DataZoomModel = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(DataZoomModel, _super); function DataZoomModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = DataZoomModel.type; _this._autoThrottle = true; _this._noTarget = true; /** * It is `[rangeModeForMin, rangeModeForMax]`. * The optional values for `rangeMode`: * + `'value'` mode: the axis extent will always be determined by * `dataZoom.startValue` and `dataZoom.endValue`, despite * how data like and how `axis.min` and `axis.max` are. * + `'percent'` mode: `100` represents 100% of the `[dMin, dMax]`, * where `dMin` is `axis.min` if `axis.min` specified, otherwise `data.extent[0]`, * and `dMax` is `axis.max` if `axis.max` specified, otherwise `data.extent[1]`. * Axis extent will be determined by the result of the percent of `[dMin, dMax]`. * * For example, when users are using dynamic data (update data periodically via `setOption`), * if in `'value`' mode, the window will be kept in a fixed value range despite how * data are appended, while if in `'percent'` mode, whe window range will be changed alone with * the appended data (suppose `axis.min` and `axis.max` are not specified). */ _this._rangePropMode = ['percent', 'percent']; return _this; } DataZoomModel.prototype.init = function (option, parentModel, ecModel) { var inputRawOption = retrieveRawOption(option); /** * Suppose a "main process" start at the point that model prepared (that is, * model initialized or merged or method called in `action`). * We should keep the `main process` idempotent, that is, given a set of values * on `option`, we get the same result. * * But sometimes, values on `option` will be updated for providing users * a "final calculated value" (`dataZoomProcessor` will do that). Those value * should not be the base/input of the `main process`. * * So in that case we should save and keep the input of the `main process` * separately, called `settledOption`. * * For example, consider the case: * (Step_1) brush zoom the grid by `toolbox.dataZoom`, * where the original input `option.startValue`, `option.endValue` are earsed by * calculated value. * (Step)2) click the legend to hide and show a series, * where the new range is calculated by the earsed `startValue` and `endValue`, * which brings incorrect result. */ this.settledOption = inputRawOption; this.mergeDefaultAndTheme(option, ecModel); this._doInit(inputRawOption); }; DataZoomModel.prototype.mergeOption = function (newOption) { var inputRawOption = retrieveRawOption(newOption); // FIX #2591 Object(core_util["merge"])(this.option, newOption, true); Object(core_util["merge"])(this.settledOption, inputRawOption, true); this._doInit(inputRawOption); }; DataZoomModel.prototype._doInit = function (inputRawOption) { var thisOption = this.option; this._setDefaultThrottle(inputRawOption); this._updateRangeUse(inputRawOption); var settledOption = this.settledOption; Object(core_util["each"])([['start', 'startValue'], ['end', 'endValue']], function (names, index) { // start/end has higher priority over startValue/endValue if they // both set, but we should make chart.setOption({endValue: 1000}) // effective, rather than chart.setOption({endValue: 1000, end: null}). if (this._rangePropMode[index] === 'value') { thisOption[names[0]] = settledOption[names[0]] = null; } // Otherwise do nothing and use the merge result. }, this); this._resetTarget(); }; DataZoomModel.prototype._resetTarget = function () { var optionOrient = this.get('orient', true); var targetAxisIndexMap = this._targetAxisInfoMap = Object(core_util["createHashMap"])(); var hasAxisSpecified = this._fillSpecifiedTargetAxis(targetAxisIndexMap); if (hasAxisSpecified) { this._orient = optionOrient || this._makeAutoOrientByTargetAxis(); } else { this._orient = optionOrient || 'horizontal'; this._fillAutoTargetAxisByOrient(targetAxisIndexMap, this._orient); } this._noTarget = true; targetAxisIndexMap.each(function (axisInfo) { if (axisInfo.indexList.length) { this._noTarget = false; } }, this); }; DataZoomModel.prototype._fillSpecifiedTargetAxis = function (targetAxisIndexMap) { var hasAxisSpecified = false; Object(core_util["each"])(DATA_ZOOM_AXIS_DIMENSIONS, function (axisDim) { var refering = this.getReferringComponents(getAxisMainType(axisDim), MULTIPLE_REFERRING); // When user set axisIndex as a empty array, we think that user specify axisIndex // but do not want use auto mode. Because empty array may be encountered when // some error occurred. if (!refering.specified) { return; } hasAxisSpecified = true; var axisInfo = new DataZoomAxisInfo(); Object(core_util["each"])(refering.models, function (axisModel) { axisInfo.add(axisModel.componentIndex); }); targetAxisIndexMap.set(axisDim, axisInfo); }, this); return hasAxisSpecified; }; DataZoomModel.prototype._fillAutoTargetAxisByOrient = function (targetAxisIndexMap, orient) { var ecModel = this.ecModel; var needAuto = true; // Find axis that parallel to dataZoom as default. if (needAuto) { var axisDim = orient === 'vertical' ? 'y' : 'x'; var axisModels = ecModel.findComponents({ mainType: axisDim + 'Axis' }); setParallelAxis(axisModels, axisDim); } // Find axis that parallel to dataZoom as default. if (needAuto) { var axisModels = ecModel.findComponents({ mainType: 'singleAxis', filter: function (axisModel) { return axisModel.get('orient', true) === orient; } }); setParallelAxis(axisModels, 'single'); } function setParallelAxis(axisModels, axisDim) { // At least use the first parallel axis as the target axis. var axisModel = axisModels[0]; if (!axisModel) { return; } var axisInfo = new DataZoomAxisInfo(); axisInfo.add(axisModel.componentIndex); targetAxisIndexMap.set(axisDim, axisInfo); needAuto = false; // Find parallel axes in the same grid. if (axisDim === 'x' || axisDim === 'y') { var gridModel_1 = axisModel.getReferringComponents('grid', SINGLE_REFERRING).models[0]; gridModel_1 && Object(core_util["each"])(axisModels, function (axModel) { if (axisModel.componentIndex !== axModel.componentIndex && gridModel_1 === axModel.getReferringComponents('grid', SINGLE_REFERRING).models[0]) { axisInfo.add(axModel.componentIndex); } }); } } if (needAuto) { // If no parallel axis, find the first category axis as default. (Also consider polar). Object(core_util["each"])(DATA_ZOOM_AXIS_DIMENSIONS, function (axisDim) { if (!needAuto) { return; } var axisModels = ecModel.findComponents({ mainType: getAxisMainType(axisDim), filter: function (axisModel) { return axisModel.get('type', true) === 'category'; } }); if (axisModels[0]) { var axisInfo = new DataZoomAxisInfo(); axisInfo.add(axisModels[0].componentIndex); targetAxisIndexMap.set(axisDim, axisInfo); needAuto = false; } }, this); } }; DataZoomModel.prototype._makeAutoOrientByTargetAxis = function () { var dim; // Find the first axis this.eachTargetAxis(function (axisDim) { !dim && (dim = axisDim); }, this); return dim === 'y' ? 'vertical' : 'horizontal'; }; DataZoomModel.prototype._setDefaultThrottle = function (inputRawOption) { // When first time user set throttle, auto throttle ends. if (inputRawOption.hasOwnProperty('throttle')) { this._autoThrottle = false; } if (this._autoThrottle) { var globalOption = this.ecModel.option; this.option.throttle = globalOption.animation && globalOption.animationDurationUpdate > 0 ? 100 : 20; } }; DataZoomModel.prototype._updateRangeUse = function (inputRawOption) { var rangePropMode = this._rangePropMode; var rangeModeInOption = this.get('rangeMode'); Object(core_util["each"])([['start', 'startValue'], ['end', 'endValue']], function (names, index) { var percentSpecified = inputRawOption[names[0]] != null; var valueSpecified = inputRawOption[names[1]] != null; if (percentSpecified && !valueSpecified) { rangePropMode[index] = 'percent'; } else if (!percentSpecified && valueSpecified) { rangePropMode[index] = 'value'; } else if (rangeModeInOption) { rangePropMode[index] = rangeModeInOption[index]; } else if (percentSpecified) { // percentSpecified && valueSpecified rangePropMode[index] = 'percent'; } // else remain its original setting. }); }; DataZoomModel.prototype.noTarget = function () { return this._noTarget; }; DataZoomModel.prototype.getFirstTargetAxisModel = function () { var firstAxisModel; this.eachTargetAxis(function (axisDim, axisIndex) { if (firstAxisModel == null) { firstAxisModel = this.ecModel.getComponent(getAxisMainType(axisDim), axisIndex); } }, this); return firstAxisModel; }; /** * @param {Function} callback param: axisModel, dimNames, axisIndex, dataZoomModel, ecModel */ DataZoomModel.prototype.eachTargetAxis = function (callback, context) { this._targetAxisInfoMap.each(function (axisInfo, axisDim) { Object(core_util["each"])(axisInfo.indexList, function (axisIndex) { callback.call(context, axisDim, axisIndex); }); }); }; /** * @return If not found, return null/undefined. */ DataZoomModel.prototype.getAxisProxy = function (axisDim, axisIndex) { var axisModel = this.getAxisModel(axisDim, axisIndex); if (axisModel) { return axisModel.__dzAxisProxy; } }; /** * @return If not found, return null/undefined. */ DataZoomModel.prototype.getAxisModel = function (axisDim, axisIndex) { if (false) { assert(axisDim && axisIndex != null); } var axisInfo = this._targetAxisInfoMap.get(axisDim); if (axisInfo && axisInfo.indexMap[axisIndex]) { return this.ecModel.getComponent(getAxisMainType(axisDim), axisIndex); } }; /** * If not specified, set to undefined. */ DataZoomModel.prototype.setRawRange = function (opt) { var thisOption = this.option; var settledOption = this.settledOption; Object(core_util["each"])([['start', 'startValue'], ['end', 'endValue']], function (names) { // Consider the pair : // If one has value and the other one is `null/undefined`, we both set them // to `settledOption`. This strategy enables the feature to clear the original // value in `settledOption` to `null/undefined`. // But if both of them are `null/undefined`, we do not set them to `settledOption` // and keep `settledOption` with the original value. This strategy enables users to // only set but not set when calling // `dispatchAction`. // The pair is treated in the same way. if (opt[names[0]] != null || opt[names[1]] != null) { thisOption[names[0]] = settledOption[names[0]] = opt[names[0]]; thisOption[names[1]] = settledOption[names[1]] = opt[names[1]]; } }, this); this._updateRangeUse(opt); }; DataZoomModel.prototype.setCalculatedRange = function (opt) { var option = this.option; Object(core_util["each"])(['start', 'startValue', 'end', 'endValue'], function (name) { option[name] = opt[name]; }); }; DataZoomModel.prototype.getPercentRange = function () { var axisProxy = this.findRepresentativeAxisProxy(); if (axisProxy) { return axisProxy.getDataPercentWindow(); } }; /** * For example, chart.getModel().getComponent('dataZoom').getValueRange('y', 0); * * @return [startValue, endValue] value can only be '-' or finite number. */ DataZoomModel.prototype.getValueRange = function (axisDim, axisIndex) { if (axisDim == null && axisIndex == null) { var axisProxy = this.findRepresentativeAxisProxy(); if (axisProxy) { return axisProxy.getDataValueWindow(); } } else { return this.getAxisProxy(axisDim, axisIndex).getDataValueWindow(); } }; /** * @param axisModel If axisModel given, find axisProxy * corresponding to the axisModel */ DataZoomModel.prototype.findRepresentativeAxisProxy = function (axisModel) { if (axisModel) { return axisModel.__dzAxisProxy; } // Find the first hosted axisProxy var firstProxy; var axisDimList = this._targetAxisInfoMap.keys(); for (var i = 0; i < axisDimList.length; i++) { var axisDim = axisDimList[i]; var axisInfo = this._targetAxisInfoMap.get(axisDim); for (var j = 0; j < axisInfo.indexList.length; j++) { var proxy = this.getAxisProxy(axisDim, axisInfo.indexList[j]); if (proxy.hostedBy(this)) { return proxy; } if (!firstProxy) { firstProxy = proxy; } } } // If no hosted proxy found, still need to return a proxy. // This case always happens in toolbox dataZoom, where axes are all hosted by // other dataZooms. return firstProxy; }; DataZoomModel.prototype.getRangePropMode = function () { return this._rangePropMode.slice(); }; DataZoomModel.prototype.getOrient = function () { if (false) { // Should not be called before initialized. assert(this._orient); } return this._orient; }; DataZoomModel.type = 'dataZoom'; DataZoomModel.dependencies = ['xAxis', 'yAxis', 'radiusAxis', 'angleAxis', 'singleAxis', 'series', 'toolbox']; DataZoomModel.defaultOption = { // zlevel: 0, z: 4, filterMode: 'filter', start: 0, end: 100 }; return DataZoomModel; }(Component); /** * Retrieve those raw params from option, which will be cached separately, * because they will be overwritten by normalized/calculated values in the main * process. */ function retrieveRawOption(option) { var ret = {}; Object(core_util["each"])(['start', 'end', 'startValue', 'endValue', 'throttle'], function (name) { option.hasOwnProperty(name) && (ret[name] = option[name]); }); return ret; } /* harmony default export */ var dataZoom_DataZoomModel = (DataZoomModel_DataZoomModel); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/dataZoom/SelectZoomModel.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 SelectZoomModel_SelectDataZoomModel = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(SelectDataZoomModel, _super); function SelectDataZoomModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = SelectDataZoomModel.type; return _this; } SelectDataZoomModel.type = 'dataZoom.select'; return SelectDataZoomModel; }(dataZoom_DataZoomModel); /* harmony default export */ var SelectZoomModel = (SelectZoomModel_SelectDataZoomModel); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/dataZoom/DataZoomView.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 DataZoomView_DataZoomView = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(DataZoomView, _super); function DataZoomView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = DataZoomView.type; return _this; } DataZoomView.prototype.render = function (dataZoomModel, ecModel, api, payload) { this.dataZoomModel = dataZoomModel; this.ecModel = ecModel; this.api = api; }; DataZoomView.type = 'dataZoom'; return DataZoomView; }(view_Component); /* harmony default export */ var dataZoom_DataZoomView = (DataZoomView_DataZoomView); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/dataZoom/SelectZoomView.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 SelectZoomView_SelectDataZoomView = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(SelectDataZoomView, _super); function SelectDataZoomView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = SelectDataZoomView.type; return _this; } SelectDataZoomView.type = 'dataZoom.select'; return SelectDataZoomView; }(dataZoom_DataZoomView); /* harmony default export */ var SelectZoomView = (SelectZoomView_SelectDataZoomView); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/dataZoom/AxisProxy.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 AxisProxy_each = core_util["each"]; var AxisProxy_asc = asc; /** * Operate single axis. * One axis can only operated by one axis operator. * Different dataZoomModels may be defined to operate the same axis. * (i.e. 'inside' data zoom and 'slider' data zoom components) * So dataZoomModels share one axisProxy in that case. */ var AxisProxy_AxisProxy = /** @class */function () { function AxisProxy(dimName, axisIndex, dataZoomModel, ecModel) { this._dimName = dimName; this._axisIndex = axisIndex; this.ecModel = ecModel; this._dataZoomModel = dataZoomModel; // /** // * @readOnly // * @private // */ // this.hasSeriesStacked; } /** * Whether the axisProxy is hosted by dataZoomModel. */ AxisProxy.prototype.hostedBy = function (dataZoomModel) { return this._dataZoomModel === dataZoomModel; }; /** * @return Value can only be NaN or finite value. */ AxisProxy.prototype.getDataValueWindow = function () { return this._valueWindow.slice(); }; /** * @return {Array.} */ AxisProxy.prototype.getDataPercentWindow = function () { return this._percentWindow.slice(); }; AxisProxy.prototype.getTargetSeriesModels = function () { var seriesModels = []; this.ecModel.eachSeries(function (seriesModel) { if (isCoordSupported(seriesModel)) { var axisMainType = getAxisMainType(this._dimName); var axisModel = seriesModel.getReferringComponents(axisMainType, SINGLE_REFERRING).models[0]; if (axisModel && this._axisIndex === axisModel.componentIndex) { seriesModels.push(seriesModel); } } }, this); return seriesModels; }; AxisProxy.prototype.getAxisModel = function () { return this.ecModel.getComponent(this._dimName + 'Axis', this._axisIndex); }; AxisProxy.prototype.getMinMaxSpan = function () { return core_util["clone"](this._minMaxSpan); }; /** * Only calculate by given range and this._dataExtent, do not change anything. */ AxisProxy.prototype.calculateDataWindow = function (opt) { var dataExtent = this._dataExtent; var axisModel = this.getAxisModel(); var scale = axisModel.axis.scale; var rangePropMode = this._dataZoomModel.getRangePropMode(); var percentExtent = [0, 100]; var percentWindow = []; var valueWindow = []; var hasPropModeValue; AxisProxy_each(['start', 'end'], function (prop, idx) { var boundPercent = opt[prop]; var boundValue = opt[prop + 'Value']; // Notice: dataZoom is based either on `percentProp` ('start', 'end') or // on `valueProp` ('startValue', 'endValue'). (They are based on the data extent // but not min/max of axis, which will be calculated by data window then). // The former one is suitable for cases that a dataZoom component controls multiple // axes with different unit or extent, and the latter one is suitable for accurate // zoom by pixel (e.g., in dataZoomSelect). // we use `getRangePropMode()` to mark which prop is used. `rangePropMode` is updated // only when setOption or dispatchAction, otherwise it remains its original value. // (Why not only record `percentProp` and always map to `valueProp`? Because // the map `valueProp` -> `percentProp` -> `valueProp` probably not the original // `valueProp`. consider two axes constrolled by one dataZoom. They have different // data extent. All of values that are overflow the `dataExtent` will be calculated // to percent '100%'). if (rangePropMode[idx] === 'percent') { boundPercent == null && (boundPercent = percentExtent[idx]); // Use scale.parse to math round for category or time axis. boundValue = scale.parse(linearMap(boundPercent, percentExtent, dataExtent)); } else { hasPropModeValue = true; boundValue = boundValue == null ? dataExtent[idx] : scale.parse(boundValue); // Calculating `percent` from `value` may be not accurate, because // This calculation can not be inversed, because all of values that // are overflow the `dataExtent` will be calculated to percent '100%' boundPercent = linearMap(boundValue, dataExtent, percentExtent); } // valueWindow[idx] = round(boundValue); // percentWindow[idx] = round(boundPercent); // fallback to extent start/end when parsed value or percent is invalid valueWindow[idx] = boundValue == null || isNaN(boundValue) ? dataExtent[idx] : boundValue; percentWindow[idx] = boundPercent == null || isNaN(boundPercent) ? percentExtent[idx] : boundPercent; }); AxisProxy_asc(valueWindow); AxisProxy_asc(percentWindow); // The windows from user calling of `dispatchAction` might be out of the extent, // or do not obey the `min/maxSpan`, `min/maxValueSpan`. But we don't restrict window // by `zoomLock` here, because we see `zoomLock` just as a interaction constraint, // where API is able to initialize/modify the window size even though `zoomLock` // specified. var spans = this._minMaxSpan; hasPropModeValue ? restrictSet(valueWindow, percentWindow, dataExtent, percentExtent, false) : restrictSet(percentWindow, valueWindow, percentExtent, dataExtent, true); function restrictSet(fromWindow, toWindow, fromExtent, toExtent, toValue) { var suffix = toValue ? 'Span' : 'ValueSpan'; sliderMove(0, fromWindow, fromExtent, 'all', spans['min' + suffix], spans['max' + suffix]); for (var i = 0; i < 2; i++) { toWindow[i] = linearMap(fromWindow[i], fromExtent, toExtent, true); toValue && (toWindow[i] = scale.parse(toWindow[i])); } } return { valueWindow: valueWindow, percentWindow: percentWindow }; }; /** * Notice: reset should not be called before series.restoreData() is called, * so it is recommended to be called in "process stage" but not "model init * stage". */ AxisProxy.prototype.reset = function (dataZoomModel) { if (dataZoomModel !== this._dataZoomModel) { return; } var targetSeries = this.getTargetSeriesModels(); // Culculate data window and data extent, and record them. this._dataExtent = calculateDataExtent(this, this._dimName, targetSeries); // `calculateDataWindow` uses min/maxSpan. this._updateMinMaxSpan(); var dataWindow = this.calculateDataWindow(dataZoomModel.settledOption); this._valueWindow = dataWindow.valueWindow; this._percentWindow = dataWindow.percentWindow; // Update axis setting then. this._setAxisModel(); }; AxisProxy.prototype.filterData = function (dataZoomModel, api) { if (dataZoomModel !== this._dataZoomModel) { return; } var axisDim = this._dimName; var seriesModels = this.getTargetSeriesModels(); var filterMode = dataZoomModel.get('filterMode'); var valueWindow = this._valueWindow; if (filterMode === 'none') { return; } // FIXME // Toolbox may has dataZoom injected. And if there are stacked bar chart // with NaN data, NaN will be filtered and stack will be wrong. // So we need to force the mode to be set empty. // In fect, it is not a big deal that do not support filterMode-'filter' // when using toolbox#dataZoom, utill tooltip#dataZoom support "single axis // selection" some day, which might need "adapt to data extent on the // otherAxis", which is disabled by filterMode-'empty'. // But currently, stack has been fixed to based on value but not index, // so this is not an issue any more. // let otherAxisModel = this.getOtherAxisModel(); // if (dataZoomModel.get('$fromToolbox') // && otherAxisModel // && otherAxisModel.hasSeriesStacked // ) { // filterMode = 'empty'; // } // TODO // filterMode 'weakFilter' and 'empty' is not optimized for huge data yet. AxisProxy_each(seriesModels, function (seriesModel) { var seriesData = seriesModel.getData(); var dataDims = seriesData.mapDimensionsAll(axisDim); if (!dataDims.length) { return; } if (filterMode === 'weakFilter') { var store_1 = seriesData.getStore(); var dataDimIndices_1 = core_util["map"](dataDims, function (dim) { return seriesData.getDimensionIndex(dim); }, seriesData); seriesData.filterSelf(function (dataIndex) { var leftOut; var rightOut; var hasValue; for (var i = 0; i < dataDims.length; i++) { var value = store_1.get(dataDimIndices_1[i], dataIndex); var thisHasValue = !isNaN(value); var thisLeftOut = value < valueWindow[0]; var thisRightOut = value > valueWindow[1]; if (thisHasValue && !thisLeftOut && !thisRightOut) { return true; } thisHasValue && (hasValue = true); thisLeftOut && (leftOut = true); thisRightOut && (rightOut = true); } // If both left out and right out, do not filter. return hasValue && leftOut && rightOut; }); } else { AxisProxy_each(dataDims, function (dim) { if (filterMode === 'empty') { seriesModel.setData(seriesData = seriesData.map(dim, function (value) { return !isInWindow(value) ? NaN : value; })); } else { var range = {}; range[dim] = valueWindow; // console.time('select'); seriesData.selectRange(range); // console.timeEnd('select'); } }); } AxisProxy_each(dataDims, function (dim) { seriesData.setApproximateExtent(valueWindow, dim); }); }); function isInWindow(value) { return value >= valueWindow[0] && value <= valueWindow[1]; } }; AxisProxy.prototype._updateMinMaxSpan = function () { var minMaxSpan = this._minMaxSpan = {}; var dataZoomModel = this._dataZoomModel; var dataExtent = this._dataExtent; AxisProxy_each(['min', 'max'], function (minMax) { var percentSpan = dataZoomModel.get(minMax + 'Span'); var valueSpan = dataZoomModel.get(minMax + 'ValueSpan'); valueSpan != null && (valueSpan = this.getAxisModel().axis.scale.parse(valueSpan)); // minValueSpan and maxValueSpan has higher priority than minSpan and maxSpan if (valueSpan != null) { percentSpan = linearMap(dataExtent[0] + valueSpan, dataExtent, [0, 100], true); } else if (percentSpan != null) { valueSpan = linearMap(percentSpan, [0, 100], dataExtent, true) - dataExtent[0]; } minMaxSpan[minMax + 'Span'] = percentSpan; minMaxSpan[minMax + 'ValueSpan'] = valueSpan; }, this); }; AxisProxy.prototype._setAxisModel = function () { var axisModel = this.getAxisModel(); var percentWindow = this._percentWindow; var valueWindow = this._valueWindow; if (!percentWindow) { return; } // [0, 500]: arbitrary value, guess axis extent. var precision = getPixelPrecision(valueWindow, [0, 500]); precision = Math.min(precision, 20); // For value axis, if min/max/scale are not set, we just use the extent obtained // by series data, which may be a little different from the extent calculated by // `axisHelper.getScaleExtent`. But the different just affects the experience a // little when zooming. So it will not be fixed until some users require it strongly. var rawExtentInfo = axisModel.axis.scale.rawExtentInfo; if (percentWindow[0] !== 0) { rawExtentInfo.setDeterminedMinMax('min', +valueWindow[0].toFixed(precision)); } if (percentWindow[1] !== 100) { rawExtentInfo.setDeterminedMinMax('max', +valueWindow[1].toFixed(precision)); } rawExtentInfo.freeze(); }; return AxisProxy; }(); function calculateDataExtent(axisProxy, axisDim, seriesModels) { var dataExtent = [Infinity, -Infinity]; AxisProxy_each(seriesModels, function (seriesModel) { unionAxisExtentFromData(dataExtent, seriesModel.getData(), axisDim); }); // It is important to get "consistent" extent when more then one axes is // controlled by a `dataZoom`, otherwise those axes will not be synchronized // when zooming. But it is difficult to know what is "consistent", considering // axes have different type or even different meanings (For example, two // time axes are used to compare data of the same date in different years). // So basically dataZoom just obtains extent by series.data (in category axis // extent can be obtained from axis.data). // Nevertheless, user can set min/max/scale on axes to make extent of axes // consistent. var axisModel = axisProxy.getAxisModel(); var rawExtentResult = ensureScaleRawExtentInfo(axisModel.axis.scale, axisModel, dataExtent).calculate(); return [rawExtentResult.min, rawExtentResult.max]; } /* harmony default export */ var dataZoom_AxisProxy = (AxisProxy_AxisProxy); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/dataZoom/dataZoomProcessor.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 dataZoomProcessor = { // `dataZoomProcessor` will only be performed in needed series. Consider if // there is a line series and a pie series, it is better not to update the // line series if only pie series is needed to be updated. getTargetSeries: function (ecModel) { function eachAxisModel(cb) { ecModel.eachComponent('dataZoom', function (dataZoomModel) { dataZoomModel.eachTargetAxis(function (axisDim, axisIndex) { var axisModel = ecModel.getComponent(getAxisMainType(axisDim), axisIndex); cb(axisDim, axisIndex, axisModel, dataZoomModel); }); }); } // FIXME: it brings side-effect to `getTargetSeries`. // Prepare axis proxies. eachAxisModel(function (axisDim, axisIndex, axisModel, dataZoomModel) { // dispose all last axis proxy, in case that some axis are deleted. axisModel.__dzAxisProxy = null; }); var proxyList = []; eachAxisModel(function (axisDim, axisIndex, axisModel, dataZoomModel) { // Different dataZooms may constrol the same axis. In that case, // an axisProxy serves both of them. if (!axisModel.__dzAxisProxy) { // Use the first dataZoomModel as the main model of axisProxy. axisModel.__dzAxisProxy = new dataZoom_AxisProxy(axisDim, axisIndex, dataZoomModel, ecModel); proxyList.push(axisModel.__dzAxisProxy); } }); var seriesModelMap = Object(core_util["createHashMap"])(); Object(core_util["each"])(proxyList, function (axisProxy) { Object(core_util["each"])(axisProxy.getTargetSeriesModels(), function (seriesModel) { seriesModelMap.set(seriesModel.uid, seriesModel); }); }); return seriesModelMap; }, // Consider appendData, where filter should be performed. Because data process is // in block mode currently, it is not need to worry about that the overallProgress // execute every frame. overallReset: function (ecModel, api) { ecModel.eachComponent('dataZoom', function (dataZoomModel) { // We calculate window and reset axis here but not in model // init stage and not after action dispatch handler, because // reset should be called after seriesData.restoreData. dataZoomModel.eachTargetAxis(function (axisDim, axisIndex) { dataZoomModel.getAxisProxy(axisDim, axisIndex).reset(dataZoomModel); }); // Caution: data zoom filtering is order sensitive when using // percent range and no min/max/scale set on axis. // For example, we have dataZoom definition: // [ // {xAxisIndex: 0, start: 30, end: 70}, // {yAxisIndex: 0, start: 20, end: 80} // ] // In this case, [20, 80] of y-dataZoom should be based on data // that have filtered by x-dataZoom using range of [30, 70], // but should not be based on full raw data. Thus sliding // x-dataZoom will change both ranges of xAxis and yAxis, // while sliding y-dataZoom will only change the range of yAxis. // So we should filter x-axis after reset x-axis immediately, // and then reset y-axis and filter y-axis. dataZoomModel.eachTargetAxis(function (axisDim, axisIndex) { dataZoomModel.getAxisProxy(axisDim, axisIndex).filterData(dataZoomModel, api); }); }); ecModel.eachComponent('dataZoom', function (dataZoomModel) { // Fullfill all of the range props so that user // is able to get them from chart.getOption(). var axisProxy = dataZoomModel.findRepresentativeAxisProxy(); if (axisProxy) { var percentRange = axisProxy.getDataPercentWindow(); var valueRange = axisProxy.getDataValueWindow(); dataZoomModel.setCalculatedRange({ start: percentRange[0], end: percentRange[1], startValue: valueRange[0], endValue: valueRange[1] }); } }); } }; /* harmony default export */ var dataZoom_dataZoomProcessor = (dataZoomProcessor); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/dataZoom/dataZoomAction.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 installDataZoomAction(registers) { registers.registerAction('dataZoom', function (payload, ecModel) { var effectedModels = findEffectedDataZooms(ecModel, payload); Object(core_util["each"])(effectedModels, function (dataZoomModel) { dataZoomModel.setRawRange({ start: payload.start, end: payload.end, startValue: payload.startValue, endValue: payload.endValue }); }); }); } // CONCATENATED MODULE: ./node_modules/echarts/lib/component/dataZoom/installCommon.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 installed = false; function installCommon(registers) { if (installed) { return; } installed = true; registers.registerProcessor(registers.PRIORITY.PROCESSOR.FILTER, dataZoom_dataZoomProcessor); installDataZoomAction(registers); registers.registerSubTypeDefaulter('dataZoom', function () { // Default 'slider' when no type specified. return 'slider'; }); } // CONCATENATED MODULE: ./node_modules/echarts/lib/component/dataZoom/installDataZoomSelect.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 installDataZoomSelect_install(registers) { registers.registerComponentModel(SelectZoomModel); registers.registerComponentView(SelectZoomView); installCommon(registers); } // CONCATENATED MODULE: ./node_modules/echarts/lib/component/toolbox/featureManager.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ var ToolboxFeature = /** @class */function () { function ToolboxFeature() {} return ToolboxFeature; }(); var featureManager_features = {}; function registerFeature(name, ctor) { featureManager_features[name] = ctor; } function getFeature(name) { return featureManager_features[name]; } // CONCATENATED MODULE: ./node_modules/echarts/lib/component/toolbox/ToolboxModel.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 ToolboxModel_ToolboxModel = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(ToolboxModel, _super); function ToolboxModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = ToolboxModel.type; return _this; } ToolboxModel.prototype.optionUpdated = function () { _super.prototype.optionUpdated.apply(this, arguments); var ecModel = this.ecModel; core_util["each"](this.option.feature, function (featureOpt, featureName) { var Feature = getFeature(featureName); if (Feature) { if (Feature.getDefaultOption) { Feature.defaultOption = Feature.getDefaultOption(ecModel); } core_util["merge"](featureOpt, Feature.defaultOption); } }); }; ToolboxModel.type = 'toolbox'; ToolboxModel.layoutMode = { type: 'box', ignoreSize: true }; ToolboxModel.defaultOption = { show: true, z: 6, // zlevel: 0, orient: 'horizontal', left: 'right', top: 'top', // right // bottom backgroundColor: 'transparent', borderColor: '#ccc', borderRadius: 0, borderWidth: 0, padding: 5, itemSize: 15, itemGap: 8, showTitle: true, iconStyle: { borderColor: '#666', color: 'none' }, emphasis: { iconStyle: { borderColor: '#3E98C5' } }, // textStyle: {}, // feature tooltip: { show: false, position: 'bottom' } }; return ToolboxModel; }(Component); /* harmony default export */ var toolbox_ToolboxModel = (ToolboxModel_ToolboxModel); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/helper/listComponent.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ // @ts-nocheck /** * Layout list like component. * It will box layout each items in group of component and then position the whole group in the viewport * @param {module:zrender/group/Group} group * @param {module:echarts/model/Component} componentModel * @param {module:echarts/ExtensionAPI} */ function listComponent_layout(group, componentModel, api) { var boxLayoutParams = componentModel.getBoxLayoutParams(); var padding = componentModel.get('padding'); var viewportSize = { width: api.getWidth(), height: api.getHeight() }; var rect = getLayoutRect(boxLayoutParams, viewportSize, padding); layout_box(componentModel.get('orient'), group, componentModel.get('itemGap'), rect.width, rect.height); positionElement(group, boxLayoutParams, viewportSize, padding); } function makeBackground(rect, componentModel) { var padding = normalizeCssArray(componentModel.get('padding')); var style = componentModel.getItemStyle(['color', 'opacity']); style.fill = componentModel.get('backgroundColor'); rect = new shape_Rect({ shape: { x: rect.x - padding[3], y: rect.y - padding[0], width: rect.width + padding[1] + padding[3], height: rect.height + padding[0] + padding[2], r: componentModel.get('borderRadius') }, style: style, silent: true, z2: -1 }); // FIXME // `subPixelOptimizeRect` may bring some gap between edge of viewpart // and background rect when setting like `left: 0`, `top: 0`. // graphic.subPixelOptimizeRect(rect); return rect; } // CONCATENATED MODULE: ./node_modules/echarts/lib/component/toolbox/ToolboxView.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 ToolboxView_ToolboxView = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(ToolboxView, _super); function ToolboxView() { return _super !== null && _super.apply(this, arguments) || this; } ToolboxView.prototype.render = function (toolboxModel, ecModel, api, payload) { var group = this.group; group.removeAll(); if (!toolboxModel.get('show')) { return; } var itemSize = +toolboxModel.get('itemSize'); var isVertical = toolboxModel.get('orient') === 'vertical'; var featureOpts = toolboxModel.get('feature') || {}; var features = this._features || (this._features = {}); var featureNames = []; core_util["each"](featureOpts, function (opt, name) { featureNames.push(name); }); new data_DataDiffer(this._featureNames || [], featureNames).add(processFeature).update(processFeature).remove(core_util["curry"](processFeature, null)).execute(); // Keep for diff. this._featureNames = featureNames; function processFeature(newIndex, oldIndex) { var featureName = featureNames[newIndex]; var oldName = featureNames[oldIndex]; var featureOpt = featureOpts[featureName]; var featureModel = new model_Model(featureOpt, toolboxModel, toolboxModel.ecModel); var feature; // FIX#11236, merge feature title from MagicType newOption. TODO: consider seriesIndex ? if (payload && payload.newTitle != null && payload.featureName === featureName) { featureOpt.title = payload.newTitle; } if (featureName && !oldName) { // Create if (isUserFeatureName(featureName)) { feature = { onclick: featureModel.option.onclick, featureName: featureName }; } else { var Feature = getFeature(featureName); if (!Feature) { return; } feature = new Feature(); } features[featureName] = feature; } else { feature = features[oldName]; // If feature does not exist. if (!feature) { return; } } feature.uid = getUID('toolbox-feature'); feature.model = featureModel; feature.ecModel = ecModel; feature.api = api; var isToolboxFeature = feature instanceof ToolboxFeature; if (!featureName && oldName) { isToolboxFeature && feature.dispose && feature.dispose(ecModel, api); return; } if (!featureModel.get('show') || isToolboxFeature && feature.unusable) { isToolboxFeature && feature.remove && feature.remove(ecModel, api); return; } createIconPaths(featureModel, feature, featureName); featureModel.setIconStatus = function (iconName, status) { var option = this.option; var iconPaths = this.iconPaths; option.iconStatus = option.iconStatus || {}; option.iconStatus[iconName] = status; if (iconPaths[iconName]) { (status === 'emphasis' ? enterEmphasis : leaveEmphasis)(iconPaths[iconName]); } }; if (feature instanceof ToolboxFeature) { if (feature.render) { feature.render(featureModel, ecModel, api, payload); } } } function createIconPaths(featureModel, feature, featureName) { var iconStyleModel = featureModel.getModel('iconStyle'); var iconStyleEmphasisModel = featureModel.getModel(['emphasis', 'iconStyle']); // If one feature has multiple icons, they are organized as // { // icon: { // foo: '', // bar: '' // }, // title: { // foo: '', // bar: '' // } // } var icons = feature instanceof ToolboxFeature && feature.getIcons ? feature.getIcons() : featureModel.get('icon'); var titles = featureModel.get('title') || {}; var iconsMap; var titlesMap; if (core_util["isString"](icons)) { iconsMap = {}; iconsMap[featureName] = icons; } else { iconsMap = icons; } if (core_util["isString"](titles)) { titlesMap = {}; titlesMap[featureName] = titles; } else { titlesMap = titles; } var iconPaths = featureModel.iconPaths = {}; core_util["each"](iconsMap, function (iconStr, iconName) { var path = createIcon(iconStr, {}, { x: -itemSize / 2, y: -itemSize / 2, width: itemSize, height: itemSize }); // TODO handling image path.setStyle(iconStyleModel.getItemStyle()); var pathEmphasisState = path.ensureState('emphasis'); pathEmphasisState.style = iconStyleEmphasisModel.getItemStyle(); // Text position calculation // TODO: extract `textStyle` from `iconStyle` and use `createTextStyle` var textContent = new Text({ style: { text: titlesMap[iconName], align: iconStyleEmphasisModel.get('textAlign'), borderRadius: iconStyleEmphasisModel.get('textBorderRadius'), padding: iconStyleEmphasisModel.get('textPadding'), fill: null, font: getFont({ fontStyle: iconStyleEmphasisModel.get('textFontStyle'), fontFamily: iconStyleEmphasisModel.get('textFontFamily'), fontSize: iconStyleEmphasisModel.get('textFontSize'), fontWeight: iconStyleEmphasisModel.get('textFontWeight') }, ecModel) }, ignore: true }); path.setTextContent(textContent); setTooltipConfig({ el: path, componentModel: toolboxModel, itemName: iconName, formatterParamsExtra: { title: titlesMap[iconName] } }); path.__title = titlesMap[iconName]; path.on('mouseover', function () { // Should not reuse above hoverStyle, which might be modified. var hoverStyle = iconStyleEmphasisModel.getItemStyle(); var defaultTextPosition = isVertical ? toolboxModel.get('right') == null && toolboxModel.get('left') !== 'right' ? 'right' : 'left' : toolboxModel.get('bottom') == null && toolboxModel.get('top') !== 'bottom' ? 'bottom' : 'top'; textContent.setStyle({ fill: iconStyleEmphasisModel.get('textFill') || hoverStyle.fill || hoverStyle.stroke || '#000', backgroundColor: iconStyleEmphasisModel.get('textBackgroundColor') }); path.setTextConfig({ position: iconStyleEmphasisModel.get('textPosition') || defaultTextPosition }); textContent.ignore = !toolboxModel.get('showTitle'); // Use enterEmphasis and leaveEmphasis provide by ec. // There are flags managed by the echarts. api.enterEmphasis(this); }).on('mouseout', function () { if (featureModel.get(['iconStatus', iconName]) !== 'emphasis') { api.leaveEmphasis(this); } textContent.hide(); }); (featureModel.get(['iconStatus', iconName]) === 'emphasis' ? enterEmphasis : leaveEmphasis)(path); group.add(path); path.on('click', core_util["bind"](feature.onclick, feature, ecModel, api, iconName)); iconPaths[iconName] = path; }); } listComponent_layout(group, toolboxModel, api); // Render background after group is layout // FIXME group.add(makeBackground(group.getBoundingRect(), toolboxModel)); // Adjust icon title positions to avoid them out of screen isVertical || group.eachChild(function (icon) { var titleText = icon.__title; // const hoverStyle = icon.hoverStyle; // TODO simplify code? var emphasisState = icon.ensureState('emphasis'); var emphasisTextConfig = emphasisState.textConfig || (emphasisState.textConfig = {}); var textContent = icon.getTextContent(); var emphasisTextState = textContent && textContent.ensureState('emphasis'); // May be background element if (emphasisTextState && !core_util["isFunction"](emphasisTextState) && titleText) { var emphasisTextStyle = emphasisTextState.style || (emphasisTextState.style = {}); var rect = getBoundingRect(titleText, Text.makeFont(emphasisTextStyle)); var offsetX = icon.x + group.x; var offsetY = icon.y + group.y + itemSize; var needPutOnTop = false; if (offsetY + rect.height > api.getHeight()) { emphasisTextConfig.position = 'top'; needPutOnTop = true; } var topOffset = needPutOnTop ? -5 - rect.height : itemSize + 10; if (offsetX + rect.width / 2 > api.getWidth()) { emphasisTextConfig.position = ['100%', topOffset]; emphasisTextStyle.align = 'right'; } else if (offsetX - rect.width / 2 < 0) { emphasisTextConfig.position = [0, topOffset]; emphasisTextStyle.align = 'left'; } } }); }; ToolboxView.prototype.updateView = function (toolboxModel, ecModel, api, payload) { core_util["each"](this._features, function (feature) { feature instanceof ToolboxFeature && feature.updateView && feature.updateView(feature.model, ecModel, api, payload); }); }; // updateLayout(toolboxModel, ecModel, api, payload) { // zrUtil.each(this._features, function (feature) { // feature.updateLayout && feature.updateLayout(feature.model, ecModel, api, payload); // }); // }, ToolboxView.prototype.remove = function (ecModel, api) { core_util["each"](this._features, function (feature) { feature instanceof ToolboxFeature && feature.remove && feature.remove(ecModel, api); }); this.group.removeAll(); }; ToolboxView.prototype.dispose = function (ecModel, api) { core_util["each"](this._features, function (feature) { feature instanceof ToolboxFeature && feature.dispose && feature.dispose(ecModel, api); }); }; ToolboxView.type = 'toolbox'; return ToolboxView; }(view_Component); function isUserFeatureName(featureName) { return featureName.indexOf('my') === 0; } /* harmony default export */ var toolbox_ToolboxView = (ToolboxView_ToolboxView); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/toolbox/feature/SaveAsImage.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 window, Uint8Array, document */ var SaveAsImage_SaveAsImage = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(SaveAsImage, _super); function SaveAsImage() { return _super !== null && _super.apply(this, arguments) || this; } SaveAsImage.prototype.onclick = function (ecModel, api) { var model = this.model; var title = model.get('name') || ecModel.get('title.0.text') || 'echarts'; var isSvg = api.getZr().painter.getType() === 'svg'; var type = isSvg ? 'svg' : model.get('type', true) || 'png'; var url = api.getConnectedDataURL({ type: type, backgroundColor: model.get('backgroundColor', true) || ecModel.get('backgroundColor') || '#fff', connectedBackgroundColor: model.get('connectedBackgroundColor'), excludeComponents: model.get('excludeComponents'), pixelRatio: model.get('pixelRatio') }); var browser = core_env["a" /* default */].browser; // Chrome, Firefox, New Edge if (typeof MouseEvent === 'function' && (browser.newEdge || !browser.ie && !browser.edge)) { var $a = document.createElement('a'); $a.download = title + '.' + type; $a.target = '_blank'; $a.href = url; var evt = new MouseEvent('click', { // some micro front-end framework, window maybe is a Proxy view: document.defaultView, bubbles: true, cancelable: false }); $a.dispatchEvent(evt); } // IE or old Edge else { // @ts-ignore if (window.navigator.msSaveOrOpenBlob || isSvg) { var parts = url.split(','); // data:[][;charset=][;base64], var base64Encoded = parts[0].indexOf('base64') > -1; var bstr = isSvg // should decode the svg data uri first ? decodeURIComponent(parts[1]) : parts[1]; // only `atob` when the data uri is encoded with base64 // otherwise, like `svg` data uri exported by zrender, // there will be an error, for it's not encoded with base64. // (just a url-encoded string through `encodeURIComponent`) base64Encoded && (bstr = window.atob(bstr)); var filename = title + '.' + type; // @ts-ignore if (window.navigator.msSaveOrOpenBlob) { var n = bstr.length; var u8arr = new Uint8Array(n); while (n--) { u8arr[n] = bstr.charCodeAt(n); } var blob = new Blob([u8arr]); // @ts-ignore window.navigator.msSaveOrOpenBlob(blob, filename); } else { var frame = document.createElement('iframe'); document.body.appendChild(frame); var cw = frame.contentWindow; var doc = cw.document; doc.open('image/svg+xml', 'replace'); doc.write(bstr); doc.close(); cw.focus(); doc.execCommand('SaveAs', true, filename); document.body.removeChild(frame); } } else { var lang = model.get('lang'); var html = '' + '' + '' + ''; var tab = window.open(); tab.document.write(html); tab.document.title = title; } } }; SaveAsImage.getDefaultOption = function (ecModel) { var defaultOption = { show: true, icon: 'M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0', title: ecModel.getLocaleModel().get(['toolbox', 'saveAsImage', 'title']), type: 'png', // Default use option.backgroundColor // backgroundColor: '#fff', connectedBackgroundColor: '#fff', name: '', excludeComponents: ['toolbox'], // use current pixel ratio of device by default // pixelRatio: 1, lang: ecModel.getLocaleModel().get(['toolbox', 'saveAsImage', 'lang']) }; return defaultOption; }; return SaveAsImage; }(ToolboxFeature); /* harmony default export */ var feature_SaveAsImage = (SaveAsImage_SaveAsImage); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/toolbox/feature/MagicType.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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_STACK_KEYWORD = '__ec_magicType_stack__'; var ICON_TYPES = ['line', 'bar', 'stack']; // stack and tiled appears in pair for the title var TITLE_TYPES = ['line', 'bar', 'stack', 'tiled']; var radioTypes = [['line', 'bar'], ['stack']]; var MagicType_MagicType = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(MagicType, _super); function MagicType() { return _super !== null && _super.apply(this, arguments) || this; } MagicType.prototype.getIcons = function () { var model = this.model; var availableIcons = model.get('icon'); var icons = {}; core_util["each"](model.get('type'), function (type) { if (availableIcons[type]) { icons[type] = availableIcons[type]; } }); return icons; }; MagicType.getDefaultOption = function (ecModel) { var defaultOption = { show: true, type: [], // Icon group icon: { line: 'M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4', bar: 'M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7', // eslint-disable-next-line stack: 'M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z' // jshint ignore:line }, // `line`, `bar`, `stack`, `tiled` title: ecModel.getLocaleModel().get(['toolbox', 'magicType', 'title']), option: {}, seriesIndex: {} }; return defaultOption; }; MagicType.prototype.onclick = function (ecModel, api, type) { var model = this.model; var seriesIndex = model.get(['seriesIndex', type]); // Not supported magicType if (!seriesOptGenreator[type]) { return; } var newOption = { series: [] }; var generateNewSeriesTypes = function (seriesModel) { var seriesType = seriesModel.subType; var seriesId = seriesModel.id; var newSeriesOpt = seriesOptGenreator[type](seriesType, seriesId, seriesModel, model); if (newSeriesOpt) { // PENDING If merge original option? core_util["defaults"](newSeriesOpt, seriesModel.option); newOption.series.push(newSeriesOpt); } // Modify boundaryGap var coordSys = seriesModel.coordinateSystem; if (coordSys && coordSys.type === 'cartesian2d' && (type === 'line' || type === 'bar')) { var categoryAxis = coordSys.getAxesByScale('ordinal')[0]; if (categoryAxis) { var axisDim = categoryAxis.dim; var axisType = axisDim + 'Axis'; var axisModel = seriesModel.getReferringComponents(axisType, SINGLE_REFERRING).models[0]; var axisIndex = axisModel.componentIndex; newOption[axisType] = newOption[axisType] || []; for (var i = 0; i <= axisIndex; i++) { newOption[axisType][axisIndex] = newOption[axisType][axisIndex] || {}; } newOption[axisType][axisIndex].boundaryGap = type === 'bar'; } } }; core_util["each"](radioTypes, function (radio) { if (core_util["indexOf"](radio, type) >= 0) { core_util["each"](radio, function (item) { model.setIconStatus(item, 'normal'); }); } }); model.setIconStatus(type, 'emphasis'); ecModel.eachComponent({ mainType: 'series', query: seriesIndex == null ? null : { seriesIndex: seriesIndex } }, generateNewSeriesTypes); var newTitle; var currentType = type; // Change title of stack if (type === 'stack') { // use titles in model instead of ecModel // as stack and tiled appears in pair, just flip them // no need of checking stack state newTitle = core_util["merge"]({ stack: model.option.title.tiled, tiled: model.option.title.stack }, model.option.title); if (model.get(['iconStatus', type]) !== 'emphasis') { currentType = 'tiled'; } } api.dispatchAction({ type: 'changeMagicType', currentType: currentType, newOption: newOption, newTitle: newTitle, featureName: 'magicType' }); }; return MagicType; }(ToolboxFeature); var seriesOptGenreator = { 'line': function (seriesType, seriesId, seriesModel, model) { if (seriesType === 'bar') { return core_util["merge"]({ id: seriesId, type: 'line', // Preserve data related option data: seriesModel.get('data'), stack: seriesModel.get('stack'), markPoint: seriesModel.get('markPoint'), markLine: seriesModel.get('markLine') }, model.get(['option', 'line']) || {}, true); } }, 'bar': function (seriesType, seriesId, seriesModel, model) { if (seriesType === 'line') { return core_util["merge"]({ id: seriesId, type: 'bar', // Preserve data related option data: seriesModel.get('data'), stack: seriesModel.get('stack'), markPoint: seriesModel.get('markPoint'), markLine: seriesModel.get('markLine') }, model.get(['option', 'bar']) || {}, true); } }, 'stack': function (seriesType, seriesId, seriesModel, model) { var isStack = seriesModel.get('stack') === INNER_STACK_KEYWORD; if (seriesType === 'line' || seriesType === 'bar') { model.setIconStatus('stack', isStack ? 'normal' : 'emphasis'); return core_util["merge"]({ id: seriesId, stack: isStack ? '' : INNER_STACK_KEYWORD }, model.get(['option', 'stack']) || {}, true); } } }; // TODO: SELF REGISTERED. registerAction({ type: 'changeMagicType', event: 'magicTypeChanged', update: 'prepareAndUpdate' }, function (payload, ecModel) { ecModel.mergeOption(payload.newOption); }); /* harmony default export */ var feature_MagicType = (MagicType_MagicType); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/toolbox/feature/DataView.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 document */ /* global document */ var BLOCK_SPLITER = new Array(60).join('-'); var ITEM_SPLITER = '\t'; /** * Group series into two types * 1. on category axis, like line, bar * 2. others, like scatter, pie */ function groupSeries(ecModel) { var seriesGroupByCategoryAxis = {}; var otherSeries = []; var meta = []; ecModel.eachRawSeries(function (seriesModel) { var coordSys = seriesModel.coordinateSystem; if (coordSys && (coordSys.type === 'cartesian2d' || coordSys.type === 'polar')) { // TODO: TYPE Consider polar? Include polar may increase unecessary bundle size. var baseAxis = coordSys.getBaseAxis(); if (baseAxis.type === 'category') { var key = baseAxis.dim + '_' + baseAxis.index; if (!seriesGroupByCategoryAxis[key]) { seriesGroupByCategoryAxis[key] = { categoryAxis: baseAxis, valueAxis: coordSys.getOtherAxis(baseAxis), series: [] }; meta.push({ axisDim: baseAxis.dim, axisIndex: baseAxis.index }); } seriesGroupByCategoryAxis[key].series.push(seriesModel); } else { otherSeries.push(seriesModel); } } else { otherSeries.push(seriesModel); } }); return { seriesGroupByCategoryAxis: seriesGroupByCategoryAxis, other: otherSeries, meta: meta }; } /** * Assemble content of series on cateogory axis * @inner */ function assembleSeriesWithCategoryAxis(groups) { var tables = []; core_util["each"](groups, function (group, key) { var categoryAxis = group.categoryAxis; var valueAxis = group.valueAxis; var valueAxisDim = valueAxis.dim; var headers = [' '].concat(core_util["map"](group.series, function (series) { return series.name; })); // @ts-ignore TODO Polar var columns = [categoryAxis.model.getCategories()]; core_util["each"](group.series, function (series) { var rawData = series.getRawData(); columns.push(series.getRawData().mapArray(rawData.mapDimension(valueAxisDim), function (val) { return val; })); }); // Assemble table content var lines = [headers.join(ITEM_SPLITER)]; for (var i = 0; i < columns[0].length; i++) { var items = []; for (var j = 0; j < columns.length; j++) { items.push(columns[j][i]); } lines.push(items.join(ITEM_SPLITER)); } tables.push(lines.join('\n')); }); return tables.join('\n\n' + BLOCK_SPLITER + '\n\n'); } /** * Assemble content of other series */ function assembleOtherSeries(series) { return core_util["map"](series, function (series) { var data = series.getRawData(); var lines = [series.name]; var vals = []; data.each(data.dimensions, function () { var argLen = arguments.length; var dataIndex = arguments[argLen - 1]; var name = data.getName(dataIndex); for (var i = 0; i < argLen - 1; i++) { vals[i] = arguments[i]; } lines.push((name ? name + ITEM_SPLITER : '') + vals.join(ITEM_SPLITER)); }); return lines.join('\n'); }).join('\n\n' + BLOCK_SPLITER + '\n\n'); } function getContentFromModel(ecModel) { var result = groupSeries(ecModel); return { value: core_util["filter"]([assembleSeriesWithCategoryAxis(result.seriesGroupByCategoryAxis), assembleOtherSeries(result.other)], function (str) { return !!str.replace(/[\n\t\s]/g, ''); }).join('\n\n' + BLOCK_SPLITER + '\n\n'), meta: result.meta }; } function trim(str) { return str.replace(/^\s\s*/, '').replace(/\s\s*$/, ''); } /** * If a block is tsv format */ function isTSVFormat(block) { // Simple method to find out if a block is tsv format var firstLine = block.slice(0, block.indexOf('\n')); if (firstLine.indexOf(ITEM_SPLITER) >= 0) { return true; } } var itemSplitRegex = new RegExp('[' + ITEM_SPLITER + ']+', 'g'); /** * @param {string} tsv * @return {Object} */ function parseTSVContents(tsv) { var tsvLines = tsv.split(/\n+/g); var headers = trim(tsvLines.shift()).split(itemSplitRegex); var categories = []; var series = core_util["map"](headers, function (header) { return { name: header, data: [] }; }); for (var i = 0; i < tsvLines.length; i++) { var items = trim(tsvLines[i]).split(itemSplitRegex); categories.push(items.shift()); for (var j = 0; j < items.length; j++) { series[j] && (series[j].data[i] = items[j]); } } return { series: series, categories: categories }; } function parseListContents(str) { var lines = str.split(/\n+/g); var seriesName = trim(lines.shift()); var data = []; for (var i = 0; i < lines.length; i++) { // if line is empty, ignore it. // there is a case that a user forgot to delete `\n`. var line = trim(lines[i]); if (!line) { continue; } var items = line.split(itemSplitRegex); var name_1 = ''; var value = void 0; var hasName = false; if (isNaN(items[0])) { // First item is name hasName = true; name_1 = items[0]; items = items.slice(1); data[i] = { name: name_1, value: [] }; value = data[i].value; } else { value = data[i] = []; } for (var j = 0; j < items.length; j++) { value.push(+items[j]); } if (value.length === 1) { hasName ? data[i].value = value[0] : data[i] = value[0]; } } return { name: seriesName, data: data }; } function parseContents(str, blockMetaList) { var blocks = str.split(new RegExp('\n*' + BLOCK_SPLITER + '\n*', 'g')); var newOption = { series: [] }; core_util["each"](blocks, function (block, idx) { if (isTSVFormat(block)) { var result = parseTSVContents(block); var blockMeta = blockMetaList[idx]; var axisKey = blockMeta.axisDim + 'Axis'; if (blockMeta) { newOption[axisKey] = newOption[axisKey] || []; newOption[axisKey][blockMeta.axisIndex] = { data: result.categories }; newOption.series = newOption.series.concat(result.series); } } else { var result = parseListContents(block); newOption.series.push(result); } }); return newOption; } var DataView_DataView = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(DataView, _super); function DataView() { return _super !== null && _super.apply(this, arguments) || this; } DataView.prototype.onclick = function (ecModel, api) { // FIXME: better way? setTimeout(function () { api.dispatchAction({ type: 'hideTip' }); }); var container = api.getDom(); var model = this.model; if (this._dom) { container.removeChild(this._dom); } var root = document.createElement('div'); // use padding to avoid 5px whitespace root.style.cssText = 'position:absolute;top:0;bottom:0;left:0;right:0;padding:5px'; root.style.backgroundColor = model.get('backgroundColor') || '#fff'; // Create elements var header = document.createElement('h4'); var lang = model.get('lang') || []; header.innerHTML = lang[0] || model.get('title'); header.style.cssText = 'margin:10px 20px'; header.style.color = model.get('textColor'); var viewMain = document.createElement('div'); var textarea = document.createElement('textarea'); viewMain.style.cssText = 'overflow:auto'; var optionToContent = model.get('optionToContent'); var contentToOption = model.get('contentToOption'); var result = getContentFromModel(ecModel); if (core_util["isFunction"](optionToContent)) { var htmlOrDom = optionToContent(api.getOption()); if (core_util["isString"](htmlOrDom)) { viewMain.innerHTML = htmlOrDom; } else if (core_util["isDom"](htmlOrDom)) { viewMain.appendChild(htmlOrDom); } } else { // Use default textarea textarea.readOnly = model.get('readOnly'); var style = textarea.style; // eslint-disable-next-line max-len style.cssText = 'display:block;width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;resize:none;box-sizing:border-box;outline:none'; style.color = model.get('textColor'); style.borderColor = model.get('textareaBorderColor'); style.backgroundColor = model.get('textareaColor'); textarea.value = result.value; viewMain.appendChild(textarea); } var blockMetaList = result.meta; var buttonContainer = document.createElement('div'); buttonContainer.style.cssText = 'position:absolute;bottom:5px;left:0;right:0'; // eslint-disable-next-line max-len var buttonStyle = 'float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px'; var closeButton = document.createElement('div'); var refreshButton = document.createElement('div'); buttonStyle += ';background-color:' + model.get('buttonColor'); buttonStyle += ';color:' + model.get('buttonTextColor'); var self = this; function close() { container.removeChild(root); self._dom = null; } addEventListener(closeButton, 'click', close); addEventListener(refreshButton, 'click', function () { if (contentToOption == null && optionToContent != null || contentToOption != null && optionToContent == null) { if (false) { // eslint-disable-next-line warn('It seems you have just provided one of `contentToOption` and `optionToContent` functions but missed the other one. Data change is ignored.'); } close(); return; } var newOption; try { if (core_util["isFunction"](contentToOption)) { newOption = contentToOption(viewMain, api.getOption()); } else { newOption = parseContents(textarea.value, blockMetaList); } } catch (e) { close(); throw new Error('Data view format error ' + e); } if (newOption) { api.dispatchAction({ type: 'changeDataView', newOption: newOption }); } close(); }); closeButton.innerHTML = lang[1]; refreshButton.innerHTML = lang[2]; refreshButton.style.cssText = closeButton.style.cssText = buttonStyle; !model.get('readOnly') && buttonContainer.appendChild(refreshButton); buttonContainer.appendChild(closeButton); root.appendChild(header); root.appendChild(viewMain); root.appendChild(buttonContainer); viewMain.style.height = container.clientHeight - 80 + 'px'; container.appendChild(root); this._dom = root; }; DataView.prototype.remove = function (ecModel, api) { this._dom && api.getDom().removeChild(this._dom); }; DataView.prototype.dispose = function (ecModel, api) { this.remove(ecModel, api); }; DataView.getDefaultOption = function (ecModel) { var defaultOption = { show: true, readOnly: false, optionToContent: null, contentToOption: null, // eslint-disable-next-line icon: 'M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28', title: ecModel.getLocaleModel().get(['toolbox', 'dataView', 'title']), lang: ecModel.getLocaleModel().get(['toolbox', 'dataView', 'lang']), backgroundColor: '#fff', textColor: '#000', textareaColor: '#fff', textareaBorderColor: '#333', buttonColor: '#c23531', buttonTextColor: '#fff' }; return defaultOption; }; return DataView; }(ToolboxFeature); /** * @inner */ function tryMergeDataOption(newData, originalData) { return core_util["map"](newData, function (newVal, idx) { var original = originalData && originalData[idx]; if (core_util["isObject"](original) && !core_util["isArray"](original)) { var newValIsObject = core_util["isObject"](newVal) && !core_util["isArray"](newVal); if (!newValIsObject) { newVal = { value: newVal }; } // original data has name but new data has no name var shouldDeleteName = original.name != null && newVal.name == null; // Original data has option newVal = core_util["defaults"](newVal, original); shouldDeleteName && delete newVal.name; return newVal; } else { return newVal; } }); } // TODO: SELF REGISTERED. registerAction({ type: 'changeDataView', event: 'dataViewChanged', update: 'prepareAndUpdate' }, function (payload, ecModel) { var newSeriesOptList = []; core_util["each"](payload.newOption.series, function (seriesOpt) { var seriesModel = ecModel.getSeriesByName(seriesOpt.name)[0]; if (!seriesModel) { // New created series // Geuss the series type newSeriesOptList.push(core_util["extend"]({ // Default is scatter type: 'scatter' }, seriesOpt)); } else { var originalData = seriesModel.get('data'); newSeriesOptList.push({ name: seriesOpt.name, data: tryMergeDataOption(seriesOpt.data, originalData) }); } }); ecModel.mergeOption(core_util["defaults"]({ series: newSeriesOptList }, payload.newOption)); }); /* harmony default export */ var feature_DataView = (DataView_DataView); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/dataZoom/history.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 history_each = core_util["each"]; var history_inner = makeInner(); /** * @param ecModel * @param newSnapshot key is dataZoomId */ function push(ecModel, newSnapshot) { var storedSnapshots = getStoreSnapshots(ecModel); // If previous dataZoom can not be found, // complete an range with current range. history_each(newSnapshot, function (batchItem, dataZoomId) { var i = storedSnapshots.length - 1; for (; i >= 0; i--) { var snapshot = storedSnapshots[i]; if (snapshot[dataZoomId]) { break; } } if (i < 0) { // No origin range set, create one by current range. var dataZoomModel = ecModel.queryComponents({ mainType: 'dataZoom', subType: 'select', id: dataZoomId })[0]; if (dataZoomModel) { var percentRange = dataZoomModel.getPercentRange(); storedSnapshots[0][dataZoomId] = { dataZoomId: dataZoomId, start: percentRange[0], end: percentRange[1] }; } } }); storedSnapshots.push(newSnapshot); } function pop(ecModel) { var storedSnapshots = getStoreSnapshots(ecModel); var head = storedSnapshots[storedSnapshots.length - 1]; storedSnapshots.length > 1 && storedSnapshots.pop(); // Find top for all dataZoom. var snapshot = {}; history_each(head, function (batchItem, dataZoomId) { for (var i = storedSnapshots.length - 1; i >= 0; i--) { batchItem = storedSnapshots[i][dataZoomId]; if (batchItem) { snapshot[dataZoomId] = batchItem; break; } } }); return snapshot; } function history_clear(ecModel) { history_inner(ecModel).snapshots = null; } function history_count(ecModel) { return getStoreSnapshots(ecModel).length; } /** * History length of each dataZoom may be different. * this._history[0] is used to store origin range. */ function getStoreSnapshots(ecModel) { var store = history_inner(ecModel); if (!store.snapshots) { store.snapshots = [{}]; } return store.snapshots; } // CONCATENATED MODULE: ./node_modules/echarts/lib/component/toolbox/feature/Restore.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 Restore_RestoreOption = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(RestoreOption, _super); function RestoreOption() { return _super !== null && _super.apply(this, arguments) || this; } RestoreOption.prototype.onclick = function (ecModel, api) { history_clear(ecModel); api.dispatchAction({ type: 'restore', from: this.uid }); }; RestoreOption.getDefaultOption = function (ecModel) { var defaultOption = { show: true, // eslint-disable-next-line icon: 'M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5', title: ecModel.getLocaleModel().get(['toolbox', 'restore', 'title']) }; return defaultOption; }; return RestoreOption; }(ToolboxFeature); // TODO: SELF REGISTERED. registerAction({ type: 'restore', event: 'restore', update: 'prepareAndUpdate' }, function (payload, ecModel) { ecModel.resetOption('recreate'); }); /* harmony default export */ var Restore = (Restore_RestoreOption); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/helper/BrushTargetManager.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ // FIXME // how to genarialize to more coordinate systems. var INCLUDE_FINDER_MAIN_TYPES = ['grid', 'xAxis', 'yAxis', 'geo', 'graph', 'polar', 'radiusAxis', 'angleAxis', 'bmap']; var BrushTargetManager_BrushTargetManager = /** @class */function () { /** * @param finder contains Index/Id/Name of xAxis/yAxis/geo/grid * Each can be {number|Array.}. like: {xAxisIndex: [3, 4]} * @param opt.include include coordinate system types. */ function BrushTargetManager(finder, ecModel, opt) { var _this = this; this._targetInfoList = []; var foundCpts = BrushTargetManager_parseFinder(ecModel, finder); Object(core_util["each"])(targetInfoBuilders, function (builder, type) { if (!opt || !opt.include || Object(core_util["indexOf"])(opt.include, type) >= 0) { builder(foundCpts, _this._targetInfoList); } }); } BrushTargetManager.prototype.setOutputRanges = function (areas, ecModel) { this.matchOutputRanges(areas, ecModel, function (area, coordRange, coordSys) { (area.coordRanges || (area.coordRanges = [])).push(coordRange); // area.coordRange is the first of area.coordRanges if (!area.coordRange) { area.coordRange = coordRange; // In 'category' axis, coord to pixel is not reversible, so we can not // rebuild range by coordRange accrately, which may bring trouble when // brushing only one item. So we use __rangeOffset to rebuilding range // by coordRange. And this it only used in brush component so it is no // need to be adapted to coordRanges. var result = coordConvert[area.brushType](0, coordSys, coordRange); area.__rangeOffset = { offset: diffProcessor[area.brushType](result.values, area.range, [1, 1]), xyMinMax: result.xyMinMax }; } }); return areas; }; BrushTargetManager.prototype.matchOutputRanges = function (areas, ecModel, cb) { Object(core_util["each"])(areas, function (area) { var targetInfo = this.findTargetInfo(area, ecModel); if (targetInfo && targetInfo !== true) { Object(core_util["each"])(targetInfo.coordSyses, function (coordSys) { var result = coordConvert[area.brushType](1, coordSys, area.range, true); cb(area, result.values, coordSys, ecModel); }); } }, this); }; /** * the `areas` is `BrushModel.areas`. * Called in layout stage. * convert `area.coordRange` to global range and set panelId to `area.range`. */ BrushTargetManager.prototype.setInputRanges = function (areas, ecModel) { Object(core_util["each"])(areas, function (area) { var targetInfo = this.findTargetInfo(area, ecModel); if (false) { assert(!targetInfo || targetInfo === true || area.coordRange, 'coordRange must be specified when coord index specified.'); assert(!targetInfo || targetInfo !== true || area.range, 'range must be specified in global brush.'); } area.range = area.range || []; // convert coordRange to global range and set panelId. if (targetInfo && targetInfo !== true) { area.panelId = targetInfo.panelId; // (1) area.range should always be calculate from coordRange but does // not keep its original value, for the sake of the dataZoom scenario, // where area.coordRange remains unchanged but area.range may be changed. // (2) Only support converting one coordRange to pixel range in brush // component. So do not consider `coordRanges`. // (3) About __rangeOffset, see comment above. var result = coordConvert[area.brushType](0, targetInfo.coordSys, area.coordRange); var rangeOffset = area.__rangeOffset; area.range = rangeOffset ? diffProcessor[area.brushType](result.values, rangeOffset.offset, getScales(result.xyMinMax, rangeOffset.xyMinMax)) : result.values; } }, this); }; BrushTargetManager.prototype.makePanelOpts = function (api, getDefaultBrushType) { return Object(core_util["map"])(this._targetInfoList, function (targetInfo) { var rect = targetInfo.getPanelRect(); return { panelId: targetInfo.panelId, defaultBrushType: getDefaultBrushType ? getDefaultBrushType(targetInfo) : null, clipPath: makeRectPanelClipPath(rect), isTargetByCursor: makeRectIsTargetByCursor(rect, api, targetInfo.coordSysModel), getLinearBrushOtherExtent: makeLinearBrushOtherExtent(rect) }; }); }; BrushTargetManager.prototype.controlSeries = function (area, seriesModel, ecModel) { // Check whether area is bound in coord, and series do not belong to that coord. // If do not do this check, some brush (like lineX) will controll all axes. var targetInfo = this.findTargetInfo(area, ecModel); return targetInfo === true || targetInfo && Object(core_util["indexOf"])(targetInfo.coordSyses, seriesModel.coordinateSystem) >= 0; }; /** * If return Object, a coord found. * If return true, global found. * Otherwise nothing found. */ BrushTargetManager.prototype.findTargetInfo = function (area, ecModel) { var targetInfoList = this._targetInfoList; var foundCpts = BrushTargetManager_parseFinder(ecModel, area); for (var i = 0; i < targetInfoList.length; i++) { var targetInfo = targetInfoList[i]; var areaPanelId = area.panelId; if (areaPanelId) { if (targetInfo.panelId === areaPanelId) { return targetInfo; } } else { for (var j = 0; j < targetInfoMatchers.length; j++) { if (targetInfoMatchers[j](foundCpts, targetInfo)) { return targetInfo; } } } } return true; }; return BrushTargetManager; }(); function formatMinMax(minMax) { minMax[0] > minMax[1] && minMax.reverse(); return minMax; } function BrushTargetManager_parseFinder(ecModel, finder) { return parseFinder(ecModel, finder, { includeMainTypes: INCLUDE_FINDER_MAIN_TYPES }); } var targetInfoBuilders = { grid: function (foundCpts, targetInfoList) { var xAxisModels = foundCpts.xAxisModels; var yAxisModels = foundCpts.yAxisModels; var gridModels = foundCpts.gridModels; // Remove duplicated. var gridModelMap = Object(core_util["createHashMap"])(); var xAxesHas = {}; var yAxesHas = {}; if (!xAxisModels && !yAxisModels && !gridModels) { return; } Object(core_util["each"])(xAxisModels, function (axisModel) { var gridModel = axisModel.axis.grid.model; gridModelMap.set(gridModel.id, gridModel); xAxesHas[gridModel.id] = true; }); Object(core_util["each"])(yAxisModels, function (axisModel) { var gridModel = axisModel.axis.grid.model; gridModelMap.set(gridModel.id, gridModel); yAxesHas[gridModel.id] = true; }); Object(core_util["each"])(gridModels, function (gridModel) { gridModelMap.set(gridModel.id, gridModel); xAxesHas[gridModel.id] = true; yAxesHas[gridModel.id] = true; }); gridModelMap.each(function (gridModel) { var grid = gridModel.coordinateSystem; var cartesians = []; Object(core_util["each"])(grid.getCartesians(), function (cartesian, index) { if (Object(core_util["indexOf"])(xAxisModels, cartesian.getAxis('x').model) >= 0 || Object(core_util["indexOf"])(yAxisModels, cartesian.getAxis('y').model) >= 0) { cartesians.push(cartesian); } }); targetInfoList.push({ panelId: 'grid--' + gridModel.id, gridModel: gridModel, coordSysModel: gridModel, // Use the first one as the representitive coordSys. coordSys: cartesians[0], coordSyses: cartesians, getPanelRect: panelRectBuilders.grid, xAxisDeclared: xAxesHas[gridModel.id], yAxisDeclared: yAxesHas[gridModel.id] }); }); }, geo: function (foundCpts, targetInfoList) { Object(core_util["each"])(foundCpts.geoModels, function (geoModel) { var coordSys = geoModel.coordinateSystem; targetInfoList.push({ panelId: 'geo--' + geoModel.id, geoModel: geoModel, coordSysModel: geoModel, coordSys: coordSys, coordSyses: [coordSys], getPanelRect: panelRectBuilders.geo }); }); } }; var targetInfoMatchers = [ // grid function (foundCpts, targetInfo) { var xAxisModel = foundCpts.xAxisModel; var yAxisModel = foundCpts.yAxisModel; var gridModel = foundCpts.gridModel; !gridModel && xAxisModel && (gridModel = xAxisModel.axis.grid.model); !gridModel && yAxisModel && (gridModel = yAxisModel.axis.grid.model); return gridModel && gridModel === targetInfo.gridModel; }, // geo function (foundCpts, targetInfo) { var geoModel = foundCpts.geoModel; return geoModel && geoModel === targetInfo.geoModel; }]; var panelRectBuilders = { grid: function () { // grid is not Transformable. return this.coordSys.master.getRect().clone(); }, geo: function () { var coordSys = this.coordSys; var rect = coordSys.getBoundingRect().clone(); // geo roam and zoom transform rect.applyTransform(getTransform(coordSys)); return rect; } }; var coordConvert = { lineX: Object(core_util["curry"])(axisConvert, 0), lineY: Object(core_util["curry"])(axisConvert, 1), rect: function (to, coordSys, rangeOrCoordRange, clamp) { var xminymin = to ? coordSys.pointToData([rangeOrCoordRange[0][0], rangeOrCoordRange[1][0]], clamp) : coordSys.dataToPoint([rangeOrCoordRange[0][0], rangeOrCoordRange[1][0]], clamp); var xmaxymax = to ? coordSys.pointToData([rangeOrCoordRange[0][1], rangeOrCoordRange[1][1]], clamp) : coordSys.dataToPoint([rangeOrCoordRange[0][1], rangeOrCoordRange[1][1]], clamp); var values = [formatMinMax([xminymin[0], xmaxymax[0]]), formatMinMax([xminymin[1], xmaxymax[1]])]; return { values: values, xyMinMax: values }; }, polygon: function (to, coordSys, rangeOrCoordRange, clamp) { var xyMinMax = [[Infinity, -Infinity], [Infinity, -Infinity]]; var values = Object(core_util["map"])(rangeOrCoordRange, function (item) { var p = to ? coordSys.pointToData(item, clamp) : coordSys.dataToPoint(item, clamp); xyMinMax[0][0] = Math.min(xyMinMax[0][0], p[0]); xyMinMax[1][0] = Math.min(xyMinMax[1][0], p[1]); xyMinMax[0][1] = Math.max(xyMinMax[0][1], p[0]); xyMinMax[1][1] = Math.max(xyMinMax[1][1], p[1]); return p; }); return { values: values, xyMinMax: xyMinMax }; } }; function axisConvert(axisNameIndex, to, coordSys, rangeOrCoordRange) { if (false) { assert(coordSys.type === 'cartesian2d', 'lineX/lineY brush is available only in cartesian2d.'); } var axis = coordSys.getAxis(['x', 'y'][axisNameIndex]); var values = formatMinMax(Object(core_util["map"])([0, 1], function (i) { return to ? axis.coordToData(axis.toLocalCoord(rangeOrCoordRange[i]), true) : axis.toGlobalCoord(axis.dataToCoord(rangeOrCoordRange[i])); })); var xyMinMax = []; xyMinMax[axisNameIndex] = values; xyMinMax[1 - axisNameIndex] = [NaN, NaN]; return { values: values, xyMinMax: xyMinMax }; } var diffProcessor = { lineX: Object(core_util["curry"])(axisDiffProcessor, 0), lineY: Object(core_util["curry"])(axisDiffProcessor, 1), rect: function (values, refer, scales) { return [[values[0][0] - scales[0] * refer[0][0], values[0][1] - scales[0] * refer[0][1]], [values[1][0] - scales[1] * refer[1][0], values[1][1] - scales[1] * refer[1][1]]]; }, polygon: function (values, refer, scales) { return Object(core_util["map"])(values, function (item, idx) { return [item[0] - scales[0] * refer[idx][0], item[1] - scales[1] * refer[idx][1]]; }); } }; function axisDiffProcessor(axisNameIndex, values, refer, scales) { return [values[0] - scales[axisNameIndex] * refer[0], values[1] - scales[axisNameIndex] * refer[1]]; } // We have to process scale caused by dataZoom manually, // although it might be not accurate. // Return [0~1, 0~1] function getScales(xyMinMaxCurr, xyMinMaxOrigin) { var sizeCurr = BrushTargetManager_getSize(xyMinMaxCurr); var sizeOrigin = BrushTargetManager_getSize(xyMinMaxOrigin); var scales = [sizeCurr[0] / sizeOrigin[0], sizeCurr[1] / sizeOrigin[1]]; isNaN(scales[0]) && (scales[0] = 1); isNaN(scales[1]) && (scales[1] = 1); return scales; } function BrushTargetManager_getSize(xyMinMax) { return xyMinMax ? [xyMinMax[0][1] - xyMinMax[0][0], xyMinMax[1][1] - xyMinMax[1][0]] : [NaN, NaN]; } /* harmony default export */ var helper_BrushTargetManager = (BrushTargetManager_BrushTargetManager); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/toolbox/feature/DataZoom.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 depends on DataZoom and Brush var DataZoom_each = core_util["each"]; var DATA_ZOOM_ID_BASE = makeInternalComponentId('toolbox-dataZoom_'); var DataZoom_ICON_TYPES = ['zoom', 'back']; var DataZoom_DataZoomFeature = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(DataZoomFeature, _super); function DataZoomFeature() { return _super !== null && _super.apply(this, arguments) || this; } DataZoomFeature.prototype.render = function (featureModel, ecModel, api, payload) { if (!this._brushController) { this._brushController = new helper_BrushController(api.getZr()); this._brushController.on('brush', core_util["bind"](this._onBrush, this)).mount(); } updateZoomBtnStatus(featureModel, ecModel, this, payload, api); updateBackBtnStatus(featureModel, ecModel); }; DataZoomFeature.prototype.onclick = function (ecModel, api, type) { DataZoom_handlers[type].call(this); }; DataZoomFeature.prototype.remove = function (ecModel, api) { this._brushController && this._brushController.unmount(); }; DataZoomFeature.prototype.dispose = function (ecModel, api) { this._brushController && this._brushController.dispose(); }; DataZoomFeature.prototype._onBrush = function (eventParam) { var areas = eventParam.areas; if (!eventParam.isEnd || !areas.length) { return; } var snapshot = {}; var ecModel = this.ecModel; this._brushController.updateCovers([]); // remove cover var brushTargetManager = new helper_BrushTargetManager(makeAxisFinder(this.model), ecModel, { include: ['grid'] }); brushTargetManager.matchOutputRanges(areas, ecModel, function (area, coordRange, coordSys) { if (coordSys.type !== 'cartesian2d') { return; } var brushType = area.brushType; if (brushType === 'rect') { setBatch('x', coordSys, coordRange[0]); setBatch('y', coordSys, coordRange[1]); } else { setBatch({ lineX: 'x', lineY: 'y' }[brushType], coordSys, coordRange); } }); push(ecModel, snapshot); this._dispatchZoomAction(snapshot); function setBatch(dimName, coordSys, minMax) { var axis = coordSys.getAxis(dimName); var axisModel = axis.model; var dataZoomModel = findDataZoom(dimName, axisModel, ecModel); // Restrict range. var minMaxSpan = dataZoomModel.findRepresentativeAxisProxy(axisModel).getMinMaxSpan(); if (minMaxSpan.minValueSpan != null || minMaxSpan.maxValueSpan != null) { minMax = sliderMove(0, minMax.slice(), axis.scale.getExtent(), 0, minMaxSpan.minValueSpan, minMaxSpan.maxValueSpan); } dataZoomModel && (snapshot[dataZoomModel.id] = { dataZoomId: dataZoomModel.id, startValue: minMax[0], endValue: minMax[1] }); } function findDataZoom(dimName, axisModel, ecModel) { var found; ecModel.eachComponent({ mainType: 'dataZoom', subType: 'select' }, function (dzModel) { var has = dzModel.getAxisModel(dimName, axisModel.componentIndex); has && (found = dzModel); }); return found; } }; ; DataZoomFeature.prototype._dispatchZoomAction = function (snapshot) { var batch = []; // Convert from hash map to array. DataZoom_each(snapshot, function (batchItem, dataZoomId) { batch.push(core_util["clone"](batchItem)); }); batch.length && this.api.dispatchAction({ type: 'dataZoom', from: this.uid, batch: batch }); }; DataZoomFeature.getDefaultOption = function (ecModel) { var defaultOption = { show: true, filterMode: 'filter', // Icon group icon: { zoom: 'M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1', back: 'M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26' }, // `zoom`, `back` title: ecModel.getLocaleModel().get(['toolbox', 'dataZoom', 'title']), brushStyle: { borderWidth: 0, color: 'rgba(210,219,238,0.2)' } }; return defaultOption; }; return DataZoomFeature; }(ToolboxFeature); var DataZoom_handlers = { zoom: function () { var nextActive = !this._isZoomActive; this.api.dispatchAction({ type: 'takeGlobalCursor', key: 'dataZoomSelect', dataZoomSelectActive: nextActive }); }, back: function () { this._dispatchZoomAction(pop(this.ecModel)); } }; function makeAxisFinder(dzFeatureModel) { var setting = { xAxisIndex: dzFeatureModel.get('xAxisIndex', true), yAxisIndex: dzFeatureModel.get('yAxisIndex', true), xAxisId: dzFeatureModel.get('xAxisId', true), yAxisId: dzFeatureModel.get('yAxisId', true) }; // If both `xAxisIndex` `xAxisId` not set, it means 'all'. // If both `yAxisIndex` `yAxisId` not set, it means 'all'. // Some old cases set like this below to close yAxis control but leave xAxis control: // `{ feature: { dataZoom: { yAxisIndex: false } }`. if (setting.xAxisIndex == null && setting.xAxisId == null) { setting.xAxisIndex = 'all'; } if (setting.yAxisIndex == null && setting.yAxisId == null) { setting.yAxisIndex = 'all'; } return setting; } function updateBackBtnStatus(featureModel, ecModel) { featureModel.setIconStatus('back', history_count(ecModel) > 1 ? 'emphasis' : 'normal'); } function updateZoomBtnStatus(featureModel, ecModel, view, payload, api) { var zoomActive = view._isZoomActive; if (payload && payload.type === 'takeGlobalCursor') { zoomActive = payload.key === 'dataZoomSelect' ? payload.dataZoomSelectActive : false; } view._isZoomActive = zoomActive; featureModel.setIconStatus('zoom', zoomActive ? 'emphasis' : 'normal'); var brushTargetManager = new helper_BrushTargetManager(makeAxisFinder(featureModel), ecModel, { include: ['grid'] }); var panels = brushTargetManager.makePanelOpts(api, function (targetInfo) { return targetInfo.xAxisDeclared && !targetInfo.yAxisDeclared ? 'lineX' : !targetInfo.xAxisDeclared && targetInfo.yAxisDeclared ? 'lineY' : 'rect'; }); view._brushController.setPanels(panels).enableBrush(zoomActive && panels.length ? { brushType: 'auto', brushStyle: featureModel.getModel('brushStyle').getItemStyle() } : false); } registerInternalOptionCreator('dataZoom', function (ecModel) { var toolboxModel = ecModel.getComponent('toolbox', 0); var featureDataZoomPath = ['feature', 'dataZoom']; if (!toolboxModel || toolboxModel.get(featureDataZoomPath) == null) { return; } var dzFeatureModel = toolboxModel.getModel(featureDataZoomPath); var dzOptions = []; var finder = makeAxisFinder(dzFeatureModel); var finderResult = parseFinder(ecModel, finder); DataZoom_each(finderResult.xAxisModels, function (axisModel) { return buildInternalOptions(axisModel, 'xAxis', 'xAxisIndex'); }); DataZoom_each(finderResult.yAxisModels, function (axisModel) { return buildInternalOptions(axisModel, 'yAxis', 'yAxisIndex'); }); function buildInternalOptions(axisModel, axisMainType, axisIndexPropName) { var axisIndex = axisModel.componentIndex; var newOpt = { type: 'select', $fromToolbox: true, // Default to be filter filterMode: dzFeatureModel.get('filterMode', true) || 'filter', // Id for merge mapping. id: DATA_ZOOM_ID_BASE + axisMainType + axisIndex }; newOpt[axisIndexPropName] = axisIndex; dzOptions.push(newOpt); } return dzOptions; }); /* harmony default export */ var DataZoom = (DataZoom_DataZoomFeature); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/toolbox/install.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ // TODOD: REGISTER IN INSTALL function toolbox_install_install(registers) { registers.registerComponentModel(toolbox_ToolboxModel); registers.registerComponentView(toolbox_ToolboxView); registerFeature('saveAsImage', feature_SaveAsImage); registerFeature('magicType', feature_MagicType); registerFeature('dataView', feature_DataView); registerFeature('dataZoom', DataZoom); registerFeature('restore', Restore); use(installDataZoomSelect_install); } // CONCATENATED MODULE: ./node_modules/echarts/lib/component/tooltip/TooltipModel.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 TooltipModel_TooltipModel = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(TooltipModel, _super); function TooltipModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = TooltipModel.type; return _this; } TooltipModel.type = 'tooltip'; TooltipModel.dependencies = ['axisPointer']; TooltipModel.defaultOption = { // zlevel: 0, z: 60, show: true, // tooltip main content showContent: true, // 'trigger' only works on coordinate system. // 'item' | 'axis' | 'none' trigger: 'item', // 'click' | 'mousemove' | 'none' triggerOn: 'mousemove|click', alwaysShowContent: false, displayMode: 'single', renderMode: 'auto', // whether restraint content inside viewRect. // If renderMode: 'richText', default true. // If renderMode: 'html', defaut false (for backward compat). confine: null, showDelay: 0, hideDelay: 100, // Animation transition time, unit is second transitionDuration: 0.4, enterable: false, backgroundColor: '#fff', // box shadow shadowBlur: 10, shadowColor: 'rgba(0, 0, 0, .2)', shadowOffsetX: 1, shadowOffsetY: 2, // tooltip border radius, unit is px, default is 4 borderRadius: 4, // tooltip border width, unit is px, default is 0 (no border) borderWidth: 1, // Tooltip inside padding, default is 5 for all direction // Array is allowed to set up, right, bottom, left, same with css // The default value: See `tooltip/tooltipMarkup.ts#getPaddingFromTooltipModel`. padding: null, // Extra css text extraCssText: '', // axis indicator, trigger by axis axisPointer: { // default is line // legal values: 'line' | 'shadow' | 'cross' type: 'line', // Valid when type is line, appoint tooltip line locate on which line. Optional // legal values: 'x' | 'y' | 'angle' | 'radius' | 'auto' // default is 'auto', chose the axis which type is category. // for multiply y axis, cartesian coord chose x axis, polar chose angle axis axis: 'auto', animation: 'auto', animationDurationUpdate: 200, animationEasingUpdate: 'exponentialOut', crossStyle: { color: '#999', width: 1, type: 'dashed', // TODO formatter textStyle: {} } // lineStyle and shadowStyle should not be specified here, // otherwise it will always override those styles on option.axisPointer. }, textStyle: { color: '#666', fontSize: 14 } }; return TooltipModel; }(Component); /* harmony default export */ var tooltip_TooltipModel = (TooltipModel_TooltipModel); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/tooltip/helper.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 document */ function shouldTooltipConfine(tooltipModel) { var confineOption = tooltipModel.get('confine'); return confineOption != null ? !!confineOption // In richText mode, the outside part can not be visible. : tooltipModel.get('renderMode') === 'richText'; } function testStyle(styleProps) { if (!core_env["a" /* default */].domSupported) { return; } var style = document.documentElement.style; for (var i = 0, len = styleProps.length; i < len; i++) { if (styleProps[i] in style) { return styleProps[i]; } } } var TRANSFORM_VENDOR = testStyle(['transform', 'webkitTransform', 'OTransform', 'MozTransform', 'msTransform']); var TRANSITION_VENDOR = testStyle(['webkitTransition', 'transition', 'OTransition', 'MozTransition', 'msTransition']); function toCSSVendorPrefix(styleVendor, styleProp) { if (!styleVendor) { return styleProp; } styleProp = toCamelCase(styleProp, true); var idx = styleVendor.indexOf(styleProp); styleVendor = idx === -1 ? styleProp : "-" + styleVendor.slice(0, idx) + "-" + styleProp; return styleVendor.toLowerCase(); } function getComputedStyle(el, style) { var stl = el.currentStyle || document.defaultView && document.defaultView.getComputedStyle(el); return stl ? style ? stl[style] : stl : null; } // CONCATENATED MODULE: ./node_modules/echarts/lib/component/tooltip/TooltipHTMLContent.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 document, window */ var CSS_TRANSITION_VENDOR = toCSSVendorPrefix(TRANSITION_VENDOR, 'transition'); var CSS_TRANSFORM_VENDOR = toCSSVendorPrefix(TRANSFORM_VENDOR, 'transform'); // eslint-disable-next-line var gCssText = "position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;" + (core_env["a" /* default */].transform3dSupported ? 'will-change:transform;' : ''); function mirrorPos(pos) { pos = pos === 'left' ? 'right' : pos === 'right' ? 'left' : pos === 'top' ? 'bottom' : 'top'; return pos; } function assembleArrow(tooltipModel, borderColor, arrowPosition) { if (!Object(core_util["isString"])(arrowPosition) || arrowPosition === 'inside') { return ''; } var backgroundColor = tooltipModel.get('backgroundColor'); var borderWidth = tooltipModel.get('borderWidth'); borderColor = convertToColorString(borderColor); var arrowPos = mirrorPos(arrowPosition); var arrowSize = Math.max(Math.round(borderWidth) * 1.5, 6); var positionStyle = ''; var transformStyle = CSS_TRANSFORM_VENDOR + ':'; var rotateDeg; if (Object(core_util["indexOf"])(['left', 'right'], arrowPos) > -1) { positionStyle += 'top:50%'; transformStyle += "translateY(-50%) rotate(" + (rotateDeg = arrowPos === 'left' ? -225 : -45) + "deg)"; } else { positionStyle += 'left:50%'; transformStyle += "translateX(-50%) rotate(" + (rotateDeg = arrowPos === 'top' ? 225 : 45) + "deg)"; } var rotateRadian = rotateDeg * Math.PI / 180; var arrowWH = arrowSize + borderWidth; var rotatedWH = arrowWH * Math.abs(Math.cos(rotateRadian)) + arrowWH * Math.abs(Math.sin(rotateRadian)); var arrowOffset = Math.round(((rotatedWH - Math.SQRT2 * borderWidth) / 2 + Math.SQRT2 * borderWidth - (rotatedWH - arrowWH) / 2) * 100) / 100; positionStyle += ";" + arrowPos + ":-" + arrowOffset + "px"; var borderStyle = borderColor + " solid " + borderWidth + "px;"; var styleCss = ["position:absolute;width:" + arrowSize + "px;height:" + arrowSize + "px;z-index:-1;", positionStyle + ";" + transformStyle + ";", "border-bottom:" + borderStyle, "border-right:" + borderStyle, "background-color:" + backgroundColor + ";"]; return "
    "; } function assembleTransition(duration, onlyFade) { var transitionCurve = 'cubic-bezier(0.23,1,0.32,1)'; var transitionOption = " " + duration / 2 + "s " + transitionCurve; var transitionText = "opacity" + transitionOption + ",visibility" + transitionOption; if (!onlyFade) { transitionOption = " " + duration + "s " + transitionCurve; transitionText += core_env["a" /* default */].transformSupported ? "," + CSS_TRANSFORM_VENDOR + transitionOption : ",left" + transitionOption + ",top" + transitionOption; } return CSS_TRANSITION_VENDOR + ':' + transitionText; } function assembleTransform(x, y, toString) { // If using float on style, the final width of the dom might // keep changing slightly while mouse move. So `toFixed(0)` them. var x0 = x.toFixed(0) + 'px'; var y0 = y.toFixed(0) + 'px'; // not support transform, use `left` and `top` instead. if (!core_env["a" /* default */].transformSupported) { return toString ? "top:" + y0 + ";left:" + x0 + ";" : [['top', y0], ['left', x0]]; } // support transform var is3d = core_env["a" /* default */].transform3dSupported; var translate = "translate" + (is3d ? '3d' : '') + "(" + x0 + "," + y0 + (is3d ? ',0' : '') + ")"; return toString ? 'top:0;left:0;' + CSS_TRANSFORM_VENDOR + ':' + translate + ';' : [['top', 0], ['left', 0], [TRANSFORM_VENDOR, translate]]; } /** * @param {Object} textStyle * @return {string} * @inner */ function assembleFont(textStyleModel) { var cssText = []; var fontSize = textStyleModel.get('fontSize'); var color = textStyleModel.getTextColor(); color && cssText.push('color:' + color); cssText.push('font:' + textStyleModel.getFont()); // @ts-ignore, leave it to the tooltip refactor. var lineHeight = Object(core_util["retrieve2"])(textStyleModel.get('lineHeight'), Math.round(fontSize * 3 / 2)); fontSize && cssText.push('line-height:' + lineHeight + 'px'); var shadowColor = textStyleModel.get('textShadowColor'); var shadowBlur = textStyleModel.get('textShadowBlur') || 0; var shadowOffsetX = textStyleModel.get('textShadowOffsetX') || 0; var shadowOffsetY = textStyleModel.get('textShadowOffsetY') || 0; shadowColor && shadowBlur && cssText.push('text-shadow:' + shadowOffsetX + 'px ' + shadowOffsetY + 'px ' + shadowBlur + 'px ' + shadowColor); Object(core_util["each"])(['decoration', 'align'], function (name) { var val = textStyleModel.get(name); val && cssText.push('text-' + name + ':' + val); }); return cssText.join(';'); } function assembleCssText(tooltipModel, enableTransition, onlyFade) { var cssText = []; var transitionDuration = tooltipModel.get('transitionDuration'); var backgroundColor = tooltipModel.get('backgroundColor'); var shadowBlur = tooltipModel.get('shadowBlur'); var shadowColor = tooltipModel.get('shadowColor'); var shadowOffsetX = tooltipModel.get('shadowOffsetX'); var shadowOffsetY = tooltipModel.get('shadowOffsetY'); var textStyleModel = tooltipModel.getModel('textStyle'); var padding = getPaddingFromTooltipModel(tooltipModel, 'html'); var boxShadow = shadowOffsetX + "px " + shadowOffsetY + "px " + shadowBlur + "px " + shadowColor; cssText.push('box-shadow:' + boxShadow); // Animation transition. Do not animate when transitionDuration is 0. enableTransition && transitionDuration && cssText.push(assembleTransition(transitionDuration, onlyFade)); if (backgroundColor) { cssText.push('background-color:' + backgroundColor); } // Border style Object(core_util["each"])(['width', 'color', 'radius'], function (name) { var borderName = 'border-' + name; var camelCase = toCamelCase(borderName); var val = tooltipModel.get(camelCase); val != null && cssText.push(borderName + ':' + val + (name === 'color' ? '' : 'px')); }); // Text style cssText.push(assembleFont(textStyleModel)); // Padding if (padding != null) { cssText.push('padding:' + normalizeCssArray(padding).join('px ') + 'px'); } return cssText.join(';') + ';'; } // If not able to make, do not modify the input `out`. function makeStyleCoord(out, zr, container, zrX, zrY) { var zrPainter = zr && zr.painter; if (container) { var zrViewportRoot = zrPainter && zrPainter.getViewportRoot(); if (zrViewportRoot) { // Some APPs might use scale on body, so we support CSS transform here. transformLocalCoord(out, zrViewportRoot, container, zrX, zrY); } } else { out[0] = zrX; out[1] = zrY; // xy should be based on canvas root. But tooltipContent is // the sibling of canvas root. So padding of ec container // should be considered here. var viewportRootOffset = zrPainter && zrPainter.getViewportRootOffset(); if (viewportRootOffset) { out[0] += viewportRootOffset.offsetLeft; out[1] += viewportRootOffset.offsetTop; } } out[2] = out[0] / zr.getWidth(); out[3] = out[1] / zr.getHeight(); } var TooltipHTMLContent_TooltipHTMLContent = /** @class */function () { function TooltipHTMLContent(api, opt) { this._show = false; this._styleCoord = [0, 0, 0, 0]; this._enterable = true; this._alwaysShowContent = false; this._firstShow = true; this._longHide = true; if (core_env["a" /* default */].wxa) { return null; } var el = document.createElement('div'); // TODO: TYPE el.domBelongToZr = true; this.el = el; var zr = this._zr = api.getZr(); var appendTo = opt.appendTo; var container = appendTo && (Object(core_util["isString"])(appendTo) ? document.querySelector(appendTo) : Object(core_util["isDom"])(appendTo) ? appendTo : Object(core_util["isFunction"])(appendTo) && appendTo(api.getDom())); makeStyleCoord(this._styleCoord, zr, container, api.getWidth() / 2, api.getHeight() / 2); (container || api.getDom()).appendChild(el); this._api = api; this._container = container; // FIXME // Is it needed to trigger zr event manually if // the browser do not support `pointer-events: none`. var self = this; el.onmouseenter = function () { // clear the timeout in hideLater and keep showing tooltip if (self._enterable) { clearTimeout(self._hideTimeout); self._show = true; } self._inContent = true; }; el.onmousemove = function (e) { e = e || window.event; if (!self._enterable) { // `pointer-events: none` is set to tooltip content div // if `enterable` is set as `false`, and `el.onmousemove` // can not be triggered. But in browser that do not // support `pointer-events`, we need to do this: // Try trigger zrender event to avoid mouse // in and out shape too frequently var handler = zr.handler; var zrViewportRoot = zr.painter.getViewportRoot(); normalizeEvent(zrViewportRoot, e, true); handler.dispatch('mousemove', e); } }; el.onmouseleave = function () { // set `_inContent` to `false` before `hideLater` self._inContent = false; if (self._enterable) { if (self._show) { self.hideLater(self._hideDelay); } } }; } /** * Update when tooltip is rendered */ TooltipHTMLContent.prototype.update = function (tooltipModel) { // FIXME // Move this logic to ec main? if (!this._container) { var container = this._api.getDom(); var position = getComputedStyle(container, 'position'); var domStyle = container.style; if (domStyle.position !== 'absolute' && position !== 'absolute') { domStyle.position = 'relative'; } } // move tooltip if chart resized var alwaysShowContent = tooltipModel.get('alwaysShowContent'); alwaysShowContent && this._moveIfResized(); // update alwaysShowContent this._alwaysShowContent = alwaysShowContent; // update className this.el.className = tooltipModel.get('className') || ''; // Hide the tooltip // PENDING // this.hide(); }; TooltipHTMLContent.prototype.show = function (tooltipModel, nearPointColor) { clearTimeout(this._hideTimeout); clearTimeout(this._longHideTimeout); var el = this.el; var style = el.style; var styleCoord = this._styleCoord; if (!el.innerHTML) { style.display = 'none'; } else { style.cssText = gCssText + assembleCssText(tooltipModel, !this._firstShow, this._longHide) // initial transform + assembleTransform(styleCoord[0], styleCoord[1], true) + ("border-color:" + convertToColorString(nearPointColor) + ";") + (tooltipModel.get('extraCssText') || '') // If mouse occasionally move over the tooltip, a mouseout event will be // triggered by canvas, and cause some unexpectable result like dragging // stop, "unfocusAdjacency". Here `pointer-events: none` is used to solve // it. Although it is not supported by IE8~IE10, fortunately it is a rare // scenario. + (";pointer-events:" + (this._enterable ? 'auto' : 'none')); } this._show = true; this._firstShow = false; this._longHide = false; }; TooltipHTMLContent.prototype.setContent = function (content, markers, tooltipModel, borderColor, arrowPosition) { var el = this.el; if (content == null) { el.innerHTML = ''; return; } var arrow = ''; if (Object(core_util["isString"])(arrowPosition) && tooltipModel.get('trigger') === 'item' && !shouldTooltipConfine(tooltipModel)) { arrow = assembleArrow(tooltipModel, borderColor, arrowPosition); } if (Object(core_util["isString"])(content)) { el.innerHTML = content + arrow; } else if (content) { // Clear previous el.innerHTML = ''; if (!Object(core_util["isArray"])(content)) { content = [content]; } for (var i = 0; i < content.length; i++) { if (Object(core_util["isDom"])(content[i]) && content[i].parentNode !== el) { el.appendChild(content[i]); } } // no arrow if empty if (arrow && el.childNodes.length) { // no need to create a new parent element, but it's not supported by IE 10 and older. // const arrowEl = document.createRange().createContextualFragment(arrow); var arrowEl = document.createElement('div'); arrowEl.innerHTML = arrow; el.appendChild(arrowEl); } } }; TooltipHTMLContent.prototype.setEnterable = function (enterable) { this._enterable = enterable; }; TooltipHTMLContent.prototype.getSize = function () { var el = this.el; return el ? [el.offsetWidth, el.offsetHeight] : [0, 0]; }; TooltipHTMLContent.prototype.moveTo = function (zrX, zrY) { if (!this.el) { return; } var styleCoord = this._styleCoord; makeStyleCoord(styleCoord, this._zr, this._container, zrX, zrY); if (styleCoord[0] != null && styleCoord[1] != null) { var style_1 = this.el.style; var transforms = assembleTransform(styleCoord[0], styleCoord[1]); Object(core_util["each"])(transforms, function (transform) { style_1[transform[0]] = transform[1]; }); } }; /** * when `alwaysShowContent` is true, * move the tooltip after chart resized */ TooltipHTMLContent.prototype._moveIfResized = function () { // The ratio of left to width var ratioX = this._styleCoord[2]; // The ratio of top to height var ratioY = this._styleCoord[3]; this.moveTo(ratioX * this._zr.getWidth(), ratioY * this._zr.getHeight()); }; TooltipHTMLContent.prototype.hide = function () { var _this = this; var style = this.el.style; style.visibility = 'hidden'; style.opacity = '0'; core_env["a" /* default */].transform3dSupported && (style.willChange = ''); this._show = false; this._longHideTimeout = setTimeout(function () { return _this._longHide = true; }, 500); }; TooltipHTMLContent.prototype.hideLater = function (time) { if (this._show && !(this._inContent && this._enterable) && !this._alwaysShowContent) { if (time) { this._hideDelay = time; // Set show false to avoid invoke hideLater multiple times this._show = false; this._hideTimeout = setTimeout(Object(core_util["bind"])(this.hide, this), time); } else { this.hide(); } } }; TooltipHTMLContent.prototype.isShow = function () { return this._show; }; TooltipHTMLContent.prototype.dispose = function () { clearTimeout(this._hideTimeout); clearTimeout(this._longHideTimeout); var parentNode = this.el.parentNode; parentNode && parentNode.removeChild(this.el); this.el = this._container = null; }; return TooltipHTMLContent; }(); /* harmony default export */ var tooltip_TooltipHTMLContent = (TooltipHTMLContent_TooltipHTMLContent); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/tooltip/TooltipRichContent.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 TooltipRichContent_TooltipRichContent = /** @class */function () { function TooltipRichContent(api) { this._show = false; this._styleCoord = [0, 0, 0, 0]; this._alwaysShowContent = false; this._enterable = true; this._zr = api.getZr(); TooltipRichContent_makeStyleCoord(this._styleCoord, this._zr, api.getWidth() / 2, api.getHeight() / 2); } /** * Update when tooltip is rendered */ TooltipRichContent.prototype.update = function (tooltipModel) { var alwaysShowContent = tooltipModel.get('alwaysShowContent'); alwaysShowContent && this._moveIfResized(); // update alwaysShowContent this._alwaysShowContent = alwaysShowContent; }; TooltipRichContent.prototype.show = function () { if (this._hideTimeout) { clearTimeout(this._hideTimeout); } this.el.show(); this._show = true; }; /** * Set tooltip content */ TooltipRichContent.prototype.setContent = function (content, markupStyleCreator, tooltipModel, borderColor, arrowPosition) { var _this = this; if (core_util["isObject"](content)) { throwError( false ? 'Passing DOM nodes as content is not supported in richText tooltip!' : ''); } if (this.el) { this._zr.remove(this.el); } var textStyleModel = tooltipModel.getModel('textStyle'); this.el = new Text({ style: { rich: markupStyleCreator.richTextStyles, text: content, lineHeight: 22, borderWidth: 1, borderColor: borderColor, textShadowColor: textStyleModel.get('textShadowColor'), fill: tooltipModel.get(['textStyle', 'color']), padding: getPaddingFromTooltipModel(tooltipModel, 'richText'), verticalAlign: 'top', align: 'left' }, z: tooltipModel.get('z') }); core_util["each"](['backgroundColor', 'borderRadius', 'shadowColor', 'shadowBlur', 'shadowOffsetX', 'shadowOffsetY'], function (propName) { _this.el.style[propName] = tooltipModel.get(propName); }); core_util["each"](['textShadowBlur', 'textShadowOffsetX', 'textShadowOffsetY'], function (propName) { _this.el.style[propName] = textStyleModel.get(propName) || 0; }); this._zr.add(this.el); var self = this; this.el.on('mouseover', function () { // clear the timeout in hideLater and keep showing tooltip if (self._enterable) { clearTimeout(self._hideTimeout); self._show = true; } self._inContent = true; }); this.el.on('mouseout', function () { if (self._enterable) { if (self._show) { self.hideLater(self._hideDelay); } } self._inContent = false; }); }; TooltipRichContent.prototype.setEnterable = function (enterable) { this._enterable = enterable; }; TooltipRichContent.prototype.getSize = function () { var el = this.el; var bounding = this.el.getBoundingRect(); // bounding rect does not include shadow. For renderMode richText, // if overflow, it will be cut. So calculate them accurately. var shadowOuterSize = calcShadowOuterSize(el.style); return [bounding.width + shadowOuterSize.left + shadowOuterSize.right, bounding.height + shadowOuterSize.top + shadowOuterSize.bottom]; }; TooltipRichContent.prototype.moveTo = function (x, y) { var el = this.el; if (el) { var styleCoord = this._styleCoord; TooltipRichContent_makeStyleCoord(styleCoord, this._zr, x, y); x = styleCoord[0]; y = styleCoord[1]; var style = el.style; var borderWidth = mathMaxWith0(style.borderWidth || 0); var shadowOuterSize = calcShadowOuterSize(style); // rich text x, y do not include border. el.x = x + borderWidth + shadowOuterSize.left; el.y = y + borderWidth + shadowOuterSize.top; el.markRedraw(); } }; /** * when `alwaysShowContent` is true, * move the tooltip after chart resized */ TooltipRichContent.prototype._moveIfResized = function () { // The ratio of left to width var ratioX = this._styleCoord[2]; // The ratio of top to height var ratioY = this._styleCoord[3]; this.moveTo(ratioX * this._zr.getWidth(), ratioY * this._zr.getHeight()); }; TooltipRichContent.prototype.hide = function () { if (this.el) { this.el.hide(); } this._show = false; }; TooltipRichContent.prototype.hideLater = function (time) { if (this._show && !(this._inContent && this._enterable) && !this._alwaysShowContent) { if (time) { this._hideDelay = time; // Set show false to avoid invoke hideLater multiple times this._show = false; this._hideTimeout = setTimeout(core_util["bind"](this.hide, this), time); } else { this.hide(); } } }; TooltipRichContent.prototype.isShow = function () { return this._show; }; TooltipRichContent.prototype.dispose = function () { this._zr.remove(this.el); }; return TooltipRichContent; }(); function mathMaxWith0(val) { return Math.max(0, val); } function calcShadowOuterSize(style) { var shadowBlur = mathMaxWith0(style.shadowBlur || 0); var shadowOffsetX = mathMaxWith0(style.shadowOffsetX || 0); var shadowOffsetY = mathMaxWith0(style.shadowOffsetY || 0); return { left: mathMaxWith0(shadowBlur - shadowOffsetX), right: mathMaxWith0(shadowBlur + shadowOffsetX), top: mathMaxWith0(shadowBlur - shadowOffsetY), bottom: mathMaxWith0(shadowBlur + shadowOffsetY) }; } function TooltipRichContent_makeStyleCoord(out, zr, zrX, zrY) { out[0] = zrX; out[1] = zrY; out[2] = out[0] / zr.getWidth(); out[3] = out[1] / zr.getHeight(); } /* harmony default export */ var tooltip_TooltipRichContent = (TooltipRichContent_TooltipRichContent); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/tooltip/TooltipView.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 proxyRect = new shape_Rect({ shape: { x: -1, y: -1, width: 2, height: 2 } }); var TooltipView_TooltipView = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(TooltipView, _super); function TooltipView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = TooltipView.type; return _this; } TooltipView.prototype.init = function (ecModel, api) { if (core_env["a" /* default */].node || !api.getDom()) { return; } var tooltipModel = ecModel.getComponent('tooltip'); var renderMode = this._renderMode = getTooltipRenderMode(tooltipModel.get('renderMode')); this._tooltipContent = renderMode === 'richText' ? new tooltip_TooltipRichContent(api) : new tooltip_TooltipHTMLContent(api, { appendTo: tooltipModel.get('appendToBody', true) ? 'body' : tooltipModel.get('appendTo', true) }); }; TooltipView.prototype.render = function (tooltipModel, ecModel, api) { if (core_env["a" /* default */].node || !api.getDom()) { return; } // Reset this.group.removeAll(); this._tooltipModel = tooltipModel; this._ecModel = ecModel; this._api = api; var tooltipContent = this._tooltipContent; tooltipContent.update(tooltipModel); tooltipContent.setEnterable(tooltipModel.get('enterable')); this._initGlobalListener(); this._keepShow(); // PENDING // `mousemove` event will be triggered very frequently when the mouse moves fast, // which causes that the `updatePosition` function was also called frequently. // In Chrome with devtools open and Firefox, tooltip looks laggy and shakes. See #14695 #16101 // To avoid frequent triggering, // consider throttling it in 50ms when transition is enabled if (this._renderMode !== 'richText' && tooltipModel.get('transitionDuration')) { createOrUpdate(this, '_updatePosition', 50, 'fixRate'); } else { clear(this, '_updatePosition'); } }; TooltipView.prototype._initGlobalListener = function () { var tooltipModel = this._tooltipModel; var triggerOn = tooltipModel.get('triggerOn'); register('itemTooltip', this._api, Object(core_util["bind"])(function (currTrigger, e, dispatchAction) { // If 'none', it is not controlled by mouse totally. if (triggerOn !== 'none') { if (triggerOn.indexOf(currTrigger) >= 0) { this._tryShow(e, dispatchAction); } else if (currTrigger === 'leave') { this._hide(dispatchAction); } } }, this)); }; TooltipView.prototype._keepShow = function () { var tooltipModel = this._tooltipModel; var ecModel = this._ecModel; var api = this._api; var triggerOn = tooltipModel.get('triggerOn'); // Try to keep the tooltip show when refreshing if (this._lastX != null && this._lastY != null // When user is willing to control tooltip totally using API, // self.manuallyShowTip({x, y}) might cause tooltip hide, // which is not expected. && triggerOn !== 'none' && triggerOn !== 'click') { var self_1 = this; clearTimeout(this._refreshUpdateTimeout); this._refreshUpdateTimeout = setTimeout(function () { // Show tip next tick after other charts are rendered // In case highlight action has wrong result // FIXME !api.isDisposed() && self_1.manuallyShowTip(tooltipModel, ecModel, api, { x: self_1._lastX, y: self_1._lastY, dataByCoordSys: self_1._lastDataByCoordSys }); }); } }; /** * Show tip manually by * dispatchAction({ * type: 'showTip', * x: 10, * y: 10 * }); * Or * dispatchAction({ * type: 'showTip', * seriesIndex: 0, * dataIndex or dataIndexInside or name * }); * * TODO Batch */ TooltipView.prototype.manuallyShowTip = function (tooltipModel, ecModel, api, payload) { if (payload.from === this.uid || core_env["a" /* default */].node || !api.getDom()) { return; } var dispatchAction = TooltipView_makeDispatchAction(payload, api); // Reset ticket this._ticket = ''; // When triggered from axisPointer. var dataByCoordSys = payload.dataByCoordSys; var cmptRef = findComponentReference(payload, ecModel, api); if (cmptRef) { var rect = cmptRef.el.getBoundingRect().clone(); rect.applyTransform(cmptRef.el.transform); this._tryShow({ offsetX: rect.x + rect.width / 2, offsetY: rect.y + rect.height / 2, target: cmptRef.el, position: payload.position, // When manully trigger, the mouse is not on the el, so we'd better to // position tooltip on the bottom of the el and display arrow is possible. positionDefault: 'bottom' }, dispatchAction); } else if (payload.tooltip && payload.x != null && payload.y != null) { var el = proxyRect; el.x = payload.x; el.y = payload.y; el.update(); getECData(el).tooltipConfig = { name: null, option: payload.tooltip }; // Manually show tooltip while view is not using zrender elements. this._tryShow({ offsetX: payload.x, offsetY: payload.y, target: el }, dispatchAction); } else if (dataByCoordSys) { this._tryShow({ offsetX: payload.x, offsetY: payload.y, position: payload.position, dataByCoordSys: dataByCoordSys, tooltipOption: payload.tooltipOption }, dispatchAction); } else if (payload.seriesIndex != null) { if (this._manuallyAxisShowTip(tooltipModel, ecModel, api, payload)) { return; } var pointInfo = findPointFromSeries(payload, ecModel); var cx = pointInfo.point[0]; var cy = pointInfo.point[1]; if (cx != null && cy != null) { this._tryShow({ offsetX: cx, offsetY: cy, target: pointInfo.el, position: payload.position, // When manully trigger, the mouse is not on the el, so we'd better to // position tooltip on the bottom of the el and display arrow is possible. positionDefault: 'bottom' }, dispatchAction); } } else if (payload.x != null && payload.y != null) { // FIXME // should wrap dispatchAction like `axisPointer/globalListener` ? api.dispatchAction({ type: 'updateAxisPointer', x: payload.x, y: payload.y }); this._tryShow({ offsetX: payload.x, offsetY: payload.y, position: payload.position, target: api.getZr().findHover(payload.x, payload.y).target }, dispatchAction); } }; TooltipView.prototype.manuallyHideTip = function (tooltipModel, ecModel, api, payload) { var tooltipContent = this._tooltipContent; if (this._tooltipModel) { tooltipContent.hideLater(this._tooltipModel.get('hideDelay')); } this._lastX = this._lastY = this._lastDataByCoordSys = null; if (payload.from !== this.uid) { this._hide(TooltipView_makeDispatchAction(payload, api)); } }; // Be compatible with previous design, that is, when tooltip.type is 'axis' and // dispatchAction 'showTip' with seriesIndex and dataIndex will trigger axis pointer // and tooltip. TooltipView.prototype._manuallyAxisShowTip = function (tooltipModel, ecModel, api, payload) { var seriesIndex = payload.seriesIndex; var dataIndex = payload.dataIndex; // @ts-ignore var coordSysAxesInfo = ecModel.getComponent('axisPointer').coordSysAxesInfo; if (seriesIndex == null || dataIndex == null || coordSysAxesInfo == null) { return; } var seriesModel = ecModel.getSeriesByIndex(seriesIndex); if (!seriesModel) { return; } var data = seriesModel.getData(); var tooltipCascadedModel = buildTooltipModel([data.getItemModel(dataIndex), seriesModel, (seriesModel.coordinateSystem || {}).model], this._tooltipModel); if (tooltipCascadedModel.get('trigger') !== 'axis') { return; } api.dispatchAction({ type: 'updateAxisPointer', seriesIndex: seriesIndex, dataIndex: dataIndex, position: payload.position }); return true; }; TooltipView.prototype._tryShow = function (e, dispatchAction) { var el = e.target; var tooltipModel = this._tooltipModel; if (!tooltipModel) { return; } // Save mouse x, mouse y. So we can try to keep showing the tip if chart is refreshed this._lastX = e.offsetX; this._lastY = e.offsetY; var dataByCoordSys = e.dataByCoordSys; if (dataByCoordSys && dataByCoordSys.length) { this._showAxisTooltip(dataByCoordSys, e); } else if (el) { var ecData = getECData(el); if (ecData.ssrType === 'legend') { // Don't trigger tooltip for legend tooltip item return; } this._lastDataByCoordSys = null; var seriesDispatcher_1; var cmptDispatcher_1; findEventDispatcher(el, function (target) { // Always show item tooltip if mouse is on the element with dataIndex if (getECData(target).dataIndex != null) { seriesDispatcher_1 = target; return true; } // Tooltip provided directly. Like legend. if (getECData(target).tooltipConfig != null) { cmptDispatcher_1 = target; return true; } }, true); if (seriesDispatcher_1) { this._showSeriesItemTooltip(e, seriesDispatcher_1, dispatchAction); } else if (cmptDispatcher_1) { this._showComponentItemTooltip(e, cmptDispatcher_1, dispatchAction); } else { this._hide(dispatchAction); } } else { this._lastDataByCoordSys = null; this._hide(dispatchAction); } }; TooltipView.prototype._showOrMove = function (tooltipModel, cb) { // showDelay is used in this case: tooltip.enterable is set // as true. User intent to move mouse into tooltip and click // something. `showDelay` makes it easier to enter the content // but tooltip do not move immediately. var delay = tooltipModel.get('showDelay'); cb = Object(core_util["bind"])(cb, this); clearTimeout(this._showTimout); delay > 0 ? this._showTimout = setTimeout(cb, delay) : cb(); }; TooltipView.prototype._showAxisTooltip = function (dataByCoordSys, e) { var ecModel = this._ecModel; var globalTooltipModel = this._tooltipModel; var point = [e.offsetX, e.offsetY]; var singleTooltipModel = buildTooltipModel([e.tooltipOption], globalTooltipModel); var renderMode = this._renderMode; var cbParamsList = []; var articleMarkup = createTooltipMarkup('section', { blocks: [], noHeader: true }); // Only for legacy: `Serise['formatTooltip']` returns a string. var markupTextArrLegacy = []; var markupStyleCreator = new tooltipMarkup_TooltipMarkupStyleCreator(); Object(core_util["each"])(dataByCoordSys, function (itemCoordSys) { Object(core_util["each"])(itemCoordSys.dataByAxis, function (axisItem) { var axisModel = ecModel.getComponent(axisItem.axisDim + 'Axis', axisItem.axisIndex); var axisValue = axisItem.value; if (!axisModel || axisValue == null) { return; } var axisValueLabel = getValueLabel(axisValue, axisModel.axis, ecModel, axisItem.seriesDataIndices, axisItem.valueLabelOpt); var axisSectionMarkup = createTooltipMarkup('section', { header: axisValueLabel, noHeader: !Object(core_util["trim"])(axisValueLabel), sortBlocks: true, blocks: [] }); articleMarkup.blocks.push(axisSectionMarkup); Object(core_util["each"])(axisItem.seriesDataIndices, function (idxItem) { var series = ecModel.getSeriesByIndex(idxItem.seriesIndex); var dataIndex = idxItem.dataIndexInside; var cbParams = series.getDataParams(dataIndex); // Can't find data. if (cbParams.dataIndex < 0) { return; } cbParams.axisDim = axisItem.axisDim; cbParams.axisIndex = axisItem.axisIndex; cbParams.axisType = axisItem.axisType; cbParams.axisId = axisItem.axisId; cbParams.axisValue = getAxisRawValue(axisModel.axis, { value: axisValue }); cbParams.axisValueLabel = axisValueLabel; // Pre-create marker style for makers. Users can assemble richText // text in `formatter` callback and use those markers style. cbParams.marker = markupStyleCreator.makeTooltipMarker('item', convertToColorString(cbParams.color), renderMode); var seriesTooltipResult = normalizeTooltipFormatResult(series.formatTooltip(dataIndex, true, null)); var frag = seriesTooltipResult.frag; if (frag) { var valueFormatter = buildTooltipModel([series], globalTooltipModel).get('valueFormatter'); axisSectionMarkup.blocks.push(valueFormatter ? Object(core_util["extend"])({ valueFormatter: valueFormatter }, frag) : frag); } if (seriesTooltipResult.text) { markupTextArrLegacy.push(seriesTooltipResult.text); } cbParamsList.push(cbParams); }); }); }); // In most cases, the second axis is displays upper on the first one. // So we reverse it to look better. articleMarkup.blocks.reverse(); markupTextArrLegacy.reverse(); var positionExpr = e.position; var orderMode = singleTooltipModel.get('order'); var builtMarkupText = buildTooltipMarkup(articleMarkup, markupStyleCreator, renderMode, orderMode, ecModel.get('useUTC'), singleTooltipModel.get('textStyle')); builtMarkupText && markupTextArrLegacy.unshift(builtMarkupText); var blockBreak = renderMode === 'richText' ? '\n\n' : '
    '; var allMarkupText = markupTextArrLegacy.join(blockBreak); this._showOrMove(singleTooltipModel, function () { if (this._updateContentNotChangedOnAxis(dataByCoordSys, cbParamsList)) { this._updatePosition(singleTooltipModel, positionExpr, point[0], point[1], this._tooltipContent, cbParamsList); } else { this._showTooltipContent(singleTooltipModel, allMarkupText, cbParamsList, Math.random() + '', point[0], point[1], positionExpr, null, markupStyleCreator); } }); // Do not trigger events here, because this branch only be entered // from dispatchAction. }; TooltipView.prototype._showSeriesItemTooltip = function (e, dispatcher, dispatchAction) { var ecModel = this._ecModel; var ecData = getECData(dispatcher); // Use dataModel in element if possible // Used when mouseover on a element like markPoint or edge // In which case, the data is not main data in series. var seriesIndex = ecData.seriesIndex; var seriesModel = ecModel.getSeriesByIndex(seriesIndex); // For example, graph link. var dataModel = ecData.dataModel || seriesModel; var dataIndex = ecData.dataIndex; var dataType = ecData.dataType; var data = dataModel.getData(dataType); var renderMode = this._renderMode; var positionDefault = e.positionDefault; var tooltipModel = buildTooltipModel([data.getItemModel(dataIndex), dataModel, seriesModel && (seriesModel.coordinateSystem || {}).model], this._tooltipModel, positionDefault ? { position: positionDefault } : null); var tooltipTrigger = tooltipModel.get('trigger'); if (tooltipTrigger != null && tooltipTrigger !== 'item') { return; } var params = dataModel.getDataParams(dataIndex, dataType); var markupStyleCreator = new tooltipMarkup_TooltipMarkupStyleCreator(); // Pre-create marker style for makers. Users can assemble richText // text in `formatter` callback and use those markers style. params.marker = markupStyleCreator.makeTooltipMarker('item', convertToColorString(params.color), renderMode); var seriesTooltipResult = normalizeTooltipFormatResult(dataModel.formatTooltip(dataIndex, false, dataType)); var orderMode = tooltipModel.get('order'); var valueFormatter = tooltipModel.get('valueFormatter'); var frag = seriesTooltipResult.frag; var markupText = frag ? buildTooltipMarkup(valueFormatter ? Object(core_util["extend"])({ valueFormatter: valueFormatter }, frag) : frag, markupStyleCreator, renderMode, orderMode, ecModel.get('useUTC'), tooltipModel.get('textStyle')) : seriesTooltipResult.text; var asyncTicket = 'item_' + dataModel.name + '_' + dataIndex; this._showOrMove(tooltipModel, function () { this._showTooltipContent(tooltipModel, markupText, params, asyncTicket, e.offsetX, e.offsetY, e.position, e.target, markupStyleCreator); }); // FIXME // duplicated showtip if manuallyShowTip is called from dispatchAction. dispatchAction({ type: 'showTip', dataIndexInside: dataIndex, dataIndex: data.getRawIndex(dataIndex), seriesIndex: seriesIndex, from: this.uid }); }; TooltipView.prototype._showComponentItemTooltip = function (e, el, dispatchAction) { var isHTMLRenderMode = this._renderMode === 'html'; var ecData = getECData(el); var tooltipConfig = ecData.tooltipConfig; var tooltipOpt = tooltipConfig.option || {}; var encodeHTMLContent = tooltipOpt.encodeHTMLContent; if (Object(core_util["isString"])(tooltipOpt)) { var content = tooltipOpt; tooltipOpt = { content: content, // Fixed formatter formatter: content }; // when `tooltipConfig.option` is a string rather than an object, // we can't know if the content needs to be encoded // for the sake of security, encode it by default. encodeHTMLContent = true; } if (encodeHTMLContent && isHTMLRenderMode && tooltipOpt.content) { // clone might be unnecessary? tooltipOpt = Object(core_util["clone"])(tooltipOpt); tooltipOpt.content = encodeHTML(tooltipOpt.content); } var tooltipModelCascade = [tooltipOpt]; var cmpt = this._ecModel.getComponent(ecData.componentMainType, ecData.componentIndex); if (cmpt) { tooltipModelCascade.push(cmpt); } // In most cases, component tooltip formatter has different params with series tooltip formatter, // so that they cannot share the same formatter. Since the global tooltip formatter is used for series // by convention, we do not use it as the default formatter for component. tooltipModelCascade.push({ formatter: tooltipOpt.content }); var positionDefault = e.positionDefault; var subTooltipModel = buildTooltipModel(tooltipModelCascade, this._tooltipModel, positionDefault ? { position: positionDefault } : null); var defaultHtml = subTooltipModel.get('content'); var asyncTicket = Math.random() + ''; // PENDING: this case do not support richText style yet. var markupStyleCreator = new tooltipMarkup_TooltipMarkupStyleCreator(); // Do not check whether `trigger` is 'none' here, because `trigger` // only works on coordinate system. In fact, we have not found case // that requires setting `trigger` nothing on component yet. this._showOrMove(subTooltipModel, function () { // Use formatterParams from element defined in component // Avoid users modify it. var formatterParams = Object(core_util["clone"])(subTooltipModel.get('formatterParams') || {}); this._showTooltipContent(subTooltipModel, defaultHtml, formatterParams, asyncTicket, e.offsetX, e.offsetY, e.position, el, markupStyleCreator); }); // If not dispatch showTip, tip may be hide triggered by axis. dispatchAction({ type: 'showTip', from: this.uid }); }; TooltipView.prototype._showTooltipContent = function ( // Use Model insteadof TooltipModel because this model may be from series or other options. // Instead of top level tooltip. tooltipModel, defaultHtml, params, asyncTicket, x, y, positionExpr, el, markupStyleCreator) { // Reset ticket this._ticket = ''; if (!tooltipModel.get('showContent') || !tooltipModel.get('show')) { return; } var tooltipContent = this._tooltipContent; tooltipContent.setEnterable(tooltipModel.get('enterable')); var formatter = tooltipModel.get('formatter'); positionExpr = positionExpr || tooltipModel.get('position'); var html = defaultHtml; var nearPoint = this._getNearestPoint([x, y], params, tooltipModel.get('trigger'), tooltipModel.get('borderColor')); var nearPointColor = nearPoint.color; if (formatter) { if (Object(core_util["isString"])(formatter)) { var useUTC = tooltipModel.ecModel.get('useUTC'); var params0 = Object(core_util["isArray"])(params) ? params[0] : params; var isTimeAxis = params0 && params0.axisType && params0.axisType.indexOf('time') >= 0; html = formatter; if (isTimeAxis) { html = format(params0.axisValue, html, useUTC); } html = formatTpl(html, params, true); } else if (Object(core_util["isFunction"])(formatter)) { var callback = Object(core_util["bind"])(function (cbTicket, html) { if (cbTicket === this._ticket) { tooltipContent.setContent(html, markupStyleCreator, tooltipModel, nearPointColor, positionExpr); this._updatePosition(tooltipModel, positionExpr, x, y, tooltipContent, params, el); } }, this); this._ticket = asyncTicket; html = formatter(params, asyncTicket, callback); } else { html = formatter; } } tooltipContent.setContent(html, markupStyleCreator, tooltipModel, nearPointColor, positionExpr); tooltipContent.show(tooltipModel, nearPointColor); this._updatePosition(tooltipModel, positionExpr, x, y, tooltipContent, params, el); }; TooltipView.prototype._getNearestPoint = function (point, tooltipDataParams, trigger, borderColor) { if (trigger === 'axis' || Object(core_util["isArray"])(tooltipDataParams)) { return { color: borderColor || (this._renderMode === 'html' ? '#fff' : 'none') }; } if (!Object(core_util["isArray"])(tooltipDataParams)) { return { color: borderColor || tooltipDataParams.color || tooltipDataParams.borderColor }; } }; TooltipView.prototype._updatePosition = function (tooltipModel, positionExpr, x, // Mouse x y, // Mouse y content, params, el) { var viewWidth = this._api.getWidth(); var viewHeight = this._api.getHeight(); positionExpr = positionExpr || tooltipModel.get('position'); var contentSize = content.getSize(); var align = tooltipModel.get('align'); var vAlign = tooltipModel.get('verticalAlign'); var rect = el && el.getBoundingRect().clone(); el && rect.applyTransform(el.transform); if (Object(core_util["isFunction"])(positionExpr)) { // Callback of position can be an array or a string specify the position positionExpr = positionExpr([x, y], params, content.el, rect, { viewSize: [viewWidth, viewHeight], contentSize: contentSize.slice() }); } if (Object(core_util["isArray"])(positionExpr)) { x = number_parsePercent(positionExpr[0], viewWidth); y = number_parsePercent(positionExpr[1], viewHeight); } else if (Object(core_util["isObject"])(positionExpr)) { var boxLayoutPosition = positionExpr; boxLayoutPosition.width = contentSize[0]; boxLayoutPosition.height = contentSize[1]; var layoutRect = getLayoutRect(boxLayoutPosition, { width: viewWidth, height: viewHeight }); x = layoutRect.x; y = layoutRect.y; align = null; // When positionExpr is left/top/right/bottom, // align and verticalAlign will not work. vAlign = null; } // Specify tooltip position by string 'top' 'bottom' 'left' 'right' around graphic element else if (Object(core_util["isString"])(positionExpr) && el) { var pos = calcTooltipPosition(positionExpr, rect, contentSize, tooltipModel.get('borderWidth')); x = pos[0]; y = pos[1]; } else { var pos = refixTooltipPosition(x, y, content, viewWidth, viewHeight, align ? null : 20, vAlign ? null : 20); x = pos[0]; y = pos[1]; } align && (x -= isCenterAlign(align) ? contentSize[0] / 2 : align === 'right' ? contentSize[0] : 0); vAlign && (y -= isCenterAlign(vAlign) ? contentSize[1] / 2 : vAlign === 'bottom' ? contentSize[1] : 0); if (shouldTooltipConfine(tooltipModel)) { var pos = confineTooltipPosition(x, y, content, viewWidth, viewHeight); x = pos[0]; y = pos[1]; } content.moveTo(x, y); }; // FIXME // Should we remove this but leave this to user? TooltipView.prototype._updateContentNotChangedOnAxis = function (dataByCoordSys, cbParamsList) { var lastCoordSys = this._lastDataByCoordSys; var lastCbParamsList = this._cbParamsList; var contentNotChanged = !!lastCoordSys && lastCoordSys.length === dataByCoordSys.length; contentNotChanged && Object(core_util["each"])(lastCoordSys, function (lastItemCoordSys, indexCoordSys) { var lastDataByAxis = lastItemCoordSys.dataByAxis || []; var thisItemCoordSys = dataByCoordSys[indexCoordSys] || {}; var thisDataByAxis = thisItemCoordSys.dataByAxis || []; contentNotChanged = contentNotChanged && lastDataByAxis.length === thisDataByAxis.length; contentNotChanged && Object(core_util["each"])(lastDataByAxis, function (lastItem, indexAxis) { var thisItem = thisDataByAxis[indexAxis] || {}; var lastIndices = lastItem.seriesDataIndices || []; var newIndices = thisItem.seriesDataIndices || []; contentNotChanged = contentNotChanged && lastItem.value === thisItem.value && lastItem.axisType === thisItem.axisType && lastItem.axisId === thisItem.axisId && lastIndices.length === newIndices.length; contentNotChanged && Object(core_util["each"])(lastIndices, function (lastIdxItem, j) { var newIdxItem = newIndices[j]; contentNotChanged = contentNotChanged && lastIdxItem.seriesIndex === newIdxItem.seriesIndex && lastIdxItem.dataIndex === newIdxItem.dataIndex; }); // check is cbParams data value changed lastCbParamsList && Object(core_util["each"])(lastItem.seriesDataIndices, function (idxItem) { var seriesIdx = idxItem.seriesIndex; var cbParams = cbParamsList[seriesIdx]; var lastCbParams = lastCbParamsList[seriesIdx]; if (cbParams && lastCbParams && lastCbParams.data !== cbParams.data) { contentNotChanged = false; } }); }); }); this._lastDataByCoordSys = dataByCoordSys; this._cbParamsList = cbParamsList; return !!contentNotChanged; }; TooltipView.prototype._hide = function (dispatchAction) { // Do not directly hideLater here, because this behavior may be prevented // in dispatchAction when showTip is dispatched. // FIXME // duplicated hideTip if manuallyHideTip is called from dispatchAction. this._lastDataByCoordSys = null; dispatchAction({ type: 'hideTip', from: this.uid }); }; TooltipView.prototype.dispose = function (ecModel, api) { if (core_env["a" /* default */].node || !api.getDom()) { return; } clear(this, '_updatePosition'); this._tooltipContent.dispose(); unregister('itemTooltip', api); }; TooltipView.type = 'tooltip'; return TooltipView; }(view_Component); /** * From top to bottom. (the last one should be globalTooltipModel); */ function buildTooltipModel(modelCascade, globalTooltipModel, defaultTooltipOption) { // Last is always tooltip model. var ecModel = globalTooltipModel.ecModel; var resultModel; if (defaultTooltipOption) { resultModel = new model_Model(defaultTooltipOption, ecModel, ecModel); resultModel = new model_Model(globalTooltipModel.option, resultModel, ecModel); } else { resultModel = globalTooltipModel; } for (var i = modelCascade.length - 1; i >= 0; i--) { var tooltipOpt = modelCascade[i]; if (tooltipOpt) { if (tooltipOpt instanceof model_Model) { tooltipOpt = tooltipOpt.get('tooltip', true); } // In each data item tooltip can be simply write: // { // value: 10, // tooltip: 'Something you need to know' // } if (Object(core_util["isString"])(tooltipOpt)) { tooltipOpt = { formatter: tooltipOpt }; } if (tooltipOpt) { resultModel = new model_Model(tooltipOpt, resultModel, ecModel); } } } return resultModel; } function TooltipView_makeDispatchAction(payload, api) { return payload.dispatchAction || Object(core_util["bind"])(api.dispatchAction, api); } function refixTooltipPosition(x, y, content, viewWidth, viewHeight, gapH, gapV) { var size = content.getSize(); var width = size[0]; var height = size[1]; if (gapH != null) { // Add extra 2 pixels for this case: // At present the "values" in default tooltip are using CSS `float: right`. // When the right edge of the tooltip box is on the right side of the // viewport, the `float` layout might push the "values" to the second line. if (x + width + gapH + 2 > viewWidth) { x -= width + gapH; } else { x += gapH; } } if (gapV != null) { if (y + height + gapV > viewHeight) { y -= height + gapV; } else { y += gapV; } } return [x, y]; } function confineTooltipPosition(x, y, content, viewWidth, viewHeight) { var size = content.getSize(); var width = size[0]; var height = size[1]; x = Math.min(x + width, viewWidth) - width; y = Math.min(y + height, viewHeight) - height; x = Math.max(x, 0); y = Math.max(y, 0); return [x, y]; } function calcTooltipPosition(position, rect, contentSize, borderWidth) { var domWidth = contentSize[0]; var domHeight = contentSize[1]; var offset = Math.ceil(Math.SQRT2 * borderWidth) + 8; var x = 0; var y = 0; var rectWidth = rect.width; var rectHeight = rect.height; switch (position) { case 'inside': x = rect.x + rectWidth / 2 - domWidth / 2; y = rect.y + rectHeight / 2 - domHeight / 2; break; case 'top': x = rect.x + rectWidth / 2 - domWidth / 2; y = rect.y - domHeight - offset; break; case 'bottom': x = rect.x + rectWidth / 2 - domWidth / 2; y = rect.y + rectHeight + offset; break; case 'left': x = rect.x - domWidth - offset; y = rect.y + rectHeight / 2 - domHeight / 2; break; case 'right': x = rect.x + rectWidth + offset; y = rect.y + rectHeight / 2 - domHeight / 2; } return [x, y]; } function isCenterAlign(align) { return align === 'center' || align === 'middle'; } /** * Find target component by payload like: * ```js * { legendId: 'some_id', name: 'xxx' } * { toolboxIndex: 1, name: 'xxx' } * { geoName: 'some_name', name: 'xxx' } * ``` * PENDING: at present only * * If not found, return null/undefined. */ function findComponentReference(payload, ecModel, api) { var queryOptionMap = preParseFinder(payload).queryOptionMap; var componentMainType = queryOptionMap.keys()[0]; if (!componentMainType || componentMainType === 'series') { return; } var queryResult = queryReferringComponents(ecModel, componentMainType, queryOptionMap.get(componentMainType), { useDefault: false, enableAll: false, enableNone: false }); var model = queryResult.models[0]; if (!model) { return; } var view = api.getViewOfComponentModel(model); var el; view.group.traverse(function (subEl) { var tooltipConfig = getECData(subEl).tooltipConfig; if (tooltipConfig && tooltipConfig.name === payload.name) { el = subEl; return true; // stop } }); if (el) { return { componentMainType: componentMainType, componentIndex: model.componentIndex, el: el }; } } /* harmony default export */ var tooltip_TooltipView = (TooltipView_TooltipView); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/tooltip/install.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 tooltip_install_install(registers) { use(axisPointer_install_install); registers.registerComponentModel(tooltip_TooltipModel); registers.registerComponentView(tooltip_TooltipView); /** * @action * @property {string} type * @property {number} seriesIndex * @property {number} dataIndex * @property {number} [x] * @property {number} [y] */ registers.registerAction({ type: 'showTip', event: 'showTip', update: 'tooltip:manuallyShowTip' }, core_util["noop"]); registers.registerAction({ type: 'hideTip', event: 'hideTip', update: 'tooltip:manuallyHideTip' }, core_util["noop"]); } // CONCATENATED MODULE: ./node_modules/echarts/lib/component/brush/preprocessor.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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_TOOLBOX_BTNS = ['rect', 'polygon', 'keep', 'clear']; function brushPreprocessor(option, isNew) { var brushComponents = normalizeToArray(option ? option.brush : []); if (!brushComponents.length) { return; } var brushComponentSpecifiedBtns = []; core_util["each"](brushComponents, function (brushOpt) { var tbs = brushOpt.hasOwnProperty('toolbox') ? brushOpt.toolbox : []; if (tbs instanceof Array) { brushComponentSpecifiedBtns = brushComponentSpecifiedBtns.concat(tbs); } }); var toolbox = option && option.toolbox; if (core_util["isArray"](toolbox)) { toolbox = toolbox[0]; } if (!toolbox) { toolbox = { feature: {} }; option.toolbox = [toolbox]; } var toolboxFeature = toolbox.feature || (toolbox.feature = {}); var toolboxBrush = toolboxFeature.brush || (toolboxFeature.brush = {}); var brushTypes = toolboxBrush.type || (toolboxBrush.type = []); brushTypes.push.apply(brushTypes, brushComponentSpecifiedBtns); removeDuplicate(brushTypes); if (isNew && !brushTypes.length) { brushTypes.push.apply(brushTypes, DEFAULT_TOOLBOX_BTNS); } } function removeDuplicate(arr) { var map = {}; core_util["each"](arr, function (val) { map[val] = 1; }); arr.length = 0; core_util["each"](map, function (flag, val) { arr.push(val); }); } // CONCATENATED MODULE: ./node_modules/echarts/lib/visual/visualSolution.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ /** * @file Visual solution, for consistent option specification. */ var visualSolution_each = core_util["each"]; function hasKeys(obj) { if (obj) { for (var name_1 in obj) { if (obj.hasOwnProperty(name_1)) { return true; } } } } function createVisualMappings(option, stateList, supplementVisualOption) { var visualMappings = {}; visualSolution_each(stateList, function (state) { var mappings = visualMappings[state] = createMappings(); visualSolution_each(option[state], function (visualData, visualType) { if (!visual_VisualMapping.isValidType(visualType)) { return; } var mappingOption = { type: visualType, visual: visualData }; supplementVisualOption && supplementVisualOption(mappingOption, state); mappings[visualType] = new visual_VisualMapping(mappingOption); // Prepare a alpha for opacity, for some case that opacity // is not supported, such as rendering using gradient color. if (visualType === 'opacity') { mappingOption = core_util["clone"](mappingOption); mappingOption.type = 'colorAlpha'; mappings.__hidden.__alphaForOpacity = new visual_VisualMapping(mappingOption); } }); }); return visualMappings; function createMappings() { var Creater = function () {}; // Make sure hidden fields will not be visited by // object iteration (with hasOwnProperty checking). Creater.prototype.__hidden = Creater.prototype; var obj = new Creater(); return obj; } } function replaceVisualOption(thisOption, newOption, keys) { // Visual attributes merge is not supported, otherwise it // brings overcomplicated merge logic. See #2853. So if // newOption has anyone of these keys, all of these keys // will be reset. Otherwise, all keys remain. var has; core_util["each"](keys, function (key) { if (newOption.hasOwnProperty(key) && hasKeys(newOption[key])) { has = true; } }); has && core_util["each"](keys, function (key) { if (newOption.hasOwnProperty(key) && hasKeys(newOption[key])) { thisOption[key] = core_util["clone"](newOption[key]); } else { delete thisOption[key]; } }); } /** * @param stateList * @param visualMappings * @param list * @param getValueState param: valueOrIndex, return: state. * @param scope Scope for getValueState * @param dimension Concrete dimension, if used. */ // ???! handle brush? function applyVisual(stateList, visualMappings, data, getValueState, scope, dimension) { var visualTypesMap = {}; core_util["each"](stateList, function (state) { var visualTypes = visual_VisualMapping.prepareVisualTypes(visualMappings[state]); visualTypesMap[state] = visualTypes; }); var dataIndex; function getVisual(key) { return getItemVisualFromData(data, dataIndex, key); } function setVisual(key, value) { setItemVisualFromData(data, dataIndex, key, value); } if (dimension == null) { data.each(eachItem); } else { data.each([dimension], eachItem); } function eachItem(valueOrIndex, index) { dataIndex = dimension == null ? valueOrIndex // First argument is index : index; var rawDataItem = data.getRawDataItem(dataIndex); // Consider performance // @ts-ignore if (rawDataItem && rawDataItem.visualMap === false) { return; } var valueState = getValueState.call(scope, valueOrIndex); var mappings = visualMappings[valueState]; var visualTypes = visualTypesMap[valueState]; for (var i = 0, len = visualTypes.length; i < len; i++) { var type = visualTypes[i]; mappings[type] && mappings[type].applyVisual(valueOrIndex, getVisual, setVisual); } } } /** * @param data * @param stateList * @param visualMappings > * @param getValueState param: valueOrIndex, return: state. * @param dim dimension or dimension index. */ function incrementalApplyVisual(stateList, visualMappings, getValueState, dim) { var visualTypesMap = {}; core_util["each"](stateList, function (state) { var visualTypes = visual_VisualMapping.prepareVisualTypes(visualMappings[state]); visualTypesMap[state] = visualTypes; }); return { progress: function progress(params, data) { var dimIndex; if (dim != null) { dimIndex = data.getDimensionIndex(dim); } function getVisual(key) { return getItemVisualFromData(data, dataIndex, key); } function setVisual(key, value) { setItemVisualFromData(data, dataIndex, key, value); } var dataIndex; var store = data.getStore(); while ((dataIndex = params.next()) != null) { var rawDataItem = data.getRawDataItem(dataIndex); // Consider performance // @ts-ignore if (rawDataItem && rawDataItem.visualMap === false) { continue; } var value = dim != null ? store.get(dimIndex, dataIndex) : dataIndex; var valueState = getValueState(value); var mappings = visualMappings[valueState]; var visualTypes = visualTypesMap[valueState]; for (var i = 0, len = visualTypes.length; i < len; i++) { var type = visualTypes[i]; mappings[type] && mappings[type].applyVisual(value, getVisual, setVisual); } } } }; } // CONCATENATED MODULE: ./node_modules/echarts/lib/component/brush/selector.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 makeBrushCommonSelectorForSeries(area) { var brushType = area.brushType; // Do not use function binding or curry for performance. var selectors = { point: function (itemLayout) { return selector_selector[brushType].point(itemLayout, selectors, area); }, rect: function (itemLayout) { return selector_selector[brushType].rect(itemLayout, selectors, area); } }; return selectors; } var selector_selector = { lineX: getLineSelectors(0), lineY: getLineSelectors(1), rect: { point: function (itemLayout, selectors, area) { return itemLayout && area.boundingRect.contain(itemLayout[0], itemLayout[1]); }, rect: function (itemLayout, selectors, area) { return itemLayout && area.boundingRect.intersect(itemLayout); } }, polygon: { point: function (itemLayout, selectors, area) { return itemLayout && area.boundingRect.contain(itemLayout[0], itemLayout[1]) && polygon_contain(area.range, itemLayout[0], itemLayout[1]); }, rect: function (itemLayout, selectors, area) { var points = area.range; if (!itemLayout || points.length <= 1) { return false; } var x = itemLayout.x; var y = itemLayout.y; var width = itemLayout.width; var height = itemLayout.height; var p = points[0]; if (polygon_contain(points, x, y) || polygon_contain(points, x + width, y) || polygon_contain(points, x, y + height) || polygon_contain(points, x + width, y + height) || core_BoundingRect.create(itemLayout).contain(p[0], p[1]) || linePolygonIntersect(x, y, x + width, y, points) || linePolygonIntersect(x, y, x, y + height, points) || linePolygonIntersect(x + width, y, x + width, y + height, points) || linePolygonIntersect(x, y + height, x + width, y + height, points)) { return true; } } } }; function getLineSelectors(xyIndex) { var xy = ['x', 'y']; var wh = ['width', 'height']; return { point: function (itemLayout, selectors, area) { if (itemLayout) { var range = area.range; var p = itemLayout[xyIndex]; return inLineRange(p, range); } }, rect: function (itemLayout, selectors, area) { if (itemLayout) { var range = area.range; var layoutRange = [itemLayout[xy[xyIndex]], itemLayout[xy[xyIndex]] + itemLayout[wh[xyIndex]]]; layoutRange[1] < layoutRange[0] && layoutRange.reverse(); return inLineRange(layoutRange[0], range) || inLineRange(layoutRange[1], range) || inLineRange(range[0], layoutRange) || inLineRange(range[1], layoutRange); } } }; } function inLineRange(p, range) { return range[0] <= p && p <= range[1]; } /* harmony default export */ var brush_selector = (selector_selector); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/brush/visualEncoding.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 STATE_LIST = ['inBrush', 'outOfBrush']; var DISPATCH_METHOD = '__ecBrushSelect'; var DISPATCH_FLAG = '__ecInBrushSelectEvent'; ; function layoutCovers(ecModel) { ecModel.eachComponent({ mainType: 'brush' }, function (brushModel) { var brushTargetManager = brushModel.brushTargetManager = new helper_BrushTargetManager(brushModel.option, ecModel); brushTargetManager.setInputRanges(brushModel.areas, ecModel); }); } /** * Register the visual encoding if this modules required. */ function brushVisual(ecModel, api, payload) { var brushSelected = []; var throttleType; var throttleDelay; ecModel.eachComponent({ mainType: 'brush' }, function (brushModel) { payload && payload.type === 'takeGlobalCursor' && brushModel.setBrushOption(payload.key === 'brush' ? payload.brushOption : { brushType: false }); }); layoutCovers(ecModel); ecModel.eachComponent({ mainType: 'brush' }, function (brushModel, brushIndex) { var thisBrushSelected = { brushId: brushModel.id, brushIndex: brushIndex, brushName: brushModel.name, areas: core_util["clone"](brushModel.areas), selected: [] }; // Every brush component exists in event params, convenient // for user to find by index. brushSelected.push(thisBrushSelected); var brushOption = brushModel.option; var brushLink = brushOption.brushLink; var linkedSeriesMap = []; var selectedDataIndexForLink = []; var rangeInfoBySeries = []; var hasBrushExists = false; if (!brushIndex) { // Only the first throttle setting works. throttleType = brushOption.throttleType; throttleDelay = brushOption.throttleDelay; } // Add boundingRect and selectors to range. var areas = core_util["map"](brushModel.areas, function (area) { var builder = boundingRectBuilders[area.brushType]; var selectableArea = core_util["defaults"]({ boundingRect: builder ? builder(area) : void 0 }, area); selectableArea.selectors = makeBrushCommonSelectorForSeries(selectableArea); return selectableArea; }); var visualMappings = createVisualMappings(brushModel.option, STATE_LIST, function (mappingOption) { mappingOption.mappingMethod = 'fixed'; }); core_util["isArray"](brushLink) && core_util["each"](brushLink, function (seriesIndex) { linkedSeriesMap[seriesIndex] = 1; }); function linkOthers(seriesIndex) { return brushLink === 'all' || !!linkedSeriesMap[seriesIndex]; } // If no supported brush or no brush on the series, // all visuals should be in original state. function brushed(rangeInfoList) { return !!rangeInfoList.length; } /** * Logic for each series: (If the logic has to be modified one day, do it carefully!) * * ( brushed ┬ && ┬hasBrushExist ┬ && linkOthers ) => StepA: ┬record, ┬ StepB: ┬visualByRecord. * !brushed┘ ├hasBrushExist ┤ └nothing,┘ ├visualByRecord. * └!hasBrushExist┘ └nothing. * ( !brushed && ┬hasBrushExist ┬ && linkOthers ) => StepA: nothing, StepB: ┬visualByRecord. * └!hasBrushExist┘ └nothing. * ( brushed ┬ && !linkOthers ) => StepA: nothing, StepB: ┬visualByCheck. * !brushed┘ └nothing. * ( !brushed && !linkOthers ) => StepA: nothing, StepB: nothing. */ // Step A ecModel.eachSeries(function (seriesModel, seriesIndex) { var rangeInfoList = rangeInfoBySeries[seriesIndex] = []; seriesModel.subType === 'parallel' ? stepAParallel(seriesModel, seriesIndex) : stepAOthers(seriesModel, seriesIndex, rangeInfoList); }); function stepAParallel(seriesModel, seriesIndex) { var coordSys = seriesModel.coordinateSystem; hasBrushExists = hasBrushExists || coordSys.hasAxisBrushed(); linkOthers(seriesIndex) && coordSys.eachActiveState(seriesModel.getData(), function (activeState, dataIndex) { activeState === 'active' && (selectedDataIndexForLink[dataIndex] = 1); }); } function stepAOthers(seriesModel, seriesIndex, rangeInfoList) { if (!seriesModel.brushSelector || brushModelNotControll(brushModel, seriesIndex)) { return; } core_util["each"](areas, function (area) { if (brushModel.brushTargetManager.controlSeries(area, seriesModel, ecModel)) { rangeInfoList.push(area); } hasBrushExists = hasBrushExists || brushed(rangeInfoList); }); if (linkOthers(seriesIndex) && brushed(rangeInfoList)) { var data_1 = seriesModel.getData(); data_1.each(function (dataIndex) { if (checkInRange(seriesModel, rangeInfoList, data_1, dataIndex)) { selectedDataIndexForLink[dataIndex] = 1; } }); } } // Step B ecModel.eachSeries(function (seriesModel, seriesIndex) { var seriesBrushSelected = { seriesId: seriesModel.id, seriesIndex: seriesIndex, seriesName: seriesModel.name, dataIndex: [] }; // Every series exists in event params, convenient // for user to find series by seriesIndex. thisBrushSelected.selected.push(seriesBrushSelected); var rangeInfoList = rangeInfoBySeries[seriesIndex]; var data = seriesModel.getData(); var getValueState = linkOthers(seriesIndex) ? function (dataIndex) { return selectedDataIndexForLink[dataIndex] ? (seriesBrushSelected.dataIndex.push(data.getRawIndex(dataIndex)), 'inBrush') : 'outOfBrush'; } : function (dataIndex) { return checkInRange(seriesModel, rangeInfoList, data, dataIndex) ? (seriesBrushSelected.dataIndex.push(data.getRawIndex(dataIndex)), 'inBrush') : 'outOfBrush'; }; // If no supported brush or no brush, all visuals are in original state. (linkOthers(seriesIndex) ? hasBrushExists : brushed(rangeInfoList)) && applyVisual(STATE_LIST, visualMappings, data, getValueState); }); }); visualEncoding_dispatchAction(api, throttleType, throttleDelay, brushSelected, payload); } ; function visualEncoding_dispatchAction(api, throttleType, throttleDelay, brushSelected, payload) { // This event will not be triggered when `setOpion`, otherwise dead lock may // triggered when do `setOption` in event listener, which we do not find // satisfactory way to solve yet. Some considered resolutions: // (a) Diff with prevoius selected data ant only trigger event when changed. // But store previous data and diff precisely (i.e., not only by dataIndex, but // also detect value changes in selected data) might bring complexity or fragility. // (b) Use spectial param like `silent` to suppress event triggering. // But such kind of volatile param may be weird in `setOption`. if (!payload) { return; } var zr = api.getZr(); if (zr[DISPATCH_FLAG]) { return; } if (!zr[DISPATCH_METHOD]) { zr[DISPATCH_METHOD] = doDispatch; } var fn = createOrUpdate(zr, DISPATCH_METHOD, throttleDelay, throttleType); fn(api, brushSelected); } function doDispatch(api, brushSelected) { if (!api.isDisposed()) { var zr = api.getZr(); zr[DISPATCH_FLAG] = true; api.dispatchAction({ type: 'brushSelect', batch: brushSelected }); zr[DISPATCH_FLAG] = false; } } function checkInRange(seriesModel, rangeInfoList, data, dataIndex) { for (var i = 0, len = rangeInfoList.length; i < len; i++) { var area = rangeInfoList[i]; if (seriesModel.brushSelector(dataIndex, data, area.selectors, area)) { return true; } } } function brushModelNotControll(brushModel, seriesIndex) { var seriesIndices = brushModel.option.seriesIndex; return seriesIndices != null && seriesIndices !== 'all' && (core_util["isArray"](seriesIndices) ? core_util["indexOf"](seriesIndices, seriesIndex) < 0 : seriesIndex !== seriesIndices); } var boundingRectBuilders = { rect: function (area) { return getBoundingRectFromMinMax(area.range); }, polygon: function (area) { var minMax; var range = area.range; for (var i = 0, len = range.length; i < len; i++) { minMax = minMax || [[Infinity, -Infinity], [Infinity, -Infinity]]; var rg = range[i]; rg[0] < minMax[0][0] && (minMax[0][0] = rg[0]); rg[0] > minMax[0][1] && (minMax[0][1] = rg[0]); rg[1] < minMax[1][0] && (minMax[1][0] = rg[1]); rg[1] > minMax[1][1] && (minMax[1][1] = rg[1]); } return minMax && getBoundingRectFromMinMax(minMax); } }; function getBoundingRectFromMinMax(minMax) { return new core_BoundingRect(minMax[0][0], minMax[1][0], minMax[0][1] - minMax[0][0], minMax[1][1] - minMax[1][0]); } // CONCATENATED MODULE: ./node_modules/echarts/lib/component/brush/BrushView.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 BrushView_BrushView = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(BrushView, _super); function BrushView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = BrushView.type; return _this; } BrushView.prototype.init = function (ecModel, api) { this.ecModel = ecModel; this.api = api; this.model; (this._brushController = new helper_BrushController(api.getZr())).on('brush', core_util["bind"](this._onBrush, this)).mount(); }; BrushView.prototype.render = function (brushModel, ecModel, api, payload) { this.model = brushModel; this._updateController(brushModel, ecModel, api, payload); }; BrushView.prototype.updateTransform = function (brushModel, ecModel, api, payload) { // PENDING: `updateTransform` is a little tricky, whose layout need // to be calculate mandatorily and other stages will not be performed. // Take care the correctness of the logic. See #11754 . layoutCovers(ecModel); this._updateController(brushModel, ecModel, api, payload); }; BrushView.prototype.updateVisual = function (brushModel, ecModel, api, payload) { this.updateTransform(brushModel, ecModel, api, payload); }; BrushView.prototype.updateView = function (brushModel, ecModel, api, payload) { this._updateController(brushModel, ecModel, api, payload); }; BrushView.prototype._updateController = function (brushModel, ecModel, api, payload) { // Do not update controller when drawing. (!payload || payload.$from !== brushModel.id) && this._brushController.setPanels(brushModel.brushTargetManager.makePanelOpts(api)).enableBrush(brushModel.brushOption).updateCovers(brushModel.areas.slice()); }; // updateLayout: updateController, // updateVisual: updateController, BrushView.prototype.dispose = function () { this._brushController.dispose(); }; BrushView.prototype._onBrush = function (eventParam) { var modelId = this.model.id; var areas = this.model.brushTargetManager.setOutputRanges(eventParam.areas, this.ecModel); // Action is not dispatched on drag end, because the drag end // emits the same params with the last drag move event, and // may have some delay when using touch pad, which makes // animation not smooth (when using debounce). (!eventParam.isEnd || eventParam.removeOnClick) && this.api.dispatchAction({ type: 'brush', brushId: modelId, areas: core_util["clone"](areas), $from: modelId }); eventParam.isEnd && this.api.dispatchAction({ type: 'brushEnd', brushId: modelId, areas: core_util["clone"](areas), $from: modelId }); }; BrushView.type = 'brush'; return BrushView; }(view_Component); /* harmony default export */ var brush_BrushView = (BrushView_BrushView); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/brush/BrushModel.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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_OUT_OF_BRUSH_COLOR = '#ddd'; var BrushModel_BrushModel = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(BrushModel, _super); function BrushModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = BrushModel.type; /** * @readOnly */ _this.areas = []; /** * Current brush painting area settings. * @readOnly */ _this.brushOption = {}; return _this; } BrushModel.prototype.optionUpdated = function (newOption, isInit) { var thisOption = this.option; !isInit && replaceVisualOption(thisOption, newOption, ['inBrush', 'outOfBrush']); var inBrush = thisOption.inBrush = thisOption.inBrush || {}; // Always give default visual, consider setOption at the second time. thisOption.outOfBrush = thisOption.outOfBrush || { color: DEFAULT_OUT_OF_BRUSH_COLOR }; if (!inBrush.hasOwnProperty('liftZ')) { // Bigger than the highlight z lift, otherwise it will // be effected by the highlight z when brush. inBrush.liftZ = 5; } }; /** * If `areas` is null/undefined, range state remain. */ BrushModel.prototype.setAreas = function (areas) { if (false) { zrUtil.assert(zrUtil.isArray(areas)); zrUtil.each(areas, function (area) { zrUtil.assert(area.brushType, 'Illegal areas'); }); } // If areas is null/undefined, range state remain. // This helps user to dispatchAction({type: 'brush'}) with no areas // set but just want to get the current brush select info from a `brush` event. if (!areas) { return; } this.areas = core_util["map"](areas, function (area) { return generateBrushOption(this.option, area); }, this); }; /** * Set the current painting brush option. */ BrushModel.prototype.setBrushOption = function (brushOption) { this.brushOption = generateBrushOption(this.option, brushOption); this.brushType = this.brushOption.brushType; }; BrushModel.type = 'brush'; BrushModel.dependencies = ['geo', 'grid', 'xAxis', 'yAxis', 'parallel', 'series']; BrushModel.defaultOption = { seriesIndex: 'all', brushType: 'rect', brushMode: 'single', transformable: true, brushStyle: { borderWidth: 1, color: 'rgba(210,219,238,0.3)', borderColor: '#D2DBEE' }, throttleType: 'fixRate', throttleDelay: 0, removeOnClick: true, z: 10000 }; return BrushModel; }(Component); function generateBrushOption(option, brushOption) { return core_util["merge"]({ brushType: option.brushType, brushMode: option.brushMode, transformable: option.transformable, brushStyle: new model_Model(option.brushStyle).getItemStyle(), removeOnClick: option.removeOnClick, z: option.z }, brushOption, true); } /* harmony default export */ var brush_BrushModel = (BrushModel_BrushModel); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/toolbox/feature/Brush.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 Brush_ICON_TYPES = ['rect', 'polygon', 'lineX', 'lineY', 'keep', 'clear']; var Brush_BrushFeature = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(BrushFeature, _super); function BrushFeature() { return _super !== null && _super.apply(this, arguments) || this; } BrushFeature.prototype.render = function (featureModel, ecModel, api) { var brushType; var brushMode; var isBrushed; ecModel.eachComponent({ mainType: 'brush' }, function (brushModel) { brushType = brushModel.brushType; brushMode = brushModel.brushOption.brushMode || 'single'; isBrushed = isBrushed || !!brushModel.areas.length; }); this._brushType = brushType; this._brushMode = brushMode; core_util["each"](featureModel.get('type', true), function (type) { featureModel.setIconStatus(type, (type === 'keep' ? brushMode === 'multiple' : type === 'clear' ? isBrushed : type === brushType) ? 'emphasis' : 'normal'); }); }; BrushFeature.prototype.updateView = function (featureModel, ecModel, api) { this.render(featureModel, ecModel, api); }; BrushFeature.prototype.getIcons = function () { var model = this.model; var availableIcons = model.get('icon', true); var icons = {}; core_util["each"](model.get('type', true), function (type) { if (availableIcons[type]) { icons[type] = availableIcons[type]; } }); return icons; }; ; BrushFeature.prototype.onclick = function (ecModel, api, type) { var brushType = this._brushType; var brushMode = this._brushMode; if (type === 'clear') { // Trigger parallel action firstly api.dispatchAction({ type: 'axisAreaSelect', intervals: [] }); api.dispatchAction({ type: 'brush', command: 'clear', // Clear all areas of all brush components. areas: [] }); } else { api.dispatchAction({ type: 'takeGlobalCursor', key: 'brush', brushOption: { brushType: type === 'keep' ? brushType : brushType === type ? false : type, brushMode: type === 'keep' ? brushMode === 'multiple' ? 'single' : 'multiple' : brushMode } }); } }; ; BrushFeature.getDefaultOption = function (ecModel) { var defaultOption = { show: true, type: Brush_ICON_TYPES.slice(), icon: { /* eslint-disable */ rect: 'M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13', polygon: 'M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2', lineX: 'M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4', lineY: 'M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4', keep: 'M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z', clear: 'M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2' // jshint ignore:line /* eslint-enable */ }, // `rect`, `polygon`, `lineX`, `lineY`, `keep`, `clear` title: ecModel.getLocaleModel().get(['toolbox', 'brush', 'title']) }; return defaultOption; }; return BrushFeature; }(ToolboxFeature); /* harmony default export */ var Brush = (Brush_BrushFeature); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/brush/install.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 function brush_install_install(registers) { registers.registerComponentView(brush_BrushView); registers.registerComponentModel(brush_BrushModel); registers.registerPreprocessor(brushPreprocessor); registers.registerVisual(registers.PRIORITY.VISUAL.BRUSH, brushVisual); registers.registerAction({ type: 'brush', event: 'brush', update: 'updateVisual' }, function (payload, ecModel) { ecModel.eachComponent({ mainType: 'brush', query: payload }, function (brushModel) { brushModel.setAreas(payload.areas); }); }); /** * payload: { * brushComponents: [ * { * brushId, * brushIndex, * brushName, * series: [ * { * seriesId, * seriesIndex, * seriesName, * rawIndices: [21, 34, ...] * }, * ... * ] * }, * ... * ] * } */ registers.registerAction({ type: 'brushSelect', event: 'brushSelected', update: 'none' }, core_util["noop"]); registers.registerAction({ type: 'brushEnd', event: 'brushEnd', update: 'none' }, core_util["noop"]); registerFeature('brush', Brush); } // CONCATENATED MODULE: ./node_modules/echarts/lib/component/title/install.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 install_TitleModel = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(TitleModel, _super); function TitleModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = TitleModel.type; _this.layoutMode = { type: 'box', ignoreSize: true }; return _this; } TitleModel.type = 'title'; TitleModel.defaultOption = { // zlevel: 0, z: 6, show: true, text: '', target: 'blank', subtext: '', subtarget: 'blank', left: 0, top: 0, backgroundColor: 'rgba(0,0,0,0)', borderColor: '#ccc', borderWidth: 0, padding: 5, itemGap: 10, textStyle: { fontSize: 18, fontWeight: 'bold', color: '#464646' }, subtextStyle: { fontSize: 12, color: '#6E7079' } }; return TitleModel; }(Component); // View var install_TitleView = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(TitleView, _super); function TitleView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = TitleView.type; return _this; } TitleView.prototype.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 = core_util["retrieve2"](titleModel.get('textBaseline'), titleModel.get('textVerticalAlign')); var textEl = new Text({ style: createTextStyle(textStyleModel, { text: titleModel.get('text'), fill: textStyleModel.getTextColor() }, { disableBox: true }), z2: 10 }); var textRect = textEl.getBoundingRect(); var subText = titleModel.get('subtext'); var subTextEl = new Text({ style: createTextStyle(subtextStyleModel, { text: subText, fill: subtextStyleModel.getTextColor(), y: textRect.height + titleModel.get('itemGap'), verticalAlign: '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')); }); } getECData(textEl).eventData = getECData(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'); // @ts-ignore 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'); // @ts-ignore 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.x = layoutRect.x; group.y = layoutRect.y; group.markRedraw(); var alignStyle = { align: textAlign, verticalAlign: 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 shape_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); }; TitleView.type = 'title'; return TitleView; }(view_Component); function title_install_install(registers) { registers.registerComponentModel(install_TitleModel); registers.registerComponentView(install_TitleView); } // CONCATENATED MODULE: ./node_modules/echarts/lib/component/timeline/TimelineModel.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 TimelineModel_TimelineModel = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(TimelineModel, _super); function TimelineModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = TimelineModel.type; _this.layoutMode = 'box'; return _this; } /** * @override */ TimelineModel.prototype.init = function (option, parentModel, ecModel) { this.mergeDefaultAndTheme(option, ecModel); this._initData(); }; /** * @override */ TimelineModel.prototype.mergeOption = function (option) { _super.prototype.mergeOption.apply(this, arguments); this._initData(); }; TimelineModel.prototype.setCurrentIndex = function (currentIndex) { if (currentIndex == null) { currentIndex = this.option.currentIndex; } var count = this._data.count(); if (this.option.loop) { currentIndex = (currentIndex % count + count) % count; } else { currentIndex >= count && (currentIndex = count - 1); currentIndex < 0 && (currentIndex = 0); } this.option.currentIndex = currentIndex; }; /** * @return {number} currentIndex */ TimelineModel.prototype.getCurrentIndex = function () { return this.option.currentIndex; }; /** * @return {boolean} */ TimelineModel.prototype.isIndexMax = function () { return this.getCurrentIndex() >= this._data.count() - 1; }; /** * @param {boolean} state true: play, false: stop */ TimelineModel.prototype.setPlayState = function (state) { this.option.autoPlay = !!state; }; /** * @return {boolean} true: play, false: stop */ TimelineModel.prototype.getPlayState = function () { return !!this.option.autoPlay; }; /** * @private */ TimelineModel.prototype._initData = function () { var thisOption = this.option; var dataArr = thisOption.data || []; var axisType = thisOption.axisType; var names = this._names = []; var processedDataArr; if (axisType === 'category') { processedDataArr = []; Object(core_util["each"])(dataArr, function (item, index) { var value = convertOptionIdName(getDataItemValue(item), ''); var newItem; if (Object(core_util["isObject"])(item)) { newItem = Object(core_util["clone"])(item); newItem.value = index; } else { newItem = index; } processedDataArr.push(newItem); names.push(value); }); } else { processedDataArr = dataArr; } var dimType = { category: 'ordinal', time: 'time', value: 'number' }[axisType] || 'number'; var data = this._data = new data_SeriesData([{ name: 'value', type: dimType }], this); data.initData(processedDataArr, names); }; TimelineModel.prototype.getData = function () { return this._data; }; /** * @public * @return {Array.} categoreis */ TimelineModel.prototype.getCategories = function () { if (this.get('axisType') === 'category') { return this._names.slice(); } }; TimelineModel.type = 'timeline'; /** * @protected */ TimelineModel.defaultOption = { // zlevel: 0, // 一级层叠 z: 4, show: true, axisType: 'time', realtime: true, left: '20%', top: null, right: '20%', bottom: 0, width: null, height: 40, padding: 5, controlPosition: 'left', autoPlay: false, rewind: false, loop: true, playInterval: 2000, currentIndex: 0, itemStyle: {}, label: { color: '#000' }, data: [] }; return TimelineModel; }(Component); /* harmony default export */ var timeline_TimelineModel = (TimelineModel_TimelineModel); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/timeline/SliderTimelineModel.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 SliderTimelineModel_SliderTimelineModel = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(SliderTimelineModel, _super); function SliderTimelineModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = SliderTimelineModel.type; return _this; } SliderTimelineModel.type = 'timeline.slider'; /** * @protected */ SliderTimelineModel.defaultOption = inheritDefaultOption(timeline_TimelineModel.defaultOption, { backgroundColor: 'rgba(0,0,0,0)', borderColor: '#ccc', borderWidth: 0, orient: 'horizontal', inverse: false, tooltip: { trigger: 'item' // data item may also have tootip attr. }, symbol: 'circle', symbolSize: 12, lineStyle: { show: true, width: 2, color: '#DAE1F5' }, label: { position: 'auto', // When using number, label position is not // restricted by viewRect. // positive: right/bottom, negative: left/top show: true, interval: 'auto', rotate: 0, // formatter: null, // 其余属性默认使用全局文本样式,详见TEXTSTYLE color: '#A4B1D7' }, itemStyle: { color: '#A4B1D7', borderWidth: 1 }, checkpointStyle: { symbol: 'circle', symbolSize: 15, color: '#316bf3', borderColor: '#fff', borderWidth: 2, shadowBlur: 2, shadowOffsetX: 1, shadowOffsetY: 1, shadowColor: 'rgba(0, 0, 0, 0.3)', // borderColor: 'rgba(194,53,49, 0.5)', animation: true, animationDuration: 300, animationEasing: 'quinticInOut' }, controlStyle: { show: true, showPlayBtn: true, showPrevBtn: true, showNextBtn: true, itemSize: 24, itemGap: 12, position: 'left', playIcon: 'path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z', stopIcon: 'path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z', // eslint-disable-next-line max-len nextIcon: 'M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z', // eslint-disable-next-line max-len prevIcon: 'M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z', prevBtnSize: 18, nextBtnSize: 18, color: '#A4B1D7', borderColor: '#A4B1D7', borderWidth: 1 }, emphasis: { label: { show: true, // 其余属性默认使用全局文本样式,详见TEXTSTYLE color: '#6f778d' }, itemStyle: { color: '#316BF3' }, controlStyle: { color: '#316BF3', borderColor: '#316BF3', borderWidth: 2 } }, progress: { lineStyle: { color: '#316BF3' }, itemStyle: { color: '#316BF3' }, label: { color: '#6f778d' } }, data: [] }); return SliderTimelineModel; }(timeline_TimelineModel); Object(core_util["mixin"])(SliderTimelineModel_SliderTimelineModel, dataFormat_DataFormatMixin.prototype); /* harmony default export */ var timeline_SliderTimelineModel = (SliderTimelineModel_SliderTimelineModel); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/timeline/TimelineView.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 TimelineView_TimelineView = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(TimelineView, _super); function TimelineView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = TimelineView.type; return _this; } TimelineView.type = 'timeline'; return TimelineView; }(view_Component); /* harmony default export */ var timeline_TimelineView = (TimelineView_TimelineView); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/timeline/TimelineAxis.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ /** * Extend axis 2d */ var TimelineAxis_TimelineAxis = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(TimelineAxis, _super); function TimelineAxis(dim, scale, coordExtent, axisType) { var _this = _super.call(this, dim, scale, coordExtent) || this; _this.type = axisType || 'value'; return _this; } /** * @override */ TimelineAxis.prototype.getLabelModel = function () { // Force override return this.model.getModel('label'); }; /** * @override */ TimelineAxis.prototype.isHorizontal = function () { return this.model.get('orient') === 'horizontal'; }; return TimelineAxis; }(coord_Axis); /* harmony default export */ var timeline_TimelineAxis = (TimelineAxis_TimelineAxis); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/timeline/SliderTimelineView.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 SliderTimelineView_PI = Math.PI; var labelDataIndexStore = makeInner(); var SliderTimelineView_SliderTimelineView = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(SliderTimelineView, _super); function SliderTimelineView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = SliderTimelineView.type; return _this; } SliderTimelineView.prototype.init = function (ecModel, api) { this.api = api; }; /** * @override */ SliderTimelineView.prototype.render = function (timelineModel, ecModel, api) { this.model = timelineModel; this.api = api; this.ecModel = ecModel; this.group.removeAll(); if (timelineModel.get('show', true)) { var layoutInfo_1 = this._layout(timelineModel, api); var mainGroup_1 = this._createGroup('_mainGroup'); var labelGroup = this._createGroup('_labelGroup'); var axis_1 = this._axis = this._createAxis(layoutInfo_1, timelineModel); timelineModel.formatTooltip = function (dataIndex) { var name = axis_1.scale.getLabel({ value: dataIndex }); return createTooltipMarkup('nameValue', { noName: true, value: name }); }; Object(core_util["each"])(['AxisLine', 'AxisTick', 'Control', 'CurrentPointer'], function (name) { this['_render' + name](layoutInfo_1, mainGroup_1, axis_1, timelineModel); }, this); this._renderAxisLabel(layoutInfo_1, labelGroup, axis_1, timelineModel); this._position(layoutInfo_1, timelineModel); } this._doPlayStop(); this._updateTicksStatus(); }; /** * @override */ SliderTimelineView.prototype.remove = function () { this._clearTimer(); this.group.removeAll(); }; /** * @override */ SliderTimelineView.prototype.dispose = function () { this._clearTimer(); }; SliderTimelineView.prototype._layout = function (timelineModel, api) { var labelPosOpt = timelineModel.get(['label', 'position']); var orient = timelineModel.get('orient'); var viewRect = SliderTimelineView_getViewRect(timelineModel, api); var parsedLabelPos; // Auto label offset. if (labelPosOpt == null || labelPosOpt === 'auto') { parsedLabelPos = orient === 'horizontal' ? viewRect.y + viewRect.height / 2 < api.getHeight() / 2 ? '-' : '+' : viewRect.x + viewRect.width / 2 < api.getWidth() / 2 ? '+' : '-'; } else if (Object(core_util["isString"])(labelPosOpt)) { parsedLabelPos = { horizontal: { top: '-', bottom: '+' }, vertical: { left: '-', right: '+' } }[orient][labelPosOpt]; } else { // is number parsedLabelPos = labelPosOpt; } var labelAlignMap = { horizontal: 'center', vertical: parsedLabelPos >= 0 || parsedLabelPos === '+' ? 'left' : 'right' }; var labelBaselineMap = { horizontal: parsedLabelPos >= 0 || parsedLabelPos === '+' ? 'top' : 'bottom', vertical: 'middle' }; var rotationMap = { horizontal: 0, vertical: SliderTimelineView_PI / 2 }; // Position var mainLength = orient === 'vertical' ? viewRect.height : viewRect.width; var controlModel = timelineModel.getModel('controlStyle'); var showControl = controlModel.get('show', true); var controlSize = showControl ? controlModel.get('itemSize') : 0; var controlGap = showControl ? controlModel.get('itemGap') : 0; var sizePlusGap = controlSize + controlGap; // Special label rotate. var labelRotation = timelineModel.get(['label', 'rotate']) || 0; labelRotation = labelRotation * SliderTimelineView_PI / 180; // To radian. var playPosition; var prevBtnPosition; var nextBtnPosition; var controlPosition = controlModel.get('position', true); var showPlayBtn = showControl && controlModel.get('showPlayBtn', true); var showPrevBtn = showControl && controlModel.get('showPrevBtn', true); var showNextBtn = showControl && controlModel.get('showNextBtn', true); var xLeft = 0; var xRight = mainLength; // position[0] means left, position[1] means middle. if (controlPosition === 'left' || controlPosition === 'bottom') { showPlayBtn && (playPosition = [0, 0], xLeft += sizePlusGap); showPrevBtn && (prevBtnPosition = [xLeft, 0], xLeft += sizePlusGap); showNextBtn && (nextBtnPosition = [xRight - controlSize, 0], xRight -= sizePlusGap); } else { // 'top' 'right' showPlayBtn && (playPosition = [xRight - controlSize, 0], xRight -= sizePlusGap); showPrevBtn && (prevBtnPosition = [0, 0], xLeft += sizePlusGap); showNextBtn && (nextBtnPosition = [xRight - controlSize, 0], xRight -= sizePlusGap); } var axisExtent = [xLeft, xRight]; if (timelineModel.get('inverse')) { axisExtent.reverse(); } return { viewRect: viewRect, mainLength: mainLength, orient: orient, rotation: rotationMap[orient], labelRotation: labelRotation, labelPosOpt: parsedLabelPos, labelAlign: timelineModel.get(['label', 'align']) || labelAlignMap[orient], labelBaseline: timelineModel.get(['label', 'verticalAlign']) || timelineModel.get(['label', 'baseline']) || labelBaselineMap[orient], // Based on mainGroup. playPosition: playPosition, prevBtnPosition: prevBtnPosition, nextBtnPosition: nextBtnPosition, axisExtent: axisExtent, controlSize: controlSize, controlGap: controlGap }; }; SliderTimelineView.prototype._position = function (layoutInfo, timelineModel) { // Position is be called finally, because bounding rect is needed for // adapt content to fill viewRect (auto adapt offset). // Timeline may be not all in the viewRect when 'offset' is specified // as a number, because it is more appropriate that label aligns at // 'offset' but not the other edge defined by viewRect. var mainGroup = this._mainGroup; var labelGroup = this._labelGroup; var viewRect = layoutInfo.viewRect; if (layoutInfo.orient === 'vertical') { // transform to horizontal, inverse rotate by left-top point. var m = matrix_create(); var rotateOriginX = viewRect.x; var rotateOriginY = viewRect.y + viewRect.height; matrix_translate(m, m, [-rotateOriginX, -rotateOriginY]); matrix_rotate(m, m, -SliderTimelineView_PI / 2); matrix_translate(m, m, [rotateOriginX, rotateOriginY]); viewRect = viewRect.clone(); viewRect.applyTransform(m); } var viewBound = getBound(viewRect); var mainBound = getBound(mainGroup.getBoundingRect()); var labelBound = getBound(labelGroup.getBoundingRect()); var mainPosition = [mainGroup.x, mainGroup.y]; var labelsPosition = [labelGroup.x, labelGroup.y]; labelsPosition[0] = mainPosition[0] = viewBound[0][0]; var labelPosOpt = layoutInfo.labelPosOpt; if (labelPosOpt == null || Object(core_util["isString"])(labelPosOpt)) { // '+' or '-' var mainBoundIdx = labelPosOpt === '+' ? 0 : 1; toBound(mainPosition, mainBound, viewBound, 1, mainBoundIdx); toBound(labelsPosition, labelBound, viewBound, 1, 1 - mainBoundIdx); } else { var mainBoundIdx = labelPosOpt >= 0 ? 0 : 1; toBound(mainPosition, mainBound, viewBound, 1, mainBoundIdx); labelsPosition[1] = mainPosition[1] + labelPosOpt; } mainGroup.setPosition(mainPosition); labelGroup.setPosition(labelsPosition); mainGroup.rotation = labelGroup.rotation = layoutInfo.rotation; setOrigin(mainGroup); setOrigin(labelGroup); function setOrigin(targetGroup) { targetGroup.originX = viewBound[0][0] - targetGroup.x; targetGroup.originY = viewBound[1][0] - targetGroup.y; } function getBound(rect) { // [[xmin, xmax], [ymin, ymax]] return [[rect.x, rect.x + rect.width], [rect.y, rect.y + rect.height]]; } function toBound(fromPos, from, to, dimIdx, boundIdx) { fromPos[dimIdx] += to[dimIdx][boundIdx] - from[dimIdx][boundIdx]; } }; SliderTimelineView.prototype._createAxis = function (layoutInfo, timelineModel) { var data = timelineModel.getData(); var axisType = timelineModel.get('axisType'); var scale = SliderTimelineView_createScaleByModel(timelineModel, axisType); // Customize scale. The `tickValue` is `dataIndex`. scale.getTicks = function () { return data.mapArray(['value'], function (value) { return { value: value }; }); }; var dataExtent = data.getDataExtent('value'); scale.setExtent(dataExtent[0], dataExtent[1]); scale.calcNiceTicks(); var axis = new timeline_TimelineAxis('value', scale, layoutInfo.axisExtent, axisType); axis.model = timelineModel; return axis; }; SliderTimelineView.prototype._createGroup = function (key) { var newGroup = this[key] = new graphic_Group(); this.group.add(newGroup); return newGroup; }; SliderTimelineView.prototype._renderAxisLine = function (layoutInfo, group, axis, timelineModel) { var axisExtent = axis.getExtent(); if (!timelineModel.get(['lineStyle', 'show'])) { return; } var line = new shape_Line({ shape: { x1: axisExtent[0], y1: 0, x2: axisExtent[1], y2: 0 }, style: Object(core_util["extend"])({ lineCap: 'round' }, timelineModel.getModel('lineStyle').getLineStyle()), silent: true, z2: 1 }); group.add(line); var progressLine = this._progressLine = new shape_Line({ shape: { x1: axisExtent[0], x2: this._currentPointer ? this._currentPointer.x : axisExtent[0], y1: 0, y2: 0 }, style: Object(core_util["defaults"])({ lineCap: 'round', lineWidth: line.style.lineWidth }, timelineModel.getModel(['progress', 'lineStyle']).getLineStyle()), silent: true, z2: 1 }); group.add(progressLine); }; SliderTimelineView.prototype._renderAxisTick = function (layoutInfo, group, axis, timelineModel) { var _this = this; var data = timelineModel.getData(); // Show all ticks, despite ignoring strategy. var ticks = axis.scale.getTicks(); this._tickSymbols = []; // The value is dataIndex, see the customized scale. Object(core_util["each"])(ticks, function (tick) { var tickCoord = axis.dataToCoord(tick.value); var itemModel = data.getItemModel(tick.value); var itemStyleModel = itemModel.getModel('itemStyle'); var hoverStyleModel = itemModel.getModel(['emphasis', 'itemStyle']); var progressStyleModel = itemModel.getModel(['progress', 'itemStyle']); var symbolOpt = { x: tickCoord, y: 0, onclick: Object(core_util["bind"])(_this._changeTimeline, _this, tick.value) }; var el = giveSymbol(itemModel, itemStyleModel, group, symbolOpt); el.ensureState('emphasis').style = hoverStyleModel.getItemStyle(); el.ensureState('progress').style = progressStyleModel.getItemStyle(); enableHoverEmphasis(el); var ecData = getECData(el); if (itemModel.get('tooltip')) { ecData.dataIndex = tick.value; ecData.dataModel = timelineModel; } else { ecData.dataIndex = ecData.dataModel = null; } _this._tickSymbols.push(el); }); }; SliderTimelineView.prototype._renderAxisLabel = function (layoutInfo, group, axis, timelineModel) { var _this = this; var labelModel = axis.getLabelModel(); if (!labelModel.get('show')) { return; } var data = timelineModel.getData(); var labels = axis.getViewLabels(); this._tickLabels = []; Object(core_util["each"])(labels, function (labelItem) { // The tickValue is dataIndex, see the customized scale. var dataIndex = labelItem.tickValue; var itemModel = data.getItemModel(dataIndex); var normalLabelModel = itemModel.getModel('label'); var hoverLabelModel = itemModel.getModel(['emphasis', 'label']); var progressLabelModel = itemModel.getModel(['progress', 'label']); var tickCoord = axis.dataToCoord(labelItem.tickValue); var textEl = new Text({ x: tickCoord, y: 0, rotation: layoutInfo.labelRotation - layoutInfo.rotation, onclick: Object(core_util["bind"])(_this._changeTimeline, _this, dataIndex), silent: false, style: createTextStyle(normalLabelModel, { text: labelItem.formattedLabel, align: layoutInfo.labelAlign, verticalAlign: layoutInfo.labelBaseline }) }); textEl.ensureState('emphasis').style = createTextStyle(hoverLabelModel); textEl.ensureState('progress').style = createTextStyle(progressLabelModel); group.add(textEl); enableHoverEmphasis(textEl); labelDataIndexStore(textEl).dataIndex = dataIndex; _this._tickLabels.push(textEl); }); }; SliderTimelineView.prototype._renderControl = function (layoutInfo, group, axis, timelineModel) { var controlSize = layoutInfo.controlSize; var rotation = layoutInfo.rotation; var itemStyle = timelineModel.getModel('controlStyle').getItemStyle(); var hoverStyle = timelineModel.getModel(['emphasis', 'controlStyle']).getItemStyle(); var playState = timelineModel.getPlayState(); var inverse = timelineModel.get('inverse', true); makeBtn(layoutInfo.nextBtnPosition, 'next', Object(core_util["bind"])(this._changeTimeline, this, inverse ? '-' : '+')); makeBtn(layoutInfo.prevBtnPosition, 'prev', Object(core_util["bind"])(this._changeTimeline, this, inverse ? '+' : '-')); makeBtn(layoutInfo.playPosition, playState ? 'stop' : 'play', Object(core_util["bind"])(this._handlePlayClick, this, !playState), true); function makeBtn(position, iconName, onclick, willRotate) { if (!position) { return; } var iconSize = parsePercent(Object(core_util["retrieve2"])(timelineModel.get(['controlStyle', iconName + 'BtnSize']), controlSize), controlSize); var rect = [0, -iconSize / 2, iconSize, iconSize]; var btn = makeControlIcon(timelineModel, iconName + 'Icon', rect, { x: position[0], y: position[1], originX: controlSize / 2, originY: 0, rotation: willRotate ? -rotation : 0, rectHover: true, style: itemStyle, onclick: onclick }); btn.ensureState('emphasis').style = hoverStyle; group.add(btn); enableHoverEmphasis(btn); } }; SliderTimelineView.prototype._renderCurrentPointer = function (layoutInfo, group, axis, timelineModel) { var data = timelineModel.getData(); var currentIndex = timelineModel.getCurrentIndex(); var pointerModel = data.getItemModel(currentIndex).getModel('checkpointStyle'); var me = this; var callback = { onCreate: function (pointer) { pointer.draggable = true; pointer.drift = Object(core_util["bind"])(me._handlePointerDrag, me); pointer.ondragend = Object(core_util["bind"])(me._handlePointerDragend, me); pointerMoveTo(pointer, me._progressLine, currentIndex, axis, timelineModel, true); }, onUpdate: function (pointer) { pointerMoveTo(pointer, me._progressLine, currentIndex, axis, timelineModel); } }; // Reuse when exists, for animation and drag. this._currentPointer = giveSymbol(pointerModel, pointerModel, this._mainGroup, {}, this._currentPointer, callback); }; SliderTimelineView.prototype._handlePlayClick = function (nextState) { this._clearTimer(); this.api.dispatchAction({ type: 'timelinePlayChange', playState: nextState, from: this.uid }); }; SliderTimelineView.prototype._handlePointerDrag = function (dx, dy, e) { this._clearTimer(); this._pointerChangeTimeline([e.offsetX, e.offsetY]); }; SliderTimelineView.prototype._handlePointerDragend = function (e) { this._pointerChangeTimeline([e.offsetX, e.offsetY], true); }; SliderTimelineView.prototype._pointerChangeTimeline = function (mousePos, trigger) { var toCoord = this._toAxisCoord(mousePos)[0]; var axis = this._axis; var axisExtent = asc(axis.getExtent().slice()); toCoord > axisExtent[1] && (toCoord = axisExtent[1]); toCoord < axisExtent[0] && (toCoord = axisExtent[0]); this._currentPointer.x = toCoord; this._currentPointer.markRedraw(); var progressLine = this._progressLine; if (progressLine) { progressLine.shape.x2 = toCoord; progressLine.dirty(); } var targetDataIndex = this._findNearestTick(toCoord); var timelineModel = this.model; if (trigger || targetDataIndex !== timelineModel.getCurrentIndex() && timelineModel.get('realtime')) { this._changeTimeline(targetDataIndex); } }; SliderTimelineView.prototype._doPlayStop = function () { var _this = this; this._clearTimer(); if (this.model.getPlayState()) { this._timer = setTimeout(function () { // Do not cache var timelineModel = _this.model; _this._changeTimeline(timelineModel.getCurrentIndex() + (timelineModel.get('rewind', true) ? -1 : 1)); }, this.model.get('playInterval')); } }; SliderTimelineView.prototype._toAxisCoord = function (vertex) { var trans = this._mainGroup.getLocalTransform(); return graphic_applyTransform(vertex, trans, true); }; SliderTimelineView.prototype._findNearestTick = function (axisCoord) { var data = this.model.getData(); var dist = Infinity; var targetDataIndex; var axis = this._axis; data.each(['value'], function (value, dataIndex) { var coord = axis.dataToCoord(value); var d = Math.abs(coord - axisCoord); if (d < dist) { dist = d; targetDataIndex = dataIndex; } }); return targetDataIndex; }; SliderTimelineView.prototype._clearTimer = function () { if (this._timer) { clearTimeout(this._timer); this._timer = null; } }; SliderTimelineView.prototype._changeTimeline = function (nextIndex) { var currentIndex = this.model.getCurrentIndex(); if (nextIndex === '+') { nextIndex = currentIndex + 1; } else if (nextIndex === '-') { nextIndex = currentIndex - 1; } this.api.dispatchAction({ type: 'timelineChange', currentIndex: nextIndex, from: this.uid }); }; SliderTimelineView.prototype._updateTicksStatus = function () { var currentIndex = this.model.getCurrentIndex(); var tickSymbols = this._tickSymbols; var tickLabels = this._tickLabels; if (tickSymbols) { for (var i = 0; i < tickSymbols.length; i++) { tickSymbols && tickSymbols[i] && tickSymbols[i].toggleState('progress', i < currentIndex); } } if (tickLabels) { for (var i = 0; i < tickLabels.length; i++) { tickLabels && tickLabels[i] && tickLabels[i].toggleState('progress', labelDataIndexStore(tickLabels[i]).dataIndex <= currentIndex); } } }; SliderTimelineView.type = 'timeline.slider'; return SliderTimelineView; }(timeline_TimelineView); function SliderTimelineView_createScaleByModel(model, axisType) { axisType = axisType || model.get('type'); if (axisType) { switch (axisType) { // Buildin scale case 'category': return new Ordinal({ ordinalMeta: model.getCategories(), extent: [Infinity, -Infinity] }); case 'time': return new Time({ locale: model.ecModel.getLocaleModel(), useUTC: model.ecModel.get('useUTC') }); default: // default to be value return new Interval(); } } } function SliderTimelineView_getViewRect(model, api) { return getLayoutRect(model.getBoxLayoutParams(), { width: api.getWidth(), height: api.getHeight() }, model.get('padding')); } function makeControlIcon(timelineModel, objPath, rect, opts) { var style = opts.style; var icon = createIcon(timelineModel.get(['controlStyle', objPath]), opts || {}, new core_BoundingRect(rect[0], rect[1], rect[2], rect[3])); // TODO createIcon won't use style in opt. if (style) { icon.setStyle(style); } return icon; } /** * Create symbol or update symbol * opt: basic position and event handlers */ function giveSymbol(hostModel, itemStyleModel, group, opt, symbol, callback) { var color = itemStyleModel.get('color'); if (!symbol) { var symbolType = hostModel.get('symbol'); symbol = symbol_createSymbol(symbolType, -1, -1, 2, 2, color); symbol.setStyle('strokeNoScale', true); group.add(symbol); callback && callback.onCreate(symbol); } else { symbol.setColor(color); group.add(symbol); // Group may be new, also need to add. callback && callback.onUpdate(symbol); } // Style var itemStyle = itemStyleModel.getItemStyle(['color']); symbol.setStyle(itemStyle); // Transform and events. opt = Object(core_util["merge"])({ rectHover: true, z2: 100 }, opt, true); var symbolSize = normalizeSymbolSize(hostModel.get('symbolSize')); opt.scaleX = symbolSize[0] / 2; opt.scaleY = symbolSize[1] / 2; var symbolOffset = normalizeSymbolOffset(hostModel.get('symbolOffset'), symbolSize); if (symbolOffset) { opt.x = (opt.x || 0) + symbolOffset[0]; opt.y = (opt.y || 0) + symbolOffset[1]; } var symbolRotate = hostModel.get('symbolRotate'); opt.rotation = (symbolRotate || 0) * Math.PI / 180 || 0; symbol.attr(opt); // FIXME // (1) When symbol.style.strokeNoScale is true and updateTransform is not performed, // getBoundingRect will return wrong result. // (This is supposed to be resolved in zrender, but it is a little difficult to // leverage performance and auto updateTransform) // (2) All of ancesters of symbol do not scale, so we can just updateTransform symbol. symbol.updateTransform(); return symbol; } function pointerMoveTo(pointer, progressLine, dataIndex, axis, timelineModel, noAnimation) { if (pointer.dragging) { return; } var pointerModel = timelineModel.getModel('checkpointStyle'); var toCoord = axis.dataToCoord(timelineModel.getData().get('value', dataIndex)); if (noAnimation || !pointerModel.get('animation', true)) { pointer.attr({ x: toCoord, y: 0 }); progressLine && progressLine.attr({ shape: { x2: toCoord } }); } else { var animationCfg = { duration: pointerModel.get('animationDuration', true), easing: pointerModel.get('animationEasing', true) }; pointer.stopAnimation(null, true); pointer.animateTo({ x: toCoord, y: 0 }, animationCfg); progressLine && progressLine.animateTo({ shape: { x2: toCoord } }, animationCfg); } } /* harmony default export */ var timeline_SliderTimelineView = (SliderTimelineView_SliderTimelineView); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/timeline/timelineAction.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 installTimelineAction(registers) { registers.registerAction({ type: 'timelineChange', event: 'timelineChanged', update: 'prepareAndUpdate' }, function (payload, ecModel, api) { var timelineModel = ecModel.getComponent('timeline'); if (timelineModel && payload.currentIndex != null) { timelineModel.setCurrentIndex(payload.currentIndex); if (!timelineModel.get('loop', true) && timelineModel.isIndexMax() && timelineModel.getPlayState()) { timelineModel.setPlayState(false); // The timeline has played to the end, trigger event api.dispatchAction({ type: 'timelinePlayChange', playState: false, from: payload.from }); } } // Set normalized currentIndex to payload. ecModel.resetOption('timeline', { replaceMerge: timelineModel.get('replaceMerge', true) }); return Object(core_util["defaults"])({ currentIndex: timelineModel.option.currentIndex }, payload); }); registers.registerAction({ type: 'timelinePlayChange', event: 'timelinePlayChanged', update: 'update' }, function (payload, ecModel) { var timelineModel = ecModel.getComponent('timeline'); if (timelineModel && payload.playState != null) { timelineModel.setPlayState(payload.playState); } }); } // CONCATENATED MODULE: ./node_modules/echarts/lib/component/timeline/preprocessor.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ // @ts-nocheck function timelinePreprocessor(option) { var timelineOpt = option && option.timeline; if (!core_util["isArray"](timelineOpt)) { timelineOpt = timelineOpt ? [timelineOpt] : []; } core_util["each"](timelineOpt, function (opt) { if (!opt) { return; } compatibleEC2(opt); }); } function compatibleEC2(opt) { var type = opt.type; var ec2Types = { 'number': 'value', 'time': 'time' }; // Compatible with ec2 if (ec2Types[type]) { opt.axisType = ec2Types[type]; delete opt.type; } transferItem(opt); if (preprocessor_has(opt, 'controlPosition')) { var controlStyle = opt.controlStyle || (opt.controlStyle = {}); if (!preprocessor_has(controlStyle, 'position')) { controlStyle.position = opt.controlPosition; } if (controlStyle.position === 'none' && !preprocessor_has(controlStyle, 'show')) { controlStyle.show = false; delete controlStyle.position; } delete opt.controlPosition; } core_util["each"](opt.data || [], function (dataItem) { if (core_util["isObject"](dataItem) && !core_util["isArray"](dataItem)) { if (!preprocessor_has(dataItem, 'value') && preprocessor_has(dataItem, 'name')) { // In ec2, using name as value. dataItem.value = dataItem.name; } transferItem(dataItem); } }); } function transferItem(opt) { var itemStyle = opt.itemStyle || (opt.itemStyle = {}); var itemStyleEmphasis = itemStyle.emphasis || (itemStyle.emphasis = {}); // Transfer label out var label = opt.label || opt.label || {}; var labelNormal = label.normal || (label.normal = {}); var excludeLabelAttr = { normal: 1, emphasis: 1 }; core_util["each"](label, function (value, name) { if (!excludeLabelAttr[name] && !preprocessor_has(labelNormal, name)) { labelNormal[name] = value; } }); if (itemStyleEmphasis.label && !preprocessor_has(label, 'emphasis')) { label.emphasis = itemStyleEmphasis.label; delete itemStyleEmphasis.label; } } function preprocessor_has(obj, attr) { return obj.hasOwnProperty(attr); } // CONCATENATED MODULE: ./node_modules/echarts/lib/component/timeline/install.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ function timeline_install_install(registers) { registers.registerComponentModel(timeline_SliderTimelineModel); registers.registerComponentView(timeline_SliderTimelineView); registers.registerSubTypeDefaulter('timeline', function () { // Only slider now. return 'slider'; }); installTimelineAction(registers); registers.registerPreprocessor(timelinePreprocessor); } // CONCATENATED MODULE: ./node_modules/echarts/lib/component/marker/checkMarkerInSeries.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 checkMarkerInSeries(seriesOpts, markerType) { if (!seriesOpts) { return false; } var seriesOptArr = Object(core_util["isArray"])(seriesOpts) ? seriesOpts : [seriesOpts]; for (var idx = 0; idx < seriesOptArr.length; idx++) { if (seriesOptArr[idx] && seriesOptArr[idx][markerType]) { return true; } } return false; } // CONCATENATED MODULE: ./node_modules/echarts/lib/component/marker/MarkerModel.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 fillLabel(opt) { defaultEmphasis(opt, 'label', ['show']); } // { [componentType]: MarkerModel } var MarkerModel_inner = makeInner(); var MarkerModel_MarkerModel = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(MarkerModel, _super); function MarkerModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = MarkerModel.type; /** * If marker model is created by self from series */ _this.createdBySelf = false; return _this; } /** * @overrite */ MarkerModel.prototype.init = function (option, parentModel, ecModel) { if (false) { if (this.type === 'marker') { throw new Error('Marker component is abstract component. Use markLine, markPoint, markArea instead.'); } } this.mergeDefaultAndTheme(option, ecModel); this._mergeOption(option, ecModel, false, true); }; MarkerModel.prototype.isAnimationEnabled = function () { if (core_env["a" /* default */].node) { return false; } var hostSeries = this.__hostSeries; return this.getShallow('animation') && hostSeries && hostSeries.isAnimationEnabled(); }; /** * @overrite */ MarkerModel.prototype.mergeOption = function (newOpt, ecModel) { this._mergeOption(newOpt, ecModel, false, false); }; MarkerModel.prototype._mergeOption = function (newOpt, ecModel, createdBySelf, isInit) { var componentType = this.mainType; if (!createdBySelf) { ecModel.eachSeries(function (seriesModel) { // mainType can be markPoint, markLine, markArea var markerOpt = seriesModel.get(this.mainType, true); var markerModel = MarkerModel_inner(seriesModel)[componentType]; if (!markerOpt || !markerOpt.data) { MarkerModel_inner(seriesModel)[componentType] = null; return; } if (!markerModel) { if (isInit) { // Default label emphasis `position` and `show` fillLabel(markerOpt); } core_util["each"](markerOpt.data, function (item) { // FIXME Overwrite fillLabel method ? if (item instanceof Array) { fillLabel(item[0]); fillLabel(item[1]); } else { fillLabel(item); } }); markerModel = this.createMarkerModelFromSeries(markerOpt, this, ecModel); // markerModel = new ImplementedMarkerModel( // markerOpt, this, ecModel // ); core_util["extend"](markerModel, { mainType: this.mainType, // Use the same series index and name seriesIndex: seriesModel.seriesIndex, name: seriesModel.name, createdBySelf: true }); markerModel.__hostSeries = seriesModel; } else { markerModel._mergeOption(markerOpt, ecModel, true); } MarkerModel_inner(seriesModel)[componentType] = markerModel; }, this); } }; MarkerModel.prototype.formatTooltip = function (dataIndex, multipleSeries, dataType) { var data = this.getData(); var value = this.getRawValue(dataIndex); var itemName = data.getName(dataIndex); return createTooltipMarkup('section', { header: this.name, blocks: [createTooltipMarkup('nameValue', { name: itemName, value: value, noName: !itemName, noValue: value == null })] }); }; MarkerModel.prototype.getData = function () { return this._data; }; MarkerModel.prototype.setData = function (data) { this._data = data; }; MarkerModel.prototype.getDataParams = function (dataIndex, dataType) { var params = dataFormat_DataFormatMixin.prototype.getDataParams.call(this, dataIndex, dataType); var hostSeries = this.__hostSeries; if (hostSeries) { params.seriesId = hostSeries.id; params.seriesName = hostSeries.name; params.seriesType = hostSeries.subType; } return params; }; MarkerModel.getMarkerModelFromSeries = function (seriesModel, // Support three types of markers. Strict check. componentType) { return MarkerModel_inner(seriesModel)[componentType]; }; MarkerModel.type = 'marker'; MarkerModel.dependencies = ['series', 'grid', 'polar', 'geo']; return MarkerModel; }(Component); core_util["mixin"](MarkerModel_MarkerModel, dataFormat_DataFormatMixin.prototype); /* harmony default export */ var marker_MarkerModel = (MarkerModel_MarkerModel); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/marker/MarkPointModel.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 MarkPointModel_MarkPointModel = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(MarkPointModel, _super); function MarkPointModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = MarkPointModel.type; return _this; } MarkPointModel.prototype.createMarkerModelFromSeries = function (markerOpt, masterMarkerModel, ecModel) { return new MarkPointModel(markerOpt, masterMarkerModel, ecModel); }; MarkPointModel.type = 'markPoint'; MarkPointModel.defaultOption = { // zlevel: 0, z: 5, symbol: 'pin', symbolSize: 50, // symbolRotate: 0, // symbolOffset: [0, 0] tooltip: { trigger: 'item' }, label: { show: true, position: 'inside' }, itemStyle: { borderWidth: 2 }, emphasis: { label: { show: true } } }; return MarkPointModel; }(marker_MarkerModel); /* harmony default export */ var marker_MarkPointModel = (MarkPointModel_MarkPointModel); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/marker/markerHelper.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 hasXOrY(item) { return !(isNaN(parseFloat(item.x)) && isNaN(parseFloat(item.y))); } function hasXAndY(item) { return !isNaN(parseFloat(item.x)) && !isNaN(parseFloat(item.y)); } function markerTypeCalculatorWithExtent(markerType, data, otherDataDim, targetDataDim, otherCoordIndex, targetCoordIndex) { var coordArr = []; var stacked = isDimensionStacked(data, targetDataDim /* , otherDataDim */); var calcDataDim = stacked ? data.getCalculationInfo('stackResultDimension') : targetDataDim; var value = numCalculate(data, calcDataDim, markerType); var dataIndex = data.indicesOfNearest(calcDataDim, value)[0]; coordArr[otherCoordIndex] = data.get(otherDataDim, dataIndex); coordArr[targetCoordIndex] = data.get(calcDataDim, dataIndex); var coordArrValue = data.get(targetDataDim, dataIndex); // Make it simple, do not visit all stacked value to count precision. var precision = getPrecision(data.get(targetDataDim, dataIndex)); precision = Math.min(precision, 20); if (precision >= 0) { coordArr[targetCoordIndex] = +coordArr[targetCoordIndex].toFixed(precision); } return [coordArr, coordArrValue]; } // TODO Specified percent var markerTypeCalculator = { min: Object(core_util["curry"])(markerTypeCalculatorWithExtent, 'min'), max: Object(core_util["curry"])(markerTypeCalculatorWithExtent, 'max'), average: Object(core_util["curry"])(markerTypeCalculatorWithExtent, 'average'), median: Object(core_util["curry"])(markerTypeCalculatorWithExtent, 'median') }; /** * Transform markPoint data item to format used in List by do the following * 1. Calculate statistic like `max`, `min`, `average` * 2. Convert `item.xAxis`, `item.yAxis` to `item.coord` array */ function dataTransform(seriesModel, item) { if (!item) { return; } var data = seriesModel.getData(); var coordSys = seriesModel.coordinateSystem; var dims = coordSys && coordSys.dimensions; // 1. If not specify the position with pixel directly // 2. If `coord` is not a data array. Which uses `xAxis`, // `yAxis` to specify the coord on each dimension // parseFloat first because item.x and item.y can be percent string like '20%' if (!hasXAndY(item) && !Object(core_util["isArray"])(item.coord) && Object(core_util["isArray"])(dims)) { var axisInfo = markerHelper_getAxisInfo(item, data, coordSys, seriesModel); // Clone the option // Transform the properties xAxis, yAxis, radiusAxis, angleAxis, geoCoord to value item = Object(core_util["clone"])(item); if (item.type && markerTypeCalculator[item.type] && axisInfo.baseAxis && axisInfo.valueAxis) { var otherCoordIndex = Object(core_util["indexOf"])(dims, axisInfo.baseAxis.dim); var targetCoordIndex = Object(core_util["indexOf"])(dims, axisInfo.valueAxis.dim); var coordInfo = markerTypeCalculator[item.type](data, axisInfo.baseDataDim, axisInfo.valueDataDim, otherCoordIndex, targetCoordIndex); item.coord = coordInfo[0]; // Force to use the value of calculated value. // let item use the value without stack. item.value = coordInfo[1]; } else { // FIXME Only has one of xAxis and yAxis. item.coord = [item.xAxis != null ? item.xAxis : item.radiusAxis, item.yAxis != null ? item.yAxis : item.angleAxis]; } } // x y is provided if (item.coord == null || !Object(core_util["isArray"])(dims)) { item.coord = []; } else { // Each coord support max, min, average var coord = item.coord; for (var i = 0; i < 2; i++) { if (markerTypeCalculator[coord[i]]) { coord[i] = numCalculate(data, data.mapDimension(dims[i]), coord[i]); } } } return item; } function markerHelper_getAxisInfo(item, data, coordSys, seriesModel) { var ret = {}; if (item.valueIndex != null || item.valueDim != null) { ret.valueDataDim = item.valueIndex != null ? data.getDimension(item.valueIndex) : item.valueDim; ret.valueAxis = coordSys.getAxis(dataDimToCoordDim(seriesModel, ret.valueDataDim)); ret.baseAxis = coordSys.getOtherAxis(ret.valueAxis); ret.baseDataDim = data.mapDimension(ret.baseAxis.dim); } else { ret.baseAxis = seriesModel.getBaseAxis(); ret.valueAxis = coordSys.getOtherAxis(ret.baseAxis); ret.baseDataDim = data.mapDimension(ret.baseAxis.dim); ret.valueDataDim = data.mapDimension(ret.valueAxis.dim); } return ret; } function dataDimToCoordDim(seriesModel, dataDim) { var dimItem = seriesModel.getData().getDimensionInfo(dataDim); return dimItem && dimItem.coordDim; } /** * Filter data which is out of coordinateSystem range * [dataFilter description] */ function markerHelper_dataFilter( // Currently only polar and cartesian has containData. coordSys, item) { // Always return true if there is no coordSys return coordSys && coordSys.containData && item.coord && !hasXOrY(item) ? coordSys.containData(item.coord) : true; } function zoneFilter( // Currently only polar and cartesian has containData. coordSys, item1, item2) { // Always return true if there is no coordSys return coordSys && coordSys.containZone && item1.coord && item2.coord && !hasXOrY(item1) && !hasXOrY(item2) ? coordSys.containZone(item1.coord, item2.coord) : true; } function createMarkerDimValueGetter(inCoordSys, dims) { return inCoordSys ? function (item, dimName, dataIndex, dimIndex) { var rawVal = dimIndex < 2 // x, y, radius, angle ? item.coord && item.coord[dimIndex] : item.value; return parseDataValue(rawVal, dims[dimIndex]); } : function (item, dimName, dataIndex, dimIndex) { return parseDataValue(item.value, dims[dimIndex]); }; } function numCalculate(data, valueDataDim, type) { if (type === 'average') { var sum_1 = 0; var count_1 = 0; data.each(valueDataDim, function (val, idx) { if (!isNaN(val)) { sum_1 += val; count_1++; } }); return sum_1 / count_1; } else if (type === 'median') { return data.getMedian(valueDataDim); } else { // max & min return data.getDataExtent(valueDataDim)[type === 'max' ? 1 : 0]; } } // CONCATENATED MODULE: ./node_modules/echarts/lib/component/marker/MarkerView.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 MarkerView_inner = makeInner(); var MarkerView_MarkerView = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(MarkerView, _super); function MarkerView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = MarkerView.type; return _this; } MarkerView.prototype.init = function () { this.markerGroupMap = Object(core_util["createHashMap"])(); }; MarkerView.prototype.render = function (markerModel, ecModel, api) { var _this = this; var markerGroupMap = this.markerGroupMap; markerGroupMap.each(function (item) { MarkerView_inner(item).keep = false; }); ecModel.eachSeries(function (seriesModel) { var markerModel = marker_MarkerModel.getMarkerModelFromSeries(seriesModel, _this.type); markerModel && _this.renderSeries(seriesModel, markerModel, ecModel, api); }); markerGroupMap.each(function (item) { !MarkerView_inner(item).keep && _this.group.remove(item.group); }); }; MarkerView.prototype.markKeep = function (drawGroup) { MarkerView_inner(drawGroup).keep = true; }; MarkerView.prototype.toggleBlurSeries = function (seriesModelList, isBlur) { var _this = this; Object(core_util["each"])(seriesModelList, function (seriesModel) { var markerModel = marker_MarkerModel.getMarkerModelFromSeries(seriesModel, _this.type); if (markerModel) { var data = markerModel.getData(); data.eachItemGraphicEl(function (el) { if (el) { isBlur ? enterBlur(el) : leaveBlur(el); } }); } }); }; MarkerView.type = 'marker'; return MarkerView; }(view_Component); /* harmony default export */ var marker_MarkerView = (MarkerView_MarkerView); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/marker/MarkPointView.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 updateMarkerLayout(mpData, seriesModel, api) { var coordSys = seriesModel.coordinateSystem; mpData.each(function (idx) { var itemModel = mpData.getItemModel(idx); var point; var xPx = number_parsePercent(itemModel.get('x'), api.getWidth()); var yPx = number_parsePercent(itemModel.get('y'), api.getHeight()); if (!isNaN(xPx) && !isNaN(yPx)) { point = [xPx, yPx]; } // Chart like bar may have there own marker positioning logic else if (seriesModel.getMarkerPosition) { // Use the getMarkerPosition point = seriesModel.getMarkerPosition(mpData.getValues(mpData.dimensions, idx)); } else if (coordSys) { var x = mpData.get(coordSys.dimensions[0], idx); var y = mpData.get(coordSys.dimensions[1], idx); point = coordSys.dataToPoint([x, y]); } // Use x, y if has any if (!isNaN(xPx)) { point[0] = xPx; } if (!isNaN(yPx)) { point[1] = yPx; } mpData.setItemLayout(idx, point); }); } var MarkPointView_MarkPointView = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(MarkPointView, _super); function MarkPointView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = MarkPointView.type; return _this; } MarkPointView.prototype.updateTransform = function (markPointModel, ecModel, api) { ecModel.eachSeries(function (seriesModel) { var mpModel = marker_MarkerModel.getMarkerModelFromSeries(seriesModel, 'markPoint'); if (mpModel) { updateMarkerLayout(mpModel.getData(), seriesModel, api); this.markerGroupMap.get(seriesModel.id).updateLayout(); } }, this); }; MarkPointView.prototype.renderSeries = function (seriesModel, mpModel, ecModel, api) { var coordSys = seriesModel.coordinateSystem; var seriesId = seriesModel.id; var seriesData = seriesModel.getData(); var symbolDrawMap = this.markerGroupMap; var symbolDraw = symbolDrawMap.get(seriesId) || symbolDrawMap.set(seriesId, new helper_SymbolDraw()); var mpData = createData(coordSys, seriesModel, mpModel); // FIXME mpModel.setData(mpData); updateMarkerLayout(mpModel.getData(), seriesModel, api); mpData.each(function (idx) { var itemModel = mpData.getItemModel(idx); var symbol = itemModel.getShallow('symbol'); var symbolSize = itemModel.getShallow('symbolSize'); var symbolRotate = itemModel.getShallow('symbolRotate'); var symbolOffset = itemModel.getShallow('symbolOffset'); var symbolKeepAspect = itemModel.getShallow('symbolKeepAspect'); // TODO: refactor needed: single data item should not support callback function if (Object(core_util["isFunction"])(symbol) || Object(core_util["isFunction"])(symbolSize) || Object(core_util["isFunction"])(symbolRotate) || Object(core_util["isFunction"])(symbolOffset)) { var rawIdx = mpModel.getRawValue(idx); var dataParams = mpModel.getDataParams(idx); if (Object(core_util["isFunction"])(symbol)) { symbol = symbol(rawIdx, dataParams); } if (Object(core_util["isFunction"])(symbolSize)) { // FIXME 这里不兼容 ECharts 2.x,2.x 貌似参数是整个数据? symbolSize = symbolSize(rawIdx, dataParams); } if (Object(core_util["isFunction"])(symbolRotate)) { symbolRotate = symbolRotate(rawIdx, dataParams); } if (Object(core_util["isFunction"])(symbolOffset)) { symbolOffset = symbolOffset(rawIdx, dataParams); } } var style = itemModel.getModel('itemStyle').getItemStyle(); var color = getVisualFromData(seriesData, 'color'); if (!style.fill) { style.fill = color; } mpData.setItemVisual(idx, { symbol: symbol, symbolSize: symbolSize, symbolRotate: symbolRotate, symbolOffset: symbolOffset, symbolKeepAspect: symbolKeepAspect, style: style }); }); // TODO Text are wrong symbolDraw.updateData(mpData); this.group.add(symbolDraw.group); // Set host model for tooltip // FIXME mpData.eachItemGraphicEl(function (el) { el.traverse(function (child) { getECData(child).dataModel = mpModel; }); }); this.markKeep(symbolDraw); symbolDraw.group.silent = mpModel.get('silent') || seriesModel.get('silent'); }; MarkPointView.type = 'markPoint'; return MarkPointView; }(marker_MarkerView); function createData(coordSys, seriesModel, mpModel) { var coordDimsInfos; if (coordSys) { coordDimsInfos = Object(core_util["map"])(coordSys && coordSys.dimensions, function (coordDim) { var info = seriesModel.getData().getDimensionInfo(seriesModel.getData().mapDimension(coordDim)) || {}; // In map series data don't have lng and lat dimension. Fallback to same with coordSys return Object(core_util["extend"])(Object(core_util["extend"])({}, info), { name: coordDim, // DON'T use ordinalMeta to parse and collect ordinal. ordinalMeta: null }); }); } else { coordDimsInfos = [{ name: 'value', type: 'float' }]; } var mpData = new data_SeriesData(coordDimsInfos, mpModel); var dataOpt = Object(core_util["map"])(mpModel.get('data'), Object(core_util["curry"])(dataTransform, seriesModel)); if (coordSys) { dataOpt = Object(core_util["filter"])(dataOpt, Object(core_util["curry"])(markerHelper_dataFilter, coordSys)); } var dimValueGetter = createMarkerDimValueGetter(!!coordSys, coordDimsInfos); mpData.initData(dataOpt, null, dimValueGetter); return mpData; } /* harmony default export */ var marker_MarkPointView = (MarkPointView_MarkPointView); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/marker/installMarkPoint.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ function installMarkPoint_install(registers) { registers.registerComponentModel(marker_MarkPointModel); registers.registerComponentView(marker_MarkPointView); registers.registerPreprocessor(function (opt) { if (checkMarkerInSeries(opt.series, 'markPoint')) { // Make sure markPoint component is enabled opt.markPoint = opt.markPoint || {}; } }); } // CONCATENATED MODULE: ./node_modules/echarts/lib/component/marker/MarkLineModel.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 MarkLineModel_MarkLineModel = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(MarkLineModel, _super); function MarkLineModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = MarkLineModel.type; return _this; } MarkLineModel.prototype.createMarkerModelFromSeries = function (markerOpt, masterMarkerModel, ecModel) { return new MarkLineModel(markerOpt, masterMarkerModel, ecModel); }; MarkLineModel.type = 'markLine'; MarkLineModel.defaultOption = { // zlevel: 0, z: 5, symbol: ['circle', 'arrow'], symbolSize: [8, 16], // symbolRotate: 0, symbolOffset: 0, precision: 2, tooltip: { trigger: 'item' }, label: { show: true, position: 'end', distance: 5 }, lineStyle: { type: 'dashed' }, emphasis: { label: { show: true }, lineStyle: { width: 3 } }, animationEasing: 'linear' }; return MarkLineModel; }(marker_MarkerModel); /* harmony default export */ var marker_MarkLineModel = (MarkLineModel_MarkLineModel); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/marker/MarkLineView.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 MarkLineView_inner = makeInner(); var markLineTransform = function (seriesModel, coordSys, mlModel, item) { var data = seriesModel.getData(); var itemArray; if (!Object(core_util["isArray"])(item)) { // Special type markLine like 'min', 'max', 'average', 'median' var mlType = item.type; if (mlType === 'min' || mlType === 'max' || mlType === 'average' || mlType === 'median' // In case // data: [{ // yAxis: 10 // }] || item.xAxis != null || item.yAxis != null) { var valueAxis = void 0; var value = void 0; if (item.yAxis != null || item.xAxis != null) { valueAxis = coordSys.getAxis(item.yAxis != null ? 'y' : 'x'); value = Object(core_util["retrieve"])(item.yAxis, item.xAxis); } else { var axisInfo = markerHelper_getAxisInfo(item, data, coordSys, seriesModel); valueAxis = axisInfo.valueAxis; var valueDataDim = getStackedDimension(data, axisInfo.valueDataDim); value = numCalculate(data, valueDataDim, mlType); } var valueIndex = valueAxis.dim === 'x' ? 0 : 1; var baseIndex = 1 - valueIndex; // Normized to 2d data with start and end point var mlFrom = Object(core_util["clone"])(item); var mlTo = { coord: [] }; mlFrom.type = null; mlFrom.coord = []; mlFrom.coord[baseIndex] = -Infinity; mlTo.coord[baseIndex] = Infinity; var precision = mlModel.get('precision'); if (precision >= 0 && Object(core_util["isNumber"])(value)) { value = +value.toFixed(Math.min(precision, 20)); } mlFrom.coord[valueIndex] = mlTo.coord[valueIndex] = value; itemArray = [mlFrom, mlTo, { type: mlType, valueIndex: item.valueIndex, // Force to use the value of calculated value. value: value }]; } else { // Invalid data if (false) { logError('Invalid markLine data.'); } itemArray = []; } } else { itemArray = item; } var normalizedItem = [dataTransform(seriesModel, itemArray[0]), dataTransform(seriesModel, itemArray[1]), Object(core_util["extend"])({}, itemArray[2])]; // Avoid line data type is extended by from(to) data type normalizedItem[2].type = normalizedItem[2].type || null; // Merge from option and to option into line option Object(core_util["merge"])(normalizedItem[2], normalizedItem[0]); Object(core_util["merge"])(normalizedItem[2], normalizedItem[1]); return normalizedItem; }; function isInfinity(val) { return !isNaN(val) && !isFinite(val); } // If a markLine has one dim function ifMarkLineHasOnlyDim(dimIndex, fromCoord, toCoord, coordSys) { var otherDimIndex = 1 - dimIndex; var dimName = coordSys.dimensions[dimIndex]; return isInfinity(fromCoord[otherDimIndex]) && isInfinity(toCoord[otherDimIndex]) && fromCoord[dimIndex] === toCoord[dimIndex] && coordSys.getAxis(dimName).containData(fromCoord[dimIndex]); } function markLineFilter(coordSys, item) { if (coordSys.type === 'cartesian2d') { var fromCoord = item[0].coord; var toCoord = item[1].coord; // In case // { // markLine: { // data: [{ yAxis: 2 }] // } // } if (fromCoord && toCoord && (ifMarkLineHasOnlyDim(1, fromCoord, toCoord, coordSys) || ifMarkLineHasOnlyDim(0, fromCoord, toCoord, coordSys))) { return true; } } return markerHelper_dataFilter(coordSys, item[0]) && markerHelper_dataFilter(coordSys, item[1]); } function updateSingleMarkerEndLayout(data, idx, isFrom, seriesModel, api) { var coordSys = seriesModel.coordinateSystem; var itemModel = data.getItemModel(idx); var point; var xPx = number_parsePercent(itemModel.get('x'), api.getWidth()); var yPx = number_parsePercent(itemModel.get('y'), api.getHeight()); if (!isNaN(xPx) && !isNaN(yPx)) { point = [xPx, yPx]; } else { // Chart like bar may have there own marker positioning logic if (seriesModel.getMarkerPosition) { // Use the getMarkerPosition point = seriesModel.getMarkerPosition(data.getValues(data.dimensions, idx)); } else { var dims = coordSys.dimensions; var x = data.get(dims[0], idx); var y = data.get(dims[1], idx); point = coordSys.dataToPoint([x, y]); } // Expand line to the edge of grid if value on one axis is Inifnity // In case // markLine: { // data: [{ // yAxis: 2 // // or // type: 'average' // }] // } if (isCoordinateSystemType(coordSys, 'cartesian2d')) { // TODO: TYPE ts@4.1 may still infer it as Axis instead of Axis2D. Not sure if it's a bug var xAxis = coordSys.getAxis('x'); var yAxis = coordSys.getAxis('y'); var dims = coordSys.dimensions; if (isInfinity(data.get(dims[0], idx))) { point[0] = xAxis.toGlobalCoord(xAxis.getExtent()[isFrom ? 0 : 1]); } else if (isInfinity(data.get(dims[1], idx))) { point[1] = yAxis.toGlobalCoord(yAxis.getExtent()[isFrom ? 0 : 1]); } } // Use x, y if has any if (!isNaN(xPx)) { point[0] = xPx; } if (!isNaN(yPx)) { point[1] = yPx; } } data.setItemLayout(idx, point); } var MarkLineView_MarkLineView = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(MarkLineView, _super); function MarkLineView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = MarkLineView.type; return _this; } MarkLineView.prototype.updateTransform = function (markLineModel, ecModel, api) { ecModel.eachSeries(function (seriesModel) { var mlModel = marker_MarkerModel.getMarkerModelFromSeries(seriesModel, 'markLine'); if (mlModel) { var mlData_1 = mlModel.getData(); var fromData_1 = MarkLineView_inner(mlModel).from; var toData_1 = MarkLineView_inner(mlModel).to; // Update visual and layout of from symbol and to symbol fromData_1.each(function (idx) { updateSingleMarkerEndLayout(fromData_1, idx, true, seriesModel, api); updateSingleMarkerEndLayout(toData_1, idx, false, seriesModel, api); }); // Update layout of line mlData_1.each(function (idx) { mlData_1.setItemLayout(idx, [fromData_1.getItemLayout(idx), toData_1.getItemLayout(idx)]); }); this.markerGroupMap.get(seriesModel.id).updateLayout(); } }, this); }; MarkLineView.prototype.renderSeries = function (seriesModel, mlModel, ecModel, api) { var coordSys = seriesModel.coordinateSystem; var seriesId = seriesModel.id; var seriesData = seriesModel.getData(); var lineDrawMap = this.markerGroupMap; var lineDraw = lineDrawMap.get(seriesId) || lineDrawMap.set(seriesId, new helper_LineDraw()); this.group.add(lineDraw.group); var mlData = MarkLineView_createList(coordSys, seriesModel, mlModel); var fromData = mlData.from; var toData = mlData.to; var lineData = mlData.line; MarkLineView_inner(mlModel).from = fromData; MarkLineView_inner(mlModel).to = toData; // Line data for tooltip and formatter mlModel.setData(lineData); // TODO // Functionally, `symbolSize` & `symbolOffset` can also be 2D array now. // But the related logic and type definition are not finished yet. // Finish it if required var symbolType = mlModel.get('symbol'); var symbolSize = mlModel.get('symbolSize'); var symbolRotate = mlModel.get('symbolRotate'); var symbolOffset = mlModel.get('symbolOffset'); // TODO: support callback function like markPoint if (!Object(core_util["isArray"])(symbolType)) { symbolType = [symbolType, symbolType]; } if (!Object(core_util["isArray"])(symbolSize)) { symbolSize = [symbolSize, symbolSize]; } if (!Object(core_util["isArray"])(symbolRotate)) { symbolRotate = [symbolRotate, symbolRotate]; } if (!Object(core_util["isArray"])(symbolOffset)) { symbolOffset = [symbolOffset, symbolOffset]; } // Update visual and layout of from symbol and to symbol mlData.from.each(function (idx) { updateDataVisualAndLayout(fromData, idx, true); updateDataVisualAndLayout(toData, idx, false); }); // Update visual and layout of line lineData.each(function (idx) { var lineStyle = lineData.getItemModel(idx).getModel('lineStyle').getLineStyle(); // lineData.setItemVisual(idx, { // color: lineColor || fromData.getItemVisual(idx, 'color') // }); lineData.setItemLayout(idx, [fromData.getItemLayout(idx), toData.getItemLayout(idx)]); if (lineStyle.stroke == null) { lineStyle.stroke = fromData.getItemVisual(idx, 'style').fill; } lineData.setItemVisual(idx, { fromSymbolKeepAspect: fromData.getItemVisual(idx, 'symbolKeepAspect'), fromSymbolOffset: fromData.getItemVisual(idx, 'symbolOffset'), fromSymbolRotate: fromData.getItemVisual(idx, 'symbolRotate'), fromSymbolSize: fromData.getItemVisual(idx, 'symbolSize'), fromSymbol: fromData.getItemVisual(idx, 'symbol'), toSymbolKeepAspect: toData.getItemVisual(idx, 'symbolKeepAspect'), toSymbolOffset: toData.getItemVisual(idx, 'symbolOffset'), toSymbolRotate: toData.getItemVisual(idx, 'symbolRotate'), toSymbolSize: toData.getItemVisual(idx, 'symbolSize'), toSymbol: toData.getItemVisual(idx, 'symbol'), style: lineStyle }); }); lineDraw.updateData(lineData); // Set host model for tooltip // FIXME mlData.line.eachItemGraphicEl(function (el) { getECData(el).dataModel = mlModel; el.traverse(function (child) { getECData(child).dataModel = mlModel; }); }); function updateDataVisualAndLayout(data, idx, isFrom) { var itemModel = data.getItemModel(idx); updateSingleMarkerEndLayout(data, idx, isFrom, seriesModel, api); var style = itemModel.getModel('itemStyle').getItemStyle(); if (style.fill == null) { style.fill = getVisualFromData(seriesData, 'color'); } data.setItemVisual(idx, { symbolKeepAspect: itemModel.get('symbolKeepAspect'), // `0` should be considered as a valid value, so use `retrieve2` instead of `||` symbolOffset: Object(core_util["retrieve2"])(itemModel.get('symbolOffset', true), symbolOffset[isFrom ? 0 : 1]), symbolRotate: Object(core_util["retrieve2"])(itemModel.get('symbolRotate', true), symbolRotate[isFrom ? 0 : 1]), // TODO: when 2d array is supported, it should ignore parent symbolSize: Object(core_util["retrieve2"])(itemModel.get('symbolSize'), symbolSize[isFrom ? 0 : 1]), symbol: Object(core_util["retrieve2"])(itemModel.get('symbol', true), symbolType[isFrom ? 0 : 1]), style: style }); } this.markKeep(lineDraw); lineDraw.group.silent = mlModel.get('silent') || seriesModel.get('silent'); }; MarkLineView.type = 'markLine'; return MarkLineView; }(marker_MarkerView); function MarkLineView_createList(coordSys, seriesModel, mlModel) { var coordDimsInfos; if (coordSys) { coordDimsInfos = Object(core_util["map"])(coordSys && coordSys.dimensions, function (coordDim) { var info = seriesModel.getData().getDimensionInfo(seriesModel.getData().mapDimension(coordDim)) || {}; // In map series data don't have lng and lat dimension. Fallback to same with coordSys return Object(core_util["extend"])(Object(core_util["extend"])({}, info), { name: coordDim, // DON'T use ordinalMeta to parse and collect ordinal. ordinalMeta: null }); }); } else { coordDimsInfos = [{ name: 'value', type: 'float' }]; } var fromData = new data_SeriesData(coordDimsInfos, mlModel); var toData = new data_SeriesData(coordDimsInfos, mlModel); // No dimensions var lineData = new data_SeriesData([], mlModel); var optData = Object(core_util["map"])(mlModel.get('data'), Object(core_util["curry"])(markLineTransform, seriesModel, coordSys, mlModel)); if (coordSys) { optData = Object(core_util["filter"])(optData, Object(core_util["curry"])(markLineFilter, coordSys)); } var dimValueGetter = createMarkerDimValueGetter(!!coordSys, coordDimsInfos); fromData.initData(Object(core_util["map"])(optData, function (item) { return item[0]; }), null, dimValueGetter); toData.initData(Object(core_util["map"])(optData, function (item) { return item[1]; }), null, dimValueGetter); lineData.initData(Object(core_util["map"])(optData, function (item) { return item[2]; })); lineData.hasItemOption = true; return { from: fromData, to: toData, line: lineData }; } /* harmony default export */ var marker_MarkLineView = (MarkLineView_MarkLineView); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/marker/installMarkLine.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ function installMarkLine_install(registers) { registers.registerComponentModel(marker_MarkLineModel); registers.registerComponentView(marker_MarkLineView); registers.registerPreprocessor(function (opt) { if (checkMarkerInSeries(opt.series, 'markLine')) { // Make sure markLine component is enabled opt.markLine = opt.markLine || {}; } }); } // CONCATENATED MODULE: ./node_modules/echarts/lib/component/marker/MarkAreaModel.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 MarkAreaModel_MarkAreaModel = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(MarkAreaModel, _super); function MarkAreaModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = MarkAreaModel.type; return _this; } MarkAreaModel.prototype.createMarkerModelFromSeries = function (markerOpt, masterMarkerModel, ecModel) { return new MarkAreaModel(markerOpt, masterMarkerModel, ecModel); }; MarkAreaModel.type = 'markArea'; MarkAreaModel.defaultOption = { // zlevel: 0, // PENDING z: 1, tooltip: { trigger: 'item' }, // markArea should fixed on the coordinate system animation: false, label: { show: true, position: 'top' }, itemStyle: { // color and borderColor default to use color from series // color: 'auto' // borderColor: 'auto' borderWidth: 0 }, emphasis: { label: { show: true, position: 'top' } } }; return MarkAreaModel; }(marker_MarkerModel); /* harmony default export */ var marker_MarkAreaModel = (MarkAreaModel_MarkAreaModel); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/marker/MarkAreaView.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 Optimize on polar var MarkAreaView_inner = makeInner(); var markAreaTransform = function (seriesModel, coordSys, maModel, item) { // item may be null var item0 = item[0]; var item1 = item[1]; if (!item0 || !item1) { return; } var lt = dataTransform(seriesModel, item0); var rb = dataTransform(seriesModel, item1); // FIXME make sure lt is less than rb var ltCoord = lt.coord; var rbCoord = rb.coord; ltCoord[0] = Object(core_util["retrieve"])(ltCoord[0], -Infinity); ltCoord[1] = Object(core_util["retrieve"])(ltCoord[1], -Infinity); rbCoord[0] = Object(core_util["retrieve"])(rbCoord[0], Infinity); rbCoord[1] = Object(core_util["retrieve"])(rbCoord[1], Infinity); // Merge option into one var result = Object(core_util["mergeAll"])([{}, lt, rb]); result.coord = [lt.coord, rb.coord]; result.x0 = lt.x; result.y0 = lt.y; result.x1 = rb.x; result.y1 = rb.y; return result; }; function MarkAreaView_isInfinity(val) { return !isNaN(val) && !isFinite(val); } // If a markArea has one dim function ifMarkAreaHasOnlyDim(dimIndex, fromCoord, toCoord, coordSys) { var otherDimIndex = 1 - dimIndex; return MarkAreaView_isInfinity(fromCoord[otherDimIndex]) && MarkAreaView_isInfinity(toCoord[otherDimIndex]); } function markAreaFilter(coordSys, item) { var fromCoord = item.coord[0]; var toCoord = item.coord[1]; var item0 = { coord: fromCoord, x: item.x0, y: item.y0 }; var item1 = { coord: toCoord, x: item.x1, y: item.y1 }; if (isCoordinateSystemType(coordSys, 'cartesian2d')) { // In case // { // markArea: { // data: [{ yAxis: 2 }] // } // } if (fromCoord && toCoord && (ifMarkAreaHasOnlyDim(1, fromCoord, toCoord, coordSys) || ifMarkAreaHasOnlyDim(0, fromCoord, toCoord, coordSys))) { return true; } // Directly returning true may also do the work, // because markArea will not be shown automatically // when it's not included in coordinate system. // But filtering ahead can avoid keeping rendering markArea // when there are too many of them. return zoneFilter(coordSys, item0, item1); } return markerHelper_dataFilter(coordSys, item0) || markerHelper_dataFilter(coordSys, item1); } // dims can be ['x0', 'y0'], ['x1', 'y1'], ['x0', 'y1'], ['x1', 'y0'] function getSingleMarkerEndPoint(data, idx, dims, seriesModel, api) { var coordSys = seriesModel.coordinateSystem; var itemModel = data.getItemModel(idx); var point; var xPx = number_parsePercent(itemModel.get(dims[0]), api.getWidth()); var yPx = number_parsePercent(itemModel.get(dims[1]), api.getHeight()); if (!isNaN(xPx) && !isNaN(yPx)) { point = [xPx, yPx]; } else { // Chart like bar may have there own marker positioning logic if (seriesModel.getMarkerPosition) { // Consider the case that user input the right-bottom point first // Pick the larger x and y as 'x1' and 'y1' var pointValue0 = data.getValues(['x0', 'y0'], idx); var pointValue1 = data.getValues(['x1', 'y1'], idx); var clampPointValue0 = coordSys.clampData(pointValue0); var clampPointValue1 = coordSys.clampData(pointValue1); var pointValue = []; if (dims[0] === 'x0') { pointValue[0] = clampPointValue0[0] > clampPointValue1[0] ? pointValue1[0] : pointValue0[0]; } else { pointValue[0] = clampPointValue0[0] > clampPointValue1[0] ? pointValue0[0] : pointValue1[0]; } if (dims[1] === 'y0') { pointValue[1] = clampPointValue0[1] > clampPointValue1[1] ? pointValue1[1] : pointValue0[1]; } else { pointValue[1] = clampPointValue0[1] > clampPointValue1[1] ? pointValue0[1] : pointValue1[1]; } // Use the getMarkerPosition point = seriesModel.getMarkerPosition(pointValue, dims, true); } else { var x = data.get(dims[0], idx); var y = data.get(dims[1], idx); var pt = [x, y]; coordSys.clampData && coordSys.clampData(pt, pt); point = coordSys.dataToPoint(pt, true); } if (isCoordinateSystemType(coordSys, 'cartesian2d')) { // TODO: TYPE ts@4.1 may still infer it as Axis instead of Axis2D. Not sure if it's a bug var xAxis = coordSys.getAxis('x'); var yAxis = coordSys.getAxis('y'); var x = data.get(dims[0], idx); var y = data.get(dims[1], idx); if (MarkAreaView_isInfinity(x)) { point[0] = xAxis.toGlobalCoord(xAxis.getExtent()[dims[0] === 'x0' ? 0 : 1]); } else if (MarkAreaView_isInfinity(y)) { point[1] = yAxis.toGlobalCoord(yAxis.getExtent()[dims[1] === 'y0' ? 0 : 1]); } } // Use x, y if has any if (!isNaN(xPx)) { point[0] = xPx; } if (!isNaN(yPx)) { point[1] = yPx; } } return point; } var dimPermutations = [['x0', 'y0'], ['x1', 'y0'], ['x1', 'y1'], ['x0', 'y1']]; var MarkAreaView_MarkAreaView = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(MarkAreaView, _super); function MarkAreaView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = MarkAreaView.type; return _this; } MarkAreaView.prototype.updateTransform = function (markAreaModel, ecModel, api) { ecModel.eachSeries(function (seriesModel) { var maModel = marker_MarkerModel.getMarkerModelFromSeries(seriesModel, 'markArea'); if (maModel) { var areaData_1 = maModel.getData(); areaData_1.each(function (idx) { var points = Object(core_util["map"])(dimPermutations, function (dim) { return getSingleMarkerEndPoint(areaData_1, idx, dim, seriesModel, api); }); // Layout areaData_1.setItemLayout(idx, points); var el = areaData_1.getItemGraphicEl(idx); el.setShape('points', points); }); } }, this); }; MarkAreaView.prototype.renderSeries = function (seriesModel, maModel, ecModel, api) { var coordSys = seriesModel.coordinateSystem; var seriesId = seriesModel.id; var seriesData = seriesModel.getData(); var areaGroupMap = this.markerGroupMap; var polygonGroup = areaGroupMap.get(seriesId) || areaGroupMap.set(seriesId, { group: new graphic_Group() }); this.group.add(polygonGroup.group); this.markKeep(polygonGroup); var areaData = MarkAreaView_createList(coordSys, seriesModel, maModel); // Line data for tooltip and formatter maModel.setData(areaData); // Update visual and layout of line areaData.each(function (idx) { // Layout var points = Object(core_util["map"])(dimPermutations, function (dim) { return getSingleMarkerEndPoint(areaData, idx, dim, seriesModel, api); }); var xAxisScale = coordSys.getAxis('x').scale; var yAxisScale = coordSys.getAxis('y').scale; var xAxisExtent = xAxisScale.getExtent(); var yAxisExtent = yAxisScale.getExtent(); var xPointExtent = [xAxisScale.parse(areaData.get('x0', idx)), xAxisScale.parse(areaData.get('x1', idx))]; var yPointExtent = [yAxisScale.parse(areaData.get('y0', idx)), yAxisScale.parse(areaData.get('y1', idx))]; asc(xPointExtent); asc(yPointExtent); var overlapped = !(xAxisExtent[0] > xPointExtent[1] || xAxisExtent[1] < xPointExtent[0] || yAxisExtent[0] > yPointExtent[1] || yAxisExtent[1] < yPointExtent[0]); // If none of the area is inside coordSys, allClipped is set to be true // in layout so that label will not be displayed. See #12591 var allClipped = !overlapped; areaData.setItemLayout(idx, { points: points, allClipped: allClipped }); var style = areaData.getItemModel(idx).getModel('itemStyle').getItemStyle(); var color = getVisualFromData(seriesData, 'color'); if (!style.fill) { style.fill = color; if (Object(core_util["isString"])(style.fill)) { style.fill = tool_color["modifyAlpha"](style.fill, 0.4); } } if (!style.stroke) { style.stroke = color; } // Visual areaData.setItemVisual(idx, 'style', style); }); areaData.diff(MarkAreaView_inner(polygonGroup).data).add(function (idx) { var layout = areaData.getItemLayout(idx); if (!layout.allClipped) { var polygon = new shape_Polygon({ shape: { points: layout.points } }); areaData.setItemGraphicEl(idx, polygon); polygonGroup.group.add(polygon); } }).update(function (newIdx, oldIdx) { var polygon = MarkAreaView_inner(polygonGroup).data.getItemGraphicEl(oldIdx); var layout = areaData.getItemLayout(newIdx); if (!layout.allClipped) { if (polygon) { updateProps(polygon, { shape: { points: layout.points } }, maModel, newIdx); } else { polygon = new shape_Polygon({ shape: { points: layout.points } }); } areaData.setItemGraphicEl(newIdx, polygon); polygonGroup.group.add(polygon); } else if (polygon) { polygonGroup.group.remove(polygon); } }).remove(function (idx) { var polygon = MarkAreaView_inner(polygonGroup).data.getItemGraphicEl(idx); polygonGroup.group.remove(polygon); }).execute(); areaData.eachItemGraphicEl(function (polygon, idx) { var itemModel = areaData.getItemModel(idx); var style = areaData.getItemVisual(idx, 'style'); polygon.useStyle(areaData.getItemVisual(idx, 'style')); setLabelStyle(polygon, getLabelStatesModels(itemModel), { labelFetcher: maModel, labelDataIndex: idx, defaultText: areaData.getName(idx) || '', inheritColor: Object(core_util["isString"])(style.fill) ? tool_color["modifyAlpha"](style.fill, 1) : '#000' }); setStatesStylesFromModel(polygon, itemModel); toggleHoverEmphasis(polygon, null, null, itemModel.get(['emphasis', 'disabled'])); getECData(polygon).dataModel = maModel; }); MarkAreaView_inner(polygonGroup).data = areaData; polygonGroup.group.silent = maModel.get('silent') || seriesModel.get('silent'); }; MarkAreaView.type = 'markArea'; return MarkAreaView; }(marker_MarkerView); function MarkAreaView_createList(coordSys, seriesModel, maModel) { var areaData; var dataDims; var dims = ['x0', 'y0', 'x1', 'y1']; if (coordSys) { var coordDimsInfos_1 = Object(core_util["map"])(coordSys && coordSys.dimensions, function (coordDim) { var data = seriesModel.getData(); var info = data.getDimensionInfo(data.mapDimension(coordDim)) || {}; // In map series data don't have lng and lat dimension. Fallback to same with coordSys return Object(core_util["extend"])(Object(core_util["extend"])({}, info), { name: coordDim, // DON'T use ordinalMeta to parse and collect ordinal. ordinalMeta: null }); }); dataDims = Object(core_util["map"])(dims, function (dim, idx) { return { name: dim, type: coordDimsInfos_1[idx % 2].type }; }); areaData = new data_SeriesData(dataDims, maModel); } else { dataDims = [{ name: 'value', type: 'float' }]; areaData = new data_SeriesData(dataDims, maModel); } var optData = Object(core_util["map"])(maModel.get('data'), Object(core_util["curry"])(markAreaTransform, seriesModel, coordSys, maModel)); if (coordSys) { optData = Object(core_util["filter"])(optData, Object(core_util["curry"])(markAreaFilter, coordSys)); } var dimValueGetter = coordSys ? function (item, dimName, dataIndex, dimIndex) { // TODO should convert to ParsedValue? var rawVal = item.coord[Math.floor(dimIndex / 2)][dimIndex % 2]; return parseDataValue(rawVal, dataDims[dimIndex]); } : function (item, dimName, dataIndex, dimIndex) { return parseDataValue(item.value, dataDims[dimIndex]); }; areaData.initData(optData, null, dimValueGetter); areaData.hasItemOption = true; return areaData; } /* harmony default export */ var marker_MarkAreaView = (MarkAreaView_MarkAreaView); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/marker/installMarkArea.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 installMarkArea_install(registers) { registers.registerComponentModel(marker_MarkAreaModel); registers.registerComponentView(marker_MarkAreaView); registers.registerPreprocessor(function (opt) { if (checkMarkerInSeries(opt.series, 'markArea')) { // Make sure markArea component is enabled opt.markArea = opt.markArea || {}; } }); } // CONCATENATED MODULE: ./node_modules/echarts/lib/component/legend/LegendModel.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 getDefaultSelectorOptions = function (ecModel, type) { if (type === 'all') { return { type: 'all', title: ecModel.getLocaleModel().get(['legend', 'selector', 'all']) }; } else if (type === 'inverse') { return { type: 'inverse', title: ecModel.getLocaleModel().get(['legend', 'selector', 'inverse']) }; } }; var LegendModel_LegendModel = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(LegendModel, _super); function LegendModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = LegendModel.type; _this.layoutMode = { type: 'box', // legend.width/height are maxWidth/maxHeight actually, // whereas real width/height is calculated by its content. // (Setting {left: 10, right: 10} does not make sense). // So consider the case: // `setOption({legend: {left: 10});` // then `setOption({legend: {right: 10});` // The previous `left` should be cleared by setting `ignoreSize`. ignoreSize: true }; return _this; } LegendModel.prototype.init = function (option, parentModel, ecModel) { this.mergeDefaultAndTheme(option, ecModel); option.selected = option.selected || {}; this._updateSelector(option); }; LegendModel.prototype.mergeOption = function (option, ecModel) { _super.prototype.mergeOption.call(this, option, ecModel); this._updateSelector(option); }; LegendModel.prototype._updateSelector = function (option) { var selector = option.selector; var ecModel = this.ecModel; if (selector === true) { selector = option.selector = ['all', 'inverse']; } if (core_util["isArray"](selector)) { core_util["each"](selector, function (item, index) { core_util["isString"](item) && (item = { type: item }); selector[index] = core_util["merge"](item, getDefaultSelectorOptions(ecModel, item.type)); }); } }; LegendModel.prototype.optionUpdated = function () { this._updateData(this.ecModel); var legendData = this._data; // If selectedMode is single, try to select one if (legendData[0] && this.get('selectedMode') === 'single') { var hasSelected = false; // If has any selected in option.selected for (var i = 0; i < legendData.length; i++) { var name_1 = legendData[i].get('name'); if (this.isSelected(name_1)) { // Force to unselect others this.select(name_1); hasSelected = true; break; } } // Try select the first if selectedMode is single !hasSelected && this.select(legendData[0].get('name')); } }; LegendModel.prototype._updateData = function (ecModel) { var potentialData = []; var availableNames = []; ecModel.eachRawSeries(function (seriesModel) { var seriesName = seriesModel.name; availableNames.push(seriesName); var isPotential; if (seriesModel.legendVisualProvider) { var provider = seriesModel.legendVisualProvider; var names = provider.getAllNames(); if (!ecModel.isSeriesFiltered(seriesModel)) { availableNames = availableNames.concat(names); } if (names.length) { potentialData = potentialData.concat(names); } else { isPotential = true; } } else { isPotential = true; } if (isPotential && isNameSpecified(seriesModel)) { potentialData.push(seriesModel.name); } }); /** * @type {Array.} * @private */ this._availableNames = availableNames; // If legend.data is not specified in option, use availableNames as data, // which is convenient for user preparing option. var rawData = this.get('data') || potentialData; var legendNameMap = core_util["createHashMap"](); var legendData = core_util["map"](rawData, function (dataItem) { // Can be string or number if (core_util["isString"](dataItem) || core_util["isNumber"](dataItem)) { dataItem = { name: dataItem }; } if (legendNameMap.get(dataItem.name)) { // remove legend name duplicate return null; } legendNameMap.set(dataItem.name, true); return new model_Model(dataItem, this, this.ecModel); }, this); /** * @type {Array.} * @private */ this._data = core_util["filter"](legendData, function (item) { return !!item; }); }; LegendModel.prototype.getData = function () { return this._data; }; LegendModel.prototype.select = function (name) { var selected = this.option.selected; var selectedMode = this.get('selectedMode'); if (selectedMode === 'single') { var data = this._data; core_util["each"](data, function (dataItem) { selected[dataItem.get('name')] = false; }); } selected[name] = true; }; LegendModel.prototype.unSelect = function (name) { if (this.get('selectedMode') !== 'single') { this.option.selected[name] = false; } }; LegendModel.prototype.toggleSelected = function (name) { var selected = this.option.selected; // Default is true if (!selected.hasOwnProperty(name)) { selected[name] = true; } this[selected[name] ? 'unSelect' : 'select'](name); }; LegendModel.prototype.allSelect = function () { var data = this._data; var selected = this.option.selected; core_util["each"](data, function (dataItem) { selected[dataItem.get('name', true)] = true; }); }; LegendModel.prototype.inverseSelect = function () { var data = this._data; var selected = this.option.selected; core_util["each"](data, function (dataItem) { var name = dataItem.get('name', true); // Initially, default value is true if (!selected.hasOwnProperty(name)) { selected[name] = true; } selected[name] = !selected[name]; }); }; LegendModel.prototype.isSelected = function (name) { var selected = this.option.selected; return !(selected.hasOwnProperty(name) && !selected[name]) && core_util["indexOf"](this._availableNames, name) >= 0; }; LegendModel.prototype.getOrient = function () { return this.get('orient') === 'vertical' ? { index: 1, name: 'vertical' } : { index: 0, name: 'horizontal' }; }; LegendModel.type = 'legend.plain'; LegendModel.dependencies = ['series']; LegendModel.defaultOption = { // zlevel: 0, z: 4, show: true, orient: 'horizontal', left: 'center', // right: 'center', top: 0, // bottom: null, align: 'auto', backgroundColor: 'rgba(0,0,0,0)', borderColor: '#ccc', borderRadius: 0, borderWidth: 0, padding: 5, itemGap: 10, itemWidth: 25, itemHeight: 14, symbolRotate: 'inherit', symbolKeepAspect: true, inactiveColor: '#ccc', inactiveBorderColor: '#ccc', inactiveBorderWidth: 'auto', itemStyle: { color: 'inherit', opacity: 'inherit', borderColor: 'inherit', borderWidth: 'auto', borderCap: 'inherit', borderJoin: 'inherit', borderDashOffset: 'inherit', borderMiterLimit: 'inherit' }, lineStyle: { width: 'auto', color: 'inherit', inactiveColor: '#ccc', inactiveWidth: 2, opacity: 'inherit', type: 'inherit', cap: 'inherit', join: 'inherit', dashOffset: 'inherit', miterLimit: 'inherit' }, textStyle: { color: '#333' }, selectedMode: true, selector: false, selectorLabel: { show: true, borderRadius: 10, padding: [3, 5, 3, 5], fontSize: 12, fontFamily: 'sans-serif', color: '#666', borderWidth: 1, borderColor: '#666' }, emphasis: { selectorLabel: { show: true, color: '#eee', backgroundColor: '#666' } }, selectorPosition: 'auto', selectorItemGap: 7, selectorButtonGap: 10, tooltip: { show: false } }; return LegendModel; }(Component); /* harmony default export */ var legend_LegendModel = (LegendModel_LegendModel); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/legend/LegendView.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 curry = core_util["curry"]; var LegendView_each = core_util["each"]; var LegendView_Group = graphic_Group; var LegendView_LegendView = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(LegendView, _super); function LegendView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = LegendView.type; _this.newlineDisabled = false; return _this; } LegendView.prototype.init = function () { this.group.add(this._contentGroup = new LegendView_Group()); this.group.add(this._selectorGroup = new LegendView_Group()); this._isFirstRender = true; }; /** * @protected */ LegendView.prototype.getContentGroup = function () { return this._contentGroup; }; /** * @protected */ LegendView.prototype.getSelectorGroup = function () { return this._selectorGroup; }; /** * @override */ LegendView.prototype.render = function (legendModel, ecModel, api) { var isFirstRender = this._isFirstRender; this._isFirstRender = false; this.resetInner(); if (!legendModel.get('show', true)) { return; } var itemAlign = legendModel.get('align'); var orient = legendModel.get('orient'); if (!itemAlign || itemAlign === 'auto') { itemAlign = legendModel.get('left') === 'right' && orient === 'vertical' ? 'right' : 'left'; } // selector has been normalized to an array in model var selector = legendModel.get('selector', true); var selectorPosition = legendModel.get('selectorPosition', true); if (selector && (!selectorPosition || selectorPosition === 'auto')) { selectorPosition = orient === 'horizontal' ? 'end' : 'start'; } this.renderInner(itemAlign, legendModel, ecModel, api, selector, orient, selectorPosition); // Perform layout. var positionInfo = legendModel.getBoxLayoutParams(); var viewportSize = { width: api.getWidth(), height: api.getHeight() }; var padding = legendModel.get('padding'); var maxSize = getLayoutRect(positionInfo, viewportSize, padding); var mainRect = this.layoutInner(legendModel, itemAlign, maxSize, isFirstRender, selector, selectorPosition); // Place mainGroup, based on the calculated `mainRect`. var layoutRect = getLayoutRect(core_util["defaults"]({ width: mainRect.width, height: mainRect.height }, positionInfo), viewportSize, padding); this.group.x = layoutRect.x - mainRect.x; this.group.y = layoutRect.y - mainRect.y; this.group.markRedraw(); // Render background after group is layout. this.group.add(this._backgroundEl = makeBackground(mainRect, legendModel)); }; LegendView.prototype.resetInner = function () { this.getContentGroup().removeAll(); this._backgroundEl && this.group.remove(this._backgroundEl); this.getSelectorGroup().removeAll(); }; LegendView.prototype.renderInner = function (itemAlign, legendModel, ecModel, api, selector, orient, selectorPosition) { var contentGroup = this.getContentGroup(); var legendDrawnMap = core_util["createHashMap"](); var selectMode = legendModel.get('selectedMode'); var excludeSeriesId = []; ecModel.eachRawSeries(function (seriesModel) { !seriesModel.get('legendHoverLink') && excludeSeriesId.push(seriesModel.id); }); LegendView_each(legendModel.getData(), function (legendItemModel, dataIndex) { var name = legendItemModel.get('name'); // Use empty string or \n as a newline string if (!this.newlineDisabled && (name === '' || name === '\n')) { var g = new LegendView_Group(); // @ts-ignore g.newline = true; contentGroup.add(g); return; } // Representitive series. var seriesModel = ecModel.getSeriesByName(name)[0]; if (legendDrawnMap.get(name)) { // Have been drawn return; } // Legend to control series. if (seriesModel) { var data = seriesModel.getData(); var lineVisualStyle = data.getVisual('legendLineStyle') || {}; var legendIcon = data.getVisual('legendIcon'); /** * `data.getVisual('style')` may be the color from the register * in series. For example, for line series, */ var style = data.getVisual('style'); var itemGroup = this._createItem(seriesModel, name, dataIndex, legendItemModel, legendModel, itemAlign, lineVisualStyle, style, legendIcon, selectMode, api); itemGroup.on('click', curry(dispatchSelectAction, name, null, api, excludeSeriesId)).on('mouseover', curry(dispatchHighlightAction, seriesModel.name, null, api, excludeSeriesId)).on('mouseout', curry(dispatchDownplayAction, seriesModel.name, null, api, excludeSeriesId)); if (ecModel.ssr) { itemGroup.eachChild(function (child) { var ecData = getECData(child); ecData.seriesIndex = seriesModel.seriesIndex; ecData.dataIndex = dataIndex; ecData.ssrType = 'legend'; }); } legendDrawnMap.set(name, true); } else { // Legend to control data. In pie and funnel. ecModel.eachRawSeries(function (seriesModel) { // In case multiple series has same data name if (legendDrawnMap.get(name)) { return; } if (seriesModel.legendVisualProvider) { var provider = seriesModel.legendVisualProvider; if (!provider.containName(name)) { return; } var idx = provider.indexOfName(name); var style = provider.getItemVisual(idx, 'style'); var legendIcon = provider.getItemVisual(idx, 'legendIcon'); var colorArr = Object(tool_color["parse"])(style.fill); // Color may be set to transparent in visualMap when data is out of range. // Do not show nothing. if (colorArr && colorArr[3] === 0) { colorArr[3] = 0.2; // TODO color is set to 0, 0, 0, 0. Should show correct RGBA style = core_util["extend"](core_util["extend"]({}, style), { fill: Object(tool_color["stringify"])(colorArr, 'rgba') }); } var itemGroup = this._createItem(seriesModel, name, dataIndex, legendItemModel, legendModel, itemAlign, {}, style, legendIcon, selectMode, api); // FIXME: consider different series has items with the same name. itemGroup.on('click', curry(dispatchSelectAction, null, name, api, excludeSeriesId)) // Should not specify the series name, consider legend controls // more than one pie series. .on('mouseover', curry(dispatchHighlightAction, null, name, api, excludeSeriesId)).on('mouseout', curry(dispatchDownplayAction, null, name, api, excludeSeriesId)); if (ecModel.ssr) { itemGroup.eachChild(function (child) { var ecData = getECData(child); ecData.seriesIndex = seriesModel.seriesIndex; ecData.dataIndex = dataIndex; ecData.ssrType = 'legend'; }); } legendDrawnMap.set(name, true); } }, this); } if (false) { if (!legendDrawnMap.get(name)) { console.warn(name + ' series not exists. Legend data should be same with series name or data name.'); } } }, this); if (selector) { this._createSelector(selector, legendModel, api, orient, selectorPosition); } }; LegendView.prototype._createSelector = function (selector, legendModel, api, orient, selectorPosition) { var selectorGroup = this.getSelectorGroup(); LegendView_each(selector, function createSelectorButton(selectorItem) { var type = selectorItem.type; var labelText = new Text({ style: { x: 0, y: 0, align: 'center', verticalAlign: 'middle' }, onclick: function () { api.dispatchAction({ type: type === 'all' ? 'legendAllSelect' : 'legendInverseSelect', legendId: legendModel.id }); } }); selectorGroup.add(labelText); var labelModel = legendModel.getModel('selectorLabel'); var emphasisLabelModel = legendModel.getModel(['emphasis', 'selectorLabel']); setLabelStyle(labelText, { normal: labelModel, emphasis: emphasisLabelModel }, { defaultText: selectorItem.title }); enableHoverEmphasis(labelText); }); }; LegendView.prototype._createItem = function (seriesModel, name, dataIndex, legendItemModel, legendModel, itemAlign, lineVisualStyle, itemVisualStyle, legendIcon, selectMode, api) { var drawType = seriesModel.visualDrawType; var itemWidth = legendModel.get('itemWidth'); var itemHeight = legendModel.get('itemHeight'); var isSelected = legendModel.isSelected(name); var iconRotate = legendItemModel.get('symbolRotate'); var symbolKeepAspect = legendItemModel.get('symbolKeepAspect'); var legendIconType = legendItemModel.get('icon'); legendIcon = legendIconType || legendIcon || 'roundRect'; var style = getLegendStyle(legendIcon, legendItemModel, lineVisualStyle, itemVisualStyle, drawType, isSelected, api); var itemGroup = new LegendView_Group(); var textStyleModel = legendItemModel.getModel('textStyle'); if (core_util["isFunction"](seriesModel.getLegendIcon) && (!legendIconType || legendIconType === 'inherit')) { // Series has specific way to define legend icon itemGroup.add(seriesModel.getLegendIcon({ itemWidth: itemWidth, itemHeight: itemHeight, icon: legendIcon, iconRotate: iconRotate, itemStyle: style.itemStyle, lineStyle: style.lineStyle, symbolKeepAspect: symbolKeepAspect })); } else { // Use default legend icon policy for most series var rotate = legendIconType === 'inherit' && seriesModel.getData().getVisual('symbol') ? iconRotate === 'inherit' ? seriesModel.getData().getVisual('symbolRotate') : iconRotate : 0; // No rotation for no icon itemGroup.add(getDefaultLegendIcon({ itemWidth: itemWidth, itemHeight: itemHeight, icon: legendIcon, iconRotate: rotate, itemStyle: style.itemStyle, lineStyle: style.lineStyle, symbolKeepAspect: symbolKeepAspect })); } var textX = itemAlign === 'left' ? itemWidth + 5 : -5; var textAlign = itemAlign; var formatter = legendModel.get('formatter'); var content = name; if (core_util["isString"](formatter) && formatter) { content = formatter.replace('{name}', name != null ? name : ''); } else if (core_util["isFunction"](formatter)) { content = formatter(name); } var textColor = isSelected ? textStyleModel.getTextColor() : legendItemModel.get('inactiveColor'); itemGroup.add(new Text({ style: createTextStyle(textStyleModel, { text: content, x: textX, y: itemHeight / 2, fill: textColor, align: textAlign, verticalAlign: 'middle' }, { inheritColor: textColor }) })); // Add a invisible rect to increase the area of mouse hover var hitRect = new shape_Rect({ shape: itemGroup.getBoundingRect(), style: { // Cannot use 'invisible' because SVG SSR will miss the node fill: 'transparent' } }); var tooltipModel = legendItemModel.getModel('tooltip'); if (tooltipModel.get('show')) { setTooltipConfig({ el: hitRect, componentModel: legendModel, itemName: name, itemTooltipOption: tooltipModel.option }); } itemGroup.add(hitRect); itemGroup.eachChild(function (child) { child.silent = true; }); hitRect.silent = !selectMode; this.getContentGroup().add(itemGroup); enableHoverEmphasis(itemGroup); // @ts-ignore itemGroup.__legendDataIndex = dataIndex; return itemGroup; }; LegendView.prototype.layoutInner = function (legendModel, itemAlign, maxSize, isFirstRender, selector, selectorPosition) { var contentGroup = this.getContentGroup(); var selectorGroup = this.getSelectorGroup(); // Place items in contentGroup. layout_box(legendModel.get('orient'), contentGroup, legendModel.get('itemGap'), maxSize.width, maxSize.height); var contentRect = contentGroup.getBoundingRect(); var contentPos = [-contentRect.x, -contentRect.y]; selectorGroup.markRedraw(); contentGroup.markRedraw(); if (selector) { // Place buttons in selectorGroup layout_box( // Buttons in selectorGroup always layout horizontally 'horizontal', selectorGroup, legendModel.get('selectorItemGap', true)); var selectorRect = selectorGroup.getBoundingRect(); var selectorPos = [-selectorRect.x, -selectorRect.y]; var selectorButtonGap = legendModel.get('selectorButtonGap', true); var orientIdx = legendModel.getOrient().index; var wh = orientIdx === 0 ? 'width' : 'height'; var hw = orientIdx === 0 ? 'height' : 'width'; var yx = orientIdx === 0 ? 'y' : 'x'; if (selectorPosition === 'end') { selectorPos[orientIdx] += contentRect[wh] + selectorButtonGap; } else { contentPos[orientIdx] += selectorRect[wh] + selectorButtonGap; } // Always align selector to content as 'middle' selectorPos[1 - orientIdx] += contentRect[hw] / 2 - selectorRect[hw] / 2; selectorGroup.x = selectorPos[0]; selectorGroup.y = selectorPos[1]; contentGroup.x = contentPos[0]; contentGroup.y = contentPos[1]; var mainRect = { x: 0, y: 0 }; mainRect[wh] = contentRect[wh] + selectorButtonGap + selectorRect[wh]; mainRect[hw] = Math.max(contentRect[hw], selectorRect[hw]); mainRect[yx] = Math.min(0, selectorRect[yx] + selectorPos[1 - orientIdx]); return mainRect; } else { contentGroup.x = contentPos[0]; contentGroup.y = contentPos[1]; return this.group.getBoundingRect(); } }; /** * @protected */ LegendView.prototype.remove = function () { this.getContentGroup().removeAll(); this._isFirstRender = true; }; LegendView.type = 'legend.plain'; return LegendView; }(view_Component); function getLegendStyle(iconType, legendItemModel, lineVisualStyle, itemVisualStyle, drawType, isSelected, api) { /** * Use series style if is inherit; * elsewise, use legend style */ function handleCommonProps(style, visualStyle) { // If lineStyle.width is 'auto', it is set to be 2 if series has border if (style.lineWidth === 'auto') { style.lineWidth = visualStyle.lineWidth > 0 ? 2 : 0; } LegendView_each(style, function (propVal, propName) { style[propName] === 'inherit' && (style[propName] = visualStyle[propName]); }); } // itemStyle var itemStyleModel = legendItemModel.getModel('itemStyle'); var itemStyle = itemStyleModel.getItemStyle(); var iconBrushType = iconType.lastIndexOf('empty', 0) === 0 ? 'fill' : 'stroke'; var decalStyle = itemStyleModel.getShallow('decal'); itemStyle.decal = !decalStyle || decalStyle === 'inherit' ? itemVisualStyle.decal : createOrUpdatePatternFromDecal(decalStyle, api); if (itemStyle.fill === 'inherit') { /** * Series with visualDrawType as 'stroke' should have * series stroke as legend fill */ itemStyle.fill = itemVisualStyle[drawType]; } if (itemStyle.stroke === 'inherit') { /** * icon type with "emptyXXX" should use fill color * in visual style */ itemStyle.stroke = itemVisualStyle[iconBrushType]; } if (itemStyle.opacity === 'inherit') { /** * Use lineStyle.opacity if drawType is stroke */ itemStyle.opacity = (drawType === 'fill' ? itemVisualStyle : lineVisualStyle).opacity; } handleCommonProps(itemStyle, itemVisualStyle); // lineStyle var legendLineModel = legendItemModel.getModel('lineStyle'); var lineStyle = legendLineModel.getLineStyle(); handleCommonProps(lineStyle, lineVisualStyle); // Fix auto color to real color itemStyle.fill === 'auto' && (itemStyle.fill = itemVisualStyle.fill); itemStyle.stroke === 'auto' && (itemStyle.stroke = itemVisualStyle.fill); lineStyle.stroke === 'auto' && (lineStyle.stroke = itemVisualStyle.fill); if (!isSelected) { var borderWidth = legendItemModel.get('inactiveBorderWidth'); /** * Since stroke is set to be inactiveBorderColor, it may occur that * there is no border in series but border in legend, so we need to * use border only when series has border if is set to be auto */ var visualHasBorder = itemStyle[iconBrushType]; itemStyle.lineWidth = borderWidth === 'auto' ? itemVisualStyle.lineWidth > 0 && visualHasBorder ? 2 : 0 : itemStyle.lineWidth; itemStyle.fill = legendItemModel.get('inactiveColor'); itemStyle.stroke = legendItemModel.get('inactiveBorderColor'); lineStyle.stroke = legendLineModel.get('inactiveColor'); lineStyle.lineWidth = legendLineModel.get('inactiveWidth'); } return { itemStyle: itemStyle, lineStyle: lineStyle }; } function getDefaultLegendIcon(opt) { var symboType = opt.icon || 'roundRect'; var icon = symbol_createSymbol(symboType, 0, 0, opt.itemWidth, opt.itemHeight, opt.itemStyle.fill, opt.symbolKeepAspect); icon.setStyle(opt.itemStyle); icon.rotation = (opt.iconRotate || 0) * Math.PI / 180; icon.setOrigin([opt.itemWidth / 2, opt.itemHeight / 2]); if (symboType.indexOf('empty') > -1) { icon.style.stroke = icon.style.fill; icon.style.fill = '#fff'; icon.style.lineWidth = 2; } return icon; } function dispatchSelectAction(seriesName, dataName, api, excludeSeriesId) { // downplay before unselect dispatchDownplayAction(seriesName, dataName, api, excludeSeriesId); api.dispatchAction({ type: 'legendToggleSelect', name: seriesName != null ? seriesName : dataName }); // highlight after select // TODO highlight immediately may cause animation loss. dispatchHighlightAction(seriesName, dataName, api, excludeSeriesId); } function isUseHoverLayer(api) { var list = api.getZr().storage.getDisplayList(); var emphasisState; var i = 0; var len = list.length; while (i < len && !(emphasisState = list[i].states.emphasis)) { i++; } return emphasisState && emphasisState.hoverLayer; } function dispatchHighlightAction(seriesName, dataName, api, excludeSeriesId) { // If element hover will move to a hoverLayer. if (!isUseHoverLayer(api)) { api.dispatchAction({ type: 'highlight', seriesName: seriesName, name: dataName, excludeSeriesId: excludeSeriesId }); } } function dispatchDownplayAction(seriesName, dataName, api, excludeSeriesId) { // If element hover will move to a hoverLayer. if (!isUseHoverLayer(api)) { api.dispatchAction({ type: 'downplay', seriesName: seriesName, name: dataName, excludeSeriesId: excludeSeriesId }); } } /* harmony default export */ var legend_LegendView = (LegendView_LegendView); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/legend/legendFilter.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 legendFilter(ecModel) { var legendModels = ecModel.findComponents({ mainType: 'legend' }); if (legendModels && legendModels.length) { ecModel.filterSeries(function (series) { // If in any legend component the status is not selected. // Because in legend series is assumed selected when it is not in the legend data. for (var i = 0; i < legendModels.length; i++) { if (!legendModels[i].isSelected(series.name)) { return false; } } return true; }); } } // CONCATENATED MODULE: ./node_modules/echarts/lib/component/legend/legendAction.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 legendSelectActionHandler(methodName, payload, ecModel) { var isAllSelect = methodName === 'allSelect' || methodName === 'inverseSelect'; var selectedMap = {}; var actionLegendIndices = []; ecModel.eachComponent({ mainType: 'legend', query: payload }, function (legendModel) { if (isAllSelect) { legendModel[methodName](); } else { legendModel[methodName](payload.name); } makeSelectedMap(legendModel, selectedMap); actionLegendIndices.push(legendModel.componentIndex); }); var allSelectedMap = {}; // make selectedMap from all legend components ecModel.eachComponent('legend', function (legendModel) { Object(core_util["each"])(selectedMap, function (isSelected, name) { // Force other legend has same selected status // Or the first is toggled to true and other are toggled to false // In the case one legend has some item unSelected in option. And if other legend // doesn't has the item, they will assume it is selected. legendModel[isSelected ? 'select' : 'unSelect'](name); }); makeSelectedMap(legendModel, allSelectedMap); }); // Return the event explicitly return isAllSelect ? { selected: allSelectedMap, // return legendIndex array to tell the developers which legends are allSelect / inverseSelect legendIndex: actionLegendIndices } : { name: payload.name, selected: allSelectedMap }; } function makeSelectedMap(legendModel, out) { var selectedMap = out || {}; Object(core_util["each"])(legendModel.getData(), function (model) { var name = model.get('name'); // Wrap element if (name === '\n' || name === '') { return; } var isItemSelected = legendModel.isSelected(name); if (Object(core_util["hasOwn"])(selectedMap, name)) { // Unselected if any legend is unselected selectedMap[name] = selectedMap[name] && isItemSelected; } else { selectedMap[name] = isItemSelected; } }); return selectedMap; } function installLegendAction(registers) { /** * @event legendToggleSelect * @type {Object} * @property {string} type 'legendToggleSelect' * @property {string} [from] * @property {string} name Series name or data item name */ registers.registerAction('legendToggleSelect', 'legendselectchanged', Object(core_util["curry"])(legendSelectActionHandler, 'toggleSelected')); registers.registerAction('legendAllSelect', 'legendselectall', Object(core_util["curry"])(legendSelectActionHandler, 'allSelect')); registers.registerAction('legendInverseSelect', 'legendinverseselect', Object(core_util["curry"])(legendSelectActionHandler, 'inverseSelect')); /** * @event legendSelect * @type {Object} * @property {string} type 'legendSelect' * @property {string} name Series name or data item name */ registers.registerAction('legendSelect', 'legendselected', Object(core_util["curry"])(legendSelectActionHandler, 'select')); /** * @event legendUnSelect * @type {Object} * @property {string} type 'legendUnSelect' * @property {string} name Series name or data item name */ registers.registerAction('legendUnSelect', 'legendunselected', Object(core_util["curry"])(legendSelectActionHandler, 'unSelect')); } // CONCATENATED MODULE: ./node_modules/echarts/lib/component/legend/installLegendPlain.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 installLegendPlain_install(registers) { registers.registerComponentModel(legend_LegendModel); registers.registerComponentView(legend_LegendView); registers.registerProcessor(registers.PRIORITY.PROCESSOR.SERIES_FILTER, legendFilter); registers.registerSubTypeDefaulter('legend', function () { return 'plain'; }); installLegendAction(registers); } // CONCATENATED MODULE: ./node_modules/echarts/lib/component/legend/ScrollableLegendModel.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 ScrollableLegendModel_ScrollableLegendModel = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(ScrollableLegendModel, _super); function ScrollableLegendModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = ScrollableLegendModel.type; return _this; } /** * @param {number} scrollDataIndex */ ScrollableLegendModel.prototype.setScrollDataIndex = function (scrollDataIndex) { this.option.scrollDataIndex = scrollDataIndex; }; ScrollableLegendModel.prototype.init = function (option, parentModel, ecModel) { var inputPositionParams = getLayoutParams(option); _super.prototype.init.call(this, option, parentModel, ecModel); ScrollableLegendModel_mergeAndNormalizeLayoutParams(this, option, inputPositionParams); }; /** * @override */ ScrollableLegendModel.prototype.mergeOption = function (option, ecModel) { _super.prototype.mergeOption.call(this, option, ecModel); ScrollableLegendModel_mergeAndNormalizeLayoutParams(this, this.option, option); }; ScrollableLegendModel.type = 'legend.scroll'; ScrollableLegendModel.defaultOption = inheritDefaultOption(legend_LegendModel.defaultOption, { scrollDataIndex: 0, pageButtonItemGap: 5, pageButtonGap: null, pageButtonPosition: 'end', pageFormatter: '{current}/{total}', pageIcons: { horizontal: ['M0,0L12,-10L12,10z', 'M0,0L-12,-10L-12,10z'], vertical: ['M0,0L20,0L10,-20z', 'M0,0L20,0L10,20z'] }, pageIconColor: '#2f4554', pageIconInactiveColor: '#aaa', pageIconSize: 15, pageTextStyle: { color: '#333' }, animationDurationUpdate: 800 }); return ScrollableLegendModel; }(legend_LegendModel); ; // Do not `ignoreSize` to enable setting {left: 10, right: 10}. function ScrollableLegendModel_mergeAndNormalizeLayoutParams(legendModel, target, raw) { var orient = legendModel.getOrient(); var ignoreSize = [1, 1]; ignoreSize[orient.index] = 0; mergeLayoutParam(target, raw, { type: 'box', ignoreSize: !!ignoreSize }); } /* harmony default export */ var legend_ScrollableLegendModel = (ScrollableLegendModel_ScrollableLegendModel); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/legend/ScrollableLegendView.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ /** * Separate legend and scrollable legend to reduce package size. */ var ScrollableLegendView_Group = graphic_Group; var ScrollableLegendView_WH = ['width', 'height']; var ScrollableLegendView_XY = ['x', 'y']; var ScrollableLegendView_ScrollableLegendView = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(ScrollableLegendView, _super); function ScrollableLegendView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = ScrollableLegendView.type; _this.newlineDisabled = true; _this._currentIndex = 0; return _this; } ScrollableLegendView.prototype.init = function () { _super.prototype.init.call(this); this.group.add(this._containerGroup = new ScrollableLegendView_Group()); this._containerGroup.add(this.getContentGroup()); this.group.add(this._controllerGroup = new ScrollableLegendView_Group()); }; /** * @override */ ScrollableLegendView.prototype.resetInner = function () { _super.prototype.resetInner.call(this); this._controllerGroup.removeAll(); this._containerGroup.removeClipPath(); this._containerGroup.__rectSize = null; }; /** * @override */ ScrollableLegendView.prototype.renderInner = function (itemAlign, legendModel, ecModel, api, selector, orient, selectorPosition) { var self = this; // Render content items. _super.prototype.renderInner.call(this, itemAlign, legendModel, ecModel, api, selector, orient, selectorPosition); var controllerGroup = this._controllerGroup; // FIXME: support be 'auto' adapt to size number text length, // e.g., '3/12345' should not overlap with the control arrow button. var pageIconSize = legendModel.get('pageIconSize', true); var pageIconSizeArr = core_util["isArray"](pageIconSize) ? pageIconSize : [pageIconSize, pageIconSize]; createPageButton('pagePrev', 0); var pageTextStyleModel = legendModel.getModel('pageTextStyle'); controllerGroup.add(new Text({ name: 'pageText', style: { // Placeholder to calculate a proper layout. text: 'xx/xx', fill: pageTextStyleModel.getTextColor(), font: pageTextStyleModel.getFont(), verticalAlign: 'middle', align: 'center' }, silent: true })); createPageButton('pageNext', 1); function createPageButton(name, iconIdx) { var pageDataIndexName = name + 'DataIndex'; var icon = createIcon(legendModel.get('pageIcons', true)[legendModel.getOrient().name][iconIdx], { // Buttons will be created in each render, so we do not need // to worry about avoiding using legendModel kept in scope. onclick: core_util["bind"](self._pageGo, self, pageDataIndexName, legendModel, api) }, { x: -pageIconSizeArr[0] / 2, y: -pageIconSizeArr[1] / 2, width: pageIconSizeArr[0], height: pageIconSizeArr[1] }); icon.name = name; controllerGroup.add(icon); } }; /** * @override */ ScrollableLegendView.prototype.layoutInner = function (legendModel, itemAlign, maxSize, isFirstRender, selector, selectorPosition) { var selectorGroup = this.getSelectorGroup(); var orientIdx = legendModel.getOrient().index; var wh = ScrollableLegendView_WH[orientIdx]; var xy = ScrollableLegendView_XY[orientIdx]; var hw = ScrollableLegendView_WH[1 - orientIdx]; var yx = ScrollableLegendView_XY[1 - orientIdx]; selector && layout_box( // Buttons in selectorGroup always layout horizontally 'horizontal', selectorGroup, legendModel.get('selectorItemGap', true)); var selectorButtonGap = legendModel.get('selectorButtonGap', true); var selectorRect = selectorGroup.getBoundingRect(); var selectorPos = [-selectorRect.x, -selectorRect.y]; var processMaxSize = core_util["clone"](maxSize); selector && (processMaxSize[wh] = maxSize[wh] - selectorRect[wh] - selectorButtonGap); var mainRect = this._layoutContentAndController(legendModel, isFirstRender, processMaxSize, orientIdx, wh, hw, yx, xy); if (selector) { if (selectorPosition === 'end') { selectorPos[orientIdx] += mainRect[wh] + selectorButtonGap; } else { var offset = selectorRect[wh] + selectorButtonGap; selectorPos[orientIdx] -= offset; mainRect[xy] -= offset; } mainRect[wh] += selectorRect[wh] + selectorButtonGap; selectorPos[1 - orientIdx] += mainRect[yx] + mainRect[hw] / 2 - selectorRect[hw] / 2; mainRect[hw] = Math.max(mainRect[hw], selectorRect[hw]); mainRect[yx] = Math.min(mainRect[yx], selectorRect[yx] + selectorPos[1 - orientIdx]); selectorGroup.x = selectorPos[0]; selectorGroup.y = selectorPos[1]; selectorGroup.markRedraw(); } return mainRect; }; ScrollableLegendView.prototype._layoutContentAndController = function (legendModel, isFirstRender, maxSize, orientIdx, wh, hw, yx, xy) { var contentGroup = this.getContentGroup(); var containerGroup = this._containerGroup; var controllerGroup = this._controllerGroup; // Place items in contentGroup. layout_box(legendModel.get('orient'), contentGroup, legendModel.get('itemGap'), !orientIdx ? null : maxSize.width, orientIdx ? null : maxSize.height); layout_box( // Buttons in controller are layout always horizontally. 'horizontal', controllerGroup, legendModel.get('pageButtonItemGap', true)); var contentRect = contentGroup.getBoundingRect(); var controllerRect = controllerGroup.getBoundingRect(); var showController = this._showController = contentRect[wh] > maxSize[wh]; // In case that the inner elements of contentGroup layout do not based on [0, 0] var contentPos = [-contentRect.x, -contentRect.y]; // Remain contentPos when scroll animation perfroming. // If first rendering, `contentGroup.position` is [0, 0], which // does not make sense and may cause unexepcted animation if adopted. if (!isFirstRender) { contentPos[orientIdx] = contentGroup[xy]; } // Layout container group based on 0. var containerPos = [0, 0]; var controllerPos = [-controllerRect.x, -controllerRect.y]; var pageButtonGap = core_util["retrieve2"](legendModel.get('pageButtonGap', true), legendModel.get('itemGap', true)); // Place containerGroup and controllerGroup and contentGroup. if (showController) { var pageButtonPosition = legendModel.get('pageButtonPosition', true); // controller is on the right / bottom. if (pageButtonPosition === 'end') { controllerPos[orientIdx] += maxSize[wh] - controllerRect[wh]; } // controller is on the left / top. else { containerPos[orientIdx] += controllerRect[wh] + pageButtonGap; } } // Always align controller to content as 'middle'. controllerPos[1 - orientIdx] += contentRect[hw] / 2 - controllerRect[hw] / 2; contentGroup.setPosition(contentPos); containerGroup.setPosition(containerPos); controllerGroup.setPosition(controllerPos); // Calculate `mainRect` and set `clipPath`. // mainRect should not be calculated by `this.group.getBoundingRect()` // for sake of the overflow. var mainRect = { x: 0, y: 0 }; // Consider content may be overflow (should be clipped). mainRect[wh] = showController ? maxSize[wh] : contentRect[wh]; mainRect[hw] = Math.max(contentRect[hw], controllerRect[hw]); // `containerRect[yx] + containerPos[1 - orientIdx]` is 0. mainRect[yx] = Math.min(0, controllerRect[yx] + controllerPos[1 - orientIdx]); containerGroup.__rectSize = maxSize[wh]; if (showController) { var clipShape = { x: 0, y: 0 }; clipShape[wh] = Math.max(maxSize[wh] - controllerRect[wh] - pageButtonGap, 0); clipShape[hw] = mainRect[hw]; containerGroup.setClipPath(new shape_Rect({ shape: clipShape })); // Consider content may be larger than container, container rect // can not be obtained from `containerGroup.getBoundingRect()`. containerGroup.__rectSize = clipShape[wh]; } else { // Do not remove or ignore controller. Keep them set as placeholders. controllerGroup.eachChild(function (child) { child.attr({ invisible: true, silent: true }); }); } // Content translate animation. var pageInfo = this._getPageInfo(legendModel); pageInfo.pageIndex != null && updateProps(contentGroup, { x: pageInfo.contentPosition[0], y: pageInfo.contentPosition[1] }, // When switch from "show controller" to "not show controller", view should be // updated immediately without animation, otherwise causes weird effect. showController ? legendModel : null); this._updatePageInfoView(legendModel, pageInfo); return mainRect; }; ScrollableLegendView.prototype._pageGo = function (to, legendModel, api) { var scrollDataIndex = this._getPageInfo(legendModel)[to]; scrollDataIndex != null && api.dispatchAction({ type: 'legendScroll', scrollDataIndex: scrollDataIndex, legendId: legendModel.id }); }; ScrollableLegendView.prototype._updatePageInfoView = function (legendModel, pageInfo) { var controllerGroup = this._controllerGroup; core_util["each"](['pagePrev', 'pageNext'], function (name) { var key = name + 'DataIndex'; var canJump = pageInfo[key] != null; var icon = controllerGroup.childOfName(name); if (icon) { icon.setStyle('fill', canJump ? legendModel.get('pageIconColor', true) : legendModel.get('pageIconInactiveColor', true)); icon.cursor = canJump ? 'pointer' : 'default'; } }); var pageText = controllerGroup.childOfName('pageText'); var pageFormatter = legendModel.get('pageFormatter'); var pageIndex = pageInfo.pageIndex; var current = pageIndex != null ? pageIndex + 1 : 0; var total = pageInfo.pageCount; pageText && pageFormatter && pageText.setStyle('text', core_util["isString"](pageFormatter) ? pageFormatter.replace('{current}', current == null ? '' : current + '').replace('{total}', total == null ? '' : total + '') : pageFormatter({ current: current, total: total })); }; /** * contentPosition: Array., null when data item not found. * pageIndex: number, null when data item not found. * pageCount: number, always be a number, can be 0. * pagePrevDataIndex: number, null when no previous page. * pageNextDataIndex: number, null when no next page. * } */ ScrollableLegendView.prototype._getPageInfo = function (legendModel) { var scrollDataIndex = legendModel.get('scrollDataIndex', true); var contentGroup = this.getContentGroup(); var containerRectSize = this._containerGroup.__rectSize; var orientIdx = legendModel.getOrient().index; var wh = ScrollableLegendView_WH[orientIdx]; var xy = ScrollableLegendView_XY[orientIdx]; var targetItemIndex = this._findTargetItemIndex(scrollDataIndex); var children = contentGroup.children(); var targetItem = children[targetItemIndex]; var itemCount = children.length; var pCount = !itemCount ? 0 : 1; var result = { contentPosition: [contentGroup.x, contentGroup.y], pageCount: pCount, pageIndex: pCount - 1, pagePrevDataIndex: null, pageNextDataIndex: null }; if (!targetItem) { return result; } var targetItemInfo = getItemInfo(targetItem); result.contentPosition[orientIdx] = -targetItemInfo.s; // Strategy: // (1) Always align based on the left/top most item. // (2) It is user-friendly that the last item shown in the // current window is shown at the begining of next window. // Otherwise if half of the last item is cut by the window, // it will have no chance to display entirely. // (3) Consider that item size probably be different, we // have calculate pageIndex by size rather than item index, // and we can not get page index directly by division. // (4) The window is to narrow to contain more than // one item, we should make sure that the page can be fliped. for (var i = targetItemIndex + 1, winStartItemInfo = targetItemInfo, winEndItemInfo = targetItemInfo, currItemInfo = null; i <= itemCount; ++i) { currItemInfo = getItemInfo(children[i]); if ( // Half of the last item is out of the window. !currItemInfo && winEndItemInfo.e > winStartItemInfo.s + containerRectSize // If the current item does not intersect with the window, the new page // can be started at the current item or the last item. || currItemInfo && !intersect(currItemInfo, winStartItemInfo.s)) { if (winEndItemInfo.i > winStartItemInfo.i) { winStartItemInfo = winEndItemInfo; } else { // e.g., when page size is smaller than item size. winStartItemInfo = currItemInfo; } if (winStartItemInfo) { if (result.pageNextDataIndex == null) { result.pageNextDataIndex = winStartItemInfo.i; } ++result.pageCount; } } winEndItemInfo = currItemInfo; } for (var i = targetItemIndex - 1, winStartItemInfo = targetItemInfo, winEndItemInfo = targetItemInfo, currItemInfo = null; i >= -1; --i) { currItemInfo = getItemInfo(children[i]); if ( // If the the end item does not intersect with the window started // from the current item, a page can be settled. (!currItemInfo || !intersect(winEndItemInfo, currItemInfo.s) // e.g., when page size is smaller than item size. ) && winStartItemInfo.i < winEndItemInfo.i) { winEndItemInfo = winStartItemInfo; if (result.pagePrevDataIndex == null) { result.pagePrevDataIndex = winStartItemInfo.i; } ++result.pageCount; ++result.pageIndex; } winStartItemInfo = currItemInfo; } return result; function getItemInfo(el) { if (el) { var itemRect = el.getBoundingRect(); var start = itemRect[xy] + el[xy]; return { s: start, e: start + itemRect[wh], i: el.__legendDataIndex }; } } function intersect(itemInfo, winStart) { return itemInfo.e >= winStart && itemInfo.s <= winStart + containerRectSize; } }; ScrollableLegendView.prototype._findTargetItemIndex = function (targetDataIndex) { if (!this._showController) { return 0; } var index; var contentGroup = this.getContentGroup(); var defaultIndex; contentGroup.eachChild(function (child, idx) { var legendDataIdx = child.__legendDataIndex; // FIXME // If the given targetDataIndex (from model) is illegal, // we use defaultIndex. But the index on the legend model and // action payload is still illegal. That case will not be // changed until some scenario requires. if (defaultIndex == null && legendDataIdx != null) { defaultIndex = idx; } if (legendDataIdx === targetDataIndex) { index = idx; } }); return index != null ? index : defaultIndex; }; ScrollableLegendView.type = 'legend.scroll'; return ScrollableLegendView; }(legend_LegendView); /* harmony default export */ var legend_ScrollableLegendView = (ScrollableLegendView_ScrollableLegendView); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/legend/scrollableLegendAction.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 installScrollableLegendAction(registers) { /** * @event legendScroll * @type {Object} * @property {string} type 'legendScroll' * @property {string} scrollDataIndex */ registers.registerAction('legendScroll', 'legendscroll', function (payload, ecModel) { var scrollDataIndex = payload.scrollDataIndex; scrollDataIndex != null && ecModel.eachComponent({ mainType: 'legend', subType: 'scroll', query: payload }, function (legendModel) { legendModel.setScrollDataIndex(scrollDataIndex); }); }); } // CONCATENATED MODULE: ./node_modules/echarts/lib/component/legend/installLegendScroll.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 installLegendScroll_install(registers) { use(installLegendPlain_install); registers.registerComponentModel(legend_ScrollableLegendModel); registers.registerComponentView(legend_ScrollableLegendView); installScrollableLegendAction(registers); } // CONCATENATED MODULE: ./node_modules/echarts/lib/component/legend/install.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 legend_install_install(registers) { use(installLegendPlain_install); use(installLegendScroll_install); } // CONCATENATED MODULE: ./node_modules/echarts/lib/component/dataZoom/InsideZoomModel.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 InsideZoomModel_InsideZoomModel = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(InsideZoomModel, _super); function InsideZoomModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = InsideZoomModel.type; return _this; } InsideZoomModel.type = 'dataZoom.inside'; InsideZoomModel.defaultOption = inheritDefaultOption(dataZoom_DataZoomModel.defaultOption, { disabled: false, zoomLock: false, zoomOnMouseWheel: true, moveOnMouseMove: true, moveOnMouseWheel: false, preventDefaultMouseMove: true }); return InsideZoomModel; }(dataZoom_DataZoomModel); /* harmony default export */ var dataZoom_InsideZoomModel = (InsideZoomModel_InsideZoomModel); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/dataZoom/roams.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ // Only create one roam controller for each coordinate system. // one roam controller might be refered by two inside data zoom // components (for example, one for x and one for y). When user // pan or zoom, only dispatch one action for those data zoom // components. var roams_inner = makeInner(); function setViewInfoToCoordSysRecord(api, dataZoomModel, getRange) { roams_inner(api).coordSysRecordMap.each(function (coordSysRecord) { var dzInfo = coordSysRecord.dataZoomInfoMap.get(dataZoomModel.uid); if (dzInfo) { dzInfo.getRange = getRange; } }); } function disposeCoordSysRecordIfNeeded(api, dataZoomModel) { var coordSysRecordMap = roams_inner(api).coordSysRecordMap; var coordSysKeyArr = coordSysRecordMap.keys(); for (var i = 0; i < coordSysKeyArr.length; i++) { var coordSysKey = coordSysKeyArr[i]; var coordSysRecord = coordSysRecordMap.get(coordSysKey); var dataZoomInfoMap = coordSysRecord.dataZoomInfoMap; if (dataZoomInfoMap) { var dzUid = dataZoomModel.uid; var dzInfo = dataZoomInfoMap.get(dzUid); if (dzInfo) { dataZoomInfoMap.removeKey(dzUid); if (!dataZoomInfoMap.keys().length) { disposeCoordSysRecord(coordSysRecordMap, coordSysRecord); } } } } } function disposeCoordSysRecord(coordSysRecordMap, coordSysRecord) { if (coordSysRecord) { coordSysRecordMap.removeKey(coordSysRecord.model.uid); var controller = coordSysRecord.controller; controller && controller.dispose(); } } function createCoordSysRecord(api, coordSysModel) { // These init props will never change after record created. var coordSysRecord = { model: coordSysModel, containsPoint: Object(core_util["curry"])(containsPoint, coordSysModel), dispatchAction: Object(core_util["curry"])(roams_dispatchAction, api), dataZoomInfoMap: null, controller: null }; // Must not do anything depends on coordSysRecord outside the event handler here, // because coordSysRecord not completed yet. var controller = coordSysRecord.controller = new helper_RoamController(api.getZr()); Object(core_util["each"])(['pan', 'zoom', 'scrollMove'], function (eventName) { controller.on(eventName, function (event) { var batch = []; coordSysRecord.dataZoomInfoMap.each(function (dzInfo) { // Check whether the behaviors (zoomOnMouseWheel, moveOnMouseMove, // moveOnMouseWheel, ...) enabled. if (!event.isAvailableBehavior(dzInfo.model.option)) { return; } var method = (dzInfo.getRange || {})[eventName]; var range = method && method(dzInfo.dzReferCoordSysInfo, coordSysRecord.model.mainType, coordSysRecord.controller, event); !dzInfo.model.get('disabled', true) && range && batch.push({ dataZoomId: dzInfo.model.id, start: range[0], end: range[1] }); }); batch.length && coordSysRecord.dispatchAction(batch); }); }); return coordSysRecord; } /** * This action will be throttled. */ function roams_dispatchAction(api, batch) { if (!api.isDisposed()) { api.dispatchAction({ type: 'dataZoom', animation: { easing: 'cubicOut', duration: 100 }, batch: batch }); } } function containsPoint(coordSysModel, e, x, y) { return coordSysModel.coordinateSystem.containPoint([x, y]); } /** * Merge roamController settings when multiple dataZooms share one roamController. */ function mergeControllerParams(dataZoomInfoMap) { var controlType; // DO NOT use reserved word (true, false, undefined) as key literally. Even if encapsulated // as string, it is probably revert to reserved word by compress tool. See #7411. var prefix = 'type_'; var typePriority = { 'type_true': 2, 'type_move': 1, 'type_false': 0, 'type_undefined': -1 }; var preventDefaultMouseMove = true; dataZoomInfoMap.each(function (dataZoomInfo) { var dataZoomModel = dataZoomInfo.model; var oneType = dataZoomModel.get('disabled', true) ? false : dataZoomModel.get('zoomLock', true) ? 'move' : true; if (typePriority[prefix + oneType] > typePriority[prefix + controlType]) { controlType = oneType; } // Prevent default move event by default. If one false, do not prevent. Otherwise // users may be confused why it does not work when multiple insideZooms exist. preventDefaultMouseMove = preventDefaultMouseMove && dataZoomModel.get('preventDefaultMouseMove', true); }); return { controlType: controlType, opt: { // RoamController will enable all of these functionalities, // and the final behavior is determined by its event listener // provided by each inside zoom. zoomOnMouseWheel: true, moveOnMouseMove: true, moveOnMouseWheel: true, preventDefaultMouseMove: !!preventDefaultMouseMove } }; } function installDataZoomRoamProcessor(registers) { registers.registerProcessor(registers.PRIORITY.PROCESSOR.FILTER, function (ecModel, api) { var apiInner = roams_inner(api); var coordSysRecordMap = apiInner.coordSysRecordMap || (apiInner.coordSysRecordMap = Object(core_util["createHashMap"])()); coordSysRecordMap.each(function (coordSysRecord) { // `coordSysRecordMap` always exists (because it holds the `roam controller`, which should // better not re-create each time), but clear `dataZoomInfoMap` each round of the workflow. coordSysRecord.dataZoomInfoMap = null; }); ecModel.eachComponent({ mainType: 'dataZoom', subType: 'inside' }, function (dataZoomModel) { var dzReferCoordSysWrap = collectReferCoordSysModelInfo(dataZoomModel); Object(core_util["each"])(dzReferCoordSysWrap.infoList, function (dzCoordSysInfo) { var coordSysUid = dzCoordSysInfo.model.uid; var coordSysRecord = coordSysRecordMap.get(coordSysUid) || coordSysRecordMap.set(coordSysUid, createCoordSysRecord(api, dzCoordSysInfo.model)); var dataZoomInfoMap = coordSysRecord.dataZoomInfoMap || (coordSysRecord.dataZoomInfoMap = Object(core_util["createHashMap"])()); // Notice these props might be changed each time for a single dataZoomModel. dataZoomInfoMap.set(dataZoomModel.uid, { dzReferCoordSysInfo: dzCoordSysInfo, model: dataZoomModel, getRange: null }); }); }); // (1) Merge dataZoom settings for each coord sys and set to the roam controller. // (2) Clear coord sys if not refered by any dataZoom. coordSysRecordMap.each(function (coordSysRecord) { var controller = coordSysRecord.controller; var firstDzInfo; var dataZoomInfoMap = coordSysRecord.dataZoomInfoMap; if (dataZoomInfoMap) { var firstDzKey = dataZoomInfoMap.keys()[0]; if (firstDzKey != null) { firstDzInfo = dataZoomInfoMap.get(firstDzKey); } } if (!firstDzInfo) { disposeCoordSysRecord(coordSysRecordMap, coordSysRecord); return; } var controllerParams = mergeControllerParams(dataZoomInfoMap); controller.enable(controllerParams.controlType, controllerParams.opt); controller.setPointerChecker(coordSysRecord.containsPoint); createOrUpdate(coordSysRecord, 'dispatchAction', firstDzInfo.model.get('throttle', true), 'fixRate'); }); }); } // CONCATENATED MODULE: ./node_modules/echarts/lib/component/dataZoom/InsideZoomView.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 InsideZoomView_InsideZoomView = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(InsideZoomView, _super); function InsideZoomView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = 'dataZoom.inside'; return _this; } InsideZoomView.prototype.render = function (dataZoomModel, ecModel, api) { _super.prototype.render.apply(this, arguments); if (dataZoomModel.noTarget()) { this._clear(); return; } // Hence the `throttle` util ensures to preserve command order, // here simply updating range all the time will not cause missing // any of the the roam change. this.range = dataZoomModel.getPercentRange(); // Reset controllers. setViewInfoToCoordSysRecord(api, dataZoomModel, { pan: Object(core_util["bind"])(getRangeHandlers.pan, this), zoom: Object(core_util["bind"])(getRangeHandlers.zoom, this), scrollMove: Object(core_util["bind"])(getRangeHandlers.scrollMove, this) }); }; InsideZoomView.prototype.dispose = function () { this._clear(); _super.prototype.dispose.apply(this, arguments); }; InsideZoomView.prototype._clear = function () { disposeCoordSysRecordIfNeeded(this.api, this.dataZoomModel); this.range = null; }; InsideZoomView.type = 'dataZoom.inside'; return InsideZoomView; }(dataZoom_DataZoomView); var getRangeHandlers = { zoom: function (coordSysInfo, coordSysMainType, controller, e) { var lastRange = this.range; var range = lastRange.slice(); // Calculate transform by the first axis. var axisModel = coordSysInfo.axisModels[0]; if (!axisModel) { return; } var directionInfo = getDirectionInfo[coordSysMainType](null, [e.originX, e.originY], axisModel, controller, coordSysInfo); var percentPoint = (directionInfo.signal > 0 ? directionInfo.pixelStart + directionInfo.pixelLength - directionInfo.pixel : directionInfo.pixel - directionInfo.pixelStart) / directionInfo.pixelLength * (range[1] - range[0]) + range[0]; var scale = Math.max(1 / e.scale, 0); range[0] = (range[0] - percentPoint) * scale + percentPoint; range[1] = (range[1] - percentPoint) * scale + percentPoint; // Restrict range. var minMaxSpan = this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan(); sliderMove(0, range, [0, 100], 0, minMaxSpan.minSpan, minMaxSpan.maxSpan); this.range = range; if (lastRange[0] !== range[0] || lastRange[1] !== range[1]) { return range; } }, pan: makeMover(function (range, axisModel, coordSysInfo, coordSysMainType, controller, e) { var directionInfo = getDirectionInfo[coordSysMainType]([e.oldX, e.oldY], [e.newX, e.newY], axisModel, controller, coordSysInfo); return directionInfo.signal * (range[1] - range[0]) * directionInfo.pixel / directionInfo.pixelLength; }), scrollMove: makeMover(function (range, axisModel, coordSysInfo, coordSysMainType, controller, e) { var directionInfo = getDirectionInfo[coordSysMainType]([0, 0], [e.scrollDelta, e.scrollDelta], axisModel, controller, coordSysInfo); return directionInfo.signal * (range[1] - range[0]) * e.scrollDelta; }) }; function makeMover(getPercentDelta) { return function (coordSysInfo, coordSysMainType, controller, e) { var lastRange = this.range; var range = lastRange.slice(); // Calculate transform by the first axis. var axisModel = coordSysInfo.axisModels[0]; if (!axisModel) { return; } var percentDelta = getPercentDelta(range, axisModel, coordSysInfo, coordSysMainType, controller, e); sliderMove(percentDelta, range, [0, 100], 'all'); this.range = range; if (lastRange[0] !== range[0] || lastRange[1] !== range[1]) { return range; } }; } var getDirectionInfo = { grid: function (oldPoint, newPoint, axisModel, controller, coordSysInfo) { var axis = axisModel.axis; var ret = {}; var rect = coordSysInfo.model.coordinateSystem.getRect(); oldPoint = oldPoint || [0, 0]; if (axis.dim === 'x') { ret.pixel = newPoint[0] - oldPoint[0]; ret.pixelLength = rect.width; ret.pixelStart = rect.x; ret.signal = axis.inverse ? 1 : -1; } else { // axis.dim === 'y' ret.pixel = newPoint[1] - oldPoint[1]; ret.pixelLength = rect.height; ret.pixelStart = rect.y; ret.signal = axis.inverse ? -1 : 1; } return ret; }, polar: function (oldPoint, newPoint, axisModel, controller, coordSysInfo) { var axis = axisModel.axis; var ret = {}; var polar = coordSysInfo.model.coordinateSystem; var radiusExtent = polar.getRadiusAxis().getExtent(); var angleExtent = polar.getAngleAxis().getExtent(); oldPoint = oldPoint ? polar.pointToCoord(oldPoint) : [0, 0]; newPoint = polar.pointToCoord(newPoint); if (axisModel.mainType === 'radiusAxis') { ret.pixel = newPoint[0] - oldPoint[0]; // ret.pixelLength = Math.abs(radiusExtent[1] - radiusExtent[0]); // ret.pixelStart = Math.min(radiusExtent[0], radiusExtent[1]); ret.pixelLength = radiusExtent[1] - radiusExtent[0]; ret.pixelStart = radiusExtent[0]; ret.signal = axis.inverse ? 1 : -1; } else { // 'angleAxis' ret.pixel = newPoint[1] - oldPoint[1]; // ret.pixelLength = Math.abs(angleExtent[1] - angleExtent[0]); // ret.pixelStart = Math.min(angleExtent[0], angleExtent[1]); ret.pixelLength = angleExtent[1] - angleExtent[0]; ret.pixelStart = angleExtent[0]; ret.signal = axis.inverse ? -1 : 1; } return ret; }, singleAxis: function (oldPoint, newPoint, axisModel, controller, coordSysInfo) { var axis = axisModel.axis; var rect = coordSysInfo.model.coordinateSystem.getRect(); var ret = {}; oldPoint = oldPoint || [0, 0]; if (axis.orient === 'horizontal') { ret.pixel = newPoint[0] - oldPoint[0]; ret.pixelLength = rect.width; ret.pixelStart = rect.x; ret.signal = axis.inverse ? 1 : -1; } else { // 'vertical' ret.pixel = newPoint[1] - oldPoint[1]; ret.pixelLength = rect.height; ret.pixelStart = rect.y; ret.signal = axis.inverse ? -1 : 1; } return ret; } }; /* harmony default export */ var dataZoom_InsideZoomView = (InsideZoomView_InsideZoomView); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/dataZoom/installDataZoomInside.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 installDataZoomInside_install(registers) { installCommon(registers); registers.registerComponentModel(dataZoom_InsideZoomModel); registers.registerComponentView(dataZoom_InsideZoomView); installDataZoomRoamProcessor(registers); } // CONCATENATED MODULE: ./node_modules/echarts/lib/component/dataZoom/SliderZoomModel.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 SliderZoomModel_SliderZoomModel = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(SliderZoomModel, _super); function SliderZoomModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = SliderZoomModel.type; return _this; } SliderZoomModel.type = 'dataZoom.slider'; SliderZoomModel.layoutMode = 'box'; SliderZoomModel.defaultOption = inheritDefaultOption(dataZoom_DataZoomModel.defaultOption, { show: true, // deault value can only be drived in view stage. right: 'ph', top: 'ph', width: 'ph', height: 'ph', left: null, bottom: null, borderColor: '#d2dbee', borderRadius: 3, backgroundColor: 'rgba(47,69,84,0)', // dataBackgroundColor: '#ddd', dataBackground: { lineStyle: { color: '#d2dbee', width: 0.5 }, areaStyle: { color: '#d2dbee', opacity: 0.2 } }, selectedDataBackground: { lineStyle: { color: '#8fb0f7', width: 0.5 }, areaStyle: { color: '#8fb0f7', opacity: 0.2 } }, // Color of selected window. fillerColor: 'rgba(135,175,274,0.2)', handleIcon: 'path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z', // Percent of the slider height handleSize: '100%', handleStyle: { color: '#fff', borderColor: '#ACB8D1' }, moveHandleSize: 7, moveHandleIcon: 'path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z', moveHandleStyle: { color: '#D2DBEE', opacity: 0.7 }, showDetail: true, showDataShadow: 'auto', realtime: true, zoomLock: false, textStyle: { color: '#6E7079' }, brushSelect: true, brushStyle: { color: 'rgba(135,175,274,0.15)' }, emphasis: { handleLabel: { show: true }, handleStyle: { borderColor: '#8FB0F7' }, moveHandleStyle: { color: '#8FB0F7' } } }); return SliderZoomModel; }(dataZoom_DataZoomModel); /* harmony default export */ var dataZoom_SliderZoomModel = (SliderZoomModel_SliderZoomModel); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/dataZoom/SliderZoomView.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 SliderZoomView_Rect = shape_Rect; // Constants var DEFAULT_LOCATION_EDGE_GAP = 7; var DEFAULT_FRAME_BORDER_WIDTH = 1; var DEFAULT_FILLER_SIZE = 30; var DEFAULT_MOVE_HANDLE_SIZE = 7; var HORIZONTAL = 'horizontal'; var VERTICAL = 'vertical'; var LABEL_GAP = 5; var SHOW_DATA_SHADOW_SERIES_TYPE = ['line', 'bar', 'candlestick', 'scatter']; var REALTIME_ANIMATION_CONFIG = { easing: 'cubicOut', duration: 100, delay: 0 }; var SliderZoomView_SliderZoomView = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(SliderZoomView, _super); function SliderZoomView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = SliderZoomView.type; _this._displayables = {}; return _this; } SliderZoomView.prototype.init = function (ecModel, api) { this.api = api; // A unique handler for each dataZoom component this._onBrush = Object(core_util["bind"])(this._onBrush, this); this._onBrushEnd = Object(core_util["bind"])(this._onBrushEnd, this); }; SliderZoomView.prototype.render = function (dataZoomModel, ecModel, api, payload) { _super.prototype.render.apply(this, arguments); createOrUpdate(this, '_dispatchZoomAction', dataZoomModel.get('throttle'), 'fixRate'); this._orient = dataZoomModel.getOrient(); if (dataZoomModel.get('show') === false) { this.group.removeAll(); return; } if (dataZoomModel.noTarget()) { this._clear(); this.group.removeAll(); return; } // Notice: this._resetInterval() should not be executed when payload.type // is 'dataZoom', origin this._range should be maintained, otherwise 'pan' // or 'zoom' info will be missed because of 'throttle' of this.dispatchAction, if (!payload || payload.type !== 'dataZoom' || payload.from !== this.uid) { this._buildView(); } this._updateView(); }; SliderZoomView.prototype.dispose = function () { this._clear(); _super.prototype.dispose.apply(this, arguments); }; SliderZoomView.prototype._clear = function () { clear(this, '_dispatchZoomAction'); var zr = this.api.getZr(); zr.off('mousemove', this._onBrush); zr.off('mouseup', this._onBrushEnd); }; SliderZoomView.prototype._buildView = function () { var thisGroup = this.group; thisGroup.removeAll(); this._brushing = false; this._displayables.brushRect = null; this._resetLocation(); this._resetInterval(); var barGroup = this._displayables.sliderGroup = new graphic_Group(); this._renderBackground(); this._renderHandle(); this._renderDataShadow(); thisGroup.add(barGroup); this._positionGroup(); }; SliderZoomView.prototype._resetLocation = function () { var dataZoomModel = this.dataZoomModel; var api = this.api; var showMoveHandle = dataZoomModel.get('brushSelect'); var moveHandleSize = showMoveHandle ? DEFAULT_MOVE_HANDLE_SIZE : 0; // If some of x/y/width/height are not specified, // auto-adapt according to target grid. var coordRect = this._findCoordRect(); var ecSize = { width: api.getWidth(), height: api.getHeight() }; // Default align by coordinate system rect. var positionInfo = this._orient === HORIZONTAL ? { // Why using 'right', because right should be used in vertical, // and it is better to be consistent for dealing with position param merge. right: ecSize.width - coordRect.x - coordRect.width, top: ecSize.height - DEFAULT_FILLER_SIZE - DEFAULT_LOCATION_EDGE_GAP - moveHandleSize, width: coordRect.width, height: DEFAULT_FILLER_SIZE } : { right: DEFAULT_LOCATION_EDGE_GAP, top: coordRect.y, width: DEFAULT_FILLER_SIZE, height: coordRect.height }; // Do not write back to option and replace value 'ph', because // the 'ph' value should be recalculated when resize. var layoutParams = getLayoutParams(dataZoomModel.option); // Replace the placeholder value. Object(core_util["each"])(['right', 'top', 'width', 'height'], function (name) { if (layoutParams[name] === 'ph') { layoutParams[name] = positionInfo[name]; } }); var layoutRect = getLayoutRect(layoutParams, ecSize); this._location = { x: layoutRect.x, y: layoutRect.y }; this._size = [layoutRect.width, layoutRect.height]; this._orient === VERTICAL && this._size.reverse(); }; SliderZoomView.prototype._positionGroup = function () { var thisGroup = this.group; var location = this._location; var orient = this._orient; // Just use the first axis to determine mapping. var targetAxisModel = this.dataZoomModel.getFirstTargetAxisModel(); var inverse = targetAxisModel && targetAxisModel.get('inverse'); var sliderGroup = this._displayables.sliderGroup; var otherAxisInverse = (this._dataShadowInfo || {}).otherAxisInverse; // Transform barGroup. sliderGroup.attr(orient === HORIZONTAL && !inverse ? { scaleY: otherAxisInverse ? 1 : -1, scaleX: 1 } : orient === HORIZONTAL && inverse ? { scaleY: otherAxisInverse ? 1 : -1, scaleX: -1 } : orient === VERTICAL && !inverse ? { scaleY: otherAxisInverse ? -1 : 1, scaleX: 1, rotation: Math.PI / 2 } // Don't use Math.PI, considering shadow direction. : { scaleY: otherAxisInverse ? -1 : 1, scaleX: -1, rotation: Math.PI / 2 }); // Position barGroup var rect = thisGroup.getBoundingRect([sliderGroup]); thisGroup.x = location.x - rect.x; thisGroup.y = location.y - rect.y; thisGroup.markRedraw(); }; SliderZoomView.prototype._getViewExtent = function () { return [0, this._size[0]]; }; SliderZoomView.prototype._renderBackground = function () { var dataZoomModel = this.dataZoomModel; var size = this._size; var barGroup = this._displayables.sliderGroup; var brushSelect = dataZoomModel.get('brushSelect'); barGroup.add(new SliderZoomView_Rect({ silent: true, shape: { x: 0, y: 0, width: size[0], height: size[1] }, style: { fill: dataZoomModel.get('backgroundColor') }, z2: -40 })); // Click panel, over shadow, below handles. var clickPanel = new SliderZoomView_Rect({ shape: { x: 0, y: 0, width: size[0], height: size[1] }, style: { fill: 'transparent' }, z2: 0, onclick: Object(core_util["bind"])(this._onClickPanel, this) }); var zr = this.api.getZr(); if (brushSelect) { clickPanel.on('mousedown', this._onBrushStart, this); clickPanel.cursor = 'crosshair'; zr.on('mousemove', this._onBrush); zr.on('mouseup', this._onBrushEnd); } else { zr.off('mousemove', this._onBrush); zr.off('mouseup', this._onBrushEnd); } barGroup.add(clickPanel); }; SliderZoomView.prototype._renderDataShadow = function () { var info = this._dataShadowInfo = this._prepareDataShadowInfo(); this._displayables.dataShadowSegs = []; if (!info) { return; } var size = this._size; var oldSize = this._shadowSize || []; var seriesModel = info.series; var data = seriesModel.getRawData(); var candlestickDim = seriesModel.getShadowDim && seriesModel.getShadowDim(); var otherDim = candlestickDim && data.getDimensionInfo(candlestickDim) ? seriesModel.getShadowDim() // @see candlestick : info.otherDim; if (otherDim == null) { return; } var polygonPts = this._shadowPolygonPts; var polylinePts = this._shadowPolylinePts; // Not re-render if data doesn't change. if (data !== this._shadowData || otherDim !== this._shadowDim || size[0] !== oldSize[0] || size[1] !== oldSize[1]) { var otherDataExtent_1 = data.getDataExtent(otherDim); // Nice extent. var otherOffset = (otherDataExtent_1[1] - otherDataExtent_1[0]) * 0.3; otherDataExtent_1 = [otherDataExtent_1[0] - otherOffset, otherDataExtent_1[1] + otherOffset]; var otherShadowExtent_1 = [0, size[1]]; var thisShadowExtent = [0, size[0]]; var areaPoints_1 = [[size[0], 0], [0, 0]]; var linePoints_1 = []; var step_1 = thisShadowExtent[1] / (data.count() - 1); var thisCoord_1 = 0; // Optimize for large data shadow var stride_1 = Math.round(data.count() / size[0]); var lastIsEmpty_1; data.each([otherDim], function (value, index) { if (stride_1 > 0 && index % stride_1) { thisCoord_1 += step_1; return; } // FIXME // Should consider axis.min/axis.max when drawing dataShadow. // FIXME // 应该使用统一的空判断?还是在list里进行空判断? var isEmpty = value == null || isNaN(value) || value === ''; // See #4235. var otherCoord = isEmpty ? 0 : linearMap(value, otherDataExtent_1, otherShadowExtent_1, true); // Attempt to draw data shadow precisely when there are empty value. if (isEmpty && !lastIsEmpty_1 && index) { areaPoints_1.push([areaPoints_1[areaPoints_1.length - 1][0], 0]); linePoints_1.push([linePoints_1[linePoints_1.length - 1][0], 0]); } else if (!isEmpty && lastIsEmpty_1) { areaPoints_1.push([thisCoord_1, 0]); linePoints_1.push([thisCoord_1, 0]); } areaPoints_1.push([thisCoord_1, otherCoord]); linePoints_1.push([thisCoord_1, otherCoord]); thisCoord_1 += step_1; lastIsEmpty_1 = isEmpty; }); polygonPts = this._shadowPolygonPts = areaPoints_1; polylinePts = this._shadowPolylinePts = linePoints_1; } this._shadowData = data; this._shadowDim = otherDim; this._shadowSize = [size[0], size[1]]; var dataZoomModel = this.dataZoomModel; function createDataShadowGroup(isSelectedArea) { var model = dataZoomModel.getModel(isSelectedArea ? 'selectedDataBackground' : 'dataBackground'); var group = new graphic_Group(); var polygon = new shape_Polygon({ shape: { points: polygonPts }, segmentIgnoreThreshold: 1, style: model.getModel('areaStyle').getAreaStyle(), silent: true, z2: -20 }); var polyline = new shape_Polyline({ shape: { points: polylinePts }, segmentIgnoreThreshold: 1, style: model.getModel('lineStyle').getLineStyle(), silent: true, z2: -19 }); group.add(polygon); group.add(polyline); return group; } // let dataBackgroundModel = dataZoomModel.getModel('dataBackground'); for (var i = 0; i < 3; i++) { var group = createDataShadowGroup(i === 1); this._displayables.sliderGroup.add(group); this._displayables.dataShadowSegs.push(group); } }; SliderZoomView.prototype._prepareDataShadowInfo = function () { var dataZoomModel = this.dataZoomModel; var showDataShadow = dataZoomModel.get('showDataShadow'); if (showDataShadow === false) { return; } // Find a representative series. var result; var ecModel = this.ecModel; dataZoomModel.eachTargetAxis(function (axisDim, axisIndex) { var seriesModels = dataZoomModel.getAxisProxy(axisDim, axisIndex).getTargetSeriesModels(); Object(core_util["each"])(seriesModels, function (seriesModel) { if (result) { return; } if (showDataShadow !== true && Object(core_util["indexOf"])(SHOW_DATA_SHADOW_SERIES_TYPE, seriesModel.get('type')) < 0) { return; } var thisAxis = ecModel.getComponent(getAxisMainType(axisDim), axisIndex).axis; var otherDim = getOtherDim(axisDim); var otherAxisInverse; var coordSys = seriesModel.coordinateSystem; if (otherDim != null && coordSys.getOtherAxis) { otherAxisInverse = coordSys.getOtherAxis(thisAxis).inverse; } otherDim = seriesModel.getData().mapDimension(otherDim); result = { thisAxis: thisAxis, series: seriesModel, thisDim: axisDim, otherDim: otherDim, otherAxisInverse: otherAxisInverse }; }, this); }, this); return result; }; SliderZoomView.prototype._renderHandle = function () { var thisGroup = this.group; var displayables = this._displayables; var handles = displayables.handles = [null, null]; var handleLabels = displayables.handleLabels = [null, null]; var sliderGroup = this._displayables.sliderGroup; var size = this._size; var dataZoomModel = this.dataZoomModel; var api = this.api; var borderRadius = dataZoomModel.get('borderRadius') || 0; var brushSelect = dataZoomModel.get('brushSelect'); var filler = displayables.filler = new SliderZoomView_Rect({ silent: brushSelect, style: { fill: dataZoomModel.get('fillerColor') }, textConfig: { position: 'inside' } }); sliderGroup.add(filler); // Frame border. sliderGroup.add(new SliderZoomView_Rect({ silent: true, subPixelOptimize: true, shape: { x: 0, y: 0, width: size[0], height: size[1], r: borderRadius }, style: { // deprecated option stroke: dataZoomModel.get('dataBackgroundColor') || dataZoomModel.get('borderColor'), lineWidth: DEFAULT_FRAME_BORDER_WIDTH, fill: 'rgba(0,0,0,0)' } })); // Left and right handle to resize Object(core_util["each"])([0, 1], function (handleIndex) { var iconStr = dataZoomModel.get('handleIcon'); if (!symbolBuildProxies[iconStr] && iconStr.indexOf('path://') < 0 && iconStr.indexOf('image://') < 0) { // Compatitable with the old icon parsers. Which can use a path string without path:// iconStr = 'path://' + iconStr; if (false) { deprecateLog('handleIcon now needs \'path://\' prefix when using a path string'); } } var path = symbol_createSymbol(iconStr, -1, 0, 2, 2, null, true); path.attr({ cursor: getCursor(this._orient), draggable: true, drift: Object(core_util["bind"])(this._onDragMove, this, handleIndex), ondragend: Object(core_util["bind"])(this._onDragEnd, this), onmouseover: Object(core_util["bind"])(this._showDataInfo, this, true), onmouseout: Object(core_util["bind"])(this._showDataInfo, this, false), z2: 5 }); var bRect = path.getBoundingRect(); var handleSize = dataZoomModel.get('handleSize'); this._handleHeight = number_parsePercent(handleSize, this._size[1]); this._handleWidth = bRect.width / bRect.height * this._handleHeight; path.setStyle(dataZoomModel.getModel('handleStyle').getItemStyle()); path.style.strokeNoScale = true; path.rectHover = true; path.ensureState('emphasis').style = dataZoomModel.getModel(['emphasis', 'handleStyle']).getItemStyle(); enableHoverEmphasis(path); var handleColor = dataZoomModel.get('handleColor'); // deprecated option // Compatitable with previous version if (handleColor != null) { path.style.fill = handleColor; } sliderGroup.add(handles[handleIndex] = path); var textStyleModel = dataZoomModel.getModel('textStyle'); var handleLabel = dataZoomModel.get('handleLabel') || {}; var handleLabelShow = handleLabel.show || false; thisGroup.add(handleLabels[handleIndex] = new Text({ silent: true, invisible: !handleLabelShow, style: createTextStyle(textStyleModel, { x: 0, y: 0, text: '', verticalAlign: 'middle', align: 'center', fill: textStyleModel.getTextColor(), font: textStyleModel.getFont() }), z2: 10 })); }, this); // Handle to move. Only visible when brushSelect is set true. var actualMoveZone = filler; if (brushSelect) { var moveHandleHeight = number_parsePercent(dataZoomModel.get('moveHandleSize'), size[1]); var moveHandle_1 = displayables.moveHandle = new shape_Rect({ style: dataZoomModel.getModel('moveHandleStyle').getItemStyle(), silent: true, shape: { r: [0, 0, 2, 2], y: size[1] - 0.5, height: moveHandleHeight } }); var iconSize = moveHandleHeight * 0.8; var moveHandleIcon = displayables.moveHandleIcon = symbol_createSymbol(dataZoomModel.get('moveHandleIcon'), -iconSize / 2, -iconSize / 2, iconSize, iconSize, '#fff', true); moveHandleIcon.silent = true; moveHandleIcon.y = size[1] + moveHandleHeight / 2 - 0.5; moveHandle_1.ensureState('emphasis').style = dataZoomModel.getModel(['emphasis', 'moveHandleStyle']).getItemStyle(); var moveZoneExpandSize = Math.min(size[1] / 2, Math.max(moveHandleHeight, 10)); actualMoveZone = displayables.moveZone = new shape_Rect({ invisible: true, shape: { y: size[1] - moveZoneExpandSize, height: moveHandleHeight + moveZoneExpandSize } }); actualMoveZone.on('mouseover', function () { api.enterEmphasis(moveHandle_1); }).on('mouseout', function () { api.leaveEmphasis(moveHandle_1); }); sliderGroup.add(moveHandle_1); sliderGroup.add(moveHandleIcon); sliderGroup.add(actualMoveZone); } actualMoveZone.attr({ draggable: true, cursor: getCursor(this._orient), drift: Object(core_util["bind"])(this._onDragMove, this, 'all'), ondragstart: Object(core_util["bind"])(this._showDataInfo, this, true), ondragend: Object(core_util["bind"])(this._onDragEnd, this), onmouseover: Object(core_util["bind"])(this._showDataInfo, this, true), onmouseout: Object(core_util["bind"])(this._showDataInfo, this, false) }); }; SliderZoomView.prototype._resetInterval = function () { var range = this._range = this.dataZoomModel.getPercentRange(); var viewExtent = this._getViewExtent(); this._handleEnds = [linearMap(range[0], [0, 100], viewExtent, true), linearMap(range[1], [0, 100], viewExtent, true)]; }; SliderZoomView.prototype._updateInterval = function (handleIndex, delta) { var dataZoomModel = this.dataZoomModel; var handleEnds = this._handleEnds; var viewExtend = this._getViewExtent(); var minMaxSpan = dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan(); var percentExtent = [0, 100]; sliderMove(delta, handleEnds, viewExtend, dataZoomModel.get('zoomLock') ? 'all' : handleIndex, minMaxSpan.minSpan != null ? linearMap(minMaxSpan.minSpan, percentExtent, viewExtend, true) : null, minMaxSpan.maxSpan != null ? linearMap(minMaxSpan.maxSpan, percentExtent, viewExtend, true) : null); var lastRange = this._range; var range = this._range = asc([linearMap(handleEnds[0], viewExtend, percentExtent, true), linearMap(handleEnds[1], viewExtend, percentExtent, true)]); return !lastRange || lastRange[0] !== range[0] || lastRange[1] !== range[1]; }; SliderZoomView.prototype._updateView = function (nonRealtime) { var displaybles = this._displayables; var handleEnds = this._handleEnds; var handleInterval = asc(handleEnds.slice()); var size = this._size; Object(core_util["each"])([0, 1], function (handleIndex) { // Handles var handle = displaybles.handles[handleIndex]; var handleHeight = this._handleHeight; handle.attr({ scaleX: handleHeight / 2, scaleY: handleHeight / 2, // This is a trick, by adding an extra tiny offset to let the default handle's end point align to the drag window. // NOTE: It may affect some custom shapes a bit. But we prefer to have better result by default. x: handleEnds[handleIndex] + (handleIndex ? -1 : 1), y: size[1] / 2 - handleHeight / 2 }); }, this); // Filler displaybles.filler.setShape({ x: handleInterval[0], y: 0, width: handleInterval[1] - handleInterval[0], height: size[1] }); var viewExtent = { x: handleInterval[0], width: handleInterval[1] - handleInterval[0] }; // Move handle if (displaybles.moveHandle) { displaybles.moveHandle.setShape(viewExtent); displaybles.moveZone.setShape(viewExtent); // Force update path on the invisible object displaybles.moveZone.getBoundingRect(); displaybles.moveHandleIcon && displaybles.moveHandleIcon.attr('x', viewExtent.x + viewExtent.width / 2); } // update clip path of shadow. var dataShadowSegs = displaybles.dataShadowSegs; var segIntervals = [0, handleInterval[0], handleInterval[1], size[0]]; for (var i = 0; i < dataShadowSegs.length; i++) { var segGroup = dataShadowSegs[i]; var clipPath = segGroup.getClipPath(); if (!clipPath) { clipPath = new shape_Rect(); segGroup.setClipPath(clipPath); } clipPath.setShape({ x: segIntervals[i], y: 0, width: segIntervals[i + 1] - segIntervals[i], height: size[1] }); } this._updateDataInfo(nonRealtime); }; SliderZoomView.prototype._updateDataInfo = function (nonRealtime) { var dataZoomModel = this.dataZoomModel; var displaybles = this._displayables; var handleLabels = displaybles.handleLabels; var orient = this._orient; var labelTexts = ['', '']; // FIXME // date型,支持formatter,autoformatter(ec2 date.getAutoFormatter) if (dataZoomModel.get('showDetail')) { var axisProxy = dataZoomModel.findRepresentativeAxisProxy(); if (axisProxy) { var axis = axisProxy.getAxisModel().axis; var range = this._range; var dataInterval = nonRealtime // See #4434, data and axis are not processed and reset yet in non-realtime mode. ? axisProxy.calculateDataWindow({ start: range[0], end: range[1] }).valueWindow : axisProxy.getDataValueWindow(); labelTexts = [this._formatLabel(dataInterval[0], axis), this._formatLabel(dataInterval[1], axis)]; } } var orderedHandleEnds = asc(this._handleEnds.slice()); setLabel.call(this, 0); setLabel.call(this, 1); function setLabel(handleIndex) { // Label // Text should not transform by barGroup. // Ignore handlers transform var barTransform = getTransform(displaybles.handles[handleIndex].parent, this.group); var direction = transformDirection(handleIndex === 0 ? 'right' : 'left', barTransform); var offset = this._handleWidth / 2 + LABEL_GAP; var textPoint = graphic_applyTransform([orderedHandleEnds[handleIndex] + (handleIndex === 0 ? -offset : offset), this._size[1] / 2], barTransform); handleLabels[handleIndex].setStyle({ x: textPoint[0], y: textPoint[1], verticalAlign: orient === HORIZONTAL ? 'middle' : direction, align: orient === HORIZONTAL ? direction : 'center', text: labelTexts[handleIndex] }); } }; SliderZoomView.prototype._formatLabel = function (value, axis) { var dataZoomModel = this.dataZoomModel; var labelFormatter = dataZoomModel.get('labelFormatter'); var labelPrecision = dataZoomModel.get('labelPrecision'); if (labelPrecision == null || labelPrecision === 'auto') { labelPrecision = axis.getPixelPrecision(); } var valueStr = value == null || isNaN(value) ? '' // FIXME Glue code : axis.type === 'category' || axis.type === 'time' ? axis.scale.getLabel({ value: Math.round(value) }) // param of toFixed should less then 20. : value.toFixed(Math.min(labelPrecision, 20)); return Object(core_util["isFunction"])(labelFormatter) ? labelFormatter(value, valueStr) : Object(core_util["isString"])(labelFormatter) ? labelFormatter.replace('{value}', valueStr) : valueStr; }; /** * @param isEmphasis true: show, false: hide */ SliderZoomView.prototype._showDataInfo = function (isEmphasis) { var handleLabel = this.dataZoomModel.get('handleLabel') || {}; var normalShow = handleLabel.show || false; var emphasisHandleLabel = this.dataZoomModel.getModel(['emphasis', 'handleLabel']); var emphasisShow = emphasisHandleLabel.get('show') || false; // Dragging is considered as emphasis, unless emphasisShow is false var toShow = isEmphasis || this._dragging ? emphasisShow : normalShow; var displayables = this._displayables; var handleLabels = displayables.handleLabels; handleLabels[0].attr('invisible', !toShow); handleLabels[1].attr('invisible', !toShow); // Highlight move handle displayables.moveHandle && this.api[toShow ? 'enterEmphasis' : 'leaveEmphasis'](displayables.moveHandle, 1); }; SliderZoomView.prototype._onDragMove = function (handleIndex, dx, dy, event) { this._dragging = true; // For mobile device, prevent screen slider on the button. stop(event.event); // Transform dx, dy to bar coordination. var barTransform = this._displayables.sliderGroup.getLocalTransform(); var vertex = graphic_applyTransform([dx, dy], barTransform, true); var changed = this._updateInterval(handleIndex, vertex[0]); var realtime = this.dataZoomModel.get('realtime'); this._updateView(!realtime); // Avoid dispatch dataZoom repeatly but range not changed, // which cause bad visual effect when progressive enabled. changed && realtime && this._dispatchZoomAction(true); }; SliderZoomView.prototype._onDragEnd = function () { this._dragging = false; this._showDataInfo(false); // While in realtime mode and stream mode, dispatch action when // drag end will cause the whole view rerender, which is unnecessary. var realtime = this.dataZoomModel.get('realtime'); !realtime && this._dispatchZoomAction(false); }; SliderZoomView.prototype._onClickPanel = function (e) { var size = this._size; var localPoint = this._displayables.sliderGroup.transformCoordToLocal(e.offsetX, e.offsetY); if (localPoint[0] < 0 || localPoint[0] > size[0] || localPoint[1] < 0 || localPoint[1] > size[1]) { return; } var handleEnds = this._handleEnds; var center = (handleEnds[0] + handleEnds[1]) / 2; var changed = this._updateInterval('all', localPoint[0] - center); this._updateView(); changed && this._dispatchZoomAction(false); }; SliderZoomView.prototype._onBrushStart = function (e) { var x = e.offsetX; var y = e.offsetY; this._brushStart = new core_Point(x, y); this._brushing = true; this._brushStartTime = +new Date(); // this._updateBrushRect(x, y); }; SliderZoomView.prototype._onBrushEnd = function (e) { if (!this._brushing) { return; } var brushRect = this._displayables.brushRect; this._brushing = false; if (!brushRect) { return; } brushRect.attr('ignore', true); var brushShape = brushRect.shape; var brushEndTime = +new Date(); // console.log(brushEndTime - this._brushStartTime); if (brushEndTime - this._brushStartTime < 200 && Math.abs(brushShape.width) < 5) { // Will treat it as a click return; } var viewExtend = this._getViewExtent(); var percentExtent = [0, 100]; this._range = asc([linearMap(brushShape.x, viewExtend, percentExtent, true), linearMap(brushShape.x + brushShape.width, viewExtend, percentExtent, true)]); this._handleEnds = [brushShape.x, brushShape.x + brushShape.width]; this._updateView(); this._dispatchZoomAction(false); }; SliderZoomView.prototype._onBrush = function (e) { if (this._brushing) { // For mobile device, prevent screen slider on the button. stop(e.event); this._updateBrushRect(e.offsetX, e.offsetY); } }; SliderZoomView.prototype._updateBrushRect = function (mouseX, mouseY) { var displayables = this._displayables; var dataZoomModel = this.dataZoomModel; var brushRect = displayables.brushRect; if (!brushRect) { brushRect = displayables.brushRect = new SliderZoomView_Rect({ silent: true, style: dataZoomModel.getModel('brushStyle').getItemStyle() }); displayables.sliderGroup.add(brushRect); } brushRect.attr('ignore', false); var brushStart = this._brushStart; var sliderGroup = this._displayables.sliderGroup; var endPoint = sliderGroup.transformCoordToLocal(mouseX, mouseY); var startPoint = sliderGroup.transformCoordToLocal(brushStart.x, brushStart.y); var size = this._size; endPoint[0] = Math.max(Math.min(size[0], endPoint[0]), 0); brushRect.setShape({ x: startPoint[0], y: 0, width: endPoint[0] - startPoint[0], height: size[1] }); }; /** * This action will be throttled. */ SliderZoomView.prototype._dispatchZoomAction = function (realtime) { var range = this._range; this.api.dispatchAction({ type: 'dataZoom', from: this.uid, dataZoomId: this.dataZoomModel.id, animation: realtime ? REALTIME_ANIMATION_CONFIG : null, start: range[0], end: range[1] }); }; SliderZoomView.prototype._findCoordRect = function () { // Find the grid corresponding to the first axis referred by dataZoom. var rect; var coordSysInfoList = collectReferCoordSysModelInfo(this.dataZoomModel).infoList; if (!rect && coordSysInfoList.length) { var coordSys = coordSysInfoList[0].model.coordinateSystem; rect = coordSys.getRect && coordSys.getRect(); } if (!rect) { var width = this.api.getWidth(); var height = this.api.getHeight(); rect = { x: width * 0.2, y: height * 0.2, width: width * 0.6, height: height * 0.6 }; } return rect; }; SliderZoomView.type = 'dataZoom.slider'; return SliderZoomView; }(dataZoom_DataZoomView); function getOtherDim(thisDim) { // FIXME // 这个逻辑和getOtherAxis里一致,但是写在这里是否不好 var map = { x: 'y', y: 'x', radius: 'angle', angle: 'radius' }; return map[thisDim]; } function getCursor(orient) { return orient === 'vertical' ? 'ns-resize' : 'ew-resize'; } /* harmony default export */ var dataZoom_SliderZoomView = (SliderZoomView_SliderZoomView); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/dataZoom/installDataZoomSlider.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 installDataZoomSlider_install(registers) { registers.registerComponentModel(dataZoom_SliderZoomModel); registers.registerComponentView(dataZoom_SliderZoomView); installCommon(registers); } // CONCATENATED MODULE: ./node_modules/echarts/lib/component/dataZoom/install.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 dataZoom_install_install(registers) { use(installDataZoomInside_install); use(installDataZoomSlider_install); // Do not install './dataZoomSelect', // since it only work for toolbox dataZoom. } // CONCATENATED MODULE: ./node_modules/echarts/lib/visual/visualDefault.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ /** * @file Visual mapping. */ var visualDefault = { /** * @public */ get: function (visualType, key, isCategory) { var value = core_util["clone"]((visualDefault_defaultOption[visualType] || {})[key]); return isCategory ? core_util["isArray"](value) ? value[value.length - 1] : value : value; } }; var visualDefault_defaultOption = { color: { active: ['#006edd', '#e0ffff'], inactive: ['rgba(0,0,0,0)'] }, colorHue: { active: [0, 360], inactive: [0, 0] }, colorSaturation: { active: [0.3, 1], inactive: [0, 0] }, colorLightness: { active: [0.9, 0.5], inactive: [0, 0] }, colorAlpha: { active: [0.3, 1], inactive: [0, 0] }, opacity: { active: [0.3, 1], inactive: [0, 0] }, symbol: { active: ['circle', 'roundRect', 'diamond'], inactive: ['none'] }, symbolSize: { active: [10, 50], inactive: [0, 0] } }; /* harmony default export */ var visual_visualDefault = (visualDefault); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/visualMap/VisualMapModel.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 VisualMapModel_mapVisual = visual_VisualMapping.mapVisual; var eachVisual = visual_VisualMapping.eachVisual; var isArray = core_util["isArray"]; var VisualMapModel_each = core_util["each"]; var VisualMapModel_asc = asc; var VisualMapModel_linearMap = linearMap; var VisualMapModel_VisualMapModel = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(VisualMapModel, _super); function VisualMapModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = VisualMapModel.type; _this.stateList = ['inRange', 'outOfRange']; _this.replacableOptionKeys = ['inRange', 'outOfRange', 'target', 'controller', 'color']; _this.layoutMode = { type: 'box', ignoreSize: true }; /** * [lowerBound, upperBound] */ _this.dataBound = [-Infinity, Infinity]; _this.targetVisuals = {}; _this.controllerVisuals = {}; return _this; } VisualMapModel.prototype.init = function (option, parentModel, ecModel) { this.mergeDefaultAndTheme(option, ecModel); }; /** * @protected */ VisualMapModel.prototype.optionUpdated = function (newOption, isInit) { var thisOption = this.option; !isInit && replaceVisualOption(thisOption, newOption, this.replacableOptionKeys); this.textStyleModel = this.getModel('textStyle'); this.resetItemSize(); this.completeVisualOption(); }; /** * @protected */ VisualMapModel.prototype.resetVisual = function (supplementVisualOption) { var stateList = this.stateList; supplementVisualOption = core_util["bind"](supplementVisualOption, this); this.controllerVisuals = createVisualMappings(this.option.controller, stateList, supplementVisualOption); this.targetVisuals = createVisualMappings(this.option.target, stateList, supplementVisualOption); }; /** * @public */ VisualMapModel.prototype.getItemSymbol = function () { return null; }; /** * @protected * @return {Array.} An array of series indices. */ VisualMapModel.prototype.getTargetSeriesIndices = function () { var optionSeriesIndex = this.option.seriesIndex; var seriesIndices = []; if (optionSeriesIndex == null || optionSeriesIndex === 'all') { this.ecModel.eachSeries(function (seriesModel, index) { seriesIndices.push(index); }); } else { seriesIndices = normalizeToArray(optionSeriesIndex); } return seriesIndices; }; /** * @public */ VisualMapModel.prototype.eachTargetSeries = function (callback, context) { core_util["each"](this.getTargetSeriesIndices(), function (seriesIndex) { var seriesModel = this.ecModel.getSeriesByIndex(seriesIndex); if (seriesModel) { callback.call(context, seriesModel); } }, this); }; /** * @pubilc */ VisualMapModel.prototype.isTargetSeries = function (seriesModel) { var is = false; this.eachTargetSeries(function (model) { model === seriesModel && (is = true); }); return is; }; /** * @example * this.formatValueText(someVal); // format single numeric value to text. * this.formatValueText(someVal, true); // format single category value to text. * this.formatValueText([min, max]); // format numeric min-max to text. * this.formatValueText([this.dataBound[0], max]); // using data lower bound. * this.formatValueText([min, this.dataBound[1]]); // using data upper bound. * * @param value Real value, or this.dataBound[0 or 1]. * @param isCategory Only available when value is number. * @param edgeSymbols Open-close symbol when value is interval. * @protected */ VisualMapModel.prototype.formatValueText = function (value, isCategory, edgeSymbols) { var option = this.option; var precision = option.precision; var dataBound = this.dataBound; var formatter = option.formatter; var isMinMax; edgeSymbols = edgeSymbols || ['<', '>']; if (core_util["isArray"](value)) { value = value.slice(); isMinMax = true; } var textValue = isCategory ? value // Value is string when isCategory : isMinMax ? [toFixed(value[0]), toFixed(value[1])] : toFixed(value); if (core_util["isString"](formatter)) { return formatter.replace('{value}', isMinMax ? textValue[0] : textValue).replace('{value2}', isMinMax ? textValue[1] : textValue); } else if (core_util["isFunction"](formatter)) { return isMinMax ? formatter(value[0], value[1]) : formatter(value); } if (isMinMax) { if (value[0] === dataBound[0]) { return edgeSymbols[0] + ' ' + textValue[1]; } else if (value[1] === dataBound[1]) { return edgeSymbols[1] + ' ' + textValue[0]; } else { return textValue[0] + ' - ' + textValue[1]; } } else { // Format single value (includes category case). return textValue; } function toFixed(val) { return val === dataBound[0] ? 'min' : val === dataBound[1] ? 'max' : (+val).toFixed(Math.min(precision, 20)); } }; /** * @protected */ VisualMapModel.prototype.resetExtent = function () { var thisOption = this.option; // Can not calculate data extent by data here. // Because series and data may be modified in processing stage. // So we do not support the feature "auto min/max". var extent = VisualMapModel_asc([thisOption.min, thisOption.max]); this._dataExtent = extent; }; /** * PENDING: * delete this method if no outer usage. * * Return Concrete dimension. If null/undefined is returned, no dimension is used. */ // getDataDimension(data: SeriesData) { // const optDim = this.option.dimension; // if (optDim != null) { // return data.getDimension(optDim); // } // const dimNames = data.dimensions; // for (let i = dimNames.length - 1; i >= 0; i--) { // const dimName = dimNames[i]; // const dimInfo = data.getDimensionInfo(dimName); // if (!dimInfo.isCalculationCoord) { // return dimName; // } // } // } VisualMapModel.prototype.getDataDimensionIndex = function (data) { var optDim = this.option.dimension; if (optDim != null) { return data.getDimensionIndex(optDim); } var dimNames = data.dimensions; for (var i = dimNames.length - 1; i >= 0; i--) { var dimName = dimNames[i]; var dimInfo = data.getDimensionInfo(dimName); if (!dimInfo.isCalculationCoord) { return dimInfo.storeDimIndex; } } }; VisualMapModel.prototype.getExtent = function () { return this._dataExtent.slice(); }; VisualMapModel.prototype.completeVisualOption = function () { var ecModel = this.ecModel; var thisOption = this.option; var base = { inRange: thisOption.inRange, outOfRange: thisOption.outOfRange }; var target = thisOption.target || (thisOption.target = {}); var controller = thisOption.controller || (thisOption.controller = {}); core_util["merge"](target, base); // Do not override core_util["merge"](controller, base); // Do not override var isCategory = this.isCategory(); completeSingle.call(this, target); completeSingle.call(this, controller); completeInactive.call(this, target, 'inRange', 'outOfRange'); // completeInactive.call(this, target, 'outOfRange', 'inRange'); completeController.call(this, controller); function completeSingle(base) { // Compatible with ec2 dataRange.color. // The mapping order of dataRange.color is: [high value, ..., low value] // whereas inRange.color and outOfRange.color is [low value, ..., high value] // Notice: ec2 has no inverse. if (isArray(thisOption.color) // If there has been inRange: {symbol: ...}, adding color is a mistake. // So adding color only when no inRange defined. && !base.inRange) { base.inRange = { color: thisOption.color.slice().reverse() }; } // Compatible with previous logic, always give a default color, otherwise // simple config with no inRange and outOfRange will not work. // Originally we use visualMap.color as the default color, but setOption at // the second time the default color will be erased. So we change to use // constant DEFAULT_COLOR. // If user do not want the default color, set inRange: {color: null}. base.inRange = base.inRange || { color: ecModel.get('gradientColor') }; } function completeInactive(base, stateExist, stateAbsent) { var optExist = base[stateExist]; var optAbsent = base[stateAbsent]; if (optExist && !optAbsent) { optAbsent = base[stateAbsent] = {}; VisualMapModel_each(optExist, function (visualData, visualType) { if (!visual_VisualMapping.isValidType(visualType)) { return; } var defa = visual_visualDefault.get(visualType, 'inactive', isCategory); if (defa != null) { optAbsent[visualType] = defa; // Compatibable with ec2: // Only inactive color to rgba(0,0,0,0) can not // make label transparent, so use opacity also. if (visualType === 'color' && !optAbsent.hasOwnProperty('opacity') && !optAbsent.hasOwnProperty('colorAlpha')) { optAbsent.opacity = [0, 0]; } } }); } } function completeController(controller) { var symbolExists = (controller.inRange || {}).symbol || (controller.outOfRange || {}).symbol; var symbolSizeExists = (controller.inRange || {}).symbolSize || (controller.outOfRange || {}).symbolSize; var inactiveColor = this.get('inactiveColor'); var itemSymbol = this.getItemSymbol(); var defaultSymbol = itemSymbol || 'roundRect'; VisualMapModel_each(this.stateList, function (state) { var itemSize = this.itemSize; var visuals = controller[state]; // Set inactive color for controller if no other color // attr (like colorAlpha) specified. if (!visuals) { visuals = controller[state] = { color: isCategory ? inactiveColor : [inactiveColor] }; } // Consistent symbol and symbolSize if not specified. if (visuals.symbol == null) { visuals.symbol = symbolExists && core_util["clone"](symbolExists) || (isCategory ? defaultSymbol : [defaultSymbol]); } if (visuals.symbolSize == null) { visuals.symbolSize = symbolSizeExists && core_util["clone"](symbolSizeExists) || (isCategory ? itemSize[0] : [itemSize[0], itemSize[0]]); } // Filter none visuals.symbol = VisualMapModel_mapVisual(visuals.symbol, function (symbol) { return symbol === 'none' ? defaultSymbol : symbol; }); // Normalize symbolSize var symbolSize = visuals.symbolSize; if (symbolSize != null) { var max_1 = -Infinity; // symbolSize can be object when categories defined. eachVisual(symbolSize, function (value) { value > max_1 && (max_1 = value); }); visuals.symbolSize = VisualMapModel_mapVisual(symbolSize, function (value) { return VisualMapModel_linearMap(value, [0, max_1], [0, itemSize[0]], true); }); } }, this); } }; VisualMapModel.prototype.resetItemSize = function () { this.itemSize = [parseFloat(this.get('itemWidth')), parseFloat(this.get('itemHeight'))]; }; VisualMapModel.prototype.isCategory = function () { return !!this.option.categories; }; /** * @public * @abstract */ VisualMapModel.prototype.setSelected = function (selected) {}; VisualMapModel.prototype.getSelected = function () { return null; }; /** * @public * @abstract */ VisualMapModel.prototype.getValueState = function (value) { return null; }; /** * FIXME * Do not publish to thirt-part-dev temporarily * util the interface is stable. (Should it return * a function but not visual meta?) * * @pubilc * @abstract * @param getColorVisual * params: value, valueState * return: color * @return {Object} visualMeta * should includes {stops, outerColors} * outerColor means [colorBeyondMinValue, colorBeyondMaxValue] */ VisualMapModel.prototype.getVisualMeta = function (getColorVisual) { return null; }; VisualMapModel.type = 'visualMap'; VisualMapModel.dependencies = ['series']; VisualMapModel.defaultOption = { show: true, // zlevel: 0, z: 4, seriesIndex: 'all', min: 0, max: 200, left: 0, right: null, top: null, bottom: 0, itemWidth: null, itemHeight: null, inverse: false, orient: 'vertical', backgroundColor: 'rgba(0,0,0,0)', borderColor: '#ccc', contentColor: '#5793f3', inactiveColor: '#aaa', borderWidth: 0, padding: 5, // 接受数组分别设定上右下左边距,同css textGap: 10, precision: 0, textStyle: { color: '#333' // 值域文字颜色 } }; return VisualMapModel; }(Component); /* harmony default export */ var visualMap_VisualMapModel = (VisualMapModel_VisualMapModel); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/visualMap/ContinuousModel.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ // Constant var DEFAULT_BAR_BOUND = [20, 140]; var ContinuousModel_ContinuousModel = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(ContinuousModel, _super); function ContinuousModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = ContinuousModel.type; return _this; } /** * @override */ ContinuousModel.prototype.optionUpdated = function (newOption, isInit) { _super.prototype.optionUpdated.apply(this, arguments); this.resetExtent(); this.resetVisual(function (mappingOption) { mappingOption.mappingMethod = 'linear'; mappingOption.dataExtent = this.getExtent(); }); this._resetRange(); }; /** * @protected * @override */ ContinuousModel.prototype.resetItemSize = function () { _super.prototype.resetItemSize.apply(this, arguments); var itemSize = this.itemSize; (itemSize[0] == null || isNaN(itemSize[0])) && (itemSize[0] = DEFAULT_BAR_BOUND[0]); (itemSize[1] == null || isNaN(itemSize[1])) && (itemSize[1] = DEFAULT_BAR_BOUND[1]); }; /** * @private */ ContinuousModel.prototype._resetRange = function () { var dataExtent = this.getExtent(); var range = this.option.range; if (!range || range.auto) { // `range` should always be array (so we don't use other // value like 'auto') for user-friend. (consider getOption). dataExtent.auto = 1; this.option.range = dataExtent; } else if (core_util["isArray"](range)) { if (range[0] > range[1]) { range.reverse(); } range[0] = Math.max(range[0], dataExtent[0]); range[1] = Math.min(range[1], dataExtent[1]); } }; /** * @protected * @override */ ContinuousModel.prototype.completeVisualOption = function () { _super.prototype.completeVisualOption.apply(this, arguments); core_util["each"](this.stateList, function (state) { var symbolSize = this.option.controller[state].symbolSize; if (symbolSize && symbolSize[0] !== symbolSize[1]) { symbolSize[0] = symbolSize[1] / 3; // For good looking. } }, this); }; /** * @override */ ContinuousModel.prototype.setSelected = function (selected) { this.option.range = selected.slice(); this._resetRange(); }; /** * @public */ ContinuousModel.prototype.getSelected = function () { var dataExtent = this.getExtent(); var dataInterval = asc((this.get('range') || []).slice()); // Clamp dataInterval[0] > dataExtent[1] && (dataInterval[0] = dataExtent[1]); dataInterval[1] > dataExtent[1] && (dataInterval[1] = dataExtent[1]); dataInterval[0] < dataExtent[0] && (dataInterval[0] = dataExtent[0]); dataInterval[1] < dataExtent[0] && (dataInterval[1] = dataExtent[0]); return dataInterval; }; /** * @override */ ContinuousModel.prototype.getValueState = function (value) { var range = this.option.range; var dataExtent = this.getExtent(); // When range[0] === dataExtent[0], any value larger than dataExtent[0] maps to 'inRange'. // range[1] is processed likewise. return (range[0] <= dataExtent[0] || range[0] <= value) && (range[1] >= dataExtent[1] || value <= range[1]) ? 'inRange' : 'outOfRange'; }; ContinuousModel.prototype.findTargetDataIndices = function (range) { var result = []; this.eachTargetSeries(function (seriesModel) { var dataIndices = []; var data = seriesModel.getData(); data.each(this.getDataDimensionIndex(data), function (value, dataIndex) { range[0] <= value && value <= range[1] && dataIndices.push(dataIndex); }, this); result.push({ seriesId: seriesModel.id, dataIndex: dataIndices }); }, this); return result; }; /** * @implement */ ContinuousModel.prototype.getVisualMeta = function (getColorVisual) { var oVals = getColorStopValues(this, 'outOfRange', this.getExtent()); var iVals = getColorStopValues(this, 'inRange', this.option.range.slice()); var stops = []; function setStop(value, valueState) { stops.push({ value: value, color: getColorVisual(value, valueState) }); } // Format to: outOfRange -- inRange -- outOfRange. var iIdx = 0; var oIdx = 0; var iLen = iVals.length; var oLen = oVals.length; for (; oIdx < oLen && (!iVals.length || oVals[oIdx] <= iVals[0]); oIdx++) { // If oVal[oIdx] === iVals[iIdx], oVal[oIdx] should be ignored. if (oVals[oIdx] < iVals[iIdx]) { setStop(oVals[oIdx], 'outOfRange'); } } for (var first = 1; iIdx < iLen; iIdx++, first = 0) { // If range is full, value beyond min, max will be clamped. // make a singularity first && stops.length && setStop(iVals[iIdx], 'outOfRange'); setStop(iVals[iIdx], 'inRange'); } for (var first = 1; oIdx < oLen; oIdx++) { if (!iVals.length || iVals[iVals.length - 1] < oVals[oIdx]) { // make a singularity if (first) { stops.length && setStop(stops[stops.length - 1].value, 'outOfRange'); first = 0; } setStop(oVals[oIdx], 'outOfRange'); } } var stopsLen = stops.length; return { stops: stops, outerColors: [stopsLen ? stops[0].color : 'transparent', stopsLen ? stops[stopsLen - 1].color : 'transparent'] }; }; ContinuousModel.type = 'visualMap.continuous'; ContinuousModel.defaultOption = inheritDefaultOption(visualMap_VisualMapModel.defaultOption, { align: 'auto', calculable: false, hoverLink: true, realtime: true, handleIcon: 'path://M-11.39,9.77h0a3.5,3.5,0,0,1-3.5,3.5h-22a3.5,3.5,0,0,1-3.5-3.5h0a3.5,3.5,0,0,1,3.5-3.5h22A3.5,3.5,0,0,1-11.39,9.77Z', handleSize: '120%', handleStyle: { borderColor: '#fff', borderWidth: 1 }, indicatorIcon: 'circle', indicatorSize: '50%', indicatorStyle: { borderColor: '#fff', borderWidth: 2, shadowBlur: 2, shadowOffsetX: 1, shadowOffsetY: 1, shadowColor: 'rgba(0,0,0,0.2)' } // emphasis: { // handleStyle: { // shadowBlur: 3, // shadowOffsetX: 1, // shadowOffsetY: 1, // shadowColor: 'rgba(0,0,0,0.2)' // } // } }); return ContinuousModel; }(visualMap_VisualMapModel); function getColorStopValues(visualMapModel, valueState, dataExtent) { if (dataExtent[0] === dataExtent[1]) { return dataExtent.slice(); } // When using colorHue mapping, it is not linear color any more. // Moreover, canvas gradient seems not to be accurate linear. // FIXME // Should be arbitrary value 100? or based on pixel size? var count = 200; var step = (dataExtent[1] - dataExtent[0]) / count; var value = dataExtent[0]; var stopValues = []; for (var i = 0; i <= count && value < dataExtent[1]; i++) { stopValues.push(value); value += step; } stopValues.push(dataExtent[1]); return stopValues; } /* harmony default export */ var visualMap_ContinuousModel = (ContinuousModel_ContinuousModel); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/visualMap/VisualMapView.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 VisualMapView_VisualMapView = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(VisualMapView, _super); function VisualMapView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = VisualMapView.type; _this.autoPositionValues = { left: 1, right: 1, top: 1, bottom: 1 }; return _this; } VisualMapView.prototype.init = function (ecModel, api) { this.ecModel = ecModel; this.api = api; }; /** * @protected */ VisualMapView.prototype.render = function (visualMapModel, ecModel, api, payload // TODO: TYPE ) { this.visualMapModel = visualMapModel; if (visualMapModel.get('show') === false) { this.group.removeAll(); return; } this.doRender(visualMapModel, ecModel, api, payload); }; /** * @protected */ VisualMapView.prototype.renderBackground = function (group) { var visualMapModel = this.visualMapModel; var padding = normalizeCssArray(visualMapModel.get('padding') || 0); var rect = group.getBoundingRect(); group.add(new shape_Rect({ z2: -1, silent: true, shape: { x: rect.x - padding[3], y: rect.y - padding[0], width: rect.width + padding[3] + padding[1], height: rect.height + padding[0] + padding[2] }, style: { fill: visualMapModel.get('backgroundColor'), stroke: visualMapModel.get('borderColor'), lineWidth: visualMapModel.get('borderWidth') } })); }; /** * @protected * @param targetValue can be Infinity or -Infinity * @param visualCluster Only can be 'color' 'opacity' 'symbol' 'symbolSize' * @param opts * @param opts.forceState Specify state, instead of using getValueState method. * @param opts.convertOpacityToAlpha For color gradient in controller widget. * @return {*} Visual value. */ VisualMapView.prototype.getControllerVisual = function (targetValue, visualCluster, opts) { opts = opts || {}; var forceState = opts.forceState; var visualMapModel = this.visualMapModel; var visualObj = {}; // Default values. if (visualCluster === 'color') { var defaultColor = visualMapModel.get('contentColor'); visualObj.color = defaultColor; } function getter(key) { return visualObj[key]; } function setter(key, value) { visualObj[key] = value; } var mappings = visualMapModel.controllerVisuals[forceState || visualMapModel.getValueState(targetValue)]; var visualTypes = visual_VisualMapping.prepareVisualTypes(mappings); core_util["each"](visualTypes, function (type) { var visualMapping = mappings[type]; if (opts.convertOpacityToAlpha && type === 'opacity') { type = 'colorAlpha'; visualMapping = mappings.__alphaForOpacity; } if (visual_VisualMapping.dependsOn(type, visualCluster)) { visualMapping && visualMapping.applyVisual(targetValue, getter, setter); } }); return visualObj[visualCluster]; }; VisualMapView.prototype.positionGroup = function (group) { var model = this.visualMapModel; var api = this.api; positionElement(group, model.getBoxLayoutParams(), { width: api.getWidth(), height: api.getHeight() }); }; VisualMapView.prototype.doRender = function (visualMapModel, ecModel, api, payload) {}; VisualMapView.type = 'visualMap'; return VisualMapView; }(view_Component); /* harmony default export */ var visualMap_VisualMapView = (VisualMapView_VisualMapView); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/visualMap/helper.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 paramsSet = [['left', 'right', 'width'], ['top', 'bottom', 'height']]; /** * @param visualMapModel * @param api * @param itemSize always [short, long] * @return {string} 'left' or 'right' or 'top' or 'bottom' */ function getItemAlign(visualMapModel, api, itemSize) { var modelOption = visualMapModel.option; var itemAlign = modelOption.align; if (itemAlign != null && itemAlign !== 'auto') { return itemAlign; } // Auto decision align. var ecSize = { width: api.getWidth(), height: api.getHeight() }; var realIndex = modelOption.orient === 'horizontal' ? 1 : 0; var reals = paramsSet[realIndex]; var fakeValue = [0, null, 10]; var layoutInput = {}; for (var i = 0; i < 3; i++) { layoutInput[paramsSet[1 - realIndex][i]] = fakeValue[i]; layoutInput[reals[i]] = i === 2 ? itemSize[0] : modelOption[reals[i]]; } var rParam = [['x', 'width', 3], ['y', 'height', 0]][realIndex]; var rect = getLayoutRect(layoutInput, ecSize, modelOption.padding); return reals[(rect.margin[rParam[2]] || 0) + rect[rParam[0]] + rect[rParam[1]] * 0.5 < ecSize[rParam[1]] * 0.5 ? 0 : 1]; } /** * Prepare dataIndex for outside usage, where dataIndex means rawIndex, and * dataIndexInside means filtered index. */ // TODO: TYPE more specified payload types. function makeHighDownBatch(batch, visualMapModel) { core_util["each"](batch || [], function (batchItem) { if (batchItem.dataIndex != null) { batchItem.dataIndexInside = batchItem.dataIndex; batchItem.dataIndex = null; } batchItem.highlightKey = 'visualMap' + (visualMapModel ? visualMapModel.componentIndex : ''); }); return batch; } // CONCATENATED MODULE: ./node_modules/echarts/lib/component/visualMap/ContinuousView.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 ContinuousView_linearMap = linearMap; var ContinuousView_each = core_util["each"]; var ContinuousView_mathMin = Math.min; var ContinuousView_mathMax = Math.max; // Arbitrary value var HOVER_LINK_SIZE = 12; var HOVER_LINK_OUT = 6; // Notice: // Any "interval" should be by the order of [low, high]. // "handle0" (handleIndex === 0) maps to // low data value: this._dataInterval[0] and has low coord. // "handle1" (handleIndex === 1) maps to // high data value: this._dataInterval[1] and has high coord. // The logic of transform is implemented in this._createBarGroup. var ContinuousView_ContinuousView = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(ContinuousView, _super); function ContinuousView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = ContinuousView.type; _this._shapes = {}; _this._dataInterval = []; _this._handleEnds = []; _this._hoverLinkDataIndices = []; return _this; } ContinuousView.prototype.init = function (ecModel, api) { _super.prototype.init.call(this, ecModel, api); this._hoverLinkFromSeriesMouseOver = core_util["bind"](this._hoverLinkFromSeriesMouseOver, this); this._hideIndicator = core_util["bind"](this._hideIndicator, this); }; ContinuousView.prototype.doRender = function (visualMapModel, ecModel, api, payload) { if (!payload || payload.type !== 'selectDataRange' || payload.from !== this.uid) { this._buildView(); } }; ContinuousView.prototype._buildView = function () { this.group.removeAll(); var visualMapModel = this.visualMapModel; var thisGroup = this.group; this._orient = visualMapModel.get('orient'); this._useHandle = visualMapModel.get('calculable'); this._resetInterval(); this._renderBar(thisGroup); var dataRangeText = visualMapModel.get('text'); this._renderEndsText(thisGroup, dataRangeText, 0); this._renderEndsText(thisGroup, dataRangeText, 1); // Do this for background size calculation. this._updateView(true); // After updating view, inner shapes is built completely, // and then background can be rendered. this.renderBackground(thisGroup); // Real update view this._updateView(); this._enableHoverLinkToSeries(); this._enableHoverLinkFromSeries(); this.positionGroup(thisGroup); }; ContinuousView.prototype._renderEndsText = function (group, dataRangeText, endsIndex) { if (!dataRangeText) { return; } // Compatible with ec2, text[0] map to high value, text[1] map low value. var text = dataRangeText[1 - endsIndex]; text = text != null ? text + '' : ''; var visualMapModel = this.visualMapModel; var textGap = visualMapModel.get('textGap'); var itemSize = visualMapModel.itemSize; var barGroup = this._shapes.mainGroup; var position = this._applyTransform([itemSize[0] / 2, endsIndex === 0 ? -textGap : itemSize[1] + textGap], barGroup); var align = this._applyTransform(endsIndex === 0 ? 'bottom' : 'top', barGroup); var orient = this._orient; var textStyleModel = this.visualMapModel.textStyleModel; this.group.add(new Text({ style: createTextStyle(textStyleModel, { x: position[0], y: position[1], verticalAlign: orient === 'horizontal' ? 'middle' : align, align: orient === 'horizontal' ? align : 'center', text: text }) })); }; ContinuousView.prototype._renderBar = function (targetGroup) { var visualMapModel = this.visualMapModel; var shapes = this._shapes; var itemSize = visualMapModel.itemSize; var orient = this._orient; var useHandle = this._useHandle; var itemAlign = getItemAlign(visualMapModel, this.api, itemSize); var mainGroup = shapes.mainGroup = this._createBarGroup(itemAlign); var gradientBarGroup = new graphic_Group(); mainGroup.add(gradientBarGroup); // Bar gradientBarGroup.add(shapes.outOfRange = createPolygon()); gradientBarGroup.add(shapes.inRange = createPolygon(null, useHandle ? ContinuousView_getCursor(this._orient) : null, core_util["bind"](this._dragHandle, this, 'all', false), core_util["bind"](this._dragHandle, this, 'all', true))); // A border radius clip. gradientBarGroup.setClipPath(new shape_Rect({ shape: { x: 0, y: 0, width: itemSize[0], height: itemSize[1], r: 3 } })); var textRect = visualMapModel.textStyleModel.getTextRect('国'); var textSize = ContinuousView_mathMax(textRect.width, textRect.height); // Handle if (useHandle) { shapes.handleThumbs = []; shapes.handleLabels = []; shapes.handleLabelPoints = []; this._createHandle(visualMapModel, mainGroup, 0, itemSize, textSize, orient); this._createHandle(visualMapModel, mainGroup, 1, itemSize, textSize, orient); } this._createIndicator(visualMapModel, mainGroup, itemSize, textSize, orient); targetGroup.add(mainGroup); }; ContinuousView.prototype._createHandle = function (visualMapModel, mainGroup, handleIndex, itemSize, textSize, orient) { var onDrift = core_util["bind"](this._dragHandle, this, handleIndex, false); var onDragEnd = core_util["bind"](this._dragHandle, this, handleIndex, true); var handleSize = parsePercent(visualMapModel.get('handleSize'), itemSize[0]); var handleThumb = symbol_createSymbol(visualMapModel.get('handleIcon'), -handleSize / 2, -handleSize / 2, handleSize, handleSize, null, true); var cursor = ContinuousView_getCursor(this._orient); handleThumb.attr({ cursor: cursor, draggable: true, drift: onDrift, ondragend: onDragEnd, onmousemove: function (e) { stop(e.event); } }); handleThumb.x = itemSize[0] / 2; handleThumb.useStyle(visualMapModel.getModel('handleStyle').getItemStyle()); handleThumb.setStyle({ strokeNoScale: true, strokeFirst: true }); handleThumb.style.lineWidth *= 2; handleThumb.ensureState('emphasis').style = visualMapModel.getModel(['emphasis', 'handleStyle']).getItemStyle(); setAsHighDownDispatcher(handleThumb, true); mainGroup.add(handleThumb); // Text is always horizontal layout but should not be effected by // transform (orient/inverse). So label is built separately but not // use zrender/graphic/helper/RectText, and is located based on view // group (according to handleLabelPoint) but not barGroup. var textStyleModel = this.visualMapModel.textStyleModel; var handleLabel = new Text({ cursor: cursor, draggable: true, drift: onDrift, onmousemove: function (e) { // For mobile device, prevent screen slider on the button. stop(e.event); }, ondragend: onDragEnd, style: createTextStyle(textStyleModel, { x: 0, y: 0, text: '' }) }); handleLabel.ensureState('blur').style = { opacity: 0.1 }; handleLabel.stateTransition = { duration: 200 }; this.group.add(handleLabel); var handleLabelPoint = [handleSize, 0]; var shapes = this._shapes; shapes.handleThumbs[handleIndex] = handleThumb; shapes.handleLabelPoints[handleIndex] = handleLabelPoint; shapes.handleLabels[handleIndex] = handleLabel; }; ContinuousView.prototype._createIndicator = function (visualMapModel, mainGroup, itemSize, textSize, orient) { var scale = parsePercent(visualMapModel.get('indicatorSize'), itemSize[0]); var indicator = symbol_createSymbol(visualMapModel.get('indicatorIcon'), -scale / 2, -scale / 2, scale, scale, null, true); indicator.attr({ cursor: 'move', invisible: true, silent: true, x: itemSize[0] / 2 }); var indicatorStyle = visualMapModel.getModel('indicatorStyle').getItemStyle(); if (indicator instanceof graphic_Image) { var pathStyle = indicator.style; indicator.useStyle(core_util["extend"]({ // TODO other properties like x, y ? image: pathStyle.image, x: pathStyle.x, y: pathStyle.y, width: pathStyle.width, height: pathStyle.height }, indicatorStyle)); } else { indicator.useStyle(indicatorStyle); } mainGroup.add(indicator); var textStyleModel = this.visualMapModel.textStyleModel; var indicatorLabel = new Text({ silent: true, invisible: true, style: createTextStyle(textStyleModel, { x: 0, y: 0, text: '' }) }); this.group.add(indicatorLabel); var indicatorLabelPoint = [(orient === 'horizontal' ? textSize / 2 : HOVER_LINK_OUT) + itemSize[0] / 2, 0]; var shapes = this._shapes; shapes.indicator = indicator; shapes.indicatorLabel = indicatorLabel; shapes.indicatorLabelPoint = indicatorLabelPoint; this._firstShowIndicator = true; }; ContinuousView.prototype._dragHandle = function (handleIndex, isEnd, // dx is event from ondragend if isEnd is true. It's not used dx, dy) { if (!this._useHandle) { return; } this._dragging = !isEnd; if (!isEnd) { // Transform dx, dy to bar coordination. var vertex = this._applyTransform([dx, dy], this._shapes.mainGroup, true); this._updateInterval(handleIndex, vertex[1]); this._hideIndicator(); // Considering realtime, update view should be executed // before dispatch action. this._updateView(); } // dragEnd do not dispatch action when realtime. if (isEnd === !this.visualMapModel.get('realtime')) { // jshint ignore:line this.api.dispatchAction({ type: 'selectDataRange', from: this.uid, visualMapId: this.visualMapModel.id, selected: this._dataInterval.slice() }); } if (isEnd) { !this._hovering && this._clearHoverLinkToSeries(); } else if (useHoverLinkOnHandle(this.visualMapModel)) { this._doHoverLinkToSeries(this._handleEnds[handleIndex], false); } }; ContinuousView.prototype._resetInterval = function () { var visualMapModel = this.visualMapModel; var dataInterval = this._dataInterval = visualMapModel.getSelected(); var dataExtent = visualMapModel.getExtent(); var sizeExtent = [0, visualMapModel.itemSize[1]]; this._handleEnds = [ContinuousView_linearMap(dataInterval[0], dataExtent, sizeExtent, true), ContinuousView_linearMap(dataInterval[1], dataExtent, sizeExtent, true)]; }; /** * @private * @param {(number|string)} handleIndex 0 or 1 or 'all' * @param {number} dx * @param {number} dy */ ContinuousView.prototype._updateInterval = function (handleIndex, delta) { delta = delta || 0; var visualMapModel = this.visualMapModel; var handleEnds = this._handleEnds; var sizeExtent = [0, visualMapModel.itemSize[1]]; sliderMove(delta, handleEnds, sizeExtent, handleIndex, // cross is forbidden 0); var dataExtent = visualMapModel.getExtent(); // Update data interval. this._dataInterval = [ContinuousView_linearMap(handleEnds[0], sizeExtent, dataExtent, true), ContinuousView_linearMap(handleEnds[1], sizeExtent, dataExtent, true)]; }; ContinuousView.prototype._updateView = function (forSketch) { var visualMapModel = this.visualMapModel; var dataExtent = visualMapModel.getExtent(); var shapes = this._shapes; var outOfRangeHandleEnds = [0, visualMapModel.itemSize[1]]; var inRangeHandleEnds = forSketch ? outOfRangeHandleEnds : this._handleEnds; var visualInRange = this._createBarVisual(this._dataInterval, dataExtent, inRangeHandleEnds, 'inRange'); var visualOutOfRange = this._createBarVisual(dataExtent, dataExtent, outOfRangeHandleEnds, 'outOfRange'); shapes.inRange.setStyle({ fill: visualInRange.barColor // opacity: visualInRange.opacity }).setShape('points', visualInRange.barPoints); shapes.outOfRange.setStyle({ fill: visualOutOfRange.barColor // opacity: visualOutOfRange.opacity }).setShape('points', visualOutOfRange.barPoints); this._updateHandle(inRangeHandleEnds, visualInRange); }; ContinuousView.prototype._createBarVisual = function (dataInterval, dataExtent, handleEnds, forceState) { var opts = { forceState: forceState, convertOpacityToAlpha: true }; var colorStops = this._makeColorGradient(dataInterval, opts); var symbolSizes = [this.getControllerVisual(dataInterval[0], 'symbolSize', opts), this.getControllerVisual(dataInterval[1], 'symbolSize', opts)]; var barPoints = this._createBarPoints(handleEnds, symbolSizes); return { barColor: new graphic_LinearGradient(0, 0, 0, 1, colorStops), barPoints: barPoints, handlesColor: [colorStops[0].color, colorStops[colorStops.length - 1].color] }; }; ContinuousView.prototype._makeColorGradient = function (dataInterval, opts) { // Considering colorHue, which is not linear, so we have to sample // to calculate gradient color stops, but not only calculate head // and tail. var sampleNumber = 100; // Arbitrary value. var colorStops = []; var step = (dataInterval[1] - dataInterval[0]) / sampleNumber; colorStops.push({ color: this.getControllerVisual(dataInterval[0], 'color', opts), offset: 0 }); for (var i = 1; i < sampleNumber; i++) { var currValue = dataInterval[0] + step * i; if (currValue > dataInterval[1]) { break; } colorStops.push({ color: this.getControllerVisual(currValue, 'color', opts), offset: i / sampleNumber }); } colorStops.push({ color: this.getControllerVisual(dataInterval[1], 'color', opts), offset: 1 }); return colorStops; }; ContinuousView.prototype._createBarPoints = function (handleEnds, symbolSizes) { var itemSize = this.visualMapModel.itemSize; return [[itemSize[0] - symbolSizes[0], handleEnds[0]], [itemSize[0], handleEnds[0]], [itemSize[0], handleEnds[1]], [itemSize[0] - symbolSizes[1], handleEnds[1]]]; }; ContinuousView.prototype._createBarGroup = function (itemAlign) { var orient = this._orient; var inverse = this.visualMapModel.get('inverse'); return new graphic_Group(orient === 'horizontal' && !inverse ? { scaleX: itemAlign === 'bottom' ? 1 : -1, rotation: Math.PI / 2 } : orient === 'horizontal' && inverse ? { scaleX: itemAlign === 'bottom' ? -1 : 1, rotation: -Math.PI / 2 } : orient === 'vertical' && !inverse ? { scaleX: itemAlign === 'left' ? 1 : -1, scaleY: -1 } : { scaleX: itemAlign === 'left' ? 1 : -1 }); }; ContinuousView.prototype._updateHandle = function (handleEnds, visualInRange) { if (!this._useHandle) { return; } var shapes = this._shapes; var visualMapModel = this.visualMapModel; var handleThumbs = shapes.handleThumbs; var handleLabels = shapes.handleLabels; var itemSize = visualMapModel.itemSize; var dataExtent = visualMapModel.getExtent(); var align = this._applyTransform('left', shapes.mainGroup); ContinuousView_each([0, 1], function (handleIndex) { var handleThumb = handleThumbs[handleIndex]; handleThumb.setStyle('fill', visualInRange.handlesColor[handleIndex]); handleThumb.y = handleEnds[handleIndex]; var val = ContinuousView_linearMap(handleEnds[handleIndex], [0, itemSize[1]], dataExtent, true); var symbolSize = this.getControllerVisual(val, 'symbolSize'); handleThumb.scaleX = handleThumb.scaleY = symbolSize / itemSize[0]; handleThumb.x = itemSize[0] - symbolSize / 2; // Update handle label position. var textPoint = graphic_applyTransform(shapes.handleLabelPoints[handleIndex], getTransform(handleThumb, this.group)); if (this._orient === 'horizontal') { // If visualMap controls symbol size, an additional offset needs to be added to labels to avoid collision at minimum size. // Offset reaches value of 0 at "maximum" position, so maximum position is not altered at all. var minimumOffset = align === 'left' || align === 'top' ? (itemSize[0] - symbolSize) / 2 : (itemSize[0] - symbolSize) / -2; textPoint[1] += minimumOffset; } handleLabels[handleIndex].setStyle({ x: textPoint[0], y: textPoint[1], text: visualMapModel.formatValueText(this._dataInterval[handleIndex]), verticalAlign: 'middle', align: this._orient === 'vertical' ? this._applyTransform('left', shapes.mainGroup) : 'center' }); }, this); }; ContinuousView.prototype._showIndicator = function (cursorValue, textValue, rangeSymbol, halfHoverLinkSize) { var visualMapModel = this.visualMapModel; var dataExtent = visualMapModel.getExtent(); var itemSize = visualMapModel.itemSize; var sizeExtent = [0, itemSize[1]]; var shapes = this._shapes; var indicator = shapes.indicator; if (!indicator) { return; } indicator.attr('invisible', false); var opts = { convertOpacityToAlpha: true }; var color = this.getControllerVisual(cursorValue, 'color', opts); var symbolSize = this.getControllerVisual(cursorValue, 'symbolSize'); var y = ContinuousView_linearMap(cursorValue, dataExtent, sizeExtent, true); var x = itemSize[0] - symbolSize / 2; var oldIndicatorPos = { x: indicator.x, y: indicator.y }; // Update handle label position. indicator.y = y; indicator.x = x; var textPoint = graphic_applyTransform(shapes.indicatorLabelPoint, getTransform(indicator, this.group)); var indicatorLabel = shapes.indicatorLabel; indicatorLabel.attr('invisible', false); var align = this._applyTransform('left', shapes.mainGroup); var orient = this._orient; var isHorizontal = orient === 'horizontal'; indicatorLabel.setStyle({ text: (rangeSymbol ? rangeSymbol : '') + visualMapModel.formatValueText(textValue), verticalAlign: isHorizontal ? align : 'middle', align: isHorizontal ? 'center' : align }); var indicatorNewProps = { x: x, y: y, style: { fill: color } }; var labelNewProps = { style: { x: textPoint[0], y: textPoint[1] } }; if (visualMapModel.ecModel.isAnimationEnabled() && !this._firstShowIndicator) { var animationCfg = { duration: 100, easing: 'cubicInOut', additive: true }; indicator.x = oldIndicatorPos.x; indicator.y = oldIndicatorPos.y; indicator.animateTo(indicatorNewProps, animationCfg); indicatorLabel.animateTo(labelNewProps, animationCfg); } else { indicator.attr(indicatorNewProps); indicatorLabel.attr(labelNewProps); } this._firstShowIndicator = false; var handleLabels = this._shapes.handleLabels; if (handleLabels) { for (var i = 0; i < handleLabels.length; i++) { // Fade out handle labels. // NOTE: Must use api enter/leave on emphasis/blur/select state. Or the global states manager will change it. this.api.enterBlur(handleLabels[i]); } } }; ContinuousView.prototype._enableHoverLinkToSeries = function () { var self = this; this._shapes.mainGroup.on('mousemove', function (e) { self._hovering = true; if (!self._dragging) { var itemSize = self.visualMapModel.itemSize; var pos = self._applyTransform([e.offsetX, e.offsetY], self._shapes.mainGroup, true, true); // For hover link show when hover handle, which might be // below or upper than sizeExtent. pos[1] = ContinuousView_mathMin(ContinuousView_mathMax(0, pos[1]), itemSize[1]); self._doHoverLinkToSeries(pos[1], 0 <= pos[0] && pos[0] <= itemSize[0]); } }).on('mouseout', function () { // When mouse is out of handle, hoverLink still need // to be displayed when realtime is set as false. self._hovering = false; !self._dragging && self._clearHoverLinkToSeries(); }); }; ContinuousView.prototype._enableHoverLinkFromSeries = function () { var zr = this.api.getZr(); if (this.visualMapModel.option.hoverLink) { zr.on('mouseover', this._hoverLinkFromSeriesMouseOver, this); zr.on('mouseout', this._hideIndicator, this); } else { this._clearHoverLinkFromSeries(); } }; ContinuousView.prototype._doHoverLinkToSeries = function (cursorPos, hoverOnBar) { var visualMapModel = this.visualMapModel; var itemSize = visualMapModel.itemSize; if (!visualMapModel.option.hoverLink) { return; } var sizeExtent = [0, itemSize[1]]; var dataExtent = visualMapModel.getExtent(); // For hover link show when hover handle, which might be below or upper than sizeExtent. cursorPos = ContinuousView_mathMin(ContinuousView_mathMax(sizeExtent[0], cursorPos), sizeExtent[1]); var halfHoverLinkSize = getHalfHoverLinkSize(visualMapModel, dataExtent, sizeExtent); var hoverRange = [cursorPos - halfHoverLinkSize, cursorPos + halfHoverLinkSize]; var cursorValue = ContinuousView_linearMap(cursorPos, sizeExtent, dataExtent, true); var valueRange = [ContinuousView_linearMap(hoverRange[0], sizeExtent, dataExtent, true), ContinuousView_linearMap(hoverRange[1], sizeExtent, dataExtent, true)]; // Consider data range is out of visualMap range, see test/visualMap-continuous.html, // where china and india has very large population. hoverRange[0] < sizeExtent[0] && (valueRange[0] = -Infinity); hoverRange[1] > sizeExtent[1] && (valueRange[1] = Infinity); // Do not show indicator when mouse is over handle, // otherwise labels overlap, especially when dragging. if (hoverOnBar) { if (valueRange[0] === -Infinity) { this._showIndicator(cursorValue, valueRange[1], '< ', halfHoverLinkSize); } else if (valueRange[1] === Infinity) { this._showIndicator(cursorValue, valueRange[0], '> ', halfHoverLinkSize); } else { this._showIndicator(cursorValue, cursorValue, '≈ ', halfHoverLinkSize); } } // When realtime is set as false, handles, which are in barGroup, // also trigger hoverLink, which help user to realize where they // focus on when dragging. (see test/heatmap-large.html) // When realtime is set as true, highlight will not show when hover // handle, because the label on handle, which displays a exact value // but not range, might mislead users. var oldBatch = this._hoverLinkDataIndices; var newBatch = []; if (hoverOnBar || useHoverLinkOnHandle(visualMapModel)) { newBatch = this._hoverLinkDataIndices = visualMapModel.findTargetDataIndices(valueRange); } var resultBatches = compressBatches(oldBatch, newBatch); this._dispatchHighDown('downplay', makeHighDownBatch(resultBatches[0], visualMapModel)); this._dispatchHighDown('highlight', makeHighDownBatch(resultBatches[1], visualMapModel)); }; ContinuousView.prototype._hoverLinkFromSeriesMouseOver = function (e) { var ecData; findEventDispatcher(e.target, function (target) { var currECData = getECData(target); if (currECData.dataIndex != null) { ecData = currECData; return true; } }, true); if (!ecData) { return; } var dataModel = this.ecModel.getSeriesByIndex(ecData.seriesIndex); var visualMapModel = this.visualMapModel; if (!visualMapModel.isTargetSeries(dataModel)) { return; } var data = dataModel.getData(ecData.dataType); var value = data.getStore().get(visualMapModel.getDataDimensionIndex(data), ecData.dataIndex); if (!isNaN(value)) { this._showIndicator(value, value); } }; ContinuousView.prototype._hideIndicator = function () { var shapes = this._shapes; shapes.indicator && shapes.indicator.attr('invisible', true); shapes.indicatorLabel && shapes.indicatorLabel.attr('invisible', true); var handleLabels = this._shapes.handleLabels; if (handleLabels) { for (var i = 0; i < handleLabels.length; i++) { // Fade out handle labels. // NOTE: Must use api enter/leave on emphasis/blur/select state. Or the global states manager will change it. this.api.leaveBlur(handleLabels[i]); } } }; ContinuousView.prototype._clearHoverLinkToSeries = function () { this._hideIndicator(); var indices = this._hoverLinkDataIndices; this._dispatchHighDown('downplay', makeHighDownBatch(indices, this.visualMapModel)); indices.length = 0; }; ContinuousView.prototype._clearHoverLinkFromSeries = function () { this._hideIndicator(); var zr = this.api.getZr(); zr.off('mouseover', this._hoverLinkFromSeriesMouseOver); zr.off('mouseout', this._hideIndicator); }; ContinuousView.prototype._applyTransform = function (vertex, element, inverse, global) { var transform = getTransform(element, global ? null : this.group); return core_util["isArray"](vertex) ? graphic_applyTransform(vertex, transform, inverse) : transformDirection(vertex, transform, inverse); }; // TODO: TYPE more specified payload types. ContinuousView.prototype._dispatchHighDown = function (type, batch) { batch && batch.length && this.api.dispatchAction({ type: type, batch: batch }); }; /** * @override */ ContinuousView.prototype.dispose = function () { this._clearHoverLinkFromSeries(); this._clearHoverLinkToSeries(); }; ContinuousView.type = 'visualMap.continuous'; return ContinuousView; }(visualMap_VisualMapView); function createPolygon(points, cursor, onDrift, onDragEnd) { return new shape_Polygon({ shape: { points: points }, draggable: !!onDrift, cursor: cursor, drift: onDrift, onmousemove: function (e) { // For mobile device, prevent screen slider on the button. stop(e.event); }, ondragend: onDragEnd }); } function getHalfHoverLinkSize(visualMapModel, dataExtent, sizeExtent) { var halfHoverLinkSize = HOVER_LINK_SIZE / 2; var hoverLinkDataSize = visualMapModel.get('hoverLinkDataSize'); if (hoverLinkDataSize) { halfHoverLinkSize = ContinuousView_linearMap(hoverLinkDataSize, dataExtent, sizeExtent, true) / 2; } return halfHoverLinkSize; } function useHoverLinkOnHandle(visualMapModel) { var hoverLinkOnHandle = visualMapModel.get('hoverLinkOnHandle'); return !!(hoverLinkOnHandle == null ? visualMapModel.get('realtime') : hoverLinkOnHandle); } function ContinuousView_getCursor(orient) { return orient === 'vertical' ? 'ns-resize' : 'ew-resize'; } /* harmony default export */ var visualMap_ContinuousView = (ContinuousView_ContinuousView); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/visualMap/visualMapAction.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 visualMapActionInfo = { type: 'selectDataRange', event: 'dataRangeSelected', // FIXME use updateView appears wrong update: 'update' }; var visualMapActionHander = function (payload, ecModel) { ecModel.eachComponent({ mainType: 'visualMap', query: payload }, function (model) { model.setSelected(payload.selected); }); }; // CONCATENATED MODULE: ./node_modules/echarts/lib/component/visualMap/visualEncoding.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 visualMapEncodingHandlers = [{ createOnAllSeries: true, reset: function (seriesModel, ecModel) { var resetDefines = []; ecModel.eachComponent('visualMap', function (visualMapModel) { var pipelineContext = seriesModel.pipelineContext; if (!visualMapModel.isTargetSeries(seriesModel) || pipelineContext && pipelineContext.large) { return; } resetDefines.push(incrementalApplyVisual(visualMapModel.stateList, visualMapModel.targetVisuals, core_util["bind"](visualMapModel.getValueState, visualMapModel), visualMapModel.getDataDimensionIndex(seriesModel.getData()))); }); return resetDefines; } }, // Only support color. { createOnAllSeries: true, reset: function (seriesModel, ecModel) { var data = seriesModel.getData(); var visualMetaList = []; ecModel.eachComponent('visualMap', function (visualMapModel) { if (visualMapModel.isTargetSeries(seriesModel)) { var visualMeta = visualMapModel.getVisualMeta(core_util["bind"](visualEncoding_getColorVisual, null, seriesModel, visualMapModel)) || { stops: [], outerColors: [] }; var dimIdx = visualMapModel.getDataDimensionIndex(data); if (dimIdx >= 0) { // visualMeta.dimension should be dimension index, but not concrete dimension. visualMeta.dimension = dimIdx; visualMetaList.push(visualMeta); } } }); // console.log(JSON.stringify(visualMetaList.map(a => a.stops))); seriesModel.getData().setVisual('visualMeta', visualMetaList); } }]; // FIXME // performance and export for heatmap? // value can be Infinity or -Infinity function visualEncoding_getColorVisual(seriesModel, visualMapModel, value, valueState) { var mappings = visualMapModel.targetVisuals[valueState]; var visualTypes = visual_VisualMapping.prepareVisualTypes(mappings); var resultVisual = { color: getVisualFromData(seriesModel.getData(), 'color') // default color. }; for (var i = 0, len = visualTypes.length; i < len; i++) { var type = visualTypes[i]; var mapping = mappings[type === 'opacity' ? '__alphaForOpacity' : type]; mapping && mapping.applyVisual(value, getVisual, setVisual); } return resultVisual.color; function getVisual(key) { return resultVisual[key]; } function setVisual(key, value) { resultVisual[key] = value; } } // CONCATENATED MODULE: ./node_modules/echarts/lib/component/visualMap/preprocessor.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ // @ts-nocheck var preprocessor_each = core_util["each"]; function visualMapPreprocessor(option) { var visualMap = option && option.visualMap; if (!core_util["isArray"](visualMap)) { visualMap = visualMap ? [visualMap] : []; } preprocessor_each(visualMap, function (opt) { if (!opt) { return; } // rename splitList to pieces if (visualMap_preprocessor_has(opt, 'splitList') && !visualMap_preprocessor_has(opt, 'pieces')) { opt.pieces = opt.splitList; delete opt.splitList; } var pieces = opt.pieces; if (pieces && core_util["isArray"](pieces)) { preprocessor_each(pieces, function (piece) { if (core_util["isObject"](piece)) { if (visualMap_preprocessor_has(piece, 'start') && !visualMap_preprocessor_has(piece, 'min')) { piece.min = piece.start; } if (visualMap_preprocessor_has(piece, 'end') && !visualMap_preprocessor_has(piece, 'max')) { piece.max = piece.end; } } }); } }); } function visualMap_preprocessor_has(obj, name) { return obj && obj.hasOwnProperty && obj.hasOwnProperty(name); } // CONCATENATED MODULE: ./node_modules/echarts/lib/component/visualMap/installCommon.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 installCommon_installed = false; function installCommon_installCommon(registers) { if (installCommon_installed) { return; } installCommon_installed = true; registers.registerSubTypeDefaulter('visualMap', function (option) { // Compatible with ec2, when splitNumber === 0, continuous visualMap will be used. return !option.categories && (!(option.pieces ? option.pieces.length > 0 : option.splitNumber > 0) || option.calculable) ? 'continuous' : 'piecewise'; }); registers.registerAction(visualMapActionInfo, visualMapActionHander); Object(core_util["each"])(visualMapEncodingHandlers, function (handler) { registers.registerVisual(registers.PRIORITY.VISUAL.COMPONENT, handler); }); registers.registerPreprocessor(visualMapPreprocessor); } // CONCATENATED MODULE: ./node_modules/echarts/lib/component/visualMap/installVisualMapContinuous.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 installVisualMapContinuous_install(registers) { registers.registerComponentModel(visualMap_ContinuousModel); registers.registerComponentView(visualMap_ContinuousView); installCommon_installCommon(registers); } // CONCATENATED MODULE: ./node_modules/echarts/lib/component/visualMap/PiecewiseModel.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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_PiecewiseModel = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(PiecewiseModel, _super); function PiecewiseModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = PiecewiseModel.type; /** * The order is always [low, ..., high]. * [{text: string, interval: Array.}, ...] */ _this._pieceList = []; return _this; } PiecewiseModel.prototype.optionUpdated = function (newOption, isInit) { _super.prototype.optionUpdated.apply(this, arguments); this.resetExtent(); var mode = this._mode = this._determineMode(); this._pieceList = []; resetMethods[this._mode].call(this, this._pieceList); this._resetSelected(newOption, isInit); var categories = this.option.categories; this.resetVisual(function (mappingOption, state) { if (mode === 'categories') { mappingOption.mappingMethod = 'category'; mappingOption.categories = core_util["clone"](categories); } else { mappingOption.dataExtent = this.getExtent(); mappingOption.mappingMethod = 'piecewise'; mappingOption.pieceList = core_util["map"](this._pieceList, function (piece) { piece = core_util["clone"](piece); if (state !== 'inRange') { // FIXME // outOfRange do not support special visual in pieces. piece.visual = null; } return piece; }); } }); }; /** * @protected * @override */ PiecewiseModel.prototype.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 = visual_VisualMapping.listVisualTypes(); var isCategory = this.isCategory(); core_util["each"](option.pieces, function (piece) { core_util["each"](visualTypes, function (visualType) { if (piece.hasOwnProperty(visualType)) { visualTypesInPieces[visualType] = 1; } }); }); core_util["each"](visualTypesInPieces, function (v, visualType) { var exists = false; core_util["each"](this.stateList, function (state) { exists = exists || has(option, state, visualType) || has(option.target, state, visualType); }, this); !exists && core_util["each"](this.stateList, function (state) { (option[state] || (option[state] = {}))[visualType] = visual_visualDefault.get(visualType, state === 'inRange' ? 'active' : 'inactive', isCategory); }); }, this); function has(obj, state, visualType) { return obj && obj[state] && obj[state].hasOwnProperty(visualType); } _super.prototype.completeVisualOption.apply(this, arguments); }; PiecewiseModel.prototype._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. core_util["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_1 = false; core_util["each"](pieceList, function (piece, index) { var key = this.getSelectedMapKey(piece); if (selected[key]) { hasSel_1 ? selected[key] = false : hasSel_1 = true; } }, this); } // thisOption.selectedMode === 'multiple', default: all selected. }; /** * @public */ PiecewiseModel.prototype.getItemSymbol = function () { return this.get('itemSymbol'); }; /** * @public */ PiecewiseModel.prototype.getSelectedMapKey = function (piece) { return this._mode === 'categories' ? piece.value + '' : piece.index + ''; }; /** * @public */ PiecewiseModel.prototype.getPieceList = function () { return this._pieceList; }; /** * @return {string} */ PiecewiseModel.prototype._determineMode = function () { var option = this.option; return option.pieces && option.pieces.length > 0 ? 'pieces' : this.option.categories ? 'categories' : 'splitNumber'; }; /** * @override */ PiecewiseModel.prototype.setSelected = function (selected) { this.option.selected = core_util["clone"](selected); }; /** * @override */ PiecewiseModel.prototype.getValueState = function (value) { var index = visual_VisualMapping.findPieceIndex(value, this._pieceList); return index != null ? this.option.selected[this.getSelectedMapKey(this._pieceList[index])] ? 'inRange' : 'outOfRange' : 'outOfRange'; }; /** * @public * @param pieceIndex piece index in visualMapModel.getPieceList() */ PiecewiseModel.prototype.findTargetDataIndices = function (pieceIndex) { var result = []; var pieceList = this._pieceList; this.eachTargetSeries(function (seriesModel) { var dataIndices = []; var data = seriesModel.getData(); data.each(this.getDataDimensionIndex(data), function (value, dataIndex) { // Should always base on model pieceList, because it is order sensitive. var pIdx = visual_VisualMapping.findPieceIndex(value, pieceList); pIdx === pieceIndex && dataIndices.push(dataIndex); }, this); result.push({ seriesId: seriesModel.id, dataIndex: dataIndices }); }, this); return result; }; /** * @private * @param piece piece.value or piece.interval is required. * @return Can be Infinity or -Infinity */ PiecewiseModel.prototype.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; }; PiecewiseModel.prototype.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 }); // Not category 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; core_util["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 }; }; PiecewiseModel.type = 'visualMap.piecewise'; PiecewiseModel.defaultOption = inheritDefaultOption(visualMap_VisualMapModel.defaultOption, { selected: null, minOpen: false, maxOpen: false, align: 'auto', itemWidth: 20, itemHeight: 14, itemSymbol: 'roundRect', pieces: null, categories: null, splitNumber: 5, selectedMode: 'multiple', itemGap: 10, hoverLink: true // Enable hover highlight. }); return PiecewiseModel; }(visualMap_VisualMapModel); ; /** * Key is this._mode * @type {Object} * @this {module:echarts/component/viusalMap/PiecewiseMode} */ var resetMethods = { splitNumber: function (outPieceList) { var thisOption = this.option; 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) { outPieceList.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; outPieceList.push({ interval: [curr, max], close: [1, 1] }); } if (thisOption.maxOpen) { outPieceList.push({ interval: [dataExtent[1], Infinity], close: [0, 0] }); } reformIntervals(outPieceList); core_util["each"](outPieceList, function (piece, index) { piece.index = index; piece.text = this.formatValueText(piece.interval); }, this); }, categories: function (outPieceList) { var thisOption = this.option; core_util["each"](thisOption.categories, function (cate) { // FIXME category模式也使用pieceList,但在visualMapping中不是使用pieceList。 // 是否改一致。 outPieceList.push({ text: this.formatValueText(cate, true), value: cate }); }, this); // See "Order Rule". normalizeReverse(thisOption, outPieceList); }, pieces: function (outPieceList) { var thisOption = this.option; core_util["each"](thisOption.pieces, function (pieceListItem, index) { if (!core_util["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 recommended. var interval = item.interval = []; var close_1 = 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_1[lg] = closeList[i]; useMinMax[lg] = i === 2; } interval[lg] == null && (interval[lg] = infinityList[lg]); } useMinMax[0] && interval[1] === Infinity && (close_1[0] = 0); useMinMax[1] && interval[0] === -Infinity && (close_1[1] = 0); if (false) { if (interval[0] > interval[1]) { console.warn('Piece ' + index + 'is illegal: ' + interval + ' lower bound should not greater then uppper bound.'); } } if (interval[0] === interval[1] && close_1[0] && close_1[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 = visual_VisualMapping.retrieveVisuals(pieceListItem); outPieceList.push(item); }, this); // See "Order Rule". normalizeReverse(thisOption, outPieceList); // Only pieces reformIntervals(outPieceList); core_util["each"](outPieceList, 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(); } } /* harmony default export */ var visualMap_PiecewiseModel = (PiecewiseModel_PiecewiseModel); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/visualMap/PiecewiseView.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 PiecewiseView_PiecewiseVisualMapView = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(PiecewiseVisualMapView, _super); function PiecewiseVisualMapView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = PiecewiseVisualMapView.type; return _this; } PiecewiseVisualMapView.prototype.doRender = function () { var thisGroup = this.group; thisGroup.removeAll(); var visualMapModel = this.visualMapModel; var textGap = visualMapModel.get('textGap'); var textStyleModel = visualMapModel.textStyleModel; var textFont = textStyleModel.getFont(); var textFill = textStyleModel.getTextColor(); var itemAlign = this._getItemAlign(); var itemSize = visualMapModel.itemSize; var viewData = this._getViewData(); var endsText = viewData.endsText; var showLabel = core_util["retrieve"](visualMapModel.get('showLabel', true), !endsText); var silent = !visualMapModel.get('selectedMode'); endsText && this._renderEndsText(thisGroup, endsText[0], itemSize, showLabel, itemAlign); core_util["each"](viewData.viewPieceList, function (item) { var piece = item.piece; var itemGroup = new graphic_Group(); itemGroup.onclick = core_util["bind"](this._onItemClick, this, piece); this._enableHoverLink(itemGroup, item.indexInModelPieceList); // TODO Category var representValue = visualMapModel.getRepresentValue(piece); this._createItemSymbol(itemGroup, representValue, [0, 0, itemSize[0], itemSize[1]], silent); if (showLabel) { var visualState = this.visualMapModel.getValueState(representValue); itemGroup.add(new Text({ style: { x: itemAlign === 'right' ? -textGap : itemSize[0] + textGap, y: itemSize[1] / 2, text: piece.text, verticalAlign: 'middle', align: itemAlign, font: textFont, fill: textFill, opacity: visualState === 'outOfRange' ? 0.5 : 1 }, silent: silent })); } thisGroup.add(itemGroup); }, this); endsText && this._renderEndsText(thisGroup, endsText[1], itemSize, showLabel, itemAlign); layout_box(visualMapModel.get('orient'), thisGroup, visualMapModel.get('itemGap')); this.renderBackground(thisGroup); this.positionGroup(thisGroup); }; PiecewiseVisualMapView.prototype._enableHoverLink = function (itemGroup, pieceIndex) { var _this = this; itemGroup.on('mouseover', function () { return onHoverLink('highlight'); }).on('mouseout', function () { return onHoverLink('downplay'); }); var onHoverLink = function (method) { var visualMapModel = _this.visualMapModel; // TODO: TYPE More detailed action types visualMapModel.option.hoverLink && _this.api.dispatchAction({ type: method, batch: makeHighDownBatch(visualMapModel.findTargetDataIndices(pieceIndex), visualMapModel) }); }; }; PiecewiseVisualMapView.prototype._getItemAlign = function () { var visualMapModel = this.visualMapModel; var modelOption = visualMapModel.option; if (modelOption.orient === 'vertical') { return getItemAlign(visualMapModel, this.api, visualMapModel.itemSize); } else { // horizontal, most case left unless specifying right. var align = modelOption.align; if (!align || align === 'auto') { align = 'left'; } return align; } }; PiecewiseVisualMapView.prototype._renderEndsText = function (group, text, itemSize, showLabel, itemAlign) { if (!text) { return; } var itemGroup = new graphic_Group(); var textStyleModel = this.visualMapModel.textStyleModel; itemGroup.add(new Text({ style: createTextStyle(textStyleModel, { x: showLabel ? itemAlign === 'right' ? itemSize[0] : 0 : itemSize[0] / 2, y: itemSize[1] / 2, verticalAlign: 'middle', align: showLabel ? itemAlign : 'center', text: text }) })); group.add(itemGroup); }; /** * @private * @return {Object} {peiceList, endsText} The order is the same as screen pixel order. */ PiecewiseVisualMapView.prototype._getViewData = function () { var visualMapModel = this.visualMapModel; var viewPieceList = core_util["map"](visualMapModel.getPieceList(), function (piece, index) { return { piece: piece, indexInModelPieceList: index }; }); var endsText = visualMapModel.get('text'); // Consider orient and inverse. var orient = visualMapModel.get('orient'); var inverse = visualMapModel.get('inverse'); // Order of model pieceList is always [low, ..., high] if (orient === 'horizontal' ? inverse : !inverse) { viewPieceList.reverse(); } // Origin order of endsText is [high, low] else if (endsText) { endsText = endsText.slice().reverse(); } return { viewPieceList: viewPieceList, endsText: endsText }; }; PiecewiseVisualMapView.prototype._createItemSymbol = function (group, representValue, shapeParam, silent) { var itemSymbol = symbol_createSymbol( // symbol will be string this.getControllerVisual(representValue, 'symbol'), shapeParam[0], shapeParam[1], shapeParam[2], shapeParam[3], // color will be string this.getControllerVisual(representValue, 'color')); itemSymbol.silent = silent; group.add(itemSymbol); }; PiecewiseVisualMapView.prototype._onItemClick = function (piece) { var visualMapModel = this.visualMapModel; var option = visualMapModel.option; var selectedMode = option.selectedMode; if (!selectedMode) { return; } var selected = core_util["clone"](option.selected); var newKey = visualMapModel.getSelectedMapKey(piece); if (selectedMode === 'single' || selectedMode === true) { selected[newKey] = true; core_util["each"](selected, function (o, key) { selected[key] = key === newKey; }); } else { selected[newKey] = !selected[newKey]; } this.api.dispatchAction({ type: 'selectDataRange', from: this.uid, visualMapId: this.visualMapModel.id, selected: selected }); }; PiecewiseVisualMapView.type = 'visualMap.piecewise'; return PiecewiseVisualMapView; }(visualMap_VisualMapView); /* harmony default export */ var PiecewiseView = (PiecewiseView_PiecewiseVisualMapView); // CONCATENATED MODULE: ./node_modules/echarts/lib/component/visualMap/installVisualMapPiecewise.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 installVisualMapPiecewise_install(registers) { registers.registerComponentModel(visualMap_PiecewiseModel); registers.registerComponentView(PiecewiseView); installCommon_installCommon(registers); } // CONCATENATED MODULE: ./node_modules/echarts/lib/component/visualMap/install.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 visualMap_install_install(registers) { use(installVisualMapContinuous_install); use(installVisualMapPiecewise_install); // Do not install './dataZoomSelect', // since it only work for toolbox dataZoom. } // CONCATENATED MODULE: ./node_modules/echarts/lib/visual/aria.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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_OPTION = { label: { enabled: true }, decal: { show: false } }; var aria_inner = makeInner(); var aria_decalPaletteScope = {}; function ariaVisual(ecModel, api) { var ariaModel = ecModel.getModel('aria'); // See "area enabled" detection code in `GlobalModel.ts`. if (!ariaModel.get('enabled')) { return; } var defaultOption = core_util["clone"](DEFAULT_OPTION); core_util["merge"](defaultOption.label, ecModel.getLocaleModel().get('aria'), false); core_util["merge"](ariaModel.option, defaultOption, false); setDecal(); setLabel(); function setDecal() { var decalModel = ariaModel.getModel('decal'); var useDecal = decalModel.get('show'); if (useDecal) { // Each type of series use one scope. // Pie and funnel are using different scopes. var paletteScopeGroupByType_1 = core_util["createHashMap"](); ecModel.eachSeries(function (seriesModel) { if (seriesModel.isColorBySeries()) { return; } var decalScope = paletteScopeGroupByType_1.get(seriesModel.type); if (!decalScope) { decalScope = {}; paletteScopeGroupByType_1.set(seriesModel.type, decalScope); } aria_inner(seriesModel).scope = decalScope; }); ecModel.eachRawSeries(function (seriesModel) { if (ecModel.isSeriesFiltered(seriesModel)) { return; } if (core_util["isFunction"](seriesModel.enableAriaDecal)) { // Let series define how to use decal palette on data seriesModel.enableAriaDecal(); return; } var data = seriesModel.getData(); if (!seriesModel.isColorBySeries()) { var dataAll_1 = seriesModel.getRawData(); var idxMap_1 = {}; var decalScope_1 = aria_inner(seriesModel).scope; data.each(function (idx) { var rawIdx = data.getRawIndex(idx); idxMap_1[rawIdx] = idx; }); var dataCount_1 = dataAll_1.count(); dataAll_1.each(function (rawIdx) { var idx = idxMap_1[rawIdx]; var name = dataAll_1.getName(rawIdx) || rawIdx + ''; var paletteDecal = getDecalFromPalette(seriesModel.ecModel, name, decalScope_1, dataCount_1); var specifiedDecal = data.getItemVisual(idx, 'decal'); data.setItemVisual(idx, 'decal', mergeDecal(specifiedDecal, paletteDecal)); }); } else { var paletteDecal = getDecalFromPalette(seriesModel.ecModel, seriesModel.name, aria_decalPaletteScope, ecModel.getSeriesCount()); var specifiedDecal = data.getVisual('decal'); data.setVisual('decal', mergeDecal(specifiedDecal, paletteDecal)); } function mergeDecal(specifiedDecal, paletteDecal) { // Merge decal from palette to decal from itemStyle. // User do not need to specify all of the decal props. var resultDecal = specifiedDecal ? core_util["extend"](core_util["extend"]({}, paletteDecal), specifiedDecal) : paletteDecal; resultDecal.dirty = true; return resultDecal; } }); } } function setLabel() { var dom = api.getZr().dom; // TODO: support for SSR if (!dom) { return; } var labelLocale = ecModel.getLocaleModel().get('aria'); var labelModel = ariaModel.getModel('label'); labelModel.option = core_util["defaults"](labelModel.option, labelLocale); if (!labelModel.get('enabled')) { return; } dom.setAttribute('role', 'img'); if (labelModel.get('description')) { dom.setAttribute('aria-label', labelModel.get('description')); return; } var seriesCnt = ecModel.getSeriesCount(); var maxDataCnt = labelModel.get(['data', 'maxCount']) || 10; var maxSeriesCnt = labelModel.get(['series', 'maxCount']) || 10; var displaySeriesCnt = Math.min(seriesCnt, maxSeriesCnt); var ariaLabel; if (seriesCnt < 1) { // No series, no aria label return; } else { var title = getTitle(); if (title) { var withTitle = labelModel.get(['general', 'withTitle']); ariaLabel = replace(withTitle, { title: title }); } else { ariaLabel = labelModel.get(['general', 'withoutTitle']); } var seriesLabels_1 = []; var prefix = seriesCnt > 1 ? labelModel.get(['series', 'multiple', 'prefix']) : labelModel.get(['series', 'single', 'prefix']); ariaLabel += replace(prefix, { seriesCount: seriesCnt }); ecModel.eachSeries(function (seriesModel, idx) { if (idx < displaySeriesCnt) { var seriesLabel = void 0; var seriesName = seriesModel.get('name'); var withName = seriesName ? 'withName' : 'withoutName'; seriesLabel = seriesCnt > 1 ? labelModel.get(['series', 'multiple', withName]) : labelModel.get(['series', 'single', withName]); seriesLabel = replace(seriesLabel, { seriesId: seriesModel.seriesIndex, seriesName: seriesModel.get('name'), seriesType: getSeriesTypeName(seriesModel.subType) }); var data = seriesModel.getData(); if (data.count() > maxDataCnt) { // Show part of data var partialLabel = labelModel.get(['data', 'partialData']); seriesLabel += replace(partialLabel, { displayCnt: maxDataCnt }); } else { seriesLabel += labelModel.get(['data', 'allData']); } var middleSeparator_1 = labelModel.get(['data', 'separator', 'middle']); var endSeparator_1 = labelModel.get(['data', 'separator', 'end']); var excludeDimensionId_1 = labelModel.get(['data', 'excludeDimensionId']); var dataLabels = []; for (var i = 0; i < data.count(); i++) { if (i < maxDataCnt) { var name_1 = data.getName(i); var value = !excludeDimensionId_1 ? data.getValues(i) : core_util["filter"](data.getValues(i), function (v, j) { return core_util["indexOf"](excludeDimensionId_1, j) === -1; }); var dataLabel = labelModel.get(['data', name_1 ? 'withName' : 'withoutName']); dataLabels.push(replace(dataLabel, { name: name_1, value: value.join(middleSeparator_1) })); } } seriesLabel += dataLabels.join(middleSeparator_1) + endSeparator_1; seriesLabels_1.push(seriesLabel); } }); var separatorModel = labelModel.getModel(['series', 'multiple', 'separator']); var middleSeparator = separatorModel.get('middle'); var endSeparator = separatorModel.get('end'); ariaLabel += seriesLabels_1.join(middleSeparator) + endSeparator; dom.setAttribute('aria-label', ariaLabel); } } function replace(str, keyValues) { if (!core_util["isString"](str)) { return str; } var result = str; core_util["each"](keyValues, function (value, key) { result = result.replace(new RegExp('\\{\\s*' + key + '\\s*\\}', 'g'), value); }); return result; } function getTitle() { var title = ecModel.get('title'); if (title && title.length) { title = title[0]; } return title && title.text; } function getSeriesTypeName(type) { var typeNames = ecModel.getLocaleModel().get(['series', 'typeNames']); return typeNames[type] || typeNames.chart; } } // CONCATENATED MODULE: ./node_modules/echarts/lib/component/aria/preprocessor.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 ariaPreprocessor(option) { if (!option || !option.aria) { return; } var aria = option.aria; // aria.show is deprecated and should use aria.enabled instead if (aria.show != null) { aria.enabled = aria.show; } aria.label = aria.label || {}; // move description, general, series, data to be under aria.label core_util["each"](['description', 'general', 'series', 'data'], function (name) { if (aria[name] != null) { aria.label[name] = aria[name]; } }); } // CONCATENATED MODULE: ./node_modules/echarts/lib/component/aria/install.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 aria_install_install(registers) { registers.registerPreprocessor(ariaPreprocessor); registers.registerVisual(registers.PRIORITY.VISUAL.ARIA, ariaVisual); } // CONCATENATED MODULE: ./node_modules/echarts/lib/util/conditionalExpression.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 RELATIONAL_EXPRESSION_OP_ALIAS_MAP = { value: 'eq', // PENDING: not good for literal semantic? '<': 'lt', '<=': 'lte', '>': 'gt', '>=': 'gte', '=': 'eq', '!=': 'ne', '<>': 'ne' // Might be misleading for sake of the difference between '==' and '===', // so don't support them. // '==': 'eq', // '===': 'seq', // '!==': 'sne' // PENDING: Whether support some common alias "ge", "le", "neq"? // ge: 'gte', // le: 'lte', // neq: 'ne', }; // type RelationalExpressionOpEvaluate = (tarVal: unknown, condVal: unknown) => boolean; var conditionalExpression_RegExpEvaluator = /** @class */function () { function RegExpEvaluator(rVal) { // Support condVal: RegExp | string var condValue = this._condVal = Object(core_util["isString"])(rVal) ? new RegExp(rVal) : Object(core_util["isRegExp"])(rVal) ? rVal : null; if (condValue == null) { var errMsg = ''; if (false) { errMsg = makePrintable('Illegal regexp', rVal, 'in'); } throwError(errMsg); } } RegExpEvaluator.prototype.evaluate = function (lVal) { var type = typeof lVal; return Object(core_util["isString"])(type) ? this._condVal.test(lVal) : Object(core_util["isNumber"])(type) ? this._condVal.test(lVal + '') : false; }; return RegExpEvaluator; }(); var ConstConditionInternal = /** @class */function () { function ConstConditionInternal() {} ConstConditionInternal.prototype.evaluate = function () { return this.value; }; return ConstConditionInternal; }(); var AndConditionInternal = /** @class */function () { function AndConditionInternal() {} AndConditionInternal.prototype.evaluate = function () { var children = this.children; for (var i = 0; i < children.length; i++) { if (!children[i].evaluate()) { return false; } } return true; }; return AndConditionInternal; }(); var OrConditionInternal = /** @class */function () { function OrConditionInternal() {} OrConditionInternal.prototype.evaluate = function () { var children = this.children; for (var i = 0; i < children.length; i++) { if (children[i].evaluate()) { return true; } } return false; }; return OrConditionInternal; }(); var NotConditionInternal = /** @class */function () { function NotConditionInternal() {} NotConditionInternal.prototype.evaluate = function () { return !this.child.evaluate(); }; return NotConditionInternal; }(); var RelationalConditionInternal = /** @class */function () { function RelationalConditionInternal() {} RelationalConditionInternal.prototype.evaluate = function () { var needParse = !!this.valueParser; // Call getValue with no `this`. var getValue = this.getValue; var tarValRaw = getValue(this.valueGetterParam); var tarValParsed = needParse ? this.valueParser(tarValRaw) : null; // Relational cond follow "and" logic internally. for (var i = 0; i < this.subCondList.length; i++) { if (!this.subCondList[i].evaluate(needParse ? tarValParsed : tarValRaw)) { return false; } } return true; }; return RelationalConditionInternal; }(); function parseOption(exprOption, getters) { if (exprOption === true || exprOption === false) { var cond = new ConstConditionInternal(); cond.value = exprOption; return cond; } var errMsg = ''; if (!isObjectNotArray(exprOption)) { if (false) { errMsg = makePrintable('Illegal config. Expect a plain object but actually', exprOption); } throwError(errMsg); } if (exprOption.and) { return parseAndOrOption('and', exprOption, getters); } else if (exprOption.or) { return parseAndOrOption('or', exprOption, getters); } else if (exprOption.not) { return parseNotOption(exprOption, getters); } return parseRelationalOption(exprOption, getters); } function parseAndOrOption(op, exprOption, getters) { var subOptionArr = exprOption[op]; var errMsg = ''; if (false) { errMsg = makePrintable('"and"/"or" condition should only be `' + op + ': [...]` and must not be empty array.', 'Illegal condition:', exprOption); } if (!Object(core_util["isArray"])(subOptionArr)) { throwError(errMsg); } if (!subOptionArr.length) { throwError(errMsg); } var cond = op === 'and' ? new AndConditionInternal() : new OrConditionInternal(); cond.children = Object(core_util["map"])(subOptionArr, function (subOption) { return parseOption(subOption, getters); }); if (!cond.children.length) { throwError(errMsg); } return cond; } function parseNotOption(exprOption, getters) { var subOption = exprOption.not; var errMsg = ''; if (false) { errMsg = makePrintable('"not" condition should only be `not: {}`.', 'Illegal condition:', exprOption); } if (!isObjectNotArray(subOption)) { throwError(errMsg); } var cond = new NotConditionInternal(); cond.child = parseOption(subOption, getters); if (!cond.child) { throwError(errMsg); } return cond; } function parseRelationalOption(exprOption, getters) { var errMsg = ''; var valueGetterParam = getters.prepareGetValue(exprOption); var subCondList = []; var exprKeys = Object(core_util["keys"])(exprOption); var parserName = exprOption.parser; var valueParser = parserName ? getRawValueParser(parserName) : null; for (var i = 0; i < exprKeys.length; i++) { var keyRaw = exprKeys[i]; if (keyRaw === 'parser' || getters.valueGetterAttrMap.get(keyRaw)) { continue; } var op = Object(core_util["hasOwn"])(RELATIONAL_EXPRESSION_OP_ALIAS_MAP, keyRaw) ? RELATIONAL_EXPRESSION_OP_ALIAS_MAP[keyRaw] : keyRaw; var condValueRaw = exprOption[keyRaw]; var condValueParsed = valueParser ? valueParser(condValueRaw) : condValueRaw; var evaluator = createFilterComparator(op, condValueParsed) || op === 'reg' && new conditionalExpression_RegExpEvaluator(condValueParsed); if (!evaluator) { if (false) { errMsg = makePrintable('Illegal relational operation: "' + keyRaw + '" in condition:', exprOption); } throwError(errMsg); } subCondList.push(evaluator); } if (!subCondList.length) { if (false) { errMsg = makePrintable('Relational condition must have at least one operator.', 'Illegal condition:', exprOption); } // No relational operator always disabled in case of dangers result. throwError(errMsg); } var cond = new RelationalConditionInternal(); cond.valueGetterParam = valueGetterParam; cond.valueParser = valueParser; cond.getValue = getters.getValue; cond.subCondList = subCondList; return cond; } function isObjectNotArray(val) { return Object(core_util["isObject"])(val) && !Object(core_util["isArrayLike"])(val); } var ConditionalExpressionParsed = /** @class */function () { function ConditionalExpressionParsed(exprOption, getters) { this._cond = parseOption(exprOption, getters); } ConditionalExpressionParsed.prototype.evaluate = function () { return this._cond.evaluate(); }; return ConditionalExpressionParsed; }(); ; function parseConditionalExpression(exprOption, getters) { return new ConditionalExpressionParsed(exprOption, getters); } // CONCATENATED MODULE: ./node_modules/echarts/lib/component/transform/filterTransform.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 filterTransform = { type: 'echarts:filter', // PENDING: enhance to filter by index rather than create new data transform: function (params) { // [Caveat] Fail-Fast: // Do not return the whole dataset unless user config indicates it explicitly. // For example, if no condition is specified by mistake, returning an empty result // is better than returning the entire raw source for the user to find the mistake. var upstream = params.upstream; var rawItem; var condition = parseConditionalExpression(params.config, { valueGetterAttrMap: Object(core_util["createHashMap"])({ dimension: true }), prepareGetValue: function (exprOption) { var errMsg = ''; var dimLoose = exprOption.dimension; if (!Object(core_util["hasOwn"])(exprOption, 'dimension')) { if (false) { errMsg = makePrintable('Relation condition must has prop "dimension" specified.', 'Illegal condition:', exprOption); } throwError(errMsg); } var dimInfo = upstream.getDimensionInfo(dimLoose); if (!dimInfo) { if (false) { errMsg = makePrintable('Can not find dimension info via: ' + dimLoose + '.\n', 'Existing dimensions: ', upstream.cloneAllDimensionInfo(), '.\n', 'Illegal condition:', exprOption, '.\n'); } throwError(errMsg); } return { dimIdx: dimInfo.index }; }, getValue: function (param) { return upstream.retrieveValueFromItem(rawItem, param.dimIdx); } }); var resultData = []; for (var i = 0, len = upstream.count(); i < len; i++) { rawItem = upstream.getRawDataItem(i); if (condition.evaluate()) { resultData.push(rawItem); } } return { data: resultData }; } }; // CONCATENATED MODULE: ./node_modules/echarts/lib/component/transform/sortTransform.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 sampleLog = ''; if (false) { sampleLog = ['Valid config is like:', '{ dimension: "age", order: "asc" }', 'or [{ dimension: "age", order: "asc"], { dimension: "date", order: "desc" }]'].join(' '); } var sortTransform = { type: 'echarts:sort', transform: function (params) { var upstream = params.upstream; var config = params.config; var errMsg = ''; // Normalize // const orderExprList: OrderExpression[] = isArray(config[0]) // ? config as OrderExpression[] // : [config as OrderExpression]; var orderExprList = normalizeToArray(config); if (!orderExprList.length) { if (false) { errMsg = 'Empty `config` in sort transform.'; } throwError(errMsg); } var orderDefList = []; Object(core_util["each"])(orderExprList, function (orderExpr) { var dimLoose = orderExpr.dimension; var order = orderExpr.order; var parserName = orderExpr.parser; var incomparable = orderExpr.incomparable; if (dimLoose == null) { if (false) { errMsg = 'Sort transform config must has "dimension" specified.' + sampleLog; } throwError(errMsg); } if (order !== 'asc' && order !== 'desc') { if (false) { errMsg = 'Sort transform config must has "order" specified.' + sampleLog; } throwError(errMsg); } if (incomparable && incomparable !== 'min' && incomparable !== 'max') { var errMsg_1 = ''; if (false) { errMsg_1 = 'incomparable must be "min" or "max" rather than "' + incomparable + '".'; } throwError(errMsg_1); } if (order !== 'asc' && order !== 'desc') { var errMsg_2 = ''; if (false) { errMsg_2 = 'order must be "asc" or "desc" rather than "' + order + '".'; } throwError(errMsg_2); } var dimInfo = upstream.getDimensionInfo(dimLoose); if (!dimInfo) { if (false) { errMsg = makePrintable('Can not find dimension info via: ' + dimLoose + '.\n', 'Existing dimensions: ', upstream.cloneAllDimensionInfo(), '.\n', 'Illegal config:', orderExpr, '.\n'); } throwError(errMsg); } var parser = parserName ? getRawValueParser(parserName) : null; if (parserName && !parser) { if (false) { errMsg = makePrintable('Invalid parser name ' + parserName + '.\n', 'Illegal config:', orderExpr, '.\n'); } throwError(errMsg); } orderDefList.push({ dimIdx: dimInfo.index, parser: parser, comparator: new dataValueHelper_SortOrderComparator(order, incomparable) }); }); // TODO: support it? var sourceFormat = upstream.sourceFormat; if (sourceFormat !== SOURCE_FORMAT_ARRAY_ROWS && sourceFormat !== SOURCE_FORMAT_OBJECT_ROWS) { if (false) { errMsg = 'sourceFormat "' + sourceFormat + '" is not supported yet'; } throwError(errMsg); } // Other upstream format are all array. var resultData = []; for (var i = 0, len = upstream.count(); i < len; i++) { resultData.push(upstream.getRawDataItem(i)); } resultData.sort(function (item0, item1) { for (var i = 0; i < orderDefList.length; i++) { var orderDef = orderDefList[i]; var val0 = upstream.retrieveValueFromItem(item0, orderDef.dimIdx); var val1 = upstream.retrieveValueFromItem(item1, orderDef.dimIdx); if (orderDef.parser) { val0 = orderDef.parser(val0); val1 = orderDef.parser(val1); } var result = orderDef.comparator.evaluate(val0, val1); if (result !== 0) { return result; } } return 0; }); return { data: resultData }; } }; // CONCATENATED MODULE: ./node_modules/echarts/lib/component/transform/install.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 transform_install_install(registers) { registers.registerTransform(filterTransform); registers.registerTransform(sortTransform); } // CONCATENATED MODULE: ./node_modules/echarts/lib/component/dataset/install.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ var install_DatasetModel = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(DatasetModel, _super); function DatasetModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = 'dataset'; return _this; } DatasetModel.prototype.init = function (option, parentModel, ecModel) { _super.prototype.init.call(this, option, parentModel, ecModel); this._sourceManager = new sourceManager_SourceManager(this); disableTransformOptionMerge(this); }; DatasetModel.prototype.mergeOption = function (newOption, ecModel) { _super.prototype.mergeOption.call(this, newOption, ecModel); disableTransformOptionMerge(this); }; DatasetModel.prototype.optionUpdated = function () { this._sourceManager.dirty(); }; DatasetModel.prototype.getSourceManager = function () { return this._sourceManager; }; DatasetModel.type = 'dataset'; DatasetModel.defaultOption = { seriesLayoutBy: SERIES_LAYOUT_BY_COLUMN }; return DatasetModel; }(Component); var install_DatasetView = /** @class */function (_super) { Object(tslib_es6["b" /* __extends */])(DatasetView, _super); function DatasetView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = 'dataset'; return _this; } DatasetView.type = 'dataset'; return DatasetView; }(view_Component); function dataset_install_install(registers) { registers.registerComponentModel(install_DatasetModel); registers.registerComponentView(install_DatasetView); } // CONCATENATED MODULE: ./node_modules/echarts/lib/export/components.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ // CONCATENATED MODULE: ./node_modules/zrender/lib/tool/convertPath.js var convertPath_CMD = core_PathProxy.CMD; function aroundEqual(a, b) { return Math.abs(a - b) < 1e-5; } function pathToBezierCurves(path) { var data = path.data; var len = path.len(); var bezierArrayGroups = []; var currentSubpath; var xi = 0; var yi = 0; var x0 = 0; var y0 = 0; function createNewSubpath(x, y) { if (currentSubpath && currentSubpath.length > 2) { bezierArrayGroups.push(currentSubpath); } currentSubpath = [x, y]; } function addLine(x0, y0, x1, y1) { if (!(aroundEqual(x0, x1) && aroundEqual(y0, y1))) { currentSubpath.push(x0, y0, x1, y1, x1, y1); } } function addArc(startAngle, endAngle, cx, cy, rx, ry) { var delta = Math.abs(endAngle - startAngle); var len = Math.tan(delta / 4) * 4 / 3; var dir = endAngle < startAngle ? -1 : 1; var c1 = Math.cos(startAngle); var s1 = Math.sin(startAngle); var c2 = Math.cos(endAngle); var s2 = Math.sin(endAngle); var x1 = c1 * rx + cx; var y1 = s1 * ry + cy; var x4 = c2 * rx + cx; var y4 = s2 * ry + cy; var hx = rx * len * dir; var hy = ry * len * dir; currentSubpath.push(x1 - hx * s1, y1 + hy * c1, x4 + hx * s2, y4 - hy * c2, x4, y4); } var x1; var y1; var x2; var y2; for (var i = 0; i < len;) { var cmd = data[i++]; var isFirst = i === 1; if (isFirst) { xi = data[i]; yi = data[i + 1]; x0 = xi; y0 = yi; if (cmd === convertPath_CMD.L || cmd === convertPath_CMD.C || cmd === convertPath_CMD.Q) { currentSubpath = [x0, y0]; } } switch (cmd) { case convertPath_CMD.M: xi = x0 = data[i++]; yi = y0 = data[i++]; createNewSubpath(x0, y0); break; case convertPath_CMD.L: x1 = data[i++]; y1 = data[i++]; addLine(xi, yi, x1, y1); xi = x1; yi = y1; break; case convertPath_CMD.C: currentSubpath.push(data[i++], data[i++], data[i++], data[i++], xi = data[i++], yi = data[i++]); break; case convertPath_CMD.Q: x1 = data[i++]; y1 = data[i++]; x2 = data[i++]; y2 = data[i++]; currentSubpath.push(xi + 2 / 3 * (x1 - xi), yi + 2 / 3 * (y1 - yi), x2 + 2 / 3 * (x1 - x2), y2 + 2 / 3 * (y1 - y2), x2, y2); xi = x2; yi = y2; break; case convertPath_CMD.A: 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; i += 1; var anticlockwise = !data[i++]; x1 = Math.cos(startAngle) * rx + cx; y1 = Math.sin(startAngle) * ry + cy; if (isFirst) { x0 = x1; y0 = y1; createNewSubpath(x0, y0); } else { addLine(xi, yi, x1, y1); } xi = Math.cos(endAngle) * rx + cx; yi = Math.sin(endAngle) * ry + cy; var step = (anticlockwise ? -1 : 1) * Math.PI / 2; for (var angle = startAngle; anticlockwise ? angle > endAngle : angle < endAngle; angle += step) { var nextAngle = anticlockwise ? Math.max(angle + step, endAngle) : Math.min(angle + step, endAngle); addArc(angle, nextAngle, cx, cy, rx, ry); } break; case convertPath_CMD.R: x0 = xi = data[i++]; y0 = yi = data[i++]; x1 = x0 + data[i++]; y1 = y0 + data[i++]; createNewSubpath(x1, y0); addLine(x1, y0, x1, y1); addLine(x1, y1, x0, y1); addLine(x0, y1, x0, y0); addLine(x0, y0, x1, y0); break; case convertPath_CMD.Z: currentSubpath && addLine(xi, yi, x0, y0); xi = x0; yi = y0; break; } } if (currentSubpath && currentSubpath.length > 2) { bezierArrayGroups.push(currentSubpath); } return bezierArrayGroups; } function adpativeBezier(x0, y0, x1, y1, x2, y2, x3, y3, out, scale) { if (aroundEqual(x0, x1) && aroundEqual(y0, y1) && aroundEqual(x2, x3) && aroundEqual(y2, y3)) { out.push(x3, y3); return; } var PIXEL_DISTANCE = 2 / scale; var PIXEL_DISTANCE_SQR = PIXEL_DISTANCE * PIXEL_DISTANCE; var dx = x3 - x0; var dy = y3 - y0; var d = Math.sqrt(dx * dx + dy * dy); dx /= d; dy /= d; var dx1 = x1 - x0; var dy1 = y1 - y0; var dx2 = x2 - x3; var dy2 = y2 - y3; var cp1LenSqr = dx1 * dx1 + dy1 * dy1; var cp2LenSqr = dx2 * dx2 + dy2 * dy2; if (cp1LenSqr < PIXEL_DISTANCE_SQR && cp2LenSqr < PIXEL_DISTANCE_SQR) { out.push(x3, y3); return; } var projLen1 = dx * dx1 + dy * dy1; var projLen2 = -dx * dx2 - dy * dy2; var d1Sqr = cp1LenSqr - projLen1 * projLen1; var d2Sqr = cp2LenSqr - projLen2 * projLen2; if (d1Sqr < PIXEL_DISTANCE_SQR && projLen1 >= 0 && d2Sqr < PIXEL_DISTANCE_SQR && projLen2 >= 0) { out.push(x3, y3); return; } var tmpSegX = []; var tmpSegY = []; cubicSubdivide(x0, x1, x2, x3, 0.5, tmpSegX); cubicSubdivide(y0, y1, y2, y3, 0.5, tmpSegY); adpativeBezier(tmpSegX[0], tmpSegY[0], tmpSegX[1], tmpSegY[1], tmpSegX[2], tmpSegY[2], tmpSegX[3], tmpSegY[3], out, scale); adpativeBezier(tmpSegX[4], tmpSegY[4], tmpSegX[5], tmpSegY[5], tmpSegX[6], tmpSegY[6], tmpSegX[7], tmpSegY[7], out, scale); } function pathToPolygons(path, scale) { var bezierArrayGroups = pathToBezierCurves(path); var polygons = []; scale = scale || 1; for (var i = 0; i < bezierArrayGroups.length; i++) { var beziers = bezierArrayGroups[i]; var polygon = []; var x0 = beziers[0]; var y0 = beziers[1]; polygon.push(x0, y0); for (var k = 2; k < beziers.length;) { var x1 = beziers[k++]; var y1 = beziers[k++]; var x2 = beziers[k++]; var y2 = beziers[k++]; var x3 = beziers[k++]; var y3 = beziers[k++]; adpativeBezier(x0, y0, x1, y1, x2, y2, x3, y3, polygon, scale); x0 = x3; y0 = y3; } polygons.push(polygon); } return polygons; } // CONCATENATED MODULE: ./node_modules/zrender/lib/tool/dividePath.js function getDividingGrids(dimSize, rowDim, count) { var rowSize = dimSize[rowDim]; var columnSize = dimSize[1 - rowDim]; var ratio = Math.abs(rowSize / columnSize); var rowCount = Math.ceil(Math.sqrt(ratio * count)); var columnCount = Math.floor(count / rowCount); if (columnCount === 0) { columnCount = 1; rowCount = count; } var grids = []; for (var i = 0; i < rowCount; i++) { grids.push(columnCount); } var currentCount = rowCount * columnCount; var remained = count - currentCount; if (remained > 0) { for (var i = 0; i < remained; i++) { grids[i % rowCount] += 1; } } return grids; } function divideSector(sectorShape, count, outShapes) { var r0 = sectorShape.r0; var r = sectorShape.r; var startAngle = sectorShape.startAngle; var endAngle = sectorShape.endAngle; var angle = Math.abs(endAngle - startAngle); var arcLen = angle * r; var deltaR = r - r0; var isAngleRow = arcLen > Math.abs(deltaR); var grids = getDividingGrids([arcLen, deltaR], isAngleRow ? 0 : 1, count); var rowSize = (isAngleRow ? angle : deltaR) / grids.length; for (var row = 0; row < grids.length; row++) { var columnSize = (isAngleRow ? deltaR : angle) / grids[row]; for (var column = 0; column < grids[row]; column++) { var newShape = {}; if (isAngleRow) { newShape.startAngle = startAngle + rowSize * row; newShape.endAngle = startAngle + rowSize * (row + 1); newShape.r0 = r0 + columnSize * column; newShape.r = r0 + columnSize * (column + 1); } else { newShape.startAngle = startAngle + columnSize * column; newShape.endAngle = startAngle + columnSize * (column + 1); newShape.r0 = r0 + rowSize * row; newShape.r = r0 + rowSize * (row + 1); } newShape.clockwise = sectorShape.clockwise; newShape.cx = sectorShape.cx; newShape.cy = sectorShape.cy; outShapes.push(newShape); } } } function divideRect(rectShape, count, outShapes) { var width = rectShape.width; var height = rectShape.height; var isHorizontalRow = width > height; var grids = getDividingGrids([width, height], isHorizontalRow ? 0 : 1, count); var rowSizeDim = isHorizontalRow ? 'width' : 'height'; var columnSizeDim = isHorizontalRow ? 'height' : 'width'; var rowDim = isHorizontalRow ? 'x' : 'y'; var columnDim = isHorizontalRow ? 'y' : 'x'; var rowSize = rectShape[rowSizeDim] / grids.length; for (var row = 0; row < grids.length; row++) { var columnSize = rectShape[columnSizeDim] / grids[row]; for (var column = 0; column < grids[row]; column++) { var newShape = {}; newShape[rowDim] = row * rowSize; newShape[columnDim] = column * columnSize; newShape[rowSizeDim] = rowSize; newShape[columnSizeDim] = columnSize; newShape.x += rectShape.x; newShape.y += rectShape.y; outShapes.push(newShape); } } } function dividePath_crossProduct2d(x1, y1, x2, y2) { return x1 * y2 - x2 * y1; } function dividePath_lineLineIntersect(a1x, a1y, a2x, a2y, b1x, b1y, b2x, b2y) { var mx = a2x - a1x; var my = a2y - a1y; var nx = b2x - b1x; var ny = b2y - b1y; var nmCrossProduct = dividePath_crossProduct2d(nx, ny, mx, my); if (Math.abs(nmCrossProduct) < 1e-6) { return null; } var b1a1x = a1x - b1x; var b1a1y = a1y - b1y; var p = dividePath_crossProduct2d(b1a1x, b1a1y, nx, ny) / nmCrossProduct; if (p < 0 || p > 1) { return null; } return new core_Point(p * mx + a1x, p * my + a1y); } function projPtOnLine(pt, lineA, lineB) { var dir = new core_Point(); core_Point.sub(dir, lineB, lineA); dir.normalize(); var dir2 = new core_Point(); core_Point.sub(dir2, pt, lineA); var len = dir2.dot(dir); return len; } function addToPoly(poly, pt) { var last = poly[poly.length - 1]; if (last && last[0] === pt[0] && last[1] === pt[1]) { return; } poly.push(pt); } function splitPolygonByLine(points, lineA, lineB) { var len = points.length; var intersections = []; for (var i = 0; i < len; i++) { var p0 = points[i]; var p1 = points[(i + 1) % len]; var intersectionPt = dividePath_lineLineIntersect(p0[0], p0[1], p1[0], p1[1], lineA.x, lineA.y, lineB.x, lineB.y); if (intersectionPt) { intersections.push({ projPt: projPtOnLine(intersectionPt, lineA, lineB), pt: intersectionPt, idx: i }); } } if (intersections.length < 2) { return [{ points: points }, { points: points }]; } intersections.sort(function (a, b) { return a.projPt - b.projPt; }); var splitPt0 = intersections[0]; var splitPt1 = intersections[intersections.length - 1]; if (splitPt1.idx < splitPt0.idx) { var tmp = splitPt0; splitPt0 = splitPt1; splitPt1 = tmp; } var splitPt0Arr = [splitPt0.pt.x, splitPt0.pt.y]; var splitPt1Arr = [splitPt1.pt.x, splitPt1.pt.y]; var newPolyA = [splitPt0Arr]; var newPolyB = [splitPt1Arr]; for (var i = splitPt0.idx + 1; i <= splitPt1.idx; i++) { addToPoly(newPolyA, points[i].slice()); } addToPoly(newPolyA, splitPt1Arr); addToPoly(newPolyA, splitPt0Arr); for (var i = splitPt1.idx + 1; i <= splitPt0.idx + len; i++) { addToPoly(newPolyB, points[i % len].slice()); } addToPoly(newPolyB, splitPt0Arr); addToPoly(newPolyB, splitPt1Arr); return [{ points: newPolyA }, { points: newPolyB }]; } function binaryDividePolygon(polygonShape) { var points = polygonShape.points; var min = []; var max = []; fromPoints(points, min, max); var boundingRect = new core_BoundingRect(min[0], min[1], max[0] - min[0], max[1] - min[1]); var width = boundingRect.width; var height = boundingRect.height; var x = boundingRect.x; var y = boundingRect.y; var pt0 = new core_Point(); var pt1 = new core_Point(); if (width > height) { pt0.x = pt1.x = x + width / 2; pt0.y = y; pt1.y = y + height; } else { pt0.y = pt1.y = y + height / 2; pt0.x = x; pt1.x = x + width; } return splitPolygonByLine(points, pt0, pt1); } function binaryDivideRecursive(divider, shape, count, out) { if (count === 1) { out.push(shape); } else { var mid = Math.floor(count / 2); var sub = divider(shape); binaryDivideRecursive(divider, sub[0], mid, out); binaryDivideRecursive(divider, sub[1], count - mid, out); } return out; } function dividePath_clone(path, count) { var paths = []; for (var i = 0; i < count; i++) { paths.push(clonePath(path)); } return paths; } function copyPathProps(source, target) { target.setStyle(source.style); target.z = source.z; target.z2 = source.z2; target.zlevel = source.zlevel; } function polygonConvert(points) { var out = []; for (var i = 0; i < points.length;) { out.push([points[i++], points[i++]]); } return out; } function split(path, count) { var outShapes = []; var shape = path.shape; var OutShapeCtor; switch (path.type) { case 'rect': divideRect(shape, count, outShapes); OutShapeCtor = shape_Rect; break; case 'sector': divideSector(shape, count, outShapes); OutShapeCtor = shape_Sector; break; case 'circle': divideSector({ r0: 0, r: shape.r, startAngle: 0, endAngle: Math.PI * 2, cx: shape.cx, cy: shape.cy }, count, outShapes); OutShapeCtor = shape_Sector; break; default: var m = path.getComputedTransform(); var scale = m ? Math.sqrt(Math.max(m[0] * m[0] + m[1] * m[1], m[2] * m[2] + m[3] * m[3])) : 1; var polygons = Object(core_util["map"])(pathToPolygons(path.getUpdatedPathProxy(), scale), function (poly) { return polygonConvert(poly); }); var polygonCount = polygons.length; if (polygonCount === 0) { binaryDivideRecursive(binaryDividePolygon, { points: polygons[0] }, count, outShapes); } else if (polygonCount === count) { for (var i = 0; i < polygonCount; i++) { outShapes.push({ points: polygons[i] }); } } else { var totalArea_1 = 0; var items = Object(core_util["map"])(polygons, function (poly) { var min = []; var max = []; fromPoints(poly, min, max); var area = (max[1] - min[1]) * (max[0] - min[0]); totalArea_1 += area; return { poly: poly, area: area }; }); items.sort(function (a, b) { return b.area - a.area; }); var left = count; for (var i = 0; i < polygonCount; i++) { var item = items[i]; if (left <= 0) { break; } var selfCount = i === polygonCount - 1 ? left : Math.ceil(item.area / totalArea_1 * count); if (selfCount < 0) { continue; } binaryDivideRecursive(binaryDividePolygon, { points: item.poly }, selfCount, outShapes); left -= selfCount; } ; } OutShapeCtor = shape_Polygon; break; } if (!OutShapeCtor) { return dividePath_clone(path, count); } var out = []; for (var i = 0; i < outShapes.length; i++) { var subPath = new OutShapeCtor(); subPath.setShape(outShapes[i]); copyPathProps(path, subPath); out.push(subPath); } return out; } // CONCATENATED MODULE: ./node_modules/zrender/lib/tool/morphPath.js function alignSubpath(subpath1, subpath2) { var len1 = subpath1.length; var len2 = subpath2.length; if (len1 === len2) { return [subpath1, subpath2]; } var tmpSegX = []; var tmpSegY = []; var shorterPath = len1 < len2 ? subpath1 : subpath2; var shorterLen = Math.min(len1, len2); var diff = Math.abs(len2 - len1) / 6; var shorterBezierCount = (shorterLen - 2) / 6; var eachCurveSubDivCount = Math.ceil(diff / shorterBezierCount) + 1; var newSubpath = [shorterPath[0], shorterPath[1]]; var remained = diff; for (var i = 2; i < shorterLen;) { var x0 = shorterPath[i - 2]; var y0 = shorterPath[i - 1]; var x1 = shorterPath[i++]; var y1 = shorterPath[i++]; var x2 = shorterPath[i++]; var y2 = shorterPath[i++]; var x3 = shorterPath[i++]; var y3 = shorterPath[i++]; if (remained <= 0) { newSubpath.push(x1, y1, x2, y2, x3, y3); continue; } var actualSubDivCount = Math.min(remained, eachCurveSubDivCount - 1) + 1; for (var k = 1; k <= actualSubDivCount; k++) { var p = k / actualSubDivCount; cubicSubdivide(x0, x1, x2, x3, p, tmpSegX); cubicSubdivide(y0, y1, y2, y3, p, tmpSegY); x0 = tmpSegX[3]; y0 = tmpSegY[3]; newSubpath.push(tmpSegX[1], tmpSegY[1], tmpSegX[2], tmpSegY[2], x0, y0); x1 = tmpSegX[5]; y1 = tmpSegY[5]; x2 = tmpSegX[6]; y2 = tmpSegY[6]; } remained -= actualSubDivCount - 1; } return shorterPath === subpath1 ? [newSubpath, subpath2] : [subpath1, newSubpath]; } function createSubpath(lastSubpathSubpath, otherSubpath) { var len = lastSubpathSubpath.length; var lastX = lastSubpathSubpath[len - 2]; var lastY = lastSubpathSubpath[len - 1]; var newSubpath = []; for (var i = 0; i < otherSubpath.length;) { newSubpath[i++] = lastX; newSubpath[i++] = lastY; } return newSubpath; } function alignBezierCurves(array1, array2) { var _a; var lastSubpath1; var lastSubpath2; var newArray1 = []; var newArray2 = []; for (var i = 0; i < Math.max(array1.length, array2.length); i++) { var subpath1 = array1[i]; var subpath2 = array2[i]; var newSubpath1 = void 0; var newSubpath2 = void 0; if (!subpath1) { newSubpath1 = createSubpath(lastSubpath1 || subpath2, subpath2); newSubpath2 = subpath2; } else if (!subpath2) { newSubpath2 = createSubpath(lastSubpath2 || subpath1, subpath1); newSubpath1 = subpath1; } else { _a = alignSubpath(subpath1, subpath2), newSubpath1 = _a[0], newSubpath2 = _a[1]; lastSubpath1 = newSubpath1; lastSubpath2 = newSubpath2; } newArray1.push(newSubpath1); newArray2.push(newSubpath2); } return [newArray1, newArray2]; } function morphPath_centroid(array) { var signedArea = 0; var cx = 0; var cy = 0; var len = array.length; for (var i = 0, j = len - 2; i < len; j = i, i += 2) { var x0 = array[j]; var y0 = array[j + 1]; var x1 = array[i]; var y1 = array[i + 1]; var a = x0 * y1 - x1 * y0; signedArea += a; cx += (x0 + x1) * a; cy += (y0 + y1) * a; } if (signedArea === 0) { return [array[0] || 0, array[1] || 0]; } return [cx / signedArea / 3, cy / signedArea / 3, signedArea]; } function findBestRingOffset(fromSubBeziers, toSubBeziers, fromCp, toCp) { var bezierCount = (fromSubBeziers.length - 2) / 6; var bestScore = Infinity; var bestOffset = 0; var len = fromSubBeziers.length; var len2 = len - 2; for (var offset = 0; offset < bezierCount; offset++) { var cursorOffset = offset * 6; var score = 0; for (var k = 0; k < len; k += 2) { var idx = k === 0 ? cursorOffset : ((cursorOffset + k - 2) % len2 + 2); var x0 = fromSubBeziers[idx] - fromCp[0]; var y0 = fromSubBeziers[idx + 1] - fromCp[1]; var x1 = toSubBeziers[k] - toCp[0]; var y1 = toSubBeziers[k + 1] - toCp[1]; var dx = x1 - x0; var dy = y1 - y0; score += dx * dx + dy * dy; } if (score < bestScore) { bestScore = score; bestOffset = offset; } } return bestOffset; } function morphPath_reverse(array) { var newArr = []; var len = array.length; for (var i = 0; i < len; i += 2) { newArr[i] = array[len - i - 2]; newArr[i + 1] = array[len - i - 1]; } return newArr; } function findBestMorphingRotation(fromArr, toArr, searchAngleIteration, searchAngleRange) { var result = []; var fromNeedsReverse; for (var i = 0; i < fromArr.length; i++) { var fromSubpathBezier = fromArr[i]; var toSubpathBezier = toArr[i]; var fromCp = morphPath_centroid(fromSubpathBezier); var toCp = morphPath_centroid(toSubpathBezier); if (fromNeedsReverse == null) { fromNeedsReverse = fromCp[2] < 0 !== toCp[2] < 0; } var newFromSubpathBezier = []; var newToSubpathBezier = []; var bestAngle = 0; var bestScore = Infinity; var tmpArr = []; var len = fromSubpathBezier.length; if (fromNeedsReverse) { fromSubpathBezier = morphPath_reverse(fromSubpathBezier); } var offset = findBestRingOffset(fromSubpathBezier, toSubpathBezier, fromCp, toCp) * 6; var len2 = len - 2; for (var k = 0; k < len2; k += 2) { var idx = (offset + k) % len2 + 2; newFromSubpathBezier[k + 2] = fromSubpathBezier[idx] - fromCp[0]; newFromSubpathBezier[k + 3] = fromSubpathBezier[idx + 1] - fromCp[1]; } newFromSubpathBezier[0] = fromSubpathBezier[offset] - fromCp[0]; newFromSubpathBezier[1] = fromSubpathBezier[offset + 1] - fromCp[1]; if (searchAngleIteration > 0) { var step = searchAngleRange / searchAngleIteration; for (var angle = -searchAngleRange / 2; angle <= searchAngleRange / 2; angle += step) { var sa = Math.sin(angle); var ca = Math.cos(angle); var score = 0; for (var k = 0; k < fromSubpathBezier.length; k += 2) { var x0 = newFromSubpathBezier[k]; var y0 = newFromSubpathBezier[k + 1]; var x1 = toSubpathBezier[k] - toCp[0]; var y1 = toSubpathBezier[k + 1] - toCp[1]; var newX1 = x1 * ca - y1 * sa; var newY1 = x1 * sa + y1 * ca; tmpArr[k] = newX1; tmpArr[k + 1] = newY1; var dx = newX1 - x0; var dy = newY1 - y0; score += dx * dx + dy * dy; } if (score < bestScore) { bestScore = score; bestAngle = angle; for (var m = 0; m < tmpArr.length; m++) { newToSubpathBezier[m] = tmpArr[m]; } } } } else { for (var i_1 = 0; i_1 < len; i_1 += 2) { newToSubpathBezier[i_1] = toSubpathBezier[i_1] - toCp[0]; newToSubpathBezier[i_1 + 1] = toSubpathBezier[i_1 + 1] - toCp[1]; } } result.push({ from: newFromSubpathBezier, to: newToSubpathBezier, fromCp: fromCp, toCp: toCp, rotation: -bestAngle }); } return result; } function isCombineMorphing(path) { return path.__isCombineMorphing; } function isMorphing(el) { return el.__morphT >= 0; } var SAVED_METHOD_PREFIX = '__mOriginal_'; function saveAndModifyMethod(obj, methodName, modifiers) { var savedMethodName = SAVED_METHOD_PREFIX + methodName; var originalMethod = obj[savedMethodName] || obj[methodName]; if (!obj[savedMethodName]) { obj[savedMethodName] = obj[methodName]; } var replace = modifiers.replace; var after = modifiers.after; var before = modifiers.before; obj[methodName] = function () { var args = arguments; var res; before && before.apply(this, args); if (replace) { res = replace.apply(this, args); } else { res = originalMethod.apply(this, args); } after && after.apply(this, args); return res; }; } function restoreMethod(obj, methodName) { var savedMethodName = SAVED_METHOD_PREFIX + methodName; if (obj[savedMethodName]) { obj[methodName] = obj[savedMethodName]; obj[savedMethodName] = null; } } function applyTransformOnBeziers(bezierCurves, mm) { for (var i = 0; i < bezierCurves.length; i++) { var subBeziers = bezierCurves[i]; for (var k = 0; k < subBeziers.length;) { var x = subBeziers[k]; var y = subBeziers[k + 1]; subBeziers[k++] = mm[0] * x + mm[2] * y + mm[4]; subBeziers[k++] = mm[1] * x + mm[3] * y + mm[5]; } } } function prepareMorphPath(fromPath, toPath) { var fromPathProxy = fromPath.getUpdatedPathProxy(); var toPathProxy = toPath.getUpdatedPathProxy(); var _a = alignBezierCurves(pathToBezierCurves(fromPathProxy), pathToBezierCurves(toPathProxy)), fromBezierCurves = _a[0], toBezierCurves = _a[1]; var fromPathTransform = fromPath.getComputedTransform(); var toPathTransform = toPath.getComputedTransform(); function updateIdentityTransform() { this.transform = null; } fromPathTransform && applyTransformOnBeziers(fromBezierCurves, fromPathTransform); toPathTransform && applyTransformOnBeziers(toBezierCurves, toPathTransform); saveAndModifyMethod(toPath, 'updateTransform', { replace: updateIdentityTransform }); toPath.transform = null; var morphingData = findBestMorphingRotation(fromBezierCurves, toBezierCurves, 10, Math.PI); var tmpArr = []; saveAndModifyMethod(toPath, 'buildPath', { replace: function (path) { var t = toPath.__morphT; var onet = 1 - t; var newCp = []; for (var i = 0; i < morphingData.length; i++) { var item = morphingData[i]; var from = item.from; var to = item.to; var angle = item.rotation * t; var fromCp = item.fromCp; var toCp = item.toCp; var sa = Math.sin(angle); var ca = Math.cos(angle); lerp(newCp, fromCp, toCp, t); for (var m = 0; m < from.length; m += 2) { var x0_1 = from[m]; var y0_1 = from[m + 1]; var x1 = to[m]; var y1 = to[m + 1]; var x = x0_1 * onet + x1 * t; var y = y0_1 * onet + y1 * t; tmpArr[m] = (x * ca - y * sa) + newCp[0]; tmpArr[m + 1] = (x * sa + y * ca) + newCp[1]; } var x0 = tmpArr[0]; var y0 = tmpArr[1]; path.moveTo(x0, y0); for (var m = 2; m < from.length;) { var x1 = tmpArr[m++]; var y1 = tmpArr[m++]; var x2 = tmpArr[m++]; var y2 = tmpArr[m++]; var x3 = tmpArr[m++]; var y3 = tmpArr[m++]; if (x0 === x1 && y0 === y1 && x2 === x3 && y2 === y3) { path.lineTo(x3, y3); } else { path.bezierCurveTo(x1, y1, x2, y2, x3, y3); } x0 = x3; y0 = y3; } } } }); } function morphPath(fromPath, toPath, animationOpts) { if (!fromPath || !toPath) { return toPath; } var oldDone = animationOpts.done; var oldDuring = animationOpts.during; prepareMorphPath(fromPath, toPath); toPath.__morphT = 0; function restoreToPath() { restoreMethod(toPath, 'buildPath'); restoreMethod(toPath, 'updateTransform'); toPath.__morphT = -1; toPath.createPathProxy(); toPath.dirtyShape(); } toPath.animateTo({ __morphT: 1 }, Object(core_util["defaults"])({ during: function (p) { toPath.dirtyShape(); oldDuring && oldDuring(p); }, done: function () { restoreToPath(); oldDone && oldDone(); } }, animationOpts)); return toPath; } function hilbert(x, y, minX, minY, maxX, maxY) { var bits = 16; x = (maxX === minX) ? 0 : Math.round(32767 * (x - minX) / (maxX - minX)); y = (maxY === minY) ? 0 : Math.round(32767 * (y - minY) / (maxY - minY)); var d = 0; var tmp; for (var s = (1 << bits) / 2; s > 0; s /= 2) { var rx = 0; var ry = 0; if ((x & s) > 0) { rx = 1; } if ((y & s) > 0) { ry = 1; } d += s * s * ((3 * rx) ^ ry); if (ry === 0) { if (rx === 1) { x = s - 1 - x; y = s - 1 - y; } tmp = x; x = y; y = tmp; } } return d; } function sortPaths(pathList) { var xMin = Infinity; var yMin = Infinity; var xMax = -Infinity; var yMax = -Infinity; var cps = Object(core_util["map"])(pathList, function (path) { var rect = path.getBoundingRect(); var m = path.getComputedTransform(); var x = rect.x + rect.width / 2 + (m ? m[4] : 0); var y = rect.y + rect.height / 2 + (m ? m[5] : 0); xMin = Math.min(x, xMin); yMin = Math.min(y, yMin); xMax = Math.max(x, xMax); yMax = Math.max(y, yMax); return [x, y]; }); var items = Object(core_util["map"])(cps, function (cp, idx) { return { cp: cp, z: hilbert(cp[0], cp[1], xMin, yMin, xMax, yMax), path: pathList[idx] }; }); return items.sort(function (a, b) { return a.z - b.z; }).map(function (item) { return item.path; }); } ; function defaultDividePath(param) { return split(param.path, param.count); } function createEmptyReturn() { return { fromIndividuals: [], toIndividuals: [], count: 0 }; } function combineMorph(fromList, toPath, animationOpts) { var fromPathList = []; function addFromPath(fromList) { for (var i = 0; i < fromList.length; i++) { var from = fromList[i]; if (isCombineMorphing(from)) { addFromPath(from.childrenRef()); } else if (from instanceof graphic_Path) { fromPathList.push(from); } } } addFromPath(fromList); var separateCount = fromPathList.length; if (!separateCount) { return createEmptyReturn(); } var dividePath = animationOpts.dividePath || defaultDividePath; var toSubPathList = dividePath({ path: toPath, count: separateCount }); if (toSubPathList.length !== separateCount) { console.error('Invalid morphing: unmatched splitted path'); return createEmptyReturn(); } fromPathList = sortPaths(fromPathList); toSubPathList = sortPaths(toSubPathList); var oldDone = animationOpts.done; var oldDuring = animationOpts.during; var individualDelay = animationOpts.individualDelay; var identityTransform = new core_Transformable(); for (var i = 0; i < separateCount; i++) { var from = fromPathList[i]; var to = toSubPathList[i]; to.parent = toPath; to.copyTransform(identityTransform); if (!individualDelay) { prepareMorphPath(from, to); } } toPath.__isCombineMorphing = true; toPath.childrenRef = function () { return toSubPathList; }; function addToSubPathListToZr(zr) { for (var i = 0; i < toSubPathList.length; i++) { toSubPathList[i].addSelfToZr(zr); } } saveAndModifyMethod(toPath, 'addSelfToZr', { after: function (zr) { addToSubPathListToZr(zr); } }); saveAndModifyMethod(toPath, 'removeSelfFromZr', { after: function (zr) { for (var i = 0; i < toSubPathList.length; i++) { toSubPathList[i].removeSelfFromZr(zr); } } }); function restoreToPath() { toPath.__isCombineMorphing = false; toPath.__morphT = -1; toPath.childrenRef = null; restoreMethod(toPath, 'addSelfToZr'); restoreMethod(toPath, 'removeSelfFromZr'); } var toLen = toSubPathList.length; if (individualDelay) { var animating_1 = toLen; var eachDone = function () { animating_1--; if (animating_1 === 0) { restoreToPath(); oldDone && oldDone(); } }; for (var i = 0; i < toLen; i++) { var indivdualAnimationOpts = individualDelay ? Object(core_util["defaults"])({ delay: (animationOpts.delay || 0) + individualDelay(i, toLen, fromPathList[i], toSubPathList[i]), done: eachDone }, animationOpts) : animationOpts; morphPath(fromPathList[i], toSubPathList[i], indivdualAnimationOpts); } } else { toPath.__morphT = 0; toPath.animateTo({ __morphT: 1 }, Object(core_util["defaults"])({ during: function (p) { for (var i = 0; i < toLen; i++) { var child = toSubPathList[i]; child.__morphT = toPath.__morphT; child.dirtyShape(); } oldDuring && oldDuring(p); }, done: function () { restoreToPath(); for (var i = 0; i < fromList.length; i++) { restoreMethod(fromList[i], 'updateTransform'); } oldDone && oldDone(); } }, animationOpts)); } if (toPath.__zr) { addToSubPathListToZr(toPath.__zr); } return { fromIndividuals: fromPathList, toIndividuals: toSubPathList, count: toLen }; } function separateMorph(fromPath, toPathList, animationOpts) { var toLen = toPathList.length; var fromPathList = []; var dividePath = animationOpts.dividePath || defaultDividePath; function addFromPath(fromList) { for (var i = 0; i < fromList.length; i++) { var from = fromList[i]; if (isCombineMorphing(from)) { addFromPath(from.childrenRef()); } else if (from instanceof graphic_Path) { fromPathList.push(from); } } } if (isCombineMorphing(fromPath)) { addFromPath(fromPath.childrenRef()); var fromLen = fromPathList.length; if (fromLen < toLen) { var k = 0; for (var i = fromLen; i < toLen; i++) { fromPathList.push(clonePath(fromPathList[k++ % fromLen])); } } fromPathList.length = toLen; } else { fromPathList = dividePath({ path: fromPath, count: toLen }); var fromPathTransform = fromPath.getComputedTransform(); for (var i = 0; i < fromPathList.length; i++) { fromPathList[i].setLocalTransform(fromPathTransform); } if (fromPathList.length !== toLen) { console.error('Invalid morphing: unmatched splitted path'); return createEmptyReturn(); } } fromPathList = sortPaths(fromPathList); toPathList = sortPaths(toPathList); var individualDelay = animationOpts.individualDelay; for (var i = 0; i < toLen; i++) { var indivdualAnimationOpts = individualDelay ? Object(core_util["defaults"])({ delay: (animationOpts.delay || 0) + individualDelay(i, toLen, fromPathList[i], toPathList[i]) }, animationOpts) : animationOpts; morphPath(fromPathList[i], toPathList[i], indivdualAnimationOpts); } return { fromIndividuals: fromPathList, toIndividuals: toPathList, count: toPathList.length }; } // CONCATENATED MODULE: ./node_modules/echarts/lib/animation/morphTransitionHelper.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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 isMultiple(elements) { return Object(core_util["isArray"])(elements[0]); } function prepareMorphBatches(one, many) { var batches = []; var batchCount = one.length; for (var i = 0; i < batchCount; i++) { batches.push({ one: one[i], many: [] }); } for (var i = 0; i < many.length; i++) { var len = many[i].length; var k = void 0; for (k = 0; k < len; k++) { batches[k % batchCount].many.push(many[i][k]); } } var off = 0; // If one has more paths than each one of many. average them. for (var i = batchCount - 1; i >= 0; i--) { if (!batches[i].many.length) { var moveFrom = batches[off].many; if (moveFrom.length <= 1) { // Not enough // Start from the first one. if (off) { off = 0; } else { return batches; } } var len = moveFrom.length; var mid = Math.ceil(len / 2); batches[i].many = moveFrom.slice(mid, len); batches[off].many = moveFrom.slice(0, mid); off++; } } return batches; } var pathDividers = { clone: function (params) { var ret = []; // Fitting the alpha var approxOpacity = 1 - Math.pow(1 - params.path.style.opacity, 1 / params.count); for (var i = 0; i < params.count; i++) { var cloned = clonePath(params.path); cloned.setStyle('opacity', approxOpacity); ret.push(cloned); } return ret; }, // Use the default divider split: null }; function applyMorphAnimation(from, to, divideShape, seriesModel, dataIndex, animateOtherProps) { if (!from.length || !to.length) { return; } var updateAnimationCfg = getAnimationConfig('update', seriesModel, dataIndex); if (!(updateAnimationCfg && updateAnimationCfg.duration > 0)) { return; } var animationDelay = seriesModel.getModel('universalTransition').get('delay'); var animationCfg = Object.assign({ // Need to setToFinal so the further calculation based on the style can be correct. // Like emphasis color. setToFinal: true }, updateAnimationCfg); var many; var one; if (isMultiple(from)) { // manyToOne many = from; one = to; } if (isMultiple(to)) { // oneToMany many = to; one = from; } function morphOneBatch(batch, fromIsMany, animateIndex, animateCount, forceManyOne) { var batchMany = batch.many; var batchOne = batch.one; if (batchMany.length === 1 && !forceManyOne) { // Is one to one var batchFrom = fromIsMany ? batchMany[0] : batchOne; var batchTo = fromIsMany ? batchOne : batchMany[0]; if (isCombineMorphing(batchFrom)) { // Keep doing combine animation. morphOneBatch({ many: [batchFrom], one: batchTo }, true, animateIndex, animateCount, true); } else { var individualAnimationCfg = animationDelay ? Object(core_util["defaults"])({ delay: animationDelay(animateIndex, animateCount) }, animationCfg) : animationCfg; morphPath(batchFrom, batchTo, individualAnimationCfg); animateOtherProps(batchFrom, batchTo, batchFrom, batchTo, individualAnimationCfg); } } else { var separateAnimationCfg = Object(core_util["defaults"])({ dividePath: pathDividers[divideShape], individualDelay: animationDelay && function (idx, count, fromPath, toPath) { return animationDelay(idx + animateIndex, animateCount); } }, animationCfg); var _a = fromIsMany ? combineMorph(batchMany, batchOne, separateAnimationCfg) : separateMorph(batchOne, batchMany, separateAnimationCfg), fromIndividuals = _a.fromIndividuals, toIndividuals = _a.toIndividuals; var count = fromIndividuals.length; for (var k = 0; k < count; k++) { var individualAnimationCfg = animationDelay ? Object(core_util["defaults"])({ delay: animationDelay(k, count) }, animationCfg) : animationCfg; animateOtherProps(fromIndividuals[k], toIndividuals[k], fromIsMany ? batchMany[k] : batch.one, fromIsMany ? batch.one : batchMany[k], individualAnimationCfg); } } } var fromIsMany = many ? many === from // Is one to one. If the path number not match. also needs do merge and separate morphing. : from.length > to.length; var morphBatches = many ? prepareMorphBatches(one, many) : prepareMorphBatches(fromIsMany ? to : from, [fromIsMany ? from : to]); var animateCount = 0; for (var i = 0; i < morphBatches.length; i++) { animateCount += morphBatches[i].many.length; } var animateIndex = 0; for (var i = 0; i < morphBatches.length; i++) { morphOneBatch(morphBatches[i], fromIsMany, animateIndex, animateCount); animateIndex += morphBatches[i].many.length; } } function getPathList(elements) { if (!elements) { return []; } if (Object(core_util["isArray"])(elements)) { var pathList_1 = []; for (var i = 0; i < elements.length; i++) { pathList_1.push(getPathList(elements[i])); } return pathList_1; } var pathList = []; elements.traverse(function (el) { if (el instanceof graphic_Path && !el.disableMorphing && !el.invisible && !el.ignore) { pathList.push(el); } }); return pathList; } // CONCATENATED MODULE: ./node_modules/echarts/lib/animation/universalTransition.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ // Universal transitions that can animate between any shapes(series) and any properties in any amounts. var DATA_COUNT_THRESHOLD = 1e4; var TRANSITION_NONE = 0; var TRANSITION_P2C = 1; var TRANSITION_C2P = 2; ; var getUniversalTransitionGlobalStore = makeInner(); function getDimension(data, visualDimension) { var dimensions = data.dimensions; for (var i = 0; i < dimensions.length; i++) { var dimInfo = data.getDimensionInfo(dimensions[i]); if (dimInfo && dimInfo.otherDims[visualDimension] === 0) { return dimensions[i]; } } } // get value by dimension. (only get value of itemGroupId or childGroupId, so convert it to string) function getValueByDimension(data, dataIndex, dimension) { var dimInfo = data.getDimensionInfo(dimension); var dimOrdinalMeta = dimInfo && dimInfo.ordinalMeta; if (dimInfo) { var value = data.get(dimInfo.name, dataIndex); if (dimOrdinalMeta) { return dimOrdinalMeta.categories[value] || value + ''; } return value + ''; } } function getGroupId(data, dataIndex, dataGroupId, isChild) { // try to get groupId from encode var visualDimension = isChild ? 'itemChildGroupId' : 'itemGroupId'; var groupIdDim = getDimension(data, visualDimension); if (groupIdDim) { var groupId = getValueByDimension(data, dataIndex, groupIdDim); return groupId; } // try to get groupId from raw data item var rawDataItem = data.getRawDataItem(dataIndex); var property = isChild ? 'childGroupId' : 'groupId'; if (rawDataItem && rawDataItem[property]) { return rawDataItem[property] + ''; } // fallback if (isChild) { return; } // try to use series.dataGroupId as groupId, otherwise use dataItem's id as groupId return dataGroupId || data.getId(dataIndex); } // flatten all data items from different serieses into one arrary function flattenDataDiffItems(list) { var items = []; Object(core_util["each"])(list, function (seriesInfo) { var data = seriesInfo.data; var dataGroupId = seriesInfo.dataGroupId; if (data.count() > DATA_COUNT_THRESHOLD) { if (false) { warn('Universal transition is disabled on large data > 10k.'); } return; } var indices = data.getIndices(); for (var dataIndex = 0; dataIndex < indices.length; dataIndex++) { items.push({ data: data, groupId: getGroupId(data, dataIndex, dataGroupId, false), childGroupId: getGroupId(data, dataIndex, dataGroupId, true), divide: seriesInfo.divide, dataIndex: dataIndex }); } }); return items; } function fadeInElement(newEl, newSeries, newIndex) { newEl.traverse(function (el) { if (el instanceof graphic_Path) { // TODO use fade in animation for target element. initProps(el, { style: { opacity: 0 } }, newSeries, { dataIndex: newIndex, isFrom: true }); } }); } function universalTransition_removeEl(el) { if (el.parent) { // Bake parent transform to element. // So it can still have proper transform to transition after it's removed. var computedTransform = el.getComputedTransform(); el.setLocalTransform(computedTransform); el.parent.remove(el); } } function stopAnimation(el) { el.stopAnimation(); if (el.isGroup) { el.traverse(function (child) { child.stopAnimation(); }); } } function animateElementStyles(el, dataIndex, seriesModel) { var animationConfig = getAnimationConfig('update', seriesModel, dataIndex); animationConfig && el.traverse(function (child) { if (child instanceof graphic_Displayable) { var oldStyle = getOldStyle(child); if (oldStyle) { child.animateFrom({ style: oldStyle }, animationConfig); } } }); } function isAllIdSame(oldDiffItems, newDiffItems) { var len = oldDiffItems.length; if (len !== newDiffItems.length) { return false; } for (var i = 0; i < len; i++) { var oldItem = oldDiffItems[i]; var newItem = newDiffItems[i]; if (oldItem.data.getId(oldItem.dataIndex) !== newItem.data.getId(newItem.dataIndex)) { return false; } } return true; } function transitionBetween(oldList, newList, api) { var oldDiffItems = flattenDataDiffItems(oldList); var newDiffItems = flattenDataDiffItems(newList); function updateMorphingPathProps(from, to, rawFrom, rawTo, animationCfg) { if (rawFrom || from) { to.animateFrom({ style: rawFrom && rawFrom !== from // dividingMethod like clone may override the style(opacity) // So extend it to raw style. ? Object(core_util["extend"])(Object(core_util["extend"])({}, rawFrom.style), from.style) : from.style }, animationCfg); } } var hasMorphAnimation = false; /** * With groupId and childGroupId, we can build parent-child relationships between dataItems. * However, we should mind the parent-child "direction" between old and new options. * * For example, suppose we have two dataItems from two series.data: * * dataA: [ dataB: [ * { { * value: 5, value: 3, * groupId: 'creatures', groupId: 'animals', * childGroupId: 'animals' childGroupId: 'dogs' * }, }, * ... ... * ] ] * * where dataA is belong to optionA and dataB is belong to optionB. * * When we `setOption(optionB)` from optionA, we choose childGroupId of dataItemA and groupId of * dataItemB as keys so the two keys are matched (both are 'animals'), then universalTransition * will work. This derection is "parent -> child". * * If we `setOption(optionA)` from optionB, we also choose groupId of dataItemB and childGroupId * of dataItemA as keys and universalTransition will work. This derection is "child -> parent". * * If there is no childGroupId specified, which means no multiLevelDrillDown/Up is needed and no * parent-child relationship exists. This direction is "none". * * So we need to know whether to use groupId or childGroupId as the key when we call the keyGetter * functions. Thus, we need to decide the direction first. * * The rule is: * * if (all childGroupIds in oldDiffItems and all groupIds in newDiffItems have common value) { * direction = 'parent -> child'; * } else if (all groupIds in oldDiffItems and all childGroupIds in newDiffItems have common value) { * direction = 'child -> parent'; * } else { * direction = 'none'; * } */ var direction = TRANSITION_NONE; // find all groupIds and childGroupIds from oldDiffItems var oldGroupIds = Object(core_util["createHashMap"])(); var oldChildGroupIds = Object(core_util["createHashMap"])(); oldDiffItems.forEach(function (item) { item.groupId && oldGroupIds.set(item.groupId, true); item.childGroupId && oldChildGroupIds.set(item.childGroupId, true); }); // traverse newDiffItems and decide the direction according to the rule for (var i = 0; i < newDiffItems.length; i++) { var newGroupId = newDiffItems[i].groupId; if (oldChildGroupIds.get(newGroupId)) { direction = TRANSITION_P2C; break; } var newChildGroupId = newDiffItems[i].childGroupId; if (newChildGroupId && oldGroupIds.get(newChildGroupId)) { direction = TRANSITION_C2P; break; } } function createKeyGetter(isOld, onlyGetId) { return function (diffItem) { var data = diffItem.data; var dataIndex = diffItem.dataIndex; // TODO if specified dim if (onlyGetId) { return data.getId(dataIndex); } if (isOld) { return direction === TRANSITION_P2C ? diffItem.childGroupId : diffItem.groupId; } else { return direction === TRANSITION_C2P ? diffItem.childGroupId : diffItem.groupId; } }; } // Use id if it's very likely to be an one to one animation // It's more robust than groupId // TODO Check if key dimension is specified. var useId = isAllIdSame(oldDiffItems, newDiffItems); var isElementStillInChart = {}; if (!useId) { // We may have different diff strategy with basicTransition if we use other dimension as key. // If so, we can't simply check if oldEl is same with newEl. We need a map to check if oldEl is still being used in the new chart. // We can't use the elements that already being morphed. Let it keep it's original basic transition. for (var i = 0; i < newDiffItems.length; i++) { var newItem = newDiffItems[i]; var el = newItem.data.getItemGraphicEl(newItem.dataIndex); if (el) { isElementStillInChart[el.id] = true; } } } function updateOneToOne(newIndex, oldIndex) { var oldItem = oldDiffItems[oldIndex]; var newItem = newDiffItems[newIndex]; var newSeries = newItem.data.hostModel; // TODO Mark this elements is morphed and don't morph them anymore var oldEl = oldItem.data.getItemGraphicEl(oldItem.dataIndex); var newEl = newItem.data.getItemGraphicEl(newItem.dataIndex); // Can't handle same elements. if (oldEl === newEl) { newEl && animateElementStyles(newEl, newItem.dataIndex, newSeries); return; } if ( // We can't use the elements that already being morphed oldEl && isElementStillInChart[oldEl.id]) { return; } if (newEl) { // TODO: If keep animating the group in case // some of the elements don't want to be morphed. // TODO Label? stopAnimation(newEl); if (oldEl) { stopAnimation(oldEl); // If old element is doing leaving animation. stop it and remove it immediately. universalTransition_removeEl(oldEl); hasMorphAnimation = true; applyMorphAnimation(getPathList(oldEl), getPathList(newEl), newItem.divide, newSeries, newIndex, updateMorphingPathProps); } else { fadeInElement(newEl, newSeries, newIndex); } } // else keep oldEl leaving animation. } new data_DataDiffer(oldDiffItems, newDiffItems, createKeyGetter(true, useId), createKeyGetter(false, useId), null, 'multiple').update(updateOneToOne).updateManyToOne(function (newIndex, oldIndices) { var newItem = newDiffItems[newIndex]; var newData = newItem.data; var newSeries = newData.hostModel; var newEl = newData.getItemGraphicEl(newItem.dataIndex); var oldElsList = Object(core_util["filter"])(Object(core_util["map"])(oldIndices, function (idx) { return oldDiffItems[idx].data.getItemGraphicEl(oldDiffItems[idx].dataIndex); }), function (oldEl) { return oldEl && oldEl !== newEl && !isElementStillInChart[oldEl.id]; }); if (newEl) { stopAnimation(newEl); if (oldElsList.length) { // If old element is doing leaving animation. stop it and remove it immediately. Object(core_util["each"])(oldElsList, function (oldEl) { stopAnimation(oldEl); universalTransition_removeEl(oldEl); }); hasMorphAnimation = true; applyMorphAnimation(getPathList(oldElsList), getPathList(newEl), newItem.divide, newSeries, newIndex, updateMorphingPathProps); } else { fadeInElement(newEl, newSeries, newItem.dataIndex); } } // else keep oldEl leaving animation. }).updateOneToMany(function (newIndices, oldIndex) { var oldItem = oldDiffItems[oldIndex]; var oldEl = oldItem.data.getItemGraphicEl(oldItem.dataIndex); // We can't use the elements that already being morphed if (oldEl && isElementStillInChart[oldEl.id]) { return; } var newElsList = Object(core_util["filter"])(Object(core_util["map"])(newIndices, function (idx) { return newDiffItems[idx].data.getItemGraphicEl(newDiffItems[idx].dataIndex); }), function (el) { return el && el !== oldEl; }); var newSeris = newDiffItems[newIndices[0]].data.hostModel; if (newElsList.length) { Object(core_util["each"])(newElsList, function (newEl) { return stopAnimation(newEl); }); if (oldEl) { stopAnimation(oldEl); // If old element is doing leaving animation. stop it and remove it immediately. universalTransition_removeEl(oldEl); hasMorphAnimation = true; applyMorphAnimation(getPathList(oldEl), getPathList(newElsList), oldItem.divide, // Use divide on old. newSeris, newIndices[0], updateMorphingPathProps); } else { Object(core_util["each"])(newElsList, function (newEl) { return fadeInElement(newEl, newSeris, newIndices[0]); }); } } // else keep oldEl leaving animation. }).updateManyToMany(function (newIndices, oldIndices) { // If two data are same and both have groupId. // Normally they should be diff by id. new data_DataDiffer(oldIndices, newIndices, function (rawIdx) { return oldDiffItems[rawIdx].data.getId(oldDiffItems[rawIdx].dataIndex); }, function (rawIdx) { return newDiffItems[rawIdx].data.getId(newDiffItems[rawIdx].dataIndex); }).update(function (newIndex, oldIndex) { // Use the original index updateOneToOne(newIndices[newIndex], oldIndices[oldIndex]); }).execute(); }).execute(); if (hasMorphAnimation) { Object(core_util["each"])(newList, function (_a) { var data = _a.data; var seriesModel = data.hostModel; var view = seriesModel && api.getViewOfSeriesModel(seriesModel); var animationCfg = getAnimationConfig('update', seriesModel, 0); // use 0 index. if (view && seriesModel.isAnimationEnabled() && animationCfg && animationCfg.duration > 0) { view.group.traverse(function (el) { if (el instanceof graphic_Path && !el.animators.length) { // We can't accept there still exists element that has no animation // if universalTransition is enabled el.animateFrom({ style: { opacity: 0 } }, animationCfg); } }); } }); } } function getSeriesTransitionKey(series) { var seriesKey = series.getModel('universalTransition').get('seriesKey'); if (!seriesKey) { // Use series id by default. return series.id; } return seriesKey; } function convertArraySeriesKeyToString(seriesKey) { if (Object(core_util["isArray"])(seriesKey)) { // Order independent. return seriesKey.sort().join(','); } return seriesKey; } function getDivideShapeFromData(data) { if (data.hostModel) { return data.hostModel.getModel('universalTransition').get('divideShape'); } } function findTransitionSeriesBatches(globalStore, params) { var updateBatches = Object(core_util["createHashMap"])(); var oldDataMap = Object(core_util["createHashMap"])(); // Map that only store key in array seriesKey. // Which is used to query the old data when transition from one to multiple series. var oldDataMapForSplit = Object(core_util["createHashMap"])(); Object(core_util["each"])(globalStore.oldSeries, function (series, idx) { var oldDataGroupId = globalStore.oldDataGroupIds[idx]; var oldData = globalStore.oldData[idx]; var transitionKey = getSeriesTransitionKey(series); var transitionKeyStr = convertArraySeriesKeyToString(transitionKey); oldDataMap.set(transitionKeyStr, { dataGroupId: oldDataGroupId, data: oldData }); if (Object(core_util["isArray"])(transitionKey)) { // Same key can't in different array seriesKey. Object(core_util["each"])(transitionKey, function (key) { oldDataMapForSplit.set(key, { key: transitionKeyStr, dataGroupId: oldDataGroupId, data: oldData }); }); } }); function checkTransitionSeriesKeyDuplicated(transitionKeyStr) { if (updateBatches.get(transitionKeyStr)) { log_warn("Duplicated seriesKey in universalTransition " + transitionKeyStr); } } Object(core_util["each"])(params.updatedSeries, function (series) { if (series.isUniversalTransitionEnabled() && series.isAnimationEnabled()) { var newDataGroupId = series.get('dataGroupId'); var newData = series.getData(); var transitionKey = getSeriesTransitionKey(series); var transitionKeyStr = convertArraySeriesKeyToString(transitionKey); // Only transition between series with same id. var oldData = oldDataMap.get(transitionKeyStr); // string transition key is the best match. if (oldData) { if (false) { checkTransitionSeriesKeyDuplicated(transitionKeyStr); } // TODO check if data is same? updateBatches.set(transitionKeyStr, { oldSeries: [{ dataGroupId: oldData.dataGroupId, divide: getDivideShapeFromData(oldData.data), data: oldData.data }], newSeries: [{ dataGroupId: newDataGroupId, divide: getDivideShapeFromData(newData), data: newData }] }); } else { // Transition from multiple series. // e.g. 'female', 'male' -> ['female', 'male'] if (Object(core_util["isArray"])(transitionKey)) { if (false) { checkTransitionSeriesKeyDuplicated(transitionKeyStr); } var oldSeries_1 = []; Object(core_util["each"])(transitionKey, function (key) { var oldData = oldDataMap.get(key); if (oldData.data) { oldSeries_1.push({ dataGroupId: oldData.dataGroupId, divide: getDivideShapeFromData(oldData.data), data: oldData.data }); } }); if (oldSeries_1.length) { updateBatches.set(transitionKeyStr, { oldSeries: oldSeries_1, newSeries: [{ dataGroupId: newDataGroupId, data: newData, divide: getDivideShapeFromData(newData) }] }); } } else { // Try transition to multiple series. // e.g. ['female', 'male'] -> 'female', 'male' var oldData_1 = oldDataMapForSplit.get(transitionKey); if (oldData_1) { var batch = updateBatches.get(oldData_1.key); if (!batch) { batch = { oldSeries: [{ dataGroupId: oldData_1.dataGroupId, data: oldData_1.data, divide: getDivideShapeFromData(oldData_1.data) }], newSeries: [] }; updateBatches.set(oldData_1.key, batch); } batch.newSeries.push({ dataGroupId: newDataGroupId, data: newData, divide: getDivideShapeFromData(newData) }); } } } } }); return updateBatches; } function querySeries(series, finder) { for (var i = 0; i < series.length; i++) { var found = finder.seriesIndex != null && finder.seriesIndex === series[i].seriesIndex || finder.seriesId != null && finder.seriesId === series[i].id; if (found) { return i; } } } function transitionSeriesFromOpt(transitionOpt, globalStore, params, api) { var from = []; var to = []; Object(core_util["each"])(normalizeToArray(transitionOpt.from), function (finder) { var idx = querySeries(globalStore.oldSeries, finder); if (idx >= 0) { from.push({ dataGroupId: globalStore.oldDataGroupIds[idx], data: globalStore.oldData[idx], // TODO can specify divideShape in transition. divide: getDivideShapeFromData(globalStore.oldData[idx]), groupIdDim: finder.dimension }); } }); Object(core_util["each"])(normalizeToArray(transitionOpt.to), function (finder) { var idx = querySeries(params.updatedSeries, finder); if (idx >= 0) { var data = params.updatedSeries[idx].getData(); to.push({ dataGroupId: globalStore.oldDataGroupIds[idx], data: data, divide: getDivideShapeFromData(data), groupIdDim: finder.dimension }); } }); if (from.length > 0 && to.length > 0) { transitionBetween(from, to, api); } } function installUniversalTransition(registers) { registers.registerUpdateLifecycle('series:beforeupdate', function (ecMOdel, api, params) { Object(core_util["each"])(normalizeToArray(params.seriesTransition), function (transOpt) { Object(core_util["each"])(normalizeToArray(transOpt.to), function (finder) { var series = params.updatedSeries; for (var i = 0; i < series.length; i++) { if (finder.seriesIndex != null && finder.seriesIndex === series[i].seriesIndex || finder.seriesId != null && finder.seriesId === series[i].id) { series[i][SERIES_UNIVERSAL_TRANSITION_PROP] = true; } } }); }); }); registers.registerUpdateLifecycle('series:transition', function (ecModel, api, params) { // TODO api provide an namespace that can save stuff per instance var globalStore = getUniversalTransitionGlobalStore(api); // TODO multiple to multiple series. if (globalStore.oldSeries && params.updatedSeries && params.optionChanged) { // TODO transitionOpt was used in an old implementation and can be removed now // Use give transition config if its' give; var transitionOpt = params.seriesTransition; if (transitionOpt) { Object(core_util["each"])(normalizeToArray(transitionOpt), function (opt) { transitionSeriesFromOpt(opt, globalStore, params, api); }); } else { // Else guess from series based on transition series key. var updateBatches_1 = findTransitionSeriesBatches(globalStore, params); Object(core_util["each"])(updateBatches_1.keys(), function (key) { var batch = updateBatches_1.get(key); transitionBetween(batch.oldSeries, batch.newSeries, api); }); } // Reset Object(core_util["each"])(params.updatedSeries, function (series) { // Reset; if (series[SERIES_UNIVERSAL_TRANSITION_PROP]) { series[SERIES_UNIVERSAL_TRANSITION_PROP] = false; } }); } // Save all series of current update. Not only the updated one. var allSeries = ecModel.getSeries(); var savedSeries = globalStore.oldSeries = []; var savedDataGroupIds = globalStore.oldDataGroupIds = []; var savedData = globalStore.oldData = []; for (var i = 0; i < allSeries.length; i++) { var data = allSeries[i].getData(); // Only save the data that can have transition. // Avoid large data costing too much extra memory if (data.count() < DATA_COUNT_THRESHOLD) { savedSeries.push(allSeries[i]); savedDataGroupIds.push(allSeries[i].get('dataGroupId')); savedData.push(data); } } }); } // CONCATENATED MODULE: ./node_modules/echarts/lib/export/features.js /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ // Module that exports complex but fancy features. // CONCATENATED MODULE: ./node_modules/echarts/index.js /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "version", function() { return echarts_version; }); /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "dependencies", function() { return dependencies; }); /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "PRIORITY", function() { return PRIORITY; }); /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "init", function() { return echarts_init; }); /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "connect", function() { return connect; }); /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "disconnect", function() { return disconnect; }); /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "disConnect", function() { return disConnect; }); /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "dispose", function() { return echarts_dispose; }); /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "getInstanceByDom", function() { return getInstanceByDom; }); /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "getInstanceById", function() { return getInstanceById; }); /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "registerTheme", function() { return registerTheme; }); /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "registerPreprocessor", function() { return registerPreprocessor; }); /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "registerProcessor", function() { return registerProcessor; }); /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "registerPostInit", function() { return registerPostInit; }); /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "registerPostUpdate", function() { return registerPostUpdate; }); /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "registerUpdateLifecycle", function() { return registerUpdateLifecycle; }); /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "registerAction", function() { return registerAction; }); /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "registerCoordinateSystem", function() { return registerCoordinateSystem; }); /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "getCoordinateSystemDimensions", function() { return getCoordinateSystemDimensions; }); /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "registerLocale", function() { return registerLocale; }); /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "registerLayout", function() { return registerLayout; }); /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "registerVisual", function() { return registerVisual; }); /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "registerLoading", function() { return registerLoading; }); /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "setCanvasCreator", function() { return setCanvasCreator; }); /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "registerMap", function() { return echarts_registerMap; }); /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "getMap", function() { return echarts_getMap; }); /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "registerTransform", function() { return registerTransform; }); /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "dataTool", function() { return dataTool; }); /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "zrender", function() { return zrender_namespaceObject; }); /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "matrix", function() { return matrix_namespaceObject; }); /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "vector", function() { return vector_namespaceObject; }); /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "zrUtil", function() { return core_util; }); /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "color", function() { return tool_color; }); /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "throttle", function() { return throttle; }); /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "helper", function() { return api_helper_namespaceObject; }); /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "use", function() { return use; }); /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "setPlatformAPI", function() { return platform["e" /* setPlatformAPI */]; }); /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "parseGeoJSON", function() { return parseGeoJSON; }); /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "parseGeoJson", function() { return parseGeoJSON; }); /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "number", function() { return api_number_namespaceObject; }); /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "time", function() { return api_time_namespaceObject; }); /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "graphic", function() { return api_graphic_namespaceObject; }); /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "format", function() { return api_format_namespaceObject; }); /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "util", function() { return api_util_namespaceObject; }); /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "env", function() { return core_env["a" /* default */]; }); /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "List", function() { return data_SeriesData; }); /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "Model", function() { return model_Model; }); /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "Axis", function() { return coord_Axis; }); /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "ComponentModel", function() { return Component; }); /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "ComponentView", function() { return view_Component; }); /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "SeriesModel", function() { return Series; }); /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "ChartView", function() { return Chart; }); /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "innerDrawElementOnCanvas", function() { return brushSingle; }); /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "extendComponentModel", function() { return extendComponentModel; }); /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "extendComponentView", function() { return extendComponentView; }); /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "extendSeriesModel", function() { return extendSeriesModel; }); /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "extendChartView", function() { return extendChartView; }); /* * 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. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * 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. */ // ---------------------------------------------- // All of the modules that are allowed to be // imported are listed below. // // Users MUST NOT import other modules that are // not included in this list. // ---------------------------------------------- // ----------------- // Render engines // ----------------- // Render via Canvas. // echarts.init(dom, null, { renderer: 'canvas' }) use([installCanvasRenderer_install]); // Render via SVG. // echarts.init(dom, null, { renderer: 'svg' }) use([install]); // ---------------- // Charts (series) // ---------------- // All of the series types, for example: // chart.setOption({ // series: [{ // type: 'line' // or 'bar', 'pie', ... // }] // }); use([install_install, bar_install_install, pie_install_install, scatter_install_install, chart_radar_install_install, map_install_install, tree_install_install, treemap_install_install, graph_install_install, gauge_install_install, funnel_install_install, chart_parallel_install_install, sankey_install_install, boxplot_install_install, candlestick_install_install, effectScatter_install_install, lines_install_install, heatmap_install_install, installPictorialBar_install, themeRiver_install_install, sunburst_install_install, custom_install_install]); // ------------------- // Coordinate systems // ------------------- // All of the axis modules have been included in the // coordinate system module below, do not need to // make extra import. // `cartesian` coordinate system. For some historical // reasons, it is named as grid, for example: // chart.setOption({ // grid: {...}, // xAxis: {...}, // yAxis: {...}, // series: [{...}] // }); use(grid_install_install); // `polar` coordinate system, for example: // chart.setOption({ // polar: {...}, // radiusAxis: {...}, // angleAxis: {...}, // series: [{ // coordinateSystem: 'polar' // }] // }); use(polar_install_install); // `geo` coordinate system, for example: // chart.setOption({ // geo: {...}, // series: [{ // coordinateSystem: 'geo' // }] // }); use(geo_install_install); // `singleAxis` coordinate system (notice, it is a coordinate system // with only one axis, work for chart like theme river), for example: // chart.setOption({ // singleAxis: {...} // series: [{type: 'themeRiver', ...}] // }); use(singleAxis_install_install); // `parallel` coordinate system, only work for parallel series, for example: // chart.setOption({ // parallel: {...}, // parallelAxis: [{...}, ...], // series: [{ // type: 'parallel' // }] // }); use(parallel_install_install); // `calendar` coordinate system. for example, // chart.setOption({ // calendar: {...}, // series: [{ // coordinateSystem: 'calendar' // }] // ); use(calendar_install_install); // ------------------ // Other components // ------------------ // `graphic` component, for example: // chart.setOption({ // graphic: {...} // }); use(graphic_install_install); // `toolbox` component, for example: // chart.setOption({ // toolbox: {...} // }); use(toolbox_install_install); // `tooltip` component, for example: // chart.setOption({ // tooltip: {...} // }); use(tooltip_install_install); // `axisPointer` component, for example: // chart.setOption({ // tooltip: {axisPointer: {...}, ...} // }); // Or // chart.setOption({ // axisPointer: {...} // }); use(axisPointer_install_install); // `brush` component, for example: // chart.setOption({ // brush: {...} // }); // Or // chart.setOption({ // tooltip: {feature: {brush: {...}} // }) use(brush_install_install); // `title` component, for example: // chart.setOption({ // title: {...} // }); use(title_install_install); // `timeline` component, for example: // chart.setOption({ // timeline: {...} // }); use(timeline_install_install); // `markPoint` component, for example: // chart.setOption({ // series: [{markPoint: {...}}] // }); use(installMarkPoint_install); // `markLine` component, for example: // chart.setOption({ // series: [{markLine: {...}}] // }); use(installMarkLine_install); // `markArea` component, for example: // chart.setOption({ // series: [{markArea: {...}}] // }); use(installMarkArea_install); // `legend` component not scrollable. for example: // chart.setOption({ // legend: {...} // }); use(legend_install_install); // `dataZoom` component including both `dataZoomInside` and `dataZoomSlider`. use(dataZoom_install_install); // `dataZoom` component providing drag, pinch, wheel behaviors // inside coordinate system, for example: // chart.setOption({ // dataZoom: {type: 'inside'} // }); use(installDataZoomInside_install); // `dataZoom` component providing a slider bar, for example: // chart.setOption({ // dataZoom: {type: 'slider'} // }); use(installDataZoomSlider_install); // `visualMap` component including both `visualMapContinuous` and `visualMapPiecewise`. use(visualMap_install_install); // `visualMap` component providing continuous bar, for example: // chart.setOption({ // visualMap: {type: 'continuous'} // }); use(installVisualMapContinuous_install); // `visualMap` component providing pieces bar, for example: // chart.setOption({ // visualMap: {type: 'piecewise'} // }); use(installVisualMapPiecewise_install); // `aria` component providing aria, for example: // chart.setOption({ // aria: {...} // }); use(aria_install_install); // dataset transform // chart.setOption({ // dataset: { // transform: [] // } // }); use(transform_install_install); use(dataset_install_install); // universal transition // chart.setOption({ // series: { // universalTransition: { enabled: true } // } // }) use(installUniversalTransition); // label layout // chart.setOption({ // series: { // labelLayout: { hideOverlap: true } // } // }) use(installLabelLayout); /***/ }), /***/ "XSR2": /***/ (function(module, exports) { module.exports = "data:image/gif;base64,R0lGODlhHgAeAOZlADQ0NDU1NTY2NjIyMjg4ODc3N/r6+jw8PGtrazk5OWFhYZaWlvHx8ZKSktXV1To6OklJSeHh4dTU1EFBQb29vY+Pjzs7O1VVVT4+PkdHR5SUlJ2dneTk5KmpqeDg4GBgYOXl5T09Pejo6GhoaI6Ojr+/v6SkpK2trcvLy4KCgsjIyKamptbW1kZGRszMzJ6enkxMTCwsLFFRUa+vr5CQkF9fX0pKSrS0tP39/fPz87y8vOzs7LCwsOfn55qamnl5eZiYmFJSUsbGxpGRkfv7+3FxcYWFhcTExMDAwO3t7XJycn19fV1dXYiIiOvr68rKytra2jExMUhISJ+fn6urq3h4eHt7e1ZWVomJiT8/P2RkZJOTk42NjdfX166urvf399LS0m1tbdPT083NzTMzM////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/wtYTVAgRGF0YVhNUDw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTM4IDc5LjE1OTgyNCwgMjAxNi8wOS8xNC0wMTowOTowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTcgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjkxQTUzMEU5RjIyNDExRThBNTFEQkRDQ0MyOTQ0QUE4IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjkxQTUzMEVBRjIyNDExRThBNTFEQkRDQ0MyOTQ0QUE4Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6OTFBNTMwRTdGMjI0MTFFOEE1MURCRENDQzI5NDRBQTgiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6OTFBNTMwRThGMjI0MTFFOEE1MURCRENDQzI5NDRBQTgiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz4B//79/Pv6+fj39vX08/Lx8O/u7ezr6uno5+bl5OPi4eDf3t3c29rZ2NfW1dTT0tHQz87NzMvKycjHxsXEw8LBwL++vby7urm4t7a1tLOysbCvrq2sq6qpqKempaSjoqGgn56dnJuamZiXlpWUk5KRkI+OjYyLiomIh4aFhIOCgYB/fn18e3p5eHd2dXRzcnFwb25tbGtqaWhnZmVkY2JhYF9eXVxbWllYV1ZVVFNSUVBPTk1MS0pJSEdGRURDQkFAPz49PDs6OTg3NjU0MzIxMC8uLSwrKikoJyYlJCMiISAfHh0cGxoZGBcWFRQTEhEQDw4NDAsKCQgHBgUEAwIBAAAh+QQJHgBlACwAAAAAHgAeAAAH/4BlgoOEhYQmHoaKi4YNAReMkYodZGQCYZKZghxMAWQJJpqZRFIAAwVJopIeBQMBCKqELIZYBGQBXbFlFQEnhQYPZABWsTQClhSFRgAACV+qLzGeCQyEUABkA0exKxgDABqFEK5NujUCABMGhFUCBLCM1YUqngAOhEMBAEGLIh8hCkAQylFvBiEq2TAsQnCsgIJCMCotIFSi0oFF44RdJJShkg+KlSwsamBLAAlCOyqR0UGI0oAsjDaMmEjoBjYAEQhVABDgii4bniARUsKzSKwU2CzwIGTgQCUgoiL8MFVARiEhN8WIcoEtQIsehRBgy4BDlYMABCQU4nAswBZdKDPUFtJSQJgTXYq8EIgSYApeQ2CCCZjwt9CTAOgSjCk8qKmAAQ/CMR6EhAyBJZMLUeASKRAAIfkEBR4AZQAsAAAAAB4AHgAAB0iAZYKDhIWGh4iJiouMjY6PkJGSk5SVlDiWmZqblAycZSIfIQogmwgCZAUKmxADZAAHmw0EZAIknBsjC5+8vb6/wMHCw8TFvoEAIfkEBR4AZQAsCgAGAAgAFgAAB2aAZYIsgoVlFQEnhjQCZAIUhS8xAWQJDIUrGAMAGoY1AgATBoUqlAAOhTmmM4YwZGQLhhmvPoU7r2Q6hTcAZAARhTaUF4UpvRY8ZRE/AAMFMoIuvQEtPYUOAQQShmUo29zg4eLho4EAIfkEBR4AZQAsEQAAAAkAHgAAB6KAZWUmHoKGZQ0BF4dlHWRkAmGHHEwBZAkmh0RSAAMFSYceBQMBCIxYBGQBXYcGD2QAVoxGAAAJX4dQAGQDR4wQpE2MVQIEpodDAQBBjFS8GIwljwfRjxaMjgNZjBUAAVeMSt5FrQePQIdCuwBihwi7GTiGHAKqW4daBbBOhl4EUQGmGALzSsAEQ08CCLA1xtABAQMeaDiEhAyBJYzKUOCSMRAAOw==" /***/ }), /***/ "XhzF": /***/ (function(module, exports) { // removed by extract-text-webpack-plugin module.exports = {"personList":"personList___2JXI8","ellipsis":"ellipsis___35sBO","icon":"icon___14R8p","depart":"depart___w9oYh","personItem":"personItem___3F1NY","dark":"dark___2n_Bc","detail":"detail___2BIm9"}; /***/ }), /***/ "Xn8A": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; __webpack_require__("GKDd"); var _pagination = _interopRequireDefault(__webpack_require__("BJfm")); __webpack_require__("crfj"); var _button = _interopRequireDefault(__webpack_require__("zwGx")); __webpack_require__("baa2"); var _icon = _interopRequireDefault(__webpack_require__("FC3+")); __webpack_require__("LHBr"); var _input = _interopRequireDefault(__webpack_require__("A+AJ")); var _objectSpread2 = _interopRequireDefault(__webpack_require__("+TWC")); var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); var _dva = __webpack_require__("S6G3"); var _router = __webpack_require__("7xWd"); var _TypeData = __webpack_require__("HV3m"); var _api = __webpack_require__("H/Zg"); var _AttendanceItem = _interopRequireDefault(__webpack_require__("pX1H")); var _dec, _class; /** *所有驻勤点 */ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } var AllAttendance = exports.default = (_dec = (0, _dva.connect)(function (state) { return { selectedId: state.command.attendanceList.selectedId, tabIndex2: state.command.tabIndex.attendance.tabIndex2 }; }), _dec(_class = (0, _router.withRouter)(_class = /*#__PURE__*/function (_Component) { function AllAttendance(props) { var _this; (0, _classCallCheck2.default)(this, AllAttendance); _this = _callSuper(this, AllAttendance, [props]); console.log(props); _this.state = { tabKey: "1", //tab currentKey: null, //主要用于处理tab页面改变,不让重新请求数据 data: _TypeData.data, searchData: { //搜索数据 pageNumber: 1, pageSize: 9, taskName: "" }, selectedIndex: null, //选中哪个列表 selectedAttenData: null, //选中的驻勤点的信息 total: 0, //搜索总页数 attendanceList: [], //搜索出的驻勤点的数据 height: null, //搜索列表的最大高度 loadingText: "暂无数据" }; return _this; } (0, _inherits2.default)(AllAttendance, _Component); return (0, _createClass2.default)(AllAttendance, [{ key: "componentDidMount", value: function componentDidMount() { var height = document.documentElement.clientHeight - 120 - 130 - 40; this.setState({ height: height }); this.getAttendanceList(1); //默认页面中是空搜索 } }, { key: "componentWillReceiveProps", value: function componentWillReceiveProps(nextProps) { if (nextProps.tabIndex2 == this.state.tabKey && nextProps.tabIndex2 !== this.state.currentKey) { this.setState({ currentKey: nextProps.tabIndex2 }); this.getAttendanceList(this.state.searchData.pageNumber); } if (nextProps.tabIndex2 != this.state.tabKey) { this.setState({ currentKey: null }); } } //获取搜索值 }, { key: "getAttendanceList", value: function getAttendanceList(pageNumber) { var _this2 = this; // this.props.attenPersonList([]); //先重置分页数据 this.setState({ searchData: (0, _objectSpread2.default)({}, this.state.searchData, { pageNumber: pageNumber }), selectedIndex: null, //清空驻勤的点击哪个列表的信息 selectedAttenData: null, loadingText: "正在加载中..." }, function () { (0, _api.getTaskList)({ _currpage: _this2.state.searchData.pageNumber, lines: _this2.state.searchData.pageSize }, { attendanceSiteName: _this2.state.searchData.taskName }).then(function (res) { var data = _this2.state.data; var attendanceList = res.data.data; _this2.props.dispatch({ type: "command/setSelectIndex", payload: null }); _this2.props.dispatch({ type: "command/clearInfoWindow", payload: true }); for (var i = 0; i < attendanceList.length; i++) { //对数据字段重新组装 attendanceList[i].lnglat = attendanceList[i].attendanceSiteLongitude ? [attendanceList[i].attendanceSiteLongitude, attendanceList[i].attendanceSiteLatitude] : ''; delete attendanceList[i].attendanceSiteLongitude; delete attendanceList[i].attendanceSiteLatitude; attendanceList[i].taskName = attendanceList[i].attendanceSiteName; delete attendanceList[i].attendanceSiteName; attendanceList[i].name = attendanceList[i].principalName; delete attendanceList[i].principalName; attendanceList[i].mobilePhone = attendanceList[i].principalPhoneNo; delete attendanceList[i].principalPhoneNo; attendanceList[i].idCardNo = attendanceList[i].principalIdCardNo; delete attendanceList[i].principalIdCardNo; attendanceList[i].taskAddress = attendanceList[i].attendanceSiteFullAddress; delete attendanceList[i].attendanceSiteFullAddress; attendanceList[i].perNum = attendanceList[i].attendanceSiteNum; delete attendanceList[i].attendanceSiteNum; attendanceList[i].serviceObjectTypeName = attendanceList[i].attendanceSiteType; delete attendanceList[i].attendanceSiteType; attendanceList[i].comTaskId = attendanceList[i].id; delete attendanceList[i].id; for (var j = 0; j < data.length; j++) { if (attendanceList[i].serviceObjectTypeName == data[j].title) { attendanceList[i].markerIcon = data[j].markerIcon; attendanceList[i].clickMarkerIcon = data[j].clickMarkerIcon; } } if (!attendanceList[i].markerIcon) { attendanceList[i].markerIcon = data[data.length - 1].markerIcon; attendanceList[i].clickMarkerIcon = data[data.length - 1].clickMarkerIcon; } } _this2.setState({ attendanceList: attendanceList, total: res.data.total, loadingText: res.data.data.length > 0 ? "加载完成" : "暂无数据" }); _this2.props.dispatch({ type: "command/fetchAllAttendanceList", payload: { attendanceList: attendanceList } }); }); }); } }, { key: "render", value: function render() { var _this3 = this; return /*#__PURE__*/_react.default.createElement("div", { className: "data-list" }, /*#__PURE__*/_react.default.createElement("div", { className: "input" }, /*#__PURE__*/_react.default.createElement(_input.default, { placeholder: "\u8BF7\u8F93\u5165\u9A7B\u52E4\u70B9\u540D\u79F0:", style: { width: 270 }, onChange: function onChange(e) { _this3.setState({ searchData: (0, _objectSpread2.default)({}, _this3.state.searchData, { taskName: e.target.value.trim() }) }); }, onPressEnter: function onPressEnter() { //按下回车获取列表值 _this3.getAttendanceList(1); } }), /*#__PURE__*/_react.default.createElement(_button.default, { type: "primary", onClick: function onClick() { //获取搜索值 _this3.getAttendanceList(1); } }, /*#__PURE__*/_react.default.createElement(_icon.default, { type: "search", style: { fontSize: "16px" } }))), /*#__PURE__*/_react.default.createElement("div", { className: "security search-list_command amap_lib_placeSearch" }, /*#__PURE__*/_react.default.createElement("div", { className: "list", style: { maxHeight: this.state.height, overflow: "auto" } }, /*#__PURE__*/_react.default.createElement(_AttendanceItem.default, { data: this.state.attendanceList, loadingText: this.state.loadingText })), /*#__PURE__*/_react.default.createElement(_pagination.default, { total: this.state.total, size: "small", onChange: function onChange(number) { _this3.getAttendanceList(number); }, defaultPageSize: this.state.searchData.pageSize, current: this.state.searchData.pageNumber, style: { display: this.state.total > 1 ? "block" : "none" } }))); } }]); }(_react.Component)) || _class) || _class); /***/ }), /***/ "Xusr": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("jlIA")); var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i.return) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); } function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, _regeneratorDefine2(e, r, n, t); } var ShareClient = exports.default = /*#__PURE__*/function () { function ShareClient(options) { (0, _classCallCheck2.default)(this, ShareClient); this.sdkAppId_ = options.sdkAppId; this.userId_ = options.userId; this.userSig_ = options.userSig; this.roomId_ = options.roomId; this.isJoined_ = false; this.isPublished_ = false; this.localStream_ = null; this.client_ = TRTC.createClient({ mode: 'rtc', sdkAppId: this.sdkAppId_, userId: this.userId_, userSig: this.userSig_ }); this.client_.setDefaultMuteRemoteStreams(true); this.handleEvents(); } return (0, _createClass2.default)(ShareClient, [{ key: "join", value: function () { var _join = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator().m(function _callee() { var _this = this; var _t, _t2; return _regenerator().w(function (_context) { while (1) switch (_context.p = _context.n) { case 0: if (!this.isJoined_) { _context.n = 1; break; } console.warn('duplicate RtcClient.join() observed'); return _context.a(2); case 1: _context.p = 1; _context.n = 2; return this.client_.join({ roomId: this.roomId_ }); case 2: console.log('ShareClient join room success'); this.isJoined_ = true; // create a local stream for screen share this.localStream_ = TRTC.createStream({ // disable audio as RtcClient already enable audio audio: false, // enable screen share screen: true, userId: this.userId_ }); _context.p = 3; _context.n = 4; return this.localStream_.initialize(); case 4: console.log('ShareClient initialize local stream for screen share success'); this.localStream_.on('player-state-changed', function (event) { console.log("local stream ".concat(event.type, " player is ").concat(event.state)); }); this.localStream_.on('screen-sharing-stopped', function (event) { console.log('share stream video track enned'); _this.leave(); // document.getElementById('screen-btn').setAttribute("src",require('../../../assets/images/prevention/screen-off.png')) // $('#screen-btn').attr('src', './img/screen-off.png'); }); // publish the screen share stream _context.n = 5; return this.client_.publish(this.localStream_); case 5: _context.n = 8; break; case 6: _context.p = 6; _t = _context.v; console.error('ShareClient failed to initialize local stream - ' + _t); //用户取消分享屏幕导致推流失败 _context.n = 7; return this.client_.leave(); case 7: this.isJoined_ = false; // document.getElementById('screen-btn').setAttribute("src",require('../../../assets/images/prevention/screen-off.png')) // $('#screen-btn').attr('src', 'img/screen-off.png'); case 8: _context.n = 10; break; case 9: _context.p = 9; _t2 = _context.v; console.error('ShareClient join room failed! ' + _t2); case 10: return _context.a(2); } }, _callee, this, [[3, 6], [1, 9]]); })); function join() { return _join.apply(this, arguments); } return join; }() }, { key: "leave", value: function () { var _leave = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator().m(function _callee2() { return _regenerator().w(function (_context2) { while (1) switch (_context2.n) { case 0: if (this.isJoined_) { _context2.n = 1; break; } console.warn('leave() - please join() firstly'); return _context2.a(2); case 1: if (!this.isPublished_) { _context2.n = 3; break; } _context2.n = 2; return this.client_.unpublish(this.localStream_); case 2: this.isPublished_ = false; case 3: _context2.n = 4; return this.client_.leave(); case 4: if (this.localStream_) { this.localStream_.close(); this.localStream_ = null; } this.isJoined_ = false; case 5: return _context2.a(2); } }, _callee2, this); })); function leave() { return _leave.apply(this, arguments); } return leave; }() }, { key: "handleEvents", value: function handleEvents() { this.client_.on('error', function (err) { console.error(err); alert(err); }); this.client_.on('client-banned', function (err) { console.error('client has been banned for ' + err); }); // fired when a remote peer is joining the room this.client_.on('peer-join', function (evt) { var userId = evt.userId; console.log('peer-join ' + userId); }); // fired when a remote peer is leaving the room this.client_.on('peer-leave', function (evt) { var userId = evt.userId; console.log('peer-leave ' + userId); }); // fired when a remote stream is added this.client_.on('stream-added', function (evt) { var remoteStream = evt.stream; var id = remoteStream.getId(); var userId = remoteStream.getUserId(); console.log("remote stream added: [".concat(userId, "] ID: ").concat(id, " type: ").concat(remoteStream.getType())); console.log('subscribe to this remote stream'); }); // fired when a remote stream has been subscribed this.client_.on('stream-subscribed', function (evt) { var uid = evt.userId; var remoteStream = evt.stream; var id = remoteStream.getId(); remoteStream.on('player-state-changed', function (event) { console.log("".concat(event.type, " player is ").concat(event.state)); }); console.log('stream-subscribed ID: ', id); }); // fired when the remote stream is removed, e.g. the remote user called Client.unpublish() this.client_.on('stream-removed', function (evt) { var remoteStream = evt.stream; var id = remoteStream.getId(); console.log("stream-removed ID: ".concat(id, " type: ").concat(remoteStream.getType())); }); this.client_.on('stream-updated', function (evt) { var remoteStream = evt.stream; console.log('type: ' + remoteStream.getType() + ' stream-updated hasAudio: ' + remoteStream.hasAudio() + ' hasVideo: ' + remoteStream.hasVideo() + ' uid: ' + uid); }); this.client_.on('mute-audio', function (evt) { console.log(evt.userId + ' mute audio'); }); this.client_.on('unmute-audio', function (evt) { console.log(evt.userId + ' unmute audio'); }); this.client_.on('mute-video', function (evt) { console.log(evt.userId + ' mute video'); }); this.client_.on('unmute-video', function (evt) { console.log(evt.userId + ' unmute video'); }); } }]); }(); /***/ }), /***/ "Y/Jx": /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; /** * Created by hustcc on 18/6/9. * Contract: i@hust.cc */ var id = 1; /** * generate unique id in application * @return {string} */ var _default = function _default() { return "".concat(id++); }; exports["default"] = _default; /***/ }), /***/ "YH+2": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__style_index_less__ = __webpack_require__("vtiu"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__style_index_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__style_index_less__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__index_less__ = __webpack_require__("4iE9"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__index_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__index_less__); /***/ }), /***/ "YNzw": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; var Browser = (function () { function Browser() { this.firefox = false; this.ie = false; this.edge = false; this.newEdge = false; this.weChat = false; } return Browser; }()); var Env = (function () { function Env() { this.browser = new Browser(); this.node = false; this.wxa = false; this.worker = false; this.svgSupported = false; this.touchEventsSupported = false; this.pointerEventsSupported = false; this.domSupported = false; this.transformSupported = false; this.transform3dSupported = false; this.hasGlobalWindow = typeof window !== 'undefined'; } return Env; }()); var env = new Env(); if (typeof wx === 'object' && typeof wx.getSystemInfoSync === 'function') { env.wxa = true; env.touchEventsSupported = true; } else if (typeof document === 'undefined' && typeof self !== 'undefined') { env.worker = true; } else if (!env.hasGlobalWindow || 'Deno' in window) { env.node = true; env.svgSupported = true; } else { detect(navigator.userAgent, env); } function detect(ua, env) { var browser = env.browser; var firefox = ua.match(/Firefox\/([\d.]+)/); var ie = ua.match(/MSIE\s([\d.]+)/) || ua.match(/Trident\/.+?rv:(([\d.]+))/); var edge = ua.match(/Edge?\/([\d.]+)/); var weChat = (/micromessenger/i).test(ua); if (firefox) { browser.firefox = true; browser.version = firefox[1]; } if (ie) { browser.ie = true; browser.version = ie[1]; } if (edge) { browser.edge = true; browser.version = edge[1]; browser.newEdge = +edge[1].split('.')[0] > 18; } if (weChat) { browser.weChat = true; } env.svgSupported = typeof SVGRect !== 'undefined'; env.touchEventsSupported = 'ontouchstart' in window && !browser.ie && !browser.edge; env.pointerEventsSupported = 'onpointerdown' in window && (browser.edge || (browser.ie && +browser.version >= 11)); env.domSupported = typeof document !== 'undefined'; var style = document.documentElement.style; env.transform3dSupported = ((browser.ie && 'transition' in style) || browser.edge || (('WebKitCSSMatrix' in window) && ('m11' in new WebKitCSSMatrix())) || 'MozPerspective' in style) && !('OTransition' in style); env.transformSupported = env.transform3dSupported || (browser.ie && +browser.version >= 9); } /* harmony default export */ __webpack_exports__["a"] = (env); /***/ }), /***/ "YWwU": /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports._DEFAULT_MAP_ZOOMS = exports._DEFAULT_MAP_ZOOM = exports._DEFAULT_MAP_CENTER_POINT = exports._BEIJING_MAP_POINT = void 0; var _DEFAULT_MAP_ZOOM = exports._DEFAULT_MAP_ZOOM = 12; // 默认地图级别 var _DEFAULT_MAP_ZOOMS = exports._DEFAULT_MAP_ZOOMS = [3, 20]; // 设置默认地图级别范围 var _DEFAULT_MAP_CENTER_POINT = exports._DEFAULT_MAP_CENTER_POINT = { // 默认地图中心点 LATITUDE: -75.672462, LONGITUDE: 35.512837 }; var _BEIJING_MAP_POINT = exports._BEIJING_MAP_POINT = { // 北京坐标 LATITUDE: 116.345052, LONGITUDE: 40.263788 }; /***/ }), /***/ "YeOf": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAbCAYAAAB4Kn/lAAAAAXNSR0IArs4c6QAAAtpJREFUSA29VU1rU0EUzXtpviBSTMnCukiC5gPBXaGrVFFXCom77gV/gKCIBVdCRRT8AYJ7dybgrha1q0J2YmkTIX0LKySkUhLIF0k85zFTbvLei9JFBx535t5zz5y5M2/G8M1pzWbzwvHx8WNACpPJ5CqhhmH8hCnHYrE38Xi8TZ9bM9yc9O3v79+CeY8vwbFLs+B7kMvltl1iPtPNSVIo20IsAbvj9/sL4XB4mR/79KnYlhLgoHEo5vJbrdZ3lbiZyWSeg2gsM1EWs1qtvoDdgN9aWlq6PlsWh2JVU1upGykn4EQqZitXOXJu11IUiTBN8/WsUpnJGDHKV5Ax9h2KsbwrDAQCgQrtvKYx+sRIrIMYwSgByWTytwS69QXGzpGYBTmQfez2RI9xpKY2WcY0Zta6KZ7FnGnsqXhWpWSXMS/1569YKpEKqVzG5Epk//wVz6qUamTMS/3CwcHBJyZls9l7Mvmsfc1n4q9Zw3e30WjoQ94h6eHh4aV/kQuMncMLjFzkZI2PSNDpdC7T4g7gRe4bDocrtPOaxuicdru9rPBHJpx7HAC0ppxl2vF4/AQze24uY8TIHM0Bzh8kLqngOi2fHBgLiXl15zrISapieWJVDtNtDnCWDcuyLvZ6vTrAi3gdbqbT6a/YafsFgQ8YY4fXo77JuHy1mjxigEzu4JRs12q1G6PR6At8J3hpUvblgp18BsAmZqxFIpHVRCLxh+QY/9ebR3HdbncX+DSIN3DCXtrE9Xo93O/3+RqsUCFmLJJcvNJFTGzf04hPvdJqxSXEWZZKKBTKp1Kp3ul1CNU8FbsA0NZQlocsC/qeTS3/HQBU+gt2FWppfafEHJAcxB/RtY8awJ/R/4D6fotGo3YCj6Xa/XVgbzMPrQLsfU1KxxQxHSzLYDB4hO5TJC7S59VAdoLYq2Aw+JbLlzgHsQ6ydqg7a8vvGvynhx+Ee/hKqGeJe6FzpP0LVPttoJtaloYAAAAASUVORK5CYII=" /***/ }), /***/ "Z1a+": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAAAXNSR0IArs4c6QAAAtBJREFUWEftl9uLzVEUxz9flOQyLn+CRvKGmQe3RsnLPCCUB+TejDDjhb9BiRCjxkzNUJQHD1JSHqQMMUjeyIMHeRCD3CaXpTXt39jnOGfm95s5N2XX72Wfvb/rc9Zae++1RI0N1RgP/w6QmU2A1MAm6VcpvJ3jITPbAOwFFgGzMhoYAB4BHZKuZNw7vHwIyMymAaeBbWMVytvXAxyQ9CmrXgLUDezM2+whsJSCruMhjke3pN0p9//xkJktBu4HQQc4BZwBXqTNi5Bvc90r4XMD/ocaJXkYUw+ZWeydHkk7Uu8usNDMPFxJ6Ef0kplNcglJPxIpB+oDloSJBkkPxwnUADwIGnclLc3XM7OZwAlgEzARuAS0SvrqQO+iE1Un6eM4gWYAH4LGgKTZsZ6ZzQeuAvV5dm5KWu1Aw4krqSQXZTFNM2sGLgJ1EYzbT+zOqxiQmR0CjkSn8XPItXZgRQBcWXYgYApwDtgSeeUlsFbSEzO7BTRVEsgTvDGCuQ1slPTG56oBFOduJ7Bf0vdkslpAfs+0S+oocAVUPGRPgTZJbvivUQ0PPQtAN2oFyDl+AoclHa+FkMUMvUCLpMFqJvUdYFlEdQ9YL+l1tY79ZK8igV0R1CtgnaT+iid18j6aWRtwDBgqOYBvgBdwrcDyMNdU9qcjfrDNbBVwGcipACLP1Zej/PCX/P0I5YdXll5+LMg7cdclNTuQJ11SRHnJ2V/ovkg7Z2b+bnlJ7KNPUpzQQ5NmNh04CmwOIbwQmoJBB+qKEq5X0va0xotcdOeBreG3Lkl7iumZeTunnEbCgbwH8xc56Rr8RPj3PFxoafg8Ub0C3BeS1Pd4ke8l8eM0AsmapA3yeiVzyzKKoU5JLVlgfG0CNBU4mXdXZNWK1/sfPCjpS1aR/FZ6TXD5QmBOgeavmL6H521opc9KupYVJCdkY91cjn0l6TJKCfYfaDRv/gYuAGZGEX2aQgAAAABJRU5ErkJggg==" /***/ }), /***/ "Z3I/": /***/ (function(module, exports) { module.exports = "data:image/png;base64,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" /***/ }), /***/ "ZFdq": /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SizeSensorId = exports.SensorTabIndex = exports.SensorClassName = void 0; /** * Created by hustcc on 18/6/9. * Contract: i@hust.cc */ var SizeSensorId = 'size-sensor-id'; exports.SizeSensorId = SizeSensorId; var SensorClassName = 'size-sensor-object'; exports.SensorClassName = SensorClassName; var SensorTabIndex = '-1'; exports.SensorTabIndex = SensorTabIndex; /***/ }), /***/ "ZKAp": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.APictureAddPictueMarks = APictureAddPictueMarks; exports.APictureReducePictueMarks = APictureReducePictueMarks; __webpack_require__("UQ5M"); var _message2 = _interopRequireDefault(__webpack_require__("/qCn")); var _markMarkers = __webpack_require__("CEIq"); var _securityResource = _interopRequireDefault(__webpack_require__("V8Q4")); var _securityResourceChecked = _interopRequireDefault(__webpack_require__("vD6o")); var _securityCompany = _interopRequireDefault(__webpack_require__("0vbU")); var _attendancePoint = _interopRequireDefault(__webpack_require__("6Mj6")); var _searchAddress = _interopRequireDefault(__webpack_require__("6upA")); var _utils = __webpack_require__("oAV5"); /** * 这里主要是抽离出一张图图层放在GIS的公共方法 * @param where:数据展示(‘’)/周边搜索( searchAround ) */ //一张图数据展示的增加打点 function APictureAddPictueMarks(addData, type) { var where = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ''; if (addData.data.length == 0) { return _message2.default.warning("该分类暂无打点数据"); } console.log('查看打点信息', addData, type); switch (type) { case 'searchAddress': addData.mapIcon = _searchAddress.default; break; case 'securityResource': case 'attendancePolice': addData.mapIcon = _securityResource.default; addData.clickMarkerIcon = _securityResourceChecked.default; break; case 'securityCompany': addData.mapIcon = _securityCompany.default; break; case 'attendancePoint': addData.mapIcon = _attendancePoint.default; break; } var pictureMarkers = _markMarkers.markPicture.call(this, addData, type, where); var pictureMarks = pictureMarkers.pictureMarks, pictureDatas = pictureMarkers.pictureDatas; if (pictureMarks.length == 0) { return _message2.default.warning("该分类暂无打点数据"); } this.state.map.add(pictureMarks); this.state.map.setFitView(pictureMarks); if (!where) { //添加打点位置到缓存 this.props.dispatch({ type: "command/setPictureMarks", payload: { options: 'add', type: type, name: !(0, _utils.isEmpty)(addData.name) ? addData.name : type, markerData: pictureMarks, pictureDatas: pictureDatas } }); } else { //添加打点位置到缓存 this.props.dispatch({ type: "command/setSearchViewMark", payload: { options: 'add', name: !(0, _utils.isEmpty)(addData.name) ? addData.name : type, type: where.type, markerData: pictureMarks, pictureDatas: pictureDatas } }); } } //一张图数据展示的减少打点 function APictureReducePictueMarks(reduceData, type) { var where = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ''; if (reduceData && reduceData.data && reduceData.data.length > 0) { this.state.map.remove(reduceData.data); //清除打点信息(因为每次打点的信息都是不一样的,需要随时更新) if (!where) { this.props.dispatch({ type: "command/setPictureMarks", payload: { options: 'reduce', type: type, name: !(0, _utils.isEmpty)(reduceData.name) ? reduceData.name : type, markerData: reduceData.data } }); } else { //添加打点位置到缓存 this.props.dispatch({ type: "command/setSearchViewMark", payload: { options: 'reduce', type: where.type, name: !(0, _utils.isEmpty)(reduceData.name) ? reduceData.name : type, markerData: reduceData.data } }); } } } /***/ }), /***/ "ZT2e": /***/ (function(module, exports, __webpack_require__) { var baseToString = __webpack_require__("o2mx"); /** * Converts `value` to a string. An empty string is returned for `null` * and `undefined` values. The sign of `-0` is preserved. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to convert. * @returns {string} Returns the converted string. * @example * * _.toString(null); * // => '' * * _.toString(-0); * // => '-0' * * _.toString([1, 2, 3]); * // => '1,2,3' */ function toString(value) { return value == null ? '' : baseToString(value); } module.exports = toString; /***/ }), /***/ "ZZIB": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /** * 所有地图图层 */ var AllMapLayer = exports.default = /*#__PURE__*/function (_Component) { function AllMapLayer(props) { var _this; (0, _classCallCheck2.default)(this, AllMapLayer); _this = _callSuper(this, AllMapLayer, [props]); _this.state = {}; return _this; } (0, _inherits2.default)(AllMapLayer, _Component); return (0, _createClass2.default)(AllMapLayer, [{ key: "componentDidMount", value: function componentDidMount() {} }, { key: "componentWillReceiveProps", value: function componentWillReceiveProps(props) {} }, { key: "render", value: function render() { var _this$props = this.props, layerSatatus = _this$props.layerSatatus, showEarchMap = _this$props.showEarchMap; var currentLayerSatatus = showEarchMap ? 'earth' : layerSatatus; // currentLayerSatatus = layerSatatus; // let layerSatatus = "earth" return /*#__PURE__*/_react.default.createElement("div", { style: { height: '100%' } }, /*#__PURE__*/_react.default.createElement("div", { style: { width: innerWidth, // height: 'calc(100vh - 72px)', height: "calc(100vh)", // height: "100%", display: currentLayerSatatus === "attendance" ? "block" : "none" }, className: "App", id: "map_container" }), /*#__PURE__*/_react.default.createElement("div", { style: { width: innerWidth, // height: "calc(100vh)", height: "100%", display: currentLayerSatatus === "aPicture" ? "block" : "none" }, className: "App", id: "map_container2" }), /*#__PURE__*/_react.default.createElement("div", { style: { width: innerWidth, height: "calc(100vh)", display: currentLayerSatatus === "person" ? "block" : "none" }, className: "App", id: "map_container3" }), /*#__PURE__*/_react.default.createElement("div", { style: { width: innerWidth, height: "calc(100vh)", display: currentLayerSatatus === "police" ? "block" : "none" }, className: "App", id: "map_container4" }), /*#__PURE__*/_react.default.createElement("div", { style: { width: innerWidth, height: "calc(100vh)", display: currentLayerSatatus === "nanNing" ? "block" : "none" }, className: "App", id: "map_container5" }), /*#__PURE__*/_react.default.createElement("div", { style: { width: '100%', // height: "calc(100vh)", height: '100%', display: currentLayerSatatus === "earth" ? "block" : "none", // opacity: currentLayerSatatus === "earth"? 1: 0, // transition: '2s all ease-in', zIndex: 20 }, className: "App anchorBL", id: "map_container6" })); } }]); }(_react.Component); /***/ }), /***/ "ZdlR": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAAAXNSR0IArs4c6QAAA6lJREFUWEfNmEtoXGUUx3/nTkwjNDNTiZUG6jIiLl1o0xbaYhTRhc+KYLrxsdPOTEIUdZGFisZkZqo7HwujIFarLhTRSFJoG3XRpUiztJBiDXZmEjCNmfuX7zoTbsZ53NSAd1bDd88593f/55zvZWzxl3pBu7w17qv6DBncLKPfRL8LI2PRxKLg14THjN/N1+XX7cpWXmFRjdNZPSh4VnAQ0RXJz1g3OGPwdqlgX0Tx6Qi0K6P9VWMCMRglYEsbYz4hxq4U7Vy7OC2BHj2pxLc/MIU4vimA4SPmPeNLEpzv8lm0JItByir0r3v0U+V2XzyAMYjwGvxP3LOPkU+PWrUZWFOg9LjSKnFSMLThZKya8VaPx9Rvk3Y5ilo3jWr3qs+IxHOInrqPwYylOVoat1JjnH8BORi/xDxw60YA41TCyP6Rt4tRQBptbshpb1UUJB4OPfvFSzPYCLUJyKXpu3m+CSkjM14uF+y1awFp9Ell9aLEK0DwXqfU3YPcG07fJqBkVsVQzcg8Hi/n7ZPtgKnHSOX0mHw+rkNhnKgULBNK5z9/g26Cs6E0vbRdyrRQ6tX6eAIO1LtvQ6FkVufqrW3GqXLBHtlOZZpAfbZRU8Z8pWD7a2kEN+n54vPAyVjtMgautYCjfoQr9HWxUO8+z3jITZ6BQqmsZiUOBzweE+W8PR818H+xS+X0hnzGgvcac+WCHTG3Nukql4PlwPCvT7AnyjwjydIjPCWfJw1uc0EFP5vH+6Up3jMzdYJ189SfVS4Fk6dbZnaw29IZDfswXXM+WynawU6B+jLa85fxkcSRZrZmzF4nnlgq2qVOsZIZnQEOODsPjlkyq2nEcDBgjJYKNtUuSKBMju9bwYS6dLaU565OSqWzGvHFZK1+P7RURnOCQwFQF4dLk3a6HVAqp6fl806nL6/V4zPlvL3bzjY9qkP+OnO1DjvtFLqAGHAD3R63LOVtoV2AZEY/AndEAQJ+qhTtzna2fTkNrPlcqCm04BRaFux0AzvS9P4+bittFQrZd4IyWCkXrbed3Y3j2nm1xHJNoRVLZVWRCJy6u0kuTVjwsNUv/AHbAdQ3pt61NSoBkLEcy5TFrKgz+gA49n+1fSqjUcGbtfRPx2piTHgMx2/pcFLFanF1QLHbfjioWG3QHFDstrA1leKzyXdAsTsGBQUep4NifbGM1VG6DhWry4bwtiI21zGNe53YXFg1grljk61yv28Mmdjb9ErPuOiJGfXw1Vav9P4G4Qdlc64BU8YAAAAASUVORK5CYII=" /***/ }), /***/ "ZuEy": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAFo9M/3AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAEKADAAQAAAABAAAAEAAAAAA0VXHyAAABxElEQVQ4EaVTMUvDUBB+9xLFWrU6WIeqo+Do4g8QVHBydBIEIW1FQbCLJhISB0GpDtoQHAR1cnAUdLCbi5MOIjiIOAit2KJ0EE2e7xKfTSCi4C133/e+u3t3LyEkaKppVetYNQrsGyEIEeIknPPFgmZYp4ywYcQry1mg5nJmBIHcGutAH7LVVTsByIgOAHAMlK4bS0pRKCkGMkij6BljY67jnNm23YAYzRPomnKKoKdLasTGDyW3rG/stiP3fwPV3Okn7P0aCDwzIPlEU3wzl5usidKhKeokbPH5ZxHLghQegByZmn+InDcFAXKFACgpMgK9GAvzBBRg3ctUs0MykBn+ChdCEOn1FWvwV1E+fxjDbG8K3bab3ZK7yOGdS6RzU52+4e9S/yQi+/ikX4Ax6phWhWe0RWm56IPzlwB029DSu0GN/5YALu+4ETwIxrywzO96n0rCQZDH+HvPNNGaZ9UXjYv91QolkIock/r0BeVJUEHvjSAIzShYvEAaMa69OylNPJbdgQ9G8Gu7lVuahvX5qcDP87VEUWBtbS/++lYbT3XSQ0VR3gWPHp8mqlDoBsGEn2Is5LjsBCjMGWpm/yfdn/lPM5SYCSSRiz4AAAAASUVORK5CYII=" /***/ }), /***/ "Zx67": /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__("fS6E"), __esModule: true }; /***/ }), /***/ "a0e6": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; __webpack_require__("/m1I"); var _tooltip = _interopRequireDefault(__webpack_require__("O6j2")); var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); __webpack_require__("rLa/"); var _dva = __webpack_require__("S6G3"); var _recordHistory = __webpack_require__("eXDv"); var _events = _interopRequireDefault(__webpack_require__("TLe5")); var _dec, _class; /** * 搜索、资源图层按钮 */ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } // 引入 EventEmitter var LayerExtensionBtn = exports.default = (_dec = (0, _dva.connect)(function (state) { return { switchOpenStatus: state.command.switchOpenStatus, mapLayerSwitchState: state.command.mapLayerSwitchState, mapStyle: state.command.mapStyle }; }), _dec(_class = /*#__PURE__*/function (_Component) { function LayerExtensionBtn(props) { var _this; (0, _classCallCheck2.default)(this, LayerExtensionBtn); _this = _callSuper(this, LayerExtensionBtn, [props]); _this.state = {}; return _this; } (0, _inherits2.default)(LayerExtensionBtn, _Component); return (0, _createClass2.default)(LayerExtensionBtn, [{ key: "componentDidMount", value: function componentDidMount() {} }, { key: "componentWillReceiveProps", value: function componentWillReceiveProps(nextPorps) {} }, { key: "changeSwitchStatus", value: function changeSwitchStatus(param) { (0, _recordHistory.recordClean)(); // 清除地图所有标记 _events.default.emit('clearMapTag'); _events.default.emit('clearMapTag', 'searchAddress'); // 初始化右侧数据模块 _events.default.emit('initRightDataModule'); _events.default.emit('clearMapModal', 'ComponeyInfo'); _events.default.emit('clearSearchCircle'); _events.default.emit('clearMapModal', 'AttendInfo'); _events.default.emit('APictureChecked', { type: 'securityCompanyChecked', checked: false }); _events.default.emit('APictureChecked', { type: 'securityResourceChecked', checked: false }); this.props.dispatch({ type: "command/initMapLayerSwitchState" }); if (param == 'searchViews') { this.props.dispatch({ type: "command/setMapLayerSwitchState", payload: { type: 'searchViews', value: true } }); this.props.dispatch({ type: "command/setSwitchOpenStatus", payload: { type: 'right', value: false } }); } else if (param == 'eventViews') { this.props.dispatch({ type: "command/setMapLayerSwitchState", payload: { type: 'eventViews', value: true } }); this.props.dispatch({ type: "command/setSwitchOpenStatus", payload: { type: 'right', value: false } }); } else { this.props.dispatch({ type: "command/setMapLayerSwitchState", payload: { type: 'resourceViews', value: true } }); this.props.dispatch({ type: "command/setSwitchOpenStatus", payload: { type: 'right', value: true } }); } } // 渲染不同状态下的图标显示 }, { key: "_renderPicture", value: function _renderPicture(param, pictureName) { console.log('_renderPicture-param', param, pictureName); var mapStyle = this.props.mapStyle; switch (param) { case true: return __webpack_require__("jhz3")("./" + pictureName + "-active.png"); case false: if (mapStyle == 'dark') { return __webpack_require__("EMr2")("./" + pictureName + "-white.png"); } else { return __webpack_require__("vkd5")("./" + pictureName + ".png"); } } } }, { key: "render", value: function render() { var _this$props$mapLayerS = this.props.mapLayerSwitchState, searchViews = _this$props$mapLayerS.searchViews, resourceViews = _this$props$mapLayerS.resourceViews, eventViews = _this$props$mapLayerS.eventViews; var mapStyle = this.props.mapStyle; return /*#__PURE__*/_react.default.createElement("div", { className: "layer-extension-btn" }, /*#__PURE__*/_react.default.createElement(_tooltip.default, { title: "\u641C\u7D22\u56FE\u5C42" }, /*#__PURE__*/_react.default.createElement("div", { className: "layer-btn", onClick: this.changeSwitchStatus.bind(this, 'searchViews') }, /*#__PURE__*/_react.default.createElement("img", { className: "layer-img", src: this._renderPicture(searchViews, 'search') }))), /*#__PURE__*/_react.default.createElement(_tooltip.default, { title: "\u4E8B\u4EF6\u56FE\u5C42" }, /*#__PURE__*/_react.default.createElement("div", { className: "layer-btn", onClick: this.changeSwitchStatus.bind(this, 'eventViews') }, /*#__PURE__*/_react.default.createElement("img", { className: "layer-img", src: this._renderPicture(eventViews, 'event') }))), /*#__PURE__*/_react.default.createElement(_tooltip.default, { title: "\u8D44\u6E90\u56FE\u5C42" }, /*#__PURE__*/_react.default.createElement("div", { className: "layer-btn", onClick: this.changeSwitchStatus.bind(this, 'resourceViews') }, /*#__PURE__*/_react.default.createElement("img", { className: "layer-img", src: this._renderPicture(resourceViews, 'resource') })))); } }]); }(_react.Component)) || _class); /***/ }), /***/ "aOwA": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); // EXTERNAL MODULE: ./node_modules/react/index.js var react = __webpack_require__("GiK3"); var react_default = /*#__PURE__*/__webpack_require__.n(react); // EXTERNAL MODULE: ./node_modules/rc-menu/es/index.js + 11 modules var es = __webpack_require__("6gD4"); // EXTERNAL MODULE: ./node_modules/antd/node_modules/classnames/index.js var classnames = __webpack_require__("kTQ8"); var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); // EXTERNAL MODULE: ./node_modules/omit.js/es/index.js var omit_js_es = __webpack_require__("JkBm"); // EXTERNAL MODULE: ./node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js var react_lifecycles_compat_es = __webpack_require__("R8mX"); // EXTERNAL MODULE: ./node_modules/prop-types/index.js var prop_types = __webpack_require__("KSGD"); var prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types); // EXTERNAL MODULE: ./node_modules/@ant-design/create-react-context/lib/index.js var lib = __webpack_require__("83O8"); var lib_default = /*#__PURE__*/__webpack_require__.n(lib); // CONCATENATED MODULE: ./node_modules/antd/es/menu/MenuContext.js var MenuContext = lib_default()({ inlineCollapsed: false }); /* harmony default export */ var menu_MenuContext = (MenuContext); // CONCATENATED MODULE: ./node_modules/antd/es/menu/SubMenu.js function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _extends() { _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; }; return _extends.apply(this, arguments); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } var SubMenu_SubMenu = /*#__PURE__*/function (_React$Component) { _inherits(SubMenu, _React$Component); var _super = _createSuper(SubMenu); function SubMenu() { var _this; _classCallCheck(this, SubMenu); _this = _super.apply(this, arguments); _this.onKeyDown = function (e) { _this.subMenu.onKeyDown(e); }; _this.saveSubMenu = function (subMenu) { _this.subMenu = subMenu; }; return _this; } _createClass(SubMenu, [{ key: "render", value: function render() { var _this2 = this; var _this$props = this.props, rootPrefixCls = _this$props.rootPrefixCls, popupClassName = _this$props.popupClassName; return /*#__PURE__*/react["createElement"](menu_MenuContext.Consumer, null, function (_ref) { var antdMenuTheme = _ref.antdMenuTheme; return /*#__PURE__*/react["createElement"](es["d" /* SubMenu */], _extends({}, _this2.props, { ref: _this2.saveSubMenu, popupClassName: classnames_default()("".concat(rootPrefixCls, "-").concat(antdMenuTheme), popupClassName) })); }); } }]); return SubMenu; }(react["Component"]); SubMenu_SubMenu.contextTypes = { antdMenuTheme: prop_types["string"] }; // fix issue:https://github.com/ant-design/ant-design/issues/8666 SubMenu_SubMenu.isSubMenu = 1; /* harmony default export */ var menu_SubMenu = (SubMenu_SubMenu); // EXTERNAL MODULE: ./node_modules/antd/es/tooltip/index.js + 5 modules var tooltip = __webpack_require__("O6j2"); // EXTERNAL MODULE: ./node_modules/antd/es/layout/Sider.js + 1 modules var Sider = __webpack_require__("wbGf"); // CONCATENATED MODULE: ./node_modules/antd/es/menu/MenuItem.js function MenuItem__typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { MenuItem__typeof = function _typeof(obj) { return typeof obj; }; } else { MenuItem__typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return MenuItem__typeof(obj); } function MenuItem__extends() { MenuItem__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; }; return MenuItem__extends.apply(this, arguments); } function MenuItem__classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function MenuItem__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); } } function MenuItem__createClass(Constructor, protoProps, staticProps) { if (protoProps) MenuItem__defineProperties(Constructor.prototype, protoProps); if (staticProps) MenuItem__defineProperties(Constructor, staticProps); return Constructor; } function MenuItem__inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) MenuItem__setPrototypeOf(subClass, superClass); } function MenuItem__setPrototypeOf(o, p) { MenuItem__setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return MenuItem__setPrototypeOf(o, p); } function MenuItem__createSuper(Derived) { var hasNativeReflectConstruct = MenuItem__isNativeReflectConstruct(); return function _createSuperInternal() { var Super = MenuItem__getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = MenuItem__getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return MenuItem__possibleConstructorReturn(this, result); }; } function MenuItem__possibleConstructorReturn(self, call) { if (call && (MenuItem__typeof(call) === "object" || typeof call === "function")) { return call; } return MenuItem__assertThisInitialized(self); } function MenuItem__assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function MenuItem__isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } function MenuItem__getPrototypeOf(o) { MenuItem__getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return MenuItem__getPrototypeOf(o); } var __rest = this && this.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var MenuItem_MenuItem = /*#__PURE__*/function (_React$Component) { MenuItem__inherits(MenuItem, _React$Component); var _super = MenuItem__createSuper(MenuItem); function MenuItem() { var _this; MenuItem__classCallCheck(this, MenuItem); _this = _super.apply(this, arguments); _this.onKeyDown = function (e) { _this.menuItem.onKeyDown(e); }; _this.saveMenuItem = function (menuItem) { _this.menuItem = menuItem; }; _this.renderItem = function (_ref) { var siderCollapsed = _ref.siderCollapsed; var _this$props = _this.props, level = _this$props.level, children = _this$props.children, rootPrefixCls = _this$props.rootPrefixCls; var _a = _this.props, title = _a.title, rest = __rest(_a, ["title"]); return /*#__PURE__*/react["createElement"](menu_MenuContext.Consumer, null, function (_ref2) { var inlineCollapsed = _ref2.inlineCollapsed; var tooltipProps = { title: title || (level === 1 ? children : '') }; if (!siderCollapsed && !inlineCollapsed) { tooltipProps.title = null; // Reset `visible` to fix control mode tooltip display not correct // ref: https://github.com/ant-design/ant-design/issues/16742 tooltipProps.visible = false; } return /*#__PURE__*/react["createElement"](tooltip["default"], MenuItem__extends({}, tooltipProps, { placement: "right", overlayClassName: "".concat(rootPrefixCls, "-inline-collapsed-tooltip") }), /*#__PURE__*/react["createElement"](es["b" /* Item */], MenuItem__extends({}, rest, { title: title, ref: _this.saveMenuItem }))); }); }; return _this; } MenuItem__createClass(MenuItem, [{ key: "render", value: function render() { return /*#__PURE__*/react["createElement"](Sider["a" /* SiderContext */].Consumer, null, this.renderItem); } }]); return MenuItem; }(react["Component"]); MenuItem_MenuItem.isMenuItem = true; // EXTERNAL MODULE: ./node_modules/antd/es/config-provider/index.js + 1 modules var config_provider = __webpack_require__("PmSq"); // EXTERNAL MODULE: ./node_modules/antd/es/_util/warning.js var warning = __webpack_require__("qGip"); // EXTERNAL MODULE: ./node_modules/antd/es/_util/raf.js var raf = __webpack_require__("1wHS"); // EXTERNAL MODULE: ./node_modules/antd/es/_util/motion.js var _util_motion = __webpack_require__("JUD+"); // CONCATENATED MODULE: ./node_modules/antd/es/menu/index.js /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return menu_Menu; }); function menu__typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { menu__typeof = function _typeof(obj) { return typeof obj; }; } else { menu__typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return menu__typeof(obj); } function menu__extends() { menu__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; }; return menu__extends.apply(this, arguments); } 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; } function menu__classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function menu__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); } } function menu__createClass(Constructor, protoProps, staticProps) { if (protoProps) menu__defineProperties(Constructor.prototype, protoProps); if (staticProps) menu__defineProperties(Constructor, staticProps); return Constructor; } function menu__inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) menu__setPrototypeOf(subClass, superClass); } function menu__setPrototypeOf(o, p) { menu__setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return menu__setPrototypeOf(o, p); } function menu__createSuper(Derived) { var hasNativeReflectConstruct = menu__isNativeReflectConstruct(); return function _createSuperInternal() { var Super = menu__getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = menu__getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return menu__possibleConstructorReturn(this, result); }; } function menu__possibleConstructorReturn(self, call) { if (call && (menu__typeof(call) === "object" || typeof call === "function")) { return call; } return menu__assertThisInitialized(self); } function menu__assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function menu__isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } function menu__getPrototypeOf(o) { menu__getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return menu__getPrototypeOf(o); } var menu_InternalMenu = /*#__PURE__*/function (_React$Component) { menu__inherits(InternalMenu, _React$Component); var _super = menu__createSuper(InternalMenu); function InternalMenu(props) { var _this; menu__classCallCheck(this, InternalMenu); _this = _super.call(this, props); // Restore vertical mode when menu is collapsed responsively when mounted // https://github.com/ant-design/ant-design/issues/13104 // TODO: not a perfect solution, looking a new way to avoid setting switchingModeFromInline in this situation _this.handleMouseEnter = function (e) { _this.restoreModeVerticalFromInline(); var onMouseEnter = _this.props.onMouseEnter; if (onMouseEnter) { onMouseEnter(e); } }; _this.handleTransitionEnd = function (e) { // when inlineCollapsed menu width animation finished // https://github.com/ant-design/ant-design/issues/12864 var widthCollapsed = e.propertyName === 'width' && e.target === e.currentTarget; // Fix SVGElement e.target.className.indexOf is not a function // https://github.com/ant-design/ant-design/issues/15699 var className = e.target.className; // SVGAnimatedString.animVal should be identical to SVGAnimatedString.baseVal, unless during an animation. var classNameValue = Object.prototype.toString.call(className) === '[object SVGAnimatedString]' ? className.animVal : className; // Fix for , the width transition won't trigger when menu is collapsed // https://github.com/ant-design/ant-design-pro/issues/2783 var iconScaled = e.propertyName === 'font-size' && classNameValue.indexOf('anticon') >= 0; if (widthCollapsed || iconScaled) { _this.restoreModeVerticalFromInline(); } }; _this.handleClick = function (e) { _this.handleOpenChange([]); var onClick = _this.props.onClick; if (onClick) { onClick(e); } }; _this.handleOpenChange = function (openKeys) { _this.setOpenKeys(openKeys); var onOpenChange = _this.props.onOpenChange; if (onOpenChange) { onOpenChange(openKeys); } }; _this.renderMenu = function (_ref) { var getPopupContainer = _ref.getPopupContainer, getPrefixCls = _ref.getPrefixCls; var _this$props = _this.props, customizePrefixCls = _this$props.prefixCls, className = _this$props.className, theme = _this$props.theme, collapsedWidth = _this$props.collapsedWidth; var passProps = Object(omit_js_es["a" /* default */])(_this.props, ['collapsedWidth', 'siderCollapsed']); var menuMode = _this.getRealMenuMode(); var menuOpenMotion = _this.getOpenMotionProps(menuMode); var prefixCls = getPrefixCls('menu', customizePrefixCls); var menuClassName = classnames_default()(className, "".concat(prefixCls, "-").concat(theme), _defineProperty({}, "".concat(prefixCls, "-inline-collapsed"), _this.getInlineCollapsed())); var menuProps = menu__extends({ openKeys: _this.state.openKeys, onOpenChange: _this.handleOpenChange, className: menuClassName, mode: menuMode }, menuOpenMotion); if (menuMode !== 'inline') { // closing vertical popup submenu after click it menuProps.onClick = _this.handleClick; } // https://github.com/ant-design/ant-design/issues/8587 var hideMenu = _this.getInlineCollapsed() && (collapsedWidth === 0 || collapsedWidth === '0' || collapsedWidth === '0px'); if (hideMenu) { menuProps.openKeys = []; } return /*#__PURE__*/react["createElement"](es["e" /* default */], menu__extends({ getPopupContainer: getPopupContainer }, passProps, menuProps, { prefixCls: prefixCls, onTransitionEnd: _this.handleTransitionEnd, onMouseEnter: _this.handleMouseEnter })); }; Object(warning["a" /* default */])(!('onOpen' in props || 'onClose' in props), 'Menu', '`onOpen` and `onClose` are removed, please use `onOpenChange` instead, ' + 'see: https://u.ant.design/menu-on-open-change.'); Object(warning["a" /* default */])(!('inlineCollapsed' in props && props.mode !== 'inline'), 'Menu', '`inlineCollapsed` should only be used when `mode` is inline.'); Object(warning["a" /* default */])(!(props.siderCollapsed !== undefined && 'inlineCollapsed' in props), 'Menu', '`inlineCollapsed` not control Menu under Sider. Should set `collapsed` on Sider instead.'); var openKeys; if ('openKeys' in props) { openKeys = props.openKeys; } else if ('defaultOpenKeys' in props) { openKeys = props.defaultOpenKeys; } _this.state = { openKeys: openKeys || [], switchingModeFromInline: false, inlineOpenKeys: [], prevProps: props }; return _this; } menu__createClass(InternalMenu, [{ key: "componentWillUnmount", value: function componentWillUnmount() { raf["a" /* default */].cancel(this.mountRafId); } }, { key: "setOpenKeys", value: function setOpenKeys(openKeys) { if (!('openKeys' in this.props)) { this.setState({ openKeys: openKeys }); } } }, { key: "getRealMenuMode", value: function getRealMenuMode() { var inlineCollapsed = this.getInlineCollapsed(); if (this.state.switchingModeFromInline && inlineCollapsed) { return 'inline'; } var mode = this.props.mode; return inlineCollapsed ? 'vertical' : mode; } }, { key: "getInlineCollapsed", value: function getInlineCollapsed() { var inlineCollapsed = this.props.inlineCollapsed; if (this.props.siderCollapsed !== undefined) { return this.props.siderCollapsed; } return inlineCollapsed; } }, { key: "getOpenMotionProps", value: function getOpenMotionProps(menuMode) { var _this$props2 = this.props, openTransitionName = _this$props2.openTransitionName, openAnimation = _this$props2.openAnimation, motion = _this$props2.motion; // Provides by user if (motion) { return { motion: motion }; } if (openAnimation) { Object(warning["a" /* default */])(typeof openAnimation === 'string', 'Menu', '`openAnimation` do not support object. Please use `motion` instead.'); return { openAnimation: openAnimation }; } if (openTransitionName) { return { openTransitionName: openTransitionName }; } // Default logic if (menuMode === 'horizontal') { return { motion: { motionName: 'slide-up' } }; } if (menuMode === 'inline') { return { motion: _util_motion["a" /* default */] }; } // When mode switch from inline // submenu should hide without animation return { motion: { motionName: this.state.switchingModeFromInline ? '' : 'zoom-big' } }; } }, { key: "restoreModeVerticalFromInline", value: function restoreModeVerticalFromInline() { var switchingModeFromInline = this.state.switchingModeFromInline; if (switchingModeFromInline) { this.setState({ switchingModeFromInline: false }); } } }, { key: "render", value: function render() { return /*#__PURE__*/react["createElement"](menu_MenuContext.Provider, { value: { inlineCollapsed: this.getInlineCollapsed() || false, antdMenuTheme: this.props.theme } }, /*#__PURE__*/react["createElement"](config_provider["ConfigConsumer"], null, this.renderMenu)); } }], [{ key: "getDerivedStateFromProps", value: function getDerivedStateFromProps(nextProps, prevState) { var prevProps = prevState.prevProps; var newState = { prevProps: nextProps }; if (prevProps.mode === 'inline' && nextProps.mode !== 'inline') { newState.switchingModeFromInline = true; } if ('openKeys' in nextProps) { newState.openKeys = nextProps.openKeys; } else { // [Legacy] Old code will return after `openKeys` changed. // Not sure the reason, we should keep this logic still. if (nextProps.inlineCollapsed && !prevProps.inlineCollapsed || nextProps.siderCollapsed && !prevProps.siderCollapsed) { newState.switchingModeFromInline = true; newState.inlineOpenKeys = prevState.openKeys; newState.openKeys = []; } if (!nextProps.inlineCollapsed && prevProps.inlineCollapsed || !nextProps.siderCollapsed && prevProps.siderCollapsed) { newState.openKeys = prevState.inlineOpenKeys; newState.inlineOpenKeys = []; } } return newState; } }]); return InternalMenu; }(react["Component"]); menu_InternalMenu.defaultProps = { className: '', theme: 'light', focusable: false }; Object(react_lifecycles_compat_es["polyfill"])(menu_InternalMenu); // We should keep this as ref-able var menu_Menu = /*#__PURE__*/function (_React$Component2) { menu__inherits(Menu, _React$Component2); var _super2 = menu__createSuper(Menu); function Menu() { menu__classCallCheck(this, Menu); return _super2.apply(this, arguments); } menu__createClass(Menu, [{ key: "render", value: function render() { var _this2 = this; return /*#__PURE__*/react["createElement"](Sider["a" /* SiderContext */].Consumer, null, function (context) { return /*#__PURE__*/react["createElement"](menu_InternalMenu, menu__extends({}, _this2.props, context)); }); } }]); return Menu; }(react["Component"]); menu_Menu.Divider = es["a" /* Divider */]; menu_Menu.Item = MenuItem_MenuItem; menu_Menu.SubMenu = menu_SubMenu; menu_Menu.ItemGroup = es["c" /* ItemGroup */]; /***/ }), /***/ "aX42": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAWCAYAAADTlvzyAAAAAXNSR0IArs4c6QAABD5JREFUSEutlm9sU1UYxp/39HZAtlVBt2XGDxqiKDimEYJoYlzwD2CignA70bCtHZABW/cFYggfNMaYENS2Tghb70rEQFv+LKgQp4YlS0SRmWzIFBJhUcN/omYszG7teUwHG213S8B4vt17nvf9nfc9zzn3CrJGsDVWpKk3AZgHigFhuxK1vsFjXsrWpj9v/WRf8dDQ8CYCzwuQBNiZ51Tr66rMM+k6SX8Ihzsm9usLx0g8kJW8t3xqyaMVFRUJO+i2ri7nYPevPQAezpgXOaMmFE5veGNh/+j7DGDQijRq4kObpJcn5OXNqFu++GLw04Muxq88Dsidyonu+uVmn3/n/hIZ/KeX5F3ZsaLURp/HfNcWGLCiu0kuyQrScKj5jTXm18HW6GtaownglJRGRAhB2CXFa/px6Rkm9QEAKit+X2Nt5au5gIdIVmS1ZVej170saEXKSRwl4BxfhWz2edzr/KFIBIA7Y89EvvF53c/ZA0PRFoK16QFKybIGj3tXwIpsI7HSbg8FEp85tbigp+9iJTR3ZALR7PNWrspRYWwRqfdlBCjHUz7P0sMBK/ItiSdzOVWAMnE4JutksjNd4xD1cr3X/MwWSFIFW2M/kZw+KnAoNa/eYx7yW9HDIOfmAhqG8UiC+h4k9VdjyUWON3jMchHRtsDUy4/CsTKt2UNyxMGi1Cqfx2wOWJEQCW+Oll4tdcnd5wdQrbXecl2jDcOYubZ6SW9Gx7ITdHR0GD2nLl4GeMcIEPK5r9b9UiAcXcgkUy4cNwTY6autfD1gRb8g+eK1OPxV6lJFpmkmbYGWtb9wAPEVBFeCnJbWgmGncj5UV7O4L9gaO0JydmYCicPhKDMMzeE4fwFojM2LnFQQq1A5W2pqFv19fSFAIBxbhqT+gECJbQUie31e95Lg9rapTAx1EywY1SmRlQ1ed4vfiraBfMV+j+VPJXgzpRN/KLIawMe5zDCyKpGfaciCxirzd78VOQpi1qh+Ukl+vr6cKI4n4wfHXW1ZSUXJBvGHomcBlubYm1MQtc7nNdtS89cOvxwhOOGGi2V+vcfdPjIf3r2YSb2Z4P05zDUgfivSB+K+bIGIHDAKpXKNaQ4Ew5EnqGUjyQU2V1eqBd8BeL/R696b8sIVDEZBpLSZQ3BamkLRpxOC5kyjyI+lLplzvqDA4LkrWwFUjx6Tm7UeIp2T8ozKB++dcunY6Qs/kHhszHyCE4RaMfa12GLFpg0JZytKqSh8ubZ6aW+wNdZO8tmbQrKLEPw2Mc85d1CzSCX0C4A+a0B1rfaaJ8dcapewqXXPnIROfH87sBvVyNs+r/utHL6wT9m0fc+MRCJx/D8BlWzwedzv3RYwJQ5Y0TUg3yEw+VbAqe8jyTanS1WlzHbbwFRALBbLOzcgs4DkdECmgXQBkk/SgGBQIFcJ+cNBnjCccjT7H2a8UW9l6f+j5l+D7McFm7jQPQAAAABJRU5ErkJggg==" /***/ }), /***/ "acLb": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAbCAYAAABm409WAAAAAXNSR0IArs4c6QAAAtRJREFUSA21ljtvE1EQhb1rUrhwQxcLLKTIDyqa/IC0YIngggIpDQ0lUopEdIguSopIlEnhBokuGIShzQ+gocIPRUIGOR2Ft3CBbPOd5c6yzq4TYcVXur7jmTNn5s59rZe5pPV6vVuTyWQTSG06na4xFhx84HneGXLL9/33pVLpp9MnBi+hQdHv9wuj0egV4lOIs2kY0xFojNzI5XIvi8XiwPQ2JgKQ9cPxePwGQJ7+m94ky2Y2m/2Sz+dDgiAICmDWmd0j7Oor9ADMFrP5gBy1mQDdbvc5GR/SfTJ7B/EODirF3EZCawQ6wKeOz4S+XS6XX5tDFECZA2ximAJ6AejAQDZ2Op2W5EqlUjOdjSS3Q5A9/Sexus3El0I1V1kAwJ1OLpxrUxPioxKSr2YvLnFGdjI7brfbU8aTSLmgIA7HdSwKz23F70SesEh3r6r5VXG1JszgG7OhUv6dG9rnkGsrnswjd0nsg9tQAJxPcd4Fn9j/4mAGTbCPxa01CBcMBy1woomcjL7i8ATjqrpk6WRLOKCIcdV8wDqhGe3zNDBZ7KO/SdafwdxWlyydsyXcjEvcmkG42naILqIBbUhHVs9UEnXJ0plNcrzFuArhNo0br0NmhtH5UoDo+KeRgz2VnnIcqeZuwY+kM5vkeBsOh1ortYGuhPAqYNHW/+pmfynHLppflOM+mB/qkqVztlkH/hmXuDWD8PiToS6tRFPNWbR7gN9iPFeXLJ1sCQcUMa7W0g+a77JoEHiFyIkLLi3Dy3SOQ9d3I9xxAuuxYAiobV23onSLNHej1vENHGcm3KZ6iajpFrWdEGRvkSB2XYtDXPa6RftVGQNa3oNjJWGfL+/JtCBLffQtiEZ3ajep6za7I7wUzc4hO2O9Dhn//7PFSGzkftd1skqgGt0j2Ef+n1er1X/PooEvjDOLHLfpgSfDB3HdPJmYn9I+BIS/rts09UNAAf4ACRDJcqyZvx0AAAAASUVORK5CYII=" /***/ }), /***/ "adV+": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _slicedToArray2 = _interopRequireDefault(__webpack_require__("cLrx")); __webpack_require__("UQ5M"); var _message2 = _interopRequireDefault(__webpack_require__("/qCn")); var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("jlIA")); var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _common = _interopRequireDefault(__webpack_require__("pdZy")); var _api_command = __webpack_require__("3fYq"); var _recordRTC = __webpack_require__("NH7q"); function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i.return) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); } function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, _regeneratorDefine2(e, r, n, t); } function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; } function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } var RtcClient = exports.default = /*#__PURE__*/function () { function RtcClient(options, _this) { (0, _classCallCheck2.default)(this, RtcClient); this.common = _common.default.call(this); this.sdkAppId_ = options.sdkAppId; this.userId_ = options.userId; this.userSig_ = options.userSig; this.roomId_ = options.roomId; this.shareUserId = 'share_' + this.userId_; this.isJoined_ = false; this.isPublished_ = false; this.isAudioMuted = false; this.isVideoMuted = false; this.localStream_ = null; this.remoteStreams_ = []; this._this = _this; // 这里的 this 指向调用者类,可使用 props, state 等属性 this.members_ = new Map(); // create a client for RtcClient this.client_ = TRTC.createClient({ mode: "rtc", sdkAppId: this.sdkAppId_, userId: this.userId_, userSig: this.userSig_, userDefineRecordId: this.userId_ }); this.handleEvents(_this); } return (0, _createClass2.default)(RtcClient, [{ key: "join", value: function () { var _join = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator().m(function _callee() { var createJSON, states, _iterator, _step, state, _t, _t2; return _regenerator().w(function (_context) { while (1) switch (_context.p = _context.n) { case 0: if (!this.isJoined_) { _context.n = 1; break; } console.warn("duplicate RtcClient.join() observed"); return _context.a(2); case 1: _context.p = 1; _context.n = 2; return this.client_.join({ roomId: this.roomId_ }); case 2: console.log("join room success"); this.isJoined_ = true; // create a local stream with audio/video from microphone/camera // 当模式为视频上拉时,不需调用摄像头 createJSON = { audio: true, userId: this.userId_ }; // // 功能类型 0: 视频调度(一对多) 1: 视频上拉(一对一) if (this._this.props.videoGenre == 0) { createJSON.video = true; createJSON.mirror = true; // 是否开启本地视频镜像预览。 } else { createJSON.video = false; createJSON.mirror = false; } if (this.common.getCameraId() && this.common.getMicrophoneId()) { // this.localStream_ = TRTC.createStream({ // audio: true, // video: true, // userId: this.userId_, // cameraId: this.common.getCameraId(), // // cameraId:getCameraId(), // microphoneId: this.common.getMicrophoneId(), // // microphoneId: getMicrophoneId(), // mirror: true // }); createJSON.microphoneId = this.common.getMicrophoneId(); createJSON.cameraId = this.common.getCameraId(); } else { // not to specify cameraId/microphoneId to avoid OverConstrainedError // this.localStream_ = TRTC.createStream({ // audio: true, // video: true, // userId: this.userId_, // mirror: true // }); } console.log('createJSON', createJSON); this.localStream_ = TRTC.createStream(createJSON); _context.p = 3; _context.n = 4; return this.localStream_.initialize(); case 4: console.log("initialize local stream success"); this.localStream_.on("player-state-changed", function (event) { console.log("local stream ".concat(event.type, " player is ").concat(event.state)); }); window.recordStream.localStream = this.localStream_; // publish the local stream _context.n = 5; return this.publish(); case 5: this.localStream_.play("main-video"); if (this._this.props.videoGenre == 1) { this.common.isMicOn = false; this.muteLocalAudio(); } document.getElementById("main-video-btns").style.display = "flex"; document.getElementById("player_" + this.localStream_.getId()).appendChild(document.getElementById("mask_main")); // $('#main-video-btns').show(); // $('#mask_main').appendTo($('#player_' + this.localStream_.getId())); // var videoDiv = document.createElement("div"); // videoDiv.id = "player_" + this.localStream_.getId(); // document.getElementById("mask_main").appendChild(videoDiv) // $('#main-video-btns').show(); // $('#mask_main').appendTo($('#player_' + this.localStream_.getId())); _context.n = 7; break; case 6: _context.p = 6; _t = _context.v; document.getElementById("main-video-btns").style.display = "none"; document.getElementById("mask_main").style.display = "flex"; console.error("failed to initialize local stream - " + _t); case 7: _context.n = 9; break; case 8: _context.p = 8; _t2 = _context.v; console.error("join room failed! " + _t2); case 9: //更新成员状态 states = this.client_.getRemoteMutedState(); _iterator = _createForOfIteratorHelper(states); try { for (_iterator.s(); !(_step = _iterator.n()).done;) { state = _step.value; if (state.audioMuted) { document.getElementById(state.userId).getElementsByClassName("member-audio-btn").forEach(function (element, index) { element.setAttribute("src", __webpack_require__("YeOf")); }); // $("#" + state.userId) // .find(".member-audio-btn") // .attr("src", "./img/mic-off.png"); } if (state.videoMuted) { document.getElementById(state.userId).getElementsByClassName("member-video-btn").forEach(function (element, index) { element.setAttribute("src", __webpack_require__("acLb")); }); document.getElementById("mask_" + this.members_.get(state.userId).getId()).style.display = "flex"; // $("#" + state.userId) // .find(".member-video-btn") // .attr("src", "./img/camera-off.png"); // $("#mask_" + this.members_.get(state.userId).getId()).show(); } } } catch (err) { _iterator.e(err); } finally { _iterator.f(); } case 10: return _context.a(2); } }, _callee, this, [[3, 6], [1, 8]]); })); function join() { return _join.apply(this, arguments); } return join; }() }, { key: "leave", value: function () { var _leave = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator().m(function _callee2() { return _regenerator().w(function (_context2) { while (1) switch (_context2.n) { case 0: if (this.isJoined_) { _context2.n = 1; break; } console.warn("leave() - please join() firstly"); return _context2.a(2); case 1: _context2.n = 2; return this.unpublish(); case 2: _context2.n = 3; return this.client_.leave(); case 3: this.localStream_.stop(); this.localStream_.close(); this.localStream_ = null; this.isJoined_ = false; // resetView(); // this.common.resetView() case 4: return _context2.a(2); } }, _callee2, this); })); function leave() { return _leave.apply(this, arguments); } return leave; }() }, { key: "publish", value: function () { var _publish = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator().m(function _callee3() { var _t3; return _regenerator().w(function (_context3) { while (1) switch (_context3.p = _context3.n) { case 0: if (this.isJoined_) { _context3.n = 1; break; } console.warn("publish() - please join() firstly"); return _context3.a(2); case 1: if (!this.isPublished_) { _context3.n = 2; break; } console.warn("duplicate RtcClient.publish() observed"); return _context3.a(2); case 2: _context3.p = 2; _context3.n = 3; return this.client_.publish(this.localStream_); case 3: _context3.n = 5; break; case 4: _context3.p = 4; _t3 = _context3.v; console.error("failed to publish local stream " + _t3); this.isPublished_ = false; case 5: this.isPublished_ = true; case 6: return _context3.a(2); } }, _callee3, this, [[2, 4]]); })); function publish() { return _publish.apply(this, arguments); } return publish; }() }, { key: "unpublish", value: function () { var _unpublish = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator().m(function _callee4() { return _regenerator().w(function (_context4) { while (1) switch (_context4.n) { case 0: if (this.isJoined_) { _context4.n = 1; break; } console.warn("unpublish() - please join() firstly"); return _context4.a(2); case 1: if (this.isPublished_) { _context4.n = 2; break; } console.warn("RtcClient.unpublish() called but not published yet"); return _context4.a(2); case 2: _context4.n = 3; return this.client_.unpublish(this.localStream_); case 3: this.isPublished_ = false; case 4: return _context4.a(2); } }, _callee4, this); })); function unpublish() { return _unpublish.apply(this, arguments); } return unpublish; }() }, { key: "muteLocalAudio", value: function muteLocalAudio() { this.localStream_ && this.localStream_.muteAudio(); } }, { key: "unmuteLocalAudio", value: function unmuteLocalAudio() { this.localStream_ && this.localStream_.unmuteAudio(); } }, { key: "muteLocalVideo", value: function muteLocalVideo() { this.localStream_ && this.localStream_.muteVideo(); } }, { key: "unmuteLocalVideo", value: function unmuteLocalVideo() { this.localStream_ && this.localStream_.unmuteVideo(); } }, { key: "resumeStreams", value: function resumeStreams() { this.localStream_ && this.localStream_.resume(); var _iterator2 = _createForOfIteratorHelper(this.remoteStreams_), _step2; try { for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { var stream = _step2.value; stream.resume(); } } catch (err) { _iterator2.e(err); } finally { _iterator2.f(); } } }, { key: "handleEvents", value: function handleEvents(_this) { var _this2 = this; this.client_.on("error", function (err) { console.error('client_handleEvents', err); alert(err); // location.reload(); }); // 用户被踢出房间通知 this.client_.on("client-banned", function (err) { console.error("client has been banned for " + err); if (!_this2.common.isHidden()) { _message2.default.warning('您已被踢出房间'); // alert("您已被踢出房间"); // location.reload(); } else { document.addEventListener("visibilitychange", function () { if (!_this2.common.isHidden()) { _message2.default.warning('您已被踢出房间'); // alert("您已被踢出房间"); // location.reload(); } }, false); } }); // 远端用户进房通知 //有好友进来 this.client_.on("peer-join", function (evt) { var userId = evt.userId; // console.log("peer-join " + userId); // console.log(this.common) // console.log(this.common.shareUserId) // console.log(_this.props.dispatch) // if (userId !== this.common.shareUserId) { if (userId !== _this2.shareUserId) { _this2.common.addMemberView(userId); console.log('client_join', 'fetchVideoMemberList'); // _this.props.dispatch({ // type:'command/fetchVideoMemberList', // payload:{ // type:'peerJoin', // memberList:{ // mobilePhone:userId, // status:'yes', // id:userId+'yes' // } // } // }) } }); // 远端用户退房通知 this.client_.on("peer-leave", function (evt) { var userId = evt.userId; _this2.common.removeView(userId); console.log("peer-leave " + userId); console.log('client_leave', 'fetchVideoMemberList'); _this.props.dispatch({ type: 'command/fetchVideoMemberList', payload: { type: 'leave', memberList: { mobilePhone: userId, status: 'leave', id: userId + 'leave' } } }); }); // 远端流添加事件,当远端用户发布流后会收到该通知。 this.client_.on("stream-added", function (evt) { console.log('client_added', evt); var remoteStream = evt.stream; var id = remoteStream.getId(); var userId = remoteStream.getUserId(); _this2.members_.set(userId, remoteStream); console.log("remote stream added: [".concat(userId, "] ID: ").concat(id, " type: ").concat(remoteStream.getType())); if (remoteStream.getUserId() === _this2.shareUserId) { // don't need screen shared by us _this2.client_.unsubscribe(remoteStream); } else { console.log("subscribe to this remote stream"); _this2.client_.subscribe(remoteStream); } }); // SDK和腾讯云的连接状态变化事件,您可以利用该事件从全景上监听SDK与腾讯云的连接状态。 // 'DISCONNECTED':连接断开 // 'CONNECTING':正在连接中 // 'RECONNECTING':自动重连中 // 'CONNECTED':已连接 this.client_.on('connection-state-changed', function (event) { console.log(' TRTC 连接状态', event); return; if (event.prevState == "CONNECTING") { // 模拟用户进入,进行测试开发 var videoMember = []; //用于记录是否已经进入房间使用 setTimeout(function () { for (var index = 1; index < 52; index++) { console.log('client_-changed', 'fetchVideoMemberList', event); var userId = 179901648 + index; var id = new Date().getTime() + "_000000000"; var userName = '测试' + index; _this2.common.addMemberView(userId); console.log('client_join', 'fetchVideoMemberList'); videoMember.push({ videoId: id, hasVideo: false, userName: userName, mobilePhone: userId, status: 'yes', id: userId + 'yes' }); } _this.props.dispatch({ type: 'command/fetchVideoMemberList', payload: { type: 'add', memberList: videoMember } }); }, 5000); } }); // 最后流订阅成功事件,调用订阅()成功后会触发该事件。 this.client_.on("stream-subscribed", /*#__PURE__*/function () { var _ref = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator().m(function _callee5(evt) { var track, remoteStream, id, uid, data, userName; return _regenerator().w(function (_context5) { while (1) switch (_context5.n) { case 0: console.log(evt); console.log('client_subscribed', 'fetchVideoMemberList'); console.log('evt.stream', evt.stream); if (evt.stream.hasAudio) { track = evt.stream.getAudioTrack(); console.log('evt.track', track); setTimeout(function () { (0, _recordRTC.recordAudioInsert)(evt.stream); }, 700); } remoteStream = evt.stream; id = remoteStream.getId(); uid = remoteStream.userId_; _context5.n = 1; return (0, _api_command.searchDeptUser)({ keyWord: remoteStream.userId_ }); case 1: data = _context5.v; // console.log('searchDeptUser', data) userName = ""; if (data && data.data && data.data) { userName = data.data[0].item_securityname; } _this.props.dispatch({ type: 'command/fetchVideoMemberList', payload: { type: 'peerJoin', memberList: { videoId: id, hasVideo: remoteStream.hasVideo(), userName: userName, mobilePhone: uid, status: 'yes', id: uid + 'yes' } } }); _this2.remoteStreams_.push(remoteStream); remoteStream.play(id, { objectFit: "contain" }); remoteStream.on("player-state-changed", function (event) { console.log("player-state-changed", "".concat(event.type, " player is ").concat(event.state)); if (event.type == "video" && event.state == "PLAYING") { _this.props.dispatch({ type: 'command/fetchVideoMemberList', payload: { type: 'peerJoin', memberList: { videoId: id, hasVideo: true, userName: userName, mobilePhone: uid, status: 'yes', id: uid + 'yes' } } }); } }); case 2: return _context5.a(2); } }, _callee5); })); return function (_x) { return _ref.apply(this, arguments); }; }()); // 远端流移除事件,当远端用户取消发布流后会收到通知。 this.client_.on("stream-removed", function (evt) { console.log('client_removed', 'fetchVideoMemberList'); var remoteStream = evt.stream; var id = remoteStream.getId(); remoteStream.stop(); _this2.remoteStreams_ = _this2.remoteStreams_.filter(function (stream) { return stream.getId() !== id; }); _this2.common.removeView(id); console.log("stream-removed ID: ".concat(id, " type: ").concat(remoteStream.getType())); }); // 远端流更新事件,当远端用户添加、移除或缺失音视频轨道后会收到该通知。 this.client_.on("stream-updated", function (evt) { console.log('client_updated', 'fetchVideoMemberList'); var remoteStream = evt.stream; var uid = _this2.getUidByStreamId(remoteStream.getId()); if (!remoteStream.hasVideo()) { document.getElementById(uid).getElementsByClassName("member-video-btn").forEach(function (element, index) { element.setAttribute("src", __webpack_require__("acLb")); }); // $("#" + uid) // .find(".member-video-btn") // .attr("src", "img/camera-off.png"); } // console.log( // "type: " + // remoteStream.getType() + // " stream-updated hasAudio: " + // remoteStream.hasAudio() + // " hasVideo: " + // remoteStream.hasVideo() + // " uid: " + // uid // ); }); // 远端用户禁用音频通知。 this.client_.on("mute-audio", function (evt) { console.log('client_audio', 'fetchVideoMemberList'); console.log(evt.userId + " mute audio"); document.getElementById(evt.userId) && document.getElementById(evt.userId).getElementsByClassName("member-audio-btn").forEach(function (element, index) { element.setAttribute("src", __webpack_require__("YeOf")); }); // $("#" + evt.userId) // .find(".member-audio-btn") // .attr("src", "img/mic-off.png"); }); // 远端用户启用音频通知。 this.client_.on("unmute-audio", function (evt) { console.log('client_unmute', 'fetchVideoMemberList'); console.log(evt.userId + " unmute audio"); document.getElementById(evt.userId).getElementsByClassName("member-audio-btn").forEach(function (element, index) { element.setAttribute("src", __webpack_require__("gOsS")); }); // $("#" + evt.userId) // .find(".member-audio-btn") // .attr("src", "img/mic-on.png"); }); // 远端用户禁用视频通知。 this.client_.on("mute-video", function (evt) { console.log(evt.userId + " mute video"); console.log('client-video', 'fetchVideoMemberList'); document.getElementById(evt.userId).getElementsByClassName("member-video-btn").forEach(function (element, index) { element.setAttribute("src", __webpack_require__("acLb")); }); // $("#" + evt.userId) // .find(".member-video-btn") // .attr("src", "img/camera-off.png"); console.log(_this2.members_.get(evt.userId)); var streamId = _this2.members_.get(evt.userId).getId(); if (streamId) { document.getElementById("mask_" + streamId).style.display = "flex"; // $("#mask_" + streamId).show(); } }); // 远端用户启用视频通知。 this.client_.on("unmute-video", function (evt) { console.log(evt.userId + " unmute video"); console.log('client-unmute-v', 'fetchVideoMemberList'); document.getElementById(evt.userId) && document.getElementById(evt.userId).getElementsByClassName("member-video-btn").forEach(function (element, index) { element.setAttribute("src", __webpack_require__("8ZKn")); }); // $("#" + evt.userId) // .find(".member-video-btn") // .attr("src", "img/camera-on.png"); var stream = _this2.members_.get(evt.userId); if (stream) { var streamId = stream.getId(); if (streamId) { //这里不行 console.log("mask_" + streamId); console.log(document.getElementById("mask_" + streamId)); document.getElementById("mask_" + streamId) ? document.getElementById("mask_" + streamId).style.display = "none" : ''; // $("#mask_" + streamId).hide(); } } }); } }, { key: "showStreamState", value: function showStreamState(stream) { console.log("has audio: " + stream.hasAudio() + " has video: " + stream.hasVideo()); } }, { key: "getUidByStreamId", value: function getUidByStreamId(streamId) { var _iterator3 = _createForOfIteratorHelper(this.members_), _step3; try { for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) { var _ref2 = _step3.value; var _ref3 = (0, _slicedToArray2.default)(_ref2, 2); var uid = _ref3[0]; var stream = _ref3[1]; if (stream.getId() == streamId) { return uid; } } } catch (err) { _iterator3.e(err); } finally { _iterator3.f(); } } }]); }(); /***/ }), /***/ "b5vB": /***/ (function(module, exports) { // removed by extract-text-webpack-plugin /***/ }), /***/ "b8x8": /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = localMapRightClickContent; /** * 一张图跟警报联动的右键点击事件 * */ function localMapRightClickContent(lnglat, type) { console.log(this); console.log(lnglat); var that = this; var info = document.createElement("div"); info.className = "rightClick_context_menu"; var zoomMenu0 = document.createElement("p"); var img = document.createElement("img"); img.src = __webpack_require__("UahI"); var span = document.createElement("span"); span.innerHTML = '周边搜索'; zoomMenu0.appendChild(img); zoomMenu0.appendChild(span); info.appendChild(zoomMenu0); zoomMenu0.onclick = function () { console.log("object"); //弹出周边搜索的按钮 that.setState({ searchAround: { show: true, type: type, lnglat: { latitude: lnglat.lat, longitude: lnglat.lng } } }); }; return info; } /***/ }), /***/ "bIjD": /***/ (function(module, exports, __webpack_require__) { var isArray = __webpack_require__("NGEn"), isKey = __webpack_require__("hIPy"), stringToPath = __webpack_require__("UnLw"), toString = __webpack_require__("ZT2e"); /** * Casts `value` to a path array if it's not one. * * @private * @param {*} value The value to inspect. * @param {Object} [object] The object to query keys on. * @returns {Array} Returns the cast property path array. */ function castPath(value, object) { if (isArray(value)) { return value; } return isKey(value, object) ? [value] : stringToPath(toString(value)); } module.exports = castPath; /***/ }), /***/ "bPsJ": /***/ (function(module, exports) { // removed by extract-text-webpack-plugin /***/ }), /***/ "bXbu": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAAAgCAYAAAB3j6rJAAAAAXNSR0IArs4c6QAAAn9JREFUWEfNl89r1EAUx78vq1uL3c4KotCjqAc99eA/4MF/QMS7J0UQEhcRveSiojYJ1KXqQfTiD7x6EAuCZw9elB5EkFatgrptrBR3rfuVSc3usmST7CaLO6ck8+Z9PzPvzcuMKJOXIKiAKEI3QQPEjO/JRf067P5AU8sqi/UWROsrGr4rY/q1bHKNwETYtcmKn6uelNL0J/lvg5hkp0j47HsiOa1IrP/UIFGQ/XxTCRNNHZp+RKNs+wlNbLJmBknYDO20zKqU0/ggIUehia4TApwhMBvWjmGBxWm164i0a8fQQMKaFaGlV6S1z8PaMTSQGK0RAolZrrxXplVTeoRmNJI171kP6i9THTn2mIWDC6BtS3NQgM6f3sChISk7LDwRwdPxSdxdtmV9UKDMdaRs8QSJOxDUQNzaOo7qt8vyuV+gzNv3gM3i8g+8JzEViAsaAjwQwl3x5HVaoMwgWqhs8iyBmQjR+cIWOLXrMp8ElDk0WmDnOZY2fmOJQDlKUARvQLhTCvcXbGlE2uT10wsO2cCF2JkLvhhAdTtx86MntU7bTNu309HuCnf9amIRxLbEMADrNHCv2IT31ZN3m6mVY1MW50CcSuNSBPp2MDs9CfuFLRvBeSTuXpPGaWijznMP6ngLoNBr3D+A6sQYnE9X5Hu7oCXca/oB0bbK4iMQx7vHBQDEjRLgdOdHEJq0x/20QGWL0yReddnXjSL2r1yVpZ4rlQQySOiUyWcAjrREDcz5jpyOm0zmK2eUc1XhYfzB87DSFoC9NVc+xINkvIT3cq4svgRxCILbvisnk0Kb6/btFFMWj4J4KAb2rTqy+N9AbJuGt4aK78i1JAjd/xdVHJow7Lne8QAAAABJRU5ErkJggg==" /***/ }), /***/ "baF6": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; __webpack_require__("QeQB"); var _spin = _interopRequireDefault(__webpack_require__("9YyC")); __webpack_require__("/m1I"); var _tooltip = _interopRequireDefault(__webpack_require__("O6j2")); __webpack_require__("baa2"); var _icon = _interopRequireDefault(__webpack_require__("FC3+")); __webpack_require__("UQ5M"); var _message2 = _interopRequireDefault(__webpack_require__("/qCn")); var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); __webpack_require__("sRCI"); var _modal = _interopRequireDefault(__webpack_require__("vnWH")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); var _dva = __webpack_require__("S6G3"); var _events = _interopRequireDefault(__webpack_require__("TLe5")); var _dec, _class; //渲染每一个人员item /** * 通过搜索获得地图列表(保安人员) */ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } // 引入 EventEmitter // import "../person.less"; var confirm = _modal.default.confirm; var PersonItem = exports.default = (_dec = (0, _dva.connect)(function (state) { return { selectedId: state.command.personList.selectedId, layoutAuthority: state.command.layoutAuthority // tabIndex2: state.command.tabIndex.person.tabIndex2, }; }), _dec(_class = /*#__PURE__*/function (_Component) { function PersonItem(props) { var _this; (0, _classCallCheck2.default)(this, PersonItem); _this = _callSuper(this, PersonItem, [props]); _this.onPersonClick = function (item) { if (item.lnglat) { // if (this.props.selectedId != item.perId) { _this.props.dispatch({ type: "command/setPersonSelectIndex", payload: item.perId }); } else { _message2.default.warning("该人员暂未定位"); } _this.props.onClick && _this.props.onClick(item); }; _this.state = { data: props.data || [], loadingText: props.data }; return _this; } (0, _inherits2.default)(PersonItem, _Component); return (0, _createClass2.default)(PersonItem, [{ key: "componentDidMount", value: function componentDidMount() {} }, { key: "componentWillReceiveProps", value: function componentWillReceiveProps(nextProps) { // console.log('componentWillReceiveProps', nextProps.loadingText , this.state.loadingText); // if (nextProps.loadingText != this.state.loadingText) { // this.setState({ // loadingText: nextProps.loadingText, // data: [] // }); // } if (nextProps.data != this.state.data) { this.setState({ data: nextProps.data }); } } }, { key: "render", value: function render() { var _this2 = this; var count = 0; // 计数器 return /*#__PURE__*/_react.default.createElement("div", null, this.state.data.length > 0 ? this.state.data.map(function (item, index) { var xing = "********"; var idCardNo = ""; if (item.idCardNo) { var front6 = item.idCardNo.substring(0, 6); idCardNo = front6 + xing + item.idCardNo.substring(14, item.idCardNo.length); } count = item.lnglat ? count + 1 : count; return /*#__PURE__*/_react.default.createElement("div", { key: index, className: "item", onClick: _this2.onPersonClick.bind(_this2, item) // onMouseOver={() => { // this.props.dispatch({ // type: "command/setPersonHoverIndex", // payload: item.perId, // }); // }} // onMouseLeave={() => { // this.props.dispatch({ // type: "command/setPersonHoverIndex", // payload: null, // }); // }} }, /*#__PURE__*/_react.default.createElement("div", { className: _this2.props.selectedId === item.perId ? "selected poibox" : "poibox" }, item.photoUrl ? /*#__PURE__*/_react.default.createElement("img", { className: "img", src: item.photoUrl ? item.photoUrl : "" }) : /*#__PURE__*/_react.default.createElement("div", { className: "img-span" }, /*#__PURE__*/_react.default.createElement("span", null, item.name ? item.name.substring(item.name.length - 2, item.name.length) : "")), /*#__PURE__*/_react.default.createElement("div", { style: { marginLeft: 45 } }, /*#__PURE__*/_react.default.createElement("div", { className: "name" }, item.name || "---", _this2.props.layoutAuthority.basisLayer ? /*#__PURE__*/_react.default.createElement("span", { className: "send-header-bar" }, /*#__PURE__*/_react.default.createElement(_tooltip.default, { placement: "bottom", title: "\u6587\u5B57\u8C03\u5EA6" }, /*#__PURE__*/_react.default.createElement(_icon.default, { type: "form", style: { fontSize: "17px" }, onClick: function onClick(e) { e.stopPropagation(), //合成事件停止冒泡 // this.props.clickTextScheduling(item, "text"); _events.default.emit('clickTextScheduling', { item: item, type: "text" }); } })), /*#__PURE__*/_react.default.createElement(_tooltip.default, { placement: "bottom", title: "\u8BED\u97F3\u8C03\u5EA6", onClick: function onClick(e) { e.stopPropagation(), //合成事件停止冒泡 // this.props.clickTextScheduling(item, "voice"); _events.default.emit('clickTextScheduling', { item: item, type: "voice" }); } }, /*#__PURE__*/_react.default.createElement(_icon.default, { type: "audio", style: { fontSize: "17px" } }))) : ""), /*#__PURE__*/_react.default.createElement("div", { className: "text" }, "\u624B\u673A\u53F7\u7801:", item.mobilePhone || "---"), /*#__PURE__*/_react.default.createElement("div", { className: "text idcard" }, "\u8BC1\u4EF6\u53F7\u7801:", idCardNo || "---", item.lnglat && /*#__PURE__*/_react.default.createElement("div", { className: "amap_lib_placeSearch_poi poibox-icon", style: { marginTop: "-15px" } }, count))))); }) : /*#__PURE__*/_react.default.createElement("div", { style: { textAlign: "center", fontSize: "14px", color: "#afb0b1" } }, /*#__PURE__*/_react.default.createElement(_spin.default, { tip: this.state.loadingText }) || "暂无数据")); } }]); }(_react.Component)) || _class); /***/ }), /***/ "bcoi": /***/ (function(module, exports) { module.exports = "data:image/png;base64,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" /***/ }), /***/ "bdBS": /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.createSensor = void 0; var _constant = __webpack_require__("ZFdq"); var _debounce = _interopRequireDefault(__webpack_require__("mho0")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } /** * Created by hustcc on 18/7/5. * Contract: i@hust.cc */ var createSensor = function createSensor(element, whenDestroy) { var sensor = undefined; // callback var listeners = []; /** * trigger listeners */ var resizeListener = (0, _debounce["default"])(function () { // trigger all listeners.forEach(function (listener) { listener(element); }); }); /** * create ResizeObserver sensor * @returns */ var newSensor = function newSensor() { var s = new ResizeObserver(resizeListener); // listen element s.observe(element); // trigger once resizeListener(); return s; }; /** * listen with callback * @param cb */ var bind = function bind(cb) { if (!sensor) { sensor = newSensor(); } if (listeners.indexOf(cb) === -1) { listeners.push(cb); } }; /** * destroy */ var destroy = function destroy() { sensor.disconnect(); listeners = []; sensor = undefined; element.removeAttribute(_constant.SizeSensorId); whenDestroy && whenDestroy(); }; /** * cancel bind * @param cb */ var unbind = function unbind(cb) { var idx = listeners.indexOf(cb); if (idx !== -1) { listeners.splice(idx, 1); } // no listener, and sensor is exist // then destroy the sensor if (listeners.length === 0 && sensor) { destroy(); } }; return { element: element, bind: bind, destroy: destroy, unbind: unbind }; }; exports.createSensor = createSensor; /***/ }), /***/ "bpzx": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAiCAYAAAC0nUK+AAAAAXNSR0IArs4c6QAABMhJREFUSA2tVltslFUQnvkvi26pLdtubZpAMES7vbiatFEptktBNAYrLyZEgn1BSYkIPjRa4KVECRh5EBMTFNBEA4miPtiHRk3a7mpiTGlF7M0LEkWRst1e06W7/+U487f/8u+/u2VNnGR75vLNd07PmZldhGVkqqqpyRTQYoJoBsQKBFEiACdRwF8IEJYQvigeCX+DSJ4sQphMidaEmtEUx4QQD2VG0z0I2C9kfNU/HO5NjwCkkYvOTin2Sc8RYYoOBkrlZbCiZQt4QutBXl0BWFwEYnoGjKvXIBn+DhJdX4N5/YbFKaH0pm97cwd2dpruTYBOiROBxvPRQKOI3r9JzJ8+K8xEgty5heOMYzznTVQ1fcYHzCCPVjcetgANLSL5w1BuxiwRxk9Q3tIGr9vk1rXEapsahC6+FaqKRR++DeqDNQCGAcavV0Af/hn0If6MgX7lT5DXrgal5j76VIJSTWvlOgBVBe3iMMy07gPUNCFJUsjHD8270HX00nNv9La3gXfXDmvj2AOPgbqhHtSaACi1RFQbgNij2+xDpVZUFSi51GPZ8TPnIH78JL0kRvyjkRBGazfWg2708+Ot+vIcoMdjAen+oHQ0kiJhhX3ZxMaJZBKmnthhPTLK8LAEptHCCVwVNnE2gnx8nM88LMKUniJy2MwGl9v/ITYPCrFZoe5aQwVg1XE+5PYV2Fj3VXE/LMkahXjL2OAGcYs70R3PZts8VCB+icbCPIO485yCUmYvOOOWHr8JbpzNw7zEgOMM5JZ2isz1exvRLvwI8r33pKFu8eA1CQQMcpRnhVO8e1qdZqauaTB/4jR4X9iZFnPwDEpCgm6O8hDiOrXFsyUE3rYcG2g6zLW/BmpdEDxbrWKz0jifeVjourokqbCgCxGmeLrd/OhTK2D/8e5/HlYebge8Y4XtAv3iEMzs3Gt1bcHBfSk/K5y/NCWjPtljHZo775A9DbMNLePvf8TcwaMi9shWMfvSIaH/cjljfHGePR1jVY0v82bWbBHBxwti2kI/ZVShrxjueufo4vBiRB7CQ2v2xQMgJqeJEQdL1xY0YHd3wiLn/GiwuRKTej/VZyFPOe/+XXDnc88sOxL4jvkq4ifOANADk9yQFKwvGYpcZSNFzsZkdehJ0xRdAoTM9n/5JiKmOKKyqXSk93vOZUkjZ0c0ENoNYL7Ler5CI0SnbnyaZvjiIy4lZrShfyz8ngR4PF9ixhH5bjcx+zPI2ekrlw5QQnpXcSCbIJwqGQl/kC2UlRz7+nQZlGdpA3r+ZeVS6d1yerE74FnJOb5qtOcPgbDXgXWpmEBV3k4HWXAFUmZOckb4RyJn6fSL/ZxKWVQkFEdKf+obc7nTzGXJGanIyh56srTT0YajPqn8jTSmLMZtyYuHei4T6Jgzl5qgDYfP35pyzqBDz6hzRwzq6uq8mqb5qjQoe0sUfaUAlMyiGdkmz7TRb5M5VVUnBwYG4s4cp251otNh68FgsGxhYWGdYRgrx8HADcKTLEN5/ccY77hgJubYTxv7KyoqjPHxcevbzM6115zXYppmuQ3i9RVz9vPfhfH+KRH/zel345yxnOT0b193AqdlU2/FyZNOH+tunDOe153T6QppHHtolYnMoGpJ5nPn/wJqUmrPd75FEQAAAABJRU5ErkJggg==" /***/ }), /***/ "br1g": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAATBJREFUOE+lk71KA0EUhc/dkbVRQQS1EAI2wcYHEMRKGyuLFIJYCcFh7SIIZofRGckLmOgTiNr4DlpY2YuNIKnTmSo7V1bYqOxPTDLVMJf7ce85ZwhjHkr666b1FN9tKNeHYf4Azlv8DVCy/5aAjnVzcVKgBqZdZnQ9cvtGBc9xvRBQqdyL8monADsDYLo/GdGjDQ83CgGn9rJE7N2AsZZaifBpQxkDOXMCdXG96SJ3B2A2T48J589pfdBJAUDeNtg9APALxaRo2YZH72kAqA3w0iAnIidWGrr6mgHgNkD/ALhyQwdvI68gfFE6O6l+ZIpYN80tMN2OJGISpEIbga5VcirXxkRArbUXeQsBg+MgzQwVpN8uaH013xNcA2MPQI+AHaPky98kjvuZBvmeV/8CMWuPEZPzwZoAAAAASUVORK5CYII=" /***/ }), /***/ "br8L": /***/ (function(module, exports) { // removed by extract-text-webpack-plugin /***/ }), /***/ "buBX": /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 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; }; exports.default = create; function create(initialState) { var state = initialState; var listeners = []; function setState(partial) { state = _extends({}, state, partial); for (var i = 0; i < listeners.length; i++) { listeners[i](); } } function getState() { return state; } function subscribe(listener) { listeners.push(listener); return function unsubscribe() { var index = listeners.indexOf(listener); listeners.splice(index, 1); }; } return { setState: setState, getState: getState, subscribe: subscribe }; } /***/ }), /***/ "c+hy": /***/ (function(module, exports) { /** * Delegate to handle a media query being matched and unmatched. * * @param {object} options * @param {function} options.match callback for when the media query is matched * @param {function} [options.unmatch] callback for when the media query is unmatched * @param {function} [options.setup] one-time callback triggered the first time a query is matched * @param {boolean} [options.deferSetup=false] should the setup callback be run immediately, rather than first time query is matched? * @constructor */ function QueryHandler(options) { this.options = options; !options.deferSetup && this.setup(); } QueryHandler.prototype = { constructor : QueryHandler, /** * coordinates setup of the handler * * @function */ setup : function() { if(this.options.setup) { this.options.setup(); } this.initialised = true; }, /** * coordinates setup and triggering of the handler * * @function */ on : function() { !this.initialised && this.setup(); this.options.match && this.options.match(); }, /** * coordinates the unmatch event for the handler * * @function */ off : function() { this.options.unmatch && this.options.unmatch(); }, /** * called when a handler is to be destroyed. * delegates to the destroy or unmatch callbacks, depending on availability. * * @function */ destroy : function() { this.options.destroy ? this.options.destroy() : this.off(); }, /** * determines equality by reference. * if object is supplied compare options, if function, compare match callback * * @function * @param {object || function} [target] the target for comparison */ equals : function(target) { return this.options === target || this.options.match === target; } }; module.exports = QueryHandler; /***/ }), /***/ "c/Tr": /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__("5zde"), __esModule: true }; /***/ }), /***/ "crNL": /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; var _util = __webpack_require__("eCjd"); var util = _interopRequireWildcard(_util); var _required = __webpack_require__("F61X"); var _required2 = _interopRequireDefault(_required); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } /* eslint max-len:0 */ var pattern = { // http://emailregex.com/ email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/, url: new RegExp('^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$', 'i'), hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i }; var types = { integer: function integer(value) { return types.number(value) && parseInt(value, 10) === value; }, float: function float(value) { return types.number(value) && !types.integer(value); }, array: function array(value) { return Array.isArray(value); }, regexp: function regexp(value) { if (value instanceof RegExp) { return true; } try { return !!new RegExp(value); } catch (e) { return false; } }, date: function date(value) { return typeof value.getTime === 'function' && typeof value.getMonth === 'function' && typeof value.getYear === 'function'; }, number: function number(value) { if (isNaN(value)) { return false; } return typeof value === 'number'; }, object: function object(value) { return (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && !types.array(value); }, method: function method(value) { return typeof value === 'function'; }, email: function email(value) { return typeof value === 'string' && !!value.match(pattern.email) && value.length < 255; }, url: function url(value) { return typeof value === 'string' && !!value.match(pattern.url); }, hex: function hex(value) { return typeof value === 'string' && !!value.match(pattern.hex); } }; /** * Rule for validating the type of a value. * * @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 type(rule, value, source, errors, options) { if (rule.required && value === undefined) { (0, _required2['default'])(rule, value, source, errors, options); return; } var custom = ['integer', 'float', 'array', 'regexp', 'object', 'method', 'email', 'number', 'date', 'url', 'hex']; var ruleType = rule.type; if (custom.indexOf(ruleType) > -1) { if (!types[ruleType](value)) { errors.push(util.format(options.messages.types[ruleType], rule.fullField, rule.type)); } // straight typeof check } else if (ruleType && (typeof value === 'undefined' ? 'undefined' : _typeof(value)) !== rule.type) { errors.push(util.format(options.messages.types[ruleType], rule.fullField, rule.type)); } } exports['default'] = type; /***/ }), /***/ "csJ0": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); // EXTERNAL MODULE: ./node_modules/react/index.js var react = __webpack_require__("GiK3"); var react_default = /*#__PURE__*/__webpack_require__.n(react); // EXTERNAL MODULE: ./node_modules/prop-types/index.js var prop_types = __webpack_require__("KSGD"); var prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types); // EXTERNAL MODULE: ./node_modules/rc-trigger/es/index.js + 4 modules var es = __webpack_require__("isWq"); // EXTERNAL MODULE: ./node_modules/warning/warning.js var warning = __webpack_require__("Trj0"); var warning_default = /*#__PURE__*/__webpack_require__.n(warning); // EXTERNAL MODULE: ./node_modules/rc-util/es/KeyCode.js var KeyCode = __webpack_require__("opmb"); // EXTERNAL MODULE: ./node_modules/array-tree-filter/lib/index.js var lib = __webpack_require__("7yhg"); var lib_default = /*#__PURE__*/__webpack_require__.n(lib); // EXTERNAL MODULE: ./node_modules/shallow-equal/arrays/index.js var arrays = __webpack_require__("Lmu9"); var arrays_default = /*#__PURE__*/__webpack_require__.n(arrays); // EXTERNAL MODULE: ./node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js var react_lifecycles_compat_es = __webpack_require__("R8mX"); // EXTERNAL MODULE: ./node_modules/react-dom/index.js var react_dom = __webpack_require__("O27J"); var react_dom_default = /*#__PURE__*/__webpack_require__.n(react_dom); // CONCATENATED MODULE: ./node_modules/rc-cascader/es/Menus.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 _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"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Menus_Menus = function (_React$Component) { _inherits(Menus, _React$Component); function Menus(props) { _classCallCheck(this, Menus); var _this = _possibleConstructorReturn(this, (Menus.__proto__ || Object.getPrototypeOf(Menus)).call(this, props)); _this.saveMenuItem = function (index) { return function (node) { _this.menuItems[index] = node; }; }; _this.menuItems = {}; return _this; } _createClass(Menus, [{ key: 'componentDidMount', value: function componentDidMount() { this.scrollActiveItemToView(); } }, { key: 'componentDidUpdate', value: function componentDidUpdate(prevProps) { if (!prevProps.visible && this.props.visible) { this.scrollActiveItemToView(); } } }, { key: 'getFieldName', value: function getFieldName(name) { var _props = this.props, fieldNames = _props.fieldNames, defaultFieldNames = _props.defaultFieldNames; // 防止只设置单个属性的名字 return fieldNames[name] || defaultFieldNames[name]; } }, { key: 'getOption', value: function getOption(option, menuIndex) { var _props2 = this.props, prefixCls = _props2.prefixCls, expandTrigger = _props2.expandTrigger, expandIcon = _props2.expandIcon, loadingIcon = _props2.loadingIcon; var onSelect = this.props.onSelect.bind(this, option, menuIndex); var onItemDoubleClick = this.props.onItemDoubleClick.bind(this, option, menuIndex); var expandProps = { onClick: onSelect, onDoubleClick: onItemDoubleClick }; var menuItemCls = prefixCls + '-menu-item'; var expandIconNode = null; var hasChildren = option[this.getFieldName('children')] && option[this.getFieldName('children')].length > 0; if (hasChildren || option.isLeaf === false) { menuItemCls += ' ' + prefixCls + '-menu-item-expand'; if (!option.loading) { expandIconNode = react_default.a.createElement( 'span', { className: prefixCls + '-menu-item-expand-icon' }, expandIcon ); } } if (expandTrigger === 'hover' && (hasChildren || option.isLeaf === false)) { expandProps = { onMouseEnter: this.delayOnSelect.bind(this, onSelect), onMouseLeave: this.delayOnSelect.bind(this), onClick: onSelect }; } if (this.isActiveOption(option, menuIndex)) { menuItemCls += ' ' + prefixCls + '-menu-item-active'; expandProps.ref = this.saveMenuItem(menuIndex); } if (option.disabled) { menuItemCls += ' ' + prefixCls + '-menu-item-disabled'; } var loadingIconNode = null; if (option.loading) { menuItemCls += ' ' + prefixCls + '-menu-item-loading'; loadingIconNode = loadingIcon || null; } var title = ''; if ('title' in option) { title = option.title; } else if (typeof option[this.getFieldName('label')] === 'string') { title = option[this.getFieldName('label')]; } return react_default.a.createElement( 'li', _extends({ key: option[this.getFieldName('value')], className: menuItemCls, title: title }, expandProps, { role: 'menuitem', onMouseDown: function onMouseDown(e) { return e.preventDefault(); } }), option[this.getFieldName('label')], expandIconNode, loadingIconNode ); } }, { key: 'getActiveOptions', value: function getActiveOptions(values) { var _this2 = this; var activeValue = values || this.props.activeValue; var options = this.props.options; return lib_default()(options, function (o, level) { return o[_this2.getFieldName('value')] === activeValue[level]; }, { childrenKeyName: this.getFieldName('children') }); } }, { key: 'getShowOptions', value: function getShowOptions() { var _this3 = this; var options = this.props.options; var result = this.getActiveOptions().map(function (activeOption) { return activeOption[_this3.getFieldName('children')]; }).filter(function (activeOption) { return !!activeOption; }); result.unshift(options); return result; } }, { key: 'delayOnSelect', value: function delayOnSelect(onSelect) { var _this4 = this; for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { args[_key - 1] = arguments[_key]; } if (this.delayTimer) { clearTimeout(this.delayTimer); this.delayTimer = null; } if (typeof onSelect === 'function') { this.delayTimer = setTimeout(function () { onSelect(args); _this4.delayTimer = null; }, 150); } } }, { key: 'scrollActiveItemToView', value: function scrollActiveItemToView() { // scroll into view var optionsLength = this.getShowOptions().length; for (var i = 0; i < optionsLength; i++) { var itemComponent = this.menuItems[i]; if (itemComponent) { var target = Object(react_dom["findDOMNode"])(itemComponent); target.parentNode.scrollTop = target.offsetTop; } } } }, { key: 'isActiveOption', value: function isActiveOption(option, menuIndex) { var _props$activeValue = this.props.activeValue, activeValue = _props$activeValue === undefined ? [] : _props$activeValue; return activeValue[menuIndex] === option[this.getFieldName('value')]; } }, { key: 'render', value: function render() { var _this5 = this; var _props3 = this.props, prefixCls = _props3.prefixCls, dropdownMenuColumnStyle = _props3.dropdownMenuColumnStyle; return react_default.a.createElement( 'div', null, this.getShowOptions().map(function (options, menuIndex) { return react_default.a.createElement( 'ul', { className: prefixCls + '-menu', key: menuIndex, style: dropdownMenuColumnStyle }, options.map(function (option) { return _this5.getOption(option, menuIndex); }) ); }) ); } }]); return Menus; }(react_default.a.Component); Menus_Menus.defaultProps = { options: [], value: [], activeValue: [], onSelect: function onSelect() {}, prefixCls: 'rc-cascader-menus', visible: false, expandTrigger: 'click' }; Menus_Menus.propTypes = { value: prop_types_default.a.array, activeValue: prop_types_default.a.array, options: prop_types_default.a.array, prefixCls: prop_types_default.a.string, expandTrigger: prop_types_default.a.string, onSelect: prop_types_default.a.func, visible: prop_types_default.a.bool, dropdownMenuColumnStyle: prop_types_default.a.object, defaultFieldNames: prop_types_default.a.object, fieldNames: prop_types_default.a.object, expandIcon: prop_types_default.a.node, loadingIcon: prop_types_default.a.node, onItemDoubleClick: prop_types_default.a.func }; /* harmony default export */ var es_Menus = (Menus_Menus); // CONCATENATED MODULE: ./node_modules/rc-cascader/es/Cascader.js var Cascader__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 Cascader__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 _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } function Cascader__classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function Cascader__possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function Cascader__inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var BUILT_IN_PLACEMENTS = { bottomLeft: { points: ['tl', 'bl'], offset: [0, 4], overflow: { adjustX: 1, adjustY: 1 } }, topLeft: { points: ['bl', 'tl'], offset: [0, -4], overflow: { adjustX: 1, adjustY: 1 } }, bottomRight: { points: ['tr', 'br'], offset: [0, 4], overflow: { adjustX: 1, adjustY: 1 } }, topRight: { points: ['br', 'tr'], offset: [0, -4], overflow: { adjustX: 1, adjustY: 1 } } }; var Cascader_Cascader = function (_Component) { Cascader__inherits(Cascader, _Component); function Cascader(props) { Cascader__classCallCheck(this, Cascader); var _this = Cascader__possibleConstructorReturn(this, (Cascader.__proto__ || Object.getPrototypeOf(Cascader)).call(this, props)); _this.setPopupVisible = function (popupVisible) { if (!('popupVisible' in _this.props)) { _this.setState({ popupVisible: popupVisible }); } // sync activeValue with value when panel open if (popupVisible && !_this.state.popupVisible) { _this.setState({ activeValue: _this.state.value }); } _this.props.onPopupVisibleChange(popupVisible); }; _this.handleChange = function (options, setProps, e) { if (e.type !== 'keydown' || e.keyCode === KeyCode["a" /* default */].ENTER) { _this.props.onChange(options.map(function (o) { return o[_this.getFieldName('value')]; }), options); _this.setPopupVisible(setProps.visible); } }; _this.handlePopupVisibleChange = function (popupVisible) { _this.setPopupVisible(popupVisible); }; _this.handleMenuSelect = function (targetOption, menuIndex, e) { // Keep focused state for keyboard support var triggerNode = _this.trigger.getRootDomNode(); if (triggerNode && triggerNode.focus) { triggerNode.focus(); } var _this$props = _this.props, changeOnSelect = _this$props.changeOnSelect, loadData = _this$props.loadData, expandTrigger = _this$props.expandTrigger; if (!targetOption || targetOption.disabled) { return; } var activeValue = _this.state.activeValue; activeValue = activeValue.slice(0, menuIndex + 1); activeValue[menuIndex] = targetOption[_this.getFieldName('value')]; var activeOptions = _this.getActiveOptions(activeValue); if (targetOption.isLeaf === false && !targetOption[_this.getFieldName('children')] && loadData) { if (changeOnSelect) { _this.handleChange(activeOptions, { visible: true }, e); } _this.setState({ activeValue: activeValue }); loadData(activeOptions); return; } var newState = {}; if (!targetOption[_this.getFieldName('children')] || !targetOption[_this.getFieldName('children')].length) { _this.handleChange(activeOptions, { visible: false }, e); // set value to activeValue when select leaf option newState.value = activeValue; // add e.type judgement to prevent `onChange` being triggered by mouseEnter } else if (changeOnSelect && (e.type === 'click' || e.type === 'keydown')) { if (expandTrigger === 'hover') { _this.handleChange(activeOptions, { visible: false }, e); } else { _this.handleChange(activeOptions, { visible: true }, e); } // set value to activeValue on every select newState.value = activeValue; } newState.activeValue = activeValue; // not change the value by keyboard if ('value' in _this.props || e.type === 'keydown' && e.keyCode !== KeyCode["a" /* default */].ENTER) { delete newState.value; } _this.setState(newState); }; _this.handleItemDoubleClick = function () { var changeOnSelect = _this.props.changeOnSelect; if (changeOnSelect) { _this.setPopupVisible(false); } }; _this.handleKeyDown = function (e) { var children = _this.props.children; // https://github.com/ant-design/ant-design/issues/6717 // Don't bind keyboard support when children specify the onKeyDown if (children && children.props.onKeyDown) { children.props.onKeyDown(e); return; } var activeValue = [].concat(_toConsumableArray(_this.state.activeValue)); var currentLevel = activeValue.length - 1 < 0 ? 0 : activeValue.length - 1; var currentOptions = _this.getCurrentLevelOptions(); var currentIndex = currentOptions.map(function (o) { return o[_this.getFieldName('value')]; }).indexOf(activeValue[currentLevel]); if (e.keyCode !== KeyCode["a" /* default */].DOWN && e.keyCode !== KeyCode["a" /* default */].UP && e.keyCode !== KeyCode["a" /* default */].LEFT && e.keyCode !== KeyCode["a" /* default */].RIGHT && e.keyCode !== KeyCode["a" /* default */].ENTER && e.keyCode !== KeyCode["a" /* default */].SPACE && e.keyCode !== KeyCode["a" /* default */].BACKSPACE && e.keyCode !== KeyCode["a" /* default */].ESC && e.keyCode !== KeyCode["a" /* default */].TAB) { return; } // Press any keys above to reopen menu if (!_this.state.popupVisible && e.keyCode !== KeyCode["a" /* default */].BACKSPACE && e.keyCode !== KeyCode["a" /* default */].LEFT && e.keyCode !== KeyCode["a" /* default */].RIGHT && e.keyCode !== KeyCode["a" /* default */].ESC && e.keyCode !== KeyCode["a" /* default */].TAB) { _this.setPopupVisible(true); return; } if (e.keyCode === KeyCode["a" /* default */].DOWN || e.keyCode === KeyCode["a" /* default */].UP) { e.preventDefault(); var nextIndex = currentIndex; if (nextIndex !== -1) { if (e.keyCode === KeyCode["a" /* default */].DOWN) { nextIndex += 1; nextIndex = nextIndex >= currentOptions.length ? 0 : nextIndex; } else { nextIndex -= 1; nextIndex = nextIndex < 0 ? currentOptions.length - 1 : nextIndex; } } else { nextIndex = 0; } activeValue[currentLevel] = currentOptions[nextIndex][_this.getFieldName('value')]; } else if (e.keyCode === KeyCode["a" /* default */].LEFT || e.keyCode === KeyCode["a" /* default */].BACKSPACE) { e.preventDefault(); activeValue.splice(activeValue.length - 1, 1); } else if (e.keyCode === KeyCode["a" /* default */].RIGHT) { e.preventDefault(); if (currentOptions[currentIndex] && currentOptions[currentIndex][_this.getFieldName('children')]) { activeValue.push(currentOptions[currentIndex][_this.getFieldName('children')][0][_this.getFieldName('value')]); } } else if (e.keyCode === KeyCode["a" /* default */].ESC || e.keyCode === KeyCode["a" /* default */].TAB) { _this.setPopupVisible(false); return; } if (!activeValue || activeValue.length === 0) { _this.setPopupVisible(false); } var activeOptions = _this.getActiveOptions(activeValue); var targetOption = activeOptions[activeOptions.length - 1]; _this.handleMenuSelect(targetOption, activeOptions.length - 1, e); if (_this.props.onKeyDown) { _this.props.onKeyDown(e); } }; _this.saveTrigger = function (node) { _this.trigger = node; }; var initialValue = []; if ('value' in props) { initialValue = props.value || []; } else if ('defaultValue' in props) { initialValue = props.defaultValue || []; } warning_default()(!('filedNames' in props), '`filedNames` of Cascader is a typo usage and deprecated, please use `fieldNames` instead.'); _this.state = { popupVisible: props.popupVisible, activeValue: initialValue, value: initialValue, prevProps: props }; _this.defaultFieldNames = { label: 'label', value: 'value', children: 'children' }; return _this; } Cascader__createClass(Cascader, [{ key: 'getPopupDOMNode', value: function getPopupDOMNode() { return this.trigger.getPopupDomNode(); } }, { key: 'getFieldName', value: function getFieldName(name) { var defaultFieldNames = this.defaultFieldNames; var _props = this.props, fieldNames = _props.fieldNames, filedNames = _props.filedNames; if ('filedNames' in this.props) { return filedNames[name] || defaultFieldNames[name]; // For old compatibility } return fieldNames[name] || defaultFieldNames[name]; } }, { key: 'getFieldNames', value: function getFieldNames() { var _props2 = this.props, fieldNames = _props2.fieldNames, filedNames = _props2.filedNames; if ('filedNames' in this.props) { return filedNames; // For old compatibility } return fieldNames; } }, { key: 'getCurrentLevelOptions', value: function getCurrentLevelOptions() { var _this2 = this; var _props$options = this.props.options, options = _props$options === undefined ? [] : _props$options; var _state$activeValue = this.state.activeValue, activeValue = _state$activeValue === undefined ? [] : _state$activeValue; var result = lib_default()(options, function (o, level) { return o[_this2.getFieldName('value')] === activeValue[level]; }, { childrenKeyName: this.getFieldName('children') }); if (result[result.length - 2]) { return result[result.length - 2][this.getFieldName('children')]; } return [].concat(_toConsumableArray(options)).filter(function (o) { return !o.disabled; }); } }, { key: 'getActiveOptions', value: function getActiveOptions(activeValue) { var _this3 = this; return lib_default()(this.props.options || [], function (o, level) { return o[_this3.getFieldName('value')] === activeValue[level]; }, { childrenKeyName: this.getFieldName('children') }); } }, { key: 'render', value: function render() { var _props3 = this.props, prefixCls = _props3.prefixCls, transitionName = _props3.transitionName, popupClassName = _props3.popupClassName, _props3$options = _props3.options, options = _props3$options === undefined ? [] : _props3$options, disabled = _props3.disabled, builtinPlacements = _props3.builtinPlacements, popupPlacement = _props3.popupPlacement, children = _props3.children, restProps = _objectWithoutProperties(_props3, ['prefixCls', 'transitionName', 'popupClassName', 'options', 'disabled', 'builtinPlacements', 'popupPlacement', 'children']); // Did not show popup when there is no options var menus = react_default.a.createElement('div', null); var emptyMenuClassName = ''; if (options && options.length > 0) { menus = react_default.a.createElement(es_Menus, Cascader__extends({}, this.props, { fieldNames: this.getFieldNames(), defaultFieldNames: this.defaultFieldNames, activeValue: this.state.activeValue, onSelect: this.handleMenuSelect, onItemDoubleClick: this.handleItemDoubleClick, visible: this.state.popupVisible })); } else { emptyMenuClassName = ' ' + prefixCls + '-menus-empty'; } return react_default.a.createElement( es["a" /* default */], Cascader__extends({ ref: this.saveTrigger }, restProps, { options: options, disabled: disabled, popupPlacement: popupPlacement, builtinPlacements: builtinPlacements, popupTransitionName: transitionName, action: disabled ? [] : ['click'], popupVisible: disabled ? false : this.state.popupVisible, onPopupVisibleChange: this.handlePopupVisibleChange, prefixCls: prefixCls + '-menus', popupClassName: popupClassName + emptyMenuClassName, popup: menus }), Object(react["cloneElement"])(children, { onKeyDown: this.handleKeyDown, tabIndex: disabled ? undefined : 0 }) ); } }], [{ key: 'getDerivedStateFromProps', value: function getDerivedStateFromProps(nextProps, prevState) { var _prevState$prevProps = prevState.prevProps, prevProps = _prevState$prevProps === undefined ? {} : _prevState$prevProps; var newState = { prevProps: nextProps }; if ('value' in nextProps && !arrays_default()(prevProps.value, nextProps.value)) { newState.value = nextProps.value || []; // allow activeValue diff from value // https://github.com/ant-design/ant-design/issues/2767 if (!('loadData' in nextProps)) { newState.activeValue = nextProps.value || []; } } if ('popupVisible' in nextProps) { newState.popupVisible = nextProps.popupVisible; } return newState; } }]); return Cascader; }(react["Component"]); Cascader_Cascader.defaultProps = { onChange: function onChange() {}, onPopupVisibleChange: function onPopupVisibleChange() {}, disabled: false, transitionName: '', prefixCls: 'rc-cascader', popupClassName: '', popupPlacement: 'bottomLeft', builtinPlacements: BUILT_IN_PLACEMENTS, expandTrigger: 'click', fieldNames: { label: 'label', value: 'value', children: 'children' }, expandIcon: '>' }; Cascader_Cascader.propTypes = { value: prop_types_default.a.array, defaultValue: prop_types_default.a.array, options: prop_types_default.a.array.isRequired, onChange: prop_types_default.a.func, onPopupVisibleChange: prop_types_default.a.func, popupVisible: prop_types_default.a.bool, disabled: prop_types_default.a.bool, transitionName: prop_types_default.a.string, popupClassName: prop_types_default.a.string, popupPlacement: prop_types_default.a.string, prefixCls: prop_types_default.a.string, dropdownMenuColumnStyle: prop_types_default.a.object, builtinPlacements: prop_types_default.a.object, loadData: prop_types_default.a.func, changeOnSelect: prop_types_default.a.bool, children: prop_types_default.a.node, onKeyDown: prop_types_default.a.func, expandTrigger: prop_types_default.a.string, fieldNames: prop_types_default.a.object, filedNames: prop_types_default.a.object, // typo but for compatibility expandIcon: prop_types_default.a.node, loadingIcon: prop_types_default.a.node }; Object(react_lifecycles_compat_es["polyfill"])(Cascader_Cascader); /* harmony default export */ var es_Cascader = (Cascader_Cascader); // CONCATENATED MODULE: ./node_modules/rc-cascader/es/index.js // export this package's api /* harmony default export */ var rc_cascader_es = (es_Cascader); // EXTERNAL MODULE: ./node_modules/antd/node_modules/classnames/index.js var classnames = __webpack_require__("kTQ8"); var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); // EXTERNAL MODULE: ./node_modules/omit.js/es/index.js var omit_js_es = __webpack_require__("JkBm"); // EXTERNAL MODULE: ./node_modules/antd/es/input/index.js + 8 modules var es_input = __webpack_require__("A+AJ"); // EXTERNAL MODULE: ./node_modules/antd/es/icon/index.js + 5 modules var icon = __webpack_require__("FC3+"); // EXTERNAL MODULE: ./node_modules/antd/es/config-provider/index.js + 1 modules var config_provider = __webpack_require__("PmSq"); // EXTERNAL MODULE: ./node_modules/antd/es/locale-provider/LocaleReceiver.js + 1 modules var LocaleReceiver = __webpack_require__("IIvH"); // EXTERNAL MODULE: ./node_modules/antd/es/_util/warning.js var _util_warning = __webpack_require__("qGip"); // CONCATENATED MODULE: ./node_modules/antd/es/cascader/index.js function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function cascader__extends() { cascader__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; }; return cascader__extends.apply(this, arguments); } 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; } function cascader__classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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); } } function cascader__createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function cascader__inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return cascader__possibleConstructorReturn(this, result); }; } function cascader__possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } var __rest = this && this.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; // We limit the filtered item count by default var defaultLimit = 50; function highlightKeyword(str, keyword, prefixCls) { return str.split(keyword).map(function (node, index) { return index === 0 ? node : [/*#__PURE__*/react["createElement"]("span", { className: "".concat(prefixCls, "-menu-item-keyword"), key: "seperator" }, keyword), node]; }); } function defaultFilterOption(inputValue, path, names) { return path.some(function (option) { return option[names.label].indexOf(inputValue) > -1; }); } function defaultRenderFilteredOption(inputValue, path, prefixCls, names) { return path.map(function (option, index) { var label = option[names.label]; var node = label.indexOf(inputValue) > -1 ? highlightKeyword(label, inputValue, prefixCls) : label; return index === 0 ? node : [' / ', node]; }); } function defaultSortFilteredOption(a, b, inputValue, names) { function callback(elem) { return elem[names.label].indexOf(inputValue) > -1; } return a.findIndex(callback) - b.findIndex(callback); } function getFieldNames(props) { var fieldNames = props.fieldNames, filedNames = props.filedNames; if ('filedNames' in props) { return filedNames; // For old compatibility } return fieldNames; } function getFilledFieldNames(props) { var fieldNames = getFieldNames(props) || {}; var names = { children: fieldNames.children || 'children', label: fieldNames.label || 'label', value: fieldNames.value || 'value' }; return names; } function flattenTree(options, props) { var ancestor = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : []; var names = getFilledFieldNames(props); var flattenOptions = []; var childrenName = names.children; options.forEach(function (option) { var path = ancestor.concat(option); if (props.changeOnSelect || !option[childrenName] || !option[childrenName].length) { flattenOptions.push(path); } if (option[childrenName]) { flattenOptions = flattenOptions.concat(flattenTree(option[childrenName], props, path)); } }); return flattenOptions; } var defaultDisplayRender = function defaultDisplayRender(label) { return label.join(' / '); }; function warningValueNotExist(list) { var fieldNames = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; (list || []).forEach(function (item) { var valueFieldName = fieldNames.value || 'value'; Object(_util_warning["a" /* default */])(valueFieldName in item, 'Cascader', 'Not found `value` in `options`.'); warningValueNotExist(item[fieldNames.children || 'children'], fieldNames); }); } var cascader_Cascader = /*#__PURE__*/function (_React$Component) { cascader__inherits(Cascader, _React$Component); var _super = _createSuper(Cascader); function Cascader(props) { var _this; cascader__classCallCheck(this, Cascader); _this = _super.call(this, props); _this.cachedOptions = []; _this.setValue = function (value) { var selectedOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; if (!('value' in _this.props)) { _this.setState({ value: value }); } var onChange = _this.props.onChange; if (onChange) { onChange(value, selectedOptions); } }; _this.saveInput = function (node) { _this.input = node; }; _this.handleChange = function (value, selectedOptions) { _this.setState({ inputValue: '' }); if (selectedOptions[0].__IS_FILTERED_OPTION) { var unwrappedValue = value[0]; var unwrappedSelectedOptions = selectedOptions[0].path; _this.setValue(unwrappedValue, unwrappedSelectedOptions); return; } _this.setValue(value, selectedOptions); }; _this.handlePopupVisibleChange = function (popupVisible) { if (!('popupVisible' in _this.props)) { _this.setState(function (state) { return { popupVisible: popupVisible, inputFocused: popupVisible, inputValue: popupVisible ? state.inputValue : '' }; }); } var onPopupVisibleChange = _this.props.onPopupVisibleChange; if (onPopupVisibleChange) { onPopupVisibleChange(popupVisible); } }; _this.handleInputBlur = function () { _this.setState({ inputFocused: false }); }; _this.handleInputClick = function (e) { var _this$state = _this.state, inputFocused = _this$state.inputFocused, popupVisible = _this$state.popupVisible; // Prevent `Trigger` behaviour. if (inputFocused || popupVisible) { e.stopPropagation(); if (e.nativeEvent.stopImmediatePropagation) { e.nativeEvent.stopImmediatePropagation(); } } }; _this.handleKeyDown = function (e) { // SPACE => https://github.com/ant-design/ant-design/issues/16871 if (e.keyCode === KeyCode["a" /* default */].BACKSPACE || e.keyCode === KeyCode["a" /* default */].SPACE) { e.stopPropagation(); } }; _this.handleInputChange = function (e) { var inputValue = e.target.value; _this.setState({ inputValue: inputValue }); }; _this.clearSelection = function (e) { e.preventDefault(); e.stopPropagation(); if (!_this.state.inputValue) { _this.setValue([]); _this.handlePopupVisibleChange(false); } else { _this.setState({ inputValue: '' }); } }; _this.renderCascader = function (_ref, locale) { var _classNames, _classNames2, _classNames3, _classNames4; var getContextPopupContainer = _ref.getPopupContainer, getPrefixCls = _ref.getPrefixCls, renderEmpty = _ref.renderEmpty; var _assertThisInitialize = _assertThisInitialized(_this), props = _assertThisInitialize.props, state = _assertThisInitialize.state; var customizePrefixCls = props.prefixCls, customizeInputPrefixCls = props.inputPrefixCls, children = props.children, _props$placeholder = props.placeholder, placeholder = _props$placeholder === void 0 ? locale.placeholder || 'Please select' : _props$placeholder, size = props.size, disabled = props.disabled, className = props.className, style = props.style, allowClear = props.allowClear, _props$showSearch = props.showSearch, showSearch = _props$showSearch === void 0 ? false : _props$showSearch, suffixIcon = props.suffixIcon, notFoundContent = props.notFoundContent, otherProps = __rest(props, ["prefixCls", "inputPrefixCls", "children", "placeholder", "size", "disabled", "className", "style", "allowClear", "showSearch", "suffixIcon", "notFoundContent"]); var value = state.value, inputFocused = state.inputFocused; var prefixCls = getPrefixCls('cascader', customizePrefixCls); var inputPrefixCls = getPrefixCls('input', customizeInputPrefixCls); var sizeCls = classnames_default()((_classNames = {}, _defineProperty(_classNames, "".concat(inputPrefixCls, "-lg"), size === 'large'), _defineProperty(_classNames, "".concat(inputPrefixCls, "-sm"), size === 'small'), _classNames)); var clearIcon = allowClear && !disabled && value.length > 0 || state.inputValue ? /*#__PURE__*/react["createElement"](icon["default"], { type: "close-circle", theme: "filled", className: "".concat(prefixCls, "-picker-clear"), onClick: _this.clearSelection }) : null; var arrowCls = classnames_default()((_classNames2 = {}, _defineProperty(_classNames2, "".concat(prefixCls, "-picker-arrow"), true), _defineProperty(_classNames2, "".concat(prefixCls, "-picker-arrow-expand"), state.popupVisible), _classNames2)); var pickerCls = classnames_default()(className, "".concat(prefixCls, "-picker"), (_classNames3 = {}, _defineProperty(_classNames3, "".concat(prefixCls, "-picker-with-value"), state.inputValue), _defineProperty(_classNames3, "".concat(prefixCls, "-picker-disabled"), disabled), _defineProperty(_classNames3, "".concat(prefixCls, "-picker-").concat(size), !!size), _defineProperty(_classNames3, "".concat(prefixCls, "-picker-show-search"), !!showSearch), _defineProperty(_classNames3, "".concat(prefixCls, "-picker-focused"), inputFocused), _classNames3)); // Fix bug of https://github.com/facebook/react/pull/5004 // and https://fb.me/react-unknown-prop var inputProps = Object(omit_js_es["a" /* default */])(otherProps, ['onChange', 'options', 'popupPlacement', 'transitionName', 'displayRender', 'onPopupVisibleChange', 'changeOnSelect', 'expandTrigger', 'popupVisible', 'getPopupContainer', 'loadData', 'popupClassName', 'filterOption', 'renderFilteredOption', 'sortFilteredOption', 'notFoundContent', 'fieldNames', 'filedNames']); var options = props.options; var names = getFilledFieldNames(_this.props); if (options && options.length > 0) { if (state.inputValue) { options = _this.generateFilteredOptions(prefixCls, renderEmpty); } } else { var _ref2; options = [(_ref2 = {}, _defineProperty(_ref2, names.value, 'ANT_CASCADER_NOT_FOUND'), _defineProperty(_ref2, names.label, notFoundContent || renderEmpty('Cascader')), _defineProperty(_ref2, "disabled", true), _defineProperty(_ref2, "isEmptyNode", true), _ref2)]; } // Dropdown menu should keep previous status until it is fully closed. if (!state.popupVisible) { options = _this.cachedOptions; } else { _this.cachedOptions = options; } var dropdownMenuColumnStyle = {}; var isNotFound = (options || []).length === 1 && options[0].isEmptyNode; if (isNotFound) { dropdownMenuColumnStyle.height = 'auto'; // Height of one row. } // The default value of `matchInputWidth` is `true` var resultListMatchInputWidth = showSearch.matchInputWidth !== false; if (resultListMatchInputWidth && (state.inputValue || isNotFound) && _this.input) { dropdownMenuColumnStyle.width = _this.input.input.offsetWidth; } var inputIcon = suffixIcon && ( /*#__PURE__*/react["isValidElement"](suffixIcon) ? /*#__PURE__*/react["cloneElement"](suffixIcon, { className: classnames_default()((_classNames4 = {}, _defineProperty(_classNames4, suffixIcon.props.className, suffixIcon.props.className), _defineProperty(_classNames4, "".concat(prefixCls, "-picker-arrow"), true), _classNames4)) }) : /*#__PURE__*/react["createElement"]("span", { className: "".concat(prefixCls, "-picker-arrow") }, suffixIcon)) || /*#__PURE__*/react["createElement"](icon["default"], { type: "down", className: arrowCls }); var input = children || /*#__PURE__*/react["createElement"]("span", { style: style, className: pickerCls }, /*#__PURE__*/react["createElement"]("span", { className: "".concat(prefixCls, "-picker-label") }, _this.getLabel()), /*#__PURE__*/react["createElement"](es_input["default"], cascader__extends({}, inputProps, { tabIndex: "-1", ref: _this.saveInput, prefixCls: inputPrefixCls, placeholder: value && value.length > 0 ? undefined : placeholder, className: "".concat(prefixCls, "-input ").concat(sizeCls), value: state.inputValue, disabled: disabled, readOnly: !showSearch, autoComplete: inputProps.autoComplete || 'off', onClick: showSearch ? _this.handleInputClick : undefined, onBlur: showSearch ? _this.handleInputBlur : undefined, onKeyDown: _this.handleKeyDown, onChange: showSearch ? _this.handleInputChange : undefined })), clearIcon, inputIcon); var expandIcon = /*#__PURE__*/react["createElement"](icon["default"], { type: "right" }); var loadingIcon = /*#__PURE__*/react["createElement"]("span", { className: "".concat(prefixCls, "-menu-item-loading-icon") }, /*#__PURE__*/react["createElement"](icon["default"], { type: "redo", spin: true })); var getPopupContainer = props.getPopupContainer || getContextPopupContainer; var rest = Object(omit_js_es["a" /* default */])(props, ['inputIcon', 'expandIcon', 'loadingIcon']); return /*#__PURE__*/react["createElement"](rc_cascader_es, cascader__extends({}, rest, { prefixCls: prefixCls, getPopupContainer: getPopupContainer, options: options, value: value, popupVisible: state.popupVisible, onPopupVisibleChange: _this.handlePopupVisibleChange, onChange: _this.handleChange, dropdownMenuColumnStyle: dropdownMenuColumnStyle, expandIcon: expandIcon, loadingIcon: loadingIcon }), input); }; _this.state = { value: props.value || props.defaultValue || [], inputValue: '', inputFocused: false, popupVisible: props.popupVisible, flattenOptions: props.showSearch ? flattenTree(props.options, props) : undefined, prevProps: props }; return _this; } cascader__createClass(Cascader, [{ key: "getLabel", value: function getLabel() { var _this$props = this.props, options = _this$props.options, _this$props$displayRe = _this$props.displayRender, displayRender = _this$props$displayRe === void 0 ? defaultDisplayRender : _this$props$displayRe; var names = getFilledFieldNames(this.props); var value = this.state.value; var unwrappedValue = Array.isArray(value[0]) ? value[0] : value; var selectedOptions = lib_default()(options, function (o, level) { return o[names.value] === unwrappedValue[level]; }, { childrenKeyName: names.children }); var label = selectedOptions.map(function (o) { return o[names.label]; }); return displayRender(label, selectedOptions); } }, { key: "generateFilteredOptions", value: function generateFilteredOptions(prefixCls, renderEmpty) { var _this2 = this, _ref4; var _this$props2 = this.props, showSearch = _this$props2.showSearch, notFoundContent = _this$props2.notFoundContent; var names = getFilledFieldNames(this.props); var _showSearch$filter = showSearch.filter, filter = _showSearch$filter === void 0 ? defaultFilterOption : _showSearch$filter, _showSearch$render = showSearch.render, render = _showSearch$render === void 0 ? defaultRenderFilteredOption : _showSearch$render, _showSearch$sort = showSearch.sort, sort = _showSearch$sort === void 0 ? defaultSortFilteredOption : _showSearch$sort, _showSearch$limit = showSearch.limit, limit = _showSearch$limit === void 0 ? defaultLimit : _showSearch$limit; var _this$state2 = this.state, _this$state2$flattenO = _this$state2.flattenOptions, flattenOptions = _this$state2$flattenO === void 0 ? [] : _this$state2$flattenO, inputValue = _this$state2.inputValue; // Limit the filter if needed var filtered; if (limit > 0) { filtered = []; var matchCount = 0; // Perf optimization to filter items only below the limit flattenOptions.some(function (path) { var match = filter(_this2.state.inputValue, path, names); if (match) { filtered.push(path); matchCount += 1; } return matchCount >= limit; }); } else { Object(_util_warning["a" /* default */])(typeof limit !== 'number', 'Cascader', "'limit' of showSearch should be positive number or false."); filtered = flattenOptions.filter(function (path) { return filter(_this2.state.inputValue, path, names); }); } filtered.sort(function (a, b) { return sort(a, b, inputValue, names); }); if (filtered.length > 0) { return filtered.map(function (path) { var _ref3; return _ref3 = { __IS_FILTERED_OPTION: true, path: path }, _defineProperty(_ref3, names.value, path.map(function (o) { return o[names.value]; })), _defineProperty(_ref3, names.label, render(inputValue, path, prefixCls, names)), _defineProperty(_ref3, "disabled", path.some(function (o) { return !!o.disabled; })), _defineProperty(_ref3, "isEmptyNode", true), _ref3; }); } return [(_ref4 = {}, _defineProperty(_ref4, names.value, 'ANT_CASCADER_NOT_FOUND'), _defineProperty(_ref4, names.label, notFoundContent || renderEmpty('Cascader')), _defineProperty(_ref4, "disabled", true), _defineProperty(_ref4, "isEmptyNode", true), _ref4)]; } }, { key: "focus", value: function focus() { this.input.focus(); } }, { key: "blur", value: function blur() { this.input.blur(); } }, { key: "render", value: function render() { var _this3 = this; return /*#__PURE__*/react["createElement"](config_provider["ConfigConsumer"], null, function (configArgument) { return /*#__PURE__*/react["createElement"](LocaleReceiver["a" /* default */], null, function (locale) { return _this3.renderCascader(configArgument, locale); }); }); } }], [{ key: "getDerivedStateFromProps", value: function getDerivedStateFromProps(nextProps, _ref5) { var prevProps = _ref5.prevProps; var newState = { prevProps: nextProps }; if ('value' in nextProps) { newState.value = nextProps.value || []; } if ('popupVisible' in nextProps) { newState.popupVisible = nextProps.popupVisible; } if (nextProps.showSearch && prevProps.options !== nextProps.options) { newState.flattenOptions = flattenTree(nextProps.options, nextProps); } if (false) { warningValueNotExist(nextProps.options, getFieldNames(nextProps)); } return newState; } }]); return Cascader; }(react["Component"]); cascader_Cascader.defaultProps = { transitionName: 'slide-up', popupPlacement: 'bottomLeft', options: [], disabled: false, allowClear: true }; Object(react_lifecycles_compat_es["polyfill"])(cascader_Cascader); /* harmony default export */ var cascader = __webpack_exports__["default"] = (cascader_Cascader); /***/ }), /***/ "cwkc": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__style_index_less__ = __webpack_require__("vtiu"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__style_index_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__style_index_less__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__index_less__ = __webpack_require__("tSRs"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__index_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__index_less__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__empty_style__ = __webpack_require__("mxhB"); // style dependencies /***/ }), /***/ "cz5N": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/defineProperty.js var defineProperty = __webpack_require__("bOdI"); var defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty); // EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/extends.js var helpers_extends = __webpack_require__("Dd8w"); var extends_default = /*#__PURE__*/__webpack_require__.n(helpers_extends); // EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/classCallCheck.js var classCallCheck = __webpack_require__("Zrlr"); var classCallCheck_default = /*#__PURE__*/__webpack_require__.n(classCallCheck); // EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/createClass.js var createClass = __webpack_require__("wxAW"); var createClass_default = /*#__PURE__*/__webpack_require__.n(createClass); // EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/possibleConstructorReturn.js var possibleConstructorReturn = __webpack_require__("zwoO"); var possibleConstructorReturn_default = /*#__PURE__*/__webpack_require__.n(possibleConstructorReturn); // EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/inherits.js var inherits = __webpack_require__("Pf15"); var inherits_default = /*#__PURE__*/__webpack_require__.n(inherits); // EXTERNAL MODULE: ./node_modules/react/index.js var react = __webpack_require__("GiK3"); var react_default = /*#__PURE__*/__webpack_require__.n(react); // EXTERNAL MODULE: ./node_modules/prop-types/index.js var prop_types = __webpack_require__("KSGD"); var prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types); // EXTERNAL MODULE: ./node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js var react_lifecycles_compat_es = __webpack_require__("R8mX"); // EXTERNAL MODULE: ./node_modules/react-dom/index.js var react_dom = __webpack_require__("O27J"); var react_dom_default = /*#__PURE__*/__webpack_require__.n(react_dom); // CONCATENATED MODULE: ./node_modules/rc-util/es/Dom/findDOMNode.js /** * Return if a node is a DOM node. Else will return by `findDOMNode` */ function findDOMNode(node) { if (node instanceof HTMLElement) { return node; } return react_dom_default.a.findDOMNode(node); } // EXTERNAL MODULE: ./node_modules/classnames/index.js var classnames = __webpack_require__("HW6M"); var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); // EXTERNAL MODULE: ./node_modules/raf/index.js var raf = __webpack_require__("ommR"); var raf_default = /*#__PURE__*/__webpack_require__.n(raf); // EXTERNAL MODULE: ./node_modules/rc-animate/es/util/motion.js var motion = __webpack_require__("RYu5"); // CONCATENATED MODULE: ./node_modules/rc-animate/es/CSSMotion.js /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return MotionPropTypes; }); /* unused harmony export genCSSMotion */ /* eslint-disable react/default-props-match-prop-types, react/no-multi-comp */ var STATUS_NONE = 'none'; var STATUS_APPEAR = 'appear'; var STATUS_ENTER = 'enter'; var STATUS_LEAVE = 'leave'; var MotionPropTypes = { eventProps: prop_types_default.a.object, // Internal usage. Only pass by CSSMotionList visible: prop_types_default.a.bool, children: prop_types_default.a.func, motionName: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.object]), motionAppear: prop_types_default.a.bool, motionEnter: prop_types_default.a.bool, motionLeave: prop_types_default.a.bool, motionLeaveImmediately: prop_types_default.a.bool, // Trigger leave motion immediately motionDeadline: prop_types_default.a.number, removeOnLeave: prop_types_default.a.bool, leavedClassName: prop_types_default.a.string, onAppearStart: prop_types_default.a.func, onAppearActive: prop_types_default.a.func, onAppearEnd: prop_types_default.a.func, onEnterStart: prop_types_default.a.func, onEnterActive: prop_types_default.a.func, onEnterEnd: prop_types_default.a.func, onLeaveStart: prop_types_default.a.func, onLeaveActive: prop_types_default.a.func, onLeaveEnd: prop_types_default.a.func }; /** * `transitionSupport` is used for none transition test case. * Default we use browser transition event support check. */ function genCSSMotion(config) { var transitionSupport = config; var forwardRef = !!react_default.a.forwardRef; if (typeof config === 'object') { transitionSupport = config.transitionSupport; forwardRef = 'forwardRef' in config ? config.forwardRef : forwardRef; } function isSupportTransition(props) { return !!(props.motionName && transitionSupport); } var CSSMotion = function (_React$Component) { inherits_default()(CSSMotion, _React$Component); function CSSMotion() { classCallCheck_default()(this, CSSMotion); var _this = possibleConstructorReturn_default()(this, (CSSMotion.__proto__ || Object.getPrototypeOf(CSSMotion)).call(this)); _this.onDomUpdate = function () { var _this$state = _this.state, status = _this$state.status, newStatus = _this$state.newStatus; var _this$props = _this.props, onAppearStart = _this$props.onAppearStart, onEnterStart = _this$props.onEnterStart, onLeaveStart = _this$props.onLeaveStart, onAppearActive = _this$props.onAppearActive, onEnterActive = _this$props.onEnterActive, onLeaveActive = _this$props.onLeaveActive, motionAppear = _this$props.motionAppear, motionEnter = _this$props.motionEnter, motionLeave = _this$props.motionLeave; if (!isSupportTransition(_this.props)) { return; } // Event injection var $ele = _this.getElement(); if (_this.$cacheEle !== $ele) { _this.removeEventListener(_this.$cacheEle); _this.addEventListener($ele); _this.$cacheEle = $ele; } // Init status if (newStatus && status === STATUS_APPEAR && motionAppear) { _this.updateStatus(onAppearStart, null, null, function () { _this.updateActiveStatus(onAppearActive, STATUS_APPEAR); }); } else if (newStatus && status === STATUS_ENTER && motionEnter) { _this.updateStatus(onEnterStart, null, null, function () { _this.updateActiveStatus(onEnterActive, STATUS_ENTER); }); } else if (newStatus && status === STATUS_LEAVE && motionLeave) { _this.updateStatus(onLeaveStart, null, null, function () { _this.updateActiveStatus(onLeaveActive, STATUS_LEAVE); }); } }; _this.onMotionEnd = function (event) { var _this$state2 = _this.state, status = _this$state2.status, statusActive = _this$state2.statusActive; var _this$props2 = _this.props, onAppearEnd = _this$props2.onAppearEnd, onEnterEnd = _this$props2.onEnterEnd, onLeaveEnd = _this$props2.onLeaveEnd; if (status === STATUS_APPEAR && statusActive) { _this.updateStatus(onAppearEnd, { status: STATUS_NONE }, event); } else if (status === STATUS_ENTER && statusActive) { _this.updateStatus(onEnterEnd, { status: STATUS_NONE }, event); } else if (status === STATUS_LEAVE && statusActive) { _this.updateStatus(onLeaveEnd, { status: STATUS_NONE }, event); } }; _this.setNodeRef = function (node) { var internalRef = _this.props.internalRef; _this.node = node; if (typeof internalRef === 'function') { internalRef(node); } else if (internalRef && 'current' in internalRef) { internalRef.current = node; } }; _this.getElement = function () { try { return findDOMNode(_this.node || _this); } catch (e) { /** * Fallback to cache element. * This is only happen when `motionDeadline` trigger but element removed. */ return _this.$cacheEle; } }; _this.addEventListener = function ($ele) { if (!$ele) return; $ele.addEventListener(motion["d" /* transitionEndName */], _this.onMotionEnd); $ele.addEventListener(motion["a" /* animationEndName */], _this.onMotionEnd); }; _this.removeEventListener = function ($ele) { if (!$ele) return; $ele.removeEventListener(motion["d" /* transitionEndName */], _this.onMotionEnd); $ele.removeEventListener(motion["a" /* animationEndName */], _this.onMotionEnd); }; _this.updateStatus = function (styleFunc, additionalState, event, callback) { var statusStyle = styleFunc ? styleFunc(_this.getElement(), event) : null; if (statusStyle === false || _this._destroyed) return; var nextStep = void 0; if (callback) { nextStep = function nextStep() { _this.nextFrame(callback); }; } _this.setState(extends_default()({ statusStyle: typeof statusStyle === 'object' ? statusStyle : null, newStatus: false }, additionalState), nextStep); // Trigger before next frame & after `componentDidMount` }; _this.updateActiveStatus = function (styleFunc, currentStatus) { // `setState` use `postMessage` to trigger at the end of frame. // Let's use requestAnimationFrame to update new state in next frame. _this.nextFrame(function () { var status = _this.state.status; if (status !== currentStatus) return; var motionDeadline = _this.props.motionDeadline; _this.updateStatus(styleFunc, { statusActive: true }); if (motionDeadline > 0) { setTimeout(function () { _this.onMotionEnd({ deadline: true }); }, motionDeadline); } }); }; _this.nextFrame = function (func) { _this.cancelNextFrame(); _this.raf = raf_default()(func); }; _this.cancelNextFrame = function () { if (_this.raf) { raf_default.a.cancel(_this.raf); _this.raf = null; } }; _this.state = { status: STATUS_NONE, statusActive: false, newStatus: false, statusStyle: null }; _this.$cacheEle = null; _this.node = null; _this.raf = null; return _this; } createClass_default()(CSSMotion, [{ key: 'componentDidMount', value: function componentDidMount() { this.onDomUpdate(); } }, { key: 'componentDidUpdate', value: function componentDidUpdate() { this.onDomUpdate(); } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { this._destroyed = true; this.removeEventListener(this.$cacheEle); this.cancelNextFrame(); } }, { key: 'render', value: function render() { var _classNames; var _state = this.state, status = _state.status, statusActive = _state.statusActive, statusStyle = _state.statusStyle; var _props = this.props, children = _props.children, motionName = _props.motionName, visible = _props.visible, removeOnLeave = _props.removeOnLeave, leavedClassName = _props.leavedClassName, eventProps = _props.eventProps; if (!children) return null; if (status === STATUS_NONE || !isSupportTransition(this.props)) { if (visible) { return children(extends_default()({}, eventProps), this.setNodeRef); } else if (!removeOnLeave) { return children(extends_default()({}, eventProps, { className: leavedClassName }), this.setNodeRef); } return null; } return children(extends_default()({}, eventProps, { className: classnames_default()((_classNames = {}, defineProperty_default()(_classNames, Object(motion["b" /* getTransitionName */])(motionName, status), status !== STATUS_NONE), defineProperty_default()(_classNames, Object(motion["b" /* getTransitionName */])(motionName, status + '-active'), status !== STATUS_NONE && statusActive), defineProperty_default()(_classNames, motionName, typeof motionName === 'string'), _classNames)), style: statusStyle }), this.setNodeRef); } }], [{ key: 'getDerivedStateFromProps', value: function getDerivedStateFromProps(props, _ref) { var prevProps = _ref.prevProps, prevStatus = _ref.status; if (!isSupportTransition(props)) return {}; var visible = props.visible, motionAppear = props.motionAppear, motionEnter = props.motionEnter, motionLeave = props.motionLeave, motionLeaveImmediately = props.motionLeaveImmediately; var newState = { prevProps: props }; // Clean up status if prop set to false if (prevStatus === STATUS_APPEAR && !motionAppear || prevStatus === STATUS_ENTER && !motionEnter || prevStatus === STATUS_LEAVE && !motionLeave) { newState.status = STATUS_NONE; newState.statusActive = false; newState.newStatus = false; } // Appear if (!prevProps && visible && motionAppear) { newState.status = STATUS_APPEAR; newState.statusActive = false; newState.newStatus = true; } // Enter if (prevProps && !prevProps.visible && visible && motionEnter) { newState.status = STATUS_ENTER; newState.statusActive = false; newState.newStatus = true; } // Leave if (prevProps && prevProps.visible && !visible && motionLeave || !prevProps && motionLeaveImmediately && !visible && motionLeave) { newState.status = STATUS_LEAVE; newState.statusActive = false; newState.newStatus = true; } return newState; } }]); return CSSMotion; }(react_default.a.Component); CSSMotion.propTypes = extends_default()({}, MotionPropTypes, { internalRef: prop_types_default.a.oneOfType([prop_types_default.a.object, prop_types_default.a.func]) }); CSSMotion.defaultProps = { visible: true, motionEnter: true, motionAppear: true, motionLeave: true, removeOnLeave: true }; Object(react_lifecycles_compat_es["polyfill"])(CSSMotion); if (!forwardRef) { return CSSMotion; } return react_default.a.forwardRef(function (props, ref) { return react_default.a.createElement(CSSMotion, extends_default()({ internalRef: ref }, props)); }); } /* harmony default export */ var es_CSSMotion = __webpack_exports__["b"] = (genCSSMotion(motion["c" /* supportTransition */])); /***/ }), /***/ "d4VB": /***/ (function(module, exports) { // removed by extract-text-webpack-plugin /***/ }), /***/ "d60R": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; __webpack_require__("baa2"); var _icon = _interopRequireDefault(__webpack_require__("FC3+")); var _objectSpread2 = _interopRequireDefault(__webpack_require__("+TWC")); var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); var _dva = __webpack_require__("S6G3"); __webpack_require__("bPsJ"); var _reactDom = _interopRequireDefault(__webpack_require__("O27J")); var _moment = _interopRequireDefault(__webpack_require__("PJh5")); var _BoxTool = _interopRequireDefault(__webpack_require__("2pqD")); var _MouseMovement = _interopRequireDefault(__webpack_require__("06MX")); var _recordRTC = __webpack_require__("NH7q"); var _classnames = _interopRequireDefault(__webpack_require__("HW6M")); var _dec, _class; /** * 视频通话页面 */ // import RecordVideo from './recordVideo'; function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } var VideoBox = exports.default = (_dec = (0, _dva.connect)(function (state) { return { ownCid: state.im.v5Data.ownCid, videoMember: state.command.videoMember, videoType: state.command.videoType, // 布局类型 0: 九宫格 1: 右侧列表 2: 顶部列表 3: 十六宫格 4: 二十五宫格 videoGenre: state.command.videoGenre // 功能类型 0: 视频调度(一对多) 1: 视频上拉(一对一) }; }), _dec(_class = /*#__PURE__*/function (_Component) { function VideoBox(props) { var _this; (0, _classCallCheck2.default)(this, VideoBox); _this = _callSuper(this, VideoBox, [props]); _this.switchVideoTool = function (name) { var toolStatus = _this.state.toolStatus; toolStatus[name] = !toolStatus[name]; _this.setState({ toolStatus: toolStatus, toolTime: (0, _moment.default)().format('x') }); }; _this.setScreen = function () { var isFullScreen = _this.state.isFullScreen; var boxs = document.getElementById("video-boxs"); boxs.style.left = "50vw"; boxs.style.top = "50vh"; _this.setState({ isFullScreen: !isFullScreen }); }; _this.onScrollVideo = function (type) { var videoType = _this.props.videoType; var _this$state = _this.state, videoMember = _this$state.videoMember, currentVideoNo = _this$state.currentVideoNo, isMainChecked = _this$state.isMainChecked; var videoLen = videoMember.length; if (videoType == 0 && videoMember.length > 9 || videoType == 3 && videoMember.length > 16 || videoType == 4 && videoMember.length > 25) { videoLen = videoType == 0 ? 8 : videoType == 3 ? 15 : 24; if (type == 'before' && currentVideoNo != 0) { currentVideoNo = currentVideoNo - videoLen < 0 ? 0 : currentVideoNo - videoLen; } else if (type == 'after') { currentVideoNo = videoLen + currentVideoNo >= videoMember.length ? currentVideoNo : videoLen + currentVideoNo; } } console.log('currentVideoNo', currentVideoNo); _this.setState({ currentVideoNo: currentVideoNo }); }; _this.onChangeVideo = function (video) { console.log('onChangeVideo', video); var beforeCheckVideo = _this.state.beforeCheckVideo; if (beforeCheckVideo.id) { _this.props.dispatch({ type: 'command/fetchVideoMemberList', payload: { type: 'peerJoin', memberList: { videoId: beforeCheckVideo.videoId, hasVideo: beforeCheckVideo.hasVideo, userName: beforeCheckVideo.userName, mobilePhone: beforeCheckVideo.mobilePhone, checked: false, status: beforeCheckVideo.status, id: beforeCheckVideo.id } } }); } if (video == 'main') { _this.setState({ isMainChecked: true }); } else { _this.setState({ beforeCheckVideo: video, isMainChecked: false }); _this.props.dispatch({ type: 'command/fetchVideoMemberList', payload: { type: 'peerJoin', memberList: { videoId: video.videoId, hasVideo: video.hasVideo, userName: video.userName, mobilePhone: video.mobilePhone, checked: true, status: video.status, id: video.id } } }); } }; _this.renderVideoList = function () { var _this$state2 = _this.state, videoList = _this$state2.videoList, currentVideoNo = _this$state2.currentVideoNo, videoMember = _this$state2.videoMember, isMainChecked = _this$state2.isMainChecked; var _this$props = _this.props, _videoThis = _this$props._videoThis, videoType = _this$props.videoType, videoGenre = _this$props.videoGenre; var hasShowOption = false; var videoingList = videoMember.filter(function (video, index) { return video.status != "fail"; }); videoingList = videoingList.filter(function (video, index) { return video.status != "no"; }); console.log('videoingList', videoingList); var videoLen = videoingList.length; var currentVideoList = []; if (videoType == 0 && videoingList.length > 9 || videoType == 3 && videoingList.length > 16 || videoType == 4 && videoingList.length > 25) { hasShowOption = true; videoLen = videoType == 0 ? 8 : videoType == 3 ? 15 : 24; if (currentVideoNo > 0) { currentVideoList = videoingList.filter(function (item, index) { return index >= currentVideoNo && index < currentVideoNo + videoLen; }); } else { currentVideoList = videoingList.filter(function (item, index) { return index < videoLen; }); } } else { currentVideoList = videoingList; } var hasVideoScheduling = videoGenre == 0 ? true : false; if (!hasVideoScheduling) { videoLen = 0; } var clsString = (0, _classnames.default)("col-div", "video-main", "video-container", isMainChecked ? "video-box-checked" : "", hasVideoScheduling ? "" : 'video-main-hidden'); return /*#__PURE__*/_react.default.createElement("div", { id: "div-video-child", className: "video-layout".concat(videoType, " video-layout").concat(videoType, "-").concat(videoLen) }, /*#__PURE__*/_react.default.createElement("div", { id: "div-video-local", className: clsString, onClick: _this.onChangeVideo.bind(_this, 'main') }, /*#__PURE__*/_react.default.createElement("div", { id: "main-video", style: { width: '100%', height: '100%' } }, /*#__PURE__*/_react.default.createElement("div", { id: "main-video-btns", className: "row-div", style: { width: "156px", position: "absolute", zIndex: 10, justifyContent: "center", alignSelf: "flex-end", right: "0", bottom: "0" } }), /*#__PURE__*/_react.default.createElement("div", { className: "video-name" }, "\u6211"), /*#__PURE__*/_react.default.createElement("div", { id: "mask_main", className: "mask col-div", style: { display: "none" } }, /*#__PURE__*/_react.default.createElement("img", { style: { width: "63px", height: "69px", zIndex: 10 }, src: __webpack_require__("K+uK"), alt: "" }), /*#__PURE__*/_react.default.createElement("div", { style: { height: "10px" } }), /*#__PURE__*/_react.default.createElement("div", { style: { zIndex: 10 } }, "\u6444\u50CF\u5934\u672A\u6253\u5F00")))), hasShowOption ? /*#__PURE__*/_react.default.createElement("div", { className: "video-option-left", onClick: _this.onScrollVideo.bind(_this, 'before') }, "<") : null, hasShowOption ? /*#__PURE__*/_react.default.createElement("div", { className: "video-option-right", onClick: _this.onScrollVideo.bind(_this, 'after') }, ">") : null, currentVideoList.map(function (video, i) { console.log('currentVideoList', video); var statusText = video.status == "no" ? "正在调度" : "摄像头未打开"; var clsStr = (0, _classnames.default)("video-box", "video-container", video.checked ? "video-box-checked" : ""); return /*#__PURE__*/_react.default.createElement("div", { className: clsStr, id: video.videoId, onClick: _this.onChangeVideo.bind(_this, video) }, !video.hasVideo ? /*#__PURE__*/_react.default.createElement("div", { id: "mask_" + video.videoId, className: "mask col-div" }, /*#__PURE__*/_react.default.createElement("img", { style: { width: "63px", height: "69px", zIndex: 10 }, src: __webpack_require__("K+uK"), alt: "" }), /*#__PURE__*/_react.default.createElement("div", { style: { height: "10px" } }), /*#__PURE__*/_react.default.createElement("div", { style: { zIndex: 10 } }, statusText)) : null, /*#__PURE__*/_react.default.createElement("div", { className: "video-name" }, video.hasVideo ? /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("img", { src: __webpack_require__("8ZKn") })) : /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("img", { src: __webpack_require__("acLb") })), video.userName)); })); }; _this.onMouseDown = function () { var isFullScreen = _this.state.isFullScreen; if (isFullScreen) { return; } _this.setState({ videoLocal: { isDown: true, offsetLeft: document.getElementsByClassName('video-boxs')[0].offsetLeft, offsetTop: document.getElementsByClassName('video-boxs')[0].offsetTop } }); }; _this.onMouseUp = function () { var isFullScreen = _this.state.isFullScreen; if (isFullScreen) { return; } _this.setState({ videoLocal: (0, _objectSpread2.default)({}, _this.state.videoLocal, { isDown: false }) }); }; _this.state = { videoLocal: { isDown: false, offsetLeft: 0, offsetTop: 0 }, isFullScreen: false, currentTime: "", toolTime: "", //处理刷新问题 toolStatus: { mute: false, video: false, record: false, add: false, close: false, share: false }, canCamera: false, canMic: false, videoList: [1, 2, 3, 4, 5, 6, 7, 8, 9], mainVideo: "", videoMember: [], currentVideoNo: 0, isMainChecked: true, beforeCheckVideo: {}, boxToolStyle: (0, _classnames.default)("box-tool", "box-tool-default") }; return _this; } (0, _inherits2.default)(VideoBox, _Component); return (0, _createClass2.default)(VideoBox, [{ key: "componentWillReceiveProps", value: function componentWillReceiveProps(nextProps) { if (JSON.stringify(nextProps.videoMember) !== JSON.stringify(this.state.videoMember)) { console.log("VideoBox"); this.setState({ videoMember: nextProps.videoMember }); } } }, { key: "componentDidMount", value: function componentDidMount() { var _this2 = this; var that = this; // 判断麦克风和摄像头是否可用 TRTC.getCameras().then(function (res) { console.log('getCameras', res); if (res.length > 0) { _this2.setState({ canCamera: true, toolStatus: (0, _objectSpread2.default)({}, _this2.state.toolStatus, { video: false }) }); } }); TRTC.getMicrophones().then(function (res) { console.log('getMicrophones', res); if (res.length > 0) { if (_this2.state.videoGenre != 0) { _this2.setState({ canMic: true, toolStatus: (0, _objectSpread2.default)({}, _this2.state.toolStatus, { mute: true }) }); } else { _this2.setState({ canMic: true, toolStatus: (0, _objectSpread2.default)({}, _this2.state.toolStatus, { mute: false }) }); } } }); if (this.state.videoGenre != 0) { this.setState({ toolStatus: (0, _objectSpread2.default)({}, this.state.toolStatus, { mute: true }) }); } setInterval(function () { _this2.getCurrentTime(); }, 1000); // initRecordRTC(); setTimeout(function () { that.setState({ boxToolStyle: "box-tool" }); }, 3700); } }, { key: "getCurrentTime", value: function getCurrentTime() { var date = (0, _moment.default)().format("YYYY-MM-DD"); var time = (0, _moment.default)().format("HH:mm:ss"); var week = (0, _moment.default)().day(); switch (week) { case 1: week = '星期一'; break; case 2: week = '星期二'; break; case 3: week = '星期三'; break; case 4: week = '星期四'; break; case 5: week = '星期五'; break; case 6: week = '星期六'; break; case 0: week = '星期日'; break; } this.setState({ currentTime: "".concat(date, " ").concat(week, " ").concat(time) }); } }, { key: "render", value: function render() { var _this3 = this; var _this$state3 = this.state, toolStatus = _this$state3.toolStatus, currentTime = _this$state3.currentTime, isFullScreen = _this$state3.isFullScreen, canCamera = _this$state3.canCamera, canMic = _this$state3.canMic, boxToolStyle = _this$state3.boxToolStyle, recordStatus = _this$state3.recordStatus; // console.log('canCamera', canCamera) // console.log('canMic', canMic) // console.log('videoMember', this.props); var _this$props2 = this.props, common = _this$props2.common, videoType = _this$props2.videoType, addMember = _this$props2.addMember, dissolutionRoomModal = _this$props2.dissolutionRoomModal, videoSize = _this$props2.videoSize, videoGenre = _this$props2.videoGenre; var displayNode = videoSize != 2 ? 'none' : 'block'; var videoWidth = isFullScreen ? "100%" : "70%"; var videoHeight = isFullScreen ? "100%" : "85%"; var hasVideoScheduling = videoGenre == 0 ? true : false; if (!hasVideoScheduling) { videoWidth = '375px'; videoHeight = '667px'; } return /*#__PURE__*/_react.default.createElement(_MouseMovement.default, { isDown: this.state.videoLocal.isDown, offsetLeft: this.state.videoLocal.offsetLeft, offsetTop: this.state.videoLocal.offsetTop }, function (_ref) { var x = _ref.x, y = _ref.y, _ref$cursor = _ref.cursor, cursor = _ref$cursor === void 0 ? 'move' : _ref$cursor; return /*#__PURE__*/_react.default.createElement("div", { id: "video-boxs", className: "video-boxs", ref: "video-boxs", style: { // width: "70%", // position: 'absolute', top: y == 0 ? '50%' : y, left: x == 0 ? '47%' : x, width: videoWidth, height: videoHeight, display: displayNode // top: '50%', // left: '50%' }, onMouseDown: _this3.onMouseDown.bind(_this3), onMouseUp: _this3.onMouseUp.bind(_this3) }, hasVideoScheduling ? /*#__PURE__*/_react.default.createElement("div", { className: "box-header", style: { cursor: isFullScreen ? '' : 'move' } }, /*#__PURE__*/_react.default.createElement("div", null, currentTime), /*#__PURE__*/_react.default.createElement(_icon.default, { className: "icon", style: { margin: "0 16px" }, onClick: _this3.setScreen, type: isFullScreen ? "fullscreen-exit" : "fullscreen" }), /*#__PURE__*/_react.default.createElement(_icon.default, { className: "icon", type: "close", onClick: _this3.props.dissolutionRoomModal })) : null, /*#__PURE__*/_react.default.createElement("div", { id: "video-content", className: "video-content" }, /*#__PURE__*/_react.default.createElement("div", { id: "room-root", className: "col-div" }, /*#__PURE__*/_react.default.createElement("div", { className: "row-div", style: { height: "100%", width: "100%", display: " flex", alignItems: "center" } }, /*#__PURE__*/_react.default.createElement("div", { className: "col-div", style: { width: "340px", height: "100%", padding: "10px", display: "none" } }, /*#__PURE__*/_react.default.createElement("div", { className: "col-div card", style: { width: "100%", height: "100%" } }, /*#__PURE__*/_react.default.createElement("div", { id: "member-list", className: "col-div", style: { width: "100%", justifyContent: "flex-start", flex: 1 } }, /*#__PURE__*/_react.default.createElement("div", { id: "member-me", style: { width: "100%", paddingLeft: "20px" } }, /*#__PURE__*/_react.default.createElement("div", { className: "row-div member", style: { width: "100%", height: "50px", justifyContent: "space-between" } }, /*#__PURE__*/_react.default.createElement("div", { className: "member-id" }, "(\u6211)"), /*#__PURE__*/_react.default.createElement("div", { className: "row-div", style: { width: "100%", height: "27px", justifyContent: "center", display: "flex", alignItems: "center" } }, /*#__PURE__*/_react.default.createElement("img", { className: "member-video-btn", style: { height: "100%" }, src: __webpack_require__("8ZKn"), alt: "" }), /*#__PURE__*/_react.default.createElement("div", { style: { width: 18 } }), /*#__PURE__*/_react.default.createElement("img", { className: "member-audio-btn", style: { height: "100%" }, src: __webpack_require__("gOsS"), alt: "" }))))))), /*#__PURE__*/_react.default.createElement("div", { id: "remote-video-wrap", style: { height: "100%", flex: 1 } }, _this3.renderVideoList())))), /*#__PURE__*/_react.default.createElement(_BoxTool.default, { boxToolStyle: boxToolStyle, switchVideoTool: _this3.switchVideoTool.bind(_this3), canMic: canMic, canCamera: canCamera, addMember: addMember, common: common, dissolutionRoomModal: dissolutionRoomModal, toolStatus: toolStatus })); }); } }]); }(_react.Component)) || _class); /***/ }), /***/ "d8v4": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; __webpack_require__("/m1I"); var _tooltip = _interopRequireDefault(__webpack_require__("O6j2")); __webpack_require__("tIHZ"); var _popover = _interopRequireDefault(__webpack_require__("tjvM")); var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); var _dva = __webpack_require__("S6G3"); var _dec, _class; /** * 切换地图按钮 */ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } var SwitchStyle = exports.default = (_dec = (0, _dva.connect)(function (state) { return { mapStyle: state.command.mapStyle }; }), _dec(_class = /*#__PURE__*/function (_Component) { function SwitchStyle(props) { var _this; (0, _classCallCheck2.default)(this, SwitchStyle); _this = _callSuper(this, SwitchStyle, [props]); _this.hide = function () { _this.setState({ visible: false }); }; _this.handleVisibleChange = function (visible) { _this.setState({ visible: visible }); }; _this.state = { visible: false, satellite: true }; return _this; } (0, _inherits2.default)(SwitchStyle, _Component); return (0, _createClass2.default)(SwitchStyle, [{ key: "componentDidMount", value: function componentDidMount() { // if(this.props.layerSatatus !=="aPicture"){ // this.props.setSatellite(false) // } } }, { key: "switch", value: function _switch(param) { var onSwitch = this.props.onSwitch; this.hide(); onSwitch && onSwitch(param); this.props.dispatch({ type: 'command/setMapStyle', payload: param }); if (param == 'satellite') { this.setState({ satellite: true }); } else { this.setState({ satellite: false }); } } }, { key: "render", value: function render() { var _this$props = this.props, mapStyle = _this$props.mapStyle, layerStatus = _this$props.layerStatus; var satellite = this.state.satellite; var content = /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("div", { className: mapStyle == 'normal' && !satellite ? 'map-switch selectedMap' : 'map-switch', onClick: this.switch.bind(this, 'normal') }, "\u6D45\u8272\u5730\u56FE"), layerStatus == "aPicture" && /*#__PURE__*/_react.default.createElement("div", { className: satellite ? 'map-switch selectedMap' : 'map-switch', onClick: this.switch.bind(this, 'satellite') }, "\u536B\u661F\u5730\u56FE")); return /*#__PURE__*/_react.default.createElement("div", { className: "switch map" }, /*#__PURE__*/_react.default.createElement(_tooltip.default, { title: "\u5730\u56FE\u5207\u6362" }, /*#__PURE__*/_react.default.createElement("div", { className: "layer-btn" }, /*#__PURE__*/_react.default.createElement(_popover.default, { placement: "bottom", content: content, title: "", trigger: "click", visible: this.state.visible, onVisibleChange: this.handleVisibleChange }, /*#__PURE__*/_react.default.createElement("img", { className: "layer-img", src: this.state.visible ? __webpack_require__("5bNU") : mapStyle == 'dark' ? __webpack_require__("DXrd") : __webpack_require__("2OTC") }))))); } }]); }(_react.Component)) || _class); /***/ }), /***/ "dCEd": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ant_design_create_react_context__ = __webpack_require__("83O8"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ant_design_create_react_context___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__ant_design_create_react_context__); var RowContext = __WEBPACK_IMPORTED_MODULE_0__ant_design_create_react_context___default()({}); /* harmony default export */ __webpack_exports__["a"] = (RowContext); /***/ }), /***/ "dDE8": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAATCAYAAACdkl3yAAAAAXNSR0IArs4c6QAAActJREFUOE+tk01IFGEYx3//zWALIi9REBqmpxAjiOrSMb10kA5GJkK3riLsjC2BHmxnF5SOHToIQtpNvRXevPRxqbyqURLlnvoAEbadJ2YcdHc+zINzed+Z53l/7/M8//+II3p0RBzSQVPWRo2HQD+iAwvzNoAFjvOMUW3GC0iCynYNYxk4FSW/idYb0foHn1s80ttGWBJUsXv4vIiS/gJetHeBlnCfY5CC5g4GBVHPJhFngXgLbRhbuCr+v7Ugo2K9+LxKFSJHHwW9PhyoZBcR66mgGl08ViKWIb+JEp8RF5pg4gsOHSA7XEW77d3FmIukB2EYg7iaT6v0YEN6NoB4Eh70KTKml1kGToI8O02dk+RpCY03bnkuUWNAdTxrp06NY2zj6le6/J5dBlb2jCg+4OgKnj1HbOJogpJ9RPREgN/UuUlRn4L3/YoqNoLPdMMt33E4Tzl0eZUd7pPnG3BuL0eM4OhpM8izWWAoNoPbwB0gUGkRWGqKG7OMaTgOeg9cjYHWEDuhXnAC6IrF3+HqehxUBc5kqZLxvYqr4FdqmFHZHmB0A51AezgL0QrkI0hQ2U/gB/AVWCfHKgXNNIOySjHT7nVJNzce+QcPtoIU8lV8jwAAAABJRU5ErkJggg==" /***/ }), /***/ "dJ6t": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /** * 所有地图图层 */ // import { Icon, Input, Button,message } from "antd"; // import styles from './index.less'; var EarthMap = exports.default = /*#__PURE__*/function (_Component) { function EarthMap(props) { var _this; (0, _classCallCheck2.default)(this, EarthMap); _this = _callSuper(this, EarthMap, [props]); _this.state = { // loadTransition: false, //地球切换成地图时的过渡 // keyWord: "" }; return _this; } (0, _inherits2.default)(EarthMap, _Component); return (0, _createClass2.default)(EarthMap, [{ key: "componentDidMount", value: function componentDidMount() { // setTimeout(() => { // }, 5000) } // 利用此事件来决定何时需要重新渲染组件。 }, { key: "shouldComponentUpdate", value: function shouldComponentUpdate(nextProps, nextState) { if (nextProps.showEarchMap !== this.props.showEarchMap) { return true; } return false; } // TAG: 根据需求 394,取消搜索功能 // getCenterMark(e){ // console.log(this.state.keyWord) // this.props.clearRotation() // var placeSearch = new AMap.PlaceSearch({city: '全国'}); // placeSearch.search(this.state.keyWord, (status, result)=> { // // 搜索成功时,result即是对应的匹配数据 // console.log(result) // if(status === "complete" && result.poiList.count>0){ // let centerPoint = result.poiList.pois[0].location; // this.props.earthMap.centerAndZoom(new BMapGL.Point(centerPoint.lng, centerPoint.lat), 10); // console.log('EarthMap'); // // this.props.markEarthSearch({lng:centerPoint.lng, lat:centerPoint.lat}); // }else{ // message.info("未搜索到该地点") // } // }) // } }, { key: "render", value: function render() { var showEarchMap = this.props.showEarchMap; return /*#__PURE__*/_react.default.createElement("div", { style: { display: showEarchMap ? "block" : "none" } }); } }]); }(_react.Component); /***/ }), /***/ "dQg3": /***/ (function(module, exports) { module.exports = "data:image/png;base64,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" /***/ }), /***/ "dToI": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAAAXNSR0IArs4c6QAAAYdJREFUWEftmL9KA0EQxn8f9v4BC3vzBkYLSxvfILEUwTyAIIgPIELAB4gglvoIFqa0UPMGprcQjPYyMsdG45nLJYEcJ+40x+3Mzn773Xc7cyeCmdkO0ADWgPn+eOr6AjwCTUntjJhk2My2gEOgCixnxL4DHaAl6cpjFCa3gP1RC6R8BhxLOh02x8yOgJN+/jHznktqyMxqwPWYkwbDPoBNSfeDg2a2AdwBc1PkrDugW8DpdbsADiS9Zex8BbgEtoM/2VUK0CDbN8CupOeMfAvAGbAX/G0H9AoshoElSb0cbbgmHkJMR5Lff5mZucZch25VSa6RTDMzX9sxuPUckOshMUmJpnISrAJPIaYrqZIC5D6PcatI6o6R8xtDBDSErh+kRIb+IkOzfO3XJfkxMNFrX7qDsUylo1a+4tp/uKVqP/KO9iL9ubWrSDBJPS16wbz1yguoVKI2s9hTZ2jp//XUUxXX2FOn9RNb2LzTOTI0KUOz7Kmn+pSOPfWIR1iPPXWKnV+/9D4BHRcL9lF0IfsAAAAASUVORK5CYII=" /***/ }), /***/ "eCjd": /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 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 _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; exports.convertFieldsError = convertFieldsError; exports.format = format; exports.isEmptyValue = isEmptyValue; exports.isEmptyObject = isEmptyObject; exports.asyncMap = asyncMap; exports.complementError = complementError; exports.deepMerge = deepMerge; /* eslint no-console:0 */ var formatRegExp = /%[sdj%]/g; var warning = exports.warning = function warning() {}; // don't print warning message when in production env or node runtime if (false) { exports.warning = warning = function warning(type, errors) { if (typeof console !== 'undefined' && console.warn) { if (errors.every(function (e) { return typeof e === 'string'; })) { console.warn(type, errors); } } }; } function convertFieldsError(errors) { if (!errors || !errors.length) return null; var fields = {}; errors.forEach(function (error) { var field = error.field; fields[field] = fields[field] || []; fields[field].push(error); }); return fields; } function format() { for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } var i = 1; var f = args[0]; var len = args.length; if (typeof f === 'function') { return f.apply(null, args.slice(1)); } if (typeof f === 'string') { var str = String(f).replace(formatRegExp, function (x) { if (x === '%%') { return '%'; } if (i >= len) { return x; } switch (x) { case '%s': return String(args[i++]); case '%d': return Number(args[i++]); case '%j': try { return JSON.stringify(args[i++]); } catch (_) { return '[Circular]'; } break; default: return x; } }); for (var arg = args[i]; i < len; arg = args[++i]) { str += ' ' + arg; } return str; } return f; } function isNativeStringType(type) { return type === 'string' || type === 'url' || type === 'hex' || type === 'email' || type === 'pattern'; } function isEmptyValue(value, type) { if (value === undefined || value === null) { return true; } if (type === 'array' && Array.isArray(value) && !value.length) { return true; } if (isNativeStringType(type) && typeof value === 'string' && !value) { return true; } return false; } function isEmptyObject(obj) { return Object.keys(obj).length === 0; } function asyncParallelArray(arr, func, callback) { var results = []; var total = 0; var arrLength = arr.length; function count(errors) { results.push.apply(results, errors); total++; if (total === arrLength) { callback(results); } } arr.forEach(function (a) { func(a, count); }); } function asyncSerialArray(arr, func, callback) { var index = 0; var arrLength = arr.length; function next(errors) { if (errors && errors.length) { callback(errors); return; } var original = index; index = index + 1; if (original < arrLength) { func(arr[original], next); } else { callback([]); } } next([]); } function flattenObjArr(objArr) { var ret = []; Object.keys(objArr).forEach(function (k) { ret.push.apply(ret, objArr[k]); }); return ret; } function asyncMap(objArr, option, func, callback) { if (option.first) { var flattenArr = flattenObjArr(objArr); return asyncSerialArray(flattenArr, func, callback); } var firstFields = option.firstFields || []; if (firstFields === true) { firstFields = Object.keys(objArr); } var objArrKeys = Object.keys(objArr); var objArrLength = objArrKeys.length; var total = 0; var results = []; var pending = new Promise(function (resolve, reject) { var next = function next(errors) { results.push.apply(results, errors); total++; if (total === objArrLength) { callback(results); return results.length ? reject({ errors: results, fields: convertFieldsError(results) }) : resolve(); } }; objArrKeys.forEach(function (key) { var arr = objArr[key]; if (firstFields.indexOf(key) !== -1) { asyncSerialArray(arr, func, next); } else { asyncParallelArray(arr, func, next); } }); }); pending['catch'](function (e) { return e; }); return pending; } function complementError(rule) { return function (oe) { if (oe && oe.message) { oe.field = oe.field || rule.fullField; return oe; } return { message: typeof oe === 'function' ? oe() : oe, field: oe.field || rule.fullField }; }; } function deepMerge(target, source) { if (source) { for (var s in source) { if (source.hasOwnProperty(s)) { var value = source[s]; if ((typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && _typeof(target[s]) === 'object') { target[s] = _extends({}, target[s], value); } else { target[s] = value; } } } } return target; } /***/ }), /***/ "eXDv": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.getRecordLastJSON = getRecordLastJSON; exports.recordAdd = recordAdd; exports.recordBack = recordBack; exports.recordClean = recordClean; exports.recordHistory = void 0; exports.recordRemove = recordRemove; exports.recordTo = recordTo; var _utils = __webpack_require__("oAV5"); var _events = _interopRequireDefault(__webpack_require__("TLe5")); var _biz = __webpack_require__("Q3h8"); /** * recordList 记录用户的操作 **/ // 引入 EventEmitter var recordHistory = exports.recordHistory = []; // 添加用户操作行为 function recordAdd(data) { if ((0, _utils.isEmpty)(data)) { return; } recordHistory.push(data); console.log('recordHistory-recordAdd', JSON.parse(JSON.stringify(recordHistory))); } // 清空用户操作行为 function recordClean() { recordHistory.splice(0, recordHistory.length); console.log('recordHistory-recordClean', recordHistory); } // 删除用户操作行为 function recordRemove(_ref) { var from = _ref.from, toID = _ref.toID; var current; recordHistory.map(function (item, index) { if (item.from == from && item.toID == toID) { current = index; } }); recordHistory.splice(current, recordHistory.length); console.log('recordHistory-recordRemove', recordHistory); } // 获取用户上一次操作行为 function recordBack(_ref2) { var from = _ref2.from, _ref2$callback = _ref2.callback, _callback = _ref2$callback === void 0 ? null : _ref2$callback, _ref2$navTo = _ref2.navTo, navTo = _ref2$navTo === void 0 ? 1 : _ref2$navTo; var current; recordHistory.map(function (item, index) { // console.log(item.to, from); if (item.to == from) { console.log('recordBack', item.to, from); current = index; } }); current = current - navTo + 1; var currentJSON = recordHistory[current] ? JSON.parse(JSON.stringify(recordHistory[current])) : {}; console.log('recordHistory-recordBack', currentJSON); if (currentJSON.from == from) { return recordBack({ from: from, navTo: navTo + 1, callback: function callback(json) { _callback && _callback(json); } }); } _callback && _callback(currentJSON); } // 返回跳转事件 function recordTo(data) { var that = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; console.log('recordTo', data.from, data); var fromData = data.fromData, toID = data.toID; switch (data.from) { case "APictureData": { // 返回到保安员标记 _events.default.emit('showAPictureData', { type: toID, typeList: fromData }); break; } case "ComprehensiveSearch": { // 返回到搜索结果 _events.default.emit('isOpenTopSwitch', { type: 'searchViews', value: true }); setTimeout(function () { _events.default.emit('showComprehensiveSearch', { data: fromData, type: toID }); }, 1000); break; } case "CreateAttendPointInfoWindow": case "AttendInfo": { // 返回到驻勤点人员列表 var selectAttendId = !(0, _utils.isEmpty)(fromData.selectAttendId) ? fromData.selectAttendId : fromData.ATTENDANCESITEID; var companyName = !(0, _utils.isEmpty)(fromData.componey) ? fromData.componey : fromData.companyName; (0, _biz.showAttendPointInfo)({ aid: selectAttendId, companyName: companyName, doMainId: fromData.domainid, success: function success(result) { that.props.dispatch({ type: 'command/setSelectAttendInfo', payload: result }); } }); break; } case "ComponeyInfo": { // 返回到公司架构 _events.default.emit('clearMapModal', 'AttendInfo'); _events.default.emit('clearMapTag', 'attendancePoint'); that.props.dispatch({ type: 'command/setSelectComponeyInfo', payload: fromData }); break; } case "APictureData": { _events.default.emit('showAPictureData', { type: toID, typeList: fromData }); break; } } } // 获取 function getRecordLastJSON() { var lastJSON = recordHistory.length > 0 ? recordHistory[recordHistory.length - 1] : {}; return lastJSON; } /***/ }), /***/ "edjc": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(Buffer) {/* harmony export (immutable) */ __webpack_exports__["p"] = normalizeColor; /* harmony export (immutable) */ __webpack_exports__["j"] = isAroundZero; /* unused harmony export round3 */ /* harmony export (immutable) */ __webpack_exports__["q"] = round4; /* unused harmony export round1 */ /* harmony export (immutable) */ __webpack_exports__["e"] = getMatrixStr; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return TEXT_ALIGN_TO_ANCHOR; }); /* harmony export (immutable) */ __webpack_exports__["b"] = adjustTextY; /* harmony export (immutable) */ __webpack_exports__["i"] = hasShadow; /* harmony export (immutable) */ __webpack_exports__["h"] = getShadowKey; /* unused harmony export getClipPathsKey */ /* harmony export (immutable) */ __webpack_exports__["l"] = isImagePattern; /* unused harmony export isSVGPattern */ /* harmony export (immutable) */ __webpack_exports__["n"] = isPattern; /* harmony export (immutable) */ __webpack_exports__["m"] = isLinearGradient; /* harmony export (immutable) */ __webpack_exports__["o"] = isRadialGradient; /* harmony export (immutable) */ __webpack_exports__["k"] = isGradient; /* harmony export (immutable) */ __webpack_exports__["d"] = getIdURL; /* harmony export (immutable) */ __webpack_exports__["f"] = getPathPrecision; /* harmony export (immutable) */ __webpack_exports__["g"] = getSRTTransformString; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return encodeBase64; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__core_util_js__ = __webpack_require__("/gxq"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__tool_color_js__ = __webpack_require__("DRaW"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__core_env_js__ = __webpack_require__("YNzw"); var mathRound = Math.round; function normalizeColor(color) { var opacity; if (!color || color === 'transparent') { color = 'none'; } else if (typeof color === 'string' && color.indexOf('rgba') > -1) { var arr = Object(__WEBPACK_IMPORTED_MODULE_1__tool_color_js__["parse"])(color); if (arr) { color = 'rgb(' + arr[0] + ',' + arr[1] + ',' + arr[2] + ')'; opacity = arr[3]; } } return { color: color, opacity: opacity == null ? 1 : opacity }; } var EPSILON = 1e-4; function isAroundZero(transform) { return transform < EPSILON && transform > -EPSILON; } function round3(transform) { return mathRound(transform * 1e3) / 1e3; } function round4(transform) { return mathRound(transform * 1e4) / 1e4; } function round1(transform) { return mathRound(transform * 10) / 10; } function getMatrixStr(m) { return 'matrix(' + round3(m[0]) + ',' + round3(m[1]) + ',' + round3(m[2]) + ',' + round3(m[3]) + ',' + round4(m[4]) + ',' + round4(m[5]) + ')'; } var TEXT_ALIGN_TO_ANCHOR = { left: 'start', right: 'end', center: 'middle', middle: 'middle' }; function adjustTextY(y, lineHeight, textBaseline) { if (textBaseline === 'top') { y += lineHeight / 2; } else if (textBaseline === 'bottom') { y -= lineHeight / 2; } return y; } function hasShadow(style) { return style && (style.shadowBlur || style.shadowOffsetX || style.shadowOffsetY); } function getShadowKey(displayable) { var style = displayable.style; var globalScale = displayable.getGlobalScale(); return [ style.shadowColor, (style.shadowBlur || 0).toFixed(2), (style.shadowOffsetX || 0).toFixed(2), (style.shadowOffsetY || 0).toFixed(2), globalScale[0], globalScale[1] ].join(','); } function getClipPathsKey(clipPaths) { var key = []; if (clipPaths) { for (var i = 0; i < clipPaths.length; i++) { var clipPath = clipPaths[i]; key.push(clipPath.id); } } return key.join(','); } function isImagePattern(val) { return val && (!!val.image); } function isSVGPattern(val) { return val && (!!val.svgElement); } function isPattern(val) { return isImagePattern(val) || isSVGPattern(val); } function isLinearGradient(val) { return val.type === 'linear'; } function isRadialGradient(val) { return val.type === 'radial'; } function isGradient(val) { return val && (val.type === 'linear' || val.type === 'radial'); } function getIdURL(id) { return "url(#" + id + ")"; } function getPathPrecision(el) { var scale = el.getGlobalScale(); var size = Math.max(scale[0], scale[1]); return Math.max(Math.ceil(Math.log(size) / Math.log(10)), 1); } function getSRTTransformString(transform) { var x = transform.x || 0; var y = transform.y || 0; var rotation = (transform.rotation || 0) * __WEBPACK_IMPORTED_MODULE_0__core_util_js__["RADIAN_TO_DEGREE"]; var scaleX = Object(__WEBPACK_IMPORTED_MODULE_0__core_util_js__["retrieve2"])(transform.scaleX, 1); var scaleY = Object(__WEBPACK_IMPORTED_MODULE_0__core_util_js__["retrieve2"])(transform.scaleY, 1); var skewX = transform.skewX || 0; var skewY = transform.skewY || 0; var res = []; if (x || y) { res.push("translate(" + x + "px," + y + "px)"); } if (rotation) { res.push("rotate(" + rotation + ")"); } if (scaleX !== 1 || scaleY !== 1) { res.push("scale(" + scaleX + "," + scaleY + ")"); } if (skewX || skewY) { res.push("skew(" + mathRound(skewX * __WEBPACK_IMPORTED_MODULE_0__core_util_js__["RADIAN_TO_DEGREE"]) + "deg, " + mathRound(skewY * __WEBPACK_IMPORTED_MODULE_0__core_util_js__["RADIAN_TO_DEGREE"]) + "deg)"); } return res.join(' '); } var encodeBase64 = (function () { if (__WEBPACK_IMPORTED_MODULE_2__core_env_js__["a" /* default */].hasGlobalWindow && Object(__WEBPACK_IMPORTED_MODULE_0__core_util_js__["isFunction"])(window.btoa)) { return function (str) { return window.btoa(unescape(encodeURIComponent(str))); }; } if (typeof Buffer !== 'undefined') { return function (str) { return Buffer.from(str).toString('base64'); }; } return function (str) { if (false) { logError('Base64 isn\'t natively supported in the current environment.'); } return null; }; })(); /* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__("EuP9").Buffer)) /***/ }), /***/ "emEp": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); __webpack_require__("pDQo"); var _dva = __webpack_require__("S6G3"); var _classnames = _interopRequireDefault(__webpack_require__("HW6M")); var _Vectorgraph = _interopRequireDefault(__webpack_require__("pwBK")); var _SwitchArea = _interopRequireDefault(__webpack_require__("wCGV")); var _LayerExtensionBtn = _interopRequireDefault(__webpack_require__("a0e6")); var _SwitchMap = _interopRequireDefault(__webpack_require__("iWlI")); var _SwitchChat = _interopRequireDefault(__webpack_require__("LX8r")); var _Switch3D = _interopRequireDefault(__webpack_require__("t9eP")); var _utils = __webpack_require__("oAV5"); var _SwitchStyle = _interopRequireDefault(__webpack_require__("d8v4")); var _events = _interopRequireDefault(__webpack_require__("TLe5")); var _dec, _class; // import Person from "./PersonMessage"; // import Attendance from "./Attendance"; // import Event from "./EventList"; // import PersonSearchList from "./Attendance/PersonSearchList"; // import Record from "../Record/index"; // import SwitchSearch from '@mapModule/SwitchSearch'; function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } // 引入 EventEmitter' /** * 最顶部的图标切换 */ var TopButton = exports.default = (_dec = (0, _dva.connect)(function (state) { return { mapStyle: state.command.mapStyle, switchOpenStatus: state.command.switchOpenStatus, mapLayerSwitchState: state.command.mapLayerSwitchState }; }), _dec(_class = /*#__PURE__*/function (_PureComponent) { function TopButton(props) { var _this; (0, _classCallCheck2.default)(this, TopButton); _this = _callSuper(this, TopButton, [props]); // 切换图形 _this._onChangeSelect = function (paintValue) { var _this$props = _this.props, gisMAP = _this$props.gisMAP, _thisGIS = _this$props._thisGIS; _this.setState({ paintValue: paintValue }); gisMAP.clearInfoWindow(); switch (paintValue) { case "circle": _thisGIS.mouseTool.circle({ fillColor: "#00b0ff", strokeColor: "#80d8ff" }); break; case "rectangle": _thisGIS.mouseTool.rectangle({ fillColor: "#00b0ff", strokeColor: "#80d8ff" }); break; case "polygon": _thisGIS.mouseTool.polygon({ fillColor: "#00b0ff", strokeColor: "#80d8ff" }); break; case "cancel": _thisGIS.mouseTool.close(true); break; } }; // 切换风格 _this._onSwitchStyle = function (value) { var gisMAP = _this.props.gisMAP; var styleName = "amap://styles/" + value; gisMAP.setMapStyle(styleName); }; _this._onSwitch = function (param) { var _this$props2 = _this.props, localMap = _this$props2.localMap, satelliteLayer = _this$props2.satelliteLayer; if (param == 'satellite') { _this.props.setSatellite(true); // param = 'dark'; param = 'normal'; } else { _this.props.setSatellite(false); localMap.remove(satelliteLayer); _this._onSwitchStyle(param); } }; // 切换图层 _this._onSwitchMap = function (param) { var _this$props3 = _this.props, gisMAP = _this$props3.gisMAP, layerStatus = _this$props3.layerStatus, _thisGIS = _this$props3._thisGIS; _this.props.dispatch({ type: 'command/setMapStyle', payload: "normal" }); var style = ""; if (param == "aPicture") { style = "dark"; } else { style = "normal"; } var styleName = "amap://styles/" + "normal"; // 删除轨迹查看的弹窗组件 var divs = document.getElementsByClassName('n_trajectory'); if (divs) { Reflect.apply(Array.prototype.forEach, divs, [function (item) { ReactDom.unmountComponentAtNode(item); document.body.removeChild(item); }]); } gisMAP.setMapStyle(styleName); // this.props.switchMap(param) _thisGIS.mouseTool.close(true); gisMAP.clearInfoWindow(); var setJSON = { paintValue: "cancel" }; // _thisGIS.setState({ // paintValue: "cancel", // }); if (param !== layerStatus) { //有切换的时候才进行数据的处理 //如果是切换地图的 setJSON.searchList = []; // _thisGIS.setState({ searchList: [] }); //为真的时候是海量图,为假是普通图 switch (param) { case "attendance": //换成驻勤点图 setJSON.layerSatatus = param; setJSON.map = _thisGIS.state.normalMap; // _thisGIS.setState({ // layerSatatus: param, // map: _thisGIS.state.normalMap, // }); //创建矢量图画图工具 _thisGIS.createMouseTool(_thisGIS.state.normalMap); break; case "person": setJSON.layerSatatus = param; setJSON.map = _thisGIS.state.personMap; // _thisGIS.setState({ // layerSatatus: param, // map: _thisGIS.state.personMap, // }); //创建矢量图画图工具 _thisGIS.createMouseTool(_thisGIS.state.personMap); break; case "aPicture": //换成一张图图层 setJSON.layerSatatus = param; setJSON.map = _thisGIS.state.locaMap; // _thisGIS.setState({ // layerSatatus: param, // map: _thisGIS.state.locaMap, // }); //创建矢量图画图工具 _thisGIS.createMouseTool(_thisGIS.state.locaMap); break; case "police": //换成警保联动图层 setJSON.layerSatatus = param; setJSON.map = _thisGIS.state.policeMap; // _thisGIS.setState({ // layerSatatus: param, // map: _thisGIS.state.policeMap, // }); // //创建矢量图画图工具 // this.createMouseTool(this.state.policeMap); break; case "nanNing": //换成警保联动图层 setJSON.layerSatatus = param; setJSON.map = _thisGIS.state.nanNingMap; // _thisGIS.setState({ // layerSatatus: param, // map: _thisGIS.state.nanNingMap, // }); // //创建矢量图画图工具 // _thisGIS.createMouseTool(_thisGIS.state.policeMap); break; } } _thisGIS.setState(setJSON); if (param === "aPicture") { _thisGIS.setSatellite(true); } else { _thisGIS.setSatellite(false); } }; // 切换 IM _this._onSwitchChat = function () { // this.setState({ imStatus: !this.state.imStatus }); _events.default.emit('changeImStatus', 'change'); var gisMAP = _this.props.gisMAP; gisMAP.clearInfoWindow(); }; _this.state = { paintValue: "cancel", //选中的是用哪个图形画图 areaSelect: false }; return _this; } (0, _inherits2.default)(TopButton, _PureComponent); return (0, _createClass2.default)(TopButton, [{ key: "render", value: function render() { var _this$props4 = this.props, mapStyle = _this$props4.mapStyle, layerStatus = _this$props4.layerStatus, localMap = _this$props4.localMap, _thisGIS = _this$props4._thisGIS, conversationID = _this$props4.conversationID; var paintValue = this.state.paintValue; var clsNameRadio = (0, _classnames.default)("radio_container", mapStyle); var hasaPicture = layerStatus == 'aPicture' ? true : false; var hasPolice = layerStatus == 'police' ? true : false; var hasNanNing = layerStatus == 'nanNing' ? true : false; return /*#__PURE__*/_react.default.createElement("div", { className: clsNameRadio, style: { display: 'flex' } }, hasaPicture && /*#__PURE__*/_react.default.createElement(_LayerExtensionBtn.default, null), hasaPicture && /*#__PURE__*/_react.default.createElement("div", { className: "border-line" }), !hasNanNing && /*#__PURE__*/_react.default.createElement(_Vectorgraph.default, { _thisGIS: _thisGIS, changeSelect: this._onChangeSelect.bind(this), paintValue: paintValue }), hasaPicture && /*#__PURE__*/_react.default.createElement("div", { className: "border-line" }), hasaPicture && /*#__PURE__*/_react.default.createElement(_SwitchArea.default, { _thisGIS: _thisGIS }), (hasaPicture || hasPolice || hasNanNing) && /*#__PURE__*/_react.default.createElement(_SwitchStyle.default // switchStyle={this._onSwitchStyle} , { onSwitch: this._onSwitch.bind(this) // locaMap={localMap} , satellite: this.state.satellite // setSatellite={this.setSatellite.bind(this)} // satelliteLayer={this.state.satelliteLayer} , layerStatus: layerStatus, that: this }), hasaPicture && /*#__PURE__*/_react.default.createElement("div", null), (0, _utils.gup)('app_type', window.location.href) == 1 ? '' : /*#__PURE__*/_react.default.createElement(_SwitchMap.default, { _thisGIS: _thisGIS, layerStatus: layerStatus, onSwitchMap: this._onSwitchMap.bind(this) }), (0, _utils.gup)('app_type', window.location.href) == 1 ? '' : /*#__PURE__*/_react.default.createElement(_SwitchChat.default, { onClick: this._onSwitchChat.bind(this) // imStatus={this.state.imStatus} , conversationID: conversationID }), hasaPicture && /*#__PURE__*/_react.default.createElement(_Switch3D.default, { localMap: localMap })); } }]); }(_react.PureComponent)) || _class); /***/ }), /***/ "fFIg": /***/ (function(module, exports) { // removed by extract-text-webpack-plugin /***/ }), /***/ "fMqj": /***/ (function(module, exports, __webpack_require__) { var memoize = __webpack_require__("zGZ6"); /** Used as the maximum memoize cache size. */ var MAX_MEMOIZE_SIZE = 500; /** * A specialized version of `_.memoize` which clears the memoized function's * cache when it exceeds `MAX_MEMOIZE_SIZE`. * * @private * @param {Function} func The function to have its output memoized. * @returns {Function} Returns the new memoized function. */ function memoizeCapped(func) { var result = memoize(func, function(key) { if (cache.size === MAX_MEMOIZE_SIZE) { cache.clear(); } return key; }); var cache = result.cache; return result; } module.exports = memoizeCapped; /***/ }), /***/ "fQY3": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAiCAYAAAC0nUK+AAAAAXNSR0IArs4c6QAABMNJREFUSA2VVWtMXFUQnjl3d9tiKXQXVkJiY+IPgdZNE6qkIFBqmkYj+Kcp0WoT04TUSFr1h9KYJhglqdHEWptUi2KMYmLxkUCTpmKApa3E4KJBWPrDR7SmKV1YXmG7r3uPZ+5yt+c+FnASOHNmvvlm9pw5cxFWkbnyujqNQ6MGvAEQSxG4jwNGkcO/CBBkCL2F4eAVRGFxEIGxS2R7fQNq/BTn/BG712xBwFGu4GvFk8FBswfARM7b29nshYEOrvE2ArISP2xo3Aee+t2g3FcKWFgAfH4B1Bs3IRkcgURfP2i3buucDNk73uaGNmxv16xJQFSJM2W1PZGyWh55aC9f/riba4mEMOcW8hOO8BQ3U173DRVoI49U1L6hA6obefKXCRtjYvAajz52kKfGwzYf4WdE3EqCt0zkszvqqkXVGlXgRBy/2M9nq57gy++d19fkSMgxAcUTT7SivpYS6D+Bp3mHuG7MO34E3Du3mxLHL/TCcscZyHu5BVIjIdh0+CAsHT8JyR+umHAUR/HEo3KuV4+RHXt2QVodpcvbevlLQI/HFLR45BVwP7wTYp3d4AtdhtnK/bCxuUlPVPhdlwnLk0mY2/+MfsmoQBUDTW0kBHWFTKz+9Q8kLvaDK1ABsQ+6gMfu6ES0xj/rAc+eat1POEMonnhIuMaeRHEJV4VeU/DFWXBXBnQH/YvWNIEWnYeiqWEQXZC1G4phZ95C8F7rNcyQCo3DwrOtosfxRyZe1zbyUB/LQsRWyWt9HuhPFitO4tnGOAc/gemBOIlT1YTLZTd4xMUWu8RYWBYJNtDLQ3+RjX/LmTd12+KxkxA7+6muyzZrAPGQEK9LLNPi+L30pJkDuWdffTZ+y7lTuk6XmUuIJyN4k4nGHKMNzYq1hEhXI7bwjLk4g0ugwSEaQnRZcjsSWD5bWXcqhPqceEiQsT7G8u/pQ4Q5mm53Pv86G+N5tCqrr6bIOIpfmZIRr+K5pMeJil6noZNrttgGiYOBZpIxHWfLa18iYn22+NwbT4t+n4JUChZfPAGpXydXK9bmIzzFUbxokzHv/ZvPESj7sYgEGh7EZHpU9Gc+uN36ENr03AHbHcjMdMZ0FLH3P8kQA9xmLtzlmxi+YSKnjRiVj2sa7+PAFdr/ny+RKDOG6NpbFB78iWJJspVntgCRsvoWAO0jY7+eVRxpWsyRJm84mLnElSDbJ6n4evA8A3x3PaQGRpC3WInJZyMno7eEnRABa78qAiN0+sLBzFygvSSO5Dg0lFbA9bRIYB+NUrBQx4vuVY6ZTXd3juTk3jo18DdHaL0LtWqYQLfSLAqJWz3GPic5AYrDw92i+sx7NiJWVoa8o+i3oesWs2m7KjkhXYrrBXGwpupEwikvK3nbxOSwWZO8cGLgDwHKzNoVAvEIjuJkT9KBz2Sy9bnsrayszEulUt7yFPhP84LvxfD3LaI2/JSycJQxtuR2u6OhUCgmx8i6/hJlg6EHAgF/PB5/QFXVzdOgYg33JP2o7P4KY20/a4klsovExaWlper09PSyESevOY9F07QSGfiqtvjtn1zt6uSx32W7FSf7cpKLn31LBs4rWvowRj+UbaRbcbJ/XWcuqssXI9wjVkWQqaJbkus58/8Ac561YGnKY6kAAAAASUVORK5CYII=" /***/ }), /***/ "faxx": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__style_index_less__ = __webpack_require__("vtiu"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__style_index_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__style_index_less__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__grid_style__ = __webpack_require__("Irxy"); // style dependencies // deps-lint-skip: grid /***/ }), /***/ "foLZ": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAARCAYAAADUryzEAAABFElEQVQ4T6WTzypFURjFf4tI1xvITMpLeADdzBkqM/EAzMTM6L6A6R2ZKC9AeQSRERlJGeDmT5a+0751HPuwseu0B2d/v2/t9a0t/rn023rbS1EjqV/tQ4DtMWADGAX6kq5ycNsvCTDeBPSA9VT0CuwDm5Lu6iDbToCqeV3BNTDd6HobqoZy418WYHsCeKoDG6BQsyZp0AaYAm5+MPQUWADuv1zB9gxwWTCRQ2AxB5gDzgoAcc1ODjALXBQAwouVHKDEgwNgGXjOASIUA2Ako+IN2AZ2Jb1/l4MwMcysr3NgVdJJLbGtQdoBttLBGNVefJIqySWASGU3uXwk6aHlLTwmDyY/RblgAtUR2/MJcPwnQLPRBwt7dBITWNF8AAAAAElFTkSuQmCC" /***/ }), /***/ "g5CG": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAThJREFUOE+tkr1KA0EURs8dRUTCxDSCiFhpL1qJWlqI72FnNiaCpbVgsikUfAZLwcYyopX4ANoYJNjF3ZDCkN0riRiyyUZXdLq5890z9+cT/nhkOF/F5siMBaTa40wiGCO8a4Dnl6iDaH9OD5DO6woBRYVVYGpEYU2B+xAOG67cdTQ9gHW0Cswn7OjJd2VxEFADZpMAFGoNV+YigHRWj1U4SAIQ4cQrSSECSBV0xrR5BOwPkEbQYql5Jq8RQOdis7qHUP4WIDh+SXqa6BqP1FiPCspaLES49V/Y5EKCr/chH0zndSEMeAAyEYhSN22W307lOdYH/cF0TrdC5VJgohNXaBllxyvL9WBlMU78lNh93daQ8+6gDLt+Ua7i2uoCrKMVYD3JCvs0N74rG/8D+OXPEfnIGSSFfgDn7mIRm89EHQAAAABJRU5ErkJggg==" /***/ }), /***/ "gBtb": /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _rule = __webpack_require__("hGxU"); var _rule2 = _interopRequireDefault(_rule); var _util = __webpack_require__("eCjd"); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } /** * Validates a function. * * @param rule The validation rule. * @param value The value of the field on the source object. * @param callback The callback function. * @param source The source object being validated. * @param options The validation options. * @param options.messages The validation messages. */ function method(rule, value, callback, source, options) { var errors = []; var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate) { if ((0, _util.isEmptyValue)(value) && !rule.required) { return callback(); } _rule2['default'].required(rule, value, source, errors, options); if (value !== undefined) { _rule2['default'].type(rule, value, source, errors, options); } } callback(errors); } exports['default'] = method; /***/ }), /***/ "gOsS": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAbCAYAAAB4Kn/lAAAAAXNSR0IArs4c6QAAArNJREFUSA3FVTtoVEEUPbMJGEGJKXULEbUR7IRURlErBbVLL9jqBvwGhEUhfiIksRXs7dwFuyjqVsIWipgmgqRILFcx6KZwx3PuvLc7b/c9g2kyMG/mzT33zJk7w70O/2o3/G5s4Boh5+FxyKAOXzjWsQOP8cj9LHJ3RQZU/Cl08Iz2/QWYFZRwCfPudZ69lLeYkC4mpA0MUXEJ+6xrDjTM1sGiYXNIBhXr+G18MkeHGYzhDqquk/Gt+hJauMfwTHN9BSM42h+WQcUhpjp+I5dUO2gjbZgqDz6ydNsgsccFsw5hdkBp140TkQsTmsKTaYPEwEFDeDQzyLyfFJO+mAiTR7zL7PPuW4TLn/YwwSdCDUfz7PSK992FJy57ybGtC8pO8hRnEVv8K1bcrzLeILYVqN8GxbGSWKGUx7b4JNF8GxT3q4zUILYVqB/GVf/SfBbcudh3y/OEr8REMsF+FlWfPvJ1I634vZuS9zDBRwlMXORUjNeMoIWyjSGRAw7HNiVOManPBlNraGslEiwlPxPJWLfxD67zFMWXK5swoQUf8PRqDp9FXAs2TNqokqMcCxy3nJtHnuZjYYQNPnIPHA51h1t+DL/xlXEZZRo8iTn3NqogyhGqILO0N+VpIQpKRepZVc5YeZryJ3iCN7T/wE4cCMml4m+zvs1wcZmL43jgWv9V84K499zmMDea5kb3Qwz3YI6kTTP8YmgEVJFUyXG4S2Uf2XXz6/z/YGuyCSOsfEQqDnGx9dLhlC9TtXYtc3WZO1+2sAhV1HT8Dp4mpKv0GafPquA9Yv0F8hcEhqfm8Iqrz9nfscaZAy9Uz1K3P0ncaY5iaZL0YkoalswSfap+BN8xRaeb7KORZXCqi3J4aMevunYMyCqOLYpdm4VVxdXjCE3dx0+yJfYa76BmFx37JfO/cKPiq6m4OtcAAAAASUVORK5CYII=" /***/ }), /***/ "gZEk": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__style_index_less__ = __webpack_require__("vtiu"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__style_index_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__style_index_less__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__index_less__ = __webpack_require__("GDoE"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__index_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__index_less__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__grid_style__ = __webpack_require__("Irxy"); // style dependencies /***/ }), /***/ "gcBW": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAbJJREFUOE+lkzFoVEEQhr9/3+bERrBQwRDPShHBIFgIFiLYiQgWWkiwC0g6BWOCErFIuEY0miixsrBQMCBiJyjYpLE5BVEbCSgighoIBnxvf7l3d82LiUqm252Zb2Zn/xHAyPjMjizPJ4DDwIbW3Sq2ADwtYhyZGB18p07yHLDxL4lV97cixv26eGX6IXD8P5O74bMtwI9/aHsl/kIL4Ir3PdI9cB1zGjFle17StvJcmdEyQAzxQJGKy7Kvp8CAxTUlziAWZd0xzIFr3aJ/6gBMk8AYZsiBS0q6De5H4YiczhsOLgdIxlbpMA316LF/MenMQ12A4JThJHAUKGPLDgQfEvQKItK47dGApsDfU+BJB7A9Ju/LQ3gG3gJ8AuolwHhYqNEuzhghPA8p2XBXUQOZs0Vc1PLEOfCJsnLQsJMb7RmIY8AumbOGzZ33JeAj0Ff5pS+Iq8AbzKMu4CeokcLSTM3r6rm9G8LWWIRbeVbcl1WAH6SgZk8tzRdLGjRcANZXhZQDLxGvwa/27Nx0s/n26w1Mn+GzoB/YS2tWbSuFtJKUc8ELw6FVZD679mVa6zr/Bt1e0bP0s5++AAAAAElFTkSuQmCC" /***/ }), /***/ "gpon": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("jlIA")); __webpack_require__("UQ5M"); var _message2 = _interopRequireDefault(__webpack_require__("/qCn")); var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); __webpack_require__("sRCI"); var _modal = _interopRequireDefault(__webpack_require__("vnWH")); __webpack_require__("LHBr"); var _input = _interopRequireDefault(__webpack_require__("A+AJ")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); var _dva = __webpack_require__("S6G3"); __webpack_require__("PK9/"); var _checkRTC = _interopRequireDefault(__webpack_require__("8VXG")); __webpack_require__("0wj8"); var _utils = __webpack_require__("oAV5"); var _common = _interopRequireDefault(__webpack_require__("pdZy")); var _api = __webpack_require__("H/Zg"); var _nModal = _interopRequireDefault(__webpack_require__("RkMR")); var _reactDom = _interopRequireDefault(__webpack_require__("O27J")); var _VideoBox = _interopRequireDefault(__webpack_require__("d60R")); var _RecordTimer = _interopRequireDefault(__webpack_require__("TnzN")); var _RecordMini = _interopRequireDefault(__webpack_require__("LPk8")); var _events = _interopRequireDefault(__webpack_require__("TLe5")); var _dec, _class; /** * 视频通话页面 */ // import Presetting from './presetting'; // import { imKey } from "../../../utils/config"; function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t3 in e) "default" !== _t3 && {}.hasOwnProperty.call(e, _t3) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t3)) && (i.get || i.set) ? o(f, _t3, i) : f[_t3] = e[_t3]); return f; })(e, t); } function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i.return) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); } function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, _regeneratorDefine2(e, r, n, t); } function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; } function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } var Search = _input.default.Search; var confirm = _modal.default.confirm, warning = _modal.default.warning, success = _modal.default.success, error = _modal.default.error; var Video = exports.default = (_dec = (0, _dva.connect)(function (state) { return { ownCid: state.im.v5Data.ownCid, ownName: state.im.v5Data.ownName, videoMember: state.command.videoMember, recordStatus: state.command.recordStatus, // 0:未录制 1:录制中 videoGenre: state.command.videoGenre // 功能类型 0: 视频调度(一对多) 1: 视频上拉(一对一) }; }), _dec(_class = /*#__PURE__*/function (_Component) { function Video(props) { var _this2; (0, _classCallCheck2.default)(this, Video); _this2 = _callSuper(this, Video, [props]); _this2.onChangeVideoSize = function (value) { _this2.setState({ videoSize: value }); }; // 解散房间弹窗 _this2.dissolutionRoomModal = function () { var _this = _this2; var recordStatus = _this.props.recordStatus; if (recordStatus == 1) { return _modal.default.warning({ title: '目前还在录制视频中,请先结束视频录制!', okText: '我知道了' }); } _modal.default.confirm({ title: "您将解散房间?", content: "注:其他人员也将退出房间", okText: "确定", cancelText: "取消", onOk: function onOk() { _modal.default.destroyAll(); // this.quitRTC(); _this.common.leave(_this.state.Room_No); _this.dissolutionRoom(); setTimeout(function () { _this.props.closeVideoState(); _this.props.dispatch({ type: 'command/fetchVideoGenre', payload: 0 }); _this.props.dispatch({ type: 'command/fetchVideoType', payload: 0 }); }, 200); _this.hasStop = true; }, onCancel: function onCancel() { console.log("Cancel"); } }); }; // 添加调度人员 _this2.onAddMember = function () { (0, _nModal.default)({ title: '添加视频调度人员', footer: null, width: 500, content: /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(Search, { placeholder: "\u8BF7\u8F93\u5165\u8C03\u5EA6\u8005\u5B8C\u6574\u624B\u673A\u53F7\uFF0C\u5982\u8C03\u5EA6\u591A\u4EBA\u8BF7\u4F7F\u7528\u201C/\u201D\u9694\u5F00", enterButton: "\u8C03\u5EA6", size: "default", onSearch: function onSearch(value) { console.log(value); if (value) { _this2.joinMemberVideo(value); } else { _message2.default.warning('请输入完整手机号'); } } })) }); }; _this2.common = _common.default.call(_this2); _this2.state = { RTC: null, Room_No: props.Room_No, //房间号 // MemberList: props.MemberList, mobilePhone: props.mobilePhone, imSig: props.imSig, height: null, rtc: null, isCamOn: true, isMicOn: true, //拖动 text: { isDown: false, offsetLeft: 0, offsetTop: 0 }, videoLocal: { isDown: false, offsetLeft: 0, offsetTop: 0 }, videoSize: 2 // 0:只显示标题; 1:只显示当前发言人视频;2:最大化 }; _this2.videoTimer = null; _this2.videoMaxTimeCount = 60; _this2.hasStop = false; return _this2; } (0, _inherits2.default)(Video, _Component); return (0, _createClass2.default)(Video, [{ key: "forceConnect", value: function forceConnect() { console.log('强制连接', this.props.videoMember); var that = this; var mobilePhone = this.props.videoMember.length > 0 && this.props.videoMember[0]['mobilePhone']; var status = this.props.videoMember.length > 0 && this.props.videoMember[0]['status']; if (status == 'yes') { that.hasStop = true; return; } confirm({ title: '视频上拉失败', okText: '再次上拉', cancelText: '取消', onOk: function onOk() { // 强制关闭房间 that.common.leave(that.state.Room_No); that.dissolutionRoom(); setTimeout(function () { that.props.closeVideoState(); }, 200); // 强制重新开启房间 var data = { mobilePhone: mobilePhone }; setTimeout(function () { _events.default.emit('clickTextScheduling', { item: [data], type: "video", isNeedRecord: [mobilePhone] }); }, 700); that._videoInterval(); }, onCancel: function onCancel() { console.log('Cancel'); } }); } }, { key: "_videoInterval", value: function _videoInterval() { var that = this; this.videoTimer = null; this.hasStop = false; var number = 0; this.videoTimer = setInterval(function () { number++; console.log('videoTimer-number', number); if (number > that.videoMaxTimeCount) { that.forceConnect(); clearInterval(that.videoTimer); } if (that.hasStop) { clearInterval(that.videoTimer); } }, 1000); } }, { key: "componentDidMount", value: function componentDidMount() { var that = this; (0, _checkRTC.default)(); var height = document.documentElement.clientHeight - 5; this.setState({ height: height }); this.common.login(this.state.Room_No, this.state.mobilePhone, this.props.ownCid, this.props.ownName, this); if (this.props.videoGenre == 1) { this._videoInterval(); } } }, { key: "componentWillReceiveProps", value: function componentWillReceiveProps(nextProps) { console.log(nextProps); } //解散房间 }, { key: "dissolutionRoom", value: function dissolutionRoom() { // window.close(); (0, _api.trtcVideoRoom)({ roomNo: this.state.Room_No }).then(function (res) { console.log(res); }); } }, { key: "joinMemberVideo", value: //加入视频成员 function () { var _joinMemberVideo = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator().m(function _callee(value) { var memberList, _this$props, isNeedRecord, schedulingName, memberCidList, uidList, needRecordCidList, videoMember, _iterator, _step, item, data, persons, _iterator2, _step2, recordPhone, _t, _t2; return _regenerator().w(function (_context) { while (1) switch (_context.p = _context.n) { case 0: console.log('joinMemberVideo', value); memberList = value.split('/'); _this$props = this.props, isNeedRecord = _this$props.isNeedRecord, schedulingName = _this$props.schedulingName; memberCidList = []; //视频人员cid uidList = []; //视频人员uid needRecordCidList = []; //需要录屏的人员cid videoMember = []; //用于记录是否已经进入房间使用 _iterator = _createForOfIteratorHelper(memberList); _context.p = 1; _iterator.s(); case 2: if ((_step = _iterator.n()).done) { _context.n = 13; break; } item = _step.value; if (!item) { _context.n = 12; break; } videoMember.push({ mobilePhone: item, status: 'no', id: item + 'no' }); _context.n = 3; return (0, _api.searchDeptUser)({ keyWord: item }); case 3: data = _context.v; if (!(data && data.data)) { _context.n = 11; break; } persons = data.data[0]; // uidList.push(item) uidList.push("".concat(persons.mobile, ";").concat(persons.id, ";").concat(persons.domainId)); memberCidList.push(data.data[0].item_cid); if (!(isNeedRecord.length > 0)) { _context.n = 10; break; } _iterator2 = _createForOfIteratorHelper(isNeedRecord); _context.p = 4; _iterator2.s(); case 5: if ((_step2 = _iterator2.n()).done) { _context.n = 7; break; } recordPhone = _step2.value; if (!(recordPhone == item)) { _context.n = 6; break; } needRecordCidList.push(data.data[0].item_cid); return _context.a(3, 7); case 6: _context.n = 5; break; case 7: _context.n = 9; break; case 8: _context.p = 8; _t = _context.v; _iterator2.e(_t); case 9: _context.p = 9; _iterator2.f(); return _context.f(9); case 10: _context.n = 12; break; case 11: return _context.a(2, _message2.default.info('手机号:' + item + '的用户不属于平台用户,无法调度,请核对后重新调度')); case 12: _context.n = 2; break; case 13: _context.n = 15; break; case 14: _context.p = 14; _t2 = _context.v; _iterator.e(_t2); case 15: _context.p = 15; _iterator.f(); return _context.f(15); case 16: this.props.dispatch({ type: 'command/fetchVideoMemberList', payload: { type: 'add', memberList: videoMember } }); (0, _api.continueSendVideoRoomMsg)({ RoomNo: this.state.Room_No, //房间号 MemberList: memberCidList.join(","), //视频人员,cid,多个逗号隔开 Yardman_Task_Name: schedulingName, //调度任务名称 Transcriber: isNeedRecord ? needRecordCidList : '', //需要录制的人员的cid,多个逗号隔开 UseList: uidList.join(","), //视频人员uid(手机号),跟MemberList一一对应 ComId: (0, _utils.gup)('v5_comId', window.location.href) //v5的企业ID }).then(function (res) { if (res.retType === "0") { setTimeout(function () { var divs = document.getElementsByClassName('n_modal'); Reflect.apply(Array.prototype.forEach, divs, [function (item) { _reactDom.default.unmountComponentAtNode(item); document.body.removeChild(item); }]); }, 300); } }); case 17: return _context.a(2); } }, _callee, this, [[4, 8, 9, 10], [1, 14, 15, 16]]); })); function joinMemberVideo(_x) { return _joinMemberVideo.apply(this, arguments); } return joinMemberVideo; }() }, { key: "render", value: function render() { var _this3 = this; var _this$props2 = this.props, videoMember = _this$props2.videoMember, videoGenre = _this$props2.videoGenre; var _this$state = this.state, videoSize = _this$state.videoSize, videoVisible = _this$state.videoVisible; var hasVideoScheduling = videoGenre == 0 ? true : false; return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("div", { id: "video-section" }, /*#__PURE__*/_react.default.createElement("div", { className: "calling" }, videoMember.map(function (item) { return /*#__PURE__*/_react.default.createElement("div", null, item.status == 'delete' ? '' : /*#__PURE__*/_react.default.createElement("div", { className: "item", id: item.id }, item.status == 'no' ? '等待' + item.mobilePhone + '接入' : item.status == 'yes' ? item.mobilePhone + '接入成功' : item.status == 'leave' ? item.mobilePhone + '已离开' : item.status == 'fail' ? /*#__PURE__*/_react.default.createElement("span", null, item.mobilePhone + '调度失败', /*#__PURE__*/_react.default.createElement("span", { className: "again", onClick: function onClick() { _this3.joinMemberVideo(item.mobilePhone); } }, "\u91CD\u65B0\u8C03\u5EA6")) : '')); })), /*#__PURE__*/_react.default.createElement(_VideoBox.default, { _videoThis: this, dissolutionRoomModal: this.dissolutionRoomModal, common: this.common, videoSize: videoSize, addMember: this.onAddMember })), /*#__PURE__*/_react.default.createElement(_RecordTimer.default, null), hasVideoScheduling ? /*#__PURE__*/_react.default.createElement(_RecordMini.default, { videoSize: videoSize, onChange: this.onChangeVideoSize.bind(this) }) : null); } }]); }(_react.Component)) || _class); /***/ }), /***/ "gqlY": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; __webpack_require__("crfj"); var _button = _interopRequireDefault(__webpack_require__("zwGx")); var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); __webpack_require__("yQBS"); var _tabs = _interopRequireDefault(__webpack_require__("qA/u")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); var _PersonMessage = _interopRequireDefault(__webpack_require__("DcFL")); var _Attendance = _interopRequireDefault(__webpack_require__("ue1L")); var _EventList = _interopRequireDefault(__webpack_require__("J5z1")); var _PersonSearchList = _interopRequireDefault(__webpack_require__("+JPs")); __webpack_require__("TnUk"); var _dva = __webpack_require__("S6G3"); var _dec, _class; function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } var TabPane = _tabs.default.TabPane; var SearchListTab = exports.default = (_dec = (0, _dva.connect)(function (state) { return { selectedAttenData: state.command.attendanceList.selectedAttenData, tabIndex: state.command.tabIndex }; }), _dec(_class = /*#__PURE__*/function (_PureComponent) { function SearchListTab(props) { var _this; (0, _classCallCheck2.default)(this, SearchListTab); _this = _callSuper(this, SearchListTab, [props]); _this.state = { buttonStatus: true //true是打开,false是关闭 }; return _this; } (0, _inherits2.default)(SearchListTab, _PureComponent); return (0, _createClass2.default)(SearchListTab, [{ key: "render", value: function render() { var _this2 = this; return /*#__PURE__*/_react.default.createElement("div", { className: "searchListTab" }, !this.props.selectedAttenData && /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("div", { className: "drawer_container_tab", style: { boxShadow: "unset", width: '370px' } }, /*#__PURE__*/_react.default.createElement(_tabs.default, { defaultActiveKey: this.props.tabIndex.tabIndex1 || "2", onChange: function onChange(index) { _this2.props.dispatch({ type: "command/setTabIndex", payload: { tabIndex1: index } }); _this2.props.dispatch({ type: "command/clearInfoWindow", payload: true }); } }, /*#__PURE__*/_react.default.createElement(TabPane, { tab: "\u4EBA\u5458\u4FE1\u606F", key: "2" }, /*#__PURE__*/_react.default.createElement(_PersonMessage.default, { visible: this.state.buttonStatus, changeImStatus: function changeImStatus(value) { _this2.props.changeImStatus(value); }, groupVideo: function groupVideo(list) { _this2.props.groupVideo(list); } })), /*#__PURE__*/_react.default.createElement(TabPane, { tab: "\u9A7B\u52E4\u4FE1\u606F", key: "3" }, /*#__PURE__*/_react.default.createElement(_Attendance.default, { visible: this.state.buttonStatus })))), /*#__PURE__*/_react.default.createElement("div", { className: "drawer_container_tab openButton" }, /*#__PURE__*/_react.default.createElement(_button.default, { onClick: function onClick() { _this2.setState({ buttonStatus: !_this2.state.buttonStatus }); } }, /*#__PURE__*/_react.default.createElement("img", { src: this.state.buttonStatus ? __webpack_require__("16NO") : __webpack_require__("wWow") })))), /*#__PURE__*/_react.default.createElement("div", { className: "drawer_container_tab" }, this.props.selectedAttenData && /*#__PURE__*/_react.default.createElement(_PersonSearchList.default, null))); } }]); }(_react.PureComponent)) || _class); /***/ }), /***/ "gtac": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); // EXTERNAL MODULE: ./node_modules/react/index.js var react = __webpack_require__("GiK3"); var react_default = /*#__PURE__*/__webpack_require__.n(react); // EXTERNAL MODULE: ./node_modules/prop-types/index.js var prop_types = __webpack_require__("KSGD"); var prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types); // EXTERNAL MODULE: ./node_modules/rc-checkbox/es/index.js + 1 modules var es = __webpack_require__("jF3+"); // EXTERNAL MODULE: ./node_modules/antd/node_modules/classnames/index.js var classnames = __webpack_require__("kTQ8"); var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); // EXTERNAL MODULE: ./node_modules/shallowequal/index.js var shallowequal = __webpack_require__("Ngpj"); var shallowequal_default = /*#__PURE__*/__webpack_require__.n(shallowequal); // EXTERNAL MODULE: ./node_modules/antd/es/config-provider/index.js + 1 modules var config_provider = __webpack_require__("PmSq"); // CONCATENATED MODULE: ./node_modules/antd/es/radio/radio.js function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } 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; } function _extends() { _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; }; return _extends.apply(this, arguments); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } var __rest = this && this.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var radio_Radio = /*#__PURE__*/function (_React$Component) { _inherits(Radio, _React$Component); var _super = _createSuper(Radio); function Radio() { var _this; _classCallCheck(this, Radio); _this = _super.apply(this, arguments); _this.saveCheckbox = function (node) { _this.rcCheckbox = node; }; _this.onChange = function (e) { if (_this.props.onChange) { _this.props.onChange(e); } if (_this.context.radioGroup && _this.context.radioGroup.onChange) { _this.context.radioGroup.onChange(e); } }; _this.renderRadio = function (_ref) { var _classNames; var getPrefixCls = _ref.getPrefixCls; var _assertThisInitialize = _assertThisInitialized(_this), props = _assertThisInitialize.props, context = _assertThisInitialize.context; var customizePrefixCls = props.prefixCls, className = props.className, children = props.children, style = props.style, restProps = __rest(props, ["prefixCls", "className", "children", "style"]); var radioGroup = context.radioGroup; var prefixCls = getPrefixCls('radio', customizePrefixCls); var radioProps = _extends({}, restProps); if (radioGroup) { radioProps.name = radioGroup.name; radioProps.onChange = _this.onChange; radioProps.checked = props.value === radioGroup.value; radioProps.disabled = props.disabled || radioGroup.disabled; } var wrapperClassString = classnames_default()(className, (_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-wrapper"), true), _defineProperty(_classNames, "".concat(prefixCls, "-wrapper-checked"), radioProps.checked), _defineProperty(_classNames, "".concat(prefixCls, "-wrapper-disabled"), radioProps.disabled), _classNames)); return ( /*#__PURE__*/ // eslint-disable-next-line jsx-a11y/label-has-associated-control react["createElement"]("label", { className: wrapperClassString, style: style, onMouseEnter: props.onMouseEnter, onMouseLeave: props.onMouseLeave }, /*#__PURE__*/react["createElement"](es["a" /* default */], _extends({}, radioProps, { prefixCls: prefixCls, ref: _this.saveCheckbox })), children !== undefined ? /*#__PURE__*/react["createElement"]("span", null, children) : null) ); }; return _this; } _createClass(Radio, [{ key: "shouldComponentUpdate", value: function shouldComponentUpdate(nextProps, nextState, nextContext) { return !shallowequal_default()(this.props, nextProps) || !shallowequal_default()(this.state, nextState) || !shallowequal_default()(this.context.radioGroup, nextContext.radioGroup); } }, { key: "focus", value: function focus() { this.rcCheckbox.focus(); } }, { key: "blur", value: function blur() { this.rcCheckbox.blur(); } }, { key: "render", value: function render() { return /*#__PURE__*/react["createElement"](config_provider["ConfigConsumer"], null, this.renderRadio); } }]); return Radio; }(react["Component"]); radio_Radio.defaultProps = { type: 'radio' }; radio_Radio.contextTypes = { radioGroup: prop_types["any"] }; // EXTERNAL MODULE: ./node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js var react_lifecycles_compat_es = __webpack_require__("R8mX"); // CONCATENATED MODULE: ./node_modules/antd/es/radio/group.js function group__typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { group__typeof = function _typeof(obj) { return typeof obj; }; } else { group__typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return group__typeof(obj); } function group__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; } function group__classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function group__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); } } function group__createClass(Constructor, protoProps, staticProps) { if (protoProps) group__defineProperties(Constructor.prototype, protoProps); if (staticProps) group__defineProperties(Constructor, staticProps); return Constructor; } function group__inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) group__setPrototypeOf(subClass, superClass); } function group__setPrototypeOf(o, p) { group__setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return group__setPrototypeOf(o, p); } function group__createSuper(Derived) { var hasNativeReflectConstruct = group__isNativeReflectConstruct(); return function _createSuperInternal() { var Super = group__getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = group__getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return group__possibleConstructorReturn(this, result); }; } function group__possibleConstructorReturn(self, call) { if (call && (group__typeof(call) === "object" || typeof call === "function")) { return call; } return group__assertThisInitialized(self); } function group__assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function group__isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } function group__getPrototypeOf(o) { group__getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return group__getPrototypeOf(o); } function getCheckedValue(children) { var value = null; var matched = false; react["Children"].forEach(children, function (radio) { if (radio && radio.props && radio.props.checked) { value = radio.props.value; matched = true; } }); return matched ? { value: value } : undefined; } var group_RadioGroup = /*#__PURE__*/function (_React$Component) { group__inherits(RadioGroup, _React$Component); var _super = group__createSuper(RadioGroup); function RadioGroup(props) { var _this; group__classCallCheck(this, RadioGroup); _this = _super.call(this, props); _this.onRadioChange = function (ev) { var lastValue = _this.state.value; var value = ev.target.value; if (!('value' in _this.props)) { _this.setState({ value: value }); } var onChange = _this.props.onChange; if (onChange && value !== lastValue) { onChange(ev); } }; _this.renderGroup = function (_ref) { var getPrefixCls = _ref.getPrefixCls; var _assertThisInitialize = group__assertThisInitialized(_this), props = _assertThisInitialize.props; var customizePrefixCls = props.prefixCls, _props$className = props.className, className = _props$className === void 0 ? '' : _props$className, options = props.options, buttonStyle = props.buttonStyle; var prefixCls = getPrefixCls('radio', customizePrefixCls); var groupPrefixCls = "".concat(prefixCls, "-group"); var classString = classnames_default()(groupPrefixCls, "".concat(groupPrefixCls, "-").concat(buttonStyle), group__defineProperty({}, "".concat(groupPrefixCls, "-").concat(props.size), props.size), className); var children = props.children; // 如果存在 options, 优先使用 if (options && options.length > 0) { children = options.map(function (option) { if (typeof option === 'string') { // 此处类型自动推导为 string return /*#__PURE__*/react["createElement"](radio_Radio, { key: option, prefixCls: prefixCls, disabled: _this.props.disabled, value: option, checked: _this.state.value === option }, option); } // 此处类型自动推导为 { label: string value: string } return /*#__PURE__*/react["createElement"](radio_Radio, { key: "radio-group-value-options-".concat(option.value), prefixCls: prefixCls, disabled: option.disabled || _this.props.disabled, value: option.value, checked: _this.state.value === option.value }, option.label); }); } return /*#__PURE__*/react["createElement"]("div", { className: classString, style: props.style, onMouseEnter: props.onMouseEnter, onMouseLeave: props.onMouseLeave, id: props.id }, children); }; var value; if ('value' in props) { value = props.value; } else if ('defaultValue' in props) { value = props.defaultValue; } else { var checkedValue = getCheckedValue(props.children); value = checkedValue && checkedValue.value; } _this.state = { value: value }; return _this; } group__createClass(RadioGroup, [{ key: "getChildContext", value: function getChildContext() { return { radioGroup: { onChange: this.onRadioChange, value: this.state.value, disabled: this.props.disabled, name: this.props.name } }; } }, { key: "shouldComponentUpdate", value: function shouldComponentUpdate(nextProps, nextState) { return !shallowequal_default()(this.props, nextProps) || !shallowequal_default()(this.state, nextState); } }, { key: "render", value: function render() { return /*#__PURE__*/react["createElement"](config_provider["ConfigConsumer"], null, this.renderGroup); } }], [{ key: "getDerivedStateFromProps", value: function getDerivedStateFromProps(nextProps) { if ('value' in nextProps) { return { value: nextProps.value }; } var checkedValue = getCheckedValue(nextProps.children); if (checkedValue) { return { value: checkedValue.value }; } return null; } }]); return RadioGroup; }(react["Component"]); group_RadioGroup.defaultProps = { buttonStyle: 'outline' }; group_RadioGroup.childContextTypes = { radioGroup: prop_types["any"] }; Object(react_lifecycles_compat_es["polyfill"])(group_RadioGroup); /* harmony default export */ var group = (group_RadioGroup); // CONCATENATED MODULE: ./node_modules/antd/es/radio/radioButton.js function radioButton__typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { radioButton__typeof = function _typeof(obj) { return typeof obj; }; } else { radioButton__typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return radioButton__typeof(obj); } function radioButton__extends() { radioButton__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; }; return radioButton__extends.apply(this, arguments); } function radioButton__classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function radioButton__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); } } function radioButton__createClass(Constructor, protoProps, staticProps) { if (protoProps) radioButton__defineProperties(Constructor.prototype, protoProps); if (staticProps) radioButton__defineProperties(Constructor, staticProps); return Constructor; } function radioButton__inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) radioButton__setPrototypeOf(subClass, superClass); } function radioButton__setPrototypeOf(o, p) { radioButton__setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return radioButton__setPrototypeOf(o, p); } function radioButton__createSuper(Derived) { var hasNativeReflectConstruct = radioButton__isNativeReflectConstruct(); return function _createSuperInternal() { var Super = radioButton__getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = radioButton__getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return radioButton__possibleConstructorReturn(this, result); }; } function radioButton__possibleConstructorReturn(self, call) { if (call && (radioButton__typeof(call) === "object" || typeof call === "function")) { return call; } return radioButton__assertThisInitialized(self); } function radioButton__assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function radioButton__isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } function radioButton__getPrototypeOf(o) { radioButton__getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return radioButton__getPrototypeOf(o); } var radioButton___rest = this && this.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var radioButton_RadioButton = /*#__PURE__*/function (_React$Component) { radioButton__inherits(RadioButton, _React$Component); var _super = radioButton__createSuper(RadioButton); function RadioButton() { var _this; radioButton__classCallCheck(this, RadioButton); _this = _super.apply(this, arguments); _this.renderRadioButton = function (_ref) { var getPrefixCls = _ref.getPrefixCls; var _a = _this.props, customizePrefixCls = _a.prefixCls, radioProps = radioButton___rest(_a, ["prefixCls"]); var prefixCls = getPrefixCls('radio-button', customizePrefixCls); if (_this.context.radioGroup) { radioProps.checked = _this.props.value === _this.context.radioGroup.value; radioProps.disabled = _this.props.disabled || _this.context.radioGroup.disabled; } return /*#__PURE__*/react["createElement"](radio_Radio, radioButton__extends({ prefixCls: prefixCls }, radioProps)); }; return _this; } radioButton__createClass(RadioButton, [{ key: "render", value: function render() { return /*#__PURE__*/react["createElement"](config_provider["ConfigConsumer"], null, this.renderRadioButton); } }]); return RadioButton; }(react["Component"]); radioButton_RadioButton.contextTypes = { radioGroup: prop_types["any"] }; // CONCATENATED MODULE: ./node_modules/antd/es/radio/index.js /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "Button", function() { return radioButton_RadioButton; }); /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "Group", function() { return group; }); radio_Radio.Button = radioButton_RadioButton; radio_Radio.Group = group; /* harmony default export */ var es_radio = __webpack_exports__["default"] = (radio_Radio); /***/ }), /***/ "gyGh": /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = _default; //实时异常的信息窗体 function _default(data) { var eventType = data.eventType, eventNO = data.eventNO, eventName = data.eventName, eventPlace = data.eventPlace, eventAnnex = data.eventAnnex, position = data.position, alarmTime = data.alarmTime; var submitPerson = eventAnnex && JSON.parse(eventAnnex)[0].userName; var content = []; content.push("
    " + eventType + "
    事件标题:" + eventName + "
    事件编号:" + eventNO + "
    事件地址:" + eventPlace + "
    事件时间:" + eventName + "
    提交人:" + submitPerson + "
    "); content.join("
    "); var info = document.createElement("div"); info.className = "content-window-card"; //可以通过下面的方式修改自定义窗体的宽高 info.style.width = "300px"; // 定义内容 var middle = document.createElement("div"); middle.className = "info-middle"; middle.innerHTML = content; info.appendChild(middle); //定义详情 var detail = document.createElement("div"); detail.className = "detail-div"; info.appendChild(detail); //定义关闭按钮 // var detail = document.createElement("div"); // detail.className = "close-div"; // var a = document.createElement("a"); // a.innerHTML = "x"; // a.onclick = () => { // this.clear('setSelectIndex') // }; // detail.appendChild(a); info.appendChild(detail); return info; } /***/ }), /***/ "gzuX": /***/ (function(module, exports) { // removed by extract-text-webpack-plugin module.exports = {"attendance_item":"attendance_item___1855S","title":"title___Eg6SK","name":"name___xguGU","sub_name":"sub_name___3GVZ4"}; /***/ }), /***/ "h1m8": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* @preserve * gcoord 0.3.2, geographic coordinate library * Copyright (c) 2021 Jiulong Hu */ /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ var __assign = function() { __assign = Object.assign || function __assign(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } return t; }; return __assign.apply(this, arguments); }; var sin$1 = Math.sin, cos$1 = Math.cos, sqrt$1 = Math.sqrt, abs$1 = Math.abs, PI$1 = Math.PI; var a = 6378245; var ee = 0.006693421622965823; // roughly check whether coordinates are in China. function isInChinaBbox(lon, lat) { return lon >= 72.004 && lon <= 137.8347 && lat >= 0.8293 && lat <= 55.8271; } function transformLat(x, y) { var ret = -100 + 2 * x + 3 * y + 0.2 * y * y + 0.1 * x * y + 0.2 * sqrt$1(abs$1(x)); ret += ((20 * sin$1(6 * x * PI$1) + 20 * sin$1(2 * x * PI$1)) * 2) / 3; ret += ((20 * sin$1(y * PI$1) + 40 * sin$1((y / 3) * PI$1)) * 2) / 3; ret += ((160 * sin$1((y / 12) * PI$1) + 320 * sin$1((y * PI$1) / 30)) * 2) / 3; return ret; } function transformLon(x, y) { var ret = 300 + x + 2 * y + 0.1 * x * x + 0.1 * x * y + 0.1 * sqrt$1(abs$1(x)); ret += ((20 * sin$1(6 * x * PI$1) + 20 * sin$1(2 * x * PI$1)) * 2) / 3; ret += ((20 * sin$1(x * PI$1) + 40 * sin$1((x / 3) * PI$1)) * 2) / 3; ret += ((150 * sin$1((x / 12) * PI$1) + 300 * sin$1((x / 30) * PI$1)) * 2) / 3; return ret; } function delta(lon, lat) { var dLon = transformLon(lon - 105, lat - 35); var dLat = transformLat(lon - 105, lat - 35); var radLat = (lat / 180) * PI$1; var magic = sin$1(radLat); magic = 1 - ee * magic * magic; var sqrtMagic = sqrt$1(magic); dLon = (dLon * 180) / ((a / sqrtMagic) * cos$1(radLat) * PI$1); dLat = (dLat * 180) / (((a * (1 - ee)) / (magic * sqrtMagic)) * PI$1); return [dLon, dLat]; } function WGS84ToGCJ02(coord) { var lon = coord[0], lat = coord[1]; if (!isInChinaBbox(lon, lat)) return [lon, lat]; var d = delta(lon, lat); return [lon + d[0], lat + d[1]]; } function GCJ02ToWGS84(coord) { var lon = coord[0], lat = coord[1]; if (!isInChinaBbox(lon, lat)) return [lon, lat]; var _a = [lon, lat], wgsLon = _a[0], wgsLat = _a[1]; var tempPoint = WGS84ToGCJ02([wgsLon, wgsLat]); var dx = tempPoint[0] - lon; var dy = tempPoint[1] - lat; while (abs$1(dx) > 1e-6 || abs$1(dy) > 1e-6) { wgsLon -= dx; wgsLat -= dy; tempPoint = WGS84ToGCJ02([wgsLon, wgsLat]); dx = tempPoint[0] - lon; dy = tempPoint[1] - lat; } return [wgsLon, wgsLat]; } var sin = Math.sin, cos = Math.cos, atan2 = Math.atan2, sqrt = Math.sqrt, PI = Math.PI; var baiduFactor = (PI * 3000.0) / 180.0; function BD09ToGCJ02(coord) { var lon = coord[0], lat = coord[1]; var x = lon - 0.0065; var y = lat - 0.006; var z = sqrt(x * x + y * y) - 0.00002 * sin(y * baiduFactor); var theta = atan2(y, x) - 0.000003 * cos(x * baiduFactor); var newLon = z * cos(theta); var newLat = z * sin(theta); return [newLon, newLat]; } function GCJ02ToBD09(coord) { var lon = coord[0], lat = coord[1]; var x = lon; var y = lat; var z = sqrt(x * x + y * y) + 0.00002 * sin(y * baiduFactor); var theta = atan2(y, x) + 0.000003 * cos(x * baiduFactor); var newLon = z * cos(theta) + 0.0065; var newLat = z * sin(theta) + 0.006; return [newLon, newLat]; } // https://github.com/Turfjs/turf/blob/master/packages/turf-projection/index.ts var R2D = 180 / Math.PI; var D2R = Math.PI / 180; var A = 6378137.0; var MAXEXTENT = 20037508.342789244; function ESPG3857ToWGS84(xy) { return [ (xy[0] * R2D) / A, (Math.PI * 0.5 - 2.0 * Math.atan(Math.exp(-xy[1] / A))) * R2D, ]; } function WGS84ToEPSG3857(lonLat) { // compensate longitudes passing the 180th meridian // from https://github.com/proj4js/proj4js/blob/master/lib/common/adjust_lon.js var adjusted = Math.abs(lonLat[0]) <= 180 ? lonLat[0] : lonLat[0] - (lonLat[0] < 0 ? -1 : 1) * 360; var xy = [ A * adjusted * D2R, A * Math.log(Math.tan(Math.PI * 0.25 + 0.5 * lonLat[1] * D2R)), ]; // if xy value is beyond maxextent (e.g. poles), return maxextent if (xy[0] > MAXEXTENT) xy[0] = MAXEXTENT; if (xy[0] < -MAXEXTENT) xy[0] = -MAXEXTENT; if (xy[1] > MAXEXTENT) xy[1] = MAXEXTENT; if (xy[1] < -MAXEXTENT) xy[1] = -MAXEXTENT; return xy; } var abs = Math.abs; var MCBAND = [12890594.86, 8362377.87, 5591021, 3481989.83, 1678043.12, 0]; var LLBAND = [75, 60, 45, 30, 15, 0]; var MC2LL = [ [ 1.410526172116255e-8, 0.00000898305509648872, -1.9939833816331, 200.9824383106796, -187.2403703815547, 91.6087516669843, -23.38765649603339, 2.57121317296198, -0.03801003308653, 17337981.2, ], [ -7.435856389565537e-9, 0.000008983055097726239, -0.78625201886289, 96.32687599759846, -1.85204757529826, -59.36935905485877, 47.40033549296737, -16.50741931063887, 2.28786674699375, 10260144.86, ], [ -3.030883460898826e-8, 0.00000898305509983578, 0.30071316287616, 59.74293618442277, 7.357984074871, -25.38371002664745, 13.45380521110908, -3.29883767235584, 0.32710905363475, 6856817.37, ], [ -1.981981304930552e-8, 0.000008983055099779535, 0.03278182852591, 40.31678527705744, 0.65659298677277, -4.44255534477492, 0.85341911805263, 0.12923347998204, -0.04625736007561, 4482777.06, ], [ 3.09191371068437e-9, 0.000008983055096812155, 0.00006995724062, 23.10934304144901, -0.00023663490511, -0.6321817810242, -0.00663494467273, 0.03430082397953, -0.00466043876332, 2555164.4, ], [ 2.890871144776878e-9, 0.000008983055095805407, -3.068298e-8, 7.47137025468032, -0.00000353937994, -0.02145144861037, -0.00001234426596, 0.00010322952773, -0.00000323890364, 826088.5, ], ]; var LL2MC = [ [ -0.0015702102444, 111320.7020616939, 1704480524535203, -10338987376042340, 26112667856603880, -35149669176653700, 26595700718403920, -10725012454188240, 1800819912950474, 82.5, ], [ 0.0008277824516172526, 111320.7020463578, 647795574.6671607, -4082003173.641316, 10774905663.51142, -15171875531.51559, 12053065338.62167, -5124939663.577472, 913311935.9512032, 67.5, ], [ 0.00337398766765, 111320.7020202162, 4481351.045890365, -23393751.19931662, 79682215.47186455, -115964993.2797253, 97236711.15602145, -43661946.33752821, 8477230.501135234, 52.5, ], [ 0.00220636496208, 111320.7020209128, 51751.86112841131, 3796837.749470245, 992013.7397791013, -1221952.21711287, 1340652.697009075, -620943.6990984312, 144416.9293806241, 37.5, ], [ -0.0003441963504368392, 111320.7020576856, 278.2353980772752, 2485758.690035394, 6070.750963243378, 54821.18345352118, 9540.606633304236, -2710.55326746645, 1405.483844121726, 22.5, ], [ -0.0003218135878613132, 111320.7020701615, 0.00369383431289, 823725.6402795718, 0.46104986909093, 2351.343141331292, 1.58060784298199, 8.77738589078284, 0.37238884252424, 7.45, ], ]; function transform$1(x, y, factors) { var cc = abs(y) / factors[9]; var xt = factors[0] + factors[1] * abs(x); var yt = factors[2] + factors[3] * cc + factors[4] * Math.pow(cc, 2) + factors[5] * Math.pow(cc, 3) + factors[6] * Math.pow(cc, 4) + factors[7] * Math.pow(cc, 5) + factors[8] * Math.pow(cc, 6); xt *= x < 0 ? -1 : 1; yt *= y < 0 ? -1 : 1; return [xt, yt]; } function BD09toBD09MC(coord) { var lng = coord[0], lat = coord[1]; var factors = []; for (var i = 0; i < LLBAND.length; i++) { if (abs(lat) > LLBAND[i]) { factors = LL2MC[i]; break; } } return transform$1(lng, lat, factors); } function BD09MCtoBD09(coord) { var x = coord[0], y = coord[1]; var factors = []; for (var i = 0; i < MCBAND.length; i++) { if (y >= MCBAND[i]) { factors = MC2LL[i]; break; } } return transform$1(x, y, factors); } function assert(condition, msg) { if (!condition) throw new Error(msg); } /** * isArray * * @param {*} input variable to validate * @returns {boolean} true/false */ function isArray(input) { return !!input && Object.prototype.toString.call(input) === '[object Array]'; } /** * isNumber * * @param {*} num Number to validate * @returns {boolean} true/false * @example * isNumber(123) * //=true * isNumber('foo') * //=false */ function isNumber(input) { return !isNaN(Number(input)) && input !== null && !isArray(input); } /** * compose * * @param {function[]} functions * @returns {function} */ function compose() { var funcs = []; for (var _i = 0; _i < arguments.length; _i++) { funcs[_i] = arguments[_i]; } var start = funcs.length - 1; /* eslint-disable func-names */ return function () { var args = []; for (var _i = 0; _i < arguments.length; _i++) { args[_i] = arguments[_i]; } var i = start; var result = funcs[start].apply(null, args); while (i--) result = funcs[i].call(null, result); return result; }; } /** * Iterate over coordinates in any GeoJSON object, similar to Array.forEach() * https://github.com/Turfjs/turf/blob/master/packages/turf-meta/index.mjs * * @name coordEach * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object * @param {Function} callback a method that takes (currentCoord, coordIndex, featureIndex, multiFeatureIndex) * @param {boolean} [excludeWrapCoord=false] whether or not to include the final coordinate of LinearRings that wraps the ring in its iteration. * @returns {void} * @example * let features = featureCollection([ * point([26, 37], {"foo": "bar"}), * point([36, 53], {"hello": "world"}) * ]); * * coordEach(features, function (currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) { * //=currentCoord * //=coordIndex * //=featureIndex * //=multiFeatureIndex * //=geometryIndex * }); */ /* eslint-disable no-param-reassign */ function coordEach(geojson, callback, excludeWrapCoord) { if (excludeWrapCoord === void 0) { excludeWrapCoord = false; } // Handles null Geometry -- Skips this GeoJSON if (geojson === null) return; /* eslint-disable-next-line */ var j, k, l, geometry, stopG, coords, geometryMaybeCollection, wrapShrink = 0, coordIndex = 0, isGeometryCollection; var type = geojson.type; var isFeatureCollection = type === 'FeatureCollection'; var isFeature = type === 'Feature'; var stop = isFeatureCollection ? geojson.features.length : 1; // This logic may look a little weird. The reason why it is that way // is because it's trying to be fast. GeoJSON supports multiple kinds // of objects at its root: FeatureCollection, Features, Geometries. // This function has the responsibility of handling all of them, and that // means that some of the `for` loops you see below actually just don't apply // to certain inputs. For instance, if you give this just a // Point geometry, then both loops are short-circuited and all we do // is gradually rename the input until it's called 'geometry'. // // This also aims to allocate as few resources as possible: just a // few numbers and booleans, rather than any temporary arrays as would // be required with the normalization approach. for (var featureIndex = 0; featureIndex < stop; featureIndex++) { geometryMaybeCollection = isFeatureCollection ? geojson.features[featureIndex].geometry : isFeature ? geojson.geometry : geojson; isGeometryCollection = geometryMaybeCollection ? geometryMaybeCollection.type === 'GeometryCollection' : false; stopG = isGeometryCollection ? geometryMaybeCollection.geometries.length : 1; for (var geomIndex = 0; geomIndex < stopG; geomIndex++) { var multiFeatureIndex = 0; var geometryIndex = 0; geometry = isGeometryCollection ? geometryMaybeCollection.geometries[geomIndex] : geometryMaybeCollection; // Handles null Geometry -- Skips this geometry if (geometry === null) continue; var geomType = geometry.type; wrapShrink = excludeWrapCoord && (geomType === 'Polygon' || geomType === 'MultiPolygon') ? 1 : 0; switch (geomType) { case null: break; case 'Point': coords = geometry.coordinates; if (callback(coords, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) === false) return false; coordIndex++; multiFeatureIndex++; break; case 'LineString': case 'MultiPoint': coords = geometry.coordinates; for (j = 0; j < coords.length; j++) { if (callback(coords[j], coordIndex, featureIndex, multiFeatureIndex, geometryIndex) === false) return false; coordIndex++; if (geomType === 'MultiPoint') multiFeatureIndex++; } if (geomType === 'LineString') multiFeatureIndex++; break; case 'Polygon': case 'MultiLineString': coords = geometry.coordinates; for (j = 0; j < coords.length; j++) { for (k = 0; k < coords[j].length - wrapShrink; k++) { if (callback(coords[j][k], coordIndex, featureIndex, multiFeatureIndex, geometryIndex) === false) return false; coordIndex++; } if (geomType === 'MultiLineString') multiFeatureIndex++; if (geomType === 'Polygon') geometryIndex++; } if (geomType === 'Polygon') multiFeatureIndex++; break; case 'MultiPolygon': coords = geometry.coordinates; for (j = 0; j < coords.length; j++) { geometryIndex = 0; for (k = 0; k < coords[j].length; k++) { for (l = 0; l < coords[j][k].length - wrapShrink; l++) { if (callback(coords[j][k][l], coordIndex, featureIndex, multiFeatureIndex, geometryIndex) === false) return false; coordIndex++; } geometryIndex++; } multiFeatureIndex++; } break; case 'GeometryCollection': for (j = 0; j < geometry.geometries.length; j++) { if (coordEach(geometry.geometries[j], callback, excludeWrapCoord) === false) return false; } break; default: throw new Error('Unknown Geometry Type'); } } } } var _a, _b, _c, _d, _e; var CRSTypes; (function (CRSTypes) { // WGS84 CRSTypes["WGS84"] = "WGS84"; CRSTypes["WGS1984"] = "WGS84"; CRSTypes["EPSG4326"] = "WGS84"; // GCJ02 CRSTypes["GCJ02"] = "GCJ02"; CRSTypes["AMap"] = "GCJ02"; // BD09 CRSTypes["BD09"] = "BD09"; CRSTypes["BD09LL"] = "BD09"; CRSTypes["Baidu"] = "BD09"; CRSTypes["BMap"] = "BD09"; // BD09MC CRSTypes["BD09MC"] = "BD09MC"; CRSTypes["BD09Meter"] = "BD09MC"; // EPSG3857 CRSTypes["EPSG3857"] = "EPSG3857"; CRSTypes["EPSG900913"] = "EPSG3857"; CRSTypes["EPSG102100"] = "EPSG3857"; CRSTypes["WebMercator"] = "EPSG3857"; CRSTypes["WM"] = "EPSG3857"; })(CRSTypes || (CRSTypes = {})); var WGS84 = { to: (_a = {}, _a[CRSTypes.GCJ02] = WGS84ToGCJ02, _a[CRSTypes.BD09] = compose(GCJ02ToBD09, WGS84ToGCJ02), _a[CRSTypes.BD09MC] = compose(BD09toBD09MC, GCJ02ToBD09, WGS84ToGCJ02), _a[CRSTypes.EPSG3857] = WGS84ToEPSG3857, _a), }; var GCJ02 = { to: (_b = {}, _b[CRSTypes.WGS84] = GCJ02ToWGS84, _b[CRSTypes.BD09] = GCJ02ToBD09, _b[CRSTypes.BD09MC] = compose(BD09toBD09MC, GCJ02ToBD09), _b[CRSTypes.EPSG3857] = compose(WGS84ToEPSG3857, GCJ02ToWGS84), _b), }; var BD09 = { to: (_c = {}, _c[CRSTypes.WGS84] = compose(GCJ02ToWGS84, BD09ToGCJ02), _c[CRSTypes.GCJ02] = BD09ToGCJ02, _c[CRSTypes.EPSG3857] = compose(WGS84ToEPSG3857, GCJ02ToWGS84, BD09ToGCJ02), _c[CRSTypes.BD09MC] = BD09toBD09MC, _c), }; var EPSG3857 = { to: (_d = {}, _d[CRSTypes.WGS84] = ESPG3857ToWGS84, _d[CRSTypes.GCJ02] = compose(WGS84ToGCJ02, ESPG3857ToWGS84), _d[CRSTypes.BD09] = compose(GCJ02ToBD09, WGS84ToGCJ02, ESPG3857ToWGS84), _d[CRSTypes.BD09MC] = compose(BD09toBD09MC, GCJ02ToBD09, WGS84ToGCJ02, ESPG3857ToWGS84), _d), }; var BD09MC = { to: (_e = {}, _e[CRSTypes.WGS84] = compose(GCJ02ToWGS84, BD09ToGCJ02, BD09MCtoBD09), _e[CRSTypes.GCJ02] = compose(BD09ToGCJ02, BD09MCtoBD09), _e[CRSTypes.EPSG3857] = compose(WGS84ToEPSG3857, GCJ02ToWGS84, BD09ToGCJ02, BD09MCtoBD09), _e[CRSTypes.BD09] = BD09MCtoBD09, _e), }; var crsMap = { WGS84: WGS84, GCJ02: GCJ02, BD09: BD09, EPSG3857: EPSG3857, BD09MC: BD09MC, }; /** * transform * * @param {geojson|position|string} input * @returns {geojson|position} output */ /* eslint-disable no-param-reassign */ function transform(input, crsFrom, crsTo) { assert(!!input, 'The args[0] input coordinate is required'); assert(!!crsFrom, 'The args[1] original coordinate system is required'); assert(!!crsTo, 'The args[2] target coordinate system is required'); if (crsFrom === crsTo) return input; var from = crsMap[crsFrom]; assert(!!from, "Invalid original coordinate system: " + crsFrom); var to = from.to[crsTo]; assert(!!to, "Invalid target coordinate system: " + crsTo); var type = typeof input; assert(type === 'string' || type === 'object', "Invalid input coordinate type: " + type); if (type === 'string') { try { input = JSON.parse(input); } catch (e) { throw new Error("Invalid input coordinate: " + input); } } var isPosition = false; if (isArray(input)) { assert(input.length >= 2, "Invalid input coordinate: " + input); assert(isNumber(input[0]) && isNumber(input[1]), "Invalid input coordinate: " + input); input = input.map(Number); isPosition = true; } var convert = to; if (isPosition) return convert(input); // GeoJSON类型直接转换输入 coordEach(input, function (coord) { var _a; _a = convert(coord), coord[0] = _a[0], coord[1] = _a[1]; }); return input; } var exported = __assign(__assign({}, CRSTypes), { // 兼容原来gcoord.WGS84的使用方式 CRSTypes: CRSTypes, transform: transform }); /* harmony default export */ __webpack_exports__["default"] = (exported); //# sourceMappingURL=gcoord.esm.js.map /***/ }), /***/ "hBni": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; __webpack_require__("baa2"); var _icon = _interopRequireDefault(__webpack_require__("FC3+")); var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); var _dva = __webpack_require__("S6G3"); function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /** * 会话中的关闭按钮 */ var Close = exports.default = /*#__PURE__*/function (_Component) { function Close(props) { var _this; (0, _classCallCheck2.default)(this, Close); _this = _callSuper(this, Close, [props]); _this.state = { // visible: props.visible }; return _this; } (0, _inherits2.default)(Close, _Component); return (0, _createClass2.default)(Close, [{ key: "componentDidMount", value: function componentDidMount() {} }, { key: "componentWillReceiveProps", value: function componentWillReceiveProps(nextProps) { this.setState({ // visible: nextProps.visible }); } }, { key: "getFriendList", value: function getFriendList() { // tim.getFriendList().then(({ data: friendList }) => { // // this.$store.commit('upadteFriendList', friendList) // }); } }, { key: "render", value: function render() { var _this2 = this; return /*#__PURE__*/_react.default.createElement(_icon.default, { type: "close", style: { position: 'absolute', right: '10px' }, onClick: function onClick() { _this2.props.closeClick(); } }); } }]); }(_react.Component); /***/ }), /***/ "hGxU": /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _required = __webpack_require__("F61X"); var _required2 = _interopRequireDefault(_required); var _whitespace = __webpack_require__("jTu2"); var _whitespace2 = _interopRequireDefault(_whitespace); var _type = __webpack_require__("crNL"); var _type2 = _interopRequireDefault(_type); var _range = __webpack_require__("Vtxq"); var _range2 = _interopRequireDefault(_range); var _enum = __webpack_require__("RTRi"); var _enum2 = _interopRequireDefault(_enum); var _pattern = __webpack_require__("pmgl"); var _pattern2 = _interopRequireDefault(_pattern); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } exports['default'] = { required: _required2['default'], whitespace: _whitespace2['default'], type: _type2['default'], range: _range2['default'], 'enum': _enum2['default'], pattern: _pattern2['default'] }; /***/ }), /***/ "hIPy": /***/ (function(module, exports, __webpack_require__) { var isArray = __webpack_require__("NGEn"), isSymbol = __webpack_require__("6MiT"); /** Used to match property names within property paths. */ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/; /** * Checks if `value` is a property name and not a property path. * * @private * @param {*} value The value to check. * @param {Object} [object] The object to query keys on. * @returns {boolean} Returns `true` if `value` is a property name, else `false`. */ function isKey(value, object) { if (isArray(value)) { return false; } var type = typeof value; if (type == 'number' || type == 'symbol' || type == 'boolean' || value == null || isSymbol(value)) { return true; } return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || (object != null && value in Object(object)); } module.exports = isKey; /***/ }), /***/ "hK1P": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); // EXTERNAL MODULE: ./node_modules/react/index.js var react = __webpack_require__("GiK3"); var react_default = /*#__PURE__*/__webpack_require__.n(react); // EXTERNAL MODULE: ./node_modules/prop-types/index.js var prop_types = __webpack_require__("KSGD"); var prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types); // EXTERNAL MODULE: ./node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js var react_lifecycles_compat_es = __webpack_require__("R8mX"); // EXTERNAL MODULE: ./node_modules/antd/node_modules/classnames/index.js var classnames = __webpack_require__("kTQ8"); var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); // EXTERNAL MODULE: ./node_modules/rc-checkbox/es/index.js + 1 modules var es = __webpack_require__("jF3+"); // EXTERNAL MODULE: ./node_modules/shallowequal/index.js var shallowequal = __webpack_require__("Ngpj"); var shallowequal_default = /*#__PURE__*/__webpack_require__.n(shallowequal); // EXTERNAL MODULE: ./node_modules/antd/es/config-provider/index.js + 1 modules var config_provider = __webpack_require__("PmSq"); // EXTERNAL MODULE: ./node_modules/antd/es/_util/warning.js var warning = __webpack_require__("qGip"); // CONCATENATED MODULE: ./node_modules/antd/es/checkbox/Checkbox.js function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } 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; } function _extends() { _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; }; return _extends.apply(this, arguments); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } var __rest = this && this.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var Checkbox_Checkbox = /*#__PURE__*/function (_React$Component) { _inherits(Checkbox, _React$Component); var _super = _createSuper(Checkbox); function Checkbox() { var _this; _classCallCheck(this, Checkbox); _this = _super.apply(this, arguments); _this.saveCheckbox = function (node) { _this.rcCheckbox = node; }; _this.renderCheckbox = function (_ref) { var _classNames; var getPrefixCls = _ref.getPrefixCls; var _assertThisInitialize = _assertThisInitialized(_this), props = _assertThisInitialize.props, context = _assertThisInitialize.context; var customizePrefixCls = props.prefixCls, className = props.className, children = props.children, indeterminate = props.indeterminate, style = props.style, onMouseEnter = props.onMouseEnter, onMouseLeave = props.onMouseLeave, restProps = __rest(props, ["prefixCls", "className", "children", "indeterminate", "style", "onMouseEnter", "onMouseLeave"]); var checkboxGroup = context.checkboxGroup; var prefixCls = getPrefixCls('checkbox', customizePrefixCls); var checkboxProps = _extends({}, restProps); if (checkboxGroup) { checkboxProps.onChange = function () { if (restProps.onChange) { restProps.onChange.apply(restProps, arguments); } checkboxGroup.toggleOption({ label: children, value: props.value }); }; checkboxProps.name = checkboxGroup.name; checkboxProps.checked = checkboxGroup.value.indexOf(props.value) !== -1; checkboxProps.disabled = props.disabled || checkboxGroup.disabled; } var classString = classnames_default()(className, (_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-wrapper"), true), _defineProperty(_classNames, "".concat(prefixCls, "-wrapper-checked"), checkboxProps.checked), _defineProperty(_classNames, "".concat(prefixCls, "-wrapper-disabled"), checkboxProps.disabled), _classNames)); var checkboxClass = classnames_default()(_defineProperty({}, "".concat(prefixCls, "-indeterminate"), indeterminate)); return ( /*#__PURE__*/ // eslint-disable-next-line jsx-a11y/label-has-associated-control react["createElement"]("label", { className: classString, style: style, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave }, /*#__PURE__*/react["createElement"](es["a" /* default */], _extends({}, checkboxProps, { prefixCls: prefixCls, className: checkboxClass, ref: _this.saveCheckbox })), children !== undefined && /*#__PURE__*/react["createElement"]("span", null, children)) ); }; return _this; } _createClass(Checkbox, [{ key: "componentDidMount", value: function componentDidMount() { var value = this.props.value; var _ref2 = this.context || {}, _ref2$checkboxGroup = _ref2.checkboxGroup, checkboxGroup = _ref2$checkboxGroup === void 0 ? {} : _ref2$checkboxGroup; if (checkboxGroup.registerValue) { checkboxGroup.registerValue(value); } Object(warning["a" /* default */])('checked' in this.props || (this.context || {}).checkboxGroup || !('value' in this.props), 'Checkbox', '`value` is not validate prop, do you mean `checked`?'); } }, { key: "shouldComponentUpdate", value: function shouldComponentUpdate(nextProps, nextState, nextContext) { return !shallowequal_default()(this.props, nextProps) || !shallowequal_default()(this.state, nextState) || !shallowequal_default()(this.context.checkboxGroup, nextContext.checkboxGroup); } }, { key: "componentDidUpdate", value: function componentDidUpdate(_ref3) { var prevValue = _ref3.value; var value = this.props.value; var _ref4 = this.context || {}, _ref4$checkboxGroup = _ref4.checkboxGroup, checkboxGroup = _ref4$checkboxGroup === void 0 ? {} : _ref4$checkboxGroup; if (value !== prevValue && checkboxGroup.registerValue && checkboxGroup.cancelValue) { checkboxGroup.cancelValue(prevValue); checkboxGroup.registerValue(value); } } }, { key: "componentWillUnmount", value: function componentWillUnmount() { var value = this.props.value; var _ref5 = this.context || {}, _ref5$checkboxGroup = _ref5.checkboxGroup, checkboxGroup = _ref5$checkboxGroup === void 0 ? {} : _ref5$checkboxGroup; if (checkboxGroup.cancelValue) { checkboxGroup.cancelValue(value); } } }, { key: "focus", value: function focus() { this.rcCheckbox.focus(); } }, { key: "blur", value: function blur() { this.rcCheckbox.blur(); } }, { key: "render", value: function render() { return /*#__PURE__*/react["createElement"](config_provider["ConfigConsumer"], null, this.renderCheckbox); } }]); return Checkbox; }(react["Component"]); Checkbox_Checkbox.__ANT_CHECKBOX = true; Checkbox_Checkbox.defaultProps = { indeterminate: false }; Checkbox_Checkbox.contextTypes = { checkboxGroup: prop_types["any"] }; Object(react_lifecycles_compat_es["polyfill"])(Checkbox_Checkbox); /* harmony default export */ var checkbox_Checkbox = (Checkbox_Checkbox); // EXTERNAL MODULE: ./node_modules/omit.js/es/index.js var omit_js_es = __webpack_require__("JkBm"); // CONCATENATED MODULE: ./node_modules/antd/es/checkbox/Group.js function Group__typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { Group__typeof = function _typeof(obj) { return typeof obj; }; } else { Group__typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return Group__typeof(obj); } function Group__extends() { Group__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; }; return Group__extends.apply(this, arguments); } function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); } function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } function Group__classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function Group__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); } } function Group__createClass(Constructor, protoProps, staticProps) { if (protoProps) Group__defineProperties(Constructor.prototype, protoProps); if (staticProps) Group__defineProperties(Constructor, staticProps); return Constructor; } function Group__inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) Group__setPrototypeOf(subClass, superClass); } function Group__setPrototypeOf(o, p) { Group__setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return Group__setPrototypeOf(o, p); } function Group__createSuper(Derived) { var hasNativeReflectConstruct = Group__isNativeReflectConstruct(); return function _createSuperInternal() { var Super = Group__getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = Group__getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return Group__possibleConstructorReturn(this, result); }; } function Group__possibleConstructorReturn(self, call) { if (call && (Group__typeof(call) === "object" || typeof call === "function")) { return call; } return Group__assertThisInitialized(self); } function Group__assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function Group__isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } function Group__getPrototypeOf(o) { Group__getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return Group__getPrototypeOf(o); } var Group___rest = this && this.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var Group_CheckboxGroup = /*#__PURE__*/function (_React$Component) { Group__inherits(CheckboxGroup, _React$Component); var _super = Group__createSuper(CheckboxGroup); function CheckboxGroup(props) { var _this; Group__classCallCheck(this, CheckboxGroup); _this = _super.call(this, props); _this.cancelValue = function (value) { _this.setState(function (_ref) { var registeredValues = _ref.registeredValues; return { registeredValues: registeredValues.filter(function (val) { return val !== value; }) }; }); }; _this.registerValue = function (value) { _this.setState(function (_ref2) { var registeredValues = _ref2.registeredValues; return { registeredValues: [].concat(_toConsumableArray(registeredValues), [value]) }; }); }; _this.toggleOption = function (option) { var registeredValues = _this.state.registeredValues; var optionIndex = _this.state.value.indexOf(option.value); var value = _toConsumableArray(_this.state.value); if (optionIndex === -1) { value.push(option.value); } else { value.splice(optionIndex, 1); } if (!('value' in _this.props)) { _this.setState({ value: value }); } var onChange = _this.props.onChange; if (onChange) { var options = _this.getOptions(); onChange(value.filter(function (val) { return registeredValues.indexOf(val) !== -1; }).sort(function (a, b) { var indexA = options.findIndex(function (opt) { return opt.value === a; }); var indexB = options.findIndex(function (opt) { return opt.value === b; }); return indexA - indexB; })); } }; _this.renderGroup = function (_ref3) { var getPrefixCls = _ref3.getPrefixCls; var _assertThisInitialize = Group__assertThisInitialized(_this), props = _assertThisInitialize.props, state = _assertThisInitialize.state; var customizePrefixCls = props.prefixCls, className = props.className, style = props.style, options = props.options, restProps = Group___rest(props, ["prefixCls", "className", "style", "options"]); var prefixCls = getPrefixCls('checkbox', customizePrefixCls); var groupPrefixCls = "".concat(prefixCls, "-group"); var domProps = Object(omit_js_es["a" /* default */])(restProps, ['children', 'defaultValue', 'value', 'onChange', 'disabled']); var children = props.children; if (options && options.length > 0) { children = _this.getOptions().map(function (option) { return /*#__PURE__*/react["createElement"](checkbox_Checkbox, { prefixCls: prefixCls, key: option.value.toString(), disabled: 'disabled' in option ? option.disabled : props.disabled, value: option.value, checked: state.value.indexOf(option.value) !== -1, onChange: option.onChange, className: "".concat(groupPrefixCls, "-item") }, option.label); }); } var classString = classnames_default()(groupPrefixCls, className); return /*#__PURE__*/react["createElement"]("div", Group__extends({ className: classString, style: style }, domProps), children); }; _this.state = { value: props.value || props.defaultValue || [], registeredValues: [] }; return _this; } Group__createClass(CheckboxGroup, [{ key: "getChildContext", value: function getChildContext() { return { checkboxGroup: { toggleOption: this.toggleOption, value: this.state.value, disabled: this.props.disabled, name: this.props.name, // https://github.com/ant-design/ant-design/issues/16376 registerValue: this.registerValue, cancelValue: this.cancelValue } }; } }, { key: "shouldComponentUpdate", value: function shouldComponentUpdate(nextProps, nextState) { return !shallowequal_default()(this.props, nextProps) || !shallowequal_default()(this.state, nextState); } }, { key: "getOptions", value: function getOptions() { var options = this.props.options; // https://github.com/Microsoft/TypeScript/issues/7960 return options.map(function (option) { if (typeof option === 'string') { return { label: option, value: option }; } return option; }); } }, { key: "render", value: function render() { return /*#__PURE__*/react["createElement"](config_provider["ConfigConsumer"], null, this.renderGroup); } }], [{ key: "getDerivedStateFromProps", value: function getDerivedStateFromProps(nextProps) { if ('value' in nextProps) { return { value: nextProps.value || [] }; } return null; } }]); return CheckboxGroup; }(react["Component"]); Group_CheckboxGroup.defaultProps = { options: [] }; Group_CheckboxGroup.propTypes = { defaultValue: prop_types["array"], value: prop_types["array"], options: prop_types["array"].isRequired, onChange: prop_types["func"] }; Group_CheckboxGroup.childContextTypes = { checkboxGroup: prop_types["any"] }; Object(react_lifecycles_compat_es["polyfill"])(Group_CheckboxGroup); /* harmony default export */ var Group = (Group_CheckboxGroup); // CONCATENATED MODULE: ./node_modules/antd/es/checkbox/index.js checkbox_Checkbox.Group = Group; /* harmony default export */ var es_checkbox = __webpack_exports__["default"] = (checkbox_Checkbox); /***/ }), /***/ "hLDL": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAiCAYAAAC0nUK+AAAAAXNSR0IArs4c6QAABJ9JREFUSA2lVm9oW1UUP+e9l0SztqYvbdE4CqPC2Jj9YMt0g7Wk1W1+sCD4Z8Oh7IN1Ba2gbmsjYgW7NfgH/TR1YHUoiGMTLLMYm8rWwpS1VWRMcdMhm6Wxts0SF9OXvHc952Wve0le1mYeeO/e8+937zv3nHMfwg1o68BCS9YwHgIQQRQQAEC/QDFP88sg4UkZpS+/3u8bQySJA6GDDNr7F4IAxoAAsdFJb5chwhkQ8v7oy9Xf2uU8zwPvE0I6dXCuHwT0sLK2UoL2DW647y43BKplqLoVIfGvgOkFHb67oEH0rAazSYNNCQjf2BJSe/oQcwJTZqrow4XA+w/Of07jIy4ZYHerFx5uvgXcSt7616xzg5YV8MVEGgZPpiCjMxoeb+lVH7UWIJgcjXu6XyPgLp8XIbyzCoLrPSBLpYHZi/UbVrvgnjUuOH1eg3RGrLs0tqj8PhoeZb3pvXVgbnPWgHGXJPDtXVWw/k4X68qic39m4IVPEpAxUFCIWqMhdUxiBN0QFGeBHIqbAWYM9mN/xqEIvM4yfCAcb9az2TN8eEe6fEUxfu7jBPCuCqm+RobBTl+emM/gyUPx3CErcK+8pm3vM2TR2tHkgY0NbtP4/IwOExczcOKHRRj/VcsDsJgrKQFaFuDvfwzeLPgrJPMMFlIGnL2cBTRwRqLsb2cHTjcmPvXuI1dg290eeH77KlPGr2jIv/RYwqeDXtOO7c1sIYWFw7gS1VY9G3MeM+mUpfx55RDbsx+ThUOpUq8AijoqGrNAcurcu/3AnJ2FQp6VTjIuNCYEUauAwKt0xB6uPH/F9bzmMDBZABbvJLNsWMc4JhGuQpMYPSqXNB+KRXYHlhXypWSMw0RnPC1RWKaY4V7B9OqxpDmW+7L8LBwqpSmKuTQMwniCm9BTW7wQ3lFZLu6SPR8s45iEYkhyrxJD1HAWuLtxE/o/xP5ml0SYlV3qsDTc7U9QaN5iUO5uTtW4kgXZj/1zhAcie/GqeYKK4n+Hms3PXAivHE2WvQADsx/7U75NeSrUQ7zIUu5tDyfWarpGtwpU3mw/p1vpL9mDzZEX/ZfywJlpG5h/EA0xRF3NLNfybiJIyQhtkVDN94zFtLTzHAtAt1GnYRjvW/zKRsyCjB2jPeqw3f561VyTjvSqH1D2vGk3Wm5OF1JnITD7FIGzsGWT2ku/C6d5viwhHh4J+Qed7BzB+4KY9bilnRS1uJOTJaMN/FR/h9pt8YWjIzgbffVS9R8o4bOFDhZPmbEog+vxj3ZjycorCc4g0V71U9rdNxZg3ojYHwlV/ZInK2BuCM62bkXuoiFvd1xwaoMaLsAqYpcFH97n+43+CwfsnrIs7Tn6GDpfrjbDojy36aCpqcmbyWRUuG1dXc22dyOAil9oiVOzxzr2SJKUdLlc85OTk1ZDsbua89zFWSQGaGxsrEun0w26rlfoqRh6Vm/WFG/dpuS5z3rS0xNJltPCtYFAQI/FYnSbFVPJsFCV3m43nx/Zd1yLX/ww+ePhC3Z5oZ1dVxKcPnvGbmho8ezs0K737DKeF9rZ9SuKOe2ukpqZm0aZwHRKT20lMf8PIqT0gVhuONUAAAAASUVORK5CYII=" /***/ }), /***/ "hMTp": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return LayoutContext; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__("GiK3"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__("kTQ8"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ant_design_create_react_context__ = __webpack_require__("83O8"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ant_design_create_react_context___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__ant_design_create_react_context__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__config_provider__ = __webpack_require__("PmSq"); function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } 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; } function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); } function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } function _extends() { _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; }; return _extends.apply(this, arguments); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } var __rest = this && this.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var LayoutContext = __WEBPACK_IMPORTED_MODULE_2__ant_design_create_react_context___default()({ siderHook: { addSider: function addSider() { return null; }, removeSider: function removeSider() { return null; } } }); function generator(_ref) { var suffixCls = _ref.suffixCls, tagName = _ref.tagName, displayName = _ref.displayName; return function (BasicComponent) { var _a; return _a = /*#__PURE__*/function (_React$Component) { _inherits(Adapter, _React$Component); var _super = _createSuper(Adapter); function Adapter() { var _this; _classCallCheck(this, Adapter); _this = _super.apply(this, arguments); _this.renderComponent = function (_ref2) { var getPrefixCls = _ref2.getPrefixCls; var customizePrefixCls = _this.props.prefixCls; var prefixCls = getPrefixCls(suffixCls, customizePrefixCls); return /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createElement"](BasicComponent, _extends({ prefixCls: prefixCls, tagName: tagName }, _this.props)); }; return _this; } _createClass(Adapter, [{ key: "render", value: function render() { return /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createElement"](__WEBPACK_IMPORTED_MODULE_3__config_provider__["ConfigConsumer"], null, this.renderComponent); } }]); return Adapter; }(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]), _a.displayName = displayName, _a; }; } var Basic = function Basic(props) { var prefixCls = props.prefixCls, className = props.className, children = props.children, tagName = props.tagName, others = __rest(props, ["prefixCls", "className", "children", "tagName"]); var classString = __WEBPACK_IMPORTED_MODULE_1_classnames___default()(className, prefixCls); return /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createElement"](tagName, _extends({ className: classString }, others), children); }; var BasicLayout = /*#__PURE__*/function (_React$Component2) { _inherits(BasicLayout, _React$Component2); var _super2 = _createSuper(BasicLayout); function BasicLayout() { var _this2; _classCallCheck(this, BasicLayout); _this2 = _super2.apply(this, arguments); _this2.state = { siders: [] }; return _this2; } _createClass(BasicLayout, [{ key: "getSiderHook", value: function getSiderHook() { var _this3 = this; return { addSider: function addSider(id) { _this3.setState(function (state) { return { siders: [].concat(_toConsumableArray(state.siders), [id]) }; }); }, removeSider: function removeSider(id) { _this3.setState(function (state) { return { siders: state.siders.filter(function (currentId) { return currentId !== id; }) }; }); } }; } }, { key: "render", value: function render() { var _a = this.props, prefixCls = _a.prefixCls, className = _a.className, children = _a.children, hasSider = _a.hasSider, Tag = _a.tagName, others = __rest(_a, ["prefixCls", "className", "children", "hasSider", "tagName"]); var classString = __WEBPACK_IMPORTED_MODULE_1_classnames___default()(className, prefixCls, _defineProperty({}, "".concat(prefixCls, "-has-sider"), typeof hasSider === 'boolean' ? hasSider : this.state.siders.length > 0)); return /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createElement"](LayoutContext.Provider, { value: { siderHook: this.getSiderHook() } }, /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createElement"](Tag, _extends({ className: classString }, others), children)); } }]); return BasicLayout; }(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]); var Layout = generator({ suffixCls: 'layout', tagName: 'section', displayName: 'Layout' })(BasicLayout); var Header = generator({ suffixCls: 'layout-header', tagName: 'header', displayName: 'Header' })(Basic); var Footer = generator({ suffixCls: 'layout-footer', tagName: 'footer', displayName: 'Footer' })(Basic); var Content = generator({ suffixCls: 'layout-content', tagName: 'main', displayName: 'Content' })(Basic); Layout.Header = Header; Layout.Footer = Footer; Layout.Content = Content; /* harmony default export */ __webpack_exports__["b"] = (Layout); /***/ }), /***/ "hQF4": /***/ (function(module, exports) { // removed by extract-text-webpack-plugin /***/ }), /***/ "hRBA": /***/ (function(module, exports) { function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } module.exports = _taggedTemplateLiteral; /***/ }), /***/ "hf4R": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAARCAYAAADUryzEAAAAAXNSR0IArs4c6QAAAgFJREFUOE+dk01IVGEUhp93RiQR750WQRC1KYNWUc2mjW1rEUGQUouIUAjCnJmIaFFpm6BI780kishoUbQNoU0Elhuh2gT9QEHgpuiHmXsFDWe+E3d0asxBpW95fp7v5ZzziiXP5PWRBbY5aEmlmYqKvOCu4qW1oPpgW86OCy4Cm+rjBr8kRl2ZC9PD+lafmwf0W5NX5D5wGJhAjCjNZFnMpMq0CzrN6BF8bUqz7+c1va1BqgAvbyFGr4mz8ZCuNpKaKdj2imNMULY5svGIfiR1yhRsh3O8xAijUIVGzbVYUltxTErcjIbUVwW05e22jM6omY1caTyoeqiftztmdEVF1nFPs/Jy9hF4FQXqWu73Ws7L216MJ87YMx3qeaJgBkcQhzq3GkBbwbbK8QE4EgV6mCj4DjyIAp1aDWBhZq/NOBCHeiw/Z+MGrVGg5HhWfF7OTgI3VGFLaVifEgW9QGiOjvi6JpYlHLK0t4E3iNloSDurW+CYrfEyvAfKrsLufy+tHujlLAD6LMX+eFBj8wDAz1vWHOOIL4KeUqBn9Y2tZ2x9eo7BhUtFxmhpLd30y/3xgn/adlmFR8Bm4B0wCcwA7QYdgKGkhWbEQOKNkk/3IjPRb81+kaMGBxM3Ai3AlMRTGbeKgT5XTz9n54FLgsuLASvu4G+Bn7cT5pj+b0AN9RsyTMpveRFsfAAAAABJRU5ErkJggg==" /***/ }), /***/ "hfjK": /***/ (function(module, exports) { module.exports = "data:image/png;base64,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" /***/ }), /***/ "hwng": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAEBJREFUOE9jZKAQMML08xX8v8/AwKBApHkPPk1gVASppZ4BRNqMoQzugmFgwGgskBuJSCmRXCOol5QpjkZyvQAA4pweERMlTbUAAAAASUVORK5CYII=" /***/ }), /***/ "i9CR": /***/ (function(module, exports) { module.exports = "data:image/png;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQkUDQsNFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBT/wAARCAAiABcDASIAAhEBAxEB/8QAGQAAAwEBAQAAAAAAAAAAAAAAAAcIBQYC/8QALBAAAgEDAwMCBAcAAAAAAAAAAQIDBAUGABESByExQVEIExQyFSJCcYGCkf/EABkBAAIDAQAAAAAAAAAAAAAAAAAEAwUGB//EACYRAQABAgYCAgIDAAAAAAAAAAERAgMABBIhMUEFURUiE3GR8PH/2gAMAwEAAhEDEQA/ALwuVffes+WXWy2a61GP4dZpjSV9yoTxqa6oH3xRP+hV3AJ9/cHtjR9EsDkzSey0UNTS1kFMskl8pshb62OpYkrEYixPIorPy222HjXGW/qbd+l/w22+4WZYDe0v9RQ3I1EZk4SF5nYkbjvsIxuffSXhGW4zj2MZ98mlFKtxlNNWsimaecMWJmP3ON1YDkfQ+N+/Usp4zMOuizdLVAtFMMNVRO7ETMSDJDxBDib+dtGmq5b11IVVdwPRzET1G57cV9h+SX3As0hwnLbh+L0tbE89lvsoCyTBBu8M3oXUd+XqPPnYGlN1IzC79RejHTm5SIi5bcLhUyRLTIUJjjWdHKjffYqIyf30arfgac6flu3KbdYpUdLSopxsx1tM4b+Ucu6KKGunZHsEGH9T/GOy6lxXzoJk9fneN0wuWM3SRXvVpZioimJ2E6EA8eRPc7Hue4II451R8cGMrby8GP3aSu49oZGiSLf25hidv66oO+JQy2esiuaJLb5ImjnjkXkrow2Kkeu++2oywXotbaDrZUx3MSz4pbXFXA0se/1CkkxIw9diDy9+BG35tQeOu+MztiurydP3tkyKNQbA+02J5SPWJc5bzmWu0mSfrW8ROl5X9d/7h6dIsZvua35epOZxrBXTQGKz2pQeFFTt5cg9+bg+vfYnfyAppyRSJNEkkbBo3UMpHgg+NGsnm81VmrmtIDYDgOg/u7vi+sWSxRpGXle19481USTU0qSIroykFWG4P8aV1uponyERtEjR89uBUEf5o0aSwxhqqoVQAAAOwA9NGjRowY//2Q==" /***/ }), /***/ "iF7L": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _toConsumableArray2 = _interopRequireDefault(__webpack_require__("V4Os")); __webpack_require__("UQ5M"); var _message3 = _interopRequireDefault(__webpack_require__("/qCn")); var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); var _dva = __webpack_require__("S6G3"); var _config = __webpack_require__("bzuE"); __webpack_require__("RKq/"); var _SideBar = _interopRequireDefault(__webpack_require__("8mUZ")); var _CurrentConversation = _interopRequireDefault(__webpack_require__("lc4m")); var _imInitialize = _interopRequireDefault(__webpack_require__("cLc/")); var _timJsSdk = _interopRequireDefault(__webpack_require__("B5T/")); var _index = _interopRequireDefault(__webpack_require__("lVK7")); var _router = __webpack_require__("7xWd"); var _modal = _interopRequireDefault(__webpack_require__("ezvz")); var _dec, _class; /** * IM可视化视图 */ // import axios from 'axios'; function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } var IM = exports.default = (_dec = (0, _dva.connect)(function (state) { return { adminPhone: state.global.companyInfo.adminPhone, imIsLogin: state.global.imIsLogin, imSig: state.global.imSig, username: state.user.currentUser.userName, currentConversation: state.im.currentConversation, currentMessageList: state.im.currentMessageList, mapStyle: state.command.mapStyle }; }), _dec(_class = /*#__PURE__*/function (_Component) { function IM(props, context) { var _this; (0, _classCallCheck2.default)(this, IM); _this = _callSuper(this, IM, [props, context]); _this.state = { visible: props.visible, // creatType: props.creatType, // userID: props.userID, conversationID: props.conversationID }; _this.isError = false; return _this; } (0, _inherits2.default)(IM, _Component); return (0, _createClass2.default)(IM, [{ key: "componentDidMount", value: function componentDidMount() { // 初始化监听器 this.initListener(); } }, { key: "componentWillReceiveProps", value: function componentWillReceiveProps(nextProps) { this.setState({ visible: nextProps.visible, // creatType: nextProps.creatType, // userID: nextProps.userID, conversationID: nextProps.conversationID }); if (this.props.imIsLogin && nextProps.visible) { // this.createPerson(nextProps.userID);//创建的是个人对个人 // this.createGroup();//创建的是普通的群聊模式,type没有设置,默认是私有群 // this.addFriend() } } }, { key: "initListener", value: function initListener() { // if (!!!this.props.imIsLogin) { // console.log('重新请求'); // if (this.props.username) { // this.props.dispatch({ // type: `global/imLogin`, // payload: { // username: this.props.username // } // }); // // this.getUsername() // } else { // //先去请求username,后续补充 // setTimeout(function() { // console.log(this.props); // // this.getUsername() // }, 2000); // } // } // 登录成功后会触发 SDK_READY 事件,该事件触发后,可正常使用 SDK 接口 _imInitialize.default.on(_timJsSdk.default.EVENT.SDK_READY, this.onReadyStateUpdate, this); // SDK NOT READT _imInitialize.default.on(_timJsSdk.default.EVENT.SDK_NOT_READY, this.onReadyStateUpdate, this); // 被踢出 _imInitialize.default.on(_timJsSdk.default.EVENT.KICKED_OUT, function () { console.log("被剔出"); var dispatch = _index.default.dispatch; // window.close(); // dispatch(routerRedux.push("/user/logOn")); // this.$message.error('被踢出,请重新登录。') // this.$store.commit('toggleIsLogin', false) // this.$store.commit('reset') (0, _modal.default)(/*#__PURE__*/_react.default.createElement("span", { style: { color: 'orange' } }, "\u60A8\u7684\u8D26\u53F7\u5728\u5176\u4ED6\u5730\u65B9\u767B\u5F55\u4E86\uFF0C\u8BF7\u91CD\u65B0\u767B\u5F55\u4F01\u4E1A\u540E\u53F0\u91CD\u65B0\u8FDB\u5165"), '', []); }); // SDK内部出错 _imInitialize.default.on(_timJsSdk.default.EVENT.ERROR, this.onError, this); // 收到新消息 _imInitialize.default.on(_timJsSdk.default.EVENT.MESSAGE_RECEIVED, this.onReceiveMessage, this); // 会话列表更新 _imInitialize.default.on(_timJsSdk.default.EVENT.CONVERSATION_LIST_UPDATED, this.updateConversationList, this); // 群组列表更新 _imInitialize.default.on(_timJsSdk.default.EVENT.GROUP_LIST_UPDATED, function (event) { // this.$store.commit('updateGroupList', event.data) // console.log(event.data); }); //如果im成功的时候,在创建会话 } //创建个人会话 // createPerson(userID) { // tim.getConversationProfile(`C2C${userID}`).then(({ data }) => { // // // 3.1 更新当前会话 // this.props.dispatch({ // type: `im/updateCurrentConversation`, // payload: data.conversation // }); // // // 3.2 获取消息列表 // // context.dispatch('getMessageList', conversationID); // // return Promise.resolve(); // }); // } //创建私有群聊 // createGroup() { // let options = { // // groupID:'122', // name: '新建第二个群', // type: TIM.TYPES.GRP_PRIVATE // // memberList:[{userID:'15985856758'},{userID:'19010100002'}] // // ...this.form, // // memberList: this.form.memberList.map(userID => ({ userID })) // }; // // if (['Private', 'AVChatRoom'].includes(this.form.type)) { // // delete options.joinOption // // } // tim.createGroup(options).then(() => { // // this.closeCreateGroupModel() // }); // } //sdk状态的改变,获取当前的用户信息 }, { key: "onReadyStateUpdate", value: function onReadyStateUpdate(_ref) { var _this2 = this; var name = _ref.name; var isSDKReady = name === _timJsSdk.default.EVENT.SDK_READY ? true : false; this.props.dispatch({ type: 'im/toggleIsSDKReady', payload: isSDKReady }); if (isSDKReady) { _imInitialize.default.getConversationList(); _imInitialize.default.getMyProfile().then(function (_ref2) { var data = _ref2.data; _this2.props.dispatch({ type: "im/updateCurrentUserProfile", payload: data }); // this.$store.commit('updateCurrentUserProfile', data) }); // this.$store.dispatch('getBlacklist') } } //更新列表 }, { key: "updateConversationList", value: function updateConversationList(event) { this.props.dispatch({ type: "im/conversationList", payload: event.data }); } /**sdk出错 */ }, { key: "onError", value: function onError(e) { // console.log(e); if (e.data.code === 2501) { _message3.default.warning({ content: "该人员未完成基础信息初始化,无法进行指挥调度", key: e.data.code }); } this.props.closeClick(); console.error("IM-sdk出错", e); } //接收新消息 }, { key: "onReceiveMessage", value: function onReceiveMessage(_ref3) { var messageList = _ref3.data; this.handleAt(messageList); this.pushCurrentMessageList(messageList[0]); } /** * 处理 @ 我的消息 * @param {Message[]} messageList */ }, { key: "handleAt", value: function handleAt(messageList) { // 筛选有 @ 符号的文本消息 var atTextMessageList = messageList.filter(function (message) { return message.type === _timJsSdk.default.TYPES.MSG_TEXT && message.payload.text.includes("@"); }); for (var i = 0; i < atTextMessageList.length; i++) { var _message2 = atTextMessageList[i]; var matched = _message2.payload.text.match(/@\w+/g); if (!matched) { continue; } // @ 我的 // if (matched.includes(`@${this.currentUserProfile.userID}`)) { // // 当前页面不可见时,调用window.Notification接口,系统级别通知。 // if (document.hidden) { // this.notifyMe(message) // } // Notification({ // title: `有人在群${message.conversationID.slice(5)}提到了你`, // message: message.payload.text, // duration: 3000 // }) // this.$bus.$emit('new-messsage-at-me', { // data: { conversationID: message.conversationID } // }) // } } } }, { key: "pushCurrentMessageList", value: function pushCurrentMessageList(messageData) { if (!this.props.currentConversation.conversationID) { return; } if (Array.isArray(messageData)) { // console.log(message); // 筛选出当前会话的消息 // const result = messageData.filter( // item => // item.conversationID === this.props.currentConversation.conversationID // ); // this.props.dispatch({ // type: 'im/pushCurrentMessageList', // payload: [...this.props.currentMessageList, messageData] // }); // state.currentMessageList = [...state.currentMessageList, ...result] // console.log(result); } else if (messageData.conversationID === this.props.currentConversation.conversationID) { this.props.dispatch({ type: "im/pushCurrentMessageList", payload: [].concat((0, _toConsumableArray2.default)(this.props.currentMessageList), [messageData]) }); } } }, { key: "render", value: function render() { var mapStyle = this.props.mapStyle; return /*#__PURE__*/_react.default.createElement("div", { className: mapStyle }, /*#__PURE__*/_react.default.createElement("div", { id: "tim-demo-wrapper", style: { // position: "absolute", background: "#fff", top: "54px", right: "0", // height: "calc(100vh - 54px)", overflow: "auto" // display: this.state.visible ? "flex" : "none", } }, /*#__PURE__*/_react.default.createElement(_SideBar.default, { conversationID: this.state.conversationID // closeClick={() => { // this.props.closeClick(); // }} }))); } }]); }(_react.Component)) || _class); /***/ }), /***/ "iSN0": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); var _index = _interopRequireDefault(__webpack_require__("gzuX")); var _classnames = _interopRequireDefault(__webpack_require__("HW6M")); var _dva = __webpack_require__("S6G3"); var _dec, _class; /** * 驻勤点列表子Card * UI 组件 */ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } var AttendanceItem = exports.default = (_dec = (0, _dva.connect)(function (state) { return { //地图数据 mapStyle: state.command.mapStyle, selectComponyList: state.command.selectComponyList }; }), _dec(_class = /*#__PURE__*/function (_Component) { function AttendanceItem(props) { var _this; (0, _classCallCheck2.default)(this, AttendanceItem); _this = _callSuper(this, AttendanceItem, [props]); _this.state = { companyList: [] }; return _this; } (0, _inherits2.default)(AttendanceItem, _Component); return (0, _createClass2.default)(AttendanceItem, [{ key: "componentDidMount", value: function componentDidMount() {} }, { key: "render", value: function render() { var _this$props = this.props, item = _this$props.item, onChangeAttendance = _this$props.onChangeAttendance; var clsString = (0, _classnames.default)(_index.default.attendance_item); return /*#__PURE__*/_react.default.createElement("div", { className: clsString, onClick: onChangeAttendance.bind(this, item) }, /*#__PURE__*/_react.default.createElement("div", { className: _index.default.title }, item.companyName), /*#__PURE__*/_react.default.createElement("div", { className: _index.default.name }, "\u9A7B\u52E4\u70B9\u540D\u79F0:", /*#__PURE__*/_react.default.createElement("div", { className: _index.default.sub_name }, item.taskName)), /*#__PURE__*/_react.default.createElement("div", { className: _index.default.name }, "\u9A7B\u52E4\u70B9\u5730\u5740:", /*#__PURE__*/_react.default.createElement("div", { className: _index.default.sub_name }, item.address + item.taskAddress))); } }]); }(_react.Component)) || _class); /***/ }), /***/ "iVvL": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = getDataOrAriaProps; function getDataOrAriaProps(props) { return Object.keys(props).reduce(function (prev, key) { if ((key.substr(0, 5) === 'data-' || key.substr(0, 5) === 'aria-' || key === 'role') && key.substr(0, 7) !== 'data-__') { prev[key] = props[key]; } return prev; }, {}); } /***/ }), /***/ "iWlI": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; __webpack_require__("/m1I"); var _tooltip = _interopRequireDefault(__webpack_require__("O6j2")); __webpack_require__("tIHZ"); var _popover = _interopRequireDefault(__webpack_require__("tjvM")); var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); var _dva = __webpack_require__("S6G3"); var _reactDom = _interopRequireDefault(__webpack_require__("O27J")); var _dec, _class; /** * 切换地图按钮 */ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } var SwitchMap = exports.default = (_dec = (0, _dva.connect)(function (state) { return { policeData: state.command.policeData, mapStyle: state.command.mapStyle, layoutAuthority: state.command.layoutAuthority }; }), _dec(_class = /*#__PURE__*/function (_Component) { function SwitchMap(props) { var _this; (0, _classCallCheck2.default)(this, SwitchMap); _this = _callSuper(this, SwitchMap, [props]); _this.hide = function () { _this.setState({ visible: false }); }; _this._handleVisibleChange = function (visible) { _this.setState({ visible: visible }); }; _this.state = { layerStatus: props.layerStatus, visible: false, mapList: [] }; return _this; } (0, _inherits2.default)(SwitchMap, _Component); return (0, _createClass2.default)(SwitchMap, [{ key: "componentDidMount", value: function componentDidMount() {} }, { key: "componentWillReceiveProps", value: function componentWillReceiveProps(nextProps) { if (nextProps.layerStatus !== this.state.layerStatus) { //如果当前是警保联动图层,被切换后,要先清除当前警保联动图层的打点数据 switch (this.state.layerStatus) { case 'police': //清空警报联动的所有打点信息 if (this.props.policeData.tab1 || this.props.policeData.tab2) { var allMarks = []; if (this.props.policeData.tab1) { for (var key in this.props.policeData.tab1) { allMarks = allMarks.concat(this.props.policeData.tab1[key]); } } if (this.props.policeData.tab2) { for (var _key in this.props.policeData.tab2) { allMarks = allMarks.concat(this.props.policeData.tab2[_key]); } } this.props._thisGIS.state.policeMap.remove(allMarks); this.props.dispatch({ type: "command/fetchPoliceData", payload: { options: 'clear' } }); } break; } this.setState({ layerStatus: nextProps.layerStatus }); } } }, { key: "_onSwitch", value: function _onSwitch(param) { var onSwitchMap = this.props.onSwitchMap; this.hide(); onSwitchMap && onSwitchMap(param); } }, { key: "render", value: function render() { var layerStatus = this.state.layerStatus; var _this$props = this.props, mapStyle = _this$props.mapStyle, layoutAuthority = _this$props.layoutAuthority; var content = /*#__PURE__*/_react.default.createElement("div", null, layoutAuthority.attendanceMapShow == '是' && /*#__PURE__*/_react.default.createElement("div", { className: layerStatus == 'attendance' ? 'map-switch selectedMap' : 'map-switch', onClick: this._onSwitch.bind(this, 'attendance') }, layoutAuthority.basisLayer ? layoutAuthority.basisLayerName : layoutAuthority.defaultLayerName), layoutAuthority.aPictureMapShow == '是' && /*#__PURE__*/_react.default.createElement("div", { className: layerStatus == 'aPicture' ? 'map-switch selectedMap' : 'map-switch', onClick: this._onSwitch.bind(this, 'aPicture') }, layoutAuthority.customLayerName), layoutAuthority.additionalLayer == '是' && layoutAuthority.additionalType == '南宁海康押运' && /*#__PURE__*/_react.default.createElement("div", { className: layerStatus == 'nanNing' ? 'map-switch selectedMap' : 'map-switch', onClick: this._onSwitch.bind(this, 'nanNing') }, layoutAuthority.additionalName ? layoutAuthority.additionalName : '南宁武装押运管控')); return /*#__PURE__*/_react.default.createElement("div", { className: "switch map" }, /*#__PURE__*/_react.default.createElement(_tooltip.default, { title: "\u56FE\u5C42\u5207\u6362" }, /*#__PURE__*/_react.default.createElement("div", { className: "layer-btn" }, /*#__PURE__*/_react.default.createElement(_popover.default, { placement: "bottom", content: content, title: "", trigger: "click", visible: this.state.visible, onVisibleChange: this._handleVisibleChange }, /*#__PURE__*/_react.default.createElement("img", { className: "layer-img", src: this.state.visible ? __webpack_require__("Ap9u") : mapStyle == 'dark' ? __webpack_require__("yO0l") : __webpack_require__("4r4O") }))))); } }]); }(_react.Component)) || _class); /***/ }), /***/ "ikeG": /***/ (function(module, exports) { module.exports = "data:image/png;base64,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" /***/ }), /***/ "isWq": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/extends.js var helpers_extends = __webpack_require__("Dd8w"); var extends_default = /*#__PURE__*/__webpack_require__.n(helpers_extends); // EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/classCallCheck.js var classCallCheck = __webpack_require__("Zrlr"); var classCallCheck_default = /*#__PURE__*/__webpack_require__.n(classCallCheck); // EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/possibleConstructorReturn.js var possibleConstructorReturn = __webpack_require__("zwoO"); var possibleConstructorReturn_default = /*#__PURE__*/__webpack_require__.n(possibleConstructorReturn); // EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/inherits.js var inherits = __webpack_require__("Pf15"); var inherits_default = /*#__PURE__*/__webpack_require__.n(inherits); // EXTERNAL MODULE: ./node_modules/react/index.js var react = __webpack_require__("GiK3"); var react_default = /*#__PURE__*/__webpack_require__.n(react); // EXTERNAL MODULE: ./node_modules/prop-types/index.js var prop_types = __webpack_require__("KSGD"); var prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types); // EXTERNAL MODULE: ./node_modules/react-dom/index.js var react_dom = __webpack_require__("O27J"); var react_dom_default = /*#__PURE__*/__webpack_require__.n(react_dom); // EXTERNAL MODULE: ./node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js var react_lifecycles_compat_es = __webpack_require__("R8mX"); // EXTERNAL MODULE: ./node_modules/rc-util/es/Dom/contains.js var contains = __webpack_require__("rPPc"); // EXTERNAL MODULE: ./node_modules/rc-util/es/Dom/addEventListener.js var addEventListener = __webpack_require__("iQU3"); // EXTERNAL MODULE: ./node_modules/rc-util/es/ContainerRender.js var ContainerRender = __webpack_require__("gIwr"); // EXTERNAL MODULE: ./node_modules/rc-util/es/Portal.js var Portal = __webpack_require__("nxUK"); // EXTERNAL MODULE: ./node_modules/classnames/index.js var classnames = __webpack_require__("HW6M"); var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); // CONCATENATED MODULE: ./node_modules/rc-trigger/es/utils.js function isPointsEq(a1, a2, isAlignPoint) { if (isAlignPoint) { return a1[0] === a2[0]; } return a1[0] === a2[0] && a1[1] === a2[1]; } function getAlignFromPlacement(builtinPlacements, placementStr, align) { var baseAlign = builtinPlacements[placementStr] || {}; return extends_default()({}, baseAlign, align); } function getAlignPopupClassName(builtinPlacements, prefixCls, align, isAlignPoint) { var points = align.points; for (var placement in builtinPlacements) { if (builtinPlacements.hasOwnProperty(placement)) { if (isPointsEq(builtinPlacements[placement].points, points, isAlignPoint)) { return prefixCls + '-placement-' + placement; } } } return ''; } function saveRef(name, component) { this[name] = component; } // EXTERNAL MODULE: ./node_modules/rc-align/es/index.js + 3 modules var es = __webpack_require__("5Z4L"); // EXTERNAL MODULE: ./node_modules/rc-animate/es/Animate.js + 4 modules var Animate = __webpack_require__("8aSS"); // EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/objectWithoutProperties.js var objectWithoutProperties = __webpack_require__("+6Bu"); var objectWithoutProperties_default = /*#__PURE__*/__webpack_require__.n(objectWithoutProperties); // CONCATENATED MODULE: ./node_modules/rc-trigger/es/LazyRenderBox.js var LazyRenderBox_LazyRenderBox = function (_Component) { inherits_default()(LazyRenderBox, _Component); function LazyRenderBox() { classCallCheck_default()(this, LazyRenderBox); return possibleConstructorReturn_default()(this, _Component.apply(this, arguments)); } LazyRenderBox.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps) { return nextProps.hiddenClassName || nextProps.visible; }; LazyRenderBox.prototype.render = function render() { var _props = this.props, hiddenClassName = _props.hiddenClassName, visible = _props.visible, props = objectWithoutProperties_default()(_props, ['hiddenClassName', 'visible']); if (hiddenClassName || react_default.a.Children.count(props.children) > 1) { if (!visible && hiddenClassName) { props.className += ' ' + hiddenClassName; } return react_default.a.createElement('div', props); } return react_default.a.Children.only(props.children); }; return LazyRenderBox; }(react["Component"]); LazyRenderBox_LazyRenderBox.propTypes = { children: prop_types_default.a.any, className: prop_types_default.a.string, visible: prop_types_default.a.bool, hiddenClassName: prop_types_default.a.string }; /* harmony default export */ var es_LazyRenderBox = (LazyRenderBox_LazyRenderBox); // CONCATENATED MODULE: ./node_modules/rc-trigger/es/PopupInner.js var PopupInner_PopupInner = function (_Component) { inherits_default()(PopupInner, _Component); function PopupInner() { classCallCheck_default()(this, PopupInner); return possibleConstructorReturn_default()(this, _Component.apply(this, arguments)); } PopupInner.prototype.render = function render() { var props = this.props; var className = props.className; if (!props.visible) { className += ' ' + props.hiddenClassName; } return react_default.a.createElement( 'div', { className: className, onMouseEnter: props.onMouseEnter, onMouseLeave: props.onMouseLeave, onMouseDown: props.onMouseDown, onTouchStart: props.onTouchStart, style: props.style }, react_default.a.createElement( es_LazyRenderBox, { className: props.prefixCls + '-content', visible: props.visible }, props.children ) ); }; return PopupInner; }(react["Component"]); PopupInner_PopupInner.propTypes = { hiddenClassName: prop_types_default.a.string, className: prop_types_default.a.string, prefixCls: prop_types_default.a.string, onMouseEnter: prop_types_default.a.func, onMouseLeave: prop_types_default.a.func, onMouseDown: prop_types_default.a.func, onTouchStart: prop_types_default.a.func, children: prop_types_default.a.any }; /* harmony default export */ var es_PopupInner = (PopupInner_PopupInner); // CONCATENATED MODULE: ./node_modules/rc-trigger/es/Popup.js var Popup_Popup = function (_Component) { inherits_default()(Popup, _Component); function Popup(props) { classCallCheck_default()(this, Popup); var _this = possibleConstructorReturn_default()(this, _Component.call(this, props)); Popup__initialiseProps.call(_this); _this.state = { // Used for stretch stretchChecked: false, targetWidth: undefined, targetHeight: undefined }; _this.savePopupRef = saveRef.bind(_this, 'popupInstance'); _this.saveAlignRef = saveRef.bind(_this, 'alignInstance'); return _this; } Popup.prototype.componentDidMount = function componentDidMount() { this.rootNode = this.getPopupDomNode(); this.setStretchSize(); }; Popup.prototype.componentDidUpdate = function componentDidUpdate() { this.setStretchSize(); }; // Record size if stretch needed Popup.prototype.getPopupDomNode = function getPopupDomNode() { return react_dom_default.a.findDOMNode(this.popupInstance); }; // `target` on `rc-align` can accept as a function to get the bind element or a point. // ref: https://www.npmjs.com/package/rc-align Popup.prototype.getMaskTransitionName = function getMaskTransitionName() { var props = this.props; var transitionName = props.maskTransitionName; var animation = props.maskAnimation; if (!transitionName && animation) { transitionName = props.prefixCls + '-' + animation; } return transitionName; }; Popup.prototype.getTransitionName = function getTransitionName() { var props = this.props; var transitionName = props.transitionName; if (!transitionName && props.animation) { transitionName = props.prefixCls + '-' + props.animation; } return transitionName; }; Popup.prototype.getClassName = function getClassName(currentAlignClassName) { return this.props.prefixCls + ' ' + this.props.className + ' ' + currentAlignClassName; }; Popup.prototype.getPopupElement = function getPopupElement() { var _this2 = this; var savePopupRef = this.savePopupRef; var _state = this.state, stretchChecked = _state.stretchChecked, targetHeight = _state.targetHeight, targetWidth = _state.targetWidth; var _props = this.props, align = _props.align, visible = _props.visible, prefixCls = _props.prefixCls, style = _props.style, getClassNameFromAlign = _props.getClassNameFromAlign, destroyPopupOnHide = _props.destroyPopupOnHide, stretch = _props.stretch, children = _props.children, onMouseEnter = _props.onMouseEnter, onMouseLeave = _props.onMouseLeave, onMouseDown = _props.onMouseDown, onTouchStart = _props.onTouchStart; var className = this.getClassName(this.currentAlignClassName || getClassNameFromAlign(align)); var hiddenClassName = prefixCls + '-hidden'; if (!visible) { this.currentAlignClassName = null; } var sizeStyle = {}; if (stretch) { // Stretch with target if (stretch.indexOf('height') !== -1) { sizeStyle.height = targetHeight; } else if (stretch.indexOf('minHeight') !== -1) { sizeStyle.minHeight = targetHeight; } if (stretch.indexOf('width') !== -1) { sizeStyle.width = targetWidth; } else if (stretch.indexOf('minWidth') !== -1) { sizeStyle.minWidth = targetWidth; } // Delay force align to makes ui smooth if (!stretchChecked) { sizeStyle.visibility = 'hidden'; setTimeout(function () { if (_this2.alignInstance) { _this2.alignInstance.forceAlign(); } }, 0); } } var newStyle = extends_default()({}, sizeStyle, style, this.getZIndexStyle()); var popupInnerProps = { className: className, prefixCls: prefixCls, ref: savePopupRef, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, onMouseDown: onMouseDown, onTouchStart: onTouchStart, style: newStyle }; if (destroyPopupOnHide) { return react_default.a.createElement( Animate["a" /* default */], { component: '', exclusive: true, transitionAppear: true, transitionName: this.getTransitionName() }, visible ? react_default.a.createElement( es["a" /* default */], { target: this.getAlignTarget(), key: 'popup', ref: this.saveAlignRef, monitorWindowResize: true, align: align, onAlign: this.onAlign }, react_default.a.createElement( es_PopupInner, extends_default()({ visible: true }, popupInnerProps), children ) ) : null ); } return react_default.a.createElement( Animate["a" /* default */], { component: '', exclusive: true, transitionAppear: true, transitionName: this.getTransitionName(), showProp: 'xVisible' }, react_default.a.createElement( es["a" /* default */], { target: this.getAlignTarget(), key: 'popup', ref: this.saveAlignRef, monitorWindowResize: true, xVisible: visible, childrenProps: { visible: 'xVisible' }, disabled: !visible, align: align, onAlign: this.onAlign }, react_default.a.createElement( es_PopupInner, extends_default()({ hiddenClassName: hiddenClassName }, popupInnerProps), children ) ) ); }; Popup.prototype.getZIndexStyle = function getZIndexStyle() { var style = {}; var props = this.props; if (props.zIndex !== undefined) { style.zIndex = props.zIndex; } return style; }; Popup.prototype.getMaskElement = function getMaskElement() { var props = this.props; var maskElement = void 0; if (props.mask) { var maskTransition = this.getMaskTransitionName(); maskElement = react_default.a.createElement(es_LazyRenderBox, { style: this.getZIndexStyle(), key: 'mask', className: props.prefixCls + '-mask', hiddenClassName: props.prefixCls + '-mask-hidden', visible: props.visible }); if (maskTransition) { maskElement = react_default.a.createElement( Animate["a" /* default */], { key: 'mask', showProp: 'visible', transitionAppear: true, component: '', transitionName: maskTransition }, maskElement ); } } return maskElement; }; Popup.prototype.render = function render() { return react_default.a.createElement( 'div', null, this.getMaskElement(), this.getPopupElement() ); }; return Popup; }(react["Component"]); Popup_Popup.propTypes = { visible: prop_types_default.a.bool, style: prop_types_default.a.object, getClassNameFromAlign: prop_types_default.a.func, onAlign: prop_types_default.a.func, getRootDomNode: prop_types_default.a.func, align: prop_types_default.a.any, destroyPopupOnHide: prop_types_default.a.bool, className: prop_types_default.a.string, prefixCls: prop_types_default.a.string, onMouseEnter: prop_types_default.a.func, onMouseLeave: prop_types_default.a.func, onMouseDown: prop_types_default.a.func, onTouchStart: prop_types_default.a.func, stretch: prop_types_default.a.string, children: prop_types_default.a.node, point: prop_types_default.a.shape({ pageX: prop_types_default.a.number, pageY: prop_types_default.a.number }) }; var Popup__initialiseProps = function _initialiseProps() { var _this3 = this; this.onAlign = function (popupDomNode, align) { var props = _this3.props; var currentAlignClassName = props.getClassNameFromAlign(align); // FIX: https://github.com/react-component/trigger/issues/56 // FIX: https://github.com/react-component/tooltip/issues/79 if (_this3.currentAlignClassName !== currentAlignClassName) { _this3.currentAlignClassName = currentAlignClassName; popupDomNode.className = _this3.getClassName(currentAlignClassName); } props.onAlign(popupDomNode, align); }; this.setStretchSize = function () { var _props2 = _this3.props, stretch = _props2.stretch, getRootDomNode = _props2.getRootDomNode, visible = _props2.visible; var _state2 = _this3.state, stretchChecked = _state2.stretchChecked, targetHeight = _state2.targetHeight, targetWidth = _state2.targetWidth; if (!stretch || !visible) { if (stretchChecked) { _this3.setState({ stretchChecked: false }); } return; } var $ele = getRootDomNode(); if (!$ele) return; var height = $ele.offsetHeight; var width = $ele.offsetWidth; if (targetHeight !== height || targetWidth !== width || !stretchChecked) { _this3.setState({ stretchChecked: true, targetHeight: height, targetWidth: width }); } }; this.getTargetElement = function () { return _this3.props.getRootDomNode(); }; this.getAlignTarget = function () { var point = _this3.props.point; if (point) { return point; } return _this3.getTargetElement; }; }; /* harmony default export */ var es_Popup = (Popup_Popup); // CONCATENATED MODULE: ./node_modules/rc-trigger/es/index.js function noop() {} function returnEmptyString() { return ''; } function returnDocument() { return window.document; } var ALL_HANDLERS = ['onClick', 'onMouseDown', 'onTouchStart', 'onMouseEnter', 'onMouseLeave', 'onFocus', 'onBlur', 'onContextMenu']; var IS_REACT_16 = !!react_dom["createPortal"]; var contextTypes = { rcTrigger: prop_types_default.a.shape({ onPopupMouseDown: prop_types_default.a.func }) }; var es_Trigger = function (_React$Component) { inherits_default()(Trigger, _React$Component); function Trigger(props) { classCallCheck_default()(this, Trigger); var _this = possibleConstructorReturn_default()(this, _React$Component.call(this, props)); es__initialiseProps.call(_this); var popupVisible = void 0; if ('popupVisible' in props) { popupVisible = !!props.popupVisible; } else { popupVisible = !!props.defaultPopupVisible; } _this.state = { prevPopupVisible: popupVisible, popupVisible: popupVisible }; ALL_HANDLERS.forEach(function (h) { _this['fire' + h] = function (e) { _this.fireEvents(h, e); }; }); return _this; } Trigger.prototype.getChildContext = function getChildContext() { return { rcTrigger: { onPopupMouseDown: this.onPopupMouseDown } }; }; Trigger.prototype.componentDidMount = function componentDidMount() { this.componentDidUpdate({}, { popupVisible: this.state.popupVisible }); }; Trigger.prototype.componentDidUpdate = function componentDidUpdate(_, prevState) { var props = this.props; var state = this.state; var triggerAfterPopupVisibleChange = function triggerAfterPopupVisibleChange() { if (prevState.popupVisible !== state.popupVisible) { props.afterPopupVisibleChange(state.popupVisible); } }; if (!IS_REACT_16) { this.renderComponent(null, triggerAfterPopupVisibleChange); } // We must listen to `mousedown` or `touchstart`, edge case: // https://github.com/ant-design/ant-design/issues/5804 // https://github.com/react-component/calendar/issues/250 // https://github.com/react-component/trigger/issues/50 if (state.popupVisible) { var currentDocument = void 0; if (!this.clickOutsideHandler && (this.isClickToHide() || this.isContextMenuToShow())) { currentDocument = props.getDocument(); this.clickOutsideHandler = Object(addEventListener["a" /* default */])(currentDocument, 'mousedown', this.onDocumentClick); } // always hide on mobile if (!this.touchOutsideHandler) { currentDocument = currentDocument || props.getDocument(); this.touchOutsideHandler = Object(addEventListener["a" /* default */])(currentDocument, 'touchstart', this.onDocumentClick); } // close popup when trigger type contains 'onContextMenu' and document is scrolling. if (!this.contextMenuOutsideHandler1 && this.isContextMenuToShow()) { currentDocument = currentDocument || props.getDocument(); this.contextMenuOutsideHandler1 = Object(addEventListener["a" /* default */])(currentDocument, 'scroll', this.onContextMenuClose); } // close popup when trigger type contains 'onContextMenu' and window is blur. if (!this.contextMenuOutsideHandler2 && this.isContextMenuToShow()) { this.contextMenuOutsideHandler2 = Object(addEventListener["a" /* default */])(window, 'blur', this.onContextMenuClose); } return; } this.clearOutsideHandler(); }; Trigger.prototype.componentWillUnmount = function componentWillUnmount() { this.clearDelayTimer(); this.clearOutsideHandler(); clearTimeout(this.mouseDownTimeout); }; Trigger.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) { var popupVisible = _ref.popupVisible; var newState = {}; if (popupVisible !== undefined && prevState.popupVisible !== popupVisible) { newState.popupVisible = popupVisible; newState.prevPopupVisible = prevState.popupVisible; } return newState; }; Trigger.prototype.getPopupDomNode = function getPopupDomNode() { // for test if (this._component && this._component.getPopupDomNode) { return this._component.getPopupDomNode(); } return null; }; Trigger.prototype.getPopupAlign = function getPopupAlign() { var props = this.props; var popupPlacement = props.popupPlacement, popupAlign = props.popupAlign, builtinPlacements = props.builtinPlacements; if (popupPlacement && builtinPlacements) { return getAlignFromPlacement(builtinPlacements, popupPlacement, popupAlign); } return popupAlign; }; /** * @param popupVisible Show or not the popup element * @param event SyntheticEvent, used for `pointAlign` */ Trigger.prototype.setPopupVisible = function setPopupVisible(popupVisible, event) { var alignPoint = this.props.alignPoint; var prevPopupVisible = this.state.popupVisible; this.clearDelayTimer(); if (prevPopupVisible !== popupVisible) { if (!('popupVisible' in this.props)) { this.setState({ popupVisible: popupVisible, prevPopupVisible: prevPopupVisible }); } this.props.onPopupVisibleChange(popupVisible); } // Always record the point position since mouseEnterDelay will delay the show if (alignPoint && event) { this.setPoint(event); } }; Trigger.prototype.delaySetPopupVisible = function delaySetPopupVisible(visible, delayS, event) { var _this2 = this; var delay = delayS * 1000; this.clearDelayTimer(); if (delay) { var point = event ? { pageX: event.pageX, pageY: event.pageY } : null; this.delayTimer = setTimeout(function () { _this2.setPopupVisible(visible, point); _this2.clearDelayTimer(); }, delay); } else { this.setPopupVisible(visible, event); } }; Trigger.prototype.clearDelayTimer = function clearDelayTimer() { if (this.delayTimer) { clearTimeout(this.delayTimer); this.delayTimer = null; } }; Trigger.prototype.clearOutsideHandler = function clearOutsideHandler() { if (this.clickOutsideHandler) { this.clickOutsideHandler.remove(); this.clickOutsideHandler = null; } if (this.contextMenuOutsideHandler1) { this.contextMenuOutsideHandler1.remove(); this.contextMenuOutsideHandler1 = null; } if (this.contextMenuOutsideHandler2) { this.contextMenuOutsideHandler2.remove(); this.contextMenuOutsideHandler2 = null; } if (this.touchOutsideHandler) { this.touchOutsideHandler.remove(); this.touchOutsideHandler = null; } }; Trigger.prototype.createTwoChains = function createTwoChains(event) { var childPros = this.props.children.props; var props = this.props; if (childPros[event] && props[event]) { return this['fire' + event]; } return childPros[event] || props[event]; }; Trigger.prototype.isClickToShow = function isClickToShow() { var _props = this.props, action = _props.action, showAction = _props.showAction; return action.indexOf('click') !== -1 || showAction.indexOf('click') !== -1; }; Trigger.prototype.isContextMenuToShow = function isContextMenuToShow() { var _props2 = this.props, action = _props2.action, showAction = _props2.showAction; return action.indexOf('contextMenu') !== -1 || showAction.indexOf('contextMenu') !== -1; }; Trigger.prototype.isClickToHide = function isClickToHide() { var _props3 = this.props, action = _props3.action, hideAction = _props3.hideAction; return action.indexOf('click') !== -1 || hideAction.indexOf('click') !== -1; }; Trigger.prototype.isMouseEnterToShow = function isMouseEnterToShow() { var _props4 = this.props, action = _props4.action, showAction = _props4.showAction; return action.indexOf('hover') !== -1 || showAction.indexOf('mouseEnter') !== -1; }; Trigger.prototype.isMouseLeaveToHide = function isMouseLeaveToHide() { var _props5 = this.props, action = _props5.action, hideAction = _props5.hideAction; return action.indexOf('hover') !== -1 || hideAction.indexOf('mouseLeave') !== -1; }; Trigger.prototype.isFocusToShow = function isFocusToShow() { var _props6 = this.props, action = _props6.action, showAction = _props6.showAction; return action.indexOf('focus') !== -1 || showAction.indexOf('focus') !== -1; }; Trigger.prototype.isBlurToHide = function isBlurToHide() { var _props7 = this.props, action = _props7.action, hideAction = _props7.hideAction; return action.indexOf('focus') !== -1 || hideAction.indexOf('blur') !== -1; }; Trigger.prototype.forcePopupAlign = function forcePopupAlign() { if (this.state.popupVisible && this._component && this._component.alignInstance) { this._component.alignInstance.forceAlign(); } }; Trigger.prototype.fireEvents = function fireEvents(type, e) { var childCallback = this.props.children.props[type]; if (childCallback) { childCallback(e); } var callback = this.props[type]; if (callback) { callback(e); } }; Trigger.prototype.close = function close() { this.setPopupVisible(false); }; Trigger.prototype.render = function render() { var _this3 = this; var popupVisible = this.state.popupVisible; var _props8 = this.props, children = _props8.children, forceRender = _props8.forceRender, alignPoint = _props8.alignPoint, className = _props8.className; var child = react_default.a.Children.only(children); var newChildProps = { key: 'trigger' }; if (this.isContextMenuToShow()) { newChildProps.onContextMenu = this.onContextMenu; } else { newChildProps.onContextMenu = this.createTwoChains('onContextMenu'); } if (this.isClickToHide() || this.isClickToShow()) { newChildProps.onClick = this.onClick; newChildProps.onMouseDown = this.onMouseDown; newChildProps.onTouchStart = this.onTouchStart; } else { newChildProps.onClick = this.createTwoChains('onClick'); newChildProps.onMouseDown = this.createTwoChains('onMouseDown'); newChildProps.onTouchStart = this.createTwoChains('onTouchStart'); } if (this.isMouseEnterToShow()) { newChildProps.onMouseEnter = this.onMouseEnter; if (alignPoint) { newChildProps.onMouseMove = this.onMouseMove; } } else { newChildProps.onMouseEnter = this.createTwoChains('onMouseEnter'); } if (this.isMouseLeaveToHide()) { newChildProps.onMouseLeave = this.onMouseLeave; } else { newChildProps.onMouseLeave = this.createTwoChains('onMouseLeave'); } if (this.isFocusToShow() || this.isBlurToHide()) { newChildProps.onFocus = this.onFocus; newChildProps.onBlur = this.onBlur; } else { newChildProps.onFocus = this.createTwoChains('onFocus'); newChildProps.onBlur = this.createTwoChains('onBlur'); } var childrenClassName = classnames_default()(child && child.props && child.props.className, className); if (childrenClassName) { newChildProps.className = childrenClassName; } var trigger = react_default.a.cloneElement(child, newChildProps); if (!IS_REACT_16) { return react_default.a.createElement( ContainerRender["a" /* default */], { parent: this, visible: popupVisible, autoMount: false, forceRender: forceRender, getComponent: this.getComponent, getContainer: this.getContainer }, function (_ref2) { var renderComponent = _ref2.renderComponent; _this3.renderComponent = renderComponent; return trigger; } ); } var portal = void 0; // prevent unmounting after it's rendered if (popupVisible || this._component || forceRender) { portal = react_default.a.createElement( Portal["a" /* default */], { key: 'portal', getContainer: this.getContainer, didUpdate: this.handlePortalUpdate }, this.getComponent() ); } return [trigger, portal]; }; return Trigger; }(react_default.a.Component); es_Trigger.propTypes = { children: prop_types_default.a.any, action: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.arrayOf(prop_types_default.a.string)]), showAction: prop_types_default.a.any, hideAction: prop_types_default.a.any, getPopupClassNameFromAlign: prop_types_default.a.any, onPopupVisibleChange: prop_types_default.a.func, afterPopupVisibleChange: prop_types_default.a.func, popup: prop_types_default.a.oneOfType([prop_types_default.a.node, prop_types_default.a.func]).isRequired, popupStyle: prop_types_default.a.object, prefixCls: prop_types_default.a.string, popupClassName: prop_types_default.a.string, className: prop_types_default.a.string, popupPlacement: prop_types_default.a.string, builtinPlacements: prop_types_default.a.object, popupTransitionName: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.object]), popupAnimation: prop_types_default.a.any, mouseEnterDelay: prop_types_default.a.number, mouseLeaveDelay: prop_types_default.a.number, zIndex: prop_types_default.a.number, focusDelay: prop_types_default.a.number, blurDelay: prop_types_default.a.number, getPopupContainer: prop_types_default.a.func, getDocument: prop_types_default.a.func, forceRender: prop_types_default.a.bool, destroyPopupOnHide: prop_types_default.a.bool, mask: prop_types_default.a.bool, maskClosable: prop_types_default.a.bool, onPopupAlign: prop_types_default.a.func, popupAlign: prop_types_default.a.object, popupVisible: prop_types_default.a.bool, defaultPopupVisible: prop_types_default.a.bool, maskTransitionName: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.object]), maskAnimation: prop_types_default.a.string, stretch: prop_types_default.a.string, alignPoint: prop_types_default.a.bool // Maybe we can support user pass position in the future }; es_Trigger.contextTypes = contextTypes; es_Trigger.childContextTypes = contextTypes; es_Trigger.defaultProps = { prefixCls: 'rc-trigger-popup', getPopupClassNameFromAlign: returnEmptyString, getDocument: returnDocument, onPopupVisibleChange: noop, afterPopupVisibleChange: noop, onPopupAlign: noop, popupClassName: '', mouseEnterDelay: 0, mouseLeaveDelay: 0.1, focusDelay: 0, blurDelay: 0.15, popupStyle: {}, destroyPopupOnHide: false, popupAlign: {}, defaultPopupVisible: false, mask: false, maskClosable: true, action: [], showAction: [], hideAction: [] }; var es__initialiseProps = function _initialiseProps() { var _this4 = this; this.onMouseEnter = function (e) { var mouseEnterDelay = _this4.props.mouseEnterDelay; _this4.fireEvents('onMouseEnter', e); _this4.delaySetPopupVisible(true, mouseEnterDelay, mouseEnterDelay ? null : e); }; this.onMouseMove = function (e) { _this4.fireEvents('onMouseMove', e); _this4.setPoint(e); }; this.onMouseLeave = function (e) { _this4.fireEvents('onMouseLeave', e); _this4.delaySetPopupVisible(false, _this4.props.mouseLeaveDelay); }; this.onPopupMouseEnter = function () { _this4.clearDelayTimer(); }; this.onPopupMouseLeave = function (e) { // https://github.com/react-component/trigger/pull/13 // react bug? if (e.relatedTarget && !e.relatedTarget.setTimeout && _this4._component && _this4._component.getPopupDomNode && Object(contains["a" /* default */])(_this4._component.getPopupDomNode(), e.relatedTarget)) { return; } _this4.delaySetPopupVisible(false, _this4.props.mouseLeaveDelay); }; this.onFocus = function (e) { _this4.fireEvents('onFocus', e); // incase focusin and focusout _this4.clearDelayTimer(); if (_this4.isFocusToShow()) { _this4.focusTime = Date.now(); _this4.delaySetPopupVisible(true, _this4.props.focusDelay); } }; this.onMouseDown = function (e) { _this4.fireEvents('onMouseDown', e); _this4.preClickTime = Date.now(); }; this.onTouchStart = function (e) { _this4.fireEvents('onTouchStart', e); _this4.preTouchTime = Date.now(); }; this.onBlur = function (e) { _this4.fireEvents('onBlur', e); _this4.clearDelayTimer(); if (_this4.isBlurToHide()) { _this4.delaySetPopupVisible(false, _this4.props.blurDelay); } }; this.onContextMenu = function (e) { e.preventDefault(); _this4.fireEvents('onContextMenu', e); _this4.setPopupVisible(true, e); }; this.onContextMenuClose = function () { if (_this4.isContextMenuToShow()) { _this4.close(); } }; this.onClick = function (event) { _this4.fireEvents('onClick', event); // focus will trigger click if (_this4.focusTime) { var preTime = void 0; if (_this4.preClickTime && _this4.preTouchTime) { preTime = Math.min(_this4.preClickTime, _this4.preTouchTime); } else if (_this4.preClickTime) { preTime = _this4.preClickTime; } else if (_this4.preTouchTime) { preTime = _this4.preTouchTime; } if (Math.abs(preTime - _this4.focusTime) < 20) { return; } _this4.focusTime = 0; } _this4.preClickTime = 0; _this4.preTouchTime = 0; // Only prevent default when all the action is click. // https://github.com/ant-design/ant-design/issues/17043 // https://github.com/ant-design/ant-design/issues/17291 if (_this4.isClickToShow() && (_this4.isClickToHide() || _this4.isBlurToHide()) && event && event.preventDefault) { event.preventDefault(); } var nextVisible = !_this4.state.popupVisible; if (_this4.isClickToHide() && !nextVisible || nextVisible && _this4.isClickToShow()) { _this4.setPopupVisible(!_this4.state.popupVisible, event); } }; this.onPopupMouseDown = function () { var _context$rcTrigger = _this4.context.rcTrigger, rcTrigger = _context$rcTrigger === undefined ? {} : _context$rcTrigger; _this4.hasPopupMouseDown = true; clearTimeout(_this4.mouseDownTimeout); _this4.mouseDownTimeout = setTimeout(function () { _this4.hasPopupMouseDown = false; }, 0); if (rcTrigger.onPopupMouseDown) { rcTrigger.onPopupMouseDown.apply(rcTrigger, arguments); } }; this.onDocumentClick = function (event) { if (_this4.props.mask && !_this4.props.maskClosable) { return; } var target = event.target; var root = Object(react_dom["findDOMNode"])(_this4); if (!Object(contains["a" /* default */])(root, target) && !_this4.hasPopupMouseDown) { _this4.close(); } }; this.getRootDomNode = function () { return Object(react_dom["findDOMNode"])(_this4); }; this.getPopupClassNameFromAlign = function (align) { var className = []; var _props9 = _this4.props, popupPlacement = _props9.popupPlacement, builtinPlacements = _props9.builtinPlacements, prefixCls = _props9.prefixCls, alignPoint = _props9.alignPoint, getPopupClassNameFromAlign = _props9.getPopupClassNameFromAlign; if (popupPlacement && builtinPlacements) { className.push(getAlignPopupClassName(builtinPlacements, prefixCls, align, alignPoint)); } if (getPopupClassNameFromAlign) { className.push(getPopupClassNameFromAlign(align)); } return className.join(' '); }; this.getComponent = function () { var _props10 = _this4.props, prefixCls = _props10.prefixCls, destroyPopupOnHide = _props10.destroyPopupOnHide, popupClassName = _props10.popupClassName, action = _props10.action, onPopupAlign = _props10.onPopupAlign, popupAnimation = _props10.popupAnimation, popupTransitionName = _props10.popupTransitionName, popupStyle = _props10.popupStyle, mask = _props10.mask, maskAnimation = _props10.maskAnimation, maskTransitionName = _props10.maskTransitionName, zIndex = _props10.zIndex, popup = _props10.popup, stretch = _props10.stretch, alignPoint = _props10.alignPoint; var _state = _this4.state, popupVisible = _state.popupVisible, point = _state.point; var align = _this4.getPopupAlign(); var mouseProps = {}; if (_this4.isMouseEnterToShow()) { mouseProps.onMouseEnter = _this4.onPopupMouseEnter; } if (_this4.isMouseLeaveToHide()) { mouseProps.onMouseLeave = _this4.onPopupMouseLeave; } mouseProps.onMouseDown = _this4.onPopupMouseDown; mouseProps.onTouchStart = _this4.onPopupMouseDown; return react_default.a.createElement( es_Popup, extends_default()({ prefixCls: prefixCls, destroyPopupOnHide: destroyPopupOnHide, visible: popupVisible, point: alignPoint && point, className: popupClassName, action: action, align: align, onAlign: onPopupAlign, animation: popupAnimation, getClassNameFromAlign: _this4.getPopupClassNameFromAlign }, mouseProps, { stretch: stretch, getRootDomNode: _this4.getRootDomNode, style: popupStyle, mask: mask, zIndex: zIndex, transitionName: popupTransitionName, maskAnimation: maskAnimation, maskTransitionName: maskTransitionName, ref: _this4.savePopup }), typeof popup === 'function' ? popup() : popup ); }; this.getContainer = function () { var props = _this4.props; var popupContainer = document.createElement('div'); // Make sure default popup container will never cause scrollbar appearing // https://github.com/react-component/trigger/issues/41 popupContainer.style.position = 'absolute'; popupContainer.style.top = '0'; popupContainer.style.left = '0'; popupContainer.style.width = '100%'; var mountNode = props.getPopupContainer ? props.getPopupContainer(Object(react_dom["findDOMNode"])(_this4)) : props.getDocument().body; mountNode.appendChild(popupContainer); return popupContainer; }; this.setPoint = function (point) { var alignPoint = _this4.props.alignPoint; if (!alignPoint || !point) return; _this4.setState({ point: { pageX: point.pageX, pageY: point.pageY } }); }; this.handlePortalUpdate = function () { if (_this4.state.prevPopupVisible !== _this4.state.popupVisible) { _this4.props.afterPopupVisibleChange(_this4.state.popupVisible); } }; this.savePopup = function (node) { _this4._component = node; }; }; Object(react_lifecycles_compat_es["polyfill"])(es_Trigger); /* harmony default export */ var rc_trigger_es = __webpack_exports__["a"] = (es_Trigger); /***/ }), /***/ "iu5k": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAAAXNSR0IArs4c6QAABZZJREFUaAXlmz1rFEEYx+82l1wIiIgYY2cXrC1EiMbrIghCutjEzg9gtNNCy+gHsDON6QKCYLr4EggWqeU+QYIpJARC7nK5+P+vM8fs3rzs7M3l9pKFY2affeZ5nt/Oy87OzpVLfTpOT08nWq3WTLvdvg0X0/xBNlUuly8hzx+PA8gOINtFvs5fFEXblUplE7JDKoQ+yiENIvjJRqPxBDbnEfAdnI/lsY+yTZT9hbJr1Wr1E87/5LGjKxME+Pj4+D5q8gUczCHQis5RXhlgWyi7jppfHh0d/ZHXjizXEzBAaycnJ29gbEYa7HO6OTIy8grg3/L6yQWMWrzRbDbfI13I67iXcqj11bGxsedId3zteAMfHR09pEPAXvZ1FlIfMezzho+Pj3/1sRv5KAOWd/XLoGEZM2NgLIzJhyFTDcN4FU34A9JFH+NnpQvwFTTxZ0gbLp9OYEBeA+xnpHddxgZ5HbBbgH6MdM8WhxVY1OxG0WEloICuITXWtLUPi2Zc6JqVsExZMYxZlaXzRmAOBjBQyD6bhlDPGbNtINM2aRTgo4ejsfGGqE6KlkfsbcT+SPfI6gKGIicVv5EO9Dnb600E9D4GsVtIE5OTrhoELGdQQw3Lm0UGsqRvXKKGMTd+gLnxRlopzzleJkp4c+oqirefEl4EYnkWnS4DngLMvWvq3DtRw4B962nPqE4Y3YEm1hGr+Y4QGVNZVSdrPs3UAUbtzsJIsLceU9AqpJpXAUxlVR2P/Ixgi4t0gOFkycOIU1UXtA5QJ9OVdTq0KKhsMTA6+CT05yxlvC4xYNjsKqOD08lYNjA0FybIWIqBuSwDQbCVClOwOjidjIGZbPCa70E2sfT0HxgG5n2N2PRNwcrRWS2rk/G6yYZa1jMfM5ZBP4Hn1V+kuRbcdE4xU9M2aZ2uScaax0zJdNlbDntNTESuRFxKDQnLmoE974DSBWgjZC2TkawRjHLdONgRMsiQtghIVg5UXCQPdtiCxAK71g/uvFZus6Ut4BZOnxkw+ySmeNqQMBvSdoN+AEdo21PaKHIIGaCp/5oeP3RjutaHfjwVwZn8zpMDMVnEViMmKBswr9lsJr27z8jKiceZAJuetwzTdi0kMFk7c2k67vWwBVeEGiYfgQ96BWV5wpr6L6/nBQ7cjw8qMEjgqwyql8NWu7TLkZi/PAdt25p9VptkreDO7yJzM2shk54L2PSsNdlT5S7bqq4tT1Y26bpNKeu1UEHp/AW0XQ8CzIDY1/p10HYg6HoFfWM7b9+SgK5gsJBWwpuKVNemeGOz9nH66LUfkzUSG0ia2igyCl3AWQJ16bh8uEJF/22SlTOtQzQZbiDJfbiCgQ+nbZeOy4fLARnJKicea64CpusMxNV/XTC07dIJ0I9jxhhYbA3Sv6OZSIU8y513wWQBpk4WXyKsRAL/LTJSGANDwH1Q6wmtjCdZghg0MNkEY2cRjyPgckbGhJoLOAusNOjSdfmSdtKpypYYTbD49hPKwb4+pB0P6HwTi4H3pG85aMXneF6+lhfOS8qNbCpLAhhLMBtoVquqwjDnyaJ+OSRLoklTgOH/Yn0Qx13ZAfQCUv33Tt6Vgh+MXTAkvv4z7ESTlhzcG4ECL+X5sKWMXbe/gxxdTVqFwweojyi8qMqKnkftrmCS8dQUpxUYsNxyuIF0KPZqAZa78WpIu/daiDugbdLy7rAgDHA735aUFTVljCJWIyxjtwJTAYb2xF1b4XkRD8TIzaU1xuqKzwlMAzDUEP1iCfnCjN4iliXGxhhdsDFLFiVVR+zSuxgbxAnO4R7NhzvcBjYjo2/GYHr0qBWUzltH6bRy+lxsZOPerrN64RjMnzw04LN4deO2p37+jecd5sXf0759z3uq4bQzPK+vY7KyAPn5/qNWGpzngC/kX/H+ASn/y5NEALZxAAAAAElFTkSuQmCC" /***/ }), /***/ "jF3+": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/objectWithoutProperties.js var objectWithoutProperties = __webpack_require__("+6Bu"); var objectWithoutProperties_default = /*#__PURE__*/__webpack_require__.n(objectWithoutProperties); // EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/extends.js var helpers_extends = __webpack_require__("Dd8w"); var extends_default = /*#__PURE__*/__webpack_require__.n(helpers_extends); // EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/classCallCheck.js var classCallCheck = __webpack_require__("Zrlr"); var classCallCheck_default = /*#__PURE__*/__webpack_require__.n(classCallCheck); // EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/possibleConstructorReturn.js var possibleConstructorReturn = __webpack_require__("zwoO"); var possibleConstructorReturn_default = /*#__PURE__*/__webpack_require__.n(possibleConstructorReturn); // EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/inherits.js var inherits = __webpack_require__("Pf15"); var inherits_default = /*#__PURE__*/__webpack_require__.n(inherits); // EXTERNAL MODULE: ./node_modules/react/index.js var react = __webpack_require__("GiK3"); var react_default = /*#__PURE__*/__webpack_require__.n(react); // EXTERNAL MODULE: ./node_modules/prop-types/index.js var prop_types = __webpack_require__("KSGD"); var prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types); // EXTERNAL MODULE: ./node_modules/classnames/index.js var classnames = __webpack_require__("HW6M"); var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); // EXTERNAL MODULE: ./node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js var react_lifecycles_compat_es = __webpack_require__("R8mX"); // CONCATENATED MODULE: ./node_modules/rc-checkbox/es/Checkbox.js var Checkbox_Checkbox = function (_Component) { inherits_default()(Checkbox, _Component); function Checkbox(props) { classCallCheck_default()(this, Checkbox); var _this = possibleConstructorReturn_default()(this, _Component.call(this, props)); _this.handleChange = function (e) { var _this$props = _this.props, disabled = _this$props.disabled, onChange = _this$props.onChange; if (disabled) { return; } if (!('checked' in _this.props)) { _this.setState({ checked: e.target.checked }); } if (onChange) { onChange({ target: extends_default()({}, _this.props, { checked: e.target.checked }), stopPropagation: function stopPropagation() { e.stopPropagation(); }, preventDefault: function preventDefault() { e.preventDefault(); }, nativeEvent: e.nativeEvent }); } }; _this.saveInput = function (node) { _this.input = node; }; var checked = 'checked' in props ? props.checked : props.defaultChecked; _this.state = { checked: checked }; return _this; } Checkbox.getDerivedStateFromProps = function getDerivedStateFromProps(props, state) { if ('checked' in props) { return extends_default()({}, state, { checked: props.checked }); } return null; }; Checkbox.prototype.focus = function focus() { this.input.focus(); }; Checkbox.prototype.blur = function blur() { this.input.blur(); }; Checkbox.prototype.render = function render() { var _classNames; var _props = this.props, prefixCls = _props.prefixCls, className = _props.className, style = _props.style, name = _props.name, id = _props.id, type = _props.type, disabled = _props.disabled, readOnly = _props.readOnly, tabIndex = _props.tabIndex, onClick = _props.onClick, onFocus = _props.onFocus, onBlur = _props.onBlur, autoFocus = _props.autoFocus, value = _props.value, others = objectWithoutProperties_default()(_props, ['prefixCls', 'className', 'style', 'name', 'id', 'type', 'disabled', 'readOnly', 'tabIndex', 'onClick', 'onFocus', 'onBlur', 'autoFocus', 'value']); var globalProps = Object.keys(others).reduce(function (prev, key) { if (key.substr(0, 5) === 'aria-' || key.substr(0, 5) === 'data-' || key === 'role') { prev[key] = others[key]; } return prev; }, {}); var checked = this.state.checked; var classString = classnames_default()(prefixCls, className, (_classNames = {}, _classNames[prefixCls + '-checked'] = checked, _classNames[prefixCls + '-disabled'] = disabled, _classNames)); return react_default.a.createElement( 'span', { className: classString, style: style }, react_default.a.createElement('input', extends_default()({ name: name, id: id, type: type, readOnly: readOnly, disabled: disabled, tabIndex: tabIndex, className: prefixCls + '-input', checked: !!checked, onClick: onClick, onFocus: onFocus, onBlur: onBlur, onChange: this.handleChange, autoFocus: autoFocus, ref: this.saveInput, value: value }, globalProps)), react_default.a.createElement('span', { className: prefixCls + '-inner' }) ); }; return Checkbox; }(react["Component"]); Checkbox_Checkbox.propTypes = { prefixCls: prop_types_default.a.string, className: prop_types_default.a.string, style: prop_types_default.a.object, name: prop_types_default.a.string, id: prop_types_default.a.string, type: prop_types_default.a.string, defaultChecked: prop_types_default.a.oneOfType([prop_types_default.a.number, prop_types_default.a.bool]), checked: prop_types_default.a.oneOfType([prop_types_default.a.number, prop_types_default.a.bool]), disabled: prop_types_default.a.bool, onFocus: prop_types_default.a.func, onBlur: prop_types_default.a.func, onChange: prop_types_default.a.func, onClick: prop_types_default.a.func, tabIndex: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.number]), readOnly: prop_types_default.a.bool, autoFocus: prop_types_default.a.bool, value: prop_types_default.a.any }; Checkbox_Checkbox.defaultProps = { prefixCls: 'rc-checkbox', className: '', style: {}, type: 'checkbox', defaultChecked: false, onFocus: function onFocus() {}, onBlur: function onBlur() {}, onChange: function onChange() {} }; Object(react_lifecycles_compat_es["polyfill"])(Checkbox_Checkbox); /* harmony default export */ var es_Checkbox = (Checkbox_Checkbox); // CONCATENATED MODULE: ./node_modules/rc-checkbox/es/index.js /* harmony default export */ var es = __webpack_exports__["a"] = (es_Checkbox); /***/ }), /***/ "jJi2": /***/ (function(module, exports) { module.exports = "data:image/png;base64,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" /***/ }), /***/ "jK1M": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; __webpack_require__("GKDd"); var _pagination = _interopRequireDefault(__webpack_require__("BJfm")); var _defineProperty2 = _interopRequireDefault(__webpack_require__("mAPx")); __webpack_require__("LHBr"); var _input = _interopRequireDefault(__webpack_require__("A+AJ")); __webpack_require__("sRCI"); var _modal = _interopRequireDefault(__webpack_require__("vnWH")); var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); var _api = __webpack_require__("H/Zg"); var _index = _interopRequireDefault(__webpack_require__("W7F7")); var _dva = __webpack_require__("S6G3"); var _events = _interopRequireDefault(__webpack_require__("TLe5")); var _PersonItem = _interopRequireDefault(__webpack_require__("baF6")); var _classnames = _interopRequireDefault(__webpack_require__("HW6M")); var _ComponyItem = _interopRequireDefault(__webpack_require__("shlV")); var _utils = __webpack_require__("oAV5"); var _modal2 = _interopRequireDefault(__webpack_require__("ezvz")); var _AttendanceItem = _interopRequireDefault(__webpack_require__("iSN0")); var _recordHistory = __webpack_require__("eXDv"); var _packUp = _interopRequireDefault(__webpack_require__("NV+Z")); var _packDown = _interopRequireDefault(__webpack_require__("joV1")); var _biz = __webpack_require__("Q3h8"); var _dec, _class; /** * 综合查询功能 */ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } var SEARCH_TABS = [{ 'name': '搜公司', 'icon': __webpack_require__("CVrl"), 'type': 'company' }, { 'name': '保安员', 'icon': __webpack_require__("AsJy"), 'type': 'personnel' }, { 'name': '驻勤点', 'icon': __webpack_require__("zHKS"), 'type': 'points' }, { 'name': '搜地址', 'icon': __webpack_require__("ikeG"), 'type': 'address' }]; var ComprehensiveSearch = exports.default = (_dec = (0, _dva.connect)(function (state) { return { //地图数据 mapStyle: state.command.mapStyle, pictureMarkersList: state.command.pictureMarkersList }; }), _dec(_class = /*#__PURE__*/function (_Component) { function ComprehensiveSearch(props) { var _this; (0, _classCallCheck2.default)(this, ComprehensiveSearch); _this = _callSuper(this, ComprehensiveSearch, [props]); _this.onSearchInput = function (e) { console.log('Change:', e.target.value); _this.setState({ searchValue: e.target.value }); }; _this.onSearch = function () { var searchValue = _this.state.searchValue; if ((0, _utils.isEmpty)(searchValue)) { // return $modal('请输入内容'); return; } _events.default.emit('clearMapTag'); // 初始化右侧数据模块 _events.default.emit('initRightDataModule'); _events.default.emit('clearMapModal', 'ComponeyInfo'); _events.default.emit('clearMapModal', 'AttendInfo'); console.log('onSearch', searchValue); var keyWord = searchValue; var searchType = _this.state.searchType; switch (searchType) { case 'company': _this._getSecurityCompanyList(keyWord); break; case 'personnel': _this._getPersonList(keyWord); break; case 'points': _this._getAttendance(keyWord); break; } }; // 获取驻勤点列表 _this._getAttendance = function (keyWord) { var that = _this; (0, _biz.showAttendList)({ keyWord: keyWord, success: function success(data) { if (data.length > 0) { that.setState({ dataSource: data }); (0, _recordHistory.recordAdd)({ from: 'ComprehensiveSearch', to: 'AttendInfo', fromData: data, toID: 'points' }); } else { _modal.default.warning({ title: '在数据权限范围内,无对应的搜索内容!', okText: '我知道了' }); } // let param = { // from : 'search', // isTop: true, // type : 'attendance', // data : data // }; // that.props.dispatch({ // type: "command/changeBackStepInfo", // payload: param, // }); } }); }; // 获取保安公司列表 _this._getSecurityCompanyList = function (keyWord) { var that = _this; (0, _biz.getCompanyList)({ keyWord: keyWord, success: function success(data) { if (data.length > 0) { that.setState({ dataSource: data }); (0, _recordHistory.recordAdd)({ from: 'ComprehensiveSearch', to: 'CreateComponeyInfoWindow', fromData: data, toID: 'company' }); } else { _modal.default.warning({ title: '在数据权限范围内,无对应的搜索内容!', okText: '我知道了' }); } // let param = { // from : 'search', // isTop: true, // type : 'compony', // data : datas // }; // this.props.dispatch({ // type: "command/changeBackStepInfo", // payload: param, // }); } }); }; _this.onShowType = function (status) { console.log('onShowType', status); if (!_this.initSearch && status != 'refresh') { return; } _this.initSearch = false; _this.setState({ isShowType: !_this.state.isShowType }); }; _this.initAutocomplete = function () { var that = _this; that.placeSearch = null; var map = _this.props._thisGIS.state.map; AMap.plugin('AMap.Autocomplete', function () { var auto = new AMap.Autocomplete({ input: that.state.addressID, output: that.state.addressID + "_list" }); that.placeSearch = new AMap.PlaceSearch({ map: map, type: '汽车服务|汽车销售|汽车维修|摩托车服务|餐饮服务|购物服务|生活服务|体育休闲服务|医疗保健服务|住宿服务|风景名胜|商务住宅|政府机构及社会团体|科教文化服务|交通设施服务|金融保险服务|公司企业|道路附属设施|地名地址信息|公共设施', extensions: 'all' }); AMap.event.addListener(auto, "select", function (e) { console.log('onAutoSelect', e); that.placeSearch.setCity(e.poi.adcode); that.placeSearch.search(e.poi.name, function (status, result) { _events.default.emit('clearMapTag', 'searchAddress'); // 搜索成功时,result即是对应的匹配数据 if (status === "complete" && result.poiList.count > 0) { var pois = result.poiList.pois; var markerData = []; for (var key in pois) { var poi = pois[key]; console.log('placeSearch-poi', poi); var info = { latitude: poi.location.lat, longitude: poi.location.lng, address: poi.pname + poi.cityname + poi.adname + poi.address, phone: poi.tel, id: poi.id, name: poi.name }; markerData.push(info); } if (that.placeSearch.render && that.placeSearch.render.markerList) { that.placeSearch.render.markerList.clear(); } setTimeout(function () { _events.default.emit('addPictueMarks', { data: { data: markerData }, type: 'searchAddress' }); (0, _recordHistory.recordAdd)({ from: 'ComprehensiveSearch', to: 'Search', fromData: markerData, toID: 'address' }); }, 700); } }); //关键字查询查询 }); }); }; _this.onChangeType = function (searchType) { // 清除搜索结果的标记 if (_this.placeSearch.render) { _this.placeSearch.render.markerList.clear(); } _this.setState({ searchType: searchType, searchValue: '', dataSource: [], isShowType: false }); _events.default.emit('clearMapTag'); switch (searchType) { // case 'company': // this._getSecurityCompanyList(""); // break; // case 'personnel': // this._getPersonList(""); // break; // case 'points': // this._getAttendance(""); // break; case 'address': _this.initAutocomplete(); break; } }; _this.onChangeAttendance = function (item) { console.log('onChangeAttendance'); _this.props.dispatch({ type: 'command/setSelectAttendInfo', payload: {} }); var param = item; _events.default.emit('initRightDataModule'); _events.default.emit('addPictueMarks', { data: { data: [param] }, type: 'attendancePoint' }); _this.props.dispatch({ type: 'command/setSelectComponeyInfo', payload: {} }); _this.setState({ searchValue: item.taskName }); }; _this.onChangePerson = function (item) { console.log('onChangePerson', item); var that = _this; that.setState({ searchValue: item.name }); }; _this.state = { isShowType: false, searchType: 'address', dataSource: [], searchValue: '', addressID: 'comprehensive_search_address' }; _this.pageSize = 10; _this.pageNumber = 1; _this.initSearch = true; _this.placeSearch = ''; return _this; } (0, _inherits2.default)(ComprehensiveSearch, _Component); return (0, _createClass2.default)(ComprehensiveSearch, [{ key: "componentDidMount", value: function componentDidMount() { this.initAutocomplete(); var that = this; _events.default.addListener('showComprehensiveSearch', function (result) { setTimeout(function () { that.initSearch = false; if (result.type == 'address') { _events.default.emit('addPictueMarks', { data: { data: result.data }, type: 'searchAddress' }); } else { that.setState({ dataSource: result.data, searchType: result.type }); } }, 2000); }); } }, { key: "_getPersonList", value: // 获取保安人员列表 function _getPersonList(keyWord) { var _this2 = this; (0, _api.getPersonList)({ _currpage: this.pageNumber, lines: this.pageSize }, { search_smName: keyWord }).then(function (res) { console.log(res); if (res.data.total == 0 || res.data.data.length == 0) { return _modal.default.warning({ title: '在数据权限范围内,无对应的搜索内容!', okText: '我知道了' }); } var result = res.data.data.map(function (item) { item.perId = item.id; delete item.id; item.name = item.securityName ? item.securityName : item.principalName; delete item.securityName; delete item.principalName; var lnglatData = item.location ? JSON.parse(item.location) : ''; if (lnglatData) { item.lnglat = lnglatData ? [lnglatData.longitude, lnglatData.latitude] : ''; item.longitude = lnglatData.longitude; item.latitude = lnglatData.latitude; item.time = ''; } // item.lnglat = [118.051982,24.607542] delete item.location; item.idCardNo = item.documentID ? item.documentID : item.principalIdCardNo; delete item.documentID; delete item.principalIdCardNo; item.mobilePhone = item.phone ? item.phone : item.principalPhoneNo; delete item.phone; delete item.principalPhoneNo; return item; }); _this2.props.dispatch({ type: "command/setPersonSelectIndex", payload: null }); _this2.props.dispatch({ type: "command/clearInfoWindow", payload: true }); _this2.setState({ dataSource: result, total: res.data.total, loadingText: result.length > 0 ? "加载完成" : "暂无数据" }); (0, _recordHistory.recordAdd)({ from: 'ComprehensiveSearch', to: 'CreateTrajectoryInfoWindow', fromData: result, toID: 'person' }); console.log(result); _this2.props.dispatch({ type: "command/fetchPersonList", payload: { list: result } }); console.log('securityResource', result); _events.default.emit('addPictueMarks', { data: { data: result }, type: 'securityResource' }); var param = { from: 'search', isTop: true, type: 'person', data: result }; _this2.props.dispatch({ type: "command/changeBackStepInfo", payload: param }); }); } }, { key: "onChangeCompony", value: function onChangeCompony(item) { var that = this.that; console.log('onChangeCompony', that); (0, _biz.showCompanyPointInfo)({ doMainId: item.selectComponeyId, success: function success(info) { var data = { data: [info] }; // TAG: 根据需求 368。点击打开公司办公地点定位,并打开公司信息弹框 // event 发送器: eventCenter.emit("事件名称", 参数列表); // 这样做的好处是,爷传孙,不需要父级组件做承载 _events.default.emit('addPictueMarks', { data: data, type: "securityCompany" }); that.setState({ searchValue: info.companyName }); } }); } }, { key: "render", value: function render() { var _this3 = this; var _this$props = this.props, layerSatatus = _this$props.layerSatatus, mapStyle = _this$props.mapStyle, layoutAuthority = _this$props.layoutAuthority; var _this$state = this.state, isShowType = _this$state.isShowType, dataSource = _this$state.dataSource, searchHeight = _this$state.searchHeight, loadingText = _this$state.loadingText, total = _this$state.total, searchType = _this$state.searchType, searchValue = _this$state.searchValue, addressID = _this$state.addressID; var clsSearch = (0, _classnames.default)(_index.default["".concat(searchType, "_list")]); var searchNames = SEARCH_TABS.filter(function (item) { return item.type == searchType; }); var searchName = !(0, _utils.isEmpty)(searchNames[0]['name']) ? searchNames[0]['name'] : ""; console.log('ComprehensiveSearch-state', this.state, searchNames); return /*#__PURE__*/_react.default.createElement("div", { className: _index.default[mapStyle] }, /*#__PURE__*/_react.default.createElement("div", { className: _index.default.search_content }, /*#__PURE__*/_react.default.createElement("div", { className: _index.default.search_input, onClick: this.onShowType.bind(this) }, !this.initSearch ? /*#__PURE__*/_react.default.createElement("div", { className: _index.default.search_name, onClick: this.onShowType.bind(this, 'refresh') }, searchName, /*#__PURE__*/_react.default.createElement("img", { className: _index.default.search_icon, src: isShowType ? _packUp.default : _packDown.default })) : null, searchType == 'address' ? /*#__PURE__*/_react.default.createElement(_input.default, (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({ bordered: false, allowClear: true, className: _index.default.input_i, id: addressID, autoComplete: false }, "autoComplete", "off"), "onChange", this.onSearchInput), "onPressEnter", this.onSearch), "value", searchValue)) : /*#__PURE__*/_react.default.createElement(_input.default, (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({ style: { display: "none" }, bordered: false, allowClear: true, className: _index.default.input_i, id: addressID, autoComplete: false }, "autoComplete", "off"), "onChange", this.onSearchInput), "onPressEnter", this.onSearch), "value", searchValue)), searchType != 'address' ? /*#__PURE__*/_react.default.createElement(_input.default, (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({ bordered: false, allowClear: true, className: _index.default.input_i, id: "comprehensive_search", autoComplete: false }, "autoComplete", "off"), "onChange", this.onSearchInput), "onPressEnter", this.onSearch), "value", searchValue)) : null, /*#__PURE__*/_react.default.createElement("div", { className: _index.default.search_btn, onClick: this.onSearch }, "\u641C\u7D22")), isShowType ? /*#__PURE__*/_react.default.createElement("div", { className: _index.default.type_body }, SEARCH_TABS.map(function (e) { var clsName = (0, _classnames.default)(_index.default.type_item, e.type == searchType ? _index.default.item_checked : ''); return /*#__PURE__*/_react.default.createElement("div", { className: clsName, onClick: _this3.onChangeType.bind(_this3, e.type) }, /*#__PURE__*/_react.default.createElement("img", { className: _index.default.type_img, src: e.icon }), /*#__PURE__*/_react.default.createElement("div", { className: _index.default.type_name }, e.name)); })) : null, searchType == 'address' ? /*#__PURE__*/_react.default.createElement("div", { class: "address_list", id: addressID + "_list" }) : /*#__PURE__*/_react.default.createElement("div", { style: { display: "none" }, class: "address_list", id: addressID + "_list" }), dataSource.length > 0 ? /*#__PURE__*/_react.default.createElement("div", { className: clsSearch }, searchType == 'personnel' ? /*#__PURE__*/_react.default.createElement("div", { class: "search-list_command search-list", style: { maxHeight: searchHeight, overflow: "auto" }, id: "personnel_list" }, /*#__PURE__*/_react.default.createElement(_PersonItem.default, { data: dataSource, onClick: this.onChangePerson, loadingText: loadingText }), /*#__PURE__*/_react.default.createElement(_pagination.default, { total: total, size: "small", onChange: function onChange(pageNumber) { _this3._getPersonList(pageNumber); }, defaultPageSize: this.pageSize, current: this.pageNumber, style: { display: total > this.pageSize ? "block" : "none", textAlign: 'center' } })) : null, searchType == 'company' ? /*#__PURE__*/_react.default.createElement("div", { className: _index.default.list_content }, dataSource && dataSource.map(function (item, i) { return /*#__PURE__*/_react.default.createElement(_ComponyItem.default, { item: item, that: _this3, onChangeCompony: _this3.onChangeCompony }); })) : null, searchType == 'points' ? /*#__PURE__*/_react.default.createElement("div", { className: _index.default.list_content }, dataSource && dataSource.map(function (item, i) { return /*#__PURE__*/_react.default.createElement(_AttendanceItem.default, { item: item, onChangeAttendance: _this3.onChangeAttendance }); })) : null) : null)); } }]); }(_react.Component)) || _class); /***/ }), /***/ "jNq1": /***/ (function(module, exports) { module.exports = "data:image/png;base64,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" /***/ }), /***/ "jTu2": /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _util = __webpack_require__("eCjd"); var util = _interopRequireWildcard(_util); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } /** * 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(util.format(options.messages.whitespace, rule.fullField)); } } exports['default'] = whitespace; /***/ }), /***/ "jhz3": /***/ (function(module, exports, __webpack_require__) { var map = { "./event-active.png": "3KeC", "./resource-active.png": "E4fC", "./search-active.png": "hf4R", "./videobox-add-active.png": "WO9G", "./videobox-close-active.png": "SECW", "./videobox-luzhi-active.png": "ZdlR", "./videobox-video-active.png": "5uwJ", "./videobox-volume-active.png": "CE2x" }; function webpackContext(req) { return __webpack_require__(webpackContextResolve(req)); }; function webpackContextResolve(req) { var id = map[req]; if(!(id + 1)) // check for number or string throw new Error("Cannot find module '" + req + "'."); return id; }; webpackContext.keys = function webpackContextKeys() { return Object.keys(map); }; webpackContext.resolve = webpackContextResolve; module.exports = webpackContext; webpackContext.id = "jhz3"; /***/ }), /***/ "jjnV": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAiCAYAAAC0nUK+AAAAAXNSR0IArs4c6QAABR9JREFUSA2VVWtsVFUQnjn37kJfbrt9UCqCb9sCjVoCAdPWQgwxsfLHBGiiMZSQEt+SSIkx1sQmKG2C/ilaUKMBRXxE6yM+aLvVlGhpMdoHRtEYDFK2L7a03de9x5nbvcu9u3drnR97zsx8883cc+bMIswjEyWVlbqEGh1kNSAWIchcCTiOEv5GAJ9A+DR7yPcdIlkchDDJ4l9ZVY263C+lXJvstVsQsFcquDd/0Ndp9wDYyGVjoxh7v6NJ6rKBgaKwABbV3APuqvWgXFcEmO0BOXkZtPMXIOw7BaH2b0C/eMngFCgOeLdWN2Bjo56YBKhKHC2uOOEvrpD+1Rvl9OGjUg+FyJxa2M84xnPcaEnlh1xgErm/tOIFA7ChRobPDKRmdPAwfpTiYgletJGPrarcQFXrXIETcbizJ04Z+uxbObHlYTlavllObquX4Z7Tho/jOJ55xkurKjiB8QkyKpvoujH9iTpw3b7SlpgVLXauxv6fEYj+eg7k9AxEfhqEQN3TEDnVZ8RxPPNoUhrVo3/V3WsgqvXy5eV8dQzQ7baRa0SEmekQ+vwkuNbeASolnz18DKZbDsVxXJDn3VaQ4TBMbK41LhkVWCdA12oYxV2RSMz22beOw/TLrRB87xMI7NwDUao2bWctZOypZ7ch0d/+NFaOZx4WqYv7iBw2scLt5iRpO7YDfy5oGuh0FE4JlGVL46EmD0q5SaXXtZxuxOjjOMKyUW65gXo7AJLIWcwE1xxuMb6AbcrSJbwYwu8hJstV4i1ghR+IowRDENi9F/SxibjbKYHpNHnoYvOpcjlNCRbxy8OCPBMzt1K1gaeeN7rCdIjMDGqrNCpXgciPZ+iyM6jnEJQbVxgQ5mFhXpWWETp+Lz9pkUB+5bkDEO7qMcD8o6xYBp4jLSCuvXrGU5QcFAFZzbSSMM+c4AWVGrOflBKeFa7yspgDIHzyewh+/EVcV0tvBU9bM6A3O27jTdqObYAuV9zGPDHpF1LAl6zwEOI+NcUcSKy7190JnrdfTSJmn7q6BJTim3lrxDMPCwrRroqsjHYZuDJBZDmz73wA6XW1hpNfYcZj1IKL3ZD24AMAluoMgMMPx8eK8nsVt1E00DR71pyGTrMlPljm2ZizhXnGSiqe5NzGbMl1LT5I/T4MkQgEHtln6w6HApNMxoyhOI6nNun3Xp/ZyqD4n4W/rPo2DEd7qT+z+Aj4VfJxOI0Ek53viI9i5pUjc8QAl4SKa3IHus/byFmhUXmvrst2CVJh/f/8E1GZM4jqxryhzh84liVe+ZwK4C+u2kWP/DVTX8hKRxoViPd7h3xzlxgLSvpLyj/re10ANi+E1MQQ+a5EYvYlkbPRWyj2UUD8NbAtpSC05Q753nTyO5JjV1dUAXU7JZh0CrLYfs5bojxu0W1bR3JG5Ax3/CURHrWhbQqG0KVspUKCNrNFSUnOmPyh7qNU/dx7tgTxVqBsyvul62yC2abOS85IVVF3U1PZqqOEw15R+JKNyUH5T/LsgY5zBNpvjaVHUI+DJ65OOavTsk/qc4sPysvL0yORiLckAgUHpedrGv65AdS7tyiX64UQUy6Xa7yvr2/GGmPdGy/RajD3ZWVlBcFg8CZN0zJHQMO7pDtcgMr64zjTcFoPTbGdEucXFRVpIyMj02acdU15LLquF1qBz+iBj/6Q2httcuZ3qz0RZ/WlJKfPvmgFTip69CEcP2S18T4RZ/Uv6Mypuiwa5W5aFSLTqFvCCznzfwEld9+WctVX/wAAAABJRU5ErkJggg==" /***/ }), /***/ "joV1": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAKZJREFUOE9jZKAQMFKon2G4GVDTOO08A9Pfwpba3APoYdPQ0MD2l0l0BQMD45rmuqxlMHmUMKhtmmb/n4FhFSMDQ1hzXdZBmCKIZrE1/xkZf7L8fRnZ0NDwB6sBIEGQIQwMDKsYoIbg0wxSjzUWYIb8Z/wfy/ifMQebzThdAJOAeOf/VgZGpu3ozkYOH7zpoLplijzrnzdPkf2MHrjDLSGRk7EoDgMALy9JEb3e/08AAAAASUVORK5CYII=" /***/ }), /***/ "js55": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; __webpack_require__("faxx"); var _row = _interopRequireDefault(__webpack_require__("FV1P")); __webpack_require__("JYrs"); var _col = _interopRequireDefault(__webpack_require__("QoDT")); __webpack_require__("rpBe"); var _checkbox = _interopRequireDefault(__webpack_require__("hK1P")); __webpack_require__("LHBr"); var _input = _interopRequireDefault(__webpack_require__("A+AJ")); __webpack_require__("UQ5M"); var _message2 = _interopRequireDefault(__webpack_require__("/qCn")); var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); var _dva = __webpack_require__("S6G3"); var _index = _interopRequireDefault(__webpack_require__("W7F7")); var _api = __webpack_require__("H/Zg"); var _events = _interopRequireDefault(__webpack_require__("TLe5")); var _recordHistory = __webpack_require__("eXDv"); var _dec, _class; /** * 搜索周边的功能 */ // 引入 EventEmitter function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } var Search = exports.default = (_dec = (0, _dva.connect)(function (state) { return { searchAround: state.command.searchAround }; }), _dec(_class = /*#__PURE__*/function (_Component) { function Search(props) { var _this; (0, _classCallCheck2.default)(this, Search); _this = _callSuper(this, Search, [props]); _this.onClose = function () { var that = _this; (0, _recordHistory.recordBack)({ from: 'Search', callback: function callback(result) { if (result.from == "ComprehensiveSearch") { var data = JSON.parse(JSON.stringify(result)); (0, _recordHistory.recordRemove)({ from: result.from, toID: result.toID }); (0, _recordHistory.recordTo)(data, that); } } }); _this.props.onClose && _this.props.onClose(false); _this.clearAll(); }; _this.state = { range: 400, checkdata: [], securityManData: { data: [] }, //搜索出来的保安员数据 situationData: [], //动态感知的数据 circle: null }; return _this; } (0, _inherits2.default)(Search, _Component); return (0, _createClass2.default)(Search, [{ key: "componentDidMount", value: function componentDidMount() { this._onChangeRange(); var that = this; // 清除周边搜索弹框 & 画的圈 _events.default.addListener('clearSearchCircle', function (result) { that.clearAll(); that.props.onClose && that.props.onClose(false); }); } }, { key: "onChange", value: function onChange(e) { _events.default.emit('clearMapTag', 'searchAddress'); var checkId = null; if (e.length > this.state.checkdata.length) { //增加 checkId = e[e.length - 1]; switch (checkId) { case 'A': if (this.state.securityManData.data.length > 0) { // this.props.addPictueMarks(this.state.securityManData, 'securityResource', { // where: 'searchAround', // type: 'A' // }); _events.default.emit('addPictueMarks', { data: this.state.securityManData, type: 'securityResource', where: { where: 'searchAround', type: 'securitySearch' } }); } else { _message2.default.warning("保安员暂无数据..."); } break; case "B": if (this.state.situationData.length > 0) { this.state.situationData.map(function (item) { console.log(item); // this.props.addPictueMarks(item, 'perception', { // where: 'searchAround', // type: 'B' // }); _events.default.emit('addPictueMarks', { data: item, type: 'perception', where: { where: 'searchAround', type: 'awarenessSearch' } }); }); } else { _message2.default.warning("动态感知设备暂无数据..."); } break; } } else { //减少 checkId = this.state.checkdata.filter(function (i1) { return !e.find(function (i2) { return i1 == i2; }); })[0]; var searchAround = this.props.searchAround; switch (checkId) { case 'A': if (searchAround.securitySearch.length > 0) { var data = { data: searchAround.securitySearch }; // this.props.reducePictueMarks(data, 'securityResource', { // where: 'searchAround', // type: 'A' // }); _events.default.emit('reducePictueMarks', { data: data, type: 'securityResource', where: { where: 'searchAround', type: 'securitySearch' } }); } break; case "B": if (searchAround.awarenessSearch.length > 0) { var _data = { data: searchAround.awarenessSearch }; _events.default.emit('reducePictueMarks', { data: _data, type: 'perception', where: { where: 'searchAround', type: 'awarenessSearch' } }); // this.props.reducePictueMarks(data, 'perception', { // where: 'searchAround', // type: 'B' // }); } break; } } this.setState({ checkdata: e }); } }, { key: "_onChangeRange", value: function _onChangeRange() { //如果范围改变,要先把之前的点清掉,以避免重复,并且去掉圆圈 this.clearAll(); this.aPictureSearch(); // if(this.props._thisGIS.state.layerSatatus==="aPicture"){ // this.aPictureSearch() // }else{ // this.policeSearch() // } } }, { key: "aPictureSearch", value: function aPictureSearch() { var _this2 = this; var _this$props = this.props, lnglat = _this$props.lnglat, _thisGIS = _this$props._thisGIS; console.log(lnglat); var range = this.state.range; (0, _api.getRangeData)({}, { latitude: lnglat.latitude, longitude: lnglat.longitude, range: this.state.range }).then(function (res) { console.log('getRangeData', res); //画圈 var circle = new AMap.Circle({ center: new AMap.LngLat(lnglat.longitude, lnglat.latitude), // 圆心位置 radius: range, // 圆半径 fillColor: '#0e70ff', // 圆形填充颜色 fillOpacity: 0.3, // 圆形填充透明度,取值范围[0,1],0表示完全透明,1表示不透明。默认为0.9 strokeColor: '#0E70FF', // 描边颜色 strokeWeight: 1 // 描边宽度 }); _this2.state.circle && _thisGIS.state.map.remove(_this2.state.circle); _thisGIS.state.map.add(circle); // 缩放地图到合适的视野级别 _thisGIS.state.map.setFitView([circle]); _this2.setState({ circle: circle }); var securityManData = res.data && res.data.securityManData; var situationData = res.data && res.data.situationData; if (securityManData.length > 0) { securityManData = securityManData.map(function (item) { var location = item.item_lonlatjson && JSON.parse(item.item_lonlatjson); return { perId: item.item_userid, ID: item.item_userid, domainid: item.domainid, companyName: item.item_companyname, ATTENDANCESITENAME: item.item_attendancesitename, ATTENDANCESITEID: item.item_attendancesiteid, DEPTNAME: item.item_deptname, name: item.item_securityname, mobilePhone: item.item_phone, longitude: location && location.longitude || '', latitude: location && location.latitude || '' }; }); var _data2 = {}; _data2.data = securityManData; _this2.setState({ securityManData: _data2 }); _this2.props.dispatch({ type: "command/fetchSearchAroundList", payload: { list: securityManData } }); if (_this2.state.checkdata.indexOf("A") > -1) { // this.props.addPictueMarks(data, 'securityResource', { // where: 'searchAround', // type: 'A' // }); _events.default.emit('addPictueMarks', { data: _data2, type: 'securityResource', where: { where: 'searchAround', type: 'securitySearch' } }); } } else { if (_this2.state.checkdata.indexOf("A") > -1) { _message2.default.warning("保安员暂无数据..."); } } var data = {}; var situationList = []; if (situationData.length > 0) { situationData.map(function (item) { data.name = item.item_categoryname; data.mapIcon = item.item_categoryicon && JSON.parse(item.item_categoryicon)[0] && JSON.parse(item.item_categoryicon)[0].path; data.data = [{ position: item.item_placename, userName: item.item_username, phone: item.item_phone, equipmentName: item.item_equipmentname, equipmentId: item.item_equipmentid, company: item.item_company, type: item.item_type, status: item.item_status, definition: item.item_definition, heightPosition: item.item_heightposition, belong: '', //无 PRINCIPALNAME: '', PRINCIPALPHONENO: '', ATTENDANCESITENAME: '', ATTENDANCESITEADDRESS: '', ATTENDANCESITEFULLADDRESS: '', PERFORMRANGE: '', OFFICEPOLICEADDRESS: '', CONTRACTSTATE: '', SERVEOBJECTNAME: '', ATTENDANCESITECONTENT: '', latitude: item.item_latitude, longitude: item.item_longitude }]; situationList.push(data); if (_this2.state.checkdata.indexOf("B") > -1) { // this.props.addPictueMarks(data, 'perception', { // where: 'searchAround', // type: 'B' // }); _events.default.emit('addPictueMarks', { data: data, type: 'perception', where: { where: 'searchAround', type: 'awarenessSearch' } }); } }); _this2.setState({ situationData: situationList }); } else { if (_this2.state.checkdata.indexOf("B") > -1) { _message2.default.warning("动态感知设备暂无数据..."); } } }); } }, { key: "policeSearch", value: function policeSearch() { var _this3 = this; var _this$props2 = this.props, lnglat = _this$props2.lnglat, _thisGIS = _this$props2._thisGIS; console.log(lnglat); var range = this.state.range; (0, _api.getPoliceSearchInformation)({ _currpage: 1, lines: 1 }, { appId: "__ZLuP7RGirprZZ6SCdiX", containTitle: "警保联动搜索地点周围信息接口", field: "", opentarget: "detail", position: "{\"latitude\":".concat(lnglat.latitude, ",\"longitude\":").concat(lnglat.longitude, "}"), range: "".concat(this.state.range), viewId: "__alnvhRO3LL5hO0vBgb1" }).then(function (res) { console.log(res); //画圈 var circle = new AMap.Circle({ center: new AMap.LngLat(lnglat.longitude, lnglat.latitude), // 圆心位置 radius: range, // 圆半径 // fillColor: '#0e70ff', // 圆形填充颜色 // fillOpacity: 3, // 圆形填充透明度,取值范围[0,1],0表示完全透明,1表示不透明。默认为0.9 strokeColor: '#0E70FF', // 描边颜色 strokeWeight: 1 // 描边宽度 }); _thisGIS.state.map.add(circle); // 缩放地图到合适的视野级别 _thisGIS.state.map.setFitView([circle]); _this3.setState({ circle: circle }); var securityManData = res.data.data[0] && JSON.parse(res.data.data[0].securityManData); console.log(securityManData); var situationData = res.data.data[0] && JSON.parse(res.data.data[0].situationData); console.log(situationData); if (securityManData.length > 0) { securityManData = securityManData.map(function (item) { var location = item.item_lonlatjson && JSON.parse(item.item_lonlatjson); return { DEPTNAME: item.item_deptname, name: item.item_securityname, mobilePhone: item.item_phone, longitude: location && location.longitude || '', latitude: location && location.latitude || '' }; }); var _data3 = {}; _data3.data = securityManData; _this3.setState({ securityManData: _data3 }); if (_this3.state.checkdata.indexOf("A") > -1) { // this.props.addPictueMarks(data, 'securityResource', { // where: 'searchAround', // type: 'A' // }); _events.default.emit('addPictueMarks', { data: _data3, type: 'securityResource', where: { where: 'searchAround', type: 'securitySearch' } }); } } else { if (_this3.state.checkdata.indexOf("A") > -1) { _message2.default.warning("保安员暂无数据..."); } } var data = {}; var situationList = []; if (situationData.length > 0) { situationData.map(function (item) { data.name = item.item_categoryname; data.mapIcon = item.item_categoryicon && JSON.parse(item.item_categoryicon)[0] && JSON.parse(item.item_categoryicon)[0].path; data.data = [{ position: item.item_placename, userName: item.item_username, phone: item.item_phone, equipmentName: item.item_equipmentname, equipmentId: item.item_equipmentid, company: item.item_company, type: item.item_type, status: item.item_status, definition: item.item_definition, heightPosition: item.item_heightposition, belong: '', //无 PRINCIPALNAME: '', PRINCIPALPHONENO: '', ATTENDANCESITENAME: '', ATTENDANCESITEADDRESS: '', ATTENDANCESITEFULLADDRESS: '', PERFORMRANGE: '', OFFICEPOLICEADDRESS: '', CONTRACTSTATE: '', SERVEOBJECTNAME: '', ATTENDANCESITECONTENT: '', latitude: item.item_latitude, longitude: item.item_longitude }]; situationList.push(data); if (_this3.state.checkdata.indexOf("B") > -1) { // this.props.addPictueMarks(data, 'perception', { // where: 'searchAround', // type: 'B' // }); _events.default.emit('addPictueMarks', { data: data, type: 'perception', where: { where: 'searchAround', type: 'awarenessSearch' } }); } }); _this3.setState({ situationData: situationList }); } else { if (_this3.state.checkdata.indexOf("B") > -1) { _message2.default.warning("动态感知设备暂无数据..."); } } }).catch(function (err) { console.log(err); }); } //清掉所有周边搜索打点的值,并且把圆圈去掉 }, { key: "clearAll", value: function clearAll() { var _this$props3 = this.props, searchAround = _this$props3.searchAround, _thisGIS = _this$props3._thisGIS; var circle = this.state.circle; //先把之前的圆圈去掉 if (circle) { _thisGIS.state.map.remove(circle); setTimeout(function () { _thisGIS.state.map.remove(circle); }, 700); } if (searchAround.securitySearch.length > 0) { // let data = { // data: searchAround.securitySearch // } // this.props.reducePictueMarks(data, 'securityResource', { // where: 'searchAround', // type: 'A' // }); _events.default.emit('clearMapTag', 'securitySearch'); // eventCenter.emit('reducePictueMarks', { // data, // type: 'securityResource', // where: { // where: 'searchAround', // type: 'securitySearch' // } // }) } if (searchAround.awarenessSearch.length > 0) { // let data = { // data: searchAround.awarenessSearch // } // this.props.reducePictueMarks(data, 'perception', { // where: 'searchAround', // type: 'B' // }); _events.default.emit('clearMapTag', 'awarenessSearch'); // eventCenter.emit('reducePictueMarks', { // data, // type: 'perception', // where: { // where: 'searchAround', // type: 'awarenessSearch' // } // }) } } }, { key: "render", value: function render() { var _this4 = this; var range = this.state.range; return /*#__PURE__*/_react.default.createElement("div", { className: _index.default.right_click_search }, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("span", { className: _index.default.title }, "\u5468\u8FB9\u641C\u7D22"), " ", /*#__PURE__*/_react.default.createElement(_input.default, { style: { width: '100px' }, addonAfter: "\u7C73", value: range, onChange: function onChange(e) { _this4.setState({ range: e.target.value }, function () { _this4._onChangeRange(); }); } })), /*#__PURE__*/_react.default.createElement("span", { className: _index.default.close, onClick: this.onClose.bind(this) }, "x"), /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_checkbox.default.Group, { style: { width: '100%' }, onChange: function onChange(e) { _this4.onChange(e); } }, /*#__PURE__*/_react.default.createElement(_row.default, null, /*#__PURE__*/_react.default.createElement(_col.default, { span: 10 }, /*#__PURE__*/_react.default.createElement(_checkbox.default, { value: "A" }, "\u4FDD\u5B89\u5458")), /*#__PURE__*/_react.default.createElement(_col.default, { span: 14 }, /*#__PURE__*/_react.default.createElement(_checkbox.default, { value: "B" }, "\u52A8\u6001\u611F\u77E5\u8BBE\u5907")))))); } }]); }(_react.Component)) || _class); /***/ }), /***/ "jsww": /***/ (function(module, exports) { module.exports = "data:image/png;base64,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" /***/ }), /***/ "jwfv": /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 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 _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; var _util = __webpack_require__("eCjd"); var _validator = __webpack_require__("7c3y"); var _validator2 = _interopRequireDefault(_validator); var _messages2 = __webpack_require__("9xJI"); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } /** * Encapsulates a validation schema. * * @param descriptor An object declaring validation rules * for this schema. */ function Schema(descriptor) { this.rules = null; this._messages = _messages2.messages; this.define(descriptor); } Schema.prototype = { messages: function messages(_messages) { if (_messages) { this._messages = (0, _util.deepMerge)((0, _messages2.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' : _typeof(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.length > 2 && arguments[2] !== undefined ? arguments[2] : function () {}; 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 Promise.resolve(); } function complete(results) { var i = void 0; var errors = []; var fields = {}; function add(e) { if (Array.isArray(e)) { var _errors; errors = (_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 { fields = (0, _util.convertFieldsError)(errors); } callback(errors, fields); } if (options.messages) { var messages = this.messages(); if (messages === _messages2.messages) { messages = (0, _messages2.newMessages)(); } (0, _util.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 = _extends({}, source); } value = source[z] = rule.transform(value); } if (typeof rule === 'function') { rule = { validator: rule }; } else { rule = _extends({}, 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 = {}; return (0, _util.asyncMap)(series, options, function (data, doIt) { var rule = data.rule; var deep = (rule.type === 'object' || rule.type === 'array') && (_typeof(rule.fields) === 'object' || _typeof(rule.defaultField) === 'object'); deep = deep && (rule.required || !rule.required && data.value); rule.field = data.field; function addFullfield(key, schema) { return _extends({}, 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 (!options.suppressWarning && errors.length) { Schema.warning('async-validator:', errors); } if (errors.length && rule.message) { errors = [].concat(rule.message); } errors = errors.map((0, _util.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((0, _util.complementError)(rule)); } else if (options.error) { errors = [options.error(rule, (0, _util.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 = _extends({}, 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) { var finalErrors = []; if (errors && errors.length) { finalErrors.push.apply(finalErrors, errors); } if (errs && errs.length) { finalErrors.push.apply(finalErrors, errs); } doIt(finalErrors.length ? finalErrors : null); }); } } var res = void 0; if (rule.asyncValidator) { res = rule.asyncValidator(rule, data.value, cb, data.source, options); } else if (rule.validator) { res = rule.validator(rule, data.value, cb, data.source, options); if (res === true) { cb(); } else if (res === false) { cb(rule.message || rule.field + ' fails'); } else if (res instanceof Array) { cb(res); } else if (res instanceof Error) { cb(res.message); } } 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 && !_validator2['default'].hasOwnProperty(rule.type)) { throw new Error((0, _util.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 _validator2['default'].required; } return _validator2['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'); } _validator2['default'][type] = validator; }; Schema.warning = _util.warning; Schema.messages = _messages2.messages; exports['default'] = Schema; /***/ }), /***/ "k7S3": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAA80lEQVQ4T63TPyuHURjG8c+1sNqVwWAxeA9kMXgFMklJSKwmqz9JUjLJKzBYxHtQLAaDssvGcnR+PerpKfLD2U539/dc17mvOzqnlDKOBUxjpCk/4QqnSe7bLfm8lFIGsIslvOEaD019DFMYxDE2krzXWg/QNF9iEvvYTvLSfqmUMoQtrOMGMxXyCTjEMuaTnHdtdUBzOMNRkpU0nm9xkGTju+aW3Wp1DRMVUCUvYrgr+ytYY+cZJxVwh8cksz95vaXiAqMV8NojJZt9Anaq8n8B/NnCnz+xRrffMe5htTfGJom/D9K/RLkF+d0ydbLe1zp/AGnwlPk/ajrtAAAAAElFTkSuQmCC" /***/ }), /***/ "kDXx": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAALtJREFUOE/dkjEKwkAQRf+AlYI3SBU9gGKhXQ4hapNJl3PkKjM5hSRiq0fQU9goqRzZYLEEYYsUQqbct/tY/nxCzyH3Pk3TMxEtfRcRHUVk586Y+QRg5XMzq8qy3FKe5+OmaZ4/PvJS1UmID0EAgJj5DmDWCfEiIhvHsyy7mdm8k9NVVdftFpIkGcVxPPUvRFH0KIriHeKtoM+0AmauASw8kQGoVfXw5RWAbk9qEdkPYY2hqoa4C/G/PfgA5/zGESit+pQAAAAASUVORK5CYII=" /***/ }), /***/ "kQGz": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAiCAYAAAC0nUK+AAAAAXNSR0IArs4c6QAABJ1JREFUSA2VVl1oXEUUPmfu7takbZrsJjEELIoPTZo2CCmVVpI0LT4UjD5UKP6CFEqKoghF07eIRipWrD5oNdYWbAWtFTUPhQppNoKltInSJpv6i1IpTXYTk43ZJPtzx/PdeLezd3djciA7c875vm/OnTtnbpiWsL/rW1psTe026TZirmXSIU08yZr+YqKwYvqmPBL+jlkiBUww+RZtaG1jWx/WWm/Nz+ZGmPiytvjlqpHwhdwMUY647upSE5/3dWtbdwKoaqppVfuDFGjdRtZdtcTl60hPTVPmxk1Khi/SQu+3ZN8adzQVqzeDe9s6uavL9i5CUiXH6prPROuadXTzTj370WltLyxIuLghDxzw4MXqW86iwDzx6MbmVxzA9nad/GG4uGKBDPAx4f23wGs54hObWrZL1TYqWKmwuxZ44ENncmNrMxbw4Uendbe8bi59YR/572tAiPRsguLPvEipa6OOX+jHv7meyk68Tby61OGBnzhyjDNao/pWFd20Y4sI78DLK3nq0axG6vsrSwoDiIWBcw186MgLbIk1NG9VZGfakcSp4EDAxZE9HnPmFV+fJF/DhmwcE/gVX51wYi4ODvjQgWlbPSTitAsOjptpdnTCcdMjP6ESM+X46cjPTszFuQBXh7XepaS71iOBc2yaS5o7dZZWHzxAqqLcSWOEP/fJF45vxyZNmqmz3idFySbJI0mDmOaSUOFczykqe/dVeTzZtmSSEu+dpPToLw7cLcLlujryrFU+uRZmZYFV6DyurnQx5IojkLw46Pxlk8bExCEMHRh0pZt4DA5a2jQvycyZcy/utg7fVKRpCGDcFabp6RnTLTrX8VycoTOktKJzYOIS0rKfrpU8uYfY7/SYG8obkS95Yk82Dj50YKxUL0/cv7tMx//5Q/a9ovRgB5XuezwLXukkcfxTdCho0cpAyT0qdOlcXNZ5C5HEO8cp9eMIpis28MCHyUfkdb56Hi+UKOS/46icd+nlFMWfPbTiBSAMHvhyTIaCd695H7rZj0W0sW0DJ9OX5XyuJb+fcAnhrjCvBBBMwx6jmZyKIUw0rny8JTQ8cANOVhyOXJW7bVv3atIW/JV8iUQpwezbWRm5cAlcWI44AtG61v1E9geYL9dkS9NyjzwcjISdk+fy8j5JVdfDHyriIy5gOaOI7/cKg5cnjmCwRh0SQm5XIVHImHpCkfDi/evJFxTn/v60Rb7HZIEpD97rXq2803reG3T9guJIVoz2/amZnnOB+SMvsN/aK4XM5+cWI0XFka6KDJyW6hf72aOgWHdXXuu/7gnnuEuKA+mzfAfkUOVUJwuOBlXNGzlKBZz/FS8f7vtNQIdNrjRBB4+cuX3LmUljnnfOjRw1NTWVplKpYH2Kqo/qdefljgzF2R54xJruUErN+P3+ycHBwYTJMedOJ5oBd97Y2Fg9Pz9/byaTWTNGGX5AB5LVbG37jBOdV+yFGcRl4ara2trM2NjYrMszx6LbYtt2jQl8yY5/+bvOfNyjE7+acS/OzBUVl8e+ZQKnLDv9NE8eM2OYe3Fmfll7LtWtlf8JAzJaIpaR05Jczp7/C1QBiysmQiFWAAAAAElFTkSuQmCC" /***/ }), /***/ "kQue": /***/ (function(module, exports, __webpack_require__) { var MediaQueryDispatch = __webpack_require__("CXoh"); module.exports = new MediaQueryDispatch(); /***/ }), /***/ "kRvI": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = _default; var _react = _interopRequireDefault(__webpack_require__("GiK3")); var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("jlIA")); var _api = __webpack_require__("H/Zg"); var _modal = _interopRequireDefault(__webpack_require__("ezvz")); var _config = __webpack_require__("bzuE"); var _utils = __webpack_require__("oAV5"); var _store = _interopRequireDefault(__webpack_require__("Y4FN")); function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i.return) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); } function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, _regeneratorDefine2(e, r, n, t); } function _default() { loadMapScript.call(this); } function loadMapScript() { //基础地图底层 var script = document.createElement("script"); script.src = "https://webapi.amap.com/maps?v=1.4.15&key=9066916e054aa3083a6f081a2a9f9d7a&plugin=Map3D,AMap.ControlBar,AMap.MarkerClusterer,AMap.CircleEditor"; document.body.appendChild(script); //loca图层 var script2 = document.createElement("script"); script2.src = "https://webapi.amap.com/loca?v=1.3.0&key=9066916e054aa3083a6f081a2a9f9d7a"; document.body.appendChild(script2); //加载轨迹ui组件库 var script5 = document.createElement("script"); script5.src = "//webapi.amap.com/ui/1.1/main.js?v=1.1.1"; document.body.appendChild(script5); //视频调度sdk var script4 = document.createElement("script"); script4.src = "https://sqimg.qq.com/expert_qq/webrtc/3.0.6/WebRTCAPI.min.js"; document.body.appendChild(script4); var script3 = document.createElement("script"); script3.src = "https://cache.amap.com/lbs/static/addToolbar.js"; //百度地图图层 var script6 = document.createElement("script"); script6.src = "https://api.map.baidu.com/getscript?type=webgl&v=1.0&ak=8sVvl6fSdyUfLgIt277nlG6hasAWQ2CA&services="; document.body.appendChild(script6); // 百度地图样式 var script7 = document.createElement("link"); script7.href = "https://api.map.baidu.com/res/webgl/10/bmap.css"; document.head.appendChild(script7); if (!"AMap" in window) { document.body.appendChild(script3); } if (!"AMapUI" in window) { document.body.appendChild(script5); } loading.call(this); loadingBMap(); } function loadAMapUI() { //加载轨迹ui组件库 var script5 = document.createElement("script"); script5.src = "//webapi.amap.com/ui/1.1/main.js?v=1.1.1"; document.body.appendChild(script5); loadAMapUIAgain.call(this); } //判断是否已经加载完成Amap function loading() { var _this = this; function nextStep() { return new Promise(function (resolve) { setTimeout(function () { resolve("AMap" in window); }, 500); }); } function ajaxMap() { return _ajaxMap.apply(this, arguments); } function _ajaxMap() { _ajaxMap = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator().m(function _callee() { var ifComplete, i, _window, AMap, AMapUI; return _regenerator().w(function (_context) { while (1) switch (_context.n) { case 0: ifComplete = false; i = 0; case 1: if (!(i < 10)) { _context.n = 6; break; } if (ifComplete) { _context.n = 3; break; } console.log("没有"); _context.n = 2; return nextStep(); case 2: ifComplete = _context.v; _context.n = 5; break; case 3: if (!ifComplete) { _context.n = 4; break; } _window = window, AMap = _window.AMap, AMapUI = _window.AMapUI; console.log("第" + i + "次加载" + "地图初始化中。。。"); if (!AMap) { loadMapScript.call(_this); } else { _getLayoutAuthority.call(_this); // _this.initialMap(); // if (!AMapUI) { // loadAMapUI.call(_this) // } else { // } } return _context.a(3, 6); case 4: message.error("网络超时"); case 5: i++; _context.n = 1; break; case 6: return _context.a(2); } }, _callee); })); return _ajaxMap.apply(this, arguments); } ajaxMap(); } ; //判断是否已经加载完成AMapUI function loadAMapUIAgain() { var _this = this; function nextStep() { return new Promise(function (resolve) { setTimeout(function () { resolve("AMapUI" in window); }, 500); }); } function ajaxMap() { return _ajaxMap2.apply(this, arguments); } function _ajaxMap2() { _ajaxMap2 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator().m(function _callee2() { var ifComplete, i, _window2, AMapUI; return _regenerator().w(function (_context2) { while (1) switch (_context2.n) { case 0: ifComplete = false; i = 0; case 1: if (!(i < 10)) { _context2.n = 6; break; } if (ifComplete) { _context2.n = 3; break; } console.log("没有"); _context2.n = 2; return nextStep(); case 2: ifComplete = _context2.v; _context2.n = 5; break; case 3: if (!ifComplete) { _context2.n = 4; break; } _window2 = window, AMapUI = _window2.AMapUI; console.log("第" + i + "次加载" + "AMapUI。。。"); if (!AMapUI) { loadAMapUI.call(_this); } else { // InitTraietory.call(_this) } return _context2.a(3, 6); case 4: message.error("网络超时"); case 5: i++; _context2.n = 1; break; case 6: return _context2.a(2); } }, _callee2); })); return _ajaxMap2.apply(this, arguments); } ajaxMap(); } //判断是否已经加载完成BMapGL function loadingBMap() { var _this = this; function nextStep() { return new Promise(function (resolve) { setTimeout(function () { resolve("BMapGL" in window); }, 500); }); } function ajaxMap() { return _ajaxMap3.apply(this, arguments); } function _ajaxMap3() { _ajaxMap3 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator().m(function _callee3() { var ifComplete, i, _window3, BMapGL; return _regenerator().w(function (_context3) { while (1) switch (_context3.n) { case 0: ifComplete = false; i = 0; case 1: if (!(i < 10)) { _context3.n = 6; break; } if (ifComplete) { _context3.n = 3; break; } console.log("没有"); _context3.n = 2; return nextStep(); case 2: ifComplete = _context3.v; _context3.n = 5; break; case 3: if (!ifComplete) { _context3.n = 4; break; } _window3 = window, BMapGL = _window3.BMapGL; console.log("第" + i + "次加载" + "地球初始化中。。。"); return _context3.a(3, 6); case 4: message.error("网络超时"); case 5: i++; _context3.n = 1; break; case 6: return _context3.a(2); } }, _callee3); })); return _ajaxMap3.apply(this, arguments); } ajaxMap(); } ; //获取图层权限信息 function _getLayoutAuthority() { var _this2 = this; var app_type = _store.default.get('saas')['app_type']; if (app_type == 1) { this.props.dispatch({ type: 'command/setLayoutAuthority', payload: { defaultLayer: "是", defaultLayerName: "基础调度" } }); this.setState({ showEarchMap: false }); this.initialMap("attendance", "normalMap"); var _window4 = window, AMapUI = _window4.AMapUI; if (!AMapUI) { loadAMapUI.call(this); } } else { (0, _api.getLayoutAuthority)({ _currpage: 1, lines: 1 }, { appId: "__ZLuP7RGirprZZ6SCdiX", viewId: "__jN3d9GetQI3p4DdC5To", opentarget: "detail", containTitle: "图层权限设置" }).then(function (res) { if (res.data && res.data.data) { var data = res.data.data[0]; // attendancePermissions: 助勤点图层 // basisLayer: 增值图层 // customLayer: 定制图层 // defaultLayer: 监管图层 // domainPermissions: 保安企业图层 // additionalLayer 附加图层是否开启 // additionalName 附加图层名称 // earthLayer: 地图图层 // hardWarePermissions: 硬件图层 // peoplePermissions: 保安人员 // additionalType 附加图层类型 if (!data) { return (0, _modal.default)(/*#__PURE__*/_react.default.createElement("span", { style: { color: 'orange' } }, "\u60A8\u6CA1\u6709\u6743\u9650\u4F7F\u7528\u8BE5\u670D\u52A1"), '', []); } if (!data.defaultLayer && !data.basisLayer && !data.customLayer && data.additionalLayer) { return (0, _modal.default)(/*#__PURE__*/_react.default.createElement("span", { style: { color: 'orange' } }, "\u60A8\u6CA1\u6709\u6743\u9650\u4F7F\u7528\u8BE5\u670D\u52A1"), '', []); } var baseUrl = (0, _config.getHostByPath)('v5base'); //判断logo图片路径如果返回obs,直接用obs路径,否则用/obpm全路径拼接 var commonLogo = ''; var dataCommonLogo = data.commonLogo && JSON.parse(data.commonLogo)[0].path; if (dataCommonLogo.indexOf('http') > -1) { commonLogo = dataCommonLogo; } else { commonLogo = "".concat(baseUrl, "/obpm").concat(dataCommonLogo); } var darkLogo = ''; var datadarkLogo = data.darkLogo && JSON.parse(data.darkLogo)[0].path; if (datadarkLogo.indexOf('http') > -1) { darkLogo = datadarkLogo; } else { darkLogo = "".concat(baseUrl, "/obpm").concat(datadarkLogo); } // let commonLogo = data.commonLogo.length > 0 ? `${baseUrl}/obpm${JSON.parse(data.commonLogo)[0].path}` : "" // let darkLogo = data.darkLogo.length > 0 ? `${baseUrl}/obpm${JSON.parse(data.darkLogo)[0].path}` : "" // data.customLayer = "" _this2.props.dispatch({ type: 'command/setLayoutAuthority', payload: { attendanceMapShow: data.defaultLayer, aPictureMapShow: data.customLayer, policeMapShow: data.basisLayer, defaultLayer: data.defaultLayer, basisLayer: data.basisLayer, customLayer: data.customLayer, additionalLayer: data.additionalLayer, attendancePermissions: data.attendancePermissions, basisLayerName: data.basisLayerName || "增值图层", customLayerName: data.customLayerName || "定制图层", defaultLayerName: data.defaultLayerName || "监管图层", additionalName: data.additionalName, domainPermissions: data.domainPermissions, earthLayer: data.earthLayer, hardWarePermissions: data.hardWarePermissions, peoplePermissions: data.peoplePermissions, commonLogo: commonLogo, darkLogo: darkLogo, additionalType: data.additionalType } }); if (data.customLayer) { // this.props.dispatch({ // type: 'command/setMapStyle', // payload: 'dark' // }) } else { _this2.setState({ showEarchMap: false }); } // this.setState({ // showEarchMap: false, // }) var layoutName = ''; var mapName = ''; if (data.customLayer) { layoutName = 'aPicture'; mapName = 'locaMap'; } else if (data.defaultLayer) { layoutName = 'attendance'; mapName = 'normalMap'; } else if (data.twoLayer) { layoutName = 'person'; mapName = 'personMap'; } else if (data.basisLayer) { layoutName = 'police'; mapName = 'policeMap'; } else if (data.additionalLayer && data.additionalType == "南宁海康押运") { layoutName = 'nanNing'; mapName = 'nanNingMap'; } _this2.initialMap(layoutName, mapName); var _window5 = window, _AMapUI = _window5.AMapUI; if (!_AMapUI) { loadAMapUI.call(_this2); } } }); } } /***/ }), /***/ "kXYA": /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); function supportRef(node) { // Function component if (node.type && node.type.prototype && !node.type.prototype.render) { return false; } return true; } exports.supportRef = supportRef; /***/ }), /***/ "ke6Y": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = showInsuranceModal; var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); var _reactDom = _interopRequireDefault(__webpack_require__("O27J")); var _MouseMovement = _interopRequireDefault(__webpack_require__("06MX")); var _index = _interopRequireDefault(__webpack_require__("W7F7")); function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } // 弹窗组件 var NormalModal = /*#__PURE__*/function (_Component) { function NormalModal(props, context) { var _this; (0, _classCallCheck2.default)(this, NormalModal); _this = _callSuper(this, NormalModal, [props, context]); console.log(props); _this.state = { isDown: false, className: props.className, offsetLeft: 0, offsetTop: 0 }; return _this; } (0, _inherits2.default)(NormalModal, _Component); return (0, _createClass2.default)(NormalModal, [{ key: "render", value: function render() { var _this2 = this; return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_MouseMovement.default, { isDown: this.state.isDown, offsetLeft: this.state.offsetLeft, offsetTop: this.state.offsetTop }, function (_ref) { var x = _ref.x, y = _ref.y, _ref$cursor = _ref.cursor, cursor = _ref$cursor === void 0 ? 'move' : _ref$cursor; return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("div", { style: { cursor: 'pointer', position: 'absolute', top: y == 0 ? '8' : y, left: x == 0 ? 500 : x + 500, zIndex: '1002' }, onClick: function onClick(e) { e.preventDefault(); // 删除组件 setTimeout(function () { var divs = document.getElementsByClassName(_this2.state.className); Reflect.apply(Array.prototype.forEach, divs, [function (item) { _reactDom.default.unmountComponentAtNode(item); document.body.removeChild(item); }]); }, 300); } }, "X"), /*#__PURE__*/_react.default.createElement("div", { className: _index.default.map_video + ' video', onMouseDown: function onMouseDown(e) { _this2.setState({ isDown: true, offsetLeft: document.getElementsByClassName('video')[0].offsetLeft, offsetTop: document.getElementsByClassName('video')[0].offsetTop }); }, style: { cursor: 'move', top: y == 0 ? '8' : y, left: x == 0 ? '16' : x } }, /*#__PURE__*/_react.default.createElement("iframe", { allowFullScreen: true, style: { width: "100%", height: "100%" }, src: "https://wvp.test.baibaodun.cn/#/play/wasm/wss%3A%2F%2Fwvp.test.baibaodun.cn%2Frtp%2Fgb_play_44010200492000000002_34090000001320000001.flv" }))); })); } }]); }(_react.Component); // 插入弹窗 function showInsuranceModal(props) { var calassName = Math.random() * 10 + 'n_openVideo'; var div = document.createElement('div'); div.setAttribute('class', calassName); document.body.appendChild(div); props.className = calassName; _reactDom.default.render(/*#__PURE__*/_react.default.createElement(NormalModal, props), div); } /***/ }), /***/ "lNEh": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAK9JREFUOE+l000OwiAQBeAhaUzkBlxPF4RbzAlwC+eobnTBPVj6s+ACLpmmRk2rpXaQJeF9yUweAv48Yi4fQmhijCut9b30rgh472XOuQWAvTFmxwIG4XNKaYuIeTHACffoaARueATUhN8AEQnn3AkALr9m/tzFY4QncASAW0ppM7e0SaC/tNaupZQtEV05yGiJNchXkbjIZBM5SLHKA+TArvJr04jYKKXqPtPSX94BFiCTEcW54swAAAAASUVORK5CYII=" /***/ }), /***/ "lc4m": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _toConsumableArray2 = _interopRequireDefault(__webpack_require__("V4Os")); __webpack_require__("UQ5M"); var _message2 = _interopRequireDefault(__webpack_require__("/qCn")); var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); var _dva = __webpack_require__("S6G3"); var _imInitialize = _interopRequireDefault(__webpack_require__("cLc/")); __webpack_require__("RKq/"); var _MessageSendBox = _interopRequireDefault(__webpack_require__("Wg2s")); var _TextElement = _interopRequireDefault(__webpack_require__("Ogtn")); var _ImageElement = _interopRequireDefault(__webpack_require__("PNws")); var _SoundElement = _interopRequireDefault(__webpack_require__("xOiI")); var _FileElement = _interopRequireDefault(__webpack_require__("zGZP")); var _GroupSystemNoticeElement = _interopRequireDefault(__webpack_require__("KXcl")); var _CustomSoundElement = _interopRequireDefault(__webpack_require__("mFI/")); var _utils = __webpack_require__("oAV5"); var _Close = _interopRequireDefault(__webpack_require__("hBni")); var _Record = _interopRequireDefault(__webpack_require__("tVfF")); var _dec, _class; /** * 当前会话内容 */ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } var CurrentConversation = exports.default = (_dec = (0, _dva.connect)(function (state) { return { isCompleted: state.im.isCompleted, nextReqMessageID: state.im.nextReqMessageID, currentUserProfile: state.im.currentUserProfile, currentMessageList: state.im.currentMessageList, currentConversation: state.im.currentConversation, ownName: state.user.currentUser.name, ownAvatar: state.user.currentUser.avatar }; }), _dec(_class = /*#__PURE__*/function (_Component) { function CurrentConversation(props) { var _this; (0, _classCallCheck2.default)(this, CurrentConversation); _this = _callSuper(this, CurrentConversation, [props]); _this.state = { visible: props.visible, currentMessageList: _this.props.currentMessageList, //这个不用渲染数据,只用来记录是否有新数据的传入 // preScrollHeight: 0 startRecord: false, //是否开始录音(用来判断显示录音的页面是否出现) sendSoundURL: null, //录完音要发送的录音路径 sendSoundTime: null, //录完音的时长 key: props.key, isSeeMore: false }; return _this; } (0, _inherits2.default)(CurrentConversation, _Component); return (0, _createClass2.default)(CurrentConversation, [{ key: "componentDidMount", value: function componentDidMount() { this.scrollMessageListToButtom(); } }, { key: "componentWillReceiveProps", value: function componentWillReceiveProps(nextProps) { this.setState({ currentMessageList: nextProps.currentMessageList, key: nextProps.key }); // if ( // this.props.currentMessageList.length !== // this.state.currentMessageList.length // ) { // //当前的会话打开的时候就要进行已读上传 // tim.setMessageRead({ // conversationID: this.props.currentConversation.conversationID // }); // this.scrollMessageListToButtom(); // } if (nextProps.currentMessageList.length > this.state.currentMessageList.length) { _imInitialize.default.setMessageRead({ conversationID: this.props.currentConversation.conversationID }); if (this.state.isSeeMore) { //是查看更多的时候,就不需要滑动到底部 this.setState({ isSeeMore: false }); } else { this.scrollMessageListToButtom(); } } } // 直接滚到底部 }, { key: "scrollMessageListToButtom", value: function scrollMessageListToButtom() { var that = this; var t2 = window.setInterval(function () { // console.log('每隔1秒钟执行一次'); if (that.refs.messageList) { that.refs.messageList.scrollIntoView(true); window.clearInterval(t2); } }, 50); } //查看更多 }, { key: "getMessageList", value: function getMessageList() { var _this2 = this; if (this.props.isCompleted) { _message2.default.info('没有更多的历史消息了'); return; } var _this$props = this.props, nextReqMessageID = _this$props.nextReqMessageID, currentMessageList = _this$props.currentMessageList; _imInitialize.default.getMessageList({ conversationID: this.props.currentConversation.conversationID, nextReqMessageID: nextReqMessageID, count: 15 }).then(function (imReponse) { _this2.setState({ isSeeMore: true }); // 更新messageID,续拉时要用到 _this2.props.dispatch({ type: 'im/updateCurrentConversationCont', payload: { nextReqMessageID: imReponse.data.nextReqMessageID, isCompleted: imReponse.data.isCompleted, currentMessageList: [].concat((0, _toConsumableArray2.default)(imReponse.data.messageList), (0, _toConsumableArray2.default)(currentMessageList)) // 更新当前消息列表,从头部插入 } }); }); } }, { key: "render", value: function render() { var _this3 = this; var name = ''; //会话名称 var avatar = ''; //会话头像 if (this.props.currentConversation.type === 'C2C') { name = this.props.currentConversation.userProfile.nick; avatar = this.props.currentConversation.userProfile.avatar; } else if (this.props.currentConversation.type === 'GROUP') { name = this.props.currentConversation.groupProfile.name; avatar = __webpack_require__("PgSr"); } return /*#__PURE__*/_react.default.createElement("div", { className: "current-conversation-wrapper", key: this.state.key }, // this.state.startRecord ? ( this.state.startRecord && /*#__PURE__*/_react.default.createElement(_Record.default, { sendSound: function sendSound(url, time) { _this3.setState({ sendSoundURL: url, sendSoundTime: time }); }, startRecord: this.state.startRecord }), /*#__PURE__*/_react.default.createElement("div", { className: "current-conversation" }, /*#__PURE__*/_react.default.createElement("div", { className: "current-header" }, avatar ? /*#__PURE__*/_react.default.createElement("img", { src: avatar }) : /*#__PURE__*/_react.default.createElement("div", { className: "span-header" }, /*#__PURE__*/_react.default.createElement("span", null, name ? name.substring(name.length - 2, name.length) : '')), /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("span", { className: "conversation-name text-ellipsis", style: { maxWidth: '60%' } }, name)), /*#__PURE__*/_react.default.createElement(_Close.default, { closeClick: function closeClick() { //重置当前打开的会话消息 _this3.props.dispatch({ type: "im/updateCurrentConversation", payload: {} }); _this3.props.closeClick(); } })), /*#__PURE__*/_react.default.createElement("div", { className: "content" }, /*#__PURE__*/_react.default.createElement("div", { className: "message-list" }, /*#__PURE__*/_react.default.createElement("div", { type: "text", style: { textAlign: 'center', color: '#409EFF', cursor: 'pointer', display: this.props.isCompleted ? 'none' : 'block' }, onClick: function onClick() { _this3.getMessageList(); } }, "\u67E5\u770B\u66F4\u591A"), this.props.currentMessageList.map(function (item, index) { var isMine = item.flow === 'out'; var content = null; //对话内容 //选择对话的类型 if (item.type === 'TIMTextElem') { content = /*#__PURE__*/_react.default.createElement(_TextElement.default, { isMine: item.flow === 'out', payload: item.payload, index: index }); } else if (item.type === 'TIMImageElem') { //图片 content = /*#__PURE__*/_react.default.createElement(_ImageElement.default, { payload: item.payload, index: index }); } else if (item.type === 'TIMSoundElem') { //移动端发过来语音 content = /*#__PURE__*/_react.default.createElement(_SoundElement.default, { payload: item.payload, index: index }); } else if (item.type === 'TIMCustomElem') { //web端发过去自定义语音 content = /*#__PURE__*/_react.default.createElement(_CustomSoundElement.default, { payload: item.payload, index: index }); } else if (item.type === 'TIMFileElem') { //文件 content = /*#__PURE__*/_react.default.createElement(_FileElement.default, { payload: item.payload, index: index }); } else if (item.type === 'TIMGroupSystemNoticeElem') { //系统消息 content = /*#__PURE__*/_react.default.createElement(_GroupSystemNoticeElement.default, { payload: item.payload, index: index }); } var form = ''; var formName = ''; var inform = ''; //群消息的情况(谁谁创建了群组之类的消息) if (_this3.props.currentConversation.type === 'GROUP' && item.type === 'TIMCustomElem' && item.elements[0].content.data === 'group_create') { inform = item.elements[0].content.extension; return /*#__PURE__*/_react.default.createElement("div", { className: "message-wrapper position-center", key: index }, inform); } else { //个人对话的情况 if (isMine) { //如果是自己发的消息 // form = this.props.currentUserProfile.avatar; // formName = this.props.currentUserProfile.nick; form = _this3.props.ownAvatar; formName = _this3.props.ownName; } else { //接收的消息 form = item.avatar || _this3.props.currentConversation.userProfile && _this3.props.currentConversation.userProfile.avatar; formName = item.nick || _this3.props.currentConversation.userProfile && _this3.props.currentConversation.userProfile.nick; // form=this.props.currentConversation.userProfile.nick // formName = // this.props.currentConversation.userProfile && // this.props.currentConversation.userProfile.nick; } return /*#__PURE__*/_react.default.createElement("div", { className: isMine ? 'message-wrapper position-right' : 'message-wrapper position-left', key: index }, isMine ? /*#__PURE__*/_react.default.createElement("div", { className: "from", style: { textAlign: 'right', color: 'gray', fontSize: '14px' } }, content, form ? /*#__PURE__*/_react.default.createElement("img", { src: form }) : /*#__PURE__*/_react.default.createElement("div", { className: "img-span" }, /*#__PURE__*/_react.default.createElement("span", null, formName ? formName.substring(formName.length - 2, formName.length) : ''))) : /*#__PURE__*/_react.default.createElement("div", { className: "from", style: { textAlign: 'left', color: 'gray', fontSize: '14px' } }, form ? /*#__PURE__*/_react.default.createElement("img", { src: form }) : /*#__PURE__*/_react.default.createElement("span", { className: "img-span" }, formName ? formName.substring(formName.length - 2, formName.length) : ''), content)); } }), /*#__PURE__*/_react.default.createElement("div", { style: { float: 'left', clear: 'both' }, ref: "messageList" }))), /*#__PURE__*/_react.default.createElement(_MessageSendBox.default, { startRecord: function startRecord(value) { _this3.setState({ startRecord: value }); }, messageSendSoundURL: this.state.sendSoundURL, messageSendSoundTime: this.state.sendSoundTime }))); } }]); }(_react.Component)) || _class); /***/ }), /***/ "lgO+": /***/ (function(module, exports) { module.exports = "data:image/png;base64,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" /***/ }), /***/ "m4Fn": /***/ (function(module, exports) { // removed by extract-text-webpack-plugin module.exports = {"treeList":"treeList___3aeW-","timeContent":"timeContent___3YYJD","point":"point___1-qji","broadcast":"broadcast___H3jkO","dark":"dark___2Mf9Z","hk":"hk___2j1VA","fullScreen":"fullScreen___1O8nR","searchCar":"searchCar___2HvKB","title":"title___2W0sH","onlineSwitch":"onlineSwitch___SvKhA"}; /***/ }), /***/ "m6wg": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); // EXTERNAL MODULE: ./node_modules/react/index.js var react = __webpack_require__("GiK3"); var react_default = /*#__PURE__*/__webpack_require__.n(react); // EXTERNAL MODULE: ./node_modules/moment/moment.js var moment = __webpack_require__("PJh5"); var moment_default = /*#__PURE__*/__webpack_require__.n(moment); // EXTERNAL MODULE: ./node_modules/omit.js/es/index.js var es = __webpack_require__("JkBm"); // EXTERNAL MODULE: ./node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js var react_lifecycles_compat_es = __webpack_require__("R8mX"); // EXTERNAL MODULE: ./node_modules/prop-types/index.js var prop_types = __webpack_require__("KSGD"); var prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types); // EXTERNAL MODULE: ./node_modules/rc-trigger/es/index.js + 4 modules var rc_trigger_es = __webpack_require__("isWq"); // EXTERNAL MODULE: ./node_modules/classnames/index.js var classnames = __webpack_require__("HW6M"); var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); // EXTERNAL MODULE: ./node_modules/rc-time-picker/es/Panel.js + 3 modules var Panel = __webpack_require__("Nl98"); // CONCATENATED MODULE: ./node_modules/rc-time-picker/es/placements.js var autoAdjustOverflow = { adjustX: 1, adjustY: 1 }; var targetOffset = [0, 0]; var placements = { bottomLeft: { points: ['tl', 'tl'], overflow: autoAdjustOverflow, offset: [0, -3], targetOffset: targetOffset }, bottomRight: { points: ['tr', 'tr'], overflow: autoAdjustOverflow, offset: [0, -3], targetOffset: targetOffset }, topRight: { points: ['br', 'br'], overflow: autoAdjustOverflow, offset: [0, 3], targetOffset: targetOffset }, topLeft: { points: ['bl', 'bl'], overflow: autoAdjustOverflow, offset: [0, 3], targetOffset: targetOffset } }; /* harmony default export */ var es_placements = (placements); // CONCATENATED MODULE: ./node_modules/rc-time-picker/es/TimePicker.js function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } 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; } /* eslint jsx-a11y/no-autofocus: 0 */ function noop() {} function refFn(field, component) { this[field] = component; } var TimePicker_Picker = /*#__PURE__*/ function (_Component) { _inherits(Picker, _Component); function Picker(props) { var _this; _classCallCheck(this, Picker); _this = _possibleConstructorReturn(this, _getPrototypeOf(Picker).call(this, props)); _defineProperty(_assertThisInitialized(_this), "onPanelChange", function (value) { _this.setValue(value); }); _defineProperty(_assertThisInitialized(_this), "onAmPmChange", function (ampm) { var onAmPmChange = _this.props.onAmPmChange; onAmPmChange(ampm); }); _defineProperty(_assertThisInitialized(_this), "onClear", function (event) { event.stopPropagation(); _this.setValue(null); _this.setOpen(false); }); _defineProperty(_assertThisInitialized(_this), "onVisibleChange", function (open) { _this.setOpen(open); }); _defineProperty(_assertThisInitialized(_this), "onEsc", function () { _this.setOpen(false); _this.focus(); }); _defineProperty(_assertThisInitialized(_this), "onKeyDown", function (e) { if (e.keyCode === 40) { _this.setOpen(true); } }); _this.saveInputRef = refFn.bind(_assertThisInitialized(_this), 'picker'); _this.savePanelRef = refFn.bind(_assertThisInitialized(_this), 'panelInstance'); var defaultOpen = props.defaultOpen, defaultValue = props.defaultValue, _props$open = props.open, _open = _props$open === void 0 ? defaultOpen : _props$open, _props$value = props.value, _value = _props$value === void 0 ? defaultValue : _props$value; _this.state = { open: _open, value: _value }; return _this; } _createClass(Picker, [{ key: "setValue", value: function setValue(value) { var onChange = this.props.onChange; if (!('value' in this.props)) { this.setState({ value: value }); } onChange(value); } }, { key: "getFormat", value: function getFormat() { var _this$props = this.props, format = _this$props.format, showHour = _this$props.showHour, showMinute = _this$props.showMinute, showSecond = _this$props.showSecond, use12Hours = _this$props.use12Hours; if (format) { return format; } if (use12Hours) { var fmtString = [showHour ? 'h' : '', showMinute ? 'mm' : '', showSecond ? 'ss' : ''].filter(function (item) { return !!item; }).join(':'); return fmtString.concat(' a'); } return [showHour ? 'HH' : '', showMinute ? 'mm' : '', showSecond ? 'ss' : ''].filter(function (item) { return !!item; }).join(':'); } }, { key: "getPanelElement", value: function getPanelElement() { var _this$props2 = this.props, prefixCls = _this$props2.prefixCls, placeholder = _this$props2.placeholder, disabledHours = _this$props2.disabledHours, disabledMinutes = _this$props2.disabledMinutes, disabledSeconds = _this$props2.disabledSeconds, hideDisabledOptions = _this$props2.hideDisabledOptions, inputReadOnly = _this$props2.inputReadOnly, showHour = _this$props2.showHour, showMinute = _this$props2.showMinute, showSecond = _this$props2.showSecond, defaultOpenValue = _this$props2.defaultOpenValue, clearText = _this$props2.clearText, addon = _this$props2.addon, use12Hours = _this$props2.use12Hours, focusOnOpen = _this$props2.focusOnOpen, onKeyDown = _this$props2.onKeyDown, hourStep = _this$props2.hourStep, minuteStep = _this$props2.minuteStep, secondStep = _this$props2.secondStep, clearIcon = _this$props2.clearIcon; var value = this.state.value; return react_default.a.createElement(Panel["a" /* default */], { clearText: clearText, prefixCls: "".concat(prefixCls, "-panel"), ref: this.savePanelRef, value: value, inputReadOnly: inputReadOnly, onChange: this.onPanelChange, onAmPmChange: this.onAmPmChange, defaultOpenValue: defaultOpenValue, showHour: showHour, showMinute: showMinute, showSecond: showSecond, onEsc: this.onEsc, format: this.getFormat(), placeholder: placeholder, disabledHours: disabledHours, disabledMinutes: disabledMinutes, disabledSeconds: disabledSeconds, hideDisabledOptions: hideDisabledOptions, use12Hours: use12Hours, hourStep: hourStep, minuteStep: minuteStep, secondStep: secondStep, addon: addon, focusOnOpen: focusOnOpen, onKeyDown: onKeyDown, clearIcon: clearIcon }); } }, { key: "getPopupClassName", value: function getPopupClassName() { var _this$props3 = this.props, showHour = _this$props3.showHour, showMinute = _this$props3.showMinute, showSecond = _this$props3.showSecond, use12Hours = _this$props3.use12Hours, prefixCls = _this$props3.prefixCls, popupClassName = _this$props3.popupClassName; var selectColumnCount = 0; if (showHour) { selectColumnCount += 1; } if (showMinute) { selectColumnCount += 1; } if (showSecond) { selectColumnCount += 1; } if (use12Hours) { selectColumnCount += 1; } // Keep it for old compatibility return classnames_default()(popupClassName, _defineProperty({}, "".concat(prefixCls, "-panel-narrow"), (!showHour || !showMinute || !showSecond) && !use12Hours), "".concat(prefixCls, "-panel-column-").concat(selectColumnCount)); } }, { key: "setOpen", value: function setOpen(open) { var _this$props4 = this.props, onOpen = _this$props4.onOpen, onClose = _this$props4.onClose; var currentOpen = this.state.open; if (currentOpen !== open) { if (!('open' in this.props)) { this.setState({ open: open }); } if (open) { onOpen({ open: open }); } else { onClose({ open: open }); } } } }, { key: "focus", value: function focus() { this.picker.focus(); } }, { key: "blur", value: function blur() { this.picker.blur(); } }, { key: "renderClearButton", value: function renderClearButton() { var _this2 = this; var value = this.state.value; var _this$props5 = this.props, prefixCls = _this$props5.prefixCls, allowEmpty = _this$props5.allowEmpty, clearIcon = _this$props5.clearIcon, clearText = _this$props5.clearText, disabled = _this$props5.disabled; if (!allowEmpty || !value || disabled) { return null; } if (react_default.a.isValidElement(clearIcon)) { var _ref = clearIcon.props || {}, _onClick = _ref.onClick; return react_default.a.cloneElement(clearIcon, { onClick: function onClick() { if (_onClick) _onClick.apply(void 0, arguments); _this2.onClear.apply(_this2, arguments); } }); } return react_default.a.createElement("a", { role: "button", className: "".concat(prefixCls, "-clear"), title: clearText, onClick: this.onClear, tabIndex: 0 }, clearIcon || react_default.a.createElement("i", { className: "".concat(prefixCls, "-clear-icon") })); } }, { key: "render", value: function render() { var _this$props6 = this.props, prefixCls = _this$props6.prefixCls, placeholder = _this$props6.placeholder, placement = _this$props6.placement, align = _this$props6.align, id = _this$props6.id, disabled = _this$props6.disabled, transitionName = _this$props6.transitionName, style = _this$props6.style, className = _this$props6.className, getPopupContainer = _this$props6.getPopupContainer, name = _this$props6.name, autoComplete = _this$props6.autoComplete, onFocus = _this$props6.onFocus, onBlur = _this$props6.onBlur, autoFocus = _this$props6.autoFocus, inputReadOnly = _this$props6.inputReadOnly, inputIcon = _this$props6.inputIcon, popupStyle = _this$props6.popupStyle; var _this$state = this.state, open = _this$state.open, value = _this$state.value; var popupClassName = this.getPopupClassName(); return react_default.a.createElement(rc_trigger_es["a" /* default */], { prefixCls: "".concat(prefixCls, "-panel"), popupClassName: popupClassName, popupStyle: popupStyle, popup: this.getPanelElement(), popupAlign: align, builtinPlacements: es_placements, popupPlacement: placement, action: disabled ? [] : ['click'], destroyPopupOnHide: true, getPopupContainer: getPopupContainer, popupTransitionName: transitionName, popupVisible: open, onPopupVisibleChange: this.onVisibleChange }, react_default.a.createElement("span", { className: classnames_default()(prefixCls, className), style: style }, react_default.a.createElement("input", { className: "".concat(prefixCls, "-input"), ref: this.saveInputRef, type: "text", placeholder: placeholder, name: name, onKeyDown: this.onKeyDown, disabled: disabled, value: value && value.format(this.getFormat()) || '', autoComplete: autoComplete, onFocus: onFocus, onBlur: onBlur, autoFocus: autoFocus, onChange: noop, readOnly: !!inputReadOnly, id: id }), inputIcon || react_default.a.createElement("span", { className: "".concat(prefixCls, "-icon") }), this.renderClearButton())); } }], [{ key: "getDerivedStateFromProps", value: function getDerivedStateFromProps(props, state) { var newState = {}; if ('value' in props) { newState.value = props.value; } if (props.open !== undefined) { newState.open = props.open; } return Object.keys(newState).length > 0 ? _objectSpread({}, state, {}, newState) : null; } }]); return Picker; }(react["Component"]); _defineProperty(TimePicker_Picker, "propTypes", { prefixCls: prop_types_default.a.string, clearText: prop_types_default.a.string, value: prop_types_default.a.object, defaultOpenValue: prop_types_default.a.object, inputReadOnly: prop_types_default.a.bool, disabled: prop_types_default.a.bool, allowEmpty: prop_types_default.a.bool, defaultValue: prop_types_default.a.object, open: prop_types_default.a.bool, defaultOpen: prop_types_default.a.bool, align: prop_types_default.a.object, placement: prop_types_default.a.any, transitionName: prop_types_default.a.string, getPopupContainer: prop_types_default.a.func, placeholder: prop_types_default.a.string, format: prop_types_default.a.string, showHour: prop_types_default.a.bool, showMinute: prop_types_default.a.bool, showSecond: prop_types_default.a.bool, style: prop_types_default.a.object, className: prop_types_default.a.string, popupClassName: prop_types_default.a.string, popupStyle: prop_types_default.a.object, disabledHours: prop_types_default.a.func, disabledMinutes: prop_types_default.a.func, disabledSeconds: prop_types_default.a.func, hideDisabledOptions: prop_types_default.a.bool, onChange: prop_types_default.a.func, onAmPmChange: prop_types_default.a.func, onOpen: prop_types_default.a.func, onClose: prop_types_default.a.func, onFocus: prop_types_default.a.func, onBlur: prop_types_default.a.func, addon: prop_types_default.a.func, name: prop_types_default.a.string, autoComplete: prop_types_default.a.string, use12Hours: prop_types_default.a.bool, hourStep: prop_types_default.a.number, minuteStep: prop_types_default.a.number, secondStep: prop_types_default.a.number, focusOnOpen: prop_types_default.a.bool, onKeyDown: prop_types_default.a.func, autoFocus: prop_types_default.a.bool, id: prop_types_default.a.string, inputIcon: prop_types_default.a.node, clearIcon: prop_types_default.a.node }); _defineProperty(TimePicker_Picker, "defaultProps", { clearText: 'clear', prefixCls: 'rc-time-picker', defaultOpen: false, inputReadOnly: false, style: {}, className: '', popupClassName: '', popupStyle: {}, align: {}, defaultOpenValue: moment_default()(), allowEmpty: true, showHour: true, showMinute: true, showSecond: true, disabledHours: noop, disabledMinutes: noop, disabledSeconds: noop, hideDisabledOptions: false, placement: 'bottomLeft', onChange: noop, onAmPmChange: noop, onOpen: noop, onClose: noop, onFocus: noop, onBlur: noop, addon: noop, use12Hours: false, focusOnOpen: false, onKeyDown: noop }); Object(react_lifecycles_compat_es["polyfill"])(TimePicker_Picker); /* harmony default export */ var es_TimePicker = (TimePicker_Picker); // EXTERNAL MODULE: ./node_modules/antd/node_modules/classnames/index.js var node_modules_classnames = __webpack_require__("kTQ8"); var node_modules_classnames_default = /*#__PURE__*/__webpack_require__.n(node_modules_classnames); // EXTERNAL MODULE: ./node_modules/antd/es/_util/warning.js var warning = __webpack_require__("qGip"); // EXTERNAL MODULE: ./node_modules/antd/es/locale-provider/LocaleReceiver.js + 1 modules var LocaleReceiver = __webpack_require__("IIvH"); // EXTERNAL MODULE: ./node_modules/antd/es/config-provider/index.js + 1 modules var config_provider = __webpack_require__("PmSq"); // EXTERNAL MODULE: ./node_modules/antd/es/time-picker/locale/en_US.js var en_US = __webpack_require__("sg0s"); // EXTERNAL MODULE: ./node_modules/antd/es/_util/interopDefault.js var interopDefault = __webpack_require__("FQ6r"); // EXTERNAL MODULE: ./node_modules/antd/es/icon/index.js + 5 modules var icon = __webpack_require__("FC3+"); // CONCATENATED MODULE: ./node_modules/antd/es/time-picker/index.js /* harmony export (immutable) */ __webpack_exports__["generateShowHourMinuteSecond"] = generateShowHourMinuteSecond; function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function time_picker__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; } function _extends() { _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; }; return _extends.apply(this, arguments); } function time_picker__classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function time_picker__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); } } function time_picker__createClass(Constructor, protoProps, staticProps) { if (protoProps) time_picker__defineProperties(Constructor.prototype, protoProps); if (staticProps) time_picker__defineProperties(Constructor, staticProps); return Constructor; } function time_picker__inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) time_picker__setPrototypeOf(subClass, superClass); } function time_picker__setPrototypeOf(o, p) { time_picker__setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return time_picker__setPrototypeOf(o, p); } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = time_picker__getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = time_picker__getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return time_picker__possibleConstructorReturn(this, result); }; } function time_picker__possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return time_picker__assertThisInitialized(self); } function time_picker__assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } function time_picker__getPrototypeOf(o) { time_picker__getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return time_picker__getPrototypeOf(o); } var __rest = this && this.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; function generateShowHourMinuteSecond(format) { // Ref: http://momentjs.com/docs/#/parsing/string-format/ return { showHour: format.indexOf('H') > -1 || format.indexOf('h') > -1 || format.indexOf('k') > -1, showMinute: format.indexOf('m') > -1, showSecond: format.indexOf('s') > -1 }; } var time_picker_TimePicker = /*#__PURE__*/function (_React$Component) { time_picker__inherits(TimePicker, _React$Component); var _super = _createSuper(TimePicker); function TimePicker(props) { var _this; time_picker__classCallCheck(this, TimePicker); _this = _super.call(this, props); _this.getDefaultLocale = function () { var defaultLocale = _extends(_extends({}, en_US["a" /* default */]), _this.props.locale); return defaultLocale; }; _this.handleOpenClose = function (_ref) { var open = _ref.open; var onOpenChange = _this.props.onOpenChange; if (onOpenChange) { onOpenChange(open); } }; _this.saveTimePicker = function (timePickerRef) { _this.timePickerRef = timePickerRef; }; _this.handleChange = function (value) { if (!('value' in _this.props)) { _this.setState({ value: value }); } var _this$props = _this.props, onChange = _this$props.onChange, _this$props$format = _this$props.format, format = _this$props$format === void 0 ? 'HH:mm:ss' : _this$props$format; if (onChange) { onChange(value, value && value.format(format) || ''); } }; _this.renderTimePicker = function (locale) { return /*#__PURE__*/react["createElement"](config_provider["ConfigConsumer"], null, function (_ref2) { var getContextPopupContainer = _ref2.getPopupContainer, getPrefixCls = _ref2.getPrefixCls; var _a = _this.props, getPopupContainer = _a.getPopupContainer, customizePrefixCls = _a.prefixCls, className = _a.className, addon = _a.addon, placeholder = _a.placeholder, props = __rest(_a, ["getPopupContainer", "prefixCls", "className", "addon", "placeholder"]); var size = props.size; var pickerProps = Object(es["a" /* default */])(props, ['defaultValue', 'suffixIcon', 'allowEmpty', 'allowClear']); var format = _this.getDefaultFormat(); var prefixCls = getPrefixCls('time-picker', customizePrefixCls); var pickerClassName = node_modules_classnames_default()(className, time_picker__defineProperty({}, "".concat(prefixCls, "-").concat(size), !!size)); var pickerAddon = function pickerAddon(panel) { return addon ? /*#__PURE__*/react["createElement"]("div", { className: "".concat(prefixCls, "-panel-addon") }, addon(panel)) : null; }; return /*#__PURE__*/react["createElement"](es_TimePicker, _extends({}, generateShowHourMinuteSecond(format), pickerProps, { allowEmpty: _this.getAllowClear(), prefixCls: prefixCls, getPopupContainer: getPopupContainer || getContextPopupContainer, ref: _this.saveTimePicker, format: format, className: pickerClassName, value: _this.state.value, placeholder: placeholder === undefined ? locale.placeholder : placeholder, onChange: _this.handleChange, onOpen: _this.handleOpenClose, onClose: _this.handleOpenClose, addon: pickerAddon, inputIcon: _this.renderInputIcon(prefixCls), clearIcon: _this.renderClearIcon(prefixCls) })); }); }; var value = props.value || props.defaultValue; if (value && !Object(interopDefault["a" /* default */])(moment).isMoment(value)) { throw new Error('The value/defaultValue of TimePicker must be a moment object after `antd@2.0`, ' + 'see: https://u.ant.design/time-picker-value'); } _this.state = { value: value }; Object(warning["a" /* default */])(!('allowEmpty' in props), 'TimePicker', '`allowEmpty` is deprecated. Please use `allowClear` instead.'); return _this; } time_picker__createClass(TimePicker, [{ key: "getDefaultFormat", value: function getDefaultFormat() { var _this$props2 = this.props, format = _this$props2.format, use12Hours = _this$props2.use12Hours; if (format) { return format; } if (use12Hours) { return 'h:mm:ss a'; } return 'HH:mm:ss'; } }, { key: "getAllowClear", value: function getAllowClear() { var _this$props3 = this.props, allowClear = _this$props3.allowClear, allowEmpty = _this$props3.allowEmpty; if ('allowClear' in this.props) { return allowClear; } return allowEmpty; } }, { key: "focus", value: function focus() { this.timePickerRef.focus(); } }, { key: "blur", value: function blur() { this.timePickerRef.blur(); } }, { key: "renderInputIcon", value: function renderInputIcon(prefixCls) { var suffixIcon = this.props.suffixIcon; var clockIcon = suffixIcon && /*#__PURE__*/react["isValidElement"](suffixIcon) && /*#__PURE__*/react["cloneElement"](suffixIcon, { className: node_modules_classnames_default()(suffixIcon.props.className, "".concat(prefixCls, "-clock-icon")) }) || /*#__PURE__*/react["createElement"](icon["default"], { type: "clock-circle", className: "".concat(prefixCls, "-clock-icon") }); return /*#__PURE__*/react["createElement"]("span", { className: "".concat(prefixCls, "-icon") }, clockIcon); } }, { key: "renderClearIcon", value: function renderClearIcon(prefixCls) { var clearIcon = this.props.clearIcon; var clearIconPrefixCls = "".concat(prefixCls, "-clear"); if (clearIcon && /*#__PURE__*/react["isValidElement"](clearIcon)) { return /*#__PURE__*/react["cloneElement"](clearIcon, { className: node_modules_classnames_default()(clearIcon.props.className, clearIconPrefixCls) }); } return /*#__PURE__*/react["createElement"](icon["default"], { type: "close-circle", className: clearIconPrefixCls, theme: "filled" }); } }, { key: "render", value: function render() { return /*#__PURE__*/react["createElement"](LocaleReceiver["a" /* default */], { componentName: "TimePicker", defaultLocale: this.getDefaultLocale() }, this.renderTimePicker); } }], [{ key: "getDerivedStateFromProps", value: function getDerivedStateFromProps(nextProps) { if ('value' in nextProps) { return { value: nextProps.value }; } return null; } }]); return TimePicker; }(react["Component"]); time_picker_TimePicker.defaultProps = { align: { offset: [0, -2] }, disabledHours: undefined, disabledMinutes: undefined, disabledSeconds: undefined, hideDisabledOptions: false, placement: 'bottomLeft', transitionName: 'slide-up', focusOnOpen: true }; Object(react_lifecycles_compat_es["polyfill"])(time_picker_TimePicker); /* harmony default export */ var time_picker = __webpack_exports__["default"] = (time_picker_TimePicker); /***/ }), /***/ "mFI/": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); var _dva = __webpack_require__("S6G3"); var _dec, _class; /** * 自定义消息中的语音消息(web发送过去的语音消息) */ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } var CustomSoundElement = exports.default = (_dec = (0, _dva.connect)(function (state) { return {}; }), _dec(_class = /*#__PURE__*/function (_Component) { function CustomSoundElement(props) { var _this; (0, _classCallCheck2.default)(this, CustomSoundElement); _this = _callSuper(this, CustomSoundElement, [props]); _this.state = { payload: props.payload, playState: false, //是否播放音频 index: props.index, //key值 isValid: true //当前的音频是否有效(默认是有效的) }; return _this; } (0, _inherits2.default)(CustomSoundElement, _Component); return (0, _createClass2.default)(CustomSoundElement, [{ key: "componentDidMount", value: function componentDidMount() { this.checkValid(); } }, { key: "componentWillReceiveProps", value: function componentWillReceiveProps(nextProps) { this.setState({ payload: nextProps.payload, index: nextProps.index }); } //检查音频是否有效 }, { key: "checkValid", value: function checkValid() { var that = this; var t2 = window.setInterval(function () { if (that.refs.videoDom) { window.clearInterval(t2); } }, 50); } }, { key: "render", value: function render() { var _this2 = this; return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("div", { key: this.state.index, className: "custom-sound-element", onClick: function onClick() { if (_this2.state.isValid) { //先保证语音可以播放的情况 //播放音频 _this2.setState({ playState: true }); var messageListNode = _this2.refs.videoDom; //paused方法用来判断语音是否播放.true是还没有播放,false是已经在播放了 if (messageListNode.paused) { // this.props.dispatch({ // type: 'im/updateCurrentPlayVideo', // payload: messageListNode // }); var promise = messageListNode.play(); if (promise) { promise.catch(function (err) { console.log('播放失败'); }).then(function (res) { console.log(res); console.log('播放成功'); }); } var that = _this2; messageListNode.onended = function () { console.log('音频播放结束'); that.setState({ playState: false }); }; } else { messageListNode.pause(); console.log('暂停播放'); _this2.setState({ playState: false }); } } else { return; } } }, /*#__PURE__*/_react.default.createElement("audio", { controls: true, ref: "videoDom", src: this.state.payload.extension.indexOf('time') > -1 ? JSON.parse(this.state.payload.extension).url : this.state.payload.extension, style: { display: 'none' }, onLoadedMetadata: function onLoadedMetadata() { _this2.setState({ isValid: true }); }, onError: function onError() { //服务器返回的音频地址是打不开的时候 _this2.setState({ isValid: false }); } }), this.state.isValid ? this.state.payload.extension.indexOf('time') > -1 ? JSON.parse(this.state.payload.extension).time + '"' : '' : '最近的语音不能同步', /*#__PURE__*/_react.default.createElement("img", { className: "sound-img", style: { transform: 'rotate(180deg)', filter: this.state.isValid ? 'unset' : 'invert(1)' }, src: this.state.playState ? __webpack_require__("XSR2") : __webpack_require__("s9W7") }))); } }]); }(_react.Component)) || _class); /***/ }), /***/ "mL1Z": /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @typechecks */ var hyphenate = __webpack_require__("APD3"); var msPattern = /^ms-/; /** * Hyphenates a camelcased CSS property name, for example: * * > hyphenateStyleName('backgroundColor') * < "background-color" * > hyphenateStyleName('MozTransition') * < "-moz-transition" * > hyphenateStyleName('msTransition') * < "-ms-transition" * * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix * is converted to `-ms-`. * * @param {string} string * @return {string} */ function hyphenateStyleName(string) { return hyphenate(string).replace(msPattern, '-ms-'); } module.exports = hyphenateStyleName; /***/ }), /***/ "mbvs": /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(global, process) {var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; // Last time updated: 2021-03-09 3:20:22 AM UTC // ________________ // RecordRTC v5.6.2 // Open-Sourced: https://github.com/muaz-khan/RecordRTC // -------------------------------------------------- // Muaz Khan - www.MuazKhan.com // MIT License - www.WebRTC-Experiment.com/licence // -------------------------------------------------- // ____________ // RecordRTC.js /** * {@link https://github.com/muaz-khan/RecordRTC|RecordRTC} is a WebRTC JavaScript library for audio/video as well as screen activity recording. It supports Chrome, Firefox, Opera, Android, and Microsoft Edge. Platforms: Linux, Mac and Windows. * @summary Record audio, video or screen inside the browser. * @license {@link https://github.com/muaz-khan/RecordRTC/blob/master/LICENSE|MIT} * @author {@link https://MuazKhan.com|Muaz Khan} * @typedef RecordRTC * @class * @example * var recorder = RecordRTC(mediaStream or [arrayOfMediaStream], { * type: 'video', // audio or video or gif or canvas * recorderType: MediaStreamRecorder || CanvasRecorder || StereoAudioRecorder || Etc * }); * recorder.startRecording(); * @see For further information: * @see {@link https://github.com/muaz-khan/RecordRTC|RecordRTC Source Code} * @param {MediaStream} mediaStream - Single media-stream object, array of media-streams, html-canvas-element, etc. * @param {object} config - {type:"video", recorderType: MediaStreamRecorder, disableLogs: true, numberOfAudioChannels: 1, bufferSize: 0, sampleRate: 0, desiredSampRate: 16000, video: HTMLVideoElement, etc.} */ function RecordRTC(mediaStream, config) { if (!mediaStream) { throw 'First parameter is required.'; } config = config || { type: 'video' }; config = new RecordRTCConfiguration(mediaStream, config); // a reference to user's recordRTC object var self = this; function startRecording(config2) { if (!config.disableLogs) { console.log('RecordRTC version: ', self.version); } if (!!config2) { // allow users to set options using startRecording method // config2 is similar to main "config" object (second parameter over RecordRTC constructor) config = new RecordRTCConfiguration(mediaStream, config2); } if (!config.disableLogs) { console.log('started recording ' + config.type + ' stream.'); } if (mediaRecorder) { mediaRecorder.clearRecordedData(); mediaRecorder.record(); setState('recording'); if (self.recordingDuration) { handleRecordingDuration(); } return self; } initRecorder(function() { if (self.recordingDuration) { handleRecordingDuration(); } }); return self; } function initRecorder(initCallback) { if (initCallback) { config.initCallback = function() { initCallback(); initCallback = config.initCallback = null; // recorder.initRecorder should be call-backed once. }; } var Recorder = new GetRecorderType(mediaStream, config); mediaRecorder = new Recorder(mediaStream, config); mediaRecorder.record(); setState('recording'); if (!config.disableLogs) { console.log('Initialized recorderType:', mediaRecorder.constructor.name, 'for output-type:', config.type); } } function stopRecording(callback) { callback = callback || function() {}; if (!mediaRecorder) { warningLog(); return; } if (self.state === 'paused') { self.resumeRecording(); setTimeout(function() { stopRecording(callback); }, 1); return; } if (self.state !== 'recording' && !config.disableLogs) { console.warn('Recording state should be: "recording", however current state is: ', self.state); } if (!config.disableLogs) { console.log('Stopped recording ' + config.type + ' stream.'); } if (config.type !== 'gif') { mediaRecorder.stop(_callback); } else { mediaRecorder.stop(); _callback(); } setState('stopped'); function _callback(__blob) { if (!mediaRecorder) { if (typeof callback.call === 'function') { callback.call(self, ''); } else { callback(''); } return; } Object.keys(mediaRecorder).forEach(function(key) { if (typeof mediaRecorder[key] === 'function') { return; } self[key] = mediaRecorder[key]; }); var blob = mediaRecorder.blob; if (!blob) { if (__blob) { mediaRecorder.blob = blob = __blob; } else { throw 'Recording failed.'; } } if (blob && !config.disableLogs) { console.log(blob.type, '->', bytesToSize(blob.size)); } if (callback) { var url; try { url = URL.createObjectURL(blob); } catch (e) {} if (typeof callback.call === 'function') { callback.call(self, url); } else { callback(url); } } if (!config.autoWriteToDisk) { return; } getDataURL(function(dataURL) { var parameter = {}; parameter[config.type + 'Blob'] = dataURL; DiskStorage.Store(parameter); }); } } function pauseRecording() { if (!mediaRecorder) { warningLog(); return; } if (self.state !== 'recording') { if (!config.disableLogs) { console.warn('Unable to pause the recording. Recording state: ', self.state); } return; } setState('paused'); mediaRecorder.pause(); if (!config.disableLogs) { console.log('Paused recording.'); } } function resumeRecording() { if (!mediaRecorder) { warningLog(); return; } if (self.state !== 'paused') { if (!config.disableLogs) { console.warn('Unable to resume the recording. Recording state: ', self.state); } return; } setState('recording'); // not all libs have this method yet mediaRecorder.resume(); if (!config.disableLogs) { console.log('Resumed recording.'); } } function readFile(_blob) { postMessage(new FileReaderSync().readAsDataURL(_blob)); } function getDataURL(callback, _mediaRecorder) { if (!callback) { throw 'Pass a callback function over getDataURL.'; } var blob = _mediaRecorder ? _mediaRecorder.blob : (mediaRecorder || {}).blob; if (!blob) { if (!config.disableLogs) { console.warn('Blob encoder did not finish its job yet.'); } setTimeout(function() { getDataURL(callback, _mediaRecorder); }, 1000); return; } if (typeof Worker !== 'undefined' && !navigator.mozGetUserMedia) { var webWorker = processInWebWorker(readFile); webWorker.onmessage = function(event) { callback(event.data); }; webWorker.postMessage(blob); } else { var reader = new FileReader(); reader.readAsDataURL(blob); reader.onload = function(event) { callback(event.target.result); }; } function processInWebWorker(_function) { try { var blob = URL.createObjectURL(new Blob([_function.toString(), 'this.onmessage = function (eee) {' + _function.name + '(eee.data);}' ], { type: 'application/javascript' })); var worker = new Worker(blob); URL.revokeObjectURL(blob); return worker; } catch (e) {} } } function handleRecordingDuration(counter) { counter = counter || 0; if (self.state === 'paused') { setTimeout(function() { handleRecordingDuration(counter); }, 1000); return; } if (self.state === 'stopped') { return; } if (counter >= self.recordingDuration) { stopRecording(self.onRecordingStopped); return; } counter += 1000; // 1-second setTimeout(function() { handleRecordingDuration(counter); }, 1000); } function setState(state) { if (!self) { return; } self.state = state; if (typeof self.onStateChanged.call === 'function') { self.onStateChanged.call(self, state); } else { self.onStateChanged(state); } } var WARNING = 'It seems that recorder is destroyed or "startRecording" is not invoked for ' + config.type + ' recorder.'; function warningLog() { if (config.disableLogs === true) { return; } console.warn(WARNING); } var mediaRecorder; var returnObject = { /** * This method starts the recording. * @method * @memberof RecordRTC * @instance * @example * var recorder = RecordRTC(mediaStream, { * type: 'video' * }); * recorder.startRecording(); */ startRecording: startRecording, /** * This method stops the recording. It is strongly recommended to get "blob" or "URI" inside the callback to make sure all recorders finished their job. * @param {function} callback - Callback to get the recorded blob. * @method * @memberof RecordRTC * @instance * @example * recorder.stopRecording(function() { * // use either "this" or "recorder" object; both are identical * video.src = this.toURL(); * var blob = this.getBlob(); * }); */ stopRecording: stopRecording, /** * This method pauses the recording. You can resume recording using "resumeRecording" method. * @method * @memberof RecordRTC * @instance * @todo Firefox is unable to pause the recording. Fix it. * @example * recorder.pauseRecording(); // pause the recording * recorder.resumeRecording(); // resume again */ pauseRecording: pauseRecording, /** * This method resumes the recording. * @method * @memberof RecordRTC * @instance * @example * recorder.pauseRecording(); // first of all, pause the recording * recorder.resumeRecording(); // now resume it */ resumeRecording: resumeRecording, /** * This method initializes the recording. * @method * @memberof RecordRTC * @instance * @todo This method should be deprecated. * @example * recorder.initRecorder(); */ initRecorder: initRecorder, /** * Ask RecordRTC to auto-stop the recording after 5 minutes. * @method * @memberof RecordRTC * @instance * @example * var fiveMinutes = 5 * 1000 * 60; * recorder.setRecordingDuration(fiveMinutes, function() { * var blob = this.getBlob(); * video.src = this.toURL(); * }); * * // or otherwise * recorder.setRecordingDuration(fiveMinutes).onRecordingStopped(function() { * var blob = this.getBlob(); * video.src = this.toURL(); * }); */ setRecordingDuration: function(recordingDuration, callback) { if (typeof recordingDuration === 'undefined') { throw 'recordingDuration is required.'; } if (typeof recordingDuration !== 'number') { throw 'recordingDuration must be a number.'; } self.recordingDuration = recordingDuration; self.onRecordingStopped = callback || function() {}; return { onRecordingStopped: function(callback) { self.onRecordingStopped = callback; } }; }, /** * This method can be used to clear/reset all the recorded data. * @method * @memberof RecordRTC * @instance * @todo Figure out the difference between "reset" and "clearRecordedData" methods. * @example * recorder.clearRecordedData(); */ clearRecordedData: function() { if (!mediaRecorder) { warningLog(); return; } mediaRecorder.clearRecordedData(); if (!config.disableLogs) { console.log('Cleared old recorded data.'); } }, /** * Get the recorded blob. Use this method inside the "stopRecording" callback. * @method * @memberof RecordRTC * @instance * @example * recorder.stopRecording(function() { * var blob = this.getBlob(); * * var file = new File([blob], 'filename.webm', { * type: 'video/webm' * }); * * var formData = new FormData(); * formData.append('file', file); // upload "File" object rather than a "Blob" * uploadToServer(formData); * }); * @returns {Blob} Returns recorded data as "Blob" object. */ getBlob: function() { if (!mediaRecorder) { warningLog(); return; } return mediaRecorder.blob; }, /** * Get data-URI instead of Blob. * @param {function} callback - Callback to get the Data-URI. * @method * @memberof RecordRTC * @instance * @example * recorder.stopRecording(function() { * recorder.getDataURL(function(dataURI) { * video.src = dataURI; * }); * }); */ getDataURL: getDataURL, /** * Get virtual/temporary URL. Usage of this URL is limited to current tab. * @method * @memberof RecordRTC * @instance * @example * recorder.stopRecording(function() { * video.src = this.toURL(); * }); * @returns {String} Returns a virtual/temporary URL for the recorded "Blob". */ toURL: function() { if (!mediaRecorder) { warningLog(); return; } return URL.createObjectURL(mediaRecorder.blob); }, /** * Get internal recording object (i.e. internal module) e.g. MutliStreamRecorder, MediaStreamRecorder, StereoAudioRecorder or WhammyRecorder etc. * @method * @memberof RecordRTC * @instance * @example * var internalRecorder = recorder.getInternalRecorder(); * if(internalRecorder instanceof MultiStreamRecorder) { * internalRecorder.addStreams([newAudioStream]); * internalRecorder.resetVideoStreams([screenStream]); * } * @returns {Object} Returns internal recording object. */ getInternalRecorder: function() { return mediaRecorder; }, /** * Invoke save-as dialog to save the recorded blob into your disk. * @param {string} fileName - Set your own file name. * @method * @memberof RecordRTC * @instance * @example * recorder.stopRecording(function() { * this.save('file-name'); * * // or manually: * invokeSaveAsDialog(this.getBlob(), 'filename.webm'); * }); */ save: function(fileName) { if (!mediaRecorder) { warningLog(); return; } invokeSaveAsDialog(mediaRecorder.blob, fileName); }, /** * This method gets a blob from indexed-DB storage. * @param {function} callback - Callback to get the recorded blob. * @method * @memberof RecordRTC * @instance * @example * recorder.getFromDisk(function(dataURL) { * video.src = dataURL; * }); */ getFromDisk: function(callback) { if (!mediaRecorder) { warningLog(); return; } RecordRTC.getFromDisk(config.type, callback); }, /** * This method appends an array of webp images to the recorded video-blob. It takes an "array" object. * @type {Array.} * @param {Array} arrayOfWebPImages - Array of webp images. * @method * @memberof RecordRTC * @instance * @todo This method should be deprecated. * @example * var arrayOfWebPImages = []; * arrayOfWebPImages.push({ * duration: index, * image: 'data:image/webp;base64,...' * }); * recorder.setAdvertisementArray(arrayOfWebPImages); */ setAdvertisementArray: function(arrayOfWebPImages) { config.advertisement = []; var length = arrayOfWebPImages.length; for (var i = 0; i < length; i++) { config.advertisement.push({ duration: i, image: arrayOfWebPImages[i] }); } }, /** * It is equivalent to "recorder.getBlob()" method. Usage of "getBlob" is recommended, though. * @property {Blob} blob - Recorded Blob can be accessed using this property. * @memberof RecordRTC * @instance * @readonly * @example * recorder.stopRecording(function() { * var blob = this.blob; * * // below one is recommended * var blob = this.getBlob(); * }); */ blob: null, /** * This works only with {recorderType:StereoAudioRecorder}. Use this property on "stopRecording" to verify the encoder's sample-rates. * @property {number} bufferSize - Buffer-size used to encode the WAV container * @memberof RecordRTC * @instance * @readonly * @example * recorder.stopRecording(function() { * alert('Recorder used this buffer-size: ' + this.bufferSize); * }); */ bufferSize: 0, /** * This works only with {recorderType:StereoAudioRecorder}. Use this property on "stopRecording" to verify the encoder's sample-rates. * @property {number} sampleRate - Sample-rates used to encode the WAV container * @memberof RecordRTC * @instance * @readonly * @example * recorder.stopRecording(function() { * alert('Recorder used these sample-rates: ' + this.sampleRate); * }); */ sampleRate: 0, /** * {recorderType:StereoAudioRecorder} returns ArrayBuffer object. * @property {ArrayBuffer} buffer - Audio ArrayBuffer, supported only in Chrome. * @memberof RecordRTC * @instance * @readonly * @example * recorder.stopRecording(function() { * var arrayBuffer = this.buffer; * alert(arrayBuffer.byteLength); * }); */ buffer: null, /** * This method resets the recorder. So that you can reuse single recorder instance many times. * @method * @memberof RecordRTC * @instance * @example * recorder.reset(); * recorder.startRecording(); */ reset: function() { if (self.state === 'recording' && !config.disableLogs) { console.warn('Stop an active recorder.'); } if (mediaRecorder && typeof mediaRecorder.clearRecordedData === 'function') { mediaRecorder.clearRecordedData(); } mediaRecorder = null; setState('inactive'); self.blob = null; }, /** * This method is called whenever recorder's state changes. Use this as an "event". * @property {String} state - A recorder's state can be: recording, paused, stopped or inactive. * @method * @memberof RecordRTC * @instance * @example * recorder.onStateChanged = function(state) { * console.log('Recorder state: ', state); * }; */ onStateChanged: function(state) { if (!config.disableLogs) { console.log('Recorder state changed:', state); } }, /** * A recorder can have inactive, recording, paused or stopped states. * @property {String} state - A recorder's state can be: recording, paused, stopped or inactive. * @memberof RecordRTC * @static * @readonly * @example * // this looper function will keep you updated about the recorder's states. * (function looper() { * document.querySelector('h1').innerHTML = 'Recorder\'s state is: ' + recorder.state; * if(recorder.state === 'stopped') return; // ignore+stop * setTimeout(looper, 1000); // update after every 3-seconds * })(); * recorder.startRecording(); */ state: 'inactive', /** * Get recorder's readonly state. * @method * @memberof RecordRTC * @example * var state = recorder.getState(); * @returns {String} Returns recording state. */ getState: function() { return self.state; }, /** * Destroy RecordRTC instance. Clear all recorders and objects. * @method * @memberof RecordRTC * @example * recorder.destroy(); */ destroy: function() { var disableLogsCache = config.disableLogs; config = { disableLogs: true }; self.reset(); setState('destroyed'); returnObject = self = null; if (Storage.AudioContextConstructor) { Storage.AudioContextConstructor.close(); Storage.AudioContextConstructor = null; } config.disableLogs = disableLogsCache; if (!config.disableLogs) { console.log('RecordRTC is destroyed.'); } }, /** * RecordRTC version number * @property {String} version - Release version number. * @memberof RecordRTC * @static * @readonly * @example * alert(recorder.version); */ version: '5.6.2' }; if (!this) { self = returnObject; return returnObject; } // if someone wants to use RecordRTC with the "new" keyword. for (var prop in returnObject) { this[prop] = returnObject[prop]; } self = this; return returnObject; } RecordRTC.version = '5.6.2'; if (true /* && !!module.exports*/ ) { module.exports = RecordRTC; } if (true) { !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function() { return RecordRTC; }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } RecordRTC.getFromDisk = function(type, callback) { if (!callback) { throw 'callback is mandatory.'; } console.log('Getting recorded ' + (type === 'all' ? 'blobs' : type + ' blob ') + ' from disk!'); DiskStorage.Fetch(function(dataURL, _type) { if (type !== 'all' && _type === type + 'Blob' && callback) { callback(dataURL); } if (type === 'all' && callback) { callback(dataURL, _type.replace('Blob', '')); } }); }; /** * This method can be used to store recorded blobs into IndexedDB storage. * @param {object} options - {audio: Blob, video: Blob, gif: Blob} * @method * @memberof RecordRTC * @example * RecordRTC.writeToDisk({ * audio: audioBlob, * video: videoBlob, * gif : gifBlob * }); */ RecordRTC.writeToDisk = function(options) { console.log('Writing recorded blob(s) to disk!'); options = options || {}; if (options.audio && options.video && options.gif) { options.audio.getDataURL(function(audioDataURL) { options.video.getDataURL(function(videoDataURL) { options.gif.getDataURL(function(gifDataURL) { DiskStorage.Store({ audioBlob: audioDataURL, videoBlob: videoDataURL, gifBlob: gifDataURL }); }); }); }); } else if (options.audio && options.video) { options.audio.getDataURL(function(audioDataURL) { options.video.getDataURL(function(videoDataURL) { DiskStorage.Store({ audioBlob: audioDataURL, videoBlob: videoDataURL }); }); }); } else if (options.audio && options.gif) { options.audio.getDataURL(function(audioDataURL) { options.gif.getDataURL(function(gifDataURL) { DiskStorage.Store({ audioBlob: audioDataURL, gifBlob: gifDataURL }); }); }); } else if (options.video && options.gif) { options.video.getDataURL(function(videoDataURL) { options.gif.getDataURL(function(gifDataURL) { DiskStorage.Store({ videoBlob: videoDataURL, gifBlob: gifDataURL }); }); }); } else if (options.audio) { options.audio.getDataURL(function(audioDataURL) { DiskStorage.Store({ audioBlob: audioDataURL }); }); } else if (options.video) { options.video.getDataURL(function(videoDataURL) { DiskStorage.Store({ videoBlob: videoDataURL }); }); } else if (options.gif) { options.gif.getDataURL(function(gifDataURL) { DiskStorage.Store({ gifBlob: gifDataURL }); }); } }; // __________________________ // RecordRTC-Configuration.js /** * {@link RecordRTCConfiguration} is an inner/private helper for {@link RecordRTC}. * @summary It configures the 2nd parameter passed over {@link RecordRTC} and returns a valid "config" object. * @license {@link https://github.com/muaz-khan/RecordRTC/blob/master/LICENSE|MIT} * @author {@link https://MuazKhan.com|Muaz Khan} * @typedef RecordRTCConfiguration * @class * @example * var options = RecordRTCConfiguration(mediaStream, options); * @see {@link https://github.com/muaz-khan/RecordRTC|RecordRTC Source Code} * @param {MediaStream} mediaStream - MediaStream object fetched using getUserMedia API or generated using captureStreamUntilEnded or WebAudio API. * @param {object} config - {type:"video", disableLogs: true, numberOfAudioChannels: 1, bufferSize: 0, sampleRate: 0, video: HTMLVideoElement, getNativeBlob:true, etc.} */ function RecordRTCConfiguration(mediaStream, config) { if (!config.recorderType && !config.type) { if (!!config.audio && !!config.video) { config.type = 'video'; } else if (!!config.audio && !config.video) { config.type = 'audio'; } } if (config.recorderType && !config.type) { if (config.recorderType === WhammyRecorder || config.recorderType === CanvasRecorder || (typeof WebAssemblyRecorder !== 'undefined' && config.recorderType === WebAssemblyRecorder)) { config.type = 'video'; } else if (config.recorderType === GifRecorder) { config.type = 'gif'; } else if (config.recorderType === StereoAudioRecorder) { config.type = 'audio'; } else if (config.recorderType === MediaStreamRecorder) { if (getTracks(mediaStream, 'audio').length && getTracks(mediaStream, 'video').length) { config.type = 'video'; } else if (!getTracks(mediaStream, 'audio').length && getTracks(mediaStream, 'video').length) { config.type = 'video'; } else if (getTracks(mediaStream, 'audio').length && !getTracks(mediaStream, 'video').length) { config.type = 'audio'; } else { // config.type = 'UnKnown'; } } } if (typeof MediaStreamRecorder !== 'undefined' && typeof MediaRecorder !== 'undefined' && 'requestData' in MediaRecorder.prototype) { if (!config.mimeType) { config.mimeType = 'video/webm'; } if (!config.type) { config.type = config.mimeType.split('/')[0]; } if (!config.bitsPerSecond) { // config.bitsPerSecond = 128000; } } // consider default type=audio if (!config.type) { if (config.mimeType) { config.type = config.mimeType.split('/')[0]; } if (!config.type) { config.type = 'audio'; } } return config; } // __________________ // GetRecorderType.js /** * {@link GetRecorderType} is an inner/private helper for {@link RecordRTC}. * @summary It returns best recorder-type available for your browser. * @license {@link https://github.com/muaz-khan/RecordRTC/blob/master/LICENSE|MIT} * @author {@link https://MuazKhan.com|Muaz Khan} * @typedef GetRecorderType * @class * @example * var RecorderType = GetRecorderType(options); * var recorder = new RecorderType(options); * @see {@link https://github.com/muaz-khan/RecordRTC|RecordRTC Source Code} * @param {MediaStream} mediaStream - MediaStream object fetched using getUserMedia API or generated using captureStreamUntilEnded or WebAudio API. * @param {object} config - {type:"video", disableLogs: true, numberOfAudioChannels: 1, bufferSize: 0, sampleRate: 0, video: HTMLVideoElement, etc.} */ function GetRecorderType(mediaStream, config) { var recorder; // StereoAudioRecorder can work with all three: Edge, Firefox and Chrome // todo: detect if it is Edge, then auto use: StereoAudioRecorder if (isChrome || isEdge || isOpera) { // Media Stream Recording API has not been implemented in chrome yet; // That's why using WebAudio API to record stereo audio in WAV format recorder = StereoAudioRecorder; } if (typeof MediaRecorder !== 'undefined' && 'requestData' in MediaRecorder.prototype && !isChrome) { recorder = MediaStreamRecorder; } // video recorder (in WebM format) if (config.type === 'video' && (isChrome || isOpera)) { recorder = WhammyRecorder; if (typeof WebAssemblyRecorder !== 'undefined' && typeof ReadableStream !== 'undefined') { recorder = WebAssemblyRecorder; } } // video recorder (in Gif format) if (config.type === 'gif') { recorder = GifRecorder; } // html2canvas recording! if (config.type === 'canvas') { recorder = CanvasRecorder; } if (isMediaRecorderCompatible() && recorder !== CanvasRecorder && recorder !== GifRecorder && typeof MediaRecorder !== 'undefined' && 'requestData' in MediaRecorder.prototype) { if (getTracks(mediaStream, 'video').length || getTracks(mediaStream, 'audio').length) { // audio-only recording if (config.type === 'audio') { if (typeof MediaRecorder.isTypeSupported === 'function' && MediaRecorder.isTypeSupported('audio/webm')) { recorder = MediaStreamRecorder; } // else recorder = StereoAudioRecorder; } else { // video or screen tracks if (typeof MediaRecorder.isTypeSupported === 'function' && MediaRecorder.isTypeSupported('video/webm')) { recorder = MediaStreamRecorder; } } } } if (mediaStream instanceof Array && mediaStream.length) { recorder = MultiStreamRecorder; } if (config.recorderType) { recorder = config.recorderType; } if (!config.disableLogs && !!recorder && !!recorder.name) { console.log('Using recorderType:', recorder.name || recorder.constructor.name); } if (!recorder && isSafari) { recorder = MediaStreamRecorder; } return recorder; } // _____________ // MRecordRTC.js /** * MRecordRTC runs on top of {@link RecordRTC} to bring multiple recordings in a single place, by providing simple API. * @summary MRecordRTC stands for "Multiple-RecordRTC". * @license {@link https://github.com/muaz-khan/RecordRTC/blob/master/LICENSE|MIT} * @author {@link https://MuazKhan.com|Muaz Khan} * @typedef MRecordRTC * @class * @example * var recorder = new MRecordRTC(); * recorder.addStream(MediaStream); * recorder.mediaType = { * audio: true, // or StereoAudioRecorder or MediaStreamRecorder * video: true, // or WhammyRecorder or MediaStreamRecorder or WebAssemblyRecorder or CanvasRecorder * gif: true // or GifRecorder * }; * // mimeType is optional and should be set only in advance cases. * recorder.mimeType = { * audio: 'audio/wav', * video: 'video/webm', * gif: 'image/gif' * }; * recorder.startRecording(); * @see For further information: * @see {@link https://github.com/muaz-khan/RecordRTC/tree/master/MRecordRTC|MRecordRTC Source Code} * @param {MediaStream} mediaStream - MediaStream object fetched using getUserMedia API or generated using captureStreamUntilEnded or WebAudio API. * @requires {@link RecordRTC} */ function MRecordRTC(mediaStream) { /** * This method attaches MediaStream object to {@link MRecordRTC}. * @param {MediaStream} mediaStream - A MediaStream object, either fetched using getUserMedia API, or generated using captureStreamUntilEnded or WebAudio API. * @method * @memberof MRecordRTC * @example * recorder.addStream(MediaStream); */ this.addStream = function(_mediaStream) { if (_mediaStream) { mediaStream = _mediaStream; } }; /** * This property can be used to set the recording type e.g. audio, or video, or gif, or canvas. * @property {object} mediaType - {audio: true, video: true, gif: true} * @memberof MRecordRTC * @example * var recorder = new MRecordRTC(); * recorder.mediaType = { * audio: true, // TRUE or StereoAudioRecorder or MediaStreamRecorder * video: true, // TRUE or WhammyRecorder or MediaStreamRecorder or WebAssemblyRecorder or CanvasRecorder * gif : true // TRUE or GifRecorder * }; */ this.mediaType = { audio: true, video: true }; /** * This method starts recording. * @method * @memberof MRecordRTC * @example * recorder.startRecording(); */ this.startRecording = function() { var mediaType = this.mediaType; var recorderType; var mimeType = this.mimeType || { audio: null, video: null, gif: null }; if (typeof mediaType.audio !== 'function' && isMediaRecorderCompatible() && !getTracks(mediaStream, 'audio').length) { mediaType.audio = false; } if (typeof mediaType.video !== 'function' && isMediaRecorderCompatible() && !getTracks(mediaStream, 'video').length) { mediaType.video = false; } if (typeof mediaType.gif !== 'function' && isMediaRecorderCompatible() && !getTracks(mediaStream, 'video').length) { mediaType.gif = false; } if (!mediaType.audio && !mediaType.video && !mediaType.gif) { throw 'MediaStream must have either audio or video tracks.'; } if (!!mediaType.audio) { recorderType = null; if (typeof mediaType.audio === 'function') { recorderType = mediaType.audio; } this.audioRecorder = new RecordRTC(mediaStream, { type: 'audio', bufferSize: this.bufferSize, sampleRate: this.sampleRate, numberOfAudioChannels: this.numberOfAudioChannels || 2, disableLogs: this.disableLogs, recorderType: recorderType, mimeType: mimeType.audio, timeSlice: this.timeSlice, onTimeStamp: this.onTimeStamp }); if (!mediaType.video) { this.audioRecorder.startRecording(); } } if (!!mediaType.video) { recorderType = null; if (typeof mediaType.video === 'function') { recorderType = mediaType.video; } var newStream = mediaStream; if (isMediaRecorderCompatible() && !!mediaType.audio && typeof mediaType.audio === 'function') { var videoTrack = getTracks(mediaStream, 'video')[0]; if (isFirefox) { newStream = new MediaStream(); newStream.addTrack(videoTrack); if (recorderType && recorderType === WhammyRecorder) { // Firefox does NOT supports webp-encoding yet // But Firefox do supports WebAssemblyRecorder recorderType = MediaStreamRecorder; } } else { newStream = new MediaStream(); newStream.addTrack(videoTrack); } } this.videoRecorder = new RecordRTC(newStream, { type: 'video', video: this.video, canvas: this.canvas, frameInterval: this.frameInterval || 10, disableLogs: this.disableLogs, recorderType: recorderType, mimeType: mimeType.video, timeSlice: this.timeSlice, onTimeStamp: this.onTimeStamp, workerPath: this.workerPath, webAssemblyPath: this.webAssemblyPath, frameRate: this.frameRate, // used by WebAssemblyRecorder; values: usually 30; accepts any. bitrate: this.bitrate // used by WebAssemblyRecorder; values: 0 to 1000+ }); if (!mediaType.audio) { this.videoRecorder.startRecording(); } } if (!!mediaType.audio && !!mediaType.video) { var self = this; var isSingleRecorder = isMediaRecorderCompatible() === true; if (mediaType.audio instanceof StereoAudioRecorder && !!mediaType.video) { isSingleRecorder = false; } else if (mediaType.audio !== true && mediaType.video !== true && mediaType.audio !== mediaType.video) { isSingleRecorder = false; } if (isSingleRecorder === true) { self.audioRecorder = null; self.videoRecorder.startRecording(); } else { self.videoRecorder.initRecorder(function() { self.audioRecorder.initRecorder(function() { // Both recorders are ready to record things accurately self.videoRecorder.startRecording(); self.audioRecorder.startRecording(); }); }); } } if (!!mediaType.gif) { recorderType = null; if (typeof mediaType.gif === 'function') { recorderType = mediaType.gif; } this.gifRecorder = new RecordRTC(mediaStream, { type: 'gif', frameRate: this.frameRate || 200, quality: this.quality || 10, disableLogs: this.disableLogs, recorderType: recorderType, mimeType: mimeType.gif }); this.gifRecorder.startRecording(); } }; /** * This method stops recording. * @param {function} callback - Callback function is invoked when all encoders finished their jobs. * @method * @memberof MRecordRTC * @example * recorder.stopRecording(function(recording){ * var audioBlob = recording.audio; * var videoBlob = recording.video; * var gifBlob = recording.gif; * }); */ this.stopRecording = function(callback) { callback = callback || function() {}; if (this.audioRecorder) { this.audioRecorder.stopRecording(function(blobURL) { callback(blobURL, 'audio'); }); } if (this.videoRecorder) { this.videoRecorder.stopRecording(function(blobURL) { callback(blobURL, 'video'); }); } if (this.gifRecorder) { this.gifRecorder.stopRecording(function(blobURL) { callback(blobURL, 'gif'); }); } }; /** * This method pauses recording. * @method * @memberof MRecordRTC * @example * recorder.pauseRecording(); */ this.pauseRecording = function() { if (this.audioRecorder) { this.audioRecorder.pauseRecording(); } if (this.videoRecorder) { this.videoRecorder.pauseRecording(); } if (this.gifRecorder) { this.gifRecorder.pauseRecording(); } }; /** * This method resumes recording. * @method * @memberof MRecordRTC * @example * recorder.resumeRecording(); */ this.resumeRecording = function() { if (this.audioRecorder) { this.audioRecorder.resumeRecording(); } if (this.videoRecorder) { this.videoRecorder.resumeRecording(); } if (this.gifRecorder) { this.gifRecorder.resumeRecording(); } }; /** * This method can be used to manually get all recorded blobs. * @param {function} callback - All recorded blobs are passed back to the "callback" function. * @method * @memberof MRecordRTC * @example * recorder.getBlob(function(recording){ * var audioBlob = recording.audio; * var videoBlob = recording.video; * var gifBlob = recording.gif; * }); * // or * var audioBlob = recorder.getBlob().audio; * var videoBlob = recorder.getBlob().video; */ this.getBlob = function(callback) { var output = {}; if (this.audioRecorder) { output.audio = this.audioRecorder.getBlob(); } if (this.videoRecorder) { output.video = this.videoRecorder.getBlob(); } if (this.gifRecorder) { output.gif = this.gifRecorder.getBlob(); } if (callback) { callback(output); } return output; }; /** * Destroy all recorder instances. * @method * @memberof MRecordRTC * @example * recorder.destroy(); */ this.destroy = function() { if (this.audioRecorder) { this.audioRecorder.destroy(); this.audioRecorder = null; } if (this.videoRecorder) { this.videoRecorder.destroy(); this.videoRecorder = null; } if (this.gifRecorder) { this.gifRecorder.destroy(); this.gifRecorder = null; } }; /** * This method can be used to manually get all recorded blobs' DataURLs. * @param {function} callback - All recorded blobs' DataURLs are passed back to the "callback" function. * @method * @memberof MRecordRTC * @example * recorder.getDataURL(function(recording){ * var audioDataURL = recording.audio; * var videoDataURL = recording.video; * var gifDataURL = recording.gif; * }); */ this.getDataURL = function(callback) { this.getBlob(function(blob) { if (blob.audio && blob.video) { getDataURL(blob.audio, function(_audioDataURL) { getDataURL(blob.video, function(_videoDataURL) { callback({ audio: _audioDataURL, video: _videoDataURL }); }); }); } else if (blob.audio) { getDataURL(blob.audio, function(_audioDataURL) { callback({ audio: _audioDataURL }); }); } else if (blob.video) { getDataURL(blob.video, function(_videoDataURL) { callback({ video: _videoDataURL }); }); } }); function getDataURL(blob, callback00) { if (typeof Worker !== 'undefined') { var webWorker = processInWebWorker(function readFile(_blob) { postMessage(new FileReaderSync().readAsDataURL(_blob)); }); webWorker.onmessage = function(event) { callback00(event.data); }; webWorker.postMessage(blob); } else { var reader = new FileReader(); reader.readAsDataURL(blob); reader.onload = function(event) { callback00(event.target.result); }; } } function processInWebWorker(_function) { var blob = URL.createObjectURL(new Blob([_function.toString(), 'this.onmessage = function (eee) {' + _function.name + '(eee.data);}' ], { type: 'application/javascript' })); var worker = new Worker(blob); var url; if (typeof URL !== 'undefined') { url = URL; } else if (typeof webkitURL !== 'undefined') { url = webkitURL; } else { throw 'Neither URL nor webkitURL detected.'; } url.revokeObjectURL(blob); return worker; } }; /** * This method can be used to ask {@link MRecordRTC} to write all recorded blobs into IndexedDB storage. * @method * @memberof MRecordRTC * @example * recorder.writeToDisk(); */ this.writeToDisk = function() { RecordRTC.writeToDisk({ audio: this.audioRecorder, video: this.videoRecorder, gif: this.gifRecorder }); }; /** * This method can be used to invoke a save-as dialog for all recorded blobs. * @param {object} args - {audio: 'audio-name', video: 'video-name', gif: 'gif-name'} * @method * @memberof MRecordRTC * @example * recorder.save({ * audio: 'audio-file-name', * video: 'video-file-name', * gif : 'gif-file-name' * }); */ this.save = function(args) { args = args || { audio: true, video: true, gif: true }; if (!!args.audio && this.audioRecorder) { this.audioRecorder.save(typeof args.audio === 'string' ? args.audio : ''); } if (!!args.video && this.videoRecorder) { this.videoRecorder.save(typeof args.video === 'string' ? args.video : ''); } if (!!args.gif && this.gifRecorder) { this.gifRecorder.save(typeof args.gif === 'string' ? args.gif : ''); } }; } /** * This method can be used to get all recorded blobs from IndexedDB storage. * @param {string} type - 'all' or 'audio' or 'video' or 'gif' * @param {function} callback - Callback function to get all stored blobs. * @method * @memberof MRecordRTC * @example * MRecordRTC.getFromDisk('all', function(dataURL, type){ * if(type === 'audio') { } * if(type === 'video') { } * if(type === 'gif') { } * }); */ MRecordRTC.getFromDisk = RecordRTC.getFromDisk; /** * This method can be used to store recorded blobs into IndexedDB storage. * @param {object} options - {audio: Blob, video: Blob, gif: Blob} * @method * @memberof MRecordRTC * @example * MRecordRTC.writeToDisk({ * audio: audioBlob, * video: videoBlob, * gif : gifBlob * }); */ MRecordRTC.writeToDisk = RecordRTC.writeToDisk; if (typeof RecordRTC !== 'undefined') { RecordRTC.MRecordRTC = MRecordRTC; } var browserFakeUserAgent = 'Fake/5.0 (FakeOS) AppleWebKit/123 (KHTML, like Gecko) Fake/12.3.4567.89 Fake/123.45'; (function(that) { if (!that) { return; } if (typeof window !== 'undefined') { return; } if (typeof global === 'undefined') { return; } global.navigator = { userAgent: browserFakeUserAgent, getUserMedia: function() {} }; if (!global.console) { global.console = {}; } if (typeof global.console.log === 'undefined' || typeof global.console.error === 'undefined') { global.console.error = global.console.log = global.console.log || function() { console.log(arguments); }; } if (typeof document === 'undefined') { /*global document:true */ that.document = { documentElement: { appendChild: function() { return ''; } } }; document.createElement = document.captureStream = document.mozCaptureStream = function() { var obj = { getContext: function() { return obj; }, play: function() {}, pause: function() {}, drawImage: function() {}, toDataURL: function() { return ''; }, style: {} }; return obj; }; that.HTMLVideoElement = function() {}; } if (typeof location === 'undefined') { /*global location:true */ that.location = { protocol: 'file:', href: '', hash: '' }; } if (typeof screen === 'undefined') { /*global screen:true */ that.screen = { width: 0, height: 0 }; } if (typeof URL === 'undefined') { /*global screen:true */ that.URL = { createObjectURL: function() { return ''; }, revokeObjectURL: function() { return ''; } }; } /*global window:true */ that.window = global; })(typeof global !== 'undefined' ? global : null); // _____________________________ // Cross-Browser-Declarations.js // animation-frame used in WebM recording /*jshint -W079 */ var requestAnimationFrame = window.requestAnimationFrame; if (typeof requestAnimationFrame === 'undefined') { if (typeof webkitRequestAnimationFrame !== 'undefined') { /*global requestAnimationFrame:true */ requestAnimationFrame = webkitRequestAnimationFrame; } else if (typeof mozRequestAnimationFrame !== 'undefined') { /*global requestAnimationFrame:true */ requestAnimationFrame = mozRequestAnimationFrame; } else if (typeof msRequestAnimationFrame !== 'undefined') { /*global requestAnimationFrame:true */ requestAnimationFrame = msRequestAnimationFrame; } else if (typeof requestAnimationFrame === 'undefined') { // via: https://gist.github.com/paulirish/1579671 var lastTime = 0; /*global requestAnimationFrame:true */ requestAnimationFrame = function(callback, element) { var currTime = new Date().getTime(); var timeToCall = Math.max(0, 16 - (currTime - lastTime)); var id = setTimeout(function() { callback(currTime + timeToCall); }, timeToCall); lastTime = currTime + timeToCall; return id; }; } } /*jshint -W079 */ var cancelAnimationFrame = window.cancelAnimationFrame; if (typeof cancelAnimationFrame === 'undefined') { if (typeof webkitCancelAnimationFrame !== 'undefined') { /*global cancelAnimationFrame:true */ cancelAnimationFrame = webkitCancelAnimationFrame; } else if (typeof mozCancelAnimationFrame !== 'undefined') { /*global cancelAnimationFrame:true */ cancelAnimationFrame = mozCancelAnimationFrame; } else if (typeof msCancelAnimationFrame !== 'undefined') { /*global cancelAnimationFrame:true */ cancelAnimationFrame = msCancelAnimationFrame; } else if (typeof cancelAnimationFrame === 'undefined') { /*global cancelAnimationFrame:true */ cancelAnimationFrame = function(id) { clearTimeout(id); }; } } // WebAudio API representer var AudioContext = window.AudioContext; if (typeof AudioContext === 'undefined') { if (typeof webkitAudioContext !== 'undefined') { /*global AudioContext:true */ AudioContext = webkitAudioContext; } if (typeof mozAudioContext !== 'undefined') { /*global AudioContext:true */ AudioContext = mozAudioContext; } } /*jshint -W079 */ var URL = window.URL; if (typeof URL === 'undefined' && typeof webkitURL !== 'undefined') { /*global URL:true */ URL = webkitURL; } if (typeof navigator !== 'undefined' && typeof navigator.getUserMedia === 'undefined') { // maybe window.navigator? if (typeof navigator.webkitGetUserMedia !== 'undefined') { navigator.getUserMedia = navigator.webkitGetUserMedia; } if (typeof navigator.mozGetUserMedia !== 'undefined') { navigator.getUserMedia = navigator.mozGetUserMedia; } } var isEdge = navigator.userAgent.indexOf('Edge') !== -1 && (!!navigator.msSaveBlob || !!navigator.msSaveOrOpenBlob); var isOpera = !!window.opera || navigator.userAgent.indexOf('OPR/') !== -1; var isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') > -1 && ('netscape' in window) && / rv:/.test(navigator.userAgent); var isChrome = (!isOpera && !isEdge && !!navigator.webkitGetUserMedia) || isElectron() || navigator.userAgent.toLowerCase().indexOf('chrome/') !== -1; var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent); if (isSafari && !isChrome && navigator.userAgent.indexOf('CriOS') !== -1) { isSafari = false; isChrome = true; } var MediaStream = window.MediaStream; if (typeof MediaStream === 'undefined' && typeof webkitMediaStream !== 'undefined') { MediaStream = webkitMediaStream; } /*global MediaStream:true */ if (typeof MediaStream !== 'undefined') { // override "stop" method for all browsers if (typeof MediaStream.prototype.stop === 'undefined') { MediaStream.prototype.stop = function() { this.getTracks().forEach(function(track) { track.stop(); }); }; } } // below function via: http://goo.gl/B3ae8c /** * Return human-readable file size. * @param {number} bytes - Pass bytes and get formatted string. * @returns {string} - formatted string * @example * bytesToSize(1024*1024*5) === '5 GB' * @see {@link https://github.com/muaz-khan/RecordRTC|RecordRTC Source Code} */ function bytesToSize(bytes) { var k = 1000; var sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB']; if (bytes === 0) { return '0 Bytes'; } var i = parseInt(Math.floor(Math.log(bytes) / Math.log(k)), 10); return (bytes / Math.pow(k, i)).toPrecision(3) + ' ' + sizes[i]; } /** * @param {Blob} file - File or Blob object. This parameter is required. * @param {string} fileName - Optional file name e.g. "Recorded-Video.webm" * @example * invokeSaveAsDialog(blob or file, [optional] fileName); * @see {@link https://github.com/muaz-khan/RecordRTC|RecordRTC Source Code} */ function invokeSaveAsDialog(file, fileName) { if (!file) { throw 'Blob object is required.'; } if (!file.type) { try { file.type = 'video/webm'; } catch (e) {} } var fileExtension = (file.type || 'video/webm').split('/')[1]; if (fileExtension.indexOf(';') !== -1) { // extended mimetype, e.g. 'video/webm;codecs=vp8,opus' fileExtension = fileExtension.split(';')[0]; } if (fileName && fileName.indexOf('.') !== -1) { var splitted = fileName.split('.'); fileName = splitted[0]; fileExtension = splitted[1]; } var fileFullName = (fileName || (Math.round(Math.random() * 9999999999) + 888888888)) + '.' + fileExtension; if (typeof navigator.msSaveOrOpenBlob !== 'undefined') { return navigator.msSaveOrOpenBlob(file, fileFullName); } else if (typeof navigator.msSaveBlob !== 'undefined') { return navigator.msSaveBlob(file, fileFullName); } var hyperlink = document.createElement('a'); hyperlink.href = URL.createObjectURL(file); hyperlink.download = fileFullName; hyperlink.style = 'display:none;opacity:0;color:transparent;'; (document.body || document.documentElement).appendChild(hyperlink); if (typeof hyperlink.click === 'function') { hyperlink.click(); } else { hyperlink.target = '_blank'; hyperlink.dispatchEvent(new MouseEvent('click', { view: window, bubbles: true, cancelable: true })); } URL.revokeObjectURL(hyperlink.href); } /** * from: https://github.com/cheton/is-electron/blob/master/index.js **/ function isElectron() { // Renderer process if (typeof window !== 'undefined' && typeof window.process === 'object' && window.process.type === 'renderer') { return true; } // Main process if (typeof process !== 'undefined' && typeof process.versions === 'object' && !!process.versions.electron) { return true; } // Detect the user agent when the `nodeIntegration` option is set to true if (typeof navigator === 'object' && typeof navigator.userAgent === 'string' && navigator.userAgent.indexOf('Electron') >= 0) { return true; } return false; } function getTracks(stream, kind) { if (!stream || !stream.getTracks) { return []; } return stream.getTracks().filter(function(t) { return t.kind === (kind || 'audio'); }); } function setSrcObject(stream, element) { if ('srcObject' in element) { element.srcObject = stream; } else if ('mozSrcObject' in element) { element.mozSrcObject = stream; } else { element.srcObject = stream; } } /** * @param {Blob} file - File or Blob object. * @param {function} callback - Callback function. * @example * getSeekableBlob(blob or file, callback); * @see {@link https://github.com/muaz-khan/RecordRTC|RecordRTC Source Code} */ function getSeekableBlob(inputBlob, callback) { // EBML.js copyrights goes to: https://github.com/legokichi/ts-ebml if (typeof EBML === 'undefined') { throw new Error('Please link: https://www.webrtc-experiment.com/EBML.js'); } var reader = new EBML.Reader(); var decoder = new EBML.Decoder(); var tools = EBML.tools; var fileReader = new FileReader(); fileReader.onload = function(e) { var ebmlElms = decoder.decode(this.result); ebmlElms.forEach(function(element) { reader.read(element); }); reader.stop(); var refinedMetadataBuf = tools.makeMetadataSeekable(reader.metadatas, reader.duration, reader.cues); var body = this.result.slice(reader.metadataSize); var newBlob = new Blob([refinedMetadataBuf, body], { type: 'video/webm' }); callback(newBlob); }; fileReader.readAsArrayBuffer(inputBlob); } if (typeof RecordRTC !== 'undefined') { RecordRTC.invokeSaveAsDialog = invokeSaveAsDialog; RecordRTC.getTracks = getTracks; RecordRTC.getSeekableBlob = getSeekableBlob; RecordRTC.bytesToSize = bytesToSize; RecordRTC.isElectron = isElectron; } // __________ (used to handle stuff like http://goo.gl/xmE5eg) issue #129 // Storage.js /** * Storage is a standalone object used by {@link RecordRTC} to store reusable objects e.g. "new AudioContext". * @license {@link https://github.com/muaz-khan/RecordRTC/blob/master/LICENSE|MIT} * @author {@link https://MuazKhan.com|Muaz Khan} * @example * Storage.AudioContext === webkitAudioContext * @property {webkitAudioContext} AudioContext - Keeps a reference to AudioContext object. * @see {@link https://github.com/muaz-khan/RecordRTC|RecordRTC Source Code} */ var Storage = {}; if (typeof AudioContext !== 'undefined') { Storage.AudioContext = AudioContext; } else if (typeof webkitAudioContext !== 'undefined') { Storage.AudioContext = webkitAudioContext; } if (typeof RecordRTC !== 'undefined') { RecordRTC.Storage = Storage; } function isMediaRecorderCompatible() { if (isFirefox || isSafari || isEdge) { return true; } var nVer = navigator.appVersion; var nAgt = navigator.userAgent; var fullVersion = '' + parseFloat(navigator.appVersion); var majorVersion = parseInt(navigator.appVersion, 10); var nameOffset, verOffset, ix; if (isChrome || isOpera) { verOffset = nAgt.indexOf('Chrome'); fullVersion = nAgt.substring(verOffset + 7); } // trim the fullVersion string at semicolon/space if present if ((ix = fullVersion.indexOf(';')) !== -1) { fullVersion = fullVersion.substring(0, ix); } if ((ix = fullVersion.indexOf(' ')) !== -1) { fullVersion = fullVersion.substring(0, ix); } majorVersion = parseInt('' + fullVersion, 10); if (isNaN(majorVersion)) { fullVersion = '' + parseFloat(navigator.appVersion); majorVersion = parseInt(navigator.appVersion, 10); } return majorVersion >= 49; } // ______________________ // MediaStreamRecorder.js /** * MediaStreamRecorder is an abstraction layer for {@link https://w3c.github.io/mediacapture-record/MediaRecorder.html|MediaRecorder API}. It is used by {@link RecordRTC} to record MediaStream(s) in both Chrome and Firefox. * @summary Runs top over {@link https://w3c.github.io/mediacapture-record/MediaRecorder.html|MediaRecorder API}. * @license {@link https://github.com/muaz-khan/RecordRTC/blob/master/LICENSE|MIT} * @author {@link https://github.com/muaz-khan|Muaz Khan} * @typedef MediaStreamRecorder * @class * @example * var config = { * mimeType: 'video/webm', // vp8, vp9, h264, mkv, opus/vorbis * audioBitsPerSecond : 256 * 8 * 1024, * videoBitsPerSecond : 256 * 8 * 1024, * bitsPerSecond: 256 * 8 * 1024, // if this is provided, skip above two * checkForInactiveTracks: true, * timeSlice: 1000, // concatenate intervals based blobs * ondataavailable: function() {} // get intervals based blobs * } * var recorder = new MediaStreamRecorder(mediaStream, config); * recorder.record(); * recorder.stop(function(blob) { * video.src = URL.createObjectURL(blob); * * // or * var blob = recorder.blob; * }); * @see {@link https://github.com/muaz-khan/RecordRTC|RecordRTC Source Code} * @param {MediaStream} mediaStream - MediaStream object fetched using getUserMedia API or generated using captureStreamUntilEnded or WebAudio API. * @param {object} config - {disableLogs:true, initCallback: function, mimeType: "video/webm", timeSlice: 1000} * @throws Will throw an error if first argument "MediaStream" is missing. Also throws error if "MediaRecorder API" are not supported by the browser. */ function MediaStreamRecorder(mediaStream, config) { var self = this; if (typeof mediaStream === 'undefined') { throw 'First argument "MediaStream" is required.'; } if (typeof MediaRecorder === 'undefined') { throw 'Your browser does not support the Media Recorder API. Please try other modules e.g. WhammyRecorder or StereoAudioRecorder.'; } config = config || { // bitsPerSecond: 256 * 8 * 1024, mimeType: 'video/webm' }; if (config.type === 'audio') { if (getTracks(mediaStream, 'video').length && getTracks(mediaStream, 'audio').length) { var stream; if (!!navigator.mozGetUserMedia) { stream = new MediaStream(); stream.addTrack(getTracks(mediaStream, 'audio')[0]); } else { // webkitMediaStream stream = new MediaStream(getTracks(mediaStream, 'audio')); } mediaStream = stream; } if (!config.mimeType || config.mimeType.toString().toLowerCase().indexOf('audio') === -1) { config.mimeType = isChrome ? 'audio/webm' : 'audio/ogg'; } if (config.mimeType && config.mimeType.toString().toLowerCase() !== 'audio/ogg' && !!navigator.mozGetUserMedia) { // forcing better codecs on Firefox (via #166) config.mimeType = 'audio/ogg'; } } var arrayOfBlobs = []; /** * This method returns array of blobs. Use only with "timeSlice". Its useful to preview recording anytime, without using the "stop" method. * @method * @memberof MediaStreamRecorder * @example * var arrayOfBlobs = recorder.getArrayOfBlobs(); * @returns {Array} Returns array of recorded blobs. */ this.getArrayOfBlobs = function() { return arrayOfBlobs; }; /** * This method records MediaStream. * @method * @memberof MediaStreamRecorder * @example * recorder.record(); */ this.record = function() { // set defaults self.blob = null; self.clearRecordedData(); self.timestamps = []; allStates = []; arrayOfBlobs = []; var recorderHints = config; if (!config.disableLogs) { console.log('Passing following config over MediaRecorder API.', recorderHints); } if (mediaRecorder) { // mandatory to make sure Firefox doesn't fails to record streams 3-4 times without reloading the page. mediaRecorder = null; } if (isChrome && !isMediaRecorderCompatible()) { // to support video-only recording on stable recorderHints = 'video/vp8'; } if (typeof MediaRecorder.isTypeSupported === 'function' && recorderHints.mimeType) { if (!MediaRecorder.isTypeSupported(recorderHints.mimeType)) { if (!config.disableLogs) { console.warn('MediaRecorder API seems unable to record mimeType:', recorderHints.mimeType); } recorderHints.mimeType = config.type === 'audio' ? 'audio/webm' : 'video/webm'; } } // using MediaRecorder API here try { mediaRecorder = new MediaRecorder(mediaStream, recorderHints); // reset config.mimeType = recorderHints.mimeType; } catch (e) { // chrome-based fallback mediaRecorder = new MediaRecorder(mediaStream); } // old hack? if (recorderHints.mimeType && !MediaRecorder.isTypeSupported && 'canRecordMimeType' in mediaRecorder && mediaRecorder.canRecordMimeType(recorderHints.mimeType) === false) { if (!config.disableLogs) { console.warn('MediaRecorder API seems unable to record mimeType:', recorderHints.mimeType); } } // Dispatching OnDataAvailable Handler mediaRecorder.ondataavailable = function(e) { if (e.data) { allStates.push('ondataavailable: ' + bytesToSize(e.data.size)); } if (typeof config.timeSlice === 'number') { if (e.data && e.data.size) { arrayOfBlobs.push(e.data); updateTimeStamp(); if (typeof config.ondataavailable === 'function') { // intervals based blobs var blob = config.getNativeBlob ? e.data : new Blob([e.data], { type: getMimeType(recorderHints) }); config.ondataavailable(blob); } } return; } if (!e.data || !e.data.size || e.data.size < 100 || self.blob) { // make sure that stopRecording always getting fired // even if there is invalid data if (self.recordingCallback) { self.recordingCallback(new Blob([], { type: getMimeType(recorderHints) })); self.recordingCallback = null; } return; } self.blob = config.getNativeBlob ? e.data : new Blob([e.data], { type: getMimeType(recorderHints) }); if (self.recordingCallback) { self.recordingCallback(self.blob); self.recordingCallback = null; } }; mediaRecorder.onstart = function() { allStates.push('started'); }; mediaRecorder.onpause = function() { allStates.push('paused'); }; mediaRecorder.onresume = function() { allStates.push('resumed'); }; mediaRecorder.onstop = function() { allStates.push('stopped'); }; mediaRecorder.onerror = function(error) { if (!error) { return; } if (!error.name) { error.name = 'UnknownError'; } allStates.push('error: ' + error); if (!config.disableLogs) { // via: https://w3c.github.io/mediacapture-record/MediaRecorder.html#exception-summary if (error.name.toString().toLowerCase().indexOf('invalidstate') !== -1) { console.error('The MediaRecorder is not in a state in which the proposed operation is allowed to be executed.', error); } else if (error.name.toString().toLowerCase().indexOf('notsupported') !== -1) { console.error('MIME type (', recorderHints.mimeType, ') is not supported.', error); } else if (error.name.toString().toLowerCase().indexOf('security') !== -1) { console.error('MediaRecorder security error', error); } // older code below else if (error.name === 'OutOfMemory') { console.error('The UA has exhaused the available memory. User agents SHOULD provide as much additional information as possible in the message attribute.', error); } else if (error.name === 'IllegalStreamModification') { console.error('A modification to the stream has occurred that makes it impossible to continue recording. An example would be the addition of a Track while recording is occurring. User agents SHOULD provide as much additional information as possible in the message attribute.', error); } else if (error.name === 'OtherRecordingError') { console.error('Used for an fatal error other than those listed above. User agents SHOULD provide as much additional information as possible in the message attribute.', error); } else if (error.name === 'GenericError') { console.error('The UA cannot provide the codec or recording option that has been requested.', error); } else { console.error('MediaRecorder Error', error); } } (function(looper) { if (!self.manuallyStopped && mediaRecorder && mediaRecorder.state === 'inactive') { delete config.timeslice; // 10 minutes, enough? mediaRecorder.start(10 * 60 * 1000); return; } setTimeout(looper, 1000); })(); if (mediaRecorder.state !== 'inactive' && mediaRecorder.state !== 'stopped') { mediaRecorder.stop(); } }; if (typeof config.timeSlice === 'number') { updateTimeStamp(); mediaRecorder.start(config.timeSlice); } else { // default is 60 minutes; enough? // use config => {timeSlice: 1000} otherwise mediaRecorder.start(3.6e+6); } if (config.initCallback) { config.initCallback(); // old code } }; /** * @property {Array} timestamps - Array of time stamps * @memberof MediaStreamRecorder * @example * console.log(recorder.timestamps); */ this.timestamps = []; function updateTimeStamp() { self.timestamps.push(new Date().getTime()); if (typeof config.onTimeStamp === 'function') { config.onTimeStamp(self.timestamps[self.timestamps.length - 1], self.timestamps); } } function getMimeType(secondObject) { if (mediaRecorder && mediaRecorder.mimeType) { return mediaRecorder.mimeType; } return secondObject.mimeType || 'video/webm'; } /** * This method stops recording MediaStream. * @param {function} callback - Callback function, that is used to pass recorded blob back to the callee. * @method * @memberof MediaStreamRecorder * @example * recorder.stop(function(blob) { * video.src = URL.createObjectURL(blob); * }); */ this.stop = function(callback) { callback = callback || function() {}; self.manuallyStopped = true; // used inside the mediaRecorder.onerror if (!mediaRecorder) { return; } this.recordingCallback = callback; if (mediaRecorder.state === 'recording') { mediaRecorder.stop(); } if (typeof config.timeSlice === 'number') { setTimeout(function() { self.blob = new Blob(arrayOfBlobs, { type: getMimeType(config) }); self.recordingCallback(self.blob); }, 100); } }; /** * This method pauses the recording process. * @method * @memberof MediaStreamRecorder * @example * recorder.pause(); */ this.pause = function() { if (!mediaRecorder) { return; } if (mediaRecorder.state === 'recording') { mediaRecorder.pause(); } }; /** * This method resumes the recording process. * @method * @memberof MediaStreamRecorder * @example * recorder.resume(); */ this.resume = function() { if (!mediaRecorder) { return; } if (mediaRecorder.state === 'paused') { mediaRecorder.resume(); } }; /** * This method resets currently recorded data. * @method * @memberof MediaStreamRecorder * @example * recorder.clearRecordedData(); */ this.clearRecordedData = function() { if (mediaRecorder && mediaRecorder.state === 'recording') { self.stop(clearRecordedDataCB); } clearRecordedDataCB(); }; function clearRecordedDataCB() { arrayOfBlobs = []; mediaRecorder = null; self.timestamps = []; } // Reference to "MediaRecorder" object var mediaRecorder; /** * Access to native MediaRecorder API * @method * @memberof MediaStreamRecorder * @instance * @example * var internal = recorder.getInternalRecorder(); * internal.ondataavailable = function() {}; // override * internal.stream, internal.onpause, internal.onstop, etc. * @returns {Object} Returns internal recording object. */ this.getInternalRecorder = function() { return mediaRecorder; }; function isMediaStreamActive() { if ('active' in mediaStream) { if (!mediaStream.active) { return false; } } else if ('ended' in mediaStream) { // old hack if (mediaStream.ended) { return false; } } return true; } /** * @property {Blob} blob - Recorded data as "Blob" object. * @memberof MediaStreamRecorder * @example * recorder.stop(function() { * var blob = recorder.blob; * }); */ this.blob = null; /** * Get MediaRecorder readonly state. * @method * @memberof MediaStreamRecorder * @example * var state = recorder.getState(); * @returns {String} Returns recording state. */ this.getState = function() { if (!mediaRecorder) { return 'inactive'; } return mediaRecorder.state || 'inactive'; }; // list of all recording states var allStates = []; /** * Get MediaRecorder all recording states. * @method * @memberof MediaStreamRecorder * @example * var state = recorder.getAllStates(); * @returns {Array} Returns all recording states */ this.getAllStates = function() { return allStates; }; // if any Track within the MediaStream is muted or not enabled at any time, // the browser will only record black frames // or silence since that is the content produced by the Track // so we need to stopRecording as soon as any single track ends. if (typeof config.checkForInactiveTracks === 'undefined') { config.checkForInactiveTracks = false; // disable to minimize CPU usage } var self = this; // this method checks if media stream is stopped // or if any track is ended. (function looper() { if (!mediaRecorder || config.checkForInactiveTracks === false) { return; } if (isMediaStreamActive() === false) { if (!config.disableLogs) { console.log('MediaStream seems stopped.'); } self.stop(); return; } setTimeout(looper, 1000); // check every second })(); // for debugging this.name = 'MediaStreamRecorder'; this.toString = function() { return this.name; }; } if (typeof RecordRTC !== 'undefined') { RecordRTC.MediaStreamRecorder = MediaStreamRecorder; } // source code from: http://typedarray.org/wp-content/projects/WebAudioRecorder/script.js // https://github.com/mattdiamond/Recorderjs#license-mit // ______________________ // StereoAudioRecorder.js /** * StereoAudioRecorder is a standalone class used by {@link RecordRTC} to bring "stereo" audio-recording in chrome. * @summary JavaScript standalone object for stereo audio recording. * @license {@link https://github.com/muaz-khan/RecordRTC/blob/master/LICENSE|MIT} * @author {@link https://MuazKhan.com|Muaz Khan} * @typedef StereoAudioRecorder * @class * @example * var recorder = new StereoAudioRecorder(MediaStream, { * sampleRate: 44100, * bufferSize: 4096 * }); * recorder.record(); * recorder.stop(function(blob) { * video.src = URL.createObjectURL(blob); * }); * @see {@link https://github.com/muaz-khan/RecordRTC|RecordRTC Source Code} * @param {MediaStream} mediaStream - MediaStream object fetched using getUserMedia API or generated using captureStreamUntilEnded or WebAudio API. * @param {object} config - {sampleRate: 44100, bufferSize: 4096, numberOfAudioChannels: 1, etc.} */ function StereoAudioRecorder(mediaStream, config) { if (!getTracks(mediaStream, 'audio').length) { throw 'Your stream has no audio tracks.'; } config = config || {}; var self = this; // variables var leftchannel = []; var rightchannel = []; var recording = false; var recordingLength = 0; var jsAudioNode; var numberOfAudioChannels = 2; /** * Set sample rates such as 8K or 16K. Reference: http://stackoverflow.com/a/28977136/552182 * @property {number} desiredSampRate - Desired Bits per sample * 1000 * @memberof StereoAudioRecorder * @instance * @example * var recorder = StereoAudioRecorder(mediaStream, { * desiredSampRate: 16 * 1000 // bits-per-sample * 1000 * }); */ var desiredSampRate = config.desiredSampRate; // backward compatibility if (config.leftChannel === true) { numberOfAudioChannels = 1; } if (config.numberOfAudioChannels === 1) { numberOfAudioChannels = 1; } if (!numberOfAudioChannels || numberOfAudioChannels < 1) { numberOfAudioChannels = 2; } if (!config.disableLogs) { console.log('StereoAudioRecorder is set to record number of channels: ' + numberOfAudioChannels); } // if any Track within the MediaStream is muted or not enabled at any time, // the browser will only record black frames // or silence since that is the content produced by the Track // so we need to stopRecording as soon as any single track ends. if (typeof config.checkForInactiveTracks === 'undefined') { config.checkForInactiveTracks = true; } function isMediaStreamActive() { if (config.checkForInactiveTracks === false) { // always return "true" return true; } if ('active' in mediaStream) { if (!mediaStream.active) { return false; } } else if ('ended' in mediaStream) { // old hack if (mediaStream.ended) { return false; } } return true; } /** * This method records MediaStream. * @method * @memberof StereoAudioRecorder * @example * recorder.record(); */ this.record = function() { if (isMediaStreamActive() === false) { throw 'Please make sure MediaStream is active.'; } resetVariables(); isAudioProcessStarted = isPaused = false; recording = true; if (typeof config.timeSlice !== 'undefined') { looper(); } }; function mergeLeftRightBuffers(config, callback) { function mergeAudioBuffers(config, cb) { var numberOfAudioChannels = config.numberOfAudioChannels; // todo: "slice(0)" --- is it causes loop? Should be removed? var leftBuffers = config.leftBuffers.slice(0); var rightBuffers = config.rightBuffers.slice(0); var sampleRate = config.sampleRate; var internalInterleavedLength = config.internalInterleavedLength; var desiredSampRate = config.desiredSampRate; if (numberOfAudioChannels === 2) { leftBuffers = mergeBuffers(leftBuffers, internalInterleavedLength); rightBuffers = mergeBuffers(rightBuffers, internalInterleavedLength); if (desiredSampRate) { leftBuffers = interpolateArray(leftBuffers, desiredSampRate, sampleRate); rightBuffers = interpolateArray(rightBuffers, desiredSampRate, sampleRate); } } if (numberOfAudioChannels === 1) { leftBuffers = mergeBuffers(leftBuffers, internalInterleavedLength); if (desiredSampRate) { leftBuffers = interpolateArray(leftBuffers, desiredSampRate, sampleRate); } } // set sample rate as desired sample rate if (desiredSampRate) { sampleRate = desiredSampRate; } // for changing the sampling rate, reference: // http://stackoverflow.com/a/28977136/552182 function interpolateArray(data, newSampleRate, oldSampleRate) { var fitCount = Math.round(data.length * (newSampleRate / oldSampleRate)); var newData = []; var springFactor = Number((data.length - 1) / (fitCount - 1)); newData[0] = data[0]; for (var i = 1; i < fitCount - 1; i++) { var tmp = i * springFactor; var before = Number(Math.floor(tmp)).toFixed(); var after = Number(Math.ceil(tmp)).toFixed(); var atPoint = tmp - before; newData[i] = linearInterpolate(data[before], data[after], atPoint); } newData[fitCount - 1] = data[data.length - 1]; return newData; } function linearInterpolate(before, after, atPoint) { return before + (after - before) * atPoint; } function mergeBuffers(channelBuffer, rLength) { var result = new Float64Array(rLength); var offset = 0; var lng = channelBuffer.length; for (var i = 0; i < lng; i++) { var buffer = channelBuffer[i]; result.set(buffer, offset); offset += buffer.length; } return result; } function interleave(leftChannel, rightChannel) { var length = leftChannel.length + rightChannel.length; var result = new Float64Array(length); var inputIndex = 0; for (var index = 0; index < length;) { result[index++] = leftChannel[inputIndex]; result[index++] = rightChannel[inputIndex]; inputIndex++; } return result; } function writeUTFBytes(view, offset, string) { var lng = string.length; for (var i = 0; i < lng; i++) { view.setUint8(offset + i, string.charCodeAt(i)); } } // interleave both channels together var interleaved; if (numberOfAudioChannels === 2) { interleaved = interleave(leftBuffers, rightBuffers); } if (numberOfAudioChannels === 1) { interleaved = leftBuffers; } var interleavedLength = interleaved.length; // create wav file var resultingBufferLength = 44 + interleavedLength * 2; var buffer = new ArrayBuffer(resultingBufferLength); var view = new DataView(buffer); // RIFF chunk descriptor/identifier writeUTFBytes(view, 0, 'RIFF'); // RIFF chunk length // changed "44" to "36" via #401 view.setUint32(4, 36 + interleavedLength * 2, true); // RIFF type writeUTFBytes(view, 8, 'WAVE'); // format chunk identifier // FMT sub-chunk writeUTFBytes(view, 12, 'fmt '); // format chunk length view.setUint32(16, 16, true); // sample format (raw) view.setUint16(20, 1, true); // stereo (2 channels) view.setUint16(22, numberOfAudioChannels, true); // sample rate view.setUint32(24, sampleRate, true); // byte rate (sample rate * block align) view.setUint32(28, sampleRate * numberOfAudioChannels * 2, true); // block align (channel count * bytes per sample) view.setUint16(32, numberOfAudioChannels * 2, true); // bits per sample view.setUint16(34, 16, true); // data sub-chunk // data chunk identifier writeUTFBytes(view, 36, 'data'); // data chunk length view.setUint32(40, interleavedLength * 2, true); // write the PCM samples var lng = interleavedLength; var index = 44; var volume = 1; for (var i = 0; i < lng; i++) { view.setInt16(index, interleaved[i] * (0x7FFF * volume), true); index += 2; } if (cb) { return cb({ buffer: buffer, view: view }); } postMessage({ buffer: buffer, view: view }); } if (config.noWorker) { mergeAudioBuffers(config, function(data) { callback(data.buffer, data.view); }); return; } var webWorker = processInWebWorker(mergeAudioBuffers); webWorker.onmessage = function(event) { callback(event.data.buffer, event.data.view); // release memory URL.revokeObjectURL(webWorker.workerURL); // kill webworker (or Chrome will kill your page after ~25 calls) webWorker.terminate(); }; webWorker.postMessage(config); } function processInWebWorker(_function) { var workerURL = URL.createObjectURL(new Blob([_function.toString(), ';this.onmessage = function (eee) {' + _function.name + '(eee.data);}' ], { type: 'application/javascript' })); var worker = new Worker(workerURL); worker.workerURL = workerURL; return worker; } /** * This method stops recording MediaStream. * @param {function} callback - Callback function, that is used to pass recorded blob back to the callee. * @method * @memberof StereoAudioRecorder * @example * recorder.stop(function(blob) { * video.src = URL.createObjectURL(blob); * }); */ this.stop = function(callback) { callback = callback || function() {}; // stop recording recording = false; mergeLeftRightBuffers({ desiredSampRate: desiredSampRate, sampleRate: sampleRate, numberOfAudioChannels: numberOfAudioChannels, internalInterleavedLength: recordingLength, leftBuffers: leftchannel, rightBuffers: numberOfAudioChannels === 1 ? [] : rightchannel, noWorker: config.noWorker }, function(buffer, view) { /** * @property {Blob} blob - The recorded blob object. * @memberof StereoAudioRecorder * @example * recorder.stop(function(){ * var blob = recorder.blob; * }); */ self.blob = new Blob([view], { type: 'audio/wav' }); /** * @property {ArrayBuffer} buffer - The recorded buffer object. * @memberof StereoAudioRecorder * @example * recorder.stop(function(){ * var buffer = recorder.buffer; * }); */ self.buffer = new ArrayBuffer(view.buffer.byteLength); /** * @property {DataView} view - The recorded data-view object. * @memberof StereoAudioRecorder * @example * recorder.stop(function(){ * var view = recorder.view; * }); */ self.view = view; self.sampleRate = desiredSampRate || sampleRate; self.bufferSize = bufferSize; // recorded audio length self.length = recordingLength; isAudioProcessStarted = false; if (callback) { callback(self.blob); } }); }; if (typeof RecordRTC.Storage === 'undefined') { RecordRTC.Storage = { AudioContextConstructor: null, AudioContext: window.AudioContext || window.webkitAudioContext }; } if (!RecordRTC.Storage.AudioContextConstructor || RecordRTC.Storage.AudioContextConstructor.state === 'closed') { RecordRTC.Storage.AudioContextConstructor = new RecordRTC.Storage.AudioContext(); } var context = RecordRTC.Storage.AudioContextConstructor; // creates an audio node from the microphone incoming stream var audioInput = context.createMediaStreamSource(mediaStream); var legalBufferValues = [0, 256, 512, 1024, 2048, 4096, 8192, 16384]; /** * From the spec: This value controls how frequently the audioprocess event is * dispatched and how many sample-frames need to be processed each call. * Lower values for buffer size will result in a lower (better) latency. * Higher values will be necessary to avoid audio breakup and glitches * The size of the buffer (in sample-frames) which needs to * be processed each time onprocessaudio is called. * Legal values are (256, 512, 1024, 2048, 4096, 8192, 16384). * @property {number} bufferSize - Buffer-size for how frequently the audioprocess event is dispatched. * @memberof StereoAudioRecorder * @example * recorder = new StereoAudioRecorder(mediaStream, { * bufferSize: 4096 * }); */ // "0" means, let chrome decide the most accurate buffer-size for current platform. var bufferSize = typeof config.bufferSize === 'undefined' ? 4096 : config.bufferSize; if (legalBufferValues.indexOf(bufferSize) === -1) { if (!config.disableLogs) { console.log('Legal values for buffer-size are ' + JSON.stringify(legalBufferValues, null, '\t')); } } if (context.createJavaScriptNode) { jsAudioNode = context.createJavaScriptNode(bufferSize, numberOfAudioChannels, numberOfAudioChannels); } else if (context.createScriptProcessor) { jsAudioNode = context.createScriptProcessor(bufferSize, numberOfAudioChannels, numberOfAudioChannels); } else { throw 'WebAudio API has no support on this browser.'; } // connect the stream to the script processor audioInput.connect(jsAudioNode); if (!config.bufferSize) { bufferSize = jsAudioNode.bufferSize; // device buffer-size } /** * The sample rate (in sample-frames per second) at which the * AudioContext handles audio. It is assumed that all AudioNodes * in the context run at this rate. In making this assumption, * sample-rate converters or "varispeed" processors are not supported * in real-time processing. * The sampleRate parameter describes the sample-rate of the * linear PCM audio data in the buffer in sample-frames per second. * An implementation must support sample-rates in at least * the range 22050 to 96000. * @property {number} sampleRate - Buffer-size for how frequently the audioprocess event is dispatched. * @memberof StereoAudioRecorder * @example * recorder = new StereoAudioRecorder(mediaStream, { * sampleRate: 44100 * }); */ var sampleRate = typeof config.sampleRate !== 'undefined' ? config.sampleRate : context.sampleRate || 44100; if (sampleRate < 22050 || sampleRate > 96000) { // Ref: http://stackoverflow.com/a/26303918/552182 if (!config.disableLogs) { console.log('sample-rate must be under range 22050 and 96000.'); } } if (!config.disableLogs) { if (config.desiredSampRate) { console.log('Desired sample-rate: ' + config.desiredSampRate); } } var isPaused = false; /** * This method pauses the recording process. * @method * @memberof StereoAudioRecorder * @example * recorder.pause(); */ this.pause = function() { isPaused = true; }; /** * This method resumes the recording process. * @method * @memberof StereoAudioRecorder * @example * recorder.resume(); */ this.resume = function() { if (isMediaStreamActive() === false) { throw 'Please make sure MediaStream is active.'; } if (!recording) { if (!config.disableLogs) { console.log('Seems recording has been restarted.'); } this.record(); return; } isPaused = false; }; /** * This method resets currently recorded data. * @method * @memberof StereoAudioRecorder * @example * recorder.clearRecordedData(); */ this.clearRecordedData = function() { config.checkForInactiveTracks = false; if (recording) { this.stop(clearRecordedDataCB); } clearRecordedDataCB(); }; function resetVariables() { leftchannel = []; rightchannel = []; recordingLength = 0; isAudioProcessStarted = false; recording = false; isPaused = false; context = null; self.leftchannel = leftchannel; self.rightchannel = rightchannel; self.numberOfAudioChannels = numberOfAudioChannels; self.desiredSampRate = desiredSampRate; self.sampleRate = sampleRate; self.recordingLength = recordingLength; intervalsBasedBuffers = { left: [], right: [], recordingLength: 0 }; } function clearRecordedDataCB() { if (jsAudioNode) { jsAudioNode.onaudioprocess = null; jsAudioNode.disconnect(); jsAudioNode = null; } if (audioInput) { audioInput.disconnect(); audioInput = null; } resetVariables(); } // for debugging this.name = 'StereoAudioRecorder'; this.toString = function() { return this.name; }; var isAudioProcessStarted = false; function onAudioProcessDataAvailable(e) { if (isPaused) { return; } if (isMediaStreamActive() === false) { if (!config.disableLogs) { console.log('MediaStream seems stopped.'); } jsAudioNode.disconnect(); recording = false; } if (!recording) { if (audioInput) { audioInput.disconnect(); audioInput = null; } return; } /** * This method is called on "onaudioprocess" event's first invocation. * @method {function} onAudioProcessStarted * @memberof StereoAudioRecorder * @example * recorder.onAudioProcessStarted: function() { }; */ if (!isAudioProcessStarted) { isAudioProcessStarted = true; if (config.onAudioProcessStarted) { config.onAudioProcessStarted(); } if (config.initCallback) { config.initCallback(); } } var left = e.inputBuffer.getChannelData(0); // we clone the samples var chLeft = new Float32Array(left); leftchannel.push(chLeft); if (numberOfAudioChannels === 2) { var right = e.inputBuffer.getChannelData(1); var chRight = new Float32Array(right); rightchannel.push(chRight); } recordingLength += bufferSize; // export raw PCM self.recordingLength = recordingLength; if (typeof config.timeSlice !== 'undefined') { intervalsBasedBuffers.recordingLength += bufferSize; intervalsBasedBuffers.left.push(chLeft); if (numberOfAudioChannels === 2) { intervalsBasedBuffers.right.push(chRight); } } } jsAudioNode.onaudioprocess = onAudioProcessDataAvailable; // to prevent self audio to be connected with speakers if (context.createMediaStreamDestination) { jsAudioNode.connect(context.createMediaStreamDestination()); } else { jsAudioNode.connect(context.destination); } // export raw PCM this.leftchannel = leftchannel; this.rightchannel = rightchannel; this.numberOfAudioChannels = numberOfAudioChannels; this.desiredSampRate = desiredSampRate; this.sampleRate = sampleRate; self.recordingLength = recordingLength; // helper for intervals based blobs var intervalsBasedBuffers = { left: [], right: [], recordingLength: 0 }; // this looper is used to support intervals based blobs (via timeSlice+ondataavailable) function looper() { if (!recording || typeof config.ondataavailable !== 'function' || typeof config.timeSlice === 'undefined') { return; } if (intervalsBasedBuffers.left.length) { mergeLeftRightBuffers({ desiredSampRate: desiredSampRate, sampleRate: sampleRate, numberOfAudioChannels: numberOfAudioChannels, internalInterleavedLength: intervalsBasedBuffers.recordingLength, leftBuffers: intervalsBasedBuffers.left, rightBuffers: numberOfAudioChannels === 1 ? [] : intervalsBasedBuffers.right }, function(buffer, view) { var blob = new Blob([view], { type: 'audio/wav' }); config.ondataavailable(blob); setTimeout(looper, config.timeSlice); }); intervalsBasedBuffers = { left: [], right: [], recordingLength: 0 }; } else { setTimeout(looper, config.timeSlice); } } } if (typeof RecordRTC !== 'undefined') { RecordRTC.StereoAudioRecorder = StereoAudioRecorder; } // _________________ // CanvasRecorder.js /** * CanvasRecorder is a standalone class used by {@link RecordRTC} to bring HTML5-Canvas recording into video WebM. It uses HTML2Canvas library and runs top over {@link Whammy}. * @summary HTML2Canvas recording into video WebM. * @license {@link https://github.com/muaz-khan/RecordRTC/blob/master/LICENSE|MIT} * @author {@link https://MuazKhan.com|Muaz Khan} * @typedef CanvasRecorder * @class * @example * var recorder = new CanvasRecorder(htmlElement, { disableLogs: true, useWhammyRecorder: true }); * recorder.record(); * recorder.stop(function(blob) { * video.src = URL.createObjectURL(blob); * }); * @see {@link https://github.com/muaz-khan/RecordRTC|RecordRTC Source Code} * @param {HTMLElement} htmlElement - querySelector/getElementById/getElementsByTagName[0]/etc. * @param {object} config - {disableLogs:true, initCallback: function} */ function CanvasRecorder(htmlElement, config) { if (typeof html2canvas === 'undefined') { throw 'Please link: https://www.webrtc-experiment.com/screenshot.js'; } config = config || {}; if (!config.frameInterval) { config.frameInterval = 10; } // via DetectRTC.js var isCanvasSupportsStreamCapturing = false; ['captureStream', 'mozCaptureStream', 'webkitCaptureStream'].forEach(function(item) { if (item in document.createElement('canvas')) { isCanvasSupportsStreamCapturing = true; } }); var _isChrome = (!!window.webkitRTCPeerConnection || !!window.webkitGetUserMedia) && !!window.chrome; var chromeVersion = 50; var matchArray = navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./); if (_isChrome && matchArray && matchArray[2]) { chromeVersion = parseInt(matchArray[2], 10); } if (_isChrome && chromeVersion < 52) { isCanvasSupportsStreamCapturing = false; } if (config.useWhammyRecorder) { isCanvasSupportsStreamCapturing = false; } var globalCanvas, mediaStreamRecorder; if (isCanvasSupportsStreamCapturing) { if (!config.disableLogs) { console.log('Your browser supports both MediRecorder API and canvas.captureStream!'); } if (htmlElement instanceof HTMLCanvasElement) { globalCanvas = htmlElement; } else if (htmlElement instanceof CanvasRenderingContext2D) { globalCanvas = htmlElement.canvas; } else { throw 'Please pass either HTMLCanvasElement or CanvasRenderingContext2D.'; } } else if (!!navigator.mozGetUserMedia) { if (!config.disableLogs) { console.error('Canvas recording is NOT supported in Firefox.'); } } var isRecording; /** * This method records Canvas. * @method * @memberof CanvasRecorder * @example * recorder.record(); */ this.record = function() { isRecording = true; if (isCanvasSupportsStreamCapturing && !config.useWhammyRecorder) { // CanvasCaptureMediaStream var canvasMediaStream; if ('captureStream' in globalCanvas) { canvasMediaStream = globalCanvas.captureStream(25); // 25 FPS } else if ('mozCaptureStream' in globalCanvas) { canvasMediaStream = globalCanvas.mozCaptureStream(25); } else if ('webkitCaptureStream' in globalCanvas) { canvasMediaStream = globalCanvas.webkitCaptureStream(25); } try { var mdStream = new MediaStream(); mdStream.addTrack(getTracks(canvasMediaStream, 'video')[0]); canvasMediaStream = mdStream; } catch (e) {} if (!canvasMediaStream) { throw 'captureStream API are NOT available.'; } // Note: Jan 18, 2016 status is that, // Firefox MediaRecorder API can't record CanvasCaptureMediaStream object. mediaStreamRecorder = new MediaStreamRecorder(canvasMediaStream, { mimeType: config.mimeType || 'video/webm' }); mediaStreamRecorder.record(); } else { whammy.frames = []; lastTime = new Date().getTime(); drawCanvasFrame(); } if (config.initCallback) { config.initCallback(); } }; this.getWebPImages = function(callback) { if (htmlElement.nodeName.toLowerCase() !== 'canvas') { callback(); return; } var framesLength = whammy.frames.length; whammy.frames.forEach(function(frame, idx) { var framesRemaining = framesLength - idx; if (!config.disableLogs) { console.log(framesRemaining + '/' + framesLength + ' frames remaining'); } if (config.onEncodingCallback) { config.onEncodingCallback(framesRemaining, framesLength); } var webp = frame.image.toDataURL('image/webp', 1); whammy.frames[idx].image = webp; }); if (!config.disableLogs) { console.log('Generating WebM'); } callback(); }; /** * This method stops recording Canvas. * @param {function} callback - Callback function, that is used to pass recorded blob back to the callee. * @method * @memberof CanvasRecorder * @example * recorder.stop(function(blob) { * video.src = URL.createObjectURL(blob); * }); */ this.stop = function(callback) { isRecording = false; var that = this; if (isCanvasSupportsStreamCapturing && mediaStreamRecorder) { mediaStreamRecorder.stop(callback); return; } this.getWebPImages(function() { /** * @property {Blob} blob - Recorded frames in video/webm blob. * @memberof CanvasRecorder * @example * recorder.stop(function() { * var blob = recorder.blob; * }); */ whammy.compile(function(blob) { if (!config.disableLogs) { console.log('Recording finished!'); } that.blob = blob; if (that.blob.forEach) { that.blob = new Blob([], { type: 'video/webm' }); } if (callback) { callback(that.blob); } whammy.frames = []; }); }); }; var isPausedRecording = false; /** * This method pauses the recording process. * @method * @memberof CanvasRecorder * @example * recorder.pause(); */ this.pause = function() { isPausedRecording = true; if (mediaStreamRecorder instanceof MediaStreamRecorder) { mediaStreamRecorder.pause(); return; } }; /** * This method resumes the recording process. * @method * @memberof CanvasRecorder * @example * recorder.resume(); */ this.resume = function() { isPausedRecording = false; if (mediaStreamRecorder instanceof MediaStreamRecorder) { mediaStreamRecorder.resume(); return; } if (!isRecording) { this.record(); } }; /** * This method resets currently recorded data. * @method * @memberof CanvasRecorder * @example * recorder.clearRecordedData(); */ this.clearRecordedData = function() { if (isRecording) { this.stop(clearRecordedDataCB); } clearRecordedDataCB(); }; function clearRecordedDataCB() { whammy.frames = []; isRecording = false; isPausedRecording = false; } // for debugging this.name = 'CanvasRecorder'; this.toString = function() { return this.name; }; function cloneCanvas() { //create a new canvas var newCanvas = document.createElement('canvas'); var context = newCanvas.getContext('2d'); //set dimensions newCanvas.width = htmlElement.width; newCanvas.height = htmlElement.height; //apply the old canvas to the new one context.drawImage(htmlElement, 0, 0); //return the new canvas return newCanvas; } function drawCanvasFrame() { if (isPausedRecording) { lastTime = new Date().getTime(); return setTimeout(drawCanvasFrame, 500); } if (htmlElement.nodeName.toLowerCase() === 'canvas') { var duration = new Date().getTime() - lastTime; // via #206, by Jack i.e. @Seymourr lastTime = new Date().getTime(); whammy.frames.push({ image: cloneCanvas(), duration: duration }); if (isRecording) { setTimeout(drawCanvasFrame, config.frameInterval); } return; } html2canvas(htmlElement, { grabMouse: typeof config.showMousePointer === 'undefined' || config.showMousePointer, onrendered: function(canvas) { var duration = new Date().getTime() - lastTime; if (!duration) { return setTimeout(drawCanvasFrame, config.frameInterval); } // via #206, by Jack i.e. @Seymourr lastTime = new Date().getTime(); whammy.frames.push({ image: canvas.toDataURL('image/webp', 1), duration: duration }); if (isRecording) { setTimeout(drawCanvasFrame, config.frameInterval); } } }); } var lastTime = new Date().getTime(); var whammy = new Whammy.Video(100); } if (typeof RecordRTC !== 'undefined') { RecordRTC.CanvasRecorder = CanvasRecorder; } // _________________ // WhammyRecorder.js /** * WhammyRecorder is a standalone class used by {@link RecordRTC} to bring video recording in Chrome. It runs top over {@link Whammy}. * @summary Video recording feature in Chrome. * @license {@link https://github.com/muaz-khan/RecordRTC/blob/master/LICENSE|MIT} * @author {@link https://MuazKhan.com|Muaz Khan} * @typedef WhammyRecorder * @class * @example * var recorder = new WhammyRecorder(mediaStream); * recorder.record(); * recorder.stop(function(blob) { * video.src = URL.createObjectURL(blob); * }); * @see {@link https://github.com/muaz-khan/RecordRTC|RecordRTC Source Code} * @param {MediaStream} mediaStream - MediaStream object fetched using getUserMedia API or generated using captureStreamUntilEnded or WebAudio API. * @param {object} config - {disableLogs: true, initCallback: function, video: HTMLVideoElement, etc.} */ function WhammyRecorder(mediaStream, config) { config = config || {}; if (!config.frameInterval) { config.frameInterval = 10; } if (!config.disableLogs) { console.log('Using frames-interval:', config.frameInterval); } /** * This method records video. * @method * @memberof WhammyRecorder * @example * recorder.record(); */ this.record = function() { if (!config.width) { config.width = 320; } if (!config.height) { config.height = 240; } if (!config.video) { config.video = { width: config.width, height: config.height }; } if (!config.canvas) { config.canvas = { width: config.width, height: config.height }; } canvas.width = config.canvas.width || 320; canvas.height = config.canvas.height || 240; context = canvas.getContext('2d'); // setting defaults if (config.video && config.video instanceof HTMLVideoElement) { video = config.video.cloneNode(); if (config.initCallback) { config.initCallback(); } } else { video = document.createElement('video'); setSrcObject(mediaStream, video); video.onloadedmetadata = function() { // "onloadedmetadata" may NOT work in FF? if (config.initCallback) { config.initCallback(); } }; video.width = config.video.width; video.height = config.video.height; } video.muted = true; video.play(); lastTime = new Date().getTime(); whammy = new Whammy.Video(); if (!config.disableLogs) { console.log('canvas resolutions', canvas.width, '*', canvas.height); console.log('video width/height', video.width || canvas.width, '*', video.height || canvas.height); } drawFrames(config.frameInterval); }; /** * Draw and push frames to Whammy * @param {integer} frameInterval - set minimum interval (in milliseconds) between each time we push a frame to Whammy */ function drawFrames(frameInterval) { frameInterval = typeof frameInterval !== 'undefined' ? frameInterval : 10; var duration = new Date().getTime() - lastTime; if (!duration) { return setTimeout(drawFrames, frameInterval, frameInterval); } if (isPausedRecording) { lastTime = new Date().getTime(); return setTimeout(drawFrames, 100); } // via #206, by Jack i.e. @Seymourr lastTime = new Date().getTime(); if (video.paused) { // via: https://github.com/muaz-khan/WebRTC-Experiment/pull/316 // Tweak for Android Chrome video.play(); } context.drawImage(video, 0, 0, canvas.width, canvas.height); whammy.frames.push({ duration: duration, image: canvas.toDataURL('image/webp') }); if (!isStopDrawing) { setTimeout(drawFrames, frameInterval, frameInterval); } } function asyncLoop(o) { var i = -1, length = o.length; (function loop() { i++; if (i === length) { o.callback(); return; } // "setTimeout" added by Jim McLeod setTimeout(function() { o.functionToLoop(loop, i); }, 1); })(); } /** * remove black frames from the beginning to the specified frame * @param {Array} _frames - array of frames to be checked * @param {number} _framesToCheck - number of frame until check will be executed (-1 - will drop all frames until frame not matched will be found) * @param {number} _pixTolerance - 0 - very strict (only black pixel color) ; 1 - all * @param {number} _frameTolerance - 0 - very strict (only black frame color) ; 1 - all * @returns {Array} - array of frames */ // pull#293 by @volodalexey function dropBlackFrames(_frames, _framesToCheck, _pixTolerance, _frameTolerance, callback) { var localCanvas = document.createElement('canvas'); localCanvas.width = canvas.width; localCanvas.height = canvas.height; var context2d = localCanvas.getContext('2d'); var resultFrames = []; var checkUntilNotBlack = _framesToCheck === -1; var endCheckFrame = (_framesToCheck && _framesToCheck > 0 && _framesToCheck <= _frames.length) ? _framesToCheck : _frames.length; var sampleColor = { r: 0, g: 0, b: 0 }; var maxColorDifference = Math.sqrt( Math.pow(255, 2) + Math.pow(255, 2) + Math.pow(255, 2) ); var pixTolerance = _pixTolerance && _pixTolerance >= 0 && _pixTolerance <= 1 ? _pixTolerance : 0; var frameTolerance = _frameTolerance && _frameTolerance >= 0 && _frameTolerance <= 1 ? _frameTolerance : 0; var doNotCheckNext = false; asyncLoop({ length: endCheckFrame, functionToLoop: function(loop, f) { var matchPixCount, endPixCheck, maxPixCount; var finishImage = function() { if (!doNotCheckNext && maxPixCount - matchPixCount <= maxPixCount * frameTolerance) { // console.log('removed black frame : ' + f + ' ; frame duration ' + _frames[f].duration); } else { // console.log('frame is passed : ' + f); if (checkUntilNotBlack) { doNotCheckNext = true; } resultFrames.push(_frames[f]); } loop(); }; if (!doNotCheckNext) { var image = new Image(); image.onload = function() { context2d.drawImage(image, 0, 0, canvas.width, canvas.height); var imageData = context2d.getImageData(0, 0, canvas.width, canvas.height); matchPixCount = 0; endPixCheck = imageData.data.length; maxPixCount = imageData.data.length / 4; for (var pix = 0; pix < endPixCheck; pix += 4) { var currentColor = { r: imageData.data[pix], g: imageData.data[pix + 1], b: imageData.data[pix + 2] }; var colorDifference = Math.sqrt( Math.pow(currentColor.r - sampleColor.r, 2) + Math.pow(currentColor.g - sampleColor.g, 2) + Math.pow(currentColor.b - sampleColor.b, 2) ); // difference in color it is difference in color vectors (r1,g1,b1) <=> (r2,g2,b2) if (colorDifference <= maxColorDifference * pixTolerance) { matchPixCount++; } } finishImage(); }; image.src = _frames[f].image; } else { finishImage(); } }, callback: function() { resultFrames = resultFrames.concat(_frames.slice(endCheckFrame)); if (resultFrames.length <= 0) { // at least one last frame should be available for next manipulation // if total duration of all frames will be < 1000 than ffmpeg doesn't work well... resultFrames.push(_frames[_frames.length - 1]); } callback(resultFrames); } }); } var isStopDrawing = false; /** * This method stops recording video. * @param {function} callback - Callback function, that is used to pass recorded blob back to the callee. * @method * @memberof WhammyRecorder * @example * recorder.stop(function(blob) { * video.src = URL.createObjectURL(blob); * }); */ this.stop = function(callback) { callback = callback || function() {}; isStopDrawing = true; var _this = this; // analyse of all frames takes some time! setTimeout(function() { // e.g. dropBlackFrames(frames, 10, 1, 1) - will cut all 10 frames // e.g. dropBlackFrames(frames, 10, 0.5, 0.5) - will analyse 10 frames // e.g. dropBlackFrames(frames, 10) === dropBlackFrames(frames, 10, 0, 0) - will analyse 10 frames with strict black color dropBlackFrames(whammy.frames, -1, null, null, function(frames) { whammy.frames = frames; // to display advertisement images! if (config.advertisement && config.advertisement.length) { whammy.frames = config.advertisement.concat(whammy.frames); } /** * @property {Blob} blob - Recorded frames in video/webm blob. * @memberof WhammyRecorder * @example * recorder.stop(function() { * var blob = recorder.blob; * }); */ whammy.compile(function(blob) { _this.blob = blob; if (_this.blob.forEach) { _this.blob = new Blob([], { type: 'video/webm' }); } if (callback) { callback(_this.blob); } }); }); }, 10); }; var isPausedRecording = false; /** * This method pauses the recording process. * @method * @memberof WhammyRecorder * @example * recorder.pause(); */ this.pause = function() { isPausedRecording = true; }; /** * This method resumes the recording process. * @method * @memberof WhammyRecorder * @example * recorder.resume(); */ this.resume = function() { isPausedRecording = false; if (isStopDrawing) { this.record(); } }; /** * This method resets currently recorded data. * @method * @memberof WhammyRecorder * @example * recorder.clearRecordedData(); */ this.clearRecordedData = function() { if (!isStopDrawing) { this.stop(clearRecordedDataCB); } clearRecordedDataCB(); }; function clearRecordedDataCB() { whammy.frames = []; isStopDrawing = true; isPausedRecording = false; } // for debugging this.name = 'WhammyRecorder'; this.toString = function() { return this.name; }; var canvas = document.createElement('canvas'); var context = canvas.getContext('2d'); var video; var lastTime; var whammy; } if (typeof RecordRTC !== 'undefined') { RecordRTC.WhammyRecorder = WhammyRecorder; } // https://github.com/antimatter15/whammy/blob/master/LICENSE // _________ // Whammy.js // todo: Firefox now supports webp for webm containers! // their MediaRecorder implementation works well! // should we provide an option to record via Whammy.js or MediaRecorder API is a better solution? /** * Whammy is a standalone class used by {@link RecordRTC} to bring video recording in Chrome. It is written by {@link https://github.com/antimatter15|antimatter15} * @summary A real time javascript webm encoder based on a canvas hack. * @license {@link https://github.com/muaz-khan/RecordRTC/blob/master/LICENSE|MIT} * @author {@link https://MuazKhan.com|Muaz Khan} * @typedef Whammy * @class * @example * var recorder = new Whammy().Video(15); * recorder.add(context || canvas || dataURL); * var output = recorder.compile(); * @see {@link https://github.com/muaz-khan/RecordRTC|RecordRTC Source Code} */ var Whammy = (function() { // a more abstract-ish API function WhammyVideo(duration) { this.frames = []; this.duration = duration || 1; this.quality = 0.8; } /** * Pass Canvas or Context or image/webp(string) to {@link Whammy} encoder. * @method * @memberof Whammy * @example * recorder = new Whammy().Video(0.8, 100); * recorder.add(canvas || context || 'image/webp'); * @param {string} frame - Canvas || Context || image/webp * @param {number} duration - Stick a duration (in milliseconds) */ WhammyVideo.prototype.add = function(frame, duration) { if ('canvas' in frame) { //CanvasRenderingContext2D frame = frame.canvas; } if ('toDataURL' in frame) { frame = frame.toDataURL('image/webp', this.quality); } if (!(/^data:image\/webp;base64,/ig).test(frame)) { throw 'Input must be formatted properly as a base64 encoded DataURI of type image/webp'; } this.frames.push({ image: frame, duration: duration || this.duration }); }; function processInWebWorker(_function) { var blob = URL.createObjectURL(new Blob([_function.toString(), 'this.onmessage = function (eee) {' + _function.name + '(eee.data);}' ], { type: 'application/javascript' })); var worker = new Worker(blob); URL.revokeObjectURL(blob); return worker; } function whammyInWebWorker(frames) { function ArrayToWebM(frames) { var info = checkFrames(frames); if (!info) { return []; } var clusterMaxDuration = 30000; var EBML = [{ 'id': 0x1a45dfa3, // EBML 'data': [{ 'data': 1, 'id': 0x4286 // EBMLVersion }, { 'data': 1, 'id': 0x42f7 // EBMLReadVersion }, { 'data': 4, 'id': 0x42f2 // EBMLMaxIDLength }, { 'data': 8, 'id': 0x42f3 // EBMLMaxSizeLength }, { 'data': 'webm', 'id': 0x4282 // DocType }, { 'data': 2, 'id': 0x4287 // DocTypeVersion }, { 'data': 2, 'id': 0x4285 // DocTypeReadVersion }] }, { 'id': 0x18538067, // Segment 'data': [{ 'id': 0x1549a966, // Info 'data': [{ 'data': 1e6, //do things in millisecs (num of nanosecs for duration scale) 'id': 0x2ad7b1 // TimecodeScale }, { 'data': 'whammy', 'id': 0x4d80 // MuxingApp }, { 'data': 'whammy', 'id': 0x5741 // WritingApp }, { 'data': doubleToString(info.duration), 'id': 0x4489 // Duration }] }, { 'id': 0x1654ae6b, // Tracks 'data': [{ 'id': 0xae, // TrackEntry 'data': [{ 'data': 1, 'id': 0xd7 // TrackNumber }, { 'data': 1, 'id': 0x73c5 // TrackUID }, { 'data': 0, 'id': 0x9c // FlagLacing }, { 'data': 'und', 'id': 0x22b59c // Language }, { 'data': 'V_VP8', 'id': 0x86 // CodecID }, { 'data': 'VP8', 'id': 0x258688 // CodecName }, { 'data': 1, 'id': 0x83 // TrackType }, { 'id': 0xe0, // Video 'data': [{ 'data': info.width, 'id': 0xb0 // PixelWidth }, { 'data': info.height, 'id': 0xba // PixelHeight }] }] }] }] }]; //Generate clusters (max duration) var frameNumber = 0; var clusterTimecode = 0; while (frameNumber < frames.length) { var clusterFrames = []; var clusterDuration = 0; do { clusterFrames.push(frames[frameNumber]); clusterDuration += frames[frameNumber].duration; frameNumber++; } while (frameNumber < frames.length && clusterDuration < clusterMaxDuration); var clusterCounter = 0; var cluster = { 'id': 0x1f43b675, // Cluster 'data': getClusterData(clusterTimecode, clusterCounter, clusterFrames) }; //Add cluster to segment EBML[1].data.push(cluster); clusterTimecode += clusterDuration; } return generateEBML(EBML); } function getClusterData(clusterTimecode, clusterCounter, clusterFrames) { return [{ 'data': clusterTimecode, 'id': 0xe7 // Timecode }].concat(clusterFrames.map(function(webp) { var block = makeSimpleBlock({ discardable: 0, frame: webp.data.slice(4), invisible: 0, keyframe: 1, lacing: 0, trackNum: 1, timecode: Math.round(clusterCounter) }); clusterCounter += webp.duration; return { data: block, id: 0xa3 }; })); } // sums the lengths of all the frames and gets the duration function checkFrames(frames) { if (!frames[0]) { postMessage({ error: 'Something went wrong. Maybe WebP format is not supported in the current browser.' }); return; } var width = frames[0].width, height = frames[0].height, duration = frames[0].duration; for (var i = 1; i < frames.length; i++) { duration += frames[i].duration; } return { duration: duration, width: width, height: height }; } function numToBuffer(num) { var parts = []; while (num > 0) { parts.push(num & 0xff); num = num >> 8; } return new Uint8Array(parts.reverse()); } function strToBuffer(str) { return new Uint8Array(str.split('').map(function(e) { return e.charCodeAt(0); })); } function bitsToBuffer(bits) { var data = []; var pad = (bits.length % 8) ? (new Array(1 + 8 - (bits.length % 8))).join('0') : ''; bits = pad + bits; for (var i = 0; i < bits.length; i += 8) { data.push(parseInt(bits.substr(i, 8), 2)); } return new Uint8Array(data); } function generateEBML(json) { var ebml = []; for (var i = 0; i < json.length; i++) { var data = json[i].data; if (typeof data === 'object') { data = generateEBML(data); } if (typeof data === 'number') { data = bitsToBuffer(data.toString(2)); } if (typeof data === 'string') { data = strToBuffer(data); } var len = data.size || data.byteLength || data.length; var zeroes = Math.ceil(Math.ceil(Math.log(len) / Math.log(2)) / 8); var sizeToString = len.toString(2); var padded = (new Array((zeroes * 7 + 7 + 1) - sizeToString.length)).join('0') + sizeToString; var size = (new Array(zeroes)).join('0') + '1' + padded; ebml.push(numToBuffer(json[i].id)); ebml.push(bitsToBuffer(size)); ebml.push(data); } return new Blob(ebml, { type: 'video/webm' }); } function toBinStrOld(bits) { var data = ''; var pad = (bits.length % 8) ? (new Array(1 + 8 - (bits.length % 8))).join('0') : ''; bits = pad + bits; for (var i = 0; i < bits.length; i += 8) { data += String.fromCharCode(parseInt(bits.substr(i, 8), 2)); } return data; } function makeSimpleBlock(data) { var flags = 0; if (data.keyframe) { flags |= 128; } if (data.invisible) { flags |= 8; } if (data.lacing) { flags |= (data.lacing << 1); } if (data.discardable) { flags |= 1; } if (data.trackNum > 127) { throw 'TrackNumber > 127 not supported'; } var out = [data.trackNum | 0x80, data.timecode >> 8, data.timecode & 0xff, flags].map(function(e) { return String.fromCharCode(e); }).join('') + data.frame; return out; } function parseWebP(riff) { var VP8 = riff.RIFF[0].WEBP[0]; var frameStart = VP8.indexOf('\x9d\x01\x2a'); // A VP8 keyframe starts with the 0x9d012a header for (var i = 0, c = []; i < 4; i++) { c[i] = VP8.charCodeAt(frameStart + 3 + i); } var width, height, tmp; //the code below is literally copied verbatim from the bitstream spec tmp = (c[1] << 8) | c[0]; width = tmp & 0x3FFF; tmp = (c[3] << 8) | c[2]; height = tmp & 0x3FFF; return { width: width, height: height, data: VP8, riff: riff }; } function getStrLength(string, offset) { return parseInt(string.substr(offset + 4, 4).split('').map(function(i) { var unpadded = i.charCodeAt(0).toString(2); return (new Array(8 - unpadded.length + 1)).join('0') + unpadded; }).join(''), 2); } function parseRIFF(string) { var offset = 0; var chunks = {}; while (offset < string.length) { var id = string.substr(offset, 4); var len = getStrLength(string, offset); var data = string.substr(offset + 4 + 4, len); offset += 4 + 4 + len; chunks[id] = chunks[id] || []; if (id === 'RIFF' || id === 'LIST') { chunks[id].push(parseRIFF(data)); } else { chunks[id].push(data); } } return chunks; } function doubleToString(num) { return [].slice.call( new Uint8Array((new Float64Array([num])).buffer), 0).map(function(e) { return String.fromCharCode(e); }).reverse().join(''); } var webm = new ArrayToWebM(frames.map(function(frame) { var webp = parseWebP(parseRIFF(atob(frame.image.slice(23)))); webp.duration = frame.duration; return webp; })); postMessage(webm); } /** * Encodes frames in WebM container. It uses WebWorkinvoke to invoke 'ArrayToWebM' method. * @param {function} callback - Callback function, that is used to pass recorded blob back to the callee. * @method * @memberof Whammy * @example * recorder = new Whammy().Video(0.8, 100); * recorder.compile(function(blob) { * // blob.size - blob.type * }); */ WhammyVideo.prototype.compile = function(callback) { var webWorker = processInWebWorker(whammyInWebWorker); webWorker.onmessage = function(event) { if (event.data.error) { console.error(event.data.error); return; } callback(event.data); }; webWorker.postMessage(this.frames); }; return { /** * A more abstract-ish API. * @method * @memberof Whammy * @example * recorder = new Whammy().Video(0.8, 100); * @param {?number} speed - 0.8 * @param {?number} quality - 100 */ Video: WhammyVideo }; })(); if (typeof RecordRTC !== 'undefined') { RecordRTC.Whammy = Whammy; } // ______________ (indexed-db) // DiskStorage.js /** * DiskStorage is a standalone object used by {@link RecordRTC} to store recorded blobs in IndexedDB storage. * @summary Writing blobs into IndexedDB. * @license {@link https://github.com/muaz-khan/RecordRTC/blob/master/LICENSE|MIT} * @author {@link https://MuazKhan.com|Muaz Khan} * @example * DiskStorage.Store({ * audioBlob: yourAudioBlob, * videoBlob: yourVideoBlob, * gifBlob : yourGifBlob * }); * DiskStorage.Fetch(function(dataURL, type) { * if(type === 'audioBlob') { } * if(type === 'videoBlob') { } * if(type === 'gifBlob') { } * }); * // DiskStorage.dataStoreName = 'recordRTC'; * // DiskStorage.onError = function(error) { }; * @property {function} init - This method must be called once to initialize IndexedDB ObjectStore. Though, it is auto-used internally. * @property {function} Fetch - This method fetches stored blobs from IndexedDB. * @property {function} Store - This method stores blobs in IndexedDB. * @property {function} onError - This function is invoked for any known/unknown error. * @property {string} dataStoreName - Name of the ObjectStore created in IndexedDB storage. * @see {@link https://github.com/muaz-khan/RecordRTC|RecordRTC Source Code} */ var DiskStorage = { /** * This method must be called once to initialize IndexedDB ObjectStore. Though, it is auto-used internally. * @method * @memberof DiskStorage * @internal * @example * DiskStorage.init(); */ init: function() { var self = this; if (typeof indexedDB === 'undefined' || typeof indexedDB.open === 'undefined') { console.error('IndexedDB API are not available in this browser.'); return; } var dbVersion = 1; var dbName = this.dbName || location.href.replace(/\/|:|#|%|\.|\[|\]/g, ''), db; var request = indexedDB.open(dbName, dbVersion); function createObjectStore(dataBase) { dataBase.createObjectStore(self.dataStoreName); } function putInDB() { var transaction = db.transaction([self.dataStoreName], 'readwrite'); if (self.videoBlob) { transaction.objectStore(self.dataStoreName).put(self.videoBlob, 'videoBlob'); } if (self.gifBlob) { transaction.objectStore(self.dataStoreName).put(self.gifBlob, 'gifBlob'); } if (self.audioBlob) { transaction.objectStore(self.dataStoreName).put(self.audioBlob, 'audioBlob'); } function getFromStore(portionName) { transaction.objectStore(self.dataStoreName).get(portionName).onsuccess = function(event) { if (self.callback) { self.callback(event.target.result, portionName); } }; } getFromStore('audioBlob'); getFromStore('videoBlob'); getFromStore('gifBlob'); } request.onerror = self.onError; request.onsuccess = function() { db = request.result; db.onerror = self.onError; if (db.setVersion) { if (db.version !== dbVersion) { var setVersion = db.setVersion(dbVersion); setVersion.onsuccess = function() { createObjectStore(db); putInDB(); }; } else { putInDB(); } } else { putInDB(); } }; request.onupgradeneeded = function(event) { createObjectStore(event.target.result); }; }, /** * This method fetches stored blobs from IndexedDB. * @method * @memberof DiskStorage * @internal * @example * DiskStorage.Fetch(function(dataURL, type) { * if(type === 'audioBlob') { } * if(type === 'videoBlob') { } * if(type === 'gifBlob') { } * }); */ Fetch: function(callback) { this.callback = callback; this.init(); return this; }, /** * This method stores blobs in IndexedDB. * @method * @memberof DiskStorage * @internal * @example * DiskStorage.Store({ * audioBlob: yourAudioBlob, * videoBlob: yourVideoBlob, * gifBlob : yourGifBlob * }); */ Store: function(config) { this.audioBlob = config.audioBlob; this.videoBlob = config.videoBlob; this.gifBlob = config.gifBlob; this.init(); return this; }, /** * This function is invoked for any known/unknown error. * @method * @memberof DiskStorage * @internal * @example * DiskStorage.onError = function(error){ * alerot( JSON.stringify(error) ); * }; */ onError: function(error) { console.error(JSON.stringify(error, null, '\t')); }, /** * @property {string} dataStoreName - Name of the ObjectStore created in IndexedDB storage. * @memberof DiskStorage * @internal * @example * DiskStorage.dataStoreName = 'recordRTC'; */ dataStoreName: 'recordRTC', dbName: null }; if (typeof RecordRTC !== 'undefined') { RecordRTC.DiskStorage = DiskStorage; } // ______________ // GifRecorder.js /** * GifRecorder is standalone calss used by {@link RecordRTC} to record video or canvas into animated gif. * @license {@link https://github.com/muaz-khan/RecordRTC/blob/master/LICENSE|MIT} * @author {@link https://MuazKhan.com|Muaz Khan} * @typedef GifRecorder * @class * @example * var recorder = new GifRecorder(mediaStream || canvas || context, { onGifPreview: function, onGifRecordingStarted: function, width: 1280, height: 720, frameRate: 200, quality: 10 }); * recorder.record(); * recorder.stop(function(blob) { * img.src = URL.createObjectURL(blob); * }); * @see {@link https://github.com/muaz-khan/RecordRTC|RecordRTC Source Code} * @param {MediaStream} mediaStream - MediaStream object or HTMLCanvasElement or CanvasRenderingContext2D. * @param {object} config - {disableLogs:true, initCallback: function, width: 320, height: 240, frameRate: 200, quality: 10} */ function GifRecorder(mediaStream, config) { if (typeof GIFEncoder === 'undefined') { var script = document.createElement('script'); script.src = 'https://www.webrtc-experiment.com/gif-recorder.js'; (document.body || document.documentElement).appendChild(script); } config = config || {}; var isHTMLObject = mediaStream instanceof CanvasRenderingContext2D || mediaStream instanceof HTMLCanvasElement; /** * This method records MediaStream. * @method * @memberof GifRecorder * @example * recorder.record(); */ this.record = function() { if (typeof GIFEncoder === 'undefined') { setTimeout(self.record, 1000); return; } if (!isLoadedMetaData) { setTimeout(self.record, 1000); return; } if (!isHTMLObject) { if (!config.width) { config.width = video.offsetWidth || 320; } if (!config.height) { config.height = video.offsetHeight || 240; } if (!config.video) { config.video = { width: config.width, height: config.height }; } if (!config.canvas) { config.canvas = { width: config.width, height: config.height }; } canvas.width = config.canvas.width || 320; canvas.height = config.canvas.height || 240; video.width = config.video.width || 320; video.height = config.video.height || 240; } // external library to record as GIF images gifEncoder = new GIFEncoder(); // void setRepeat(int iter) // Sets the number of times the set of GIF frames should be played. // Default is 1; 0 means play indefinitely. gifEncoder.setRepeat(0); // void setFrameRate(Number fps) // Sets frame rate in frames per second. // Equivalent to setDelay(1000/fps). // Using "setDelay" instead of "setFrameRate" gifEncoder.setDelay(config.frameRate || 200); // void setQuality(int quality) // Sets quality of color quantization (conversion of images to the // maximum 256 colors allowed by the GIF specification). // Lower values (minimum = 1) produce better colors, // but slow processing significantly. 10 is the default, // and produces good color mapping at reasonable speeds. // Values greater than 20 do not yield significant improvements in speed. gifEncoder.setQuality(config.quality || 10); // Boolean start() // This writes the GIF Header and returns false if it fails. gifEncoder.start(); if (typeof config.onGifRecordingStarted === 'function') { config.onGifRecordingStarted(); } startTime = Date.now(); function drawVideoFrame(time) { if (self.clearedRecordedData === true) { return; } if (isPausedRecording) { return setTimeout(function() { drawVideoFrame(time); }, 100); } lastAnimationFrame = requestAnimationFrame(drawVideoFrame); if (typeof lastFrameTime === undefined) { lastFrameTime = time; } // ~10 fps if (time - lastFrameTime < 90) { return; } if (!isHTMLObject && video.paused) { // via: https://github.com/muaz-khan/WebRTC-Experiment/pull/316 // Tweak for Android Chrome video.play(); } if (!isHTMLObject) { context.drawImage(video, 0, 0, canvas.width, canvas.height); } if (config.onGifPreview) { config.onGifPreview(canvas.toDataURL('image/png')); } gifEncoder.addFrame(context); lastFrameTime = time; } lastAnimationFrame = requestAnimationFrame(drawVideoFrame); if (config.initCallback) { config.initCallback(); } }; /** * This method stops recording MediaStream. * @param {function} callback - Callback function, that is used to pass recorded blob back to the callee. * @method * @memberof GifRecorder * @example * recorder.stop(function(blob) { * img.src = URL.createObjectURL(blob); * }); */ this.stop = function(callback) { callback = callback || function() {}; if (lastAnimationFrame) { cancelAnimationFrame(lastAnimationFrame); } endTime = Date.now(); /** * @property {Blob} blob - The recorded blob object. * @memberof GifRecorder * @example * recorder.stop(function(){ * var blob = recorder.blob; * }); */ this.blob = new Blob([new Uint8Array(gifEncoder.stream().bin)], { type: 'image/gif' }); callback(this.blob); // bug: find a way to clear old recorded blobs gifEncoder.stream().bin = []; }; var isPausedRecording = false; /** * This method pauses the recording process. * @method * @memberof GifRecorder * @example * recorder.pause(); */ this.pause = function() { isPausedRecording = true; }; /** * This method resumes the recording process. * @method * @memberof GifRecorder * @example * recorder.resume(); */ this.resume = function() { isPausedRecording = false; }; /** * This method resets currently recorded data. * @method * @memberof GifRecorder * @example * recorder.clearRecordedData(); */ this.clearRecordedData = function() { self.clearedRecordedData = true; clearRecordedDataCB(); }; function clearRecordedDataCB() { if (gifEncoder) { gifEncoder.stream().bin = []; } } // for debugging this.name = 'GifRecorder'; this.toString = function() { return this.name; }; var canvas = document.createElement('canvas'); var context = canvas.getContext('2d'); if (isHTMLObject) { if (mediaStream instanceof CanvasRenderingContext2D) { context = mediaStream; canvas = context.canvas; } else if (mediaStream instanceof HTMLCanvasElement) { context = mediaStream.getContext('2d'); canvas = mediaStream; } } var isLoadedMetaData = true; if (!isHTMLObject) { var video = document.createElement('video'); video.muted = true; video.autoplay = true; video.playsInline = true; isLoadedMetaData = false; video.onloadedmetadata = function() { isLoadedMetaData = true; }; setSrcObject(mediaStream, video); video.play(); } var lastAnimationFrame = null; var startTime, endTime, lastFrameTime; var gifEncoder; var self = this; } if (typeof RecordRTC !== 'undefined') { RecordRTC.GifRecorder = GifRecorder; } // Last time updated: 2019-06-21 4:09:42 AM UTC // ________________________ // MultiStreamsMixer v1.2.2 // Open-Sourced: https://github.com/muaz-khan/MultiStreamsMixer // -------------------------------------------------- // Muaz Khan - www.MuazKhan.com // MIT License - www.WebRTC-Experiment.com/licence // -------------------------------------------------- function MultiStreamsMixer(arrayOfMediaStreams, elementClass) { var browserFakeUserAgent = 'Fake/5.0 (FakeOS) AppleWebKit/123 (KHTML, like Gecko) Fake/12.3.4567.89 Fake/123.45'; (function(that) { if (typeof RecordRTC !== 'undefined') { return; } if (!that) { return; } if (typeof window !== 'undefined') { return; } if (typeof global === 'undefined') { return; } global.navigator = { userAgent: browserFakeUserAgent, getUserMedia: function() {} }; if (!global.console) { global.console = {}; } if (typeof global.console.log === 'undefined' || typeof global.console.error === 'undefined') { global.console.error = global.console.log = global.console.log || function() { console.log(arguments); }; } if (typeof document === 'undefined') { /*global document:true */ that.document = { documentElement: { appendChild: function() { return ''; } } }; document.createElement = document.captureStream = document.mozCaptureStream = function() { var obj = { getContext: function() { return obj; }, play: function() {}, pause: function() {}, drawImage: function() {}, toDataURL: function() { return ''; }, style: {} }; return obj; }; that.HTMLVideoElement = function() {}; } if (typeof location === 'undefined') { /*global location:true */ that.location = { protocol: 'file:', href: '', hash: '' }; } if (typeof screen === 'undefined') { /*global screen:true */ that.screen = { width: 0, height: 0 }; } if (typeof URL === 'undefined') { /*global screen:true */ that.URL = { createObjectURL: function() { return ''; }, revokeObjectURL: function() { return ''; } }; } /*global window:true */ that.window = global; })(typeof global !== 'undefined' ? global : null); // requires: chrome://flags/#enable-experimental-web-platform-features elementClass = elementClass || 'multi-streams-mixer'; var videos = []; var isStopDrawingFrames = false; var canvas = document.createElement('canvas'); var context = canvas.getContext('2d'); canvas.style.opacity = 0; canvas.style.position = 'absolute'; canvas.style.zIndex = -1; canvas.style.top = '-1000em'; canvas.style.left = '-1000em'; canvas.className = elementClass; (document.body || document.documentElement).appendChild(canvas); this.disableLogs = false; this.frameInterval = 10; this.width = 360; this.height = 240; // use gain node to prevent echo this.useGainNode = true; var self = this; // _____________________________ // Cross-Browser-Declarations.js // WebAudio API representer var AudioContext = window.AudioContext; if (typeof AudioContext === 'undefined') { if (typeof webkitAudioContext !== 'undefined') { /*global AudioContext:true */ AudioContext = webkitAudioContext; } if (typeof mozAudioContext !== 'undefined') { /*global AudioContext:true */ AudioContext = mozAudioContext; } } /*jshint -W079 */ var URL = window.URL; if (typeof URL === 'undefined' && typeof webkitURL !== 'undefined') { /*global URL:true */ URL = webkitURL; } if (typeof navigator !== 'undefined' && typeof navigator.getUserMedia === 'undefined') { // maybe window.navigator? if (typeof navigator.webkitGetUserMedia !== 'undefined') { navigator.getUserMedia = navigator.webkitGetUserMedia; } if (typeof navigator.mozGetUserMedia !== 'undefined') { navigator.getUserMedia = navigator.mozGetUserMedia; } } var MediaStream = window.MediaStream; if (typeof MediaStream === 'undefined' && typeof webkitMediaStream !== 'undefined') { MediaStream = webkitMediaStream; } /*global MediaStream:true */ if (typeof MediaStream !== 'undefined') { // override "stop" method for all browsers if (typeof MediaStream.prototype.stop === 'undefined') { MediaStream.prototype.stop = function() { this.getTracks().forEach(function(track) { track.stop(); }); }; } } var Storage = {}; if (typeof AudioContext !== 'undefined') { Storage.AudioContext = AudioContext; } else if (typeof webkitAudioContext !== 'undefined') { Storage.AudioContext = webkitAudioContext; } function setSrcObject(stream, element) { if ('srcObject' in element) { element.srcObject = stream; } else if ('mozSrcObject' in element) { element.mozSrcObject = stream; } else { element.srcObject = stream; } } this.startDrawingFrames = function() { drawVideosToCanvas(); }; function drawVideosToCanvas() { if (isStopDrawingFrames) { return; } var videosLength = videos.length; var fullcanvas = false; var remaining = []; videos.forEach(function(video) { if (!video.stream) { video.stream = {}; } if (video.stream.fullcanvas) { fullcanvas = video; } else { // todo: video.stream.active or video.stream.live to fix blank frames issues? remaining.push(video); } }); if (fullcanvas) { canvas.width = fullcanvas.stream.width; canvas.height = fullcanvas.stream.height; } else if (remaining.length) { canvas.width = videosLength > 1 ? remaining[0].width * 2 : remaining[0].width; var height = 1; if (videosLength === 3 || videosLength === 4) { height = 2; } if (videosLength === 5 || videosLength === 6) { height = 3; } if (videosLength === 7 || videosLength === 8) { height = 4; } if (videosLength === 9 || videosLength === 10) { height = 5; } canvas.height = remaining[0].height * height; } else { canvas.width = self.width || 360; canvas.height = self.height || 240; } if (fullcanvas && fullcanvas instanceof HTMLVideoElement) { drawImage(fullcanvas); } remaining.forEach(function(video, idx) { drawImage(video, idx); }); setTimeout(drawVideosToCanvas, self.frameInterval); } function drawImage(video, idx) { if (isStopDrawingFrames) { return; } var x = 0; var y = 0; var width = video.width; var height = video.height; if (idx === 1) { x = video.width; } if (idx === 2) { y = video.height; } if (idx === 3) { x = video.width; y = video.height; } if (idx === 4) { y = video.height * 2; } if (idx === 5) { x = video.width; y = video.height * 2; } if (idx === 6) { y = video.height * 3; } if (idx === 7) { x = video.width; y = video.height * 3; } if (typeof video.stream.left !== 'undefined') { x = video.stream.left; } if (typeof video.stream.top !== 'undefined') { y = video.stream.top; } if (typeof video.stream.width !== 'undefined') { width = video.stream.width; } if (typeof video.stream.height !== 'undefined') { height = video.stream.height; } context.drawImage(video, x, y, width, height); if (typeof video.stream.onRender === 'function') { video.stream.onRender(context, x, y, width, height, idx); } } function getMixedStream() { isStopDrawingFrames = false; var mixedVideoStream = getMixedVideoStream(); var mixedAudioStream = getMixedAudioStream(); if (mixedAudioStream) { mixedAudioStream.getTracks().filter(function(t) { return t.kind === 'audio'; }).forEach(function(track) { mixedVideoStream.addTrack(track); }); } var fullcanvas; arrayOfMediaStreams.forEach(function(stream) { if (stream.fullcanvas) { fullcanvas = true; } }); // mixedVideoStream.prototype.appendStreams = appendStreams; // mixedVideoStream.prototype.resetVideoStreams = resetVideoStreams; // mixedVideoStream.prototype.clearRecordedData = clearRecordedData; return mixedVideoStream; } function getMixedVideoStream() { resetVideoStreams(); var capturedStream; if ('captureStream' in canvas) { capturedStream = canvas.captureStream(); } else if ('mozCaptureStream' in canvas) { capturedStream = canvas.mozCaptureStream(); } else if (!self.disableLogs) { console.error('Upgrade to latest Chrome or otherwise enable this flag: chrome://flags/#enable-experimental-web-platform-features'); } var videoStream = new MediaStream(); capturedStream.getTracks().filter(function(t) { return t.kind === 'video'; }).forEach(function(track) { videoStream.addTrack(track); }); canvas.stream = videoStream; return videoStream; } function getMixedAudioStream() { // via: @pehrsons if (!Storage.AudioContextConstructor) { Storage.AudioContextConstructor = new Storage.AudioContext(); } self.audioContext = Storage.AudioContextConstructor; self.audioSources = []; if (self.useGainNode === true) { self.gainNode = self.audioContext.createGain(); self.gainNode.connect(self.audioContext.destination); self.gainNode.gain.value = 0; // don't hear self } var audioTracksLength = 0; arrayOfMediaStreams.forEach(function(stream) { if (!stream.getTracks().filter(function(t) { return t.kind === 'audio'; }).length) { return; } audioTracksLength++; var audioSource = self.audioContext.createMediaStreamSource(stream); if (self.useGainNode === true) { audioSource.connect(self.gainNode); } self.audioSources.push(audioSource); }); if (!audioTracksLength) { // because "self.audioContext" is not initialized // that's why we've to ignore rest of the code return; } self.audioDestination = self.audioContext.createMediaStreamDestination(); self.audioSources.forEach(function(audioSource) { audioSource.connect(self.audioDestination); }); return self.audioDestination.stream; } function getVideo(stream) { var video = document.createElement('video'); setSrcObject(stream, video); video.className = elementClass; video.muted = true; video.volume = 0; video.width = stream.width || self.width || 360; video.height = stream.height || self.height || 240; video.play(); return video; } this.appendStreams = function(streams) { if (!streams) { throw 'First parameter is required.'; } if (!(streams instanceof Array)) { streams = [streams]; } streams.forEach(function(stream) { var newStream = new MediaStream(); if (stream.getTracks().filter(function(t) { return t.kind === 'video'; }).length) { var video = getVideo(stream); video.stream = stream; videos.push(video); newStream.addTrack(stream.getTracks().filter(function(t) { return t.kind === 'video'; })[0]); } if (stream.getTracks().filter(function(t) { return t.kind === 'audio'; }).length) { var audioSource = self.audioContext.createMediaStreamSource(stream); self.audioDestination = self.audioContext.createMediaStreamDestination(); audioSource.connect(self.audioDestination); newStream.addTrack(self.audioDestination.stream.getTracks().filter(function(t) { return t.kind === 'audio'; })[0]); } arrayOfMediaStreams.push(newStream); }); }; this.releaseStreams = function() { videos = []; isStopDrawingFrames = true; if (self.gainNode) { self.gainNode.disconnect(); self.gainNode = null; } if (self.audioSources.length) { self.audioSources.forEach(function(source) { source.disconnect(); }); self.audioSources = []; } if (self.audioDestination) { self.audioDestination.disconnect(); self.audioDestination = null; } if (self.audioContext) { self.audioContext.close(); } self.audioContext = null; context.clearRect(0, 0, canvas.width, canvas.height); if (canvas.stream) { canvas.stream.stop(); canvas.stream = null; } }; this.resetVideoStreams = function(streams) { if (streams && !(streams instanceof Array)) { streams = [streams]; } resetVideoStreams(streams); }; function resetVideoStreams(streams) { videos = []; streams = streams || arrayOfMediaStreams; // via: @adrian-ber streams.forEach(function(stream) { if (!stream.getTracks().filter(function(t) { return t.kind === 'video'; }).length) { return; } var video = getVideo(stream); video.stream = stream; videos.push(video); }); } // for debugging this.name = 'MultiStreamsMixer'; this.toString = function() { return this.name; }; this.getMixedStream = getMixedStream; } if (typeof RecordRTC === 'undefined') { if (true /* && !!module.exports*/ ) { module.exports = MultiStreamsMixer; } if (true) { !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function() { return MultiStreamsMixer; }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } } // ______________________ // MultiStreamRecorder.js /* * Video conference recording, using captureStream API along with WebAudio and Canvas2D API. */ /** * MultiStreamRecorder can record multiple videos in single container. * @summary Multi-videos recorder. * @license {@link https://github.com/muaz-khan/RecordRTC/blob/master/LICENSE|MIT} * @author {@link https://MuazKhan.com|Muaz Khan} * @typedef MultiStreamRecorder * @class * @example * var options = { * mimeType: 'video/webm' * } * var recorder = new MultiStreamRecorder(ArrayOfMediaStreams, options); * recorder.record(); * recorder.stop(function(blob) { * video.src = URL.createObjectURL(blob); * * // or * var blob = recorder.blob; * }); * @see {@link https://github.com/muaz-khan/RecordRTC|RecordRTC Source Code} * @param {MediaStreams} mediaStreams - Array of MediaStreams. * @param {object} config - {disableLogs:true, frameInterval: 1, mimeType: "video/webm"} */ function MultiStreamRecorder(arrayOfMediaStreams, options) { arrayOfMediaStreams = arrayOfMediaStreams || []; var self = this; var mixer; var mediaRecorder; options = options || { elementClass: 'multi-streams-mixer', mimeType: 'video/webm', video: { width: 360, height: 240 } }; if (!options.frameInterval) { options.frameInterval = 10; } if (!options.video) { options.video = {}; } if (!options.video.width) { options.video.width = 360; } if (!options.video.height) { options.video.height = 240; } /** * This method records all MediaStreams. * @method * @memberof MultiStreamRecorder * @example * recorder.record(); */ this.record = function() { // github/muaz-khan/MultiStreamsMixer mixer = new MultiStreamsMixer(arrayOfMediaStreams, options.elementClass || 'multi-streams-mixer'); if (getAllVideoTracks().length) { mixer.frameInterval = options.frameInterval || 10; mixer.width = options.video.width || 360; mixer.height = options.video.height || 240; mixer.startDrawingFrames(); } if (options.previewStream && typeof options.previewStream === 'function') { options.previewStream(mixer.getMixedStream()); } // record using MediaRecorder API mediaRecorder = new MediaStreamRecorder(mixer.getMixedStream(), options); mediaRecorder.record(); }; function getAllVideoTracks() { var tracks = []; arrayOfMediaStreams.forEach(function(stream) { getTracks(stream, 'video').forEach(function(track) { tracks.push(track); }); }); return tracks; } /** * This method stops recording MediaStream. * @param {function} callback - Callback function, that is used to pass recorded blob back to the callee. * @method * @memberof MultiStreamRecorder * @example * recorder.stop(function(blob) { * video.src = URL.createObjectURL(blob); * }); */ this.stop = function(callback) { if (!mediaRecorder) { return; } mediaRecorder.stop(function(blob) { self.blob = blob; callback(blob); self.clearRecordedData(); }); }; /** * This method pauses the recording process. * @method * @memberof MultiStreamRecorder * @example * recorder.pause(); */ this.pause = function() { if (mediaRecorder) { mediaRecorder.pause(); } }; /** * This method resumes the recording process. * @method * @memberof MultiStreamRecorder * @example * recorder.resume(); */ this.resume = function() { if (mediaRecorder) { mediaRecorder.resume(); } }; /** * This method resets currently recorded data. * @method * @memberof MultiStreamRecorder * @example * recorder.clearRecordedData(); */ this.clearRecordedData = function() { if (mediaRecorder) { mediaRecorder.clearRecordedData(); mediaRecorder = null; } if (mixer) { mixer.releaseStreams(); mixer = null; } }; /** * Add extra media-streams to existing recordings. * @method * @memberof MultiStreamRecorder * @param {MediaStreams} mediaStreams - Array of MediaStreams * @example * recorder.addStreams([newAudioStream, newVideoStream]); */ this.addStreams = function(streams) { if (!streams) { throw 'First parameter is required.'; } if (!(streams instanceof Array)) { streams = [streams]; } arrayOfMediaStreams.concat(streams); if (!mediaRecorder || !mixer) { return; } mixer.appendStreams(streams); if (options.previewStream && typeof options.previewStream === 'function') { options.previewStream(mixer.getMixedStream()); } }; /** * Reset videos during live recording. Replace old videos e.g. replace cameras with full-screen. * @method * @memberof MultiStreamRecorder * @param {MediaStreams} mediaStreams - Array of MediaStreams * @example * recorder.resetVideoStreams([newVideo1, newVideo2]); */ this.resetVideoStreams = function(streams) { if (!mixer) { return; } if (streams && !(streams instanceof Array)) { streams = [streams]; } mixer.resetVideoStreams(streams); }; /** * Returns MultiStreamsMixer * @method * @memberof MultiStreamRecorder * @example * let mixer = recorder.getMixer(); * mixer.appendStreams([newStream]); */ this.getMixer = function() { return mixer; }; // for debugging this.name = 'MultiStreamRecorder'; this.toString = function() { return this.name; }; } if (typeof RecordRTC !== 'undefined') { RecordRTC.MultiStreamRecorder = MultiStreamRecorder; } // _____________________ // RecordRTC.promises.js /** * RecordRTCPromisesHandler adds promises support in {@link RecordRTC}. Try a {@link https://github.com/muaz-khan/RecordRTC/blob/master/simple-demos/RecordRTCPromisesHandler.html|demo here} * @summary Promises for {@link RecordRTC} * @license {@link https://github.com/muaz-khan/RecordRTC/blob/master/LICENSE|MIT} * @author {@link https://MuazKhan.com|Muaz Khan} * @typedef RecordRTCPromisesHandler * @class * @example * var recorder = new RecordRTCPromisesHandler(mediaStream, options); * recorder.startRecording() * .then(successCB) * .catch(errorCB); * // Note: You can access all RecordRTC API using "recorder.recordRTC" e.g. * recorder.recordRTC.onStateChanged = function(state) {}; * recorder.recordRTC.setRecordingDuration(5000); * @see {@link https://github.com/muaz-khan/RecordRTC|RecordRTC Source Code} * @param {MediaStream} mediaStream - Single media-stream object, array of media-streams, html-canvas-element, etc. * @param {object} config - {type:"video", recorderType: MediaStreamRecorder, disableLogs: true, numberOfAudioChannels: 1, bufferSize: 0, sampleRate: 0, video: HTMLVideoElement, etc.} * @throws Will throw an error if "new" keyword is not used to initiate "RecordRTCPromisesHandler". Also throws error if first argument "MediaStream" is missing. * @requires {@link RecordRTC} */ function RecordRTCPromisesHandler(mediaStream, options) { if (!this) { throw 'Use "new RecordRTCPromisesHandler()"'; } if (typeof mediaStream === 'undefined') { throw 'First argument "MediaStream" is required.'; } var self = this; /** * @property {Blob} blob - Access/reach the native {@link RecordRTC} object. * @memberof RecordRTCPromisesHandler * @example * let internal = recorder.recordRTC.getInternalRecorder(); * alert(internal instanceof MediaStreamRecorder); * recorder.recordRTC.onStateChanged = function(state) {}; */ self.recordRTC = new RecordRTC(mediaStream, options); /** * This method records MediaStream. * @method * @memberof RecordRTCPromisesHandler * @example * recorder.startRecording() * .then(successCB) * .catch(errorCB); */ this.startRecording = function() { return new Promise(function(resolve, reject) { try { self.recordRTC.startRecording(); resolve(); } catch (e) { reject(e); } }); }; /** * This method stops the recording. * @method * @memberof RecordRTCPromisesHandler * @example * recorder.stopRecording().then(function() { * var blob = recorder.getBlob(); * }).catch(errorCB); */ this.stopRecording = function() { return new Promise(function(resolve, reject) { try { self.recordRTC.stopRecording(function(url) { self.blob = self.recordRTC.getBlob(); if (!self.blob || !self.blob.size) { reject('Empty blob.', self.blob); return; } resolve(url); }); } catch (e) { reject(e); } }); }; /** * This method pauses the recording. You can resume recording using "resumeRecording" method. * @method * @memberof RecordRTCPromisesHandler * @example * recorder.pauseRecording() * .then(successCB) * .catch(errorCB); */ this.pauseRecording = function() { return new Promise(function(resolve, reject) { try { self.recordRTC.pauseRecording(); resolve(); } catch (e) { reject(e); } }); }; /** * This method resumes the recording. * @method * @memberof RecordRTCPromisesHandler * @example * recorder.resumeRecording() * .then(successCB) * .catch(errorCB); */ this.resumeRecording = function() { return new Promise(function(resolve, reject) { try { self.recordRTC.resumeRecording(); resolve(); } catch (e) { reject(e); } }); }; /** * This method returns data-url for the recorded blob. * @method * @memberof RecordRTCPromisesHandler * @example * recorder.stopRecording().then(function() { * recorder.getDataURL().then(function(dataURL) { * window.open(dataURL); * }).catch(errorCB);; * }).catch(errorCB); */ this.getDataURL = function(callback) { return new Promise(function(resolve, reject) { try { self.recordRTC.getDataURL(function(dataURL) { resolve(dataURL); }); } catch (e) { reject(e); } }); }; /** * This method returns the recorded blob. * @method * @memberof RecordRTCPromisesHandler * @example * recorder.stopRecording().then(function() { * recorder.getBlob().then(function(blob) {}) * }).catch(errorCB); */ this.getBlob = function() { return new Promise(function(resolve, reject) { try { resolve(self.recordRTC.getBlob()); } catch (e) { reject(e); } }); }; /** * This method returns the internal recording object. * @method * @memberof RecordRTCPromisesHandler * @example * let internalRecorder = await recorder.getInternalRecorder(); * if(internalRecorder instanceof MultiStreamRecorder) { * internalRecorder.addStreams([newAudioStream]); * internalRecorder.resetVideoStreams([screenStream]); * } * @returns {Object} */ this.getInternalRecorder = function() { return new Promise(function(resolve, reject) { try { resolve(self.recordRTC.getInternalRecorder()); } catch (e) { reject(e); } }); }; /** * This method resets the recorder. So that you can reuse single recorder instance many times. * @method * @memberof RecordRTCPromisesHandler * @example * await recorder.reset(); * recorder.startRecording(); // record again */ this.reset = function() { return new Promise(function(resolve, reject) { try { resolve(self.recordRTC.reset()); } catch (e) { reject(e); } }); }; /** * Destroy RecordRTC instance. Clear all recorders and objects. * @method * @memberof RecordRTCPromisesHandler * @example * recorder.destroy().then(successCB).catch(errorCB); */ this.destroy = function() { return new Promise(function(resolve, reject) { try { resolve(self.recordRTC.destroy()); } catch (e) { reject(e); } }); }; /** * Get recorder's readonly state. * @method * @memberof RecordRTCPromisesHandler * @example * let state = await recorder.getState(); * // or * recorder.getState().then(state => { console.log(state); }) * @returns {String} Returns recording state. */ this.getState = function() { return new Promise(function(resolve, reject) { try { resolve(self.recordRTC.getState()); } catch (e) { reject(e); } }); }; /** * @property {Blob} blob - Recorded data as "Blob" object. * @memberof RecordRTCPromisesHandler * @example * await recorder.stopRecording(); * let blob = recorder.getBlob(); // or "recorder.recordRTC.blob" * invokeSaveAsDialog(blob); */ this.blob = null; /** * RecordRTC version number * @property {String} version - Release version number. * @memberof RecordRTCPromisesHandler * @static * @readonly * @example * alert(recorder.version); */ this.version = '5.6.2'; } if (typeof RecordRTC !== 'undefined') { RecordRTC.RecordRTCPromisesHandler = RecordRTCPromisesHandler; } // ______________________ // WebAssemblyRecorder.js /** * WebAssemblyRecorder lets you create webm videos in JavaScript via WebAssembly. The library consumes raw RGBA32 buffers (4 bytes per pixel) and turns them into a webm video with the given framerate and quality. This makes it compatible out-of-the-box with ImageData from a CANVAS. With realtime mode you can also use webm-wasm for streaming webm videos. * @summary Video recording feature in Chrome, Firefox and maybe Edge. * @license {@link https://github.com/muaz-khan/RecordRTC/blob/master/LICENSE|MIT} * @author {@link https://MuazKhan.com|Muaz Khan} * @typedef WebAssemblyRecorder * @class * @example * var recorder = new WebAssemblyRecorder(mediaStream); * recorder.record(); * recorder.stop(function(blob) { * video.src = URL.createObjectURL(blob); * }); * @see {@link https://github.com/muaz-khan/RecordRTC|RecordRTC Source Code} * @param {MediaStream} mediaStream - MediaStream object fetched using getUserMedia API or generated using captureStreamUntilEnded or WebAudio API. * @param {object} config - {webAssemblyPath:'webm-wasm.wasm',workerPath: 'webm-worker.js', frameRate: 30, width: 1920, height: 1080, bitrate: 1024, realtime: true} */ function WebAssemblyRecorder(stream, config) { // based on: github.com/GoogleChromeLabs/webm-wasm if (typeof ReadableStream === 'undefined' || typeof WritableStream === 'undefined') { // because it fixes readable/writable streams issues console.error('Following polyfill is strongly recommended: https://unpkg.com/@mattiasbuelens/web-streams-polyfill/dist/polyfill.min.js'); } config = config || {}; config.width = config.width || 640; config.height = config.height || 480; config.frameRate = config.frameRate || 30; config.bitrate = config.bitrate || 1200; config.realtime = config.realtime || true; function createBufferURL(buffer, type) { return URL.createObjectURL(new Blob([buffer], { type: type || '' })); } var finished; function cameraStream() { return new ReadableStream({ start: function(controller) { var cvs = document.createElement('canvas'); var video = document.createElement('video'); var first = true; video.srcObject = stream; video.muted = true; video.height = config.height; video.width = config.width; video.volume = 0; video.onplaying = function() { cvs.width = config.width; cvs.height = config.height; var ctx = cvs.getContext('2d'); var frameTimeout = 1000 / config.frameRate; var cameraTimer = setInterval(function f() { if (finished) { clearInterval(cameraTimer); controller.close(); } if (first) { first = false; if (config.onVideoProcessStarted) { config.onVideoProcessStarted(); } } ctx.drawImage(video, 0, 0); if (controller._controlledReadableStream.state !== 'closed') { try { controller.enqueue( ctx.getImageData(0, 0, config.width, config.height) ); } catch (e) {} } }, frameTimeout); }; video.play(); } }); } var worker; function startRecording(stream, buffer) { if (!config.workerPath && !buffer) { finished = false; // is it safe to use @latest ? fetch( 'https://unpkg.com/webm-wasm@latest/dist/webm-worker.js' ).then(function(r) { r.arrayBuffer().then(function(buffer) { startRecording(stream, buffer); }); }); return; } if (!config.workerPath && buffer instanceof ArrayBuffer) { var blob = new Blob([buffer], { type: 'text/javascript' }); config.workerPath = URL.createObjectURL(blob); } if (!config.workerPath) { console.error('workerPath parameter is missing.'); } worker = new Worker(config.workerPath); worker.postMessage(config.webAssemblyPath || 'https://unpkg.com/webm-wasm@latest/dist/webm-wasm.wasm'); worker.addEventListener('message', function(event) { if (event.data === 'READY') { worker.postMessage({ width: config.width, height: config.height, bitrate: config.bitrate || 1200, timebaseDen: config.frameRate || 30, realtime: config.realtime }); cameraStream().pipeTo(new WritableStream({ write: function(image) { if (finished) { console.error('Got image, but recorder is finished!'); return; } worker.postMessage(image.data.buffer, [image.data.buffer]); } })); } else if (!!event.data) { if (!isPaused) { arrayOfBuffers.push(event.data); } } }); } /** * This method records video. * @method * @memberof WebAssemblyRecorder * @example * recorder.record(); */ this.record = function() { arrayOfBuffers = []; isPaused = false; this.blob = null; startRecording(stream); if (typeof config.initCallback === 'function') { config.initCallback(); } }; var isPaused; /** * This method pauses the recording process. * @method * @memberof WebAssemblyRecorder * @example * recorder.pause(); */ this.pause = function() { isPaused = true; }; /** * This method resumes the recording process. * @method * @memberof WebAssemblyRecorder * @example * recorder.resume(); */ this.resume = function() { isPaused = false; }; function terminate(callback) { if (!worker) { if (callback) { callback(); } return; } // Wait for null event data to indicate that the encoding is complete worker.addEventListener('message', function(event) { if (event.data === null) { worker.terminate(); worker = null; if (callback) { callback(); } } }); worker.postMessage(null); } var arrayOfBuffers = []; /** * This method stops recording video. * @param {function} callback - Callback function, that is used to pass recorded blob back to the callee. * @method * @memberof WebAssemblyRecorder * @example * recorder.stop(function(blob) { * video.src = URL.createObjectURL(blob); * }); */ this.stop = function(callback) { finished = true; var recorder = this; terminate(function() { recorder.blob = new Blob(arrayOfBuffers, { type: 'video/webm' }); callback(recorder.blob); }); }; // for debugging this.name = 'WebAssemblyRecorder'; this.toString = function() { return this.name; }; /** * This method resets currently recorded data. * @method * @memberof WebAssemblyRecorder * @example * recorder.clearRecordedData(); */ this.clearRecordedData = function() { arrayOfBuffers = []; isPaused = false; this.blob = null; // todo: if recording-ON then STOP it first }; /** * @property {Blob} blob - The recorded blob object. * @memberof WebAssemblyRecorder * @example * recorder.stop(function(){ * var blob = recorder.blob; * }); */ this.blob = null; } if (typeof RecordRTC !== 'undefined') { RecordRTC.WebAssemblyRecorder = WebAssemblyRecorder; } /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__("DuR2"), __webpack_require__("W2nU"))) /***/ }), /***/ "mho0": /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; /** * Created by hustcc on 18/6/9. * Contract: i@hust.cc */ var _default = function _default(fn) { var delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 60; var timer = null; return function () { var _this = this; for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } clearTimeout(timer); timer = setTimeout(function () { fn.apply(_this, args); }, delay); }; }; exports["default"] = _default; /***/ }), /***/ "mi9z": /***/ (function(module, exports) { /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * The base implementation of `_.has` without support for deep paths. * * @private * @param {Object} [object] The object to query. * @param {Array|string} key The key to check. * @returns {boolean} Returns `true` if `key` exists, else `false`. */ function baseHas(object, key) { return object != null && hasOwnProperty.call(object, key); } module.exports = baseHas; /***/ }), /***/ "mkdi": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.showAttendList = showAttendList; exports.showAttendPointInfo = showAttendPointInfo; var _events = _interopRequireDefault(__webpack_require__("TLe5")); var _api = __webpack_require__("H/Zg"); var _TypeData = __webpack_require__("HV3m"); var _utils = __webpack_require__("oAV5"); // 引入 EventEmitter // 驻勤点信息展示 function showAttendPointInfo(_ref) { var aid = _ref.aid, _ref$companyName = _ref.companyName, companyName = _ref$companyName === void 0 ? "" : _ref$companyName, doMainId = _ref.doMainId, _ref$success = _ref.success, success = _ref$success === void 0 ? null : _ref$success, _ref$pageNo = _ref.pageNo, pageNo = _ref$pageNo === void 0 ? 1 : _ref$pageNo, _ref$pageSize = _ref.pageSize, pageSize = _ref$pageSize === void 0 ? 20 : _ref$pageSize, _ref$hasMark = _ref.hasMark, hasMark = _ref$hasMark === void 0 ? true : _ref$hasMark; // 清除地图所有标记 _events.default.emit('clearMapTag'); // 初始化右侧数据模块 _events.default.emit('initRightDataModule'); _events.default.emit('clearMapModal', 'ComponeyInfo'); _events.default.emit('clearMapModal', 'AttendInfo'); // 关闭搜索视图 _events.default.emit('isOpenTopSwitch', { type: "searchViews", value: false }); (0, _api.attendanceGetTypeData)({ _currpage: pageNo, lines: pageSize }, { zid: aid }).then(function (res) { console.log('showAttendPointInfo', aid, res); if (res.data && res.data.data && res.data.data.length > 0) { var data = res.data.data[0]; var param = { domainid: doMainId, selectAttendId: aid, attendName: data.ATTENDANCESITENAME, latitude: data.latitude || '', longitude: data.longitude || '', componey: companyName, name: data.PRINCIPALNAME, phone: data.PRINCIPALPHONENO, address: data.ATTENDANCESITEADDRESS, addressDetail: data.ATTENDANCESITEFULLADDRESS, scope: data.PERFORMRANGE, org: data.OFFICEPOLICEADDRESS, obj: data.SERVEOBJECTNAME, contract: data.CONTRACTSTATE }; // 如果没有符合的图标,默认设置 var current = _TypeData.data.length - 1; _TypeData.data.map(function (item, index) { if (item.key == data.ATTENDANCESITETYPE) { current = index; } }); param.markerIcon = _TypeData.data[current].markerIcon; param.clickMarkerIcon = _TypeData.data[current].clickMarkerIcon; if (hasMark) { _events.default.emit('addPictueMarks', { data: { data: [param] }, type: 'attendancePoint' }); } success && success(param); } }); } // 驻勤点列表展示 function showAttendList(_ref2) { var doMainId = _ref2.doMainId, _ref2$success = _ref2.success, success = _ref2$success === void 0 ? null : _ref2$success, _ref2$doMainName = _ref2.doMainName, doMainName = _ref2$doMainName === void 0 ? '' : _ref2$doMainName, _ref2$keyWord = _ref2.keyWord, keyWord = _ref2$keyWord === void 0 ? '' : _ref2$keyWord; var params = {}; if ((0, _utils.isEmpty)(keyWord)) { params.id = doMainId; } else { params.name = keyWord; } (0, _api.getAttendance)(params).then(function (res) { console.log('showAttendList', res); if (res.data) { var data = res.data; if (data.length == 0) { return success && success([]); } var result = []; var _loop = function _loop(i) { // 对数据字段重新组装 var rJson = {}; rJson.lnglat = data[i].item_attendancesitelatitude ? [data[i].item_attendancesitelongitude, data[i].item_attendancesitelatitude] : ''; rJson.taskName = data[i].item_attendancesitename; rJson.attendName = data[i].item_attendancesitename; rJson.componey = (0, _utils.isEmpty)(doMainName) ? data[i].item_companyname : doMainName; rJson.name = data[i].item_principalname; rJson.phone = data[i].item_principalphoneno; rJson.mobilePhone = data[i].item_principalphoneno; rJson.idCardNo = data[i].item_principalidcardno; rJson.address = data[i].item_attendancesiteaddress; rJson.addressDetail = data[i].item_attendancesitefulladdress; rJson.taskAddress = data[i].item_attendancesitefulladdress; rJson.scope = data[i].item_performrange; rJson.org = data[i].item_officepoliceaddress; rJson.obj = data[i].item_serveobjectname; rJson.contract = data[i].item_contractstate; rJson.companyName = (0, _utils.isEmpty)(doMainName) ? data[i].item_companyname : doMainName; rJson.comTaskId = data[i].id; rJson.perId = data[i].id; rJson.selectAttendId = data[i].id; rJson.domainid = doMainId; rJson.latitude = data[i].item_attendancesitelatitude; rJson.longitude = data[i].item_attendancesitelongitude; rJson.markerIcon = data[i].markerIcon; rJson.clickMarkerIcon = data[i].clickMarkerIcon; // 如果没有符合的图标,默认设置 var current = _TypeData.data.length - 1; _TypeData.data.map(function (item, index) { if (item.key == data[i].item_attendancesitetype) { current = index; } }); rJson.markerIcon = _TypeData.data[current].markerIcon; rJson.clickMarkerIcon = _TypeData.data[current].clickMarkerIcon; result.push(rJson); }; for (var i = 0; i < data.length; i++) { _loop(i); } _events.default.emit('addPictueMarks', { data: { data: result }, type: 'attendancePoint' }); // TAG: 统一驻勤点标记,故注释 // this.props.dispatch({ // type: "command/fetchAllAttendanceList", // payload: { // attendanceList: data, // }, // }); success && success(result); } }); } /***/ }), /***/ "mwMK": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAiCAYAAAC0nUK+AAAAAXNSR0IArs4c6QAABWVJREFUSA2dVmtsVFUQnrmPXbp92N6lDSxI0GoQgk2ERh4RsCAoRlASAVGC4Q9CYkgQA20JCSYQ2kgUEw0qAmJUjGh9NKGxL4ESUEsrvsBEFAgPXSrttrXb7d299zhzlru9+yigk2zOnHl8d86cmTmLcAOaV9U1M2bbCwBEGQoIAKBfoOgk/hIoeERF5cuvNua3IJIkA2EGGczZ1lUGYFcJEPdn0rtliNAKQt3YtKnga7ec+STwLUIoR7df2wYCyllZmKvAnIkemHqXBwIFKuRlIfT0C7jSZcE3Z01o+tmEjl6bTQkIX55RaZRvQYwLpEyq6OBC4EPbOz+m9UldBVg5yweLSoeBR0v6/nXr+GLGBHx2MgL7joQhajEa1sysMBY7HyCYOB3zrn2JgNfk+xCql+VB2QQvqMrQwOzF+omjdZh0hw4nfjMhEhXjL7YMaH80VzezXnrPq7o2PWbDMV0R+MryPJgwSmddGp26EIPa7yMwpViHufd6k3J6+nIUXni/B6I2CkrRrKZKo0VhBMsWlGeBnIpMwN1hAe3no5R3BdY/mg2fUyo2HOiBvoHBImE/9mccysBWxsW51aFSKxZr5ct7b01+Wo73HO6HD4+H2RYepFRtfiIHLnfZ8NyekAyk6qlcqkqpBr6DFbtC8UvWYIpiWxbVMciqSL28dw6HE8D3BDQZNduOohMsmZoFbedMOHLGZJEk9ufqYsIYPqbQwebwhsvNTftb+uHA8f6EqKtPyDJ0BNPujtsf+iHiiOTq4DCuQr01hqVcx24quV0Hr44wPqBLXbDbkhcW7I6XsT9HXhec7+AaHKQEDsIYDVAUUdPIBhk0AbhvrAY7ns6DsYWqvDiuBG6edbS+ShXVTc3ENIwCcBM3GhOCKFRAYB9vuPNSacIoDXwelJ3KJcpR8Qn4AzWt8ZTdWZR84gQO4fLZggzKUTl0+nJMAvwZSnRy2gcafhqQ5otKsxw3uTo4VOxXFEpLO0t5Vjhk0yH4A6v3dsOuxjD8cikGF6/ZcJXyPW6k5pjJsh2RH8+9I3RwqJXaKedKHQj7GR5Cz87wSYea1gjwfFHJ75Pv+uXPcXbWLEpXvyng9fo+2Lo4V4q5zhlHEopazZMtagf+wS6abgU8hJZS/cYsAQsmDYMVD/jgi7YInKR6vkSR52cjFBdp8DgNNIP4NxrCsG5+tvM9OcTklEToUHWjTl7t7O1/bwIbtnK0N5otCZQMTGK2xKfjuuZK/06ZME3z76Rhc4bH5uaDvZTvaAb3oUVsz37sT9G2e3OMXWydKNJHqnvGmZZJrwrk/t95Tq/SVdWLpfXr/ReTwHkzu6pzPtqilqaaLN7/9hJBWEWYXV85/FvGYkpEHt8C0Gu0yrbtt5z9ra0YAxUXNpcbdW775CIlTWOF8TY9VzvcRjfjaeSuSgVmnzRwFs6cZlTQ34UTzN+UEHc3Vvr3ZbLLCL6lDGNej7KMshbK5OTIKIAfx4w01jr71DUjOBsderHgAir4fKqDs6fKGFBBX/ruSkwe6I4BrUOCs01ThfEBRdfgsh9kEbfVV+b9OihI524IzuYeTV1DS1J03HBGsVGdDpcsuSl43Yb83+kFrnK7qaqy+uASHByjbqWLT6tzlw4mT57si0ajBtw2vmj4w6/VA2p+YfYc7fh04WpFUXp1Xe9sa2uL/zVwO17nZSdmkENJSUlRJBIptiwrxwoH0Tt6uqn5iqb1nv6oPHLlZC/L6cOFgUDACgaD8jVLxRkyLdSlI9zGnY0baszQub29p3afdctT7dy6IcHp2H+5DW0zFOuoXf6mW8Z8qp1bf0s5p+hyaZh5aFUJzKLyNG8l5/8CIiY/Sg5c27EAAAAASUVORK5CYII=" /***/ }), /***/ "mxhB": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__style_index_less__ = __webpack_require__("vtiu"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__style_index_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__style_index_less__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__index_less__ = __webpack_require__("Ryky"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__index_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__index_less__); /***/ }), /***/ "n1y9": /***/ (function(module, exports) { // removed by extract-text-webpack-plugin /***/ }), /***/ "nMSa": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /** * 三维模型的特殊搜索字样展示 */ var ThreeDimensional = exports.default = /*#__PURE__*/function (_Component) { function ThreeDimensional(props) { var _this; (0, _classCallCheck2.default)(this, ThreeDimensional); _this = _callSuper(this, ThreeDimensional, [props]); _this.state = { // beijingVideo: props.beijingVideo }; return _this; } (0, _inherits2.default)(ThreeDimensional, _Component); return (0, _createClass2.default)(ThreeDimensional, [{ key: "componentDidMount", value: function componentDidMount() {} }, { key: "render", value: function render() { var _this2 = this; return /*#__PURE__*/_react.default.createElement("div", { style: { position: "absolute", top: "0", left: "0", width: "100%", height: "100%", zIndex: "1001" } }, /*#__PURE__*/_react.default.createElement("div", { id: "video-three-dimensional", style: { width: "100%", height: "100%" } }, /*#__PURE__*/_react.default.createElement("div", { style: { position: "absolute", color: "#ffffff", right: "10px", fontSize: "20px", cursor: "pointer" }, onClick: function onClick() { _this2.props.changeStatus(false); // this.props.changeBeijingVideo(false) // this.setState({ beijingVideo: false }); } }, "x"), /*#__PURE__*/_react.default.createElement("iframe", { allowfullscreen: "true", id: "beijing-video", style: { width: "100%", height: "100%" }, src: "http://114.116.164.42:8014/bim/view?fileId=1896948461340768" }))); } }]); }(_react.Component); /***/ }), /***/ "nQ8R": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); var _dva = __webpack_require__("S6G3"); var _APictureData = _interopRequireDefault(__webpack_require__("TniA")); var _EventListTab = _interopRequireDefault(__webpack_require__("CpD9")); var _Search = _interopRequireDefault(__webpack_require__("js55")); var _dec, _class; /** * 警保联动图层的数据展示 */ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } var Police = exports.default = (_dec = (0, _dva.connect)(function (state) { return {}; }), _dec(_class = /*#__PURE__*/function (_Component) { function Police(props) { var _this; (0, _classCallCheck2.default)(this, Police); _this = _callSuper(this, Police, [props]); _this.state = {}; return _this; } (0, _inherits2.default)(Police, _Component); return (0, _createClass2.default)(Police, [{ key: "componentDidMount", value: function componentDidMount() {} }, { key: "render", value: function render() { var _this2 = this; var searchAround = this.props.searchAround; console.log(searchAround); return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_EventListTab.default, { addPoliceMarks: function addPoliceMarks(data, place) { _this2.props.addPoliceMarks(data, place); }, _thisGIS: this.props._thisGIS }), /*#__PURE__*/_react.default.createElement(_APictureData.default, { layerSatatus: this.props.layerSatatus // addPictueMarks={(data, type) => { // this.props.addPictueMarks(data, type); // }} // reducePictueMarks={(data, type) => { // this.props.reducePictueMarks(data, type); // }} }), searchAround.show && searchAround.type == 'police' && /*#__PURE__*/_react.default.createElement(_Search.default, { _thisGIS: this.props._thisGIS, onClose: function onClose(value) { return _this2.props.changeShowSearchView(value); }, lnglat: searchAround.lnglat // addPictueMarks={(data, type, where) => { // this.props.addPictueMarks(data, type, where); // }} // reducePictueMarks={(data, type, where) => { // console.log(data) // this.props.reducePictueMarks(data, type, where); // }} })); } }]); }(_react.Component)) || _class); /***/ }), /***/ "naA8": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.CommandRouter = void 0; var _react = _interopRequireDefault(__webpack_require__("GiK3")); var _DataScreen = _interopRequireDefault(__webpack_require__("yNbW")); var _GIS = _interopRequireDefault(__webpack_require__("GYFM")); var _utils = __webpack_require__("oAV5"); // import RecordList from "../Command/RecordList"; // import V5page from './V5Page'; var type = (0, _utils.gup)('app_type', window.location.href); var _CommandRouter = []; if (type == 1) { _CommandRouter = [{ menuName: "GIS调度", path: "GIS", component: /*#__PURE__*/_react.default.createElement(_GIS.default, null) }]; } else { _CommandRouter = [ // { // menuName: "数据大屏", // path: "dataScreen", // component: , // }, { menuName: "GIS调度", path: "GIS", component: /*#__PURE__*/_react.default.createElement(_GIS.default, null) }]; } var CommandRouter = exports.CommandRouter = _CommandRouter; /***/ }), /***/ "ncfW": /***/ (function(module, exports, __webpack_require__) { "use strict"; if (true) { module.exports = __webpack_require__("LpuX"); } else { module.exports = require('./cjs/react-is.development.js'); } /***/ }), /***/ "nxrg": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _extends2 = _interopRequireDefault(__webpack_require__("uMMT")); __webpack_require__("/4RJ"); var _datePicker = _interopRequireDefault(__webpack_require__("uz+M")); __webpack_require__("crfj"); var _button = _interopRequireDefault(__webpack_require__("zwGx")); __webpack_require__("9SSc"); var _switch = _interopRequireDefault(__webpack_require__("t5Df")); __webpack_require__("LHBr"); var _input = _interopRequireDefault(__webpack_require__("A+AJ")); __webpack_require__("cwkc"); var _select = _interopRequireDefault(__webpack_require__("8/ER")); __webpack_require__("baa2"); var _icon = _interopRequireDefault(__webpack_require__("FC3+")); var _objectSpread2 = _interopRequireDefault(__webpack_require__("+TWC")); var _toConsumableArray2 = _interopRequireDefault(__webpack_require__("V4Os")); __webpack_require__("UQ5M"); var _message2 = _interopRequireDefault(__webpack_require__("/qCn")); var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); __webpack_require__("gZEk"); var _form = _interopRequireDefault(__webpack_require__("8rR3")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); var _api = __webpack_require__("H/Zg"); var _formItemLayout = __webpack_require__("spoJ"); var _NanNingTraiectory = _interopRequireDefault(__webpack_require__("rmat")); var _moment = _interopRequireDefault(__webpack_require__("PJh5")); var _dva = __webpack_require__("S6G3"); var _index = _interopRequireDefault(__webpack_require__("m4Fn")); var _Video = _interopRequireDefault(__webpack_require__("Pdzk")); var _MouseMovement = _interopRequireDefault(__webpack_require__("06MX")); var _dec, _dec2, _class; /** * 南宁武装押运管控 */ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } var FormItem = _form.default.Item; var NanNing = exports.default = (_dec = _form.default.create(), _dec2 = (0, _dva.connect)(function (state) { return { mapStyle: state.command.mapStyle }; }), _dec(_class = _dec2(_class = /*#__PURE__*/function (_Component) { function NanNing(props) { var _this; (0, _classCallCheck2.default)(this, NanNing); _this = _callSuper(this, NanNing, [props]); // 根据车牌号查询车辆 _this.searchCar = function () { var _this$state = _this.state, licensePlate = _this$state.licensePlate, onlineSwitch = _this$state.onlineSwitch; if (!licensePlate) { _message2.default.info('请输入要查询的车辆'); return; } _this._getLicensePlate(licensePlate, onlineSwitch); }; _this.state = { rootData: [], //组装成json树格式 clickVehicle: null, //当前点击中的某个车辆id值 showVideo: false, videoUrl: "", licensePlate: "", //车牌号码 searchCarData: [], //查询车辆 onlineSwitch: true, //车辆是否在线 text: { isDown: false, offsetLeft: 0, offsetTop: 0 } }; return _this; } (0, _inherits2.default)(NanNing, _Component); return (0, _createClass2.default)(NanNing, [{ key: "componentDidMount", value: function componentDidMount() { var allHeight = document.documentElement.clientHeight - 140 - 16; var treeListHeight = allHeight - 140; this.setState({ allHeight: allHeight, treeListHeight: treeListHeight }); this._getAllRegionsValue(); // this.initH5Player(); } //获取所有的区域数据 }, { key: "_getAllRegionsValue", value: function _getAllRegionsValue() { var _this2 = this; var pageNo = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1; var allRegionsData = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; (0, _api.getHaiKangApiUrl)({ apiPath: "/artemis/api/resource/v1/regions", "pageNo": pageNo, "pageSize": 500, "treeCode": "0" }).then(function (res) { console.log(res); var value = JSON.parse(res.data); console.log(value); if (value) { var data = value.data; var list = data.list; var regionsData = allRegionsData.concat(list); var _pageNo = data.pageNo, pageSize = data.pageSize, total = data.total; if (total > _pageNo * pageSize) { _this2._getAllRegionsValue(_pageNo + 1, regionsData); } else { _this2.sort(regionsData); } } }); } //对区域数据进行树节点排序组装 }, { key: "sort", value: function sort(list) { var idMapping = list.reduce(function (acc, el, i) { acc[el.indexCode] = i; return acc; }, {}); var root; list.forEach(function (el, index) { // 判断根节点 if (el.parentIndexCode == '-1') { el.place = [0]; el.open = true; root = el; return; } // 用映射表找到父元素 var parentEl = list[idMapping[el.parentIndexCode]]; var parentPlace = JSON.parse(JSON.stringify(parentEl.place)); var place = null; if (parentEl.children) { place = parentPlace.concat(parentEl.children.length); } else { place = parentPlace.concat(0); } // 把当前元素添加到父元素的`children`数组中 parentEl.children = [].concat((0, _toConsumableArray2.default)(parentEl.children || []), [(0, _objectSpread2.default)({}, el, { open: false, place: place })]); }); this.setState({ rootData: [root] }); } //获取该区域下的所有车辆,然后塞进root树中 }, { key: "_getVehiclePage", value: function _getVehiclePage() { var _this3 = this; var pageNo = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1; var id = arguments.length > 1 ? arguments[1] : undefined; var place = arguments.length > 2 ? arguments[2] : undefined; var allVehicleData = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : []; (0, _api.getHaiKangApiUrl)({ apiPath: "/artemis/api/rtsm/v1/resource/findVehiclePage", "exactCondition": { "orgIndexCodes": [id] }, "pageNo": pageNo, "pageSize": 5000, "treeCode": "0" }).then(function (res) { console.log(res); var value = JSON.parse(res.data); if (value) { var _data = value.data; if (_data) { var list = _data.list; allVehicleData = allVehicleData.concat(list); var _pageNo2 = _data.pageNo, pageSize = _data.pageSize, total = _data.total; if (total > _pageNo2 * pageSize) { return _this3._getVehiclePage(_pageNo2 + 1, id, place, allVehicleData); } } } var rootData = _this3.state.rootData; var root = JSON.parse(JSON.stringify(rootData)); var data = null; place.map(function (item, index) { if (index == 0) { //暂时根节点没有车辆信息 data = root[item]; if (index + 1 == place.length) { data.vehiclelist = allVehicleData; } } else { data = data.children[item]; if (index + 1 == place.length) { data.vehiclelist = allVehicleData; } } }); _this3.setState({ rootData: root }); }); } //改变open的打开关闭状态 }, { key: "changeOpenStatus", value: function changeOpenStatus(place) { var rootData = this.state.rootData; var root = JSON.parse(JSON.stringify(rootData)); var data = null; place.map(function (item, index) { if (index == 0) { data = root[item]; if (index + 1 == place.length) { data.open = !data.open; } } else { data = data.children[item]; if (index + 1 == place.length) { data.open = !data.open; } } }); this.setState({ rootData: root }); } //根据车辆编号与设备编号获取监控点信息列表 0为全部 1为查询车辆 }, { key: "_getMonitoringPoints", value: function _getMonitoringPoints(veh) { var _this4 = this; var pageNo = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1; var place = arguments.length > 2 ? arguments[2] : undefined; var type = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0; //关联设备对象,默认是第一个 (0, _api.getHaiKangApiUrl)({ apiPath: "/artemis/api/rtsm/v1/vehicle/findCameraPage", exactCondition: { "deviceIndexCodes": [veh.deviceResourceDTOList[0].deviceIndexCode], "vehicleIndexCodes": [veh.vehicleIndexCode] }, "pageNo": pageNo, "pageSize": 100, "treeCode": "0" }).then(function (res) { console.log(res); var value = JSON.parse(res.data); if (value) { var data = value.data; if (type == 0) { var rootData = _this4.state.rootData; var root = JSON.parse(JSON.stringify(rootData)); root[place[0]].children[place[1]].vehiclelist[place[2]].monitoringPointsList = data.list; root[place[0]].children[place[1]].vehiclelist[place[2]].open = !root[place[0]].children[place[1]].vehiclelist[place[2]].open; _this4.setState({ rootData: root }); } else { var searchCarData = _this4.state.searchCarData; searchCarData[place].monitoringPointsList = data.list; searchCarData[place].open = !searchCarData[place].open; _this4.setState({ searchCarData: searchCarData }); } } }); } //根据监控点预览取流URL }, { key: "_getVideoStream", value: function _getVideoStream(indexCode) { var _this5 = this; console.log(indexCode); (0, _api.getHaiKangApiUrl)({ apiPath: "/artemis/api/video/v1/cameras/previewURLs", "cameraIndexCode": indexCode, "streamType": 0, "protocol": "wss", "transmode": 1, "expand": "transcode=0" }).then(function (res) { console.log(res); var value = JSON.parse(res.data); if (value) { var data = value.data; console.log(data); var url = data.url; _this5.setState({ showVideo: true, videoUrl: url }); } }); } //根据车牌号查询车辆 }, { key: "_getLicensePlate", value: function _getLicensePlate(licensePlate, onlineSwitch) { var _this6 = this; console.log(licensePlate); (0, _api.getHaiKangApiUrl)({ apiPath: "/artemis/api/rtsm/v1/resource/findVehicleByLicensePlate", vehicleLicensePlate: licensePlate }).then(function (res) { console.log(res); var value = JSON.parse(res.data); if (value.code === "0") { value = value.data; if (value.status == 1 || value.status == 0 && !onlineSwitch) { value.clicked = false; value.monitoringPointsList = []; value.open = false; _this6.setState({ searchCarData: [value], clickVehicle: null }); } else { _message2.default.info('该车辆未在线'); _this6.setState({ searchCarData: [], clickVehicle: null }); } } else { _message2.default.info('未查找到该车辆'); _this6.setState({ searchCarData: [], clickVehicle: null }); } }); } }, { key: "closeHaikangVideo", value: function closeHaikangVideo() { this.setState({ showVideo: false, videoUrl: '' }); } // 渲染全部车辆数据 }, { key: "renderChild", value: function renderChild(value) { var _this7 = this; var clickVehicle = this.state.clickVehicle; return value.map(function (item) { return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", { onClick: function onClick() { _this7.changeOpenStatus(item.place); if (!item.vehiclelist && item.parentIndexCode != '-1') { _this7._getVehiclePage(1, item.indexCode, item.place, []); } } }, /*#__PURE__*/_react.default.createElement("span", { style: { color: item.parentIndexCode != '-1' && item.open ? '#0e70ff' : '' } }, /*#__PURE__*/_react.default.createElement("span", null, item.name), /*#__PURE__*/_react.default.createElement(_icon.default, { type: item.open ? 'up' : 'down' })), item.open && /*#__PURE__*/_react.default.createElement("div", { className: "vehicle", style: { marginLeft: '10px' } }, item.vehiclelist && (item.vehiclelist.length > 0 ? /*#__PURE__*/_react.default.createElement("div", null, item.vehiclelist.map(function (veh, index) { return /*#__PURE__*/_react.default.createElement("div", { key: index, onClick: function onClick(e) { e.stopPropagation(); } }, /*#__PURE__*/_react.default.createElement("div", { style: { color: clickVehicle && clickVehicle.vehicleIndexCode == veh.vehicleIndexCode ? '#0e70ff' : '' }, onClick: function onClick(e) { e.stopPropagation(); _this7.setState({ clickVehicle: veh }); if (veh.deviceResourceDTOList.length > 0) { _this7._getMonitoringPoints(veh, 1, item.place.concat(index)); } } }, veh.plateNo), /*#__PURE__*/_react.default.createElement("div", { style: { marginLeft: '10px' } }, veh.open && veh.monitoringPointsList.length > 0 && /*#__PURE__*/_react.default.createElement("div", null, veh.monitoringPointsList.map(function (point) { return /*#__PURE__*/_react.default.createElement("div", { key: point.vehicleIndexCode, className: _index.default.point, onClick: function onClick(e) { e.stopPropagation(); _this7._getVideoStream(point.indexCode); } }, /*#__PURE__*/_react.default.createElement("span", null, point.cameraName), /*#__PURE__*/_react.default.createElement("span", { className: _index.default.broadcast }, "\u64AD\u653E")); })))); })) : /*#__PURE__*/_react.default.createElement("div", { onClick: function onClick(e) { return e.stopPropagation(); } }, "\u65E0\u8F66\u8F86\u4FE1\u606F...")))), item.open && item.children && item.children.length > 0 && /*#__PURE__*/_react.default.createElement("div", { className: "child", style: { marginLeft: '10px' } }, _this7.renderChild(item.children))); }); } // 渲染查询车辆数据 }, { key: "renderSearchCar", value: function renderSearchCar(value) { var _this8 = this; var clickVehicle = this.state.clickVehicle; return value.map(function (veh, index) { return /*#__PURE__*/_react.default.createElement("div", { key: index, onClick: function onClick(e) { e.stopPropagation(); } }, /*#__PURE__*/_react.default.createElement("div", { style: { color: clickVehicle && clickVehicle.vehicleIndexCode == veh.vehicleIndexCode ? '#0e70ff' : '' }, onClick: function onClick(e) { e.stopPropagation(); _this8.setState({ clickVehicle: veh }); if (veh.deviceResourceDTOList.length > 0) { _this8._getMonitoringPoints(veh, 1, index, 1); } } }, veh.plateNo), /*#__PURE__*/_react.default.createElement("div", { style: { marginLeft: '10px' } }, veh.open && veh.monitoringPointsList.length > 0 && /*#__PURE__*/_react.default.createElement("div", null, veh.monitoringPointsList.map(function (point) { return /*#__PURE__*/_react.default.createElement("div", { key: point.vehicleIndexCode, className: _index.default.point, onClick: function onClick(e) { e.stopPropagation(); _this8._getVideoStream(point.indexCode); } }, /*#__PURE__*/_react.default.createElement("span", null, point.cameraName), /*#__PURE__*/_react.default.createElement("span", { className: _index.default.broadcast }, "\u64AD\u653E")); })))); }); } //根据车辆编号及时段获取历史定位信息 }, { key: "_getPosition", value: function _getPosition() { var _this9 = this; var pageNo = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1; var allPositionData = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; var _thisGIS = this.props._thisGIS; var clickVehicle = this.state.clickVehicle; console.log('this.props', this.props); console.log(this.props.form); this.props.form.validateFields(function (err, values) { var millisecond = values.endTime.diff(values.startTime, 'millisecond') / 1000 / 3600; if (millisecond > 24) { return _message2.default.warning("搜索时间段间隔必须在24小时以内"); } if (!err && clickVehicle) { var beginTime = (0, _moment.default)(values.startTime).format("YYYY-MM-DDTHH:MM:DD.123+08:00"); var endTime = (0, _moment.default)(values.endTime).format("YYYY-MM-DDTHH:MM:DD.123+08:00"); (0, _api.getHaiKangApiUrl)({ apiPath: "/artemis/api/rtsm/v1/gps/findHistoryGps", "beginTime": beginTime, "endTime": endTime, "vehicleIndexCode": clickVehicle.vehicleIndexCode, "pageNo": pageNo, "pageSize": 500 }).then(function (res) { // let value = JSON.parse(res.data.data[0].data) && JSON.parse(res.data.data[0].data) var value = JSON.parse(res.data); console.log(value); if (value) { var data = value.data; var list = data.list; allPositionData = allPositionData.concat(list); // NanNingTraiectory.call(_thisGIS, allPositionData) var _pageNo3 = data.pageNo, pageSize = data.pageSize, total = data.total; if (total > _pageNo3 * pageSize) { _this9._getPosition(_pageNo3 + 1, allPositionData); } else { if (allPositionData.length > 0) { allPositionData = allPositionData.filter(function (item) { return item.latitude && item.longitude && item.time; }); var a = allPositionData.every(function (item) { return item.latitude && item.longitude && item.time; }); console.log(a); // debugger _NanNingTraiectory.default.call(_thisGIS, allPositionData); } else { _message2.default.warning("暂无轨迹信息"); } } } }); } }); } }, { key: "render", value: function render() { var _this0 = this; var _this$state2 = this.state, rootData = _this$state2.rootData, clickVehicle = _this$state2.clickVehicle, allHeight = _this$state2.allHeight, treeListHeight = _this$state2.treeListHeight, showVideo = _this$state2.showVideo, videoUrl = _this$state2.videoUrl, licensePlate = _this$state2.licensePlate, onlineSwitch = _this$state2.onlineSwitch, searchCarData = _this$state2.searchCarData; var getFieldDecorator = this.props.form.getFieldDecorator; var mapStyle = this.props.mapStyle; console.log(searchCarData); return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("div", { className: 'drawer_container_tab ' + _index.default[mapStyle], style: { width: '250px', padding: '10px 10px 0 ', height: allHeight, overflow: 'auto', opacity: '0.8' } }, /*#__PURE__*/_react.default.createElement("div", { className: _index.default.searchCar }, /*#__PURE__*/_react.default.createElement("div", { className: _index.default.title }, "\u8F66\u8F86\u641C\u7D22"), /*#__PURE__*/_react.default.createElement(_select.default, { defaultValue: "licensePlate", style: { width: 104, marginRight: 10 } }, /*#__PURE__*/_react.default.createElement(_select.default.Option, { value: "licensePlate" }, "\u8F66\u724C\u53F7\u7801")), /*#__PURE__*/_react.default.createElement(_input.default, { style: { width: 114 }, placeholder: "\u8BF7\u8F93\u5165\u8F66\u724C\u53F7", value: licensePlate, onChange: function onChange(e) { _this0.setState({ licensePlate: e.target.value }); } }), /*#__PURE__*/_react.default.createElement("div", { className: _index.default.onlineSwitch }, /*#__PURE__*/_react.default.createElement("div", { className: _index.default.title }, "\u53EA\u663E\u793A\u5728\u7EBF\u8F66\u8F86"), /*#__PURE__*/_react.default.createElement(_switch.default, { checkedChildren: "\u5F00", unCheckedChildren: "\u5173", checked: onlineSwitch, onClick: function onClick() { _this0.setState({ onlineSwitch: !onlineSwitch }); } })), /*#__PURE__*/_react.default.createElement(_button.default, { type: "primary", onClick: this.searchCar }, "\u8F66\u8F86\u67E5\u8BE2")), /*#__PURE__*/_react.default.createElement("div", { className: _index.default.treeList, style: { maxHeight: treeListHeight, overflow: 'auto', marginBottom: 16 } }, searchCarData.length > 0 ? this.renderSearchCar(searchCarData) : ''), /*#__PURE__*/_react.default.createElement("div", { className: _index.default.treeList, style: { maxHeight: treeListHeight, overflow: 'auto' } }, rootData.length > 0 ? this.renderChild(rootData) : '暂无数据...'), /*#__PURE__*/_react.default.createElement("div", { className: _index.default.timeContent }, /*#__PURE__*/_react.default.createElement(_form.default, { style: { marginTop: 24 } }, /*#__PURE__*/_react.default.createElement(FormItem, (0, _extends2.default)({}, _formItemLayout.formItemLayout1, { label: "", style: { marginBottom: 'unset' } }), getFieldDecorator('startTime', { rules: [{ required: true, message: '请输入开始时间' }] })(/*#__PURE__*/_react.default.createElement(_datePicker.default, { showTime: true, placeholder: "\u5F00\u59CB\u65F6\u95F4" }))), /*#__PURE__*/_react.default.createElement(FormItem, (0, _extends2.default)({}, _formItemLayout.formItemLayout1, { label: "", style: { marginBottom: 'unset' } }), getFieldDecorator('endTime', { rules: [{ required: true, message: '请输入结束时间' }] })(/*#__PURE__*/_react.default.createElement(_datePicker.default, { showTime: true, placeholder: "\u7ED3\u675F\u65F6\u95F4" }))), /*#__PURE__*/_react.default.createElement(_button.default, { type: "primary", disabled: !clickVehicle, onClick: function onClick() { return _this0._getPosition(); } }, "\u67E5\u8BE2")))), // showVideo ? showVideo ? /*#__PURE__*/_react.default.createElement(_MouseMovement.default, { isDown: this.state.text.isDown, offsetLeft: this.state.text.offsetLeft, offsetTop: this.state.text.offsetTop }, function (_ref) { var x = _ref.x, y = _ref.y, _ref$cursor = _ref.cursor, cursor = _ref$cursor === void 0 ? 'move' : _ref$cursor; return ( /*#__PURE__*/ //
    0 ? this.state.data.map(function (item, index) { return /*#__PURE__*/_react.default.createElement("div", { key: index, className: "item", onClick: function onClick() { _this2.props.dispatch({ type: "command/setSelectIndex", // payload: item.comTaskId, payload: index }); } }, /*#__PURE__*/_react.default.createElement("div", { className: "poibox" }, _this2.props.selectedId === index ? /*#__PURE__*/_react.default.createElement("div", { className: "amap_lib_placeSearch_poi mark-icon", style: { background: "url(" + item.clickMarkerIcon + ")", float: "left", marginRight: "10px", left: "0" } }) : /*#__PURE__*/_react.default.createElement("div", { className: "amap_lib_placeSearch_poi mark-icon", style: { background: "url(" + item.markerIcon + ")", float: "left", marginRight: "10px", left: "0" } }), /*#__PURE__*/_react.default.createElement("div", { style: { marginLeft: 25, marginTop: 2 } }, /*#__PURE__*/_react.default.createElement("div", { className: "name" }, item.taskName, "(", item.perNum, "\u4EBA)"), /*#__PURE__*/_react.default.createElement("div", { className: "text" }, "\u5730\u5740\uFF1A", /*#__PURE__*/_react.default.createElement("span", { style: { width: "100%", overflow: "auto" } }, item.taskAddress))))); }) : /*#__PURE__*/_react.default.createElement("div", { style: { textAlign: "center", fontSize: "14px", color: "#afb0b1" } }, this.state.loadingText || "暂无数据")); } }]); }(_react.Component)) || _class); /***/ }), /***/ "pdZy": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = Common; __webpack_require__("UQ5M"); var _message2 = _interopRequireDefault(__webpack_require__("/qCn")); var _rtcClient = _interopRequireDefault(__webpack_require__("adV+")); var _shareClient = _interopRequireDefault(__webpack_require__("Xusr")); var _presetting = _interopRequireDefault(__webpack_require__("2mw7")); var _api = __webpack_require__("H/Zg"); function Common() { var isCamOn = true; var isMicOn = true; var isScreenOn = false; var isJoined = true; var rtc = null; var share = null; var shareUserId = ""; var cameraId = ""; var micId = ""; var number = 0; var videoThis = null; var common = { login: function login(roomId, mobilePhone, cid, name, _this) { var _this2 = this; (0, _presetting.default)(false, roomId, mobilePhone, cid, name, function (options) { rtc = new _rtcClient.default(options, _this); console.log(_this); videoThis = _this; _this2.join(); }); (0, _presetting.default)(true, roomId, mobilePhone, cid, name, function (options) { shareUserId = options.userId; share = new _shareClient.default(options); }); // if ($("#userId").val() == "") { // alert("用户名不能为空!"); // return; // } // if ($("#roomId").val() == "") { // alert("房间号不能为空!"); // return; // } // presetting.login(false, (options) => { // const options = { // sdkAppId: 1400246643, // userId: "user_43707228", // userSig: // "eJwtzMEKgzAQBNB-ydUia4y6Cr0Ueih4UqG9lWoSWaJVkrQUSv*9oh7nzTBf1pR1*FaWFYyHwA5rJqmenjSt-HLK3kWcQcY57gMnzWOeSbIiEgBcpKmIt8bTqBZNEFFEOeCm6jOTXTwFgQD7B-XLe95IDzc7TH2gz21QXU5j1155OdLQmUrWueZZMiBOxh3Z7w8UZDLR", // roomId: "83999", // }; // rtc = new RtcClient(options); // // join(); // // }); // // presetting.login(true, (options) => { // // shareUserId = options.userId; // share = new ShareClient(options); // }); }, join: function join() { rtc.join(); // $("#login-root").hide(); // $("#room-root").show(); // $("#header-roomId").html("房间号: " + $("#roomId").val()); // $("#member-me") // .find(".member-id") // .html($("#userId").val() + "(我)"); }, leave: function leave(roomNo) { // document // .getElementById("main-video") // .appendChild(document.getElementById("mask_main")); // $("#mask_main").appendTo($("#main-video")); /** * 调用结束时间的接口 * 主要作用是服务端记录结束时间 */ (0, _api.updateRoomEndTime)({ roomNo: roomNo }).then(function (res) { console.log(res); }); rtc.leave(); share.leave(); _message2.default.info('您已离开房间'); }, publish: function publish() { rtc.publish(); }, unpublish: function unpublish() { rtc.unpublish(); }, muteAudio: function muteAudio() { rtc.muteLocalAudio(); }, unmuteAudio: function unmuteAudio() { rtc.unmuteLocalAudio(); }, muteVideo: function muteVideo() { document.getElementById("mask_main").style.display = "flex"; // $("#mask_main").show(); rtc.muteLocalVideo(); }, unmuteVideo: function unmuteVideo() { rtc.unmuteLocalVideo(); document.getElementById("mask_main").style.display = "none"; // $("#mask_main").hide(); }, startSharing: function startSharing() { share.join(); }, stopSharing: function stopSharing() { share.leave(); }, //主视频点击切换 mainVideoClick: function mainVideoClick() { var mainVideo = document.getElementById("main-video"); if (document.getElementById("div-video-local").childNodes[0].getAttribute("id") == mainVideo.getAttribute("id")) { return; } //释放main-video grid-area // mainVideo.style.gridArea = "auto/auto/auto/auto"; // exchangeView(document.getElementById("main-video"), mainVideo); // //将video-grid中第一个div设为main-video // document.getElementsByClassName("video-box")[0].style.gridArea = // "1/1/3/4"; mainVideo.style.height = '100%'; // mainVideo.style.paddingBottom='0'; var right = mainVideo; var left = document.querySelector('#div-video-local').childNodes[0]; document.querySelector('#div-video-local').removeChild(left); document.querySelector('#div-video-local').appendChild(right); left.style.height = '200px'; // document // .querySelector('#div-video-child') // .removeChild( // right // ); document.querySelector('#div-video-child').appendChild(left); //chromeM71以下会自动暂停,手动唤醒 if (getBroswer().broswer == "Chrome" && getBroswer().version < "72") { rtc.resumeStreams(); } // $("#main-video").on("click", () => { // let mainVideo = $(".video-box").first(); // if ($("#main-video").is(mainVideo)) { // return; // } // //释放main-video grid-area // mainVideo.css("grid-area", "auto/auto/auto/auto"); // exchangeView($("#main-video"), mainVideo); // //将video-grid中第一个div设为main-video // $(".video-box").first().css("grid-area", "1/1/3/4"); // //chromeM71以下会自动暂停,手动唤醒 // if (getBroswer().broswer == "Chrome" && getBroswer().version < "72") { // rtc.resumeStreams(); // } // }); }, //共享屏幕按钮点击 screenShareClick: function screenShareClick() { // throttle(() => { if (!TRTC.isScreenShareSupported()) { alert("当前浏览器不支持屏幕分享!"); return; } if (isScreenOn) { // document // .getElementById("screen-btn") // .setAttribute( // "src", // require("../../../assets/images/prevention/screen-off.png") // ); // $("#screen-btn").attr("src", "./img/screen-off.png"); this.stopSharing(); isScreenOn = false; } else { // document // .getElementById("screen-btn") // .setAttribute( // "src", // require("../../../assets/images/prevention/screen-on.png") // ); // $("#screen-btn").attr("src", "./img/screen-on.png"); this.startSharing(); isScreenOn = true; } // }, 2000); }, setBtnClickFuc: function setBtnClickFuc() { //userid roomid规格 //$('#userId').on('input', function(e) { // e.preventDefault(); // let val = $('#userId').val().slice(5); // $('#userId').val('user_'+val.replace(/[^\d]/g,'')); //}); // $("#roomId").on("input", function (e) { // e.preventDefault(); // let val = $("#roomId").val(); // $("#roomId").val(val.replace(/[^\d]/g, "")); // }); //login // $("#login-btn").click(() => { // login(); // }); //open or close camera // $("#video-btn").on("click", () => { // if (isCamOn) { // $("#video-btn").attr("src", "./img/big-camera-off.png"); // $("#video-btn").attr("title", "打开摄像头"); // $("#member-me") // .find(".member-video-btn") // .attr("src", "img/camera-off.png"); // isCamOn = false; // muteVideo(); // } else { // $("#video-btn").attr("src", "./img/big-camera-on.png"); // $("#video-btn").attr("title", "关闭摄像头"); // $("#member-me") // .find(".member-video-btn") // .attr("src", "img/camera-on.png"); // isCamOn = true; // unmuteVideo(); // } // }); //open or close microphone // $("#mic-btn").on("click", () => { // if (isMicOn) { // $("#mic-btn").attr("src", "./img/big-mic-off.png"); // $("#mic-btn").attr("title", "打开麦克风"); // $("#member-me") // .find(".member-audio-btn") // .attr("src", "img/mic-off.png"); // isMicOn = false; // muteAudio(); // } else { // $("#mic-btn").attr("src", "./img/big-mic-on.png"); // $("#mic-btn").attr("title", "关闭麦克风"); // $("#member-me") // .find(".member-audio-btn") // .attr("src", "img/mic-on.png"); // isMicOn = true; // unmuteAudio(); // } // }); //share screen or not // $("#screen-btn").on( // "click", // throttle(() => { // if (!TRTC.isScreenShareSupported()) { // alert("当前浏览器不支持屏幕分享!"); // return; // } // if ($("#screen-btn").attr("src") == "./img/screen-on.png") { // $("#screen-btn").attr("src", "./img/screen-off.png"); // stopSharing(); // isScreenOn = false; // } else { // $("#screen-btn").attr("src", "./img/screen-on.png"); // startSharing(); // isScreenOn = true; // } // }, 2000) // ); //logout // $("#logout-btn").on("click", () => { // leave(); // $("#room-root").hide(); // $("#login-root").show(); // }); //switch main video // $("#main-video").on("click", () => { // let mainVideo = $(".video-box").first(); // if ($("#main-video").is(mainVideo)) { // return; // } // //释放main-video grid-area // mainVideo.css("grid-area", "auto/auto/auto/auto"); // exchangeView($("#main-video"), mainVideo); // //将video-grid中第一个div设为main-video // $(".video-box").first().css("grid-area", "1/1/3/4"); // //chromeM71以下会自动暂停,手动唤醒 // if (getBroswer().broswer == "Chrome" && getBroswer().version < "72") { // rtc.resumeStreams(); // } // }); //chrome60以下不支持popover,防止error if (getBroswer().broswer == "Chrome" && getBroswer().version < "60") return; //开启popover $(function () { $('[data-toggle="popover"]').popover(); }); $("#camera").popover({ html: true, content: function content() { return $("#camera-option").html(); } }); $("#microphone").popover({ html: true, content: function content() { return $("#mic-option").html(); } }); $("#camera").on("click", function () { $("#microphone").popover("hide"); $(".popover-body").find("div").attr("onclick", "setCameraId(this)"); }); $("#microphone").on("click", function () { $("#camera").popover("hide"); $(".popover-body").find("div").attr("onclick", "setMicId(this)"); }); //点击body关闭popover $("body").click(function () { $("#camera").popover("hide"); $("#microphone").popover("hide"); }); //popover事件 $("#camera").on("show.bs.popover", function () { $("#camera").attr("src", "./img/camera-on.png"); }); $("#camera").on("hide.bs.popover", function () { $("#camera").attr("src", "./img/camera.png"); }); $("#microphone").on("show.bs.popover", function () { $("#microphone").attr("src", "./img/mic-on.png"); }); $("#microphone").on("hide.bs.popover", function () { $("#microphone").attr("src", "./img/mic.png"); }); }, setCameraId: function setCameraId(thisDiv) { // cameraId = $(thisDiv).attr("id"); cameraId = thisDiv; }, setMicId: function setMicId(thisDiv) { micId = $(thisDiv).attr("id"); }, addVideoView: function addVideoView(id, videoThis) { var isLocal = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; var div = document.createElement("div"); div.setAttribute("id", id); div.className = "video-box video-container"; div.style.justifyContent = "center"; number = number + 1; document.getElementById("div-video-child").appendChild(div); // div.onclick = ()=>{ // console.log(123); // videoThis.setLayout(id) // } // document.getElementById("video-content").appendChild(div); //设置监听 //切换排版 // div.onclick = () => { // let list = document.querySelectorAll('.video-container'); // let left = document.getElementById('video-left'); // let right = document.getElementById('video-right'); // left.style.display = "block"; // right.style.display = "block"; // for (let i = 0; i < list.length; i++) { // list[i].width = "100%"; // list[i].height = "100%"; // if (list[i] != div) { // document.querySelector('#video-right').appendChild(list[i]); // } // } // document.querySelector('#video-left').appendChild(div) // //chromeM71以下会自动暂停,手动唤醒 // if (getBroswer().broswer == "Chrome" && getBroswer().version < "72") { // rtc.resumeStreams(); // } // }; //拖动事件 // let clientX = 0, clientY = 0, x = 0, y = 0, isDown = false, // offsetLeft = 0, offsetTop = 0 // div.onmousedown = (e) => { // isDown = true // clientX = e.clientX // clientY = e.clientY // offsetLeft = document.getElementById(id).offsetLeft // offsetTop = document.getElementById(id).offsetTop // } // div.onmousemove = (e) => { // if (isDown == false) { // return // } // //获取x坐标和y坐标 // var nx = e.clientX; // var ny = e.clientY; // // //计算移动后的左偏移量和顶部的偏移量 // var nl = nx - (clientX - offsetLeft); // var nt = ny - (clientY - offsetTop); // x = nl; // y = nt; // div.style.top = y + 'px' // div.style.left = x + 'px' // } // div.onmouseup = (e) => { // isDown = false // } }, addMemberView: function addMemberView(id) { var memberElm = document.getElementById("member-me").cloneNode(true); // let memberElm = $("#member-me").clone(); memberElm.setAttribute("id", id); memberElm.getElementsByClassName("member-id")[0].innerHTML = id; // memberElm.find("div.member-id").html(id); memberElm.style.display = "flex"; // memberElm.css("display", "flex"); document.getElementById("member-list").appendChild(memberElm); // memberElm.appendTo($("#member-list")); }, removeView: function removeView(id) { if (document.getElementById(id)) { // document.getElementsByClassName("video-box")[0].style.gridArea = // "1/1/3/4"; document.getElementById(id).remove(); if (document.getElementById('div-video-local').childNodes.length == 0) { var mainVideo = document.getElementById("main-video"); mainVideo.style.height = '25%'; // mainVideo.style.paddingBottom='0'; var right = mainVideo; document.querySelector('#div-video-local').appendChild(right); } } // if ($("#" + id)[0]) { // $("#" + id).remove(); // //将video-grid中第一个div设为main-video // $(".video-box").first().css("grid-area", "1/1/3/4"); // } }, isPC: function isPC() { var userAgentInfo = navigator.userAgent; var Agents = new Array("Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod"); var flag = true; for (var v = 0; v < Agents.length; v++) { if (userAgentInfo.indexOf(Agents[v]) > 0) { flag = false; break; } } return flag; }, getCameraId: function getCameraId() { var _this3 = this; // return cameraId; TRTC.getCameras().then(function (devices) { // devices.forEach(device => { // if (!cameraId) { // return cameraId = device.deviceId; // } // // let div = $('
    '); // // div.attr('id', device.deviceId); // // div.html(device.label); // // div.appendTo('#camera-option'); // }); if (devices.length > 0) { _this3.isCamOn = true; cameraId = devices[0].deviceId; return cameraId; } else { _this3.isCamOn = false; console.error("您的电脑没有摄像头或不允许该浏览器使用"); _message2.default.warning("您的电脑没有摄像头或不允许该浏览器使用"); } }); }, getMicrophoneId: function getMicrophoneId() { var _this4 = this; // return micId; TRTC.getMicrophones().then(function (devices) { console.log(devices); // devices.forEach(device => { // if (!Common.micId) { // Common.micId = device.deviceId; // } // // let div = $('
    '); // // div.attr('id', device.deviceId); // // div.html(device.label); // // div.appendTo('#mic-option'); // }); if (devices.length > 0) { _this4.isMicOn = true; micId = devices[0].deviceId; return micId; } else { _this4.isMicOn = false; console.error("您的电脑没有麦克风或不允许该浏览器使用"); _message2.default.error("您的电脑没有麦克风或不允许该浏览器使用"); } }); }, throttle: function throttle(func, delay) { var timer = null; var startTime = Date.now(); return function () { var curTime = Date.now(); var remaining = delay - (curTime - startTime); var context = this; var args = arguments; clearTimeout(timer); if (remaining <= 0) { func.apply(context, args); startTime = Date.now(); } else { timer = setTimeout(function () { console.log("duplicate click"); }, remaining); } }; }, isHidden: function isHidden() { var hidden, visibilityChange; if (typeof document.hidden !== "undefined") { hidden = "hidden"; visibilityChange = "visibilitychange"; } else if (typeof document.msHidden !== "undefined") { hidden = "msHidden"; visibilityChange = "msvisibilitychange"; } else if (typeof document.webkitHidden !== "undefined") { hidden = "webkitHidden"; visibilityChange = "webkitvisibilitychange"; } return document[hidden]; }, isCamOn: isCamOn, isMicOn: isMicOn, isScreenOn: isScreenOn, isJoined: isJoined, rtc: rtc, share: share, shareUserId: shareUserId, cameraId: cameraId, micId: micId }; function getBroswer() { var sys = {}; var ua = navigator.userAgent.toLowerCase(); var s; (s = ua.match(/edge\/([\d.]+)/)) ? sys.edge = s[1] : (s = ua.match(/rv:([\d.]+)\) like gecko/)) ? sys.ie = s[1] : (s = ua.match(/msie ([\d.]+)/)) ? sys.ie = s[1] : (s = ua.match(/firefox\/([\d.]+)/)) ? sys.firefox = s[1] : (s = ua.match(/chrome\/([\d.]+)/)) ? sys.chrome = s[1] : (s = ua.match(/opera.([\d.]+)/)) ? sys.opera = s[1] : (s = ua.match(/version\/([\d.]+).*safari/)) ? sys.safari = s[1] : 0; if (sys.edge) return { broswer: "Edge", version: sys.edge }; if (sys.ie) return { broswer: "IE", version: sys.ie }; if (sys.firefox) return { broswer: "Firefox", version: sys.firefox }; if (sys.chrome) return { broswer: "Chrome", version: sys.chrome }; if (sys.opera) return { broswer: "Opera", version: sys.opera }; if (sys.safari) return { broswer: "Safari", version: sys.safari }; return { broswer: "", version: "0" }; } function throttle(func, delay) { var timer = null; var startTime = Date.now(); return function () { var curTime = Date.now(); var remaining = delay - (curTime - startTime); var context = this; var args = arguments; clearTimeout(timer); if (remaining <= 0) { func.apply(context, args); startTime = Date.now(); } else { timer = setTimeout(function () { console.log("duplicate click"); }, remaining); } }; } //交换位置 function exchangeView(a, b) { var ep1 = a.parentNode, ep2 = b.parentNode, index1 = Array.prototype.indexOf.call(ep1.children, a), index2 = Array.prototype.indexOf.call(ep2.children, b); ep2.insertBefore(a, ep2.children[index2]); ep1.insertBefore(b, ep1.children[index1]); } return common; } /***/ }), /***/ "pmXr": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__row__ = __webpack_require__("+SmI"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__col__ = __webpack_require__("qIy2"); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_0__row__["a"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_1__col__["a"]; }); /***/ }), /***/ "pmgl": /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _util = __webpack_require__("eCjd"); var util = _interopRequireWildcard(_util); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } /** * Rule for validating a regular expression pattern. * * @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 pattern(rule, value, source, errors, options) { if (rule.pattern) { if (rule.pattern instanceof RegExp) { // if a RegExp instance is passed, reset `lastIndex` in case its `global` // flag is accidentally set to `true`, which in a validation scenario // is not necessary and the result might be misleading rule.pattern.lastIndex = 0; if (!rule.pattern.test(value)) { errors.push(util.format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern)); } } else if (typeof rule.pattern === 'string') { var _pattern = new RegExp(rule.pattern); if (!_pattern.test(value)) { errors.push(util.format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern)); } } } } exports['default'] = pattern; /***/ }), /***/ "pwBK": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; __webpack_require__("/m1I"); var _tooltip = _interopRequireDefault(__webpack_require__("O6j2")); var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); __webpack_require__("rLa/"); var _dva = __webpack_require__("S6G3"); var _dec, _class; /** * 绘制矢量图 */ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } var _CHANGE_STATUS = ['cancel', 'circle', 'rectangle', 'polygon']; var _CHANGE_TIP = ['单选', '圈选', '框选', '多边选择']; var Vectorgraph = exports.default = (_dec = (0, _dva.connect)(function (state) { return { selectedId: state.command.personList.selectedId, mapStyle: state.command.mapStyle }; }), _dec(_class = /*#__PURE__*/function (_Component) { function Vectorgraph(props) { var _this; (0, _classCallCheck2.default)(this, Vectorgraph); _this = _callSuper(this, Vectorgraph, [props]); // 切换 _this._onChangeParent = function (paintValue) { _this.setState({ paintValue: paintValue }); var _thisGIS = _this.props._thisGIS; _this.returnParent(paintValue); }; _this.state = { paintValue: props.paintValue }; return _this; } (0, _inherits2.default)(Vectorgraph, _Component); return (0, _createClass2.default)(Vectorgraph, [{ key: "componentDidMount", value: function componentDidMount() {} }, { key: "componentWillReceiveProps", value: function componentWillReceiveProps(nextPorps) { this.setState({ paintValue: nextPorps.paintValue }); } //把点击的状态值返回给上级 }, { key: "returnParent", value: function returnParent(selectValue) { this.props.changeSelect(selectValue); if (this.props.selectedId) { this.props.dispatch({ type: "command/setPersonSelectIndex", payload: null }); this.props.dispatch({ type: "command/clearInfoWindow", payload: true }); } } }, { key: "_renderPicture", value: function _renderPicture(param) { var paintValue = this.state.paintValue; var mapStyle = this.props.mapStyle; switch (paintValue == param) { case true: return __webpack_require__("Lak1")("./" + param + "-click.png"); case false: if (mapStyle == 'dark') { return __webpack_require__("EMr2")("./" + param + "-white.png"); } else { return __webpack_require__("vkd5")("./" + param + ".png"); } } } }, { key: "render", value: function render() { var _this2 = this; var mapStyle = this.props.mapStyle; var paintValue = this.state.paintValue; return /*#__PURE__*/_react.default.createElement("div", { className: " switch vectorgraph" }, _CHANGE_STATUS.map(function (value, index) { return /*#__PURE__*/_react.default.createElement(_tooltip.default, { title: _CHANGE_TIP[index] }, /*#__PURE__*/_react.default.createElement("div", { className: "layer-btn", onClick: _this2._onChangeParent.bind(_this2, value) }, /*#__PURE__*/_react.default.createElement("img", { className: "layer-img", src: _this2._renderPicture(value) }))); })); } }]); }(_react.Component)) || _class); /***/ }), /***/ "q1aE": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAiCAYAAAC0nUK+AAAAAXNSR0IArs4c6QAABLxJREFUSA2dVl1oHFUUPmdmdtcuyTaZbUJdS6BU1JaSBxNKWzAxiVYLWhR/SqUvBQktSB7UtsmKkIKxWaqivqgNWBH/ixEMGIxJpE0glTZBRGqh0SjV0DXNJu4mm83szlzPmc1s7mw2fz0v9/x+986555w7CCvQvvapmoxlPQ4g6lBACACDAkWM+L9BwQsqKt9+f7JkAJE0BQgL6KChbaoOwGoXIHYVsss6RLgMQj3Z90rpj7KeeRd4qxDKxdOTbSCgmY1lxQo07PTC7ru9ECpVIbABIT4nYHzKhEujBvT9asBEwmJXAsIzD4T15lbErMLW2Sb6cCHwodOxr2h92qMCHKn1w5PVd4BXc+2/4J1djIyAb66k4NyFJKRNRsPOmhb9GWcDgsnSoK/pFAEfK/EjRA4FoG6HD1RleWCOYvvOLR64f6sHhq4bkEqL7TcG5rU/+iP9bLej97VP7s1YMOhRBL51OAA77vKwbV109Z80vPhJHNIWCkpRbV9YH9AYwbQE5xk5FQ5w0hBw/LM4XBvPLLvJfSENzjwXAL8X7TiOP9uf5NJ5jYJqlYcj09VCwIN8eZxjh0bG0isCsx9vzH4OcTzj0A3W1Edu7VIs06Q6Brsq5Mu7tVAFHc+XwD2b7Q90MGyZ9UyOH/Mcz9XFhBl8TKFPaGCBy02myZlsX1y/maGMuYll1jPFZt1WB4e0DQolqIKduI5lis1my5VLrbHeDxv9/Llgryx3Xk7ZcmwmV9a2nMNBqNAARTkfjRtEpqmFID7h50NzcOqpYuD653r+eDAJo9GFk+eBOzgIokwDgbN0AT7uvGDR4gbOyXlDvrSRsf/kvXO87MdKxrGJcPlboyxwS8uU/7myTebz/RwcKvZxhdIyws48K2RKpNwXJdtkfmbe7efgUCuNELjSzc48hHhWOMQ1q6mLaXL08sr2J6oWe4PjGccmFF24/93JwPwM/EmTq5Sr4ODuDXL8uvgvL81xh/JQmdA8wa1Kd1MwTql5k1F4uvGMuB3iOI7PEr7eczx7oaBpwbdp2PzGZfbq+cS6N2BgjuN4SuSIr0h/jzfJJfXRSPxewzToVYHi253n9Cr9q/qwuuel4A0XOAv17bH9aIkumut2u67vJYIk3W99T3jTT4zFlDt5VgSg16jRsqwPHHltK2ZAxQP9zbpdeU5MdmA4Eq29LfpZeq7ekFSrsvQgNeYDc9AScFbW7NFb6HdhiPlVCbGjNxw8V8ivIHhrHWZ8XuUQZW26UJCjowP8UnGn3uTI+WtBcHb67uXSv1DBF/IDHJkqY14Fz8GPjmB29joGaV0WnH36WvRP6XQ/SP6LLGJbTzhwbVGxlFsRnN29mnqMFtfpuOH0bXpkKZxbsyp494mS3+m/sF0OU1Xl6Pln0T1GZYcFfkmdyz5VVVX+dDqtw8bt5ZseeacHUAsKI35x4usDRxVFSXg8ntjw8LAzUORQm3c/nJK5srKyPJVKbTNNs8hMRtG3Za+h+cv3JK5+0Zwav5JgPW1cFgqFzGg0Sq/ZUlo2LdSlm2X3WO+JTmN67MPEzx2jsj7fT7YtC06ffVN2tIzpzETX4fdlHfP5frJ9TTmn0xXTMPPSqhKYSeVprCXn/wNqaPt9PCb4JwAAAABJRU5ErkJggg==" /***/ }), /***/ "qA/u": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); // EXTERNAL MODULE: ./node_modules/react/index.js var react = __webpack_require__("GiK3"); var react_default = /*#__PURE__*/__webpack_require__.n(react); // EXTERNAL MODULE: ./node_modules/react-dom/index.js var react_dom = __webpack_require__("O27J"); var react_dom_default = /*#__PURE__*/__webpack_require__.n(react_dom); // EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/extends.js var helpers_extends = __webpack_require__("Dd8w"); var extends_default = /*#__PURE__*/__webpack_require__.n(helpers_extends); // EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/defineProperty.js var defineProperty = __webpack_require__("bOdI"); var defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty); // EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/objectWithoutProperties.js var objectWithoutProperties = __webpack_require__("+6Bu"); var objectWithoutProperties_default = /*#__PURE__*/__webpack_require__.n(objectWithoutProperties); // EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/classCallCheck.js var classCallCheck = __webpack_require__("Zrlr"); var classCallCheck_default = /*#__PURE__*/__webpack_require__.n(classCallCheck); // EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/createClass.js var createClass = __webpack_require__("wxAW"); var createClass_default = /*#__PURE__*/__webpack_require__.n(createClass); // EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/possibleConstructorReturn.js var possibleConstructorReturn = __webpack_require__("zwoO"); var possibleConstructorReturn_default = /*#__PURE__*/__webpack_require__.n(possibleConstructorReturn); // EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/inherits.js var inherits = __webpack_require__("Pf15"); var inherits_default = /*#__PURE__*/__webpack_require__.n(inherits); // EXTERNAL MODULE: ./node_modules/prop-types/index.js var prop_types = __webpack_require__("KSGD"); var prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types); // EXTERNAL MODULE: ./node_modules/classnames/index.js var classnames = __webpack_require__("HW6M"); var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); // EXTERNAL MODULE: ./node_modules/raf/index.js var raf = __webpack_require__("ommR"); var raf_default = /*#__PURE__*/__webpack_require__.n(raf); // EXTERNAL MODULE: ./node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js var react_lifecycles_compat_es = __webpack_require__("R8mX"); // CONCATENATED MODULE: ./node_modules/rc-tabs/es/KeyCode.js /* harmony default export */ var KeyCode = ({ /** * LEFT */ LEFT: 37, // also NUM_WEST /** * UP */ UP: 38, // also NUM_NORTH /** * RIGHT */ RIGHT: 39, // also NUM_EAST /** * DOWN */ DOWN: 40 // also NUM_SOUTH }); // CONCATENATED MODULE: ./node_modules/rc-tabs/es/utils.js function toArray(children) { // allow [c,[a,b]] var c = []; react_default.a.Children.forEach(children, function (child) { if (child) { c.push(child); } }); return c; } function getActiveIndex(children, activeKey) { var c = toArray(children); for (var i = 0; i < c.length; i++) { if (c[i].key === activeKey) { return i; } } return -1; } function getActiveKey(children, index) { var c = toArray(children); return c[index].key; } function setTransform(style, v) { style.transform = v; style.webkitTransform = v; style.mozTransform = v; } function isTransform3dSupported(style) { return ('transform' in style || 'webkitTransform' in style || 'MozTransform' in style) && window.atob; } function setTransition(style, v) { style.transition = v; style.webkitTransition = v; style.MozTransition = v; } function getTransformPropValue(v) { return { transform: v, WebkitTransform: v, MozTransform: v }; } function utils_isVertical(tabBarPosition) { return tabBarPosition === 'left' || tabBarPosition === 'right'; } function getTransformByIndex(index, tabBarPosition) { var direction = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'ltr'; var translate = utils_isVertical(tabBarPosition) ? 'translateY' : 'translateX'; if (!utils_isVertical(tabBarPosition) && direction === 'rtl') { return translate + '(' + index * 100 + '%) translateZ(0)'; } return translate + '(' + -index * 100 + '%) translateZ(0)'; } function getMarginStyle(index, tabBarPosition) { var marginDirection = utils_isVertical(tabBarPosition) ? 'marginTop' : 'marginLeft'; return defineProperty_default()({}, marginDirection, -index * 100 + '%'); } function getStyle(el, property) { return +window.getComputedStyle(el).getPropertyValue(property).replace('px', ''); } function setPxStyle(el, value, vertical) { value = vertical ? '0px, ' + value + 'px, 0px' : value + 'px, 0px, 0px'; setTransform(el.style, 'translate3d(' + value + ')'); } function getDataAttr(props) { return Object.keys(props).reduce(function (prev, key) { if (key.substr(0, 5) === 'aria-' || key.substr(0, 5) === 'data-' || key === 'role') { prev[key] = props[key]; } return prev; }, {}); } function toNum(style, property) { return +style.getPropertyValue(property).replace('px', ''); } function getTypeValue(start, current, end, tabNode, wrapperNode) { var total = getStyle(wrapperNode, 'padding-' + start); if (!tabNode || !tabNode.parentNode) { return total; } var childNodes = tabNode.parentNode.childNodes; Array.prototype.some.call(childNodes, function (node) { var style = window.getComputedStyle(node); if (node !== tabNode) { total += toNum(style, 'margin-' + start); total += node[current]; total += toNum(style, 'margin-' + end); if (style.boxSizing === 'content-box') { total += toNum(style, 'border-' + start + '-width') + toNum(style, 'border-' + end + '-width'); } return false; } // We need count current node margin // ref: https://github.com/react-component/tabs/pull/139#issuecomment-431005262 total += toNum(style, 'margin-' + start); return true; }); return total; } function getLeft(tabNode, wrapperNode) { return getTypeValue('left', 'offsetWidth', 'right', tabNode, wrapperNode); } function getTop(tabNode, wrapperNode) { return getTypeValue('top', 'offsetHeight', 'bottom', tabNode, wrapperNode); } // EXTERNAL MODULE: ./node_modules/rc-util/es/KeyCode.js var es_KeyCode = __webpack_require__("opmb"); // EXTERNAL MODULE: ./node_modules/@ant-design/create-react-context/lib/index.js var lib = __webpack_require__("83O8"); var lib_default = /*#__PURE__*/__webpack_require__.n(lib); // CONCATENATED MODULE: ./node_modules/rc-tabs/es/Sentinel.js /* eslint-disable jsx-a11y/no-noninteractive-tabindex */ var SentinelContext = lib_default()({}); var SentinelProvider = SentinelContext.Provider; var SentinelConsumer = SentinelContext.Consumer; var sentinelStyle = { width: 0, height: 0, overflow: 'hidden', position: 'absolute' }; var Sentinel_Sentinel = function (_React$Component) { inherits_default()(Sentinel, _React$Component); function Sentinel() { var _ref; var _temp, _this, _ret; classCallCheck_default()(this, Sentinel); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _ret = (_temp = (_this = possibleConstructorReturn_default()(this, (_ref = Sentinel.__proto__ || Object.getPrototypeOf(Sentinel)).call.apply(_ref, [this].concat(args))), _this), _this.onKeyDown = function (_ref2) { var target = _ref2.target, which = _ref2.which, shiftKey = _ref2.shiftKey; var _this$props = _this.props, nextElement = _this$props.nextElement, prevElement = _this$props.prevElement; if (which !== es_KeyCode["a" /* default */].TAB || document.activeElement !== target) return; // Tab next if (!shiftKey && nextElement) { nextElement.focus(); } // Tab prev if (shiftKey && prevElement) { prevElement.focus(); } }, _temp), possibleConstructorReturn_default()(_this, _ret); } createClass_default()(Sentinel, [{ key: 'render', value: function render() { var setRef = this.props.setRef; return react_default.a.createElement('div', { tabIndex: 0, ref: setRef, style: sentinelStyle, onKeyDown: this.onKeyDown, role: 'presentation' }); } }]); return Sentinel; }(react_default.a.Component); Sentinel_Sentinel.propTypes = { setRef: prop_types_default.a.func, prevElement: prop_types_default.a.object, nextElement: prop_types_default.a.object }; /* harmony default export */ var es_Sentinel = (Sentinel_Sentinel); // CONCATENATED MODULE: ./node_modules/rc-tabs/es/TabPane.js var TabPane_TabPane = function (_React$Component) { inherits_default()(TabPane, _React$Component); function TabPane() { classCallCheck_default()(this, TabPane); return possibleConstructorReturn_default()(this, (TabPane.__proto__ || Object.getPrototypeOf(TabPane)).apply(this, arguments)); } createClass_default()(TabPane, [{ key: 'render', value: function render() { var _classnames; var _props = this.props, id = _props.id, className = _props.className, destroyInactiveTabPane = _props.destroyInactiveTabPane, active = _props.active, forceRender = _props.forceRender, rootPrefixCls = _props.rootPrefixCls, style = _props.style, children = _props.children, placeholder = _props.placeholder, restProps = objectWithoutProperties_default()(_props, ['id', 'className', 'destroyInactiveTabPane', 'active', 'forceRender', 'rootPrefixCls', 'style', 'children', 'placeholder']); this._isActived = this._isActived || active; var prefixCls = rootPrefixCls + '-tabpane'; var cls = classnames_default()((_classnames = {}, defineProperty_default()(_classnames, prefixCls, 1), defineProperty_default()(_classnames, prefixCls + '-inactive', !active), defineProperty_default()(_classnames, prefixCls + '-active', active), defineProperty_default()(_classnames, className, className), _classnames)); var isRender = destroyInactiveTabPane ? active : this._isActived; var shouldRender = isRender || forceRender; return react_default.a.createElement( SentinelConsumer, null, function (_ref) { var sentinelStart = _ref.sentinelStart, sentinelEnd = _ref.sentinelEnd, setPanelSentinelStart = _ref.setPanelSentinelStart, setPanelSentinelEnd = _ref.setPanelSentinelEnd; // Create sentinel var panelSentinelStart = void 0; var panelSentinelEnd = void 0; if (active && shouldRender) { panelSentinelStart = react_default.a.createElement(es_Sentinel, { setRef: setPanelSentinelStart, prevElement: sentinelStart }); panelSentinelEnd = react_default.a.createElement(es_Sentinel, { setRef: setPanelSentinelEnd, nextElement: sentinelEnd }); } return react_default.a.createElement( 'div', extends_default()({ style: style, role: 'tabpanel', 'aria-hidden': active ? 'false' : 'true', className: cls, id: id }, getDataAttr(restProps)), panelSentinelStart, shouldRender ? children : placeholder, panelSentinelEnd ); } ); } }]); return TabPane; }(react_default.a.Component); /* harmony default export */ var es_TabPane = (TabPane_TabPane); TabPane_TabPane.propTypes = { className: prop_types_default.a.string, active: prop_types_default.a.bool, style: prop_types_default.a.any, destroyInactiveTabPane: prop_types_default.a.bool, forceRender: prop_types_default.a.bool, placeholder: prop_types_default.a.node, rootPrefixCls: prop_types_default.a.string, children: prop_types_default.a.node, id: prop_types_default.a.string }; TabPane_TabPane.defaultProps = { placeholder: null }; // CONCATENATED MODULE: ./node_modules/rc-tabs/es/Tabs.js function noop() {} function getDefaultActiveKey(props) { var activeKey = void 0; react_default.a.Children.forEach(props.children, function (child) { if (child && !activeKey && !child.props.disabled) { activeKey = child.key; } }); return activeKey; } function activeKeyIsValid(props, key) { var keys = react_default.a.Children.map(props.children, function (child) { return child && child.key; }); return keys.indexOf(key) >= 0; } var Tabs_Tabs = function (_React$Component) { inherits_default()(Tabs, _React$Component); function Tabs(props) { classCallCheck_default()(this, Tabs); var _this = possibleConstructorReturn_default()(this, (Tabs.__proto__ || Object.getPrototypeOf(Tabs)).call(this, props)); Tabs__initialiseProps.call(_this); var activeKey = void 0; if ('activeKey' in props) { activeKey = props.activeKey; } else if ('defaultActiveKey' in props) { activeKey = props.defaultActiveKey; } else { activeKey = getDefaultActiveKey(props); } _this.state = { activeKey: activeKey }; return _this; } createClass_default()(Tabs, [{ key: 'componentWillUnmount', value: function componentWillUnmount() { this.destroy = true; raf_default.a.cancel(this.sentinelId); } // Sentinel for tab index }, { key: 'updateSentinelContext', value: function updateSentinelContext() { var _this2 = this; if (this.destroy) return; raf_default.a.cancel(this.sentinelId); this.sentinelId = raf_default()(function () { if (_this2.destroy) return; _this2.forceUpdate(); }); } }, { key: 'render', value: function render() { var _classnames; var props = this.props; var prefixCls = props.prefixCls, navWrapper = props.navWrapper, tabBarPosition = props.tabBarPosition, className = props.className, renderTabContent = props.renderTabContent, renderTabBar = props.renderTabBar, destroyInactiveTabPane = props.destroyInactiveTabPane, direction = props.direction, restProps = objectWithoutProperties_default()(props, ['prefixCls', 'navWrapper', 'tabBarPosition', 'className', 'renderTabContent', 'renderTabBar', 'destroyInactiveTabPane', 'direction']); var cls = classnames_default()((_classnames = {}, defineProperty_default()(_classnames, prefixCls, 1), defineProperty_default()(_classnames, prefixCls + '-' + tabBarPosition, 1), defineProperty_default()(_classnames, className, !!className), defineProperty_default()(_classnames, prefixCls + '-rtl', direction === 'rtl'), _classnames)); this.tabBar = renderTabBar(); var tabBar = react_default.a.cloneElement(this.tabBar, { prefixCls: prefixCls, navWrapper: navWrapper, key: 'tabBar', onKeyDown: this.onNavKeyDown, tabBarPosition: tabBarPosition, onTabClick: this.onTabClick, panels: props.children, activeKey: this.state.activeKey, direction: this.props.direction }); var tabContent = react_default.a.cloneElement(renderTabContent(), { prefixCls: prefixCls, tabBarPosition: tabBarPosition, activeKey: this.state.activeKey, destroyInactiveTabPane: destroyInactiveTabPane, children: props.children, onChange: this.setActiveKey, key: 'tabContent', direction: this.props.direction }); var sentinelStart = react_default.a.createElement(es_Sentinel, { key: 'sentinelStart', setRef: this.setSentinelStart, nextElement: this.panelSentinelStart }); var sentinelEnd = react_default.a.createElement(es_Sentinel, { key: 'sentinelEnd', setRef: this.setSentinelEnd, prevElement: this.panelSentinelEnd }); var contents = []; if (tabBarPosition === 'bottom') { contents.push(sentinelStart, tabContent, sentinelEnd, tabBar); } else { contents.push(tabBar, sentinelStart, tabContent, sentinelEnd); } return react_default.a.createElement( SentinelProvider, { value: { sentinelStart: this.sentinelStart, sentinelEnd: this.sentinelEnd, setPanelSentinelStart: this.setPanelSentinelStart, setPanelSentinelEnd: this.setPanelSentinelEnd } }, react_default.a.createElement( 'div', extends_default()({ className: cls, style: props.style }, getDataAttr(restProps), { onScroll: this.onScroll }), contents ) ); } }], [{ key: 'getDerivedStateFromProps', value: function getDerivedStateFromProps(props, state) { var newState = {}; if ('activeKey' in props) { newState.activeKey = props.activeKey; } else if (!activeKeyIsValid(props, state.activeKey)) { newState.activeKey = getDefaultActiveKey(props); } if (Object.keys(newState).length > 0) { return newState; } return null; } }]); return Tabs; }(react_default.a.Component); var Tabs__initialiseProps = function _initialiseProps() { var _this3 = this; this.onTabClick = function (activeKey, e) { if (_this3.tabBar.props.onTabClick) { _this3.tabBar.props.onTabClick(activeKey, e); } _this3.setActiveKey(activeKey); }; this.onNavKeyDown = function (e) { var eventKeyCode = e.keyCode; if (eventKeyCode === KeyCode.RIGHT || eventKeyCode === KeyCode.DOWN) { e.preventDefault(); var nextKey = _this3.getNextActiveKey(true); _this3.onTabClick(nextKey); } else if (eventKeyCode === KeyCode.LEFT || eventKeyCode === KeyCode.UP) { e.preventDefault(); var previousKey = _this3.getNextActiveKey(false); _this3.onTabClick(previousKey); } }; this.onScroll = function (_ref) { var target = _ref.target, currentTarget = _ref.currentTarget; if (target === currentTarget && target.scrollLeft > 0) { target.scrollLeft = 0; } }; this.setSentinelStart = function (node) { _this3.sentinelStart = node; }; this.setSentinelEnd = function (node) { _this3.sentinelEnd = node; }; this.setPanelSentinelStart = function (node) { if (node !== _this3.panelSentinelStart) { _this3.updateSentinelContext(); } _this3.panelSentinelStart = node; }; this.setPanelSentinelEnd = function (node) { if (node !== _this3.panelSentinelEnd) { _this3.updateSentinelContext(); } _this3.panelSentinelEnd = node; }; this.setActiveKey = function (activeKey) { if (_this3.state.activeKey !== activeKey) { if (!('activeKey' in _this3.props)) { _this3.setState({ activeKey: activeKey }); } _this3.props.onChange(activeKey); } }; this.getNextActiveKey = function (next) { var activeKey = _this3.state.activeKey; var children = []; react_default.a.Children.forEach(_this3.props.children, function (c) { if (c && !c.props.disabled) { if (next) { children.push(c); } else { children.unshift(c); } } }); var length = children.length; var ret = length && children[0].key; children.forEach(function (child, i) { if (child.key === activeKey) { if (i === length - 1) { ret = children[0].key; } else { ret = children[i + 1].key; } } }); return ret; }; }; Tabs_Tabs.propTypes = { destroyInactiveTabPane: prop_types_default.a.bool, renderTabBar: prop_types_default.a.func.isRequired, renderTabContent: prop_types_default.a.func.isRequired, navWrapper: prop_types_default.a.func, onChange: prop_types_default.a.func, children: prop_types_default.a.node, prefixCls: prop_types_default.a.string, className: prop_types_default.a.string, tabBarPosition: prop_types_default.a.string, style: prop_types_default.a.object, activeKey: prop_types_default.a.string, defaultActiveKey: prop_types_default.a.string, direction: prop_types_default.a.string }; Tabs_Tabs.defaultProps = { prefixCls: 'rc-tabs', destroyInactiveTabPane: false, onChange: noop, navWrapper: function navWrapper(arg) { return arg; }, tabBarPosition: 'top', children: null, style: {}, direction: 'ltr' }; Tabs_Tabs.TabPane = es_TabPane; Object(react_lifecycles_compat_es["polyfill"])(Tabs_Tabs); /* harmony default export */ var es_Tabs = (Tabs_Tabs); // CONCATENATED MODULE: ./node_modules/rc-tabs/es/TabContent.js var TabContent_TabContent = function (_React$Component) { inherits_default()(TabContent, _React$Component); function TabContent() { classCallCheck_default()(this, TabContent); return possibleConstructorReturn_default()(this, (TabContent.__proto__ || Object.getPrototypeOf(TabContent)).apply(this, arguments)); } createClass_default()(TabContent, [{ key: 'getTabPanes', value: function getTabPanes() { var props = this.props; var activeKey = props.activeKey; var children = props.children; var newChildren = []; react_default.a.Children.forEach(children, function (child) { if (!child) { return; } var key = child.key; var active = activeKey === key; newChildren.push(react_default.a.cloneElement(child, { active: active, destroyInactiveTabPane: props.destroyInactiveTabPane, rootPrefixCls: props.prefixCls })); }); return newChildren; } }, { key: 'render', value: function render() { var _classnames; var props = this.props; var prefixCls = props.prefixCls, children = props.children, activeKey = props.activeKey, className = props.className, tabBarPosition = props.tabBarPosition, animated = props.animated, animatedWithMargin = props.animatedWithMargin, direction = props.direction; var style = props.style; var classes = classnames_default()((_classnames = {}, defineProperty_default()(_classnames, prefixCls + '-content', true), defineProperty_default()(_classnames, animated ? prefixCls + '-content-animated' : prefixCls + '-content-no-animated', true), _classnames), className); if (animated) { var activeIndex = getActiveIndex(children, activeKey); if (activeIndex !== -1) { var animatedStyle = animatedWithMargin ? getMarginStyle(activeIndex, tabBarPosition) : getTransformPropValue(getTransformByIndex(activeIndex, tabBarPosition, direction)); style = extends_default()({}, style, animatedStyle); } else { style = extends_default()({}, style, { display: 'none' }); } } return react_default.a.createElement( 'div', { className: classes, style: style }, this.getTabPanes() ); } }]); return TabContent; }(react_default.a.Component); /* harmony default export */ var es_TabContent = (TabContent_TabContent); TabContent_TabContent.propTypes = { animated: prop_types_default.a.bool, animatedWithMargin: prop_types_default.a.bool, prefixCls: prop_types_default.a.string, children: prop_types_default.a.node, activeKey: prop_types_default.a.string, style: prop_types_default.a.any, tabBarPosition: prop_types_default.a.string, className: prop_types_default.a.string, destroyInactiveTabPane: prop_types_default.a.bool, direction: prop_types_default.a.string }; TabContent_TabContent.defaultProps = { animated: true }; // CONCATENATED MODULE: ./node_modules/rc-tabs/es/index.js /* harmony default export */ var es = (es_Tabs); // EXTERNAL MODULE: ./node_modules/antd/node_modules/classnames/index.js var node_modules_classnames = __webpack_require__("kTQ8"); var node_modules_classnames_default = /*#__PURE__*/__webpack_require__.n(node_modules_classnames); // EXTERNAL MODULE: ./node_modules/omit.js/es/index.js var omit_js_es = __webpack_require__("JkBm"); // CONCATENATED MODULE: ./node_modules/rc-tabs/es/InkTabBarNode.js function _componentDidUpdate(component, init) { var _component$props = component.props, styles = _component$props.styles, panels = _component$props.panels, activeKey = _component$props.activeKey, direction = _component$props.direction; var rootNode = component.props.getRef('root'); var wrapNode = component.props.getRef('nav') || rootNode; var inkBarNode = component.props.getRef('inkBar'); var activeTab = component.props.getRef('activeTab'); var inkBarNodeStyle = inkBarNode.style; var tabBarPosition = component.props.tabBarPosition; var activeIndex = getActiveIndex(panels, activeKey); if (init) { // prevent mount animation inkBarNodeStyle.display = 'none'; } if (activeTab) { var tabNode = activeTab; var transformSupported = isTransform3dSupported(inkBarNodeStyle); // Reset current style setTransform(inkBarNodeStyle, ''); inkBarNodeStyle.width = ''; inkBarNodeStyle.height = ''; inkBarNodeStyle.left = ''; inkBarNodeStyle.top = ''; inkBarNodeStyle.bottom = ''; inkBarNodeStyle.right = ''; if (tabBarPosition === 'top' || tabBarPosition === 'bottom') { var left = getLeft(tabNode, wrapNode); var width = tabNode.offsetWidth; // If tabNode'width width equal to wrapNode'width when tabBarPosition is top or bottom // It means no css working, then ink bar should not have width until css is loaded // Fix https://github.com/ant-design/ant-design/issues/7564 if (width === rootNode.offsetWidth) { width = 0; } else if (styles.inkBar && styles.inkBar.width !== undefined) { width = parseFloat(styles.inkBar.width, 10); if (width) { left += (tabNode.offsetWidth - width) / 2; } } if (direction === 'rtl') { left = getStyle(tabNode, 'margin-left') - left; } // use 3d gpu to optimize render if (transformSupported) { setTransform(inkBarNodeStyle, 'translate3d(' + left + 'px,0,0)'); } else { inkBarNodeStyle.left = left + 'px'; } inkBarNodeStyle.width = width + 'px'; } else { var top = getTop(tabNode, wrapNode, true); var height = tabNode.offsetHeight; if (styles.inkBar && styles.inkBar.height !== undefined) { height = parseFloat(styles.inkBar.height, 10); if (height) { top += (tabNode.offsetHeight - height) / 2; } } if (transformSupported) { setTransform(inkBarNodeStyle, 'translate3d(0,' + top + 'px,0)'); inkBarNodeStyle.top = '0'; } else { inkBarNodeStyle.top = top + 'px'; } inkBarNodeStyle.height = height + 'px'; } } inkBarNodeStyle.display = activeIndex !== -1 ? 'block' : 'none'; } var InkTabBarNode_InkTabBarNode = function (_React$Component) { inherits_default()(InkTabBarNode, _React$Component); function InkTabBarNode() { classCallCheck_default()(this, InkTabBarNode); return possibleConstructorReturn_default()(this, (InkTabBarNode.__proto__ || Object.getPrototypeOf(InkTabBarNode)).apply(this, arguments)); } createClass_default()(InkTabBarNode, [{ key: 'componentDidMount', value: function componentDidMount() { var _this2 = this; // ref https://github.com/ant-design/ant-design/issues/8678 // ref https://github.com/react-component/tabs/issues/135 // InkTabBarNode need parent/root ref for calculating position // since parent componentDidMount triggered after child componentDidMount // we're doing a quick fix here to use setTimeout to calculate position // after parent/root component mounted this.timeout = setTimeout(function () { _componentDidUpdate(_this2, true); }, 0); } }, { key: 'componentDidUpdate', value: function componentDidUpdate() { _componentDidUpdate(this); } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { clearTimeout(this.timeout); } }, { key: 'render', value: function render() { var _classnames; var _props = this.props, prefixCls = _props.prefixCls, styles = _props.styles, inkBarAnimated = _props.inkBarAnimated; var className = prefixCls + '-ink-bar'; var classes = classnames_default()((_classnames = {}, defineProperty_default()(_classnames, className, true), defineProperty_default()(_classnames, inkBarAnimated ? className + '-animated' : className + '-no-animated', true), _classnames)); return react_default.a.createElement('div', { style: styles.inkBar, className: classes, key: 'inkBar', ref: this.props.saveRef('inkBar') }); } }]); return InkTabBarNode; }(react_default.a.Component); /* harmony default export */ var es_InkTabBarNode = (InkTabBarNode_InkTabBarNode); InkTabBarNode_InkTabBarNode.propTypes = { prefixCls: prop_types_default.a.string, styles: prop_types_default.a.object, inkBarAnimated: prop_types_default.a.bool, saveRef: prop_types_default.a.func, direction: prop_types_default.a.string }; InkTabBarNode_InkTabBarNode.defaultProps = { prefixCls: '', inkBarAnimated: true, styles: {}, saveRef: function saveRef() {} }; // EXTERNAL MODULE: ./node_modules/warning/warning.js var warning = __webpack_require__("Trj0"); var warning_default = /*#__PURE__*/__webpack_require__.n(warning); // CONCATENATED MODULE: ./node_modules/rc-tabs/es/TabBarTabsNode.js var TabBarTabsNode_TabBarTabsNode = function (_React$Component) { inherits_default()(TabBarTabsNode, _React$Component); function TabBarTabsNode() { classCallCheck_default()(this, TabBarTabsNode); return possibleConstructorReturn_default()(this, (TabBarTabsNode.__proto__ || Object.getPrototypeOf(TabBarTabsNode)).apply(this, arguments)); } createClass_default()(TabBarTabsNode, [{ key: 'render', value: function render() { var _this2 = this; var _props = this.props, children = _props.panels, activeKey = _props.activeKey, prefixCls = _props.prefixCls, tabBarGutter = _props.tabBarGutter, saveRef = _props.saveRef, tabBarPosition = _props.tabBarPosition, renderTabBarNode = _props.renderTabBarNode, direction = _props.direction; var rst = []; react_default.a.Children.forEach(children, function (child, index) { if (!child) { return; } var key = child.key; var cls = activeKey === key ? prefixCls + '-tab-active' : ''; cls += ' ' + prefixCls + '-tab'; var events = {}; if (child.props.disabled) { cls += ' ' + prefixCls + '-tab-disabled'; } else { events = { onClick: _this2.props.onTabClick.bind(_this2, key) }; } var ref = {}; if (activeKey === key) { ref.ref = saveRef('activeTab'); } var gutter = tabBarGutter && index === children.length - 1 ? 0 : tabBarGutter; var marginProperty = direction === 'rtl' ? 'marginLeft' : 'marginRight'; var style = defineProperty_default()({}, utils_isVertical(tabBarPosition) ? 'marginBottom' : marginProperty, gutter); warning_default()('tab' in child.props, 'There must be `tab` property on children of Tabs.'); var node = react_default.a.createElement( 'div', extends_default()({ role: 'tab', 'aria-disabled': child.props.disabled ? 'true' : 'false', 'aria-selected': activeKey === key ? 'true' : 'false' }, events, { className: cls, key: key, style: style }, ref), child.props.tab ); if (renderTabBarNode) { node = renderTabBarNode(node); } rst.push(node); }); return react_default.a.createElement( 'div', { ref: saveRef('navTabsContainer') }, rst ); } }]); return TabBarTabsNode; }(react_default.a.Component); /* harmony default export */ var es_TabBarTabsNode = (TabBarTabsNode_TabBarTabsNode); TabBarTabsNode_TabBarTabsNode.propTypes = { activeKey: prop_types_default.a.string, panels: prop_types_default.a.node, prefixCls: prop_types_default.a.string, tabBarGutter: prop_types_default.a.number, onTabClick: prop_types_default.a.func, saveRef: prop_types_default.a.func, renderTabBarNode: prop_types_default.a.func, tabBarPosition: prop_types_default.a.string, direction: prop_types_default.a.string }; TabBarTabsNode_TabBarTabsNode.defaultProps = { panels: [], prefixCls: [], tabBarGutter: null, onTabClick: function onTabClick() {}, saveRef: function saveRef() {} }; // CONCATENATED MODULE: ./node_modules/rc-tabs/es/TabBarRootNode.js var TabBarRootNode_TabBarRootNode = function (_React$Component) { inherits_default()(TabBarRootNode, _React$Component); function TabBarRootNode() { classCallCheck_default()(this, TabBarRootNode); return possibleConstructorReturn_default()(this, (TabBarRootNode.__proto__ || Object.getPrototypeOf(TabBarRootNode)).apply(this, arguments)); } createClass_default()(TabBarRootNode, [{ key: 'render', value: function render() { var _props = this.props, prefixCls = _props.prefixCls, onKeyDown = _props.onKeyDown, className = _props.className, extraContent = _props.extraContent, style = _props.style, tabBarPosition = _props.tabBarPosition, children = _props.children, restProps = objectWithoutProperties_default()(_props, ['prefixCls', 'onKeyDown', 'className', 'extraContent', 'style', 'tabBarPosition', 'children']); var cls = classnames_default()(prefixCls + '-bar', defineProperty_default()({}, className, !!className)); var topOrBottom = tabBarPosition === 'top' || tabBarPosition === 'bottom'; var tabBarExtraContentStyle = topOrBottom ? { float: 'right' } : {}; var extraContentStyle = extraContent && extraContent.props ? extraContent.props.style : {}; var newChildren = children; if (extraContent) { newChildren = [Object(react["cloneElement"])(extraContent, { key: 'extra', style: extends_default()({}, tabBarExtraContentStyle, extraContentStyle) }), Object(react["cloneElement"])(children, { key: 'content' })]; newChildren = topOrBottom ? newChildren : newChildren.reverse(); } return react_default.a.createElement( 'div', extends_default()({ role: 'tablist', className: cls, tabIndex: '0', ref: this.props.saveRef('root'), onKeyDown: onKeyDown, style: style }, getDataAttr(restProps)), newChildren ); } }]); return TabBarRootNode; }(react_default.a.Component); /* harmony default export */ var es_TabBarRootNode = (TabBarRootNode_TabBarRootNode); TabBarRootNode_TabBarRootNode.propTypes = { prefixCls: prop_types_default.a.string, className: prop_types_default.a.string, style: prop_types_default.a.object, tabBarPosition: prop_types_default.a.oneOf(['left', 'right', 'top', 'bottom']), children: prop_types_default.a.node, extraContent: prop_types_default.a.node, onKeyDown: prop_types_default.a.func, saveRef: prop_types_default.a.func }; TabBarRootNode_TabBarRootNode.defaultProps = { prefixCls: '', className: '', style: {}, tabBarPosition: 'top', extraContent: null, children: null, onKeyDown: function onKeyDown() {}, saveRef: function saveRef() {} }; // EXTERNAL MODULE: ./node_modules/lodash/debounce.js var debounce = __webpack_require__("O4Lo"); var debounce_default = /*#__PURE__*/__webpack_require__.n(debounce); // EXTERNAL MODULE: ./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js var ResizeObserver_es = __webpack_require__("z+gd"); // CONCATENATED MODULE: ./node_modules/rc-tabs/es/ScrollableTabBarNode.js var ScrollableTabBarNode_ScrollableTabBarNode = function (_React$Component) { inherits_default()(ScrollableTabBarNode, _React$Component); function ScrollableTabBarNode(props) { classCallCheck_default()(this, ScrollableTabBarNode); var _this = possibleConstructorReturn_default()(this, (ScrollableTabBarNode.__proto__ || Object.getPrototypeOf(ScrollableTabBarNode)).call(this, props)); _this.prevTransitionEnd = function (e) { if (e.propertyName !== 'opacity') { return; } var container = _this.props.getRef('container'); _this.scrollToActiveTab({ target: container, currentTarget: container }); }; _this.scrollToActiveTab = function (e) { var activeTab = _this.props.getRef('activeTab'); var navWrap = _this.props.getRef('navWrap'); if (e && e.target !== e.currentTarget || !activeTab) { return; } // when not scrollable or enter scrollable first time, don't emit scrolling var needToSroll = _this.isNextPrevShown() && _this.lastNextPrevShown; _this.lastNextPrevShown = _this.isNextPrevShown(); if (!needToSroll) { return; } var activeTabWH = _this.getScrollWH(activeTab); var navWrapNodeWH = _this.getOffsetWH(navWrap); var offset = _this.offset; var wrapOffset = _this.getOffsetLT(navWrap); var activeTabOffset = _this.getOffsetLT(activeTab); if (wrapOffset > activeTabOffset) { offset += wrapOffset - activeTabOffset; _this.setOffset(offset); } else if (wrapOffset + navWrapNodeWH < activeTabOffset + activeTabWH) { offset -= activeTabOffset + activeTabWH - (wrapOffset + navWrapNodeWH); _this.setOffset(offset); } }; _this.prev = function (e) { _this.props.onPrevClick(e); var navWrapNode = _this.props.getRef('navWrap'); var navWrapNodeWH = _this.getOffsetWH(navWrapNode); var offset = _this.offset; _this.setOffset(offset + navWrapNodeWH); }; _this.next = function (e) { _this.props.onNextClick(e); var navWrapNode = _this.props.getRef('navWrap'); var navWrapNodeWH = _this.getOffsetWH(navWrapNode); var offset = _this.offset; _this.setOffset(offset - navWrapNodeWH); }; _this.offset = 0; _this.state = { next: false, prev: false }; return _this; } createClass_default()(ScrollableTabBarNode, [{ key: 'componentDidMount', value: function componentDidMount() { var _this2 = this; this.componentDidUpdate(); this.debouncedResize = debounce_default()(function () { _this2.setNextPrev(); _this2.scrollToActiveTab(); }, 200); this.resizeObserver = new ResizeObserver_es["default"](this.debouncedResize); this.resizeObserver.observe(this.props.getRef('container')); } }, { key: 'componentDidUpdate', value: function componentDidUpdate(prevProps) { var props = this.props; if (prevProps && prevProps.tabBarPosition !== props.tabBarPosition) { this.setOffset(0); return; } var nextPrev = this.setNextPrev(); // wait next, prev show hide /* eslint react/no-did-update-set-state:0 */ if (this.isNextPrevShown(this.state) !== this.isNextPrevShown(nextPrev)) { this.setState({}, this.scrollToActiveTab); } else if (!prevProps || props.activeKey !== prevProps.activeKey) { // can not use props.activeKey this.scrollToActiveTab(); } } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { if (this.resizeObserver) { this.resizeObserver.disconnect(); } if (this.debouncedResize && this.debouncedResize.cancel) { this.debouncedResize.cancel(); } } }, { key: 'setNextPrev', value: function setNextPrev() { var navNode = this.props.getRef('nav'); var navTabsContainer = this.props.getRef('navTabsContainer'); var navNodeWH = this.getScrollWH(navTabsContainer || navNode); // Add 1px to fix `offsetWidth` with decimal in Chrome not correct handle // https://github.com/ant-design/ant-design/issues/13423 var containerWH = this.getOffsetWH(this.props.getRef('container')) + 1; var navWrapNodeWH = this.getOffsetWH(this.props.getRef('navWrap')); var offset = this.offset; var minOffset = containerWH - navNodeWH; var _state = this.state, next = _state.next, prev = _state.prev; if (minOffset >= 0) { next = false; this.setOffset(0, false); offset = 0; } else if (minOffset < offset) { next = true; } else { next = false; // Fix https://github.com/ant-design/ant-design/issues/8861 // Test with container offset which is stable // and set the offset of the nav wrap node var realOffset = navWrapNodeWH - navNodeWH; this.setOffset(realOffset, false); offset = realOffset; } if (offset < 0) { prev = true; } else { prev = false; } this.setNext(next); this.setPrev(prev); return { next: next, prev: prev }; } }, { key: 'getOffsetWH', value: function getOffsetWH(node) { var tabBarPosition = this.props.tabBarPosition; var prop = 'offsetWidth'; if (tabBarPosition === 'left' || tabBarPosition === 'right') { prop = 'offsetHeight'; } return node[prop]; } }, { key: 'getScrollWH', value: function getScrollWH(node) { var tabBarPosition = this.props.tabBarPosition; var prop = 'scrollWidth'; if (tabBarPosition === 'left' || tabBarPosition === 'right') { prop = 'scrollHeight'; } return node[prop]; } }, { key: 'getOffsetLT', value: function getOffsetLT(node) { var tabBarPosition = this.props.tabBarPosition; var prop = 'left'; if (tabBarPosition === 'left' || tabBarPosition === 'right') { prop = 'top'; } return node.getBoundingClientRect()[prop]; } }, { key: 'setOffset', value: function setOffset(offset) { var checkNextPrev = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; var target = Math.min(0, offset); if (this.offset !== target) { this.offset = target; var navOffset = {}; var tabBarPosition = this.props.tabBarPosition; var navStyle = this.props.getRef('nav').style; var transformSupported = isTransform3dSupported(navStyle); if (tabBarPosition === 'left' || tabBarPosition === 'right') { if (transformSupported) { navOffset = { value: 'translate3d(0,' + target + 'px,0)' }; } else { navOffset = { name: 'top', value: target + 'px' }; } } else if (transformSupported) { if (this.props.direction === 'rtl') { target = -target; } navOffset = { value: 'translate3d(' + target + 'px,0,0)' }; } else { navOffset = { name: 'left', value: target + 'px' }; } if (transformSupported) { setTransform(navStyle, navOffset.value); } else { navStyle[navOffset.name] = navOffset.value; } if (checkNextPrev) { this.setNextPrev(); } } } }, { key: 'setPrev', value: function setPrev(v) { if (this.state.prev !== v) { this.setState({ prev: v }); } } }, { key: 'setNext', value: function setNext(v) { if (this.state.next !== v) { this.setState({ next: v }); } } }, { key: 'isNextPrevShown', value: function isNextPrevShown(state) { if (state) { return state.next || state.prev; } return this.state.next || this.state.prev; } }, { key: 'render', value: function render() { var _classnames, _classnames2, _classnames3, _classnames4; var _state2 = this.state, next = _state2.next, prev = _state2.prev; var _props = this.props, prefixCls = _props.prefixCls, scrollAnimated = _props.scrollAnimated, navWrapper = _props.navWrapper, prevIcon = _props.prevIcon, nextIcon = _props.nextIcon; var showNextPrev = prev || next; var prevButton = react_default.a.createElement( 'span', { onClick: prev ? this.prev : null, unselectable: 'unselectable', className: classnames_default()((_classnames = {}, defineProperty_default()(_classnames, prefixCls + '-tab-prev', 1), defineProperty_default()(_classnames, prefixCls + '-tab-btn-disabled', !prev), defineProperty_default()(_classnames, prefixCls + '-tab-arrow-show', showNextPrev), _classnames)), onTransitionEnd: this.prevTransitionEnd }, prevIcon || react_default.a.createElement('span', { className: prefixCls + '-tab-prev-icon' }) ); var nextButton = react_default.a.createElement( 'span', { onClick: next ? this.next : null, unselectable: 'unselectable', className: classnames_default()((_classnames2 = {}, defineProperty_default()(_classnames2, prefixCls + '-tab-next', 1), defineProperty_default()(_classnames2, prefixCls + '-tab-btn-disabled', !next), defineProperty_default()(_classnames2, prefixCls + '-tab-arrow-show', showNextPrev), _classnames2)) }, nextIcon || react_default.a.createElement('span', { className: prefixCls + '-tab-next-icon' }) ); var navClassName = prefixCls + '-nav'; var navClasses = classnames_default()((_classnames3 = {}, defineProperty_default()(_classnames3, navClassName, true), defineProperty_default()(_classnames3, scrollAnimated ? navClassName + '-animated' : navClassName + '-no-animated', true), _classnames3)); return react_default.a.createElement( 'div', { className: classnames_default()((_classnames4 = {}, defineProperty_default()(_classnames4, prefixCls + '-nav-container', 1), defineProperty_default()(_classnames4, prefixCls + '-nav-container-scrolling', showNextPrev), _classnames4)), key: 'container', ref: this.props.saveRef('container') }, prevButton, nextButton, react_default.a.createElement( 'div', { className: prefixCls + '-nav-wrap', ref: this.props.saveRef('navWrap') }, react_default.a.createElement( 'div', { className: prefixCls + '-nav-scroll' }, react_default.a.createElement( 'div', { className: navClasses, ref: this.props.saveRef('nav') }, navWrapper(this.props.children) ) ) ) ); } }]); return ScrollableTabBarNode; }(react_default.a.Component); /* harmony default export */ var es_ScrollableTabBarNode = (ScrollableTabBarNode_ScrollableTabBarNode); ScrollableTabBarNode_ScrollableTabBarNode.propTypes = { activeKey: prop_types_default.a.string, getRef: prop_types_default.a.func.isRequired, saveRef: prop_types_default.a.func.isRequired, tabBarPosition: prop_types_default.a.oneOf(['left', 'right', 'top', 'bottom']), prefixCls: prop_types_default.a.string, scrollAnimated: prop_types_default.a.bool, onPrevClick: prop_types_default.a.func, onNextClick: prop_types_default.a.func, navWrapper: prop_types_default.a.func, children: prop_types_default.a.node, prevIcon: prop_types_default.a.node, nextIcon: prop_types_default.a.node, direction: prop_types_default.a.node }; ScrollableTabBarNode_ScrollableTabBarNode.defaultProps = { tabBarPosition: 'left', prefixCls: '', scrollAnimated: true, onPrevClick: function onPrevClick() {}, onNextClick: function onNextClick() {}, navWrapper: function navWrapper(ele) { return ele; } }; // CONCATENATED MODULE: ./node_modules/rc-tabs/es/SaveRef.js var SaveRef_SaveRef = function (_React$Component) { inherits_default()(SaveRef, _React$Component); function SaveRef() { var _ref; var _temp, _this, _ret; classCallCheck_default()(this, SaveRef); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _ret = (_temp = (_this = possibleConstructorReturn_default()(this, (_ref = SaveRef.__proto__ || Object.getPrototypeOf(SaveRef)).call.apply(_ref, [this].concat(args))), _this), _this.getRef = function (name) { return _this[name]; }, _this.saveRef = function (name) { return function (node) { if (node) { _this[name] = node; } }; }, _temp), possibleConstructorReturn_default()(_this, _ret); } createClass_default()(SaveRef, [{ key: 'render', value: function render() { return this.props.children(this.saveRef, this.getRef); } }]); return SaveRef; }(react_default.a.Component); /* harmony default export */ var es_SaveRef = (SaveRef_SaveRef); SaveRef_SaveRef.propTypes = { children: prop_types_default.a.func }; SaveRef_SaveRef.defaultProps = { children: function children() { return null; } }; // CONCATENATED MODULE: ./node_modules/rc-tabs/es/ScrollableInkTabBar.js /* eslint-disable react/prefer-stateless-function */ var ScrollableInkTabBar_ScrollableInkTabBar = function (_React$Component) { inherits_default()(ScrollableInkTabBar, _React$Component); function ScrollableInkTabBar() { classCallCheck_default()(this, ScrollableInkTabBar); return possibleConstructorReturn_default()(this, (ScrollableInkTabBar.__proto__ || Object.getPrototypeOf(ScrollableInkTabBar)).apply(this, arguments)); } createClass_default()(ScrollableInkTabBar, [{ key: 'render', value: function render() { var _props = this.props, renderTabBarNode = _props.children, restProps = objectWithoutProperties_default()(_props, ['children']); return react_default.a.createElement( es_SaveRef, null, function (saveRef, getRef) { return react_default.a.createElement( es_TabBarRootNode, extends_default()({ saveRef: saveRef }, restProps), react_default.a.createElement( es_ScrollableTabBarNode, extends_default()({ saveRef: saveRef, getRef: getRef }, restProps), react_default.a.createElement(es_TabBarTabsNode, extends_default()({ saveRef: saveRef, renderTabBarNode: renderTabBarNode }, restProps)), react_default.a.createElement(es_InkTabBarNode, extends_default()({ saveRef: saveRef, getRef: getRef }, restProps)) ) ); } ); } }]); return ScrollableInkTabBar; }(react_default.a.Component); /* harmony default export */ var es_ScrollableInkTabBar = (ScrollableInkTabBar_ScrollableInkTabBar); ScrollableInkTabBar_ScrollableInkTabBar.propTypes = { children: prop_types_default.a.func }; // EXTERNAL MODULE: ./node_modules/antd/es/icon/index.js + 5 modules var icon = __webpack_require__("FC3+"); // CONCATENATED MODULE: ./node_modules/antd/es/tabs/TabBar.js function _extends() { _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; }; return _extends.apply(this, arguments); } 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; } function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } var TabBar_TabBar = /*#__PURE__*/function (_React$Component) { _inherits(TabBar, _React$Component); var _super = _createSuper(TabBar); function TabBar() { _classCallCheck(this, TabBar); return _super.apply(this, arguments); } _createClass(TabBar, [{ key: "render", value: function render() { var _classNames; var _this$props = this.props, tabBarStyle = _this$props.tabBarStyle, animated = _this$props.animated, renderTabBar = _this$props.renderTabBar, tabBarExtraContent = _this$props.tabBarExtraContent, tabPosition = _this$props.tabPosition, prefixCls = _this$props.prefixCls, className = _this$props.className, size = _this$props.size, type = _this$props.type; var inkBarAnimated = _typeof(animated) === 'object' ? animated.inkBar : animated; var isVertical = tabPosition === 'left' || tabPosition === 'right'; var prevIconType = isVertical ? 'up' : 'left'; var nextIconType = isVertical ? 'down' : 'right'; var prevIcon = /*#__PURE__*/react["createElement"]("span", { className: "".concat(prefixCls, "-tab-prev-icon") }, /*#__PURE__*/react["createElement"](icon["default"], { type: prevIconType, className: "".concat(prefixCls, "-tab-prev-icon-target") })); var nextIcon = /*#__PURE__*/react["createElement"]("span", { className: "".concat(prefixCls, "-tab-next-icon") }, /*#__PURE__*/react["createElement"](icon["default"], { type: nextIconType, className: "".concat(prefixCls, "-tab-next-icon-target") })); // Additional className for style usage var cls = node_modules_classnames_default()("".concat(prefixCls, "-").concat(tabPosition, "-bar"), (_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-").concat(size, "-bar"), !!size), _defineProperty(_classNames, "".concat(prefixCls, "-card-bar"), type && type.indexOf('card') >= 0), _classNames), className); var renderProps = _extends(_extends({}, this.props), { children: null, inkBarAnimated: inkBarAnimated, extraContent: tabBarExtraContent, style: tabBarStyle, prevIcon: prevIcon, nextIcon: nextIcon, className: cls }); var RenderTabBar; if (renderTabBar) { RenderTabBar = renderTabBar(renderProps, es_ScrollableInkTabBar); } else { RenderTabBar = /*#__PURE__*/react["createElement"](es_ScrollableInkTabBar, renderProps); } return /*#__PURE__*/react["cloneElement"](RenderTabBar); } }]); return TabBar; }(react["Component"]); TabBar_TabBar.defaultProps = { animated: true, type: 'line' }; // EXTERNAL MODULE: ./node_modules/antd/es/config-provider/index.js + 1 modules var config_provider = __webpack_require__("PmSq"); // EXTERNAL MODULE: ./node_modules/antd/es/_util/warning.js var _util_warning = __webpack_require__("qGip"); // CONCATENATED MODULE: ./node_modules/antd/es/_util/styleChecker.js var isStyleSupport = function isStyleSupport(styleName) { if (typeof window !== 'undefined' && window.document && window.document.documentElement) { var styleNameList = Array.isArray(styleName) ? styleName : [styleName]; var documentElement = window.document.documentElement; return styleNameList.some(function (name) { return name in documentElement.style; }); } return false; }; var isFlexSupported = isStyleSupport(['flex', 'webkitFlex', 'Flex', 'msFlex']); /* harmony default export */ var styleChecker = (isStyleSupport); // CONCATENATED MODULE: ./node_modules/antd/es/tabs/index.js /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return tabs_Tabs; }); function tabs__extends() { tabs__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; }; return tabs__extends.apply(this, arguments); } function tabs__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; } function tabs__typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { tabs__typeof = function _typeof(obj) { return typeof obj; }; } else { tabs__typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return tabs__typeof(obj); } function tabs__classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function tabs__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); } } function tabs__createClass(Constructor, protoProps, staticProps) { if (protoProps) tabs__defineProperties(Constructor.prototype, protoProps); if (staticProps) tabs__defineProperties(Constructor, staticProps); return Constructor; } function tabs__inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) tabs__setPrototypeOf(subClass, superClass); } function tabs__setPrototypeOf(o, p) { tabs__setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return tabs__setPrototypeOf(o, p); } function tabs__createSuper(Derived) { var hasNativeReflectConstruct = tabs__isNativeReflectConstruct(); return function _createSuperInternal() { var Super = tabs__getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = tabs__getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return tabs__possibleConstructorReturn(this, result); }; } function tabs__possibleConstructorReturn(self, call) { if (call && (tabs__typeof(call) === "object" || typeof call === "function")) { return call; } return tabs__assertThisInitialized(self); } function tabs__assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function tabs__isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } function tabs__getPrototypeOf(o) { tabs__getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return tabs__getPrototypeOf(o); } var __rest = this && this.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var tabs_Tabs = /*#__PURE__*/function (_React$Component) { tabs__inherits(Tabs, _React$Component); var _super = tabs__createSuper(Tabs); function Tabs() { var _this; tabs__classCallCheck(this, Tabs); _this = _super.apply(this, arguments); _this.removeTab = function (targetKey, e) { e.stopPropagation(); if (!targetKey) { return; } var onEdit = _this.props.onEdit; if (onEdit) { onEdit(targetKey, 'remove'); } }; _this.handleChange = function (activeKey) { var onChange = _this.props.onChange; if (onChange) { onChange(activeKey); } }; _this.createNewTab = function (targetKey) { var onEdit = _this.props.onEdit; if (onEdit) { onEdit(targetKey, 'add'); } }; _this.renderTabs = function (_ref) { var _classNames; var getPrefixCls = _ref.getPrefixCls; var _this$props = _this.props, customizePrefixCls = _this$props.prefixCls, _this$props$className = _this$props.className, className = _this$props$className === void 0 ? '' : _this$props$className, size = _this$props.size, _this$props$type = _this$props.type, type = _this$props$type === void 0 ? 'line' : _this$props$type, tabPosition = _this$props.tabPosition, children = _this$props.children, _this$props$animated = _this$props.animated, animated = _this$props$animated === void 0 ? true : _this$props$animated, hideAdd = _this$props.hideAdd; var tabBarExtraContent = _this.props.tabBarExtraContent; var tabPaneAnimated = tabs__typeof(animated) === 'object' ? animated.tabPane : animated; // card tabs should not have animation if (type !== 'line') { tabPaneAnimated = 'animated' in _this.props ? tabPaneAnimated : false; } Object(_util_warning["a" /* default */])(!(type.indexOf('card') >= 0 && (size === 'small' || size === 'large')), 'Tabs', "`type=card|editable-card` doesn't have small or large size, it's by design."); var prefixCls = getPrefixCls('tabs', customizePrefixCls); var cls = node_modules_classnames_default()(className, (_classNames = {}, tabs__defineProperty(_classNames, "".concat(prefixCls, "-vertical"), tabPosition === 'left' || tabPosition === 'right'), tabs__defineProperty(_classNames, "".concat(prefixCls, "-").concat(size), !!size), tabs__defineProperty(_classNames, "".concat(prefixCls, "-card"), type.indexOf('card') >= 0), tabs__defineProperty(_classNames, "".concat(prefixCls, "-").concat(type), true), tabs__defineProperty(_classNames, "".concat(prefixCls, "-no-animation"), !tabPaneAnimated), _classNames)); // only card type tabs can be added and closed var childrenWithClose = []; if (type === 'editable-card') { childrenWithClose = []; react["Children"].forEach(children, function (child, index) { if (! /*#__PURE__*/react["isValidElement"](child)) return child; var closable = child.props.closable; closable = typeof closable === 'undefined' ? true : closable; var closeIcon = closable ? /*#__PURE__*/react["createElement"](icon["default"], { type: "close", className: "".concat(prefixCls, "-close-x"), onClick: function onClick(e) { return _this.removeTab(child.key, e); } }) : null; childrenWithClose.push( /*#__PURE__*/react["cloneElement"](child, { tab: /*#__PURE__*/react["createElement"]("div", { className: closable ? undefined : "".concat(prefixCls, "-tab-unclosable") }, child.props.tab, closeIcon), key: child.key || index })); }); // Add new tab handler if (!hideAdd) { tabBarExtraContent = /*#__PURE__*/react["createElement"]("span", null, /*#__PURE__*/react["createElement"](icon["default"], { type: "plus", className: "".concat(prefixCls, "-new-tab"), onClick: _this.createNewTab }), tabBarExtraContent); } } tabBarExtraContent = tabBarExtraContent ? /*#__PURE__*/react["createElement"]("div", { className: "".concat(prefixCls, "-extra-content") }, tabBarExtraContent) : null; var tabBarProps = __rest(_this.props, []); var contentCls = node_modules_classnames_default()("".concat(prefixCls, "-").concat(tabPosition, "-content"), type.indexOf('card') >= 0 && "".concat(prefixCls, "-card-content")); return /*#__PURE__*/react["createElement"](es, tabs__extends({}, _this.props, { prefixCls: prefixCls, className: cls, tabBarPosition: tabPosition, renderTabBar: function renderTabBar() { return /*#__PURE__*/react["createElement"](TabBar_TabBar, tabs__extends({}, Object(omit_js_es["a" /* default */])(tabBarProps, ['className']), { tabBarExtraContent: tabBarExtraContent })); }, renderTabContent: function renderTabContent() { return /*#__PURE__*/react["createElement"](es_TabContent, { className: contentCls, animated: tabPaneAnimated, animatedWithMargin: true }); }, onChange: _this.handleChange }), childrenWithClose.length > 0 ? childrenWithClose : children); }; return _this; } tabs__createClass(Tabs, [{ key: "componentDidMount", value: function componentDidMount() { var NO_FLEX = ' no-flex'; var tabNode = react_dom["findDOMNode"](this); if (tabNode && !isFlexSupported && tabNode.className.indexOf(NO_FLEX) === -1) { tabNode.className += NO_FLEX; } } }, { key: "render", value: function render() { return /*#__PURE__*/react["createElement"](config_provider["ConfigConsumer"], null, this.renderTabs); } }]); return Tabs; }(react["Component"]); tabs_Tabs.TabPane = es_TabPane; tabs_Tabs.defaultProps = { hideAdd: false, tabPosition: 'top' }; /***/ }), /***/ "qDWn": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; __webpack_require__("baa2"); var _icon = _interopRequireDefault(__webpack_require__("FC3+")); var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); var _api = __webpack_require__("H/Zg"); var _index = _interopRequireDefault(__webpack_require__("W7F7")); var _dva = __webpack_require__("S6G3"); var _PoliceList = _interopRequireDefault(__webpack_require__("PoMe")); var _classnames = _interopRequireDefault(__webpack_require__("HW6M")); var _events = _interopRequireDefault(__webpack_require__("TLe5")); var _recordHistory = __webpack_require__("eXDv"); var _dec, _class; /** * 驻勤点和保安员信息 */ // 引入 EventEmitter function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } var AttendInfo = exports.default = (_dec = (0, _dva.connect)(function (state) { return { //地图数据 pictureMarkersList: state.command.pictureMarkersList, mapStyle: state.command.mapStyle, layoutAuthority: state.command.layoutAuthority, selectAttendInfo: state.command.selectAttendInfo, backStepInfo: state.command.backStepInfo, mapLayerSwitchState: state.command.mapLayerSwitchState }; }), _dec(_class = /*#__PURE__*/function (_Component) { function AttendInfo(props) { var _this; (0, _classCallCheck2.default)(this, AttendInfo); _this = _callSuper(this, AttendInfo, [props]); // 清除助勤点保安员信息 _this.clearAttendInfo = function () { var selectAttendInfo = _this.props.selectAttendInfo; var that = _this; _this.props.dispatch({ type: "command/fetchPersonList", payload: { list: [] } }); _events.default.emit('clearMapTag'); _this.props.dispatch({ type: 'command/setSelectAttendInfo', payload: {} }); (0, _recordHistory.recordBack)({ from: 'AttendInfo', callback: function callback(result) { if (result.from == "CreateTrajectoryInfoWindow") { (0, _recordHistory.recordBack)({ from: result.from, callback: function callback(result) { var data = JSON.parse(JSON.stringify(result)); (0, _recordHistory.recordRemove)({ from: result.from, toID: result.toID }); (0, _recordHistory.recordTo)(data, that); } }); } else if (result.from == "ComprehensiveSearch") { var data = JSON.parse(JSON.stringify(result)); (0, _recordHistory.recordRemove)({ from: result.from, toID: result.toID }); (0, _recordHistory.recordTo)(data, that); } else if (result.from == "ComponeyInfo") { var _data = JSON.parse(JSON.stringify(result)); (0, _recordHistory.recordRemove)({ from: result.from, toID: result.toID }); (0, _recordHistory.recordTo)(_data, that); } } }); }; _this.state = { attendInfo: {}, // height: null, //保安员资源列表的最大高度 allHeight: null, policeList: [], total: 0, loadText: "查看更多", searchData: { pageNumber: 1, pageSize: 5, search_smName: '' } }; return _this; } (0, _inherits2.default)(AttendInfo, _Component); return (0, _createClass2.default)(AttendInfo, [{ key: "componentDidMount", value: function componentDidMount() { console.log(this.props.selectAttendInfo); var allHeight = document.documentElement.clientHeight - 9 - 340 - 46 - 16; this._passAttendanceIdGetPersonList(1); } }, { key: "_passAttendanceIdGetPersonList", value: function _passAttendanceIdGetPersonList() { var _this2 = this; var pageNumber = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1; var pageSize = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 20; // this.props.dispatch({ // type: "command/setPersonSelectIndex", // payload: null, // }); (0, _api.getSecurityManByAttendanceId)({ attendanceId: this.props.selectAttendInfo.selectAttendId }).then(function (res) { var result = res.data.map(function (item) { item.perId = item.item_userid; item.ATTENDANCESITEID = _this2.props.selectAttendInfo.selectAttendId; delete item.item_userid; item.name = item.item_securityname; delete item.item_securityname; var lnglatData = item.item_lonlatjson ? JSON.parse(item.item_lonlatjson) : ''; item.lnglat = lnglatData ? [lnglatData.longitude, lnglatData.latitude] : ''; // item.lnglat = [118.051982,24.607542] item.longitude = lnglatData.longitude; item.latitude = lnglatData.latitude; delete item.item_lonlatjson; item.idCardNo = item.item_documentid; delete item.item_documentid; item.companyName = item.item_companyname; delete item.item_companyname; item.ATTENDANCESITENAME = item.item_attendancesitename; delete item.item_attendancesitename; delete item.item_deptname; item.mobilePhone = item.item_phone; delete item.item_phone; return item; }); _this2.setState({ policeList: result, total: res.data.total }); // this.props.dispatch({ // type: "command/fetchAttendPoliceList", // payload: { // list: result, // }, // }); _events.default.emit('addPictueMarks', { data: { data: result }, type: "securityResource" }); }); } }, { key: "propsOption", value: /** * 向上级传递打点数据 * @param {*} optionType * @param {*} data * @param {*} type */ function propsOption(optionType, data, type) { switch (optionType) { case 'add': // this.props.addPictueMarks(data, type); // event 发送器: eventCenter.emit("事件名称", 参数列表); // 这样做的好处是,爷传孙,不需要父级组件做承载 _events.default.emit('addPictueMarks', { data: data, type: type }); break; case 'reduce': _events.default.emit('reducePictueMarks', { data: data, type: type }); // this.props.reducePictueMarks(data, type); break; } } }, { key: "render", value: function render() { var _this3 = this; var _this$props = this.props, layerSatatus = _this$props.layerSatatus, mapStyle = _this$props.mapStyle, layoutAuthority = _this$props.layoutAuthority, selectAttendInfo = _this$props.selectAttendInfo, mapLayerSwitchState = _this$props.mapLayerSwitchState; var _this$state = this.state, attendInfo = _this$state.attendInfo, policeList = _this$state.policeList, total = _this$state.total, searchData = _this$state.searchData, allHeight = _this$state.allHeight, loadText = _this$state.loadText; var cls = mapLayerSwitchState.eventViews ? (0, _classnames.default)('map-modal-optimizing-level2', _index.default.attendInfo) : (0, _classnames.default)('map-modal-optimizing-level1', _index.default.attendInfo); return /*#__PURE__*/_react.default.createElement("div", { className: _index.default[mapStyle] }, /*#__PURE__*/_react.default.createElement("div", { className: cls }, /*#__PURE__*/_react.default.createElement("div", { className: _index.default.title }, /*#__PURE__*/_react.default.createElement(_icon.default, { onClick: this.clearAttendInfo, className: _index.default.back_icon, type: "left" }), /*#__PURE__*/_react.default.createElement("div", { className: _index.default.attend_name }, selectAttendInfo.attendName)), /*#__PURE__*/_react.default.createElement("div", { className: _index.default.content, style: { height: allHeight } }, /*#__PURE__*/_react.default.createElement("div", { className: _index.default.attend_info }, /*#__PURE__*/_react.default.createElement("div", { className: _index.default.attend_item }, "\u8D1F\u8D23\u4EBA\uFF1A", /*#__PURE__*/_react.default.createElement("span", null, selectAttendInfo.name)), /*#__PURE__*/_react.default.createElement("div", { className: _index.default.attend_item }, "\u624B\u673A\u53F7\u7801\uFF1A", /*#__PURE__*/_react.default.createElement("span", null, selectAttendInfo.phone)), /*#__PURE__*/_react.default.createElement("div", { className: _index.default.attend_item }, "\u5730\u5740\uFF1A", /*#__PURE__*/_react.default.createElement("span", null, selectAttendInfo.addressDetail)), /*#__PURE__*/_react.default.createElement("div", { className: _index.default.attend_item }, "\u4FDD\u5B89\u5458\u6570\u91CF\uFF1A", /*#__PURE__*/_react.default.createElement("span", null, selectAttendInfo.count, "\u540D")), /*#__PURE__*/_react.default.createElement("div", { className: _index.default.attend_item }, "\u670D\u52A1\u4F01\u4E1A\u7C7B\u578B\uFF1A", /*#__PURE__*/_react.default.createElement("span", null, selectAttendInfo.obj))), /*#__PURE__*/_react.default.createElement("div", { className: _index.default.attend_list }, /*#__PURE__*/_react.default.createElement(_PoliceList.default, { data: policeList })), /*#__PURE__*/_react.default.createElement("div", { className: "see-more", style: { cursor: 'pointer', display: this.state.total > this.state.policeList.length ? "block" : "none" } }, /*#__PURE__*/_react.default.createElement("span", { onClick: function onClick() { _this3.setState({ loadText: "加载中" }); _this3._passAttendanceIdGetPersonList(1, _this3.state.total); } }, loadText))))); } }]); }(_react.Component)) || _class); /***/ }), /***/ "qEAy": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAAXxJREFUaEPtWT1Ow1AM/txEZWFiA3EHrsBeLgA7gjIjGGiqKk0HEHMrxA4XAGauwB0Q3VhgoUowSkuqgET1fhKSVzmz7efP/pw8fyE4/pDj+WMKoHd+vRlP4gsA22Be1wJFNAbw6Df9k97p/rOWbwHGlCaffMRPDF6ziUegV2/F3/pvENTpj27AvGuT/NyX6DYK2nv5WEE4GgA4ZnCzkDO+gxBoAuAyBfAypw01WlFw+KBzUHdw1fpMkrupD9E4CtobPwEM3xhY1YmpakvAO3XCIWcOUffIaKgXxSi/AyUDUK2mqV3pHTBNTNVPAKSVKmKOVCv+2046IB0w5U72QSuCv0XEMMUhM7D0M1D+VSJ3mWt43k54dnCvw8fqL3OuX6edX2icXyl1+F5HW6MFpk5ABEDV3RBdKOuA6EKaXBRdKF8w0YU06ZM3l4Vm6RcaC3YouQqFhEJKRPnbSCgkFKo7hUQXWtCh2U8+0YVmJapsoRFdyPItYuvuvKzyBZX/tzipRvsMAAAAAElFTkSuQmCC" /***/ }), /***/ "qIy2": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Col; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__("GiK3"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__("KSGD"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_classnames__ = __webpack_require__("kTQ8"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__RowContext__ = __webpack_require__("dCEd"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__config_provider__ = __webpack_require__("PmSq"); 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; } function _extends() { _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; }; return _extends.apply(this, arguments); } function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } var __rest = this && this.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var objectOrNumber = __WEBPACK_IMPORTED_MODULE_1_prop_types__["oneOfType"]([__WEBPACK_IMPORTED_MODULE_1_prop_types__["object"], __WEBPACK_IMPORTED_MODULE_1_prop_types__["number"]]); var Col = /*#__PURE__*/function (_React$Component) { _inherits(Col, _React$Component); var _super = _createSuper(Col); function Col() { var _this; _classCallCheck(this, Col); _this = _super.apply(this, arguments); _this.renderCol = function (_ref) { var _classNames; var getPrefixCls = _ref.getPrefixCls; var _assertThisInitialize = _assertThisInitialized(_this), props = _assertThisInitialize.props; var customizePrefixCls = props.prefixCls, span = props.span, order = props.order, offset = props.offset, push = props.push, pull = props.pull, className = props.className, children = props.children, others = __rest(props, ["prefixCls", "span", "order", "offset", "push", "pull", "className", "children"]); var prefixCls = getPrefixCls('col', customizePrefixCls); var sizeClassObj = {}; ['xs', 'sm', 'md', 'lg', 'xl', 'xxl'].forEach(function (size) { var _extends2; var sizeProps = {}; var propSize = props[size]; if (typeof propSize === 'number') { sizeProps.span = propSize; } else if (_typeof(propSize) === 'object') { sizeProps = propSize || {}; } delete others[size]; sizeClassObj = _extends(_extends({}, sizeClassObj), (_extends2 = {}, _defineProperty(_extends2, "".concat(prefixCls, "-").concat(size, "-").concat(sizeProps.span), sizeProps.span !== undefined), _defineProperty(_extends2, "".concat(prefixCls, "-").concat(size, "-order-").concat(sizeProps.order), sizeProps.order || sizeProps.order === 0), _defineProperty(_extends2, "".concat(prefixCls, "-").concat(size, "-offset-").concat(sizeProps.offset), sizeProps.offset || sizeProps.offset === 0), _defineProperty(_extends2, "".concat(prefixCls, "-").concat(size, "-push-").concat(sizeProps.push), sizeProps.push || sizeProps.push === 0), _defineProperty(_extends2, "".concat(prefixCls, "-").concat(size, "-pull-").concat(sizeProps.pull), sizeProps.pull || sizeProps.pull === 0), _extends2)); }); var classes = __WEBPACK_IMPORTED_MODULE_2_classnames___default()(prefixCls, (_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-").concat(span), span !== undefined), _defineProperty(_classNames, "".concat(prefixCls, "-order-").concat(order), order), _defineProperty(_classNames, "".concat(prefixCls, "-offset-").concat(offset), offset), _defineProperty(_classNames, "".concat(prefixCls, "-push-").concat(push), push), _defineProperty(_classNames, "".concat(prefixCls, "-pull-").concat(pull), pull), _classNames), className, sizeClassObj); return /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createElement"](__WEBPACK_IMPORTED_MODULE_3__RowContext__["a" /* default */].Consumer, null, function (_ref2) { var gutter = _ref2.gutter; var style = others.style; if (gutter) { style = _extends(_extends(_extends({}, gutter[0] > 0 ? { paddingLeft: gutter[0] / 2, paddingRight: gutter[0] / 2 } : {}), gutter[1] > 0 ? { paddingTop: gutter[1] / 2, paddingBottom: gutter[1] / 2 } : {}), style); } return /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createElement"]("div", _extends({}, others, { style: style, className: classes }), children); }); }; return _this; } _createClass(Col, [{ key: "render", value: function render() { return /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createElement"](__WEBPACK_IMPORTED_MODULE_4__config_provider__["ConfigConsumer"], null, this.renderCol); } }]); return Col; }(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]); Col.propTypes = { span: __WEBPACK_IMPORTED_MODULE_1_prop_types__["number"], order: __WEBPACK_IMPORTED_MODULE_1_prop_types__["number"], offset: __WEBPACK_IMPORTED_MODULE_1_prop_types__["number"], push: __WEBPACK_IMPORTED_MODULE_1_prop_types__["number"], pull: __WEBPACK_IMPORTED_MODULE_1_prop_types__["number"], className: __WEBPACK_IMPORTED_MODULE_1_prop_types__["string"], children: __WEBPACK_IMPORTED_MODULE_1_prop_types__["node"], xs: objectOrNumber, sm: objectOrNumber, md: objectOrNumber, lg: objectOrNumber, xl: objectOrNumber, xxl: objectOrNumber }; /***/ }), /***/ "qJlB": /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__.p + "static/atten.9e6bb0b9.png"; /***/ }), /***/ "qK5s": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__style_index_less__ = __webpack_require__("vtiu"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__style_index_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__style_index_less__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__index_less__ = __webpack_require__("hQF4"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__index_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__index_less__); /***/ }), /***/ "qhXr": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAAAXNSR0IArs4c6QAADDVJREFUeAHlXMuPVkkV/74Gupv3WyY6jm5krwtNRDTBwU6MGscF4kLd6IbExMRX4goNSxMXBjaaEIdNDwtHEjXBF6CN4KZDSNgw/8Dwbt40TXf7+9V8v8u59dWtW/f1TbdTSXFOnTp16pzfPVW37r1f0++9f6Xf8tTLLdtLMtd2ELFJRzkX/RgJoF0H1bX92AWzfZ2B2UWAbdn07bQFQlt23AXynbRXrSpfx1adMSG/6oBSZ8zQ3G0EUNVGTD/WZ52PBR/rszbEV9XXOEdTHc4NMo3U8SG9kEymi/piwYb6QjLNYWmqnh3j+CJHhxQDgpSxIR0rs7ydokheFKiVW142QzL1iaboSDejRY5mCgEmdYzVK+Jp3vZpupCMfaEgfZltF/GaJ0TtmFB/TlbkaE7JNFL0rU4Z3z99+vT6qampfZOTk59as2bN3rGxsb39fn8P5tw8qJz+Ievy8vKNpaWl64uLi9efPXs2e/bs2YuHDh16ij4FLcoxKTz1QsWODfXXkhGMsjoGHdU14FnXDuo6UFevXLnyEQDwI4Dxb4Ayj1q3zNMGbdGm7A+o5pUf8ou0LA574aHevJRNaJ2TwwpAwI3Pzc0dePHixZ+B1kJdxCLjFmibcyDccVTNKz/kl/W1LK7myMFC2STWITkppxkEgTuITJmJBN9qF+fCnK9zblT6IH/kn/W5LD4Mb1ZiE1hH5ByddVf/2rVrryErpltFp4Ixzk0f5A8ofZOf1vdYjBhSv8QMywE5pKvssu7BgwdfRaxzFeLtSnWOvgCCsmyMxVoLwZjBKHjz8/M/BRqLXSFSw+4ifRoliLXAO378+CYsmzdrBDiSIfSNPgLI2L4Yiz05E4uMKPNIuXSzZTs7O/thbN6XRoJEg0noI30NgGhjK4o/CcCiwZRrkhx4vKqrATzhTl8LMlHxxTDIgUhFv4Rk1JHcUvJ9LI3f4Sni276hldzG08yptWvXfg8+8qlDlS7rKUSUMltyciJui8CxMvKSW+rAw+b8w9UGHgOiz/R9EJuLhXIUG+N7kvy/6nfSXMMMzg/JG9VkfRwPpjZv3vxHKPsXwh+/UttLDx8+/PqWLVvOwkFloSh9zmWbCSKT28B9MKUvuYBzchxQXwF4p9CwNjRmtdAxxsBYjMM2TsVuuh2byTMGYstrgGSWkue+9yaWwTeluJop9sO3sB9+BzEo+5RhPrVhur4q2eOAg4X+nTt3vtA1eM+fP+/dv3+/d/PmTUfZ7qowFsbE2ExNmk6ZRWXL27bkmXEcA/6Jd3b7kmaooAS7vadPn7qKDB8aiSzprV+/3lW8NxzqbyLAEecibB6ADWaWKk26TDOUMhYnt+C8J375r+3LwLt9+/bnd+7c+beXas05ZteTJ096uCv2EEipQVy83sTERG/Dhg298XE+4rZTkIUHd+3a9S9YE4CinCDk2LIFyffC9mUAIjPeRsp/2Veu2la2ETjsQVWHZ/rwxQHJzGyalfDjL8jyN2BcwIlyviCARevAB885fPny5Q/B4S+5Rs1/mGV4V9e7detWD0eIRuDRBYJPO7RHu7RftzA2xmjGK3EoEiam+6XQ71RbBhzFq/MfYOn8KmchocFsY6Zxf2uSbQlTORVmJTOSS7xqVuIC/BjfZ34DQ8o+Udr2s9AtYYHlJh/8I+DYFN8HEP/A/vM5qxjjmQ0Ejntcyt4Ws1Wnj3sl90gCyT0zpcDPGYD+RegKOIGmds5MaAlbQMX3T548uQEOfTo3OtLAhty7d+9e8o0hYqp2Fy8aLyL9oD8phTEyVuhmsZtxkmUiCnyh2upz9O7duwe3b9/+p2xkCaMlu7CwUKLZbTeXMLOQGchlnVIA+Fd27NjBk4ayTpTDlZHOFN/nJZWNGzd+MklxoMRlw8o9D3tn7/Hjxz3uhV0WLVnugbyALARv27ZtlaYdxJp0VAst4eBkcGpvsKNEyGDgEN9+lGi2041V4uZrYq1KrEUAahlnfmAp1AIwM7CKmIJYhzBhSEUA+uFysH1j4ff/v7UZaxAwP9DYHkgDqj3sL/wY84EoJlYLYu7mISD8DLQDpCPKH/t8UEos1hxGPoCdAbR169ZObya82/IGMuoSW8K+L/yJ2U5fmNrmqyi8/XWVh1s+1pE2eULhsYXnO97l163jp97WCmNNKskAItBHcLg2gDwLMkgeZxg0K8HT+78qB24Ch+fV3qZNm3LHI85BedPCWFNt+AByo8ytcWPoXfAfM+1KLA/SfEnKpcYnAgJIIHTgZp/ALDpwS58ZxycMFl0EHdTbABBmGWtRyd1MfADtIKvIFwnXkT2fsQpVeQbLZctKABgswWRmxpY4dQk0gSOILLRF0PjEIcDVV9UvX5+xDmTEQNVXc+0YgHbAMpbYO20+TTBoBs9K8ASmXeLU4ZscZSsdokzAEcQuCmOF3STjRQBycG4pY3nNtrQ8hmLm8n306JEDhtnIrORcylIO4DM1dbjPdQWcHGOs4g0NApp8jDlz5sxFGOvu0xiMExhmHL/G8Q0zKfdFvmnGtxjHdw0eYxzEarArZplluUwzbfVlFMvn79hnkl+o2mn5Pq7KndaOTeW5B+7Zs8dlKy8ACzO5ytsYXCC+UH0dQ5lxfqXJXCamZGA2AMvnDC2s1NLGTcSLMYu9KOYQgHaQeNLlq1evToMOf7Atsm7kvIu2eRMyph1L8DhHw/JiEKOLd2BLGLBpedet5Ss6GJMt62z5osPx2PD/ACBqf9bkEYZ33ra+kxA43nR4qOZNh4U3nDpLGOP4WfMbMCEALaVpH8DlUAZS0S8yxG8Lv/Y7q7R5JOEz6+7du4eeJKrYUcbRDn5dlYFXxYava2LL4vV1/LYyT9T2S+YyDx0Zxc2EX+f2WeUmPLORWZnybBzKOH/uOhmImwd/2uF/jbNA+tnHaZeLzoG+T7k2Prr8Eh9d+Ju6Vgof71h5SNbjHM+GtqQAJ33qqlheshBFTL8IyctkL2eKH2doJ8tA8gjw99gLO/t5G7OSYJJy2ds9riwo9uPHn24sX6OVvalBxvLnbd/FMGWcKE0p80QpY/HbeYCgQMC4R7LyixCz1f0RDejEpUuXPo60Xwl/SAM3GpU5xsKYUMdR9ScQjFnx55IH8izxMsYKwauo31LyriLtp3BIfRvt1JuR7K4UuoSnnDdwUyv7ie9QtiEAJysLXANFGTh5VzkxltnPKVyNhb4HwFMoillU8hxVZknot315ln3oEM/3fL/Ffrga/8zh+4MAs6RAWzy7isDL5P7X7hQAB3NmpI/b/1/3799/APTVTLqCGdw0/nvs2LFvnT9/nj9MFGCijT1XZvlUGypBH7qpnDt37lVk4uVG2/kIBtNH+ooYQjeNshtHUYLlQPeBs20LIu/KuTvz0aNHt+DYcWoEONSagr7RxwB4jCMFvCQAiaYFzfICkFRZmAMR8kk8VfwMEa6oP3elT/QN1c88HzzGZmO2PLrSih3k8wKRABaBOIEjztcA4ko4J87RF/hK4IrAazX7BLEPnG0ngcgDKpbNW7XWWwuDOLc5JI8UvDZA5KmeTk/iLcdBbN4XW8AkyQTn4pyce+ADfbFPGVq2nWQe5soVm3k+r0wktUuaj0OsAtEBeePGDQLZ6X97wjkwr4CzWUd/QsDRdz8u20Z3s2KNhfgiEO3NJQfkzMzMa/jC9hOAyf8KpdF/vEMbtHXhwoWPIkwfuLKsKwOP8UZLqcJgdJme7RdfRmm6f+LEifWHDx/+LN4qu//6CW9FPgH5K3gNxZ/T6VdS/G+f+HOLdwHYOzgIX8dj2Oz09PR/jhw58hTy7MnA8JIVUajmxrHtF4315VlbQWaCCJOia3XE+5RTxGQRF3JdNjjxolQU71PblzPoNTTOE+eb3LeqFAUeG2N1LB8bw74khwdGfF21RX17RfKBuSFi9Yc6raBKgBqXOsbqFfG0afvK5ggF5stsu4jXPCFqx4T6c7KqGWgHhwK3/eTLdMr6fXtFwVm55TU+JFOfaIqOdDPaBEAaSQUgpBeSZY4VMLEgQ30hWch0qt7Q2DpB+Eaq2ojpx/rsvLGAY33Whviq+hrnaKrDuUEFjTq26owJTV8HhDpjhuZuKwBruC2bvp1WAoajbdlxMftOWiDa4Lu2n+pjq6DZSUcZ4CjnYoydgfZ+AWjnJd82oCMBzA/if176VtTg83WLAAAAAElFTkSuQmCC" /***/ }), /***/ "qsn8": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAARCAYAAADUryzEAAAAAXNSR0IArs4c6QAAAbpJREFUOE+dkzFoU2EUhb/zIoVU8hrUQVApbiKC4GhxiINQEB1Kp2odRDdpE3HQQcTFMQG3gpNFOggKQYpQBYU6OImDOAlKa0ER0teQUpv3jrwa2xgDtbnj+c//3ftf/iO61VX3D2QZSsQhjAL4srzKPFNqdNrVLuy+4f1Bk7tKGEP0d5gbhkcx3G5UtPTnbBOQK/qUEp4g9nadakv8kYiRelmvUmkDkC/5eBLzpkvX7izTCMRQraJ3YtSZ8CDvMUe36fz3sfkYfeWYwkmPAdM7urxlHk8BT4HzPQKqyk16QXCgBfgEvAYuAhlgziIjUwDWZaYtTgODqd+wqLDoNUxfKiQwWq/ocVj0HKYQ5ckCfWGNFeBZVNHZcMIXEA9bDdfSJ3wH9rWEt4iqzS1BVuKBYRfmElCXuGczApxoTbCUAp4DZ3rZgeGlBiZ8xWKqFwDimig6G5oFYM9OIOkCV35yRNxxENb4Btt+4XZ+EzgXVTSrXMknlTD/391Ng4DLUVkzG1lIQ4QZN8xmEpadoUTCMPqdk81yGmyqSczN+n19+CeN7d78dQ/GMQWZw4gm5vN6wIvVshY7J/0F1s6eQa69xUQAAAAASUVORK5CYII=" /***/ }), /***/ "r+rT": /***/ (function(module, exports) { // removed by extract-text-webpack-plugin /***/ }), /***/ "rFqi": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAiCAYAAAC0nUK+AAAAAXNSR0IArs4c6QAABLZJREFUSA2lVm9oHFUQn9ndu9M0f/eaGGMNlIqS0kYwodiCqUlqq2ALglUK/dIvJQUpWKVNrggRGpPDIvWT1YL1g4VisYIBQ9MkpU0hSpuQqlTRqqTV0DPNJc3ReNm73efM7r3Lu82lTXTgbt6bP79999uZeYdwH9naNdWQdpztAKIRBVQBYFigiNP6T9Dwoo7a1+cOlQ4ikiWPYB4bNHdMNQI4XQLEhnx+1YYIV0Doh/oPl11Q7bzOAW8XQrvUOdkBAlrZWV6kQfO6IDz7RBCqynQofhhh5h8B41M2fHvDgv4fLZhIOBxKQPj+cxGztR3RM7g210U/XAjc0hn/gvSrAR1gz+YCeKX+IQgaOc/PRHvKSgv46moSTl6chZTNaHi2oc3cKR9AMJ5cDu1/l4D3lRYgRHcVQ+PaEOja4sCcxf51qwLwzOoADP1qQTIlam4Nzhm/D0QH2O9mb+2a3JR24HJAE/jB7mJY+1iAfcuS63+l4MDnM5ByUBBFm/sj5qDGCLYjiGeBTIUf+NwPc9D83iQcODXjPow179muCudxPuMQA0fYp70Qna4XAp7nl8cc++XaWNo1VZZ4DEot7Wo85zMOPaGhKXpng+bYNtUxuFWR7+WNjqXcfIdOcO1mGlizSLu7yXxxPlcXC6bxZYNCm3nD5eaX2F0HYne5DADOEw38kcJ29j9S4jIrzS7O6aEkVTM0a9Rb1ezhOvbL6E3v1GznCuqPhF0t41S/tGVxEKo1QFHBDm4Qv6i8elx6jSXjVL+0SRwEUa6BwHvs4M7zi8prebH386XmWNUvc7M4hGuQMUYfk1s6XDjPn8o3J24/GmeVI/l4ZxwWKvZxg2gZIfZreFasf3y+eVQ+n6w0oGXLiizw8b578Mttr0Q5btv6UNbHOCzUSiPEudbDGx5CPCukqHyurjDg6er5D++lqHGczziuoOjWgitENw2cKZ5uPISkqHxW+spN3atxnO9OSYQJPWD2uCXS1HnnMDhwhKfh/54t3nR8cyASPua+QcMIH6Nh8xOPzXfOJICH0HKE4zmP8+m0I6FC8yPOzxb3i9GZpyzbolsFiv7rPKdb6W89hPW9b4Vv5YDzpqkr/hI6opummtuuy7uJYFZHaOqNrPyOsViyJ/e2AHQb7XUc52O5X5rGNOi4Y6DVdCtP5sx3TcbS12Z+QtVzVAYsRdOFtNcPzHkLwNnYsNFso78LQ7x+oCCe6IuET+aLywve3ojpUFDbRaxN50uSNjrA99WPmvvl3q/zgnPQN2+XjaGGb/gT5J4qY06HwOuf7cH5zpPOjF4UnP39beYpOt15X463RezojRT/nNeXMd4XnGOChr6PVM7puOHMNWY0g7GoeiB4z8HS3+h/YZeKoOtay5nXMDOhVE/uekGdq+66urqCVCplQklNxcptH/YCGmFhzVya+HJHi6ZpiUAgEB8eHp5Vc9T1wosz462tra1IJpNrbNsutGdjGFq1yTIKKjYmrp9uTY5fTbCdHlxeVVVlx2Ix9zZTgXm9KC3UpZVqcLzv4Flr+o9PE6Mnbqh2f5zqWxScfvZtNdCxptMT3buPqzZe++NU/5I4p9MV0TALktYJzKbytJbC+b/rNgh/HknZuQAAAABJRU5ErkJggg==" /***/ }), /***/ "rKrQ": /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _rule = __webpack_require__("hGxU"); var _rule2 = _interopRequireDefault(_rule); var _util = __webpack_require__("eCjd"); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } /** * Validates a number is an integer. * * @param rule The validation rule. * @param value The value of the field on the source object. * @param callback The callback function. * @param source The source object being validated. * @param options The validation options. * @param options.messages The validation messages. */ function integer(rule, value, callback, source, options) { var errors = []; var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate) { if ((0, _util.isEmptyValue)(value) && !rule.required) { return callback(); } _rule2['default'].required(rule, value, source, errors, options); if (value !== undefined) { _rule2['default'].type(rule, value, source, errors, options); _rule2['default'].range(rule, value, source, errors, options); } } callback(errors); } exports['default'] = integer; /***/ }), /***/ "rLa/": /***/ (function(module, exports) { // removed by extract-text-webpack-plugin /***/ }), /***/ "rm0p": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAAEEfUpiAAAAAXNSR0IArs4c6QAAAttJREFUWAnFl79rFEEUx+8SyaGRNFFMbMTGgKAg9oIgnFVae/8B27Sef4CV8T/Q3jpwZWxiIwixUYgEwer0YmFzfj+zM7tzs/P2bi8ePng77+f3zc7OvtntdDxNJpNfiBe4SJloeOBGPN6AY7UbRSAWJM8rcR+tG8K9r7MShK4oG+EClHaX1JSCkwIx3Y8V5taPDansCgOFw0FGlzAxZ5J/TXwsHkYxhShjjk7wcuNjjetOESaRyJ62pwzUTAKqlQopBEGlnmYERxhZ6xdBSccSSSiHICW0lSawWD3xOAlM1YGVmAaif84Zve3QAUnhCWSJADmmHn4SOGIRPjqkxS4bAJxauap2TSt5xGoGUuyzOD7/lsQRzfLr0q1qJ8n9zVLrjxE0ZW2JR0b2flmxSVAyb9lQTFfgHeG1XGvKcT4FDcRNxCbrZYHkaLMGd6ZAlJzb68zkGxeDipnIyaLl6ApVcg5voxO4ljDSuIGS0Lo2z2+CE3us9tiJueQ4qEl+CcB56NFMgPAOhFHVvkQVt5sA3kaBTtRyXJRwM7If1dpk5JxHfMxj2melF6GywiLJyhnEANZmsrDduVICIChyXpCimU5lR4qArDWhR+SbSJRfE/3MALWajFw1Ipac9gWZAYli6w2XqzWBNXsyBInb9KW2MwE7PxE5ZnXTuNhzv1KrMr6JHXPK1Rb2QNbGsfAukQcpoOnktvKxFweUBA6gtvQvJkDNPs1sz93K/7ns0Qz5VL/csr47bchRPrn3jHy671PxE8M/BoBzvy3dMACzZoF/MAoc849yIL6VzbSNXwVoe+f3HPAI+OL5IT7P2Tx/ySryp8SrKzpq/0jYEZ9VvqVL1NqhNm9BR8J3DZvi9+hLJmps+pr1Unok/Dwuox2DOf1JWS9fWRTcE9OeZ/01KcQkcsEoPkMr+FIqfwlLiyEIhM36ULwrvi2+7lmD+8051fhJ/E489HtLYjP9Bc0SAk/RIOKMAAAAAElFTkSuQmCC" /***/ }), /***/ "rmat": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = _default; exports.removePathSimplifierIns = removePathSimplifierIns; __webpack_require__("QeQB"); var _spin = _interopRequireDefault(__webpack_require__("9YyC")); var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); var _utils = __webpack_require__("oAV5"); var _reactDom = _interopRequireDefault(__webpack_require__("O27J")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); var _gcoord = _interopRequireDefault(__webpack_require__("h1m8")); function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } // 南宁的轨迹绘画 //使用gcoord转换坐标--WGS84坐标转化为高德GCJ02坐标 function _default(pointData) { removePathSimplifierIns(); //先清除重置地图上的轨迹路线 console.log(pointData); var _this = this; var resultArray = []; showLoading(); ////绘制loading加载状态 new Promise(function (resolve, reject) { pointData.forEach(function (item, index) { var longitude = item.longitude / (3600 * 100); var latitude = item.latitude / (3600 * 100); var gps = [longitude, latitude]; var result = _gcoord.default.transform(gps, // 经纬度坐标 _gcoord.default.WGS84, // 当前坐标系--WGS84(国际通用) _gcoord.default.GCJ02 // 目标坐标系--高德地图GCJ02 ); console.log('result转换坐标', result); //返回 [116.41661560068297, 39.92196580126834] var time = (0, _utils.transformTimestamp)(item.time); //js将2021-08-21T10:00:18.000+00:00转换成年月日时分秒 var obj = { time: time, lnglat: result }; resultArray.push(obj); resolve(resultArray); }); }).then(function (resultArray) { console.log('resultArray', resultArray); AMapUI.load(['ui/misc/PathSimplifier'], function (PathSimplifier) { if (!PathSimplifier.supportCanvas) { alert('当前环境不支持 Canvas!'); return; } // 删除loading组件 var divs = document.getElementsByClassName('nanNing_loading'); if (divs) { Reflect.apply(Array.prototype.forEach, divs, [function (item) { _reactDom.default.unmountComponentAtNode(item); document.body.removeChild(item); }]); } var defaultRenderOptions = { renderAllPointsIfNumberBelow: 100, pathTolerance: 2, keyPointTolerance: 0, pathLineStyle: { lineWidth: 3, strokeStyle: '#0E70FF', borderWidth: 1, borderStyle: '#eeeeee', dirArrowStyle: false } }; var pathSimplifierIns = new PathSimplifier({ zIndex: 100, //autoSetFitView:false, map: _this.state.map, //所属的地图实例 getPath: function getPath(pathData, pathIndex) { console.log('pathData.path', pathData.path); var lnglatList = []; pathData.path.forEach(function (its, index) { lnglatList.push(its.lnglat); }); return lnglatList; }, getHoverTitle: function getHoverTitle(pathData, pathIndex, pointIndex) { if (pointIndex >= 0) { return pathData.path[pointIndex].time; } }, renderOptions: defaultRenderOptions }); window.pathSimplifierIns = pathSimplifierIns; //设置数据 pathSimplifierIns.setData([{ name: '路线轨迹', path: resultArray }]); //对第一条线路(即索引 0)创建一个巡航器 var navg1 = pathSimplifierIns.createPathNavigator(0, { loop: false, //循环播放 speed: 10000 //巡航速度,单位千米/小时 }); navg1.start(); }); }); } //清除地图上的轨迹路线 function removePathSimplifierIns() { if (window.pathSimplifierIns) { window.pathSimplifierIns.setData([]); } } //绘制loading加载状态 function showLoading(props) { var div = document.createElement('div'); div.setAttribute('class', 'nanNing_loading'); div.style.textAlign = 'center'; div.style.top = '50%'; div.style.transform = 'translateY(-50%)'; div.style.position = 'relative'; document.body.appendChild(div); _reactDom.default.render(/*#__PURE__*/_react.default.createElement(NanNingLoading, props), div); } var NanNingLoading = /*#__PURE__*/function (_Component) { function NanNingLoading(props, context) { var _this2; (0, _classCallCheck2.default)(this, NanNingLoading); _this2 = _callSuper(this, NanNingLoading, [props, context]); _this2.state = {}; return _this2; } (0, _inherits2.default)(NanNingLoading, _Component); return (0, _createClass2.default)(NanNingLoading, [{ key: "render", value: function render() { return /*#__PURE__*/_react.default.createElement("div", null, " ", /*#__PURE__*/_react.default.createElement(_spin.default, { tip: "\u6B63\u5728\u7ED8\u5236\u8F68\u8FF9..." })); } }]); }(_react.Component); /***/ }), /***/ "rn6j": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAA4UlEQVQ4T6WTPUqDQRRFz1GwUkGEYBEI2AS3IEgqbVJZCpIVWLoD9yJJ5R60sLIXGyFY22klXPlClMF8+fObahjeO7x37x1pePzpT/JQ3dWTdZglIFPA71sBPwCugQvgExioj5P6omgGkGQTuAJugJ1isnu1txCQpAPcAsc1K31UQDW1EyQ5BUbA3gI99tX3GQDQB+6ArSViHqqvdYA3oL2CE0fqcxNAV31pskJHHc8T8QwY/ktEdQJdYmMVpu25Nhbh2iiCtLtWkEoXkrSmUb4EvoBz9elvEpt9phV8ry35BgSJbBGwHH+fAAAAAElFTkSuQmCC" /***/ }), /***/ "rpBe": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__style_index_less__ = __webpack_require__("vtiu"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__style_index_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__style_index_less__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__index_less__ = __webpack_require__("uznb"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__index_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__index_less__); /***/ }), /***/ "s/bD": /***/ (function(module, exports) { // removed by extract-text-webpack-plugin /***/ }), /***/ "s3t2": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__style_index_less__ = __webpack_require__("vtiu"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__style_index_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__style_index_less__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__index_less__ = __webpack_require__("3s2R"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__index_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__index_less__); /***/ }), /***/ "s4+4": /***/ (function(module, exports) { module.exports = "data:image/png;base64,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" /***/ }), /***/ "s6Sk": /***/ (function(module, exports, __webpack_require__) { "use strict"; // do not edit .js files directly - edit src/index.jst module.exports = function equal(a, b) { if (a === b) return true; if (a && b && typeof a == 'object' && typeof b == 'object') { if (a.constructor !== b.constructor) return false; var length, i, keys; if (Array.isArray(a)) { length = a.length; if (length != b.length) return false; for (i = length; i-- !== 0;) if (!equal(a[i], b[i])) return false; return true; } if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags; if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf(); if (a.toString !== Object.prototype.toString) return a.toString() === b.toString(); keys = Object.keys(a); length = keys.length; if (length !== Object.keys(b).length) return false; for (i = length; i-- !== 0;) if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false; for (i = length; i-- !== 0;) { var key = keys[i]; if (!equal(a[key], b[key])) return false; } return true; } // true if both NaN, false otherwise return a!==a && b!==b; }; /***/ }), /***/ "s9W7": /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__.p + "static/vedio-player.c517fd64.png"; /***/ }), /***/ "sdXI": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAiCAYAAAC0nUK+AAAAAXNSR0IArs4c6QAABPVJREFUSA2dVn1MHFUQn9nd4+wJFPYK0mtDbDCSNg2JhWjbBAygtU2UhKS1aeJX/ygpiUFjtQUMhqq04Ee0+gdaEmtqmqhVTIopioC2NbbaQho/ahPaqkGxFDkodz3u9m73ObPHnnvHcVDnj5t58/F77+bNzFuEFLShdaIsYhgPAYhyFOABQLdA4SX5T5DwhIzSsS/3ZJ1CJE0SwiQ6qGyZKAcwWgWIu5PZ7TpEOAtC3tP3fPbXdj3LceDNQkgn94+3gIB6NuZkSFC5Og3W3pEGnmwZMhchTE0LGJnQ4cwlDfp+1mDMZ7ArAeGrpY1qfTNiVGHqTBP9cSHwvv3ej4lvdsgA2+91QXXJLZCmxO0/4x1lWkTAZ+eCcOhEAMI6o2FnWYO6xdqAYKL0rbNuLwHXZrkQ2rZlQvkqJ8hSPPDTH0xBxzcB2Lp2kRnE9tXLHbBmhQNOD2kQDIuVw6dCypX+tn52kPhnQ+v4erqRJj7xS1syYNUyB6tnkfeGAZ6s2HlidvbnOI43UDRW7vOWstEE1w1BeRbIqZgLeNwv4IXqDHj78cwYqF3gOI5nHMrAy2zD+9smS/RI5Cxf3uHarKQ5vnJNh6ZPfMA5fnFzBvT8FIInSl2wmFJoJ7Y/1j4ZvWQF7pEMXac6BrMqkl3ed0NhqDt8HcamDPAHBezt9EP/Lxq0992w45oyx3N1MWEEH5Qo15W84HJLRq987odpTUBTdTq88WgmbaLTJgb8M1OCiTEWDuMq1Fv5JJh1bDkOXdXh4t8Rc+mbjpbt8fMhKjf2jNLwuA7HBkNmoxR6FLgzL3rR3A8mIeQrgCKXmsZskJk4eObIdQiE/gNi/Q+XNctscj75gS/8puxyInTtUk2ZG40JQeRIINBMHneeRYnAln4ubveP4RAul+IoB3FLp6LCpQo8tTEdCm5TUrnFcATCiERpGWRvnhWpaEf5rVC1xgk7yqmWU5CFgwIHCVzqZl8eQlynTHfdHt+hTgdCXpbZb7CMLozXdrL8OZ5xTELRhZveGs8M+eF36qzsmgpXbG7Ygxcqf3RmGg72B/g2xxSHe4XUXeeeotS8zgA83S78FV4oVpwfx3F8lHBfz3PRCwVFcb9J8/hXHptNR303vQEDcxzHU8IGnelqO28SS97GtqlCTdfoVYGM/zvP6VW6JjuxpGeXezgOnBcVrd5NaIgummpmm93cSwQBGaGip3HJ94zFFDt5dAlAr1GNYRjvWuuFcYyAjFX99apZeVZMtL6sFfHeBvUgPVev2VTzivQg1SQCc9AscFaWrVMb6HPhNMvzEmJHb6P7UDK/pODN5RhxpknbKGuTyYIsHR3gx/ylap21TuRJwdnp+LPZf6CETyYGWGuqjJAMjq3vb8egpUvkc4KzY1+DeoRO91VikLlGbOlpzLyY1DajTAnOPmmKXEss7nTccGqB2jaDMSebF7x7d9Zl+i5stSPIsrTz6MOYeoxSwKw6t4MUFxe7wuGwCotX5i554EAPoOIW2tTJsU+rdkqS5HM4HN6BgQFroNhDTXnmwZulh6KiotxgMFig63q6HhhF5/L1muLKXee78GF9cOScj/W0cY7H49FHR0dnfwoQ5JxpoS7Ns2/p7d3dqU3+9p7vfMcluz7Rz26bE5z+9lW7o6FNRsa6HnnHrmM50c9uX1DO6XQZNMzSiMsEplN5agvJ+b9T7wJ7Kh1CtgAAAABJRU5ErkJggg==" /***/ }), /***/ "shlV": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); var _index = _interopRequireDefault(__webpack_require__("0JTr")); var _classnames = _interopRequireDefault(__webpack_require__("HW6M")); var _dva = __webpack_require__("S6G3"); var _dec, _class; /** * 保安服务公司列表子Card * UI 组件 */ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } var ComponyItem = exports.default = (_dec = (0, _dva.connect)(function (state) { return { //地图数据 mapStyle: state.command.mapStyle, selectComponyList: state.command.selectComponyList }; }), _dec(_class = /*#__PURE__*/function (_Component) { function ComponyItem(props) { var _this; (0, _classCallCheck2.default)(this, ComponyItem); _this = _callSuper(this, ComponyItem, [props]); _this.onChangeCompony = function (item) { _this.props.onChangeCompony && _this.props.onChangeCompony(item); }; _this.state = { companyList: [] }; return _this; } (0, _inherits2.default)(ComponyItem, _Component); return (0, _createClass2.default)(ComponyItem, [{ key: "componentDidMount", value: function componentDidMount() {} }, { key: "render", value: function render() { var item = this.props.item; var clsString = (0, _classnames.default)(_index.default.list_item, 'list_item'); return /*#__PURE__*/_react.default.createElement("div", { className: clsString, onClick: this.onChangeCompony.bind(this, item) }, item.componeyLogo ? /*#__PURE__*/_react.default.createElement("img", { className: "img", src: item.componeyLogo ? item.componeyLogo : "" }) : /*#__PURE__*/_react.default.createElement("div", { className: "img-span" }, /*#__PURE__*/_react.default.createElement("span", null, item.companyName ? item.companyName.substring(item.companyName.length - 2, item.companyName.length) : "")), /*#__PURE__*/_react.default.createElement("div", { className: _index.default.item }, /*#__PURE__*/_react.default.createElement("div", { className: _index.default.item_company_name }, item.companyName), /*#__PURE__*/_react.default.createElement("div", null, "\u6CD5\u4EBA\u59D3\u540D\uFF1A", item.name), /*#__PURE__*/_react.default.createElement("div", null, "\u8054\u7CFB\u7535\u8BDD\uFF1A", item.mobilePhone))); } }]); }(_react.Component)) || _class); /***/ }), /***/ "snqr": /***/ (function(module, exports) { module.exports = "data:image/png;base64,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" /***/ }), /***/ "spoJ": /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.tipLayout = exports.query = exports.placeholderFormLayout = exports.photoItemLayout = exports.minSubmitFormLayout = exports.minFormItemLayout = exports.formLayout = exports.formItemLayout1 = exports.formItemLayout = exports.commanFormItemLayout = exports.addressLayout = void 0; /** * 此文件用于统一表单的样式 */ //一行一个表单 var formItemLayout1 = exports.formItemLayout1 = { labelCol: { xs: { span: 24 }, sm: { span: 7 } }, wrapperCol: { xs: { span: 24 }, sm: { span: 12 }, md: { span: 15 } } }; /*********************小版的表单******************/ //小版的表单 var minFormItemLayout = exports.minFormItemLayout = { labelCol: { xs: { span: 12 }, sm: { span: 6 } }, wrapperCol: { xs: { span: 12 }, sm: { span: 8 } } }; //小版的表单提交按钮 var minSubmitFormLayout = exports.minSubmitFormLayout = { wrapperCol: { xs: { span: 24, offset: 0 }, sm: { span: 10, offset: 7 } } }; //小版的表单下出现的一些注释标语 var placeholderFormLayout = exports.placeholderFormLayout = { wrapperCol: { xs: { span: 24, offset: 0 }, sm: { span: 10, offset: 5 } } }; //防空指挥里的列表 var commanFormItemLayout = exports.commanFormItemLayout = { labelCol: { xs: { span: 7 }, sm: { span: 7 }, md: { span: 6 } }, wrapperCol: { xs: { span: 24 }, sm: { span: 20 }, md: { span: 18 } } }; //上传图片 var photoItemLayout = exports.photoItemLayout = { labelCol: { xl: { span: 12 }, xxl: { span: 8 } }, wrapperCol: { xl: { span: 12 }, xxl: { span: 16 } } }; var formItemLayout = exports.formItemLayout = { labelCol: { xs: { span: 24 }, sm: { span: 6 } }, wrapperCol: { xs: { span: 24 }, sm: { span: 18 }, md: { span: 15 } } }; var formLayout = exports.formLayout = { labelCol: { span: 3 }, wrapperCol: { span: 21 } }; var addressLayout = exports.addressLayout = { labelCol: { lg: { span: 0 }, xl: { span: 0 }, xxl: { span: 0 } }, wrapperCol: { lg: { span: 24 }, xl: { span: 24 }, xxl: { span: 24 } } }; var tipLayout = exports.tipLayout = { labelCol: { span: 3 }, wrapperCol: { span: 21 } }; var query = exports.query = { 'screen-xs': { maxWidth: 575 }, 'screen-sm': { minWidth: 576, maxWidth: 767 }, 'screen-md': { minWidth: 768, maxWidth: 991 }, 'screen-lg': { minWidth: 992, maxWidth: 1199 }, 'screen-xl': { minWidth: 1200 } }; /***/ }), /***/ "sqSY": /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.create = exports.connect = exports.Provider = undefined; var _Provider2 = __webpack_require__("DAm7"); var _Provider3 = _interopRequireDefault(_Provider2); var _connect2 = __webpack_require__("BGAA"); var _connect3 = _interopRequireDefault(_connect2); var _create2 = __webpack_require__("buBX"); var _create3 = _interopRequireDefault(_create2); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.Provider = _Provider3.default; exports.connect = _connect3.default; exports.create = _create3.default; /***/ }), /***/ "t+3X": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAiCAYAAAC0nUK+AAAAAXNSR0IArs4c6QAABS1JREFUSA2VVWtsVFUQnnPv7rb0YdtttzRVUUOUPqAhtCFQ0xdEjMZKVEyDRhIhIkaD1B9Y9Ac1iqnRhGqISlFILJjIQ6PVNIhpuyVRCbQQ7YMfqGixdLt9l123u3vPeObs3su93W0p82PPnHl8M3d2Zg6DeWg8v7ycI1RzwCpgLJcBZiKwMYZwjQG4FQbfpfe5zzImJHFI2MSSt7CiinFsQMTVsVqrhAE7jyp73dXrbrdqACzgWF+vjB5v24cc68hQycmGhOqHwFGxFtS7c4GlpwFOTII2MAhB9y8w03IG+NCwxFSY8r6zpqqO1dfz2UFAZMlG8spOePPK0LtiHfo+O4Z8ZkaI5ybSkx3Zk99IfvkpSjAG3FtQ9pY0KK3G4MWeuRHjaMh+RPhFA7xjAR9dXl4qsuaUwXzAwV+7cKp2Lwa+aUXk3BKG/MifcMYKKsqMAELQTlHpE+MRH5vA4M8XUPt3CPkNH05segEnn9+FfGraYi5LRGXNL3dLcO/yyhICHq18Km6Nffub5OeSDWVNpF0dwJFVG3Bya624aFJGP/QfEI4sT2HZagW4Vk1RqCuYw2F8DTH+/U3gP9gsZfYV+ZDy9m7JK/fcBUlbN4P4Ggi23uxA8iccIuTKYwIc1tOF2s1M/gOHwd901BDx0THZhrrAUVUq2cCp73WRPHUchrheEdO1hKTUx2ayl6wElpgA9qICqdMGPTC5ZSfwwSFpprgy5Rm+ctXsZsZZYkOEbNLSgJjJvmYVpB1pBPX++wCnb0hgGh4KkPbFR8DHJ6U5JWAmHUfsA5fIHH2kpMmbTbaVhcCSk+SkEiB9negYGSDQfFKa25YttbjpOIQrpol5SEtZ6RS+1BspwbXruigmQODb01KX+Nwmw4aYmzhsUAGEbhLSrjCIcwhf6oGJJ7eBr+EAhC/2gPbXP8CvD4NNdI1OLCEB1Dtz9Ks8TTjdzFtQ/ixwPEpLKuP0l7Idp2v3QvDsOcHbjdpaEMSFyoU+P1DX3PFxg1RjMAjjDz8jl5miqk8rSmpyC2MwTtvtv2gdIRSGRTUbIeOn45D82ovgWFMM6mIX2AoegMQnHoX0k4cg44dmSNhQCanvvmHEJf/olvQ6VUerVIht9iZN1a12izGKcRh9t8hpzy/bRcByPWbaExtFv/dDKARTL++BkPhDb4fInvzIX7xY3c57Uz4hf+Ox8BZVLWPB8HnRn6lgt0PSq9tgkeiE2SvBHJRqTKXwf/h5BBhgWLGxksyezgELOF3EqnxEbNIWBFTpfjsvkUjTz5htXVZf+znyJTIyj1wBvHkV2wH4Qf2+kFOUNCym8XFnnzvyJ0adYp4k12V3kwLsg4WA6jYCfPtsYNLFgJPQmaPsEQ6mqSLpHMTgUGaf+0g8bVxw1tERVsG2WQSYiOdkkv2WtVjdabpb2LjgZJHR3/Y3MnjFYm25sBlmV2tEIgGL2HSZE5xsXH2dx0T2Z0z2Bqsw3Jf1e8dlQxCHmRec7G2q7SXRVJbsRMB+p5LzXhw8i+iW4Ok9bX8Io8hmirqKIdjBek8ELUhxLjF9brYpLi5OCoVCzvwQZDdi2o82gMwpxjs3qpM7FEWZttvtY11dXX6zj5mXk2gW6HxRUVF2IBBYqmlaigc09iA6gtlMXfsV89dd4DPTJBeBXbm5uZrH45Gvme6rn3OWhXNueQV286mv/0Tt8CH0X9Gd6ZxtZ9bNCS4+O/LMR60nVB7ewsY+NTsTP9vOrF9QzUV2qWKFO8SpCjBNdEtwITX/H/paSgQ9wwFAAAAAAElFTkSuQmCC" /***/ }), /***/ "t+OW": /***/ (function(module, exports, __webpack_require__) { var QueryHandler = __webpack_require__("c+hy"); var each = __webpack_require__("xFob").each; /** * Represents a single media query, manages it's state and registered handlers for this query * * @constructor * @param {string} query the media query string * @param {boolean} [isUnconditional=false] whether the media query should run regardless of whether the conditions are met. Primarily for helping older browsers deal with mobile-first design */ function MediaQuery(query, isUnconditional) { this.query = query; this.isUnconditional = isUnconditional; this.handlers = []; this.mql = window.matchMedia(query); var self = this; this.listener = function(mql) { // Chrome passes an MediaQueryListEvent object, while other browsers pass MediaQueryList directly self.mql = mql.currentTarget || mql; self.assess(); }; this.mql.addListener(this.listener); } MediaQuery.prototype = { constuctor : MediaQuery, /** * add a handler for this query, triggering if already active * * @param {object} handler * @param {function} handler.match callback for when query is activated * @param {function} [handler.unmatch] callback for when query is deactivated * @param {function} [handler.setup] callback for immediate execution when a query handler is registered * @param {boolean} [handler.deferSetup=false] should the setup callback be deferred until the first time the handler is matched? */ addHandler : function(handler) { var qh = new QueryHandler(handler); this.handlers.push(qh); this.matches() && qh.on(); }, /** * removes the given handler from the collection, and calls it's destroy methods * * @param {object || function} handler the handler to remove */ removeHandler : function(handler) { var handlers = this.handlers; each(handlers, function(h, i) { if(h.equals(handler)) { h.destroy(); return !handlers.splice(i,1); //remove from array and exit each early } }); }, /** * Determine whether the media query should be considered a match * * @return {Boolean} true if media query can be considered a match, false otherwise */ matches : function() { return this.mql.matches || this.isUnconditional; }, /** * Clears all handlers and unbinds events */ clear : function() { each(this.handlers, function(handler) { handler.destroy(); }); this.mql.removeListener(this.listener); this.handlers.length = 0; //clear array }, /* * Assesses the query, turning on all handlers if it matches, turning them off if it doesn't match */ assess : function() { var action = this.matches() ? 'on' : 'off'; each(this.handlers, function(handler) { handler[action](); }); } }; module.exports = MediaQuery; /***/ }), /***/ "t33o": /***/ (function(module, exports) { // removed by extract-text-webpack-plugin module.exports = {"header":"header___3q_q8","logo":"logo___3xvRr","commandMenu":"commandMenu___2iS3A","selected":"selected___1UtFO","dark":"dark___1ed9m"}; /***/ }), /***/ "t45Z": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; __webpack_require__("baa2"); var _icon = _interopRequireDefault(__webpack_require__("FC3+")); var _objectSpread2 = _interopRequireDefault(__webpack_require__("+TWC")); var _toConsumableArray2 = _interopRequireDefault(__webpack_require__("V4Os")); var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); var _dva = __webpack_require__("S6G3"); var _TypeData = __webpack_require__("HV3m"); var _AttendanceItem = _interopRequireDefault(__webpack_require__("pX1H")); var _api = __webpack_require__("H/Zg"); var _dec, _class; //按照类型 function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } var TypeAttendance = exports.default = (_dec = (0, _dva.connect)(function (state) { return { selectedId: state.command.attendanceList.selectedId, attendanceList: state.command.attendanceList.list, tabIndex2: state.command.tabIndex.attendance.tabIndex2, attendanceTypeList: state.command.attendanceList.typeList }; }), _dec(_class = /*#__PURE__*/function (_Component) { function TypeAttendance(props) { var _this; (0, _classCallCheck2.default)(this, TypeAttendance); _this = _callSuper(this, TypeAttendance, [props]); _this.state = { tabKey: "2", currentKey: null, //主要用于处理tab页面改变,不让重新请求数据 comTypeList: [], height: null, data: _TypeData.data, pageSearch: { pageNumber: 1, pageSize: 100 }, currentAttendanceTypeList: [], loadingText: "暂无数据", //类型下的搜索驻勤点的加载状态 typeLoadingText: "暂无数据" //类型的加载状态 }; return _this; } (0, _inherits2.default)(TypeAttendance, _Component); return (0, _createClass2.default)(TypeAttendance, [{ key: "componentDidMount", value: function componentDidMount() { var height = document.documentElement.clientHeight - 120 - 130; this.setState({ height: height }); //获取该公司拥有的驻勤点类型 this.getCurrentType(); } }, { key: "componentWillReceiveProps", value: function componentWillReceiveProps(nextProps) { if (nextProps.tabIndex2 == this.state.tabKey && this.props.attendanceTypeList.length > 0 && nextProps.tabIndex2 !== this.state.currentKey) { this.props.dispatch({ type: "command/fetchAllAttendanceList", payload: { attendanceList: (0, _toConsumableArray2.default)(this.props.attendanceTypeList) } }); this.setState({ currentKey: nextProps.tabIndex2 }); } if (nextProps.tabIndex2 != this.state.tabKey) { this.setState({ currentKey: null }); } } //获取驻勤点类型 }, { key: "getCurrentType", value: function getCurrentType() { var _this2 = this; this.setState({ typeLoadingText: "正在加载中..." }); (0, _api.getComTaskStationType)({}).then(function (res) { _this2.setState({ comTypeList: res.data, typeLoadingText: res.data.length > 0 ? "加载完成" : "暂无数据" }); if (res.retType === "0" && res.data.length > 0) { var _data = _this2.state.data; var comTypeList = res.data; for (var i = 0; i < comTypeList.length; i++) { comTypeList[i].whetherClick = false; for (var j = 0; j < _data.length; j++) { if (comTypeList[i].taskStationType == _data[j].key) { // data[j].whetherHas = true; // data[j].whetherClick = true; comTypeList[i].name = _data[j].title; comTypeList[i].markerIcon = _data[j].markerIcon; comTypeList[i].clickMarkerIcon = _data[j].clickMarkerIcon; } } //如果没有就用默认的值 if (!comTypeList[i].markerIcon) { comTypeList[i].markerIcon = _data[_data.length - 1].markerIcon; comTypeList[i].clickMarkerIcon = _data[_data.length - 1].clickMarkerIcon; } } _this2.setState({ comTypeList: comTypeList }); } }); } //获取驻勤点 }, { key: "getAttendanceList", value: function getAttendanceList(taskStationType, pageSearch, index) { var _this3 = this; this.setState({ loadingText: "正在加载中..." }); (0, _api.getComTaskList)((0, _objectSpread2.default)({}, pageSearch, { taskStationType: taskStationType })).then(function (res) { if (res.retType === "0" && res.data.data.length > 0) { var list = res.data.data; var comTypeList = _this3.state.comTypeList; var _data2 = comTypeList[index].attendanceList || []; _data2.push.apply(_data2, (0, _toConsumableArray2.default)(list)); _data2.forEach(function (element, i) { _data2[i].markerIcon = comTypeList[index].markerIcon; _data2[i].clickMarkerIcon = comTypeList[index].clickMarkerIcon; }); comTypeList[index].attendanceList = _data2; _this3.setState({ comTypeList: comTypeList }); if (res.data.total > pageSearch.pageNumber * pageSearch.pageSize) { _this3.getAttendanceList(taskStationType, { pageNumber: pageSearch.pageNumber + 1, pageSize: pageSearch.pageSize }, index); } else { var allAttentanceList = []; comTypeList.map(function (item) { if (item.attendanceList && item.attendanceList.length > 0) { allAttentanceList.push.apply(allAttentanceList, (0, _toConsumableArray2.default)(item.attendanceList)); } }); _this3.props.dispatch({ type: "command/fetchAllAttendanceList", payload: { // attendanceList: [ // ...comTypeList[index].attendanceList, // ...this.props.attendanceTypeList, // ], attendanceList: comTypeList[index].attendanceList } }); _this3.props.dispatch({ type: "command/fetchAllAttendanceTypeList", payload: // [ // ...comTypeList[index].attendanceList, // ...this.props.attendanceTypeList, // ], comTypeList[index].attendanceList }); _this3.setState({ loadingText: "加载完成" }); } } }); } }, { key: "render", value: function render() { var _this4 = this; return /*#__PURE__*/_react.default.createElement("div", { className: "data-list type-attendance search-list_command" }, /*#__PURE__*/_react.default.createElement("div", { className: "list", style: { maxHeight: this.state.height, overflow: "auto" } }, this.state.comTypeList.length > 0 ? this.state.comTypeList.map(function (item, index) { return /*#__PURE__*/_react.default.createElement("div", { key: index }, /*#__PURE__*/_react.default.createElement("div", { className: "list-item", onClick: function onClick() { var comTypeList = _this4.state.comTypeList; if (comTypeList[index].whetherClick) { // //如果本来是打开的时候,要关闭 comTypeList[index].whetherClick = false; _this4.props.dispatch({ type: "command/fetchAllAttendanceList", payload: { attendanceList: [] } }); _this4.props.dispatch({ type: "command/fetchAllAttendanceTypeList", payload: [] }); } else { //先把之前的数据清空 _this4.props.dispatch({ type: "command/fetchAllAttendanceList", payload: { attendanceList: [] } }); _this4.props.dispatch({ type: "command/fetchAllAttendanceTypeList", payload: [] }); //本来关闭,要把它打开,先关闭其他人的 comTypeList = JSON.parse(JSON.stringify(comTypeList).replace(/whetherClick":true/g, 'whetherClick":false')); comTypeList[index].whetherClick = true; if (item.attendanceList == undefined) { //如果本来没有值,就要请求 _this4.getAttendanceList(item.taskStationType, _this4.state.pageSearch, index); } else { //否则已经请求过的,就直接从列表中拉出来就可以 _this4.props.dispatch({ type: "command/fetchAllAttendanceList", payload: { attendanceList: item.attendanceList } }); _this4.props.dispatch({ type: "command/fetchAllAttendanceTypeList", payload: item.attendanceList }); } } if (_this4.props.selectedId) { //如果有选中的点,就要关闭 _this4.props.dispatch({ type: "command/setSelectIndex", payload: null }); _this4.props.dispatch({ type: "command/clearInfoWindow", payload: true }); } _this4.setState({ comTypeList: comTypeList }); } }, /*#__PURE__*/_react.default.createElement("span", null, item.name ? item.name + "(" + item.sl + ")" : "其他(" + item.sl + ")"), /*#__PURE__*/_react.default.createElement("span", { className: "up-down-icon" }, item.whetherClick ? /*#__PURE__*/_react.default.createElement(_icon.default, { type: "down", style: { fontSize: "10px" } }) : /*#__PURE__*/_react.default.createElement(_icon.default, { type: "up", style: { fontSize: "10px" } }))), /*#__PURE__*/_react.default.createElement("div", { className: "list-item-child" }, item.whetherClick && /*#__PURE__*/ // item.attendanceList && // item.attendanceList.length > 0 && _react.default.createElement(_AttendanceItem.default, { data: item.attendanceList, loadingText: _this4.state.loadingText }))); }) : /*#__PURE__*/_react.default.createElement("div", { style: { textAlign: "center", fontSize: "14px", color: "#afb0b1" } }, this.state.typeLoadingText))); } }]); }(_react.Component)) || _class); /***/ }), /***/ "t5Df": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Switch; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__("GiK3"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__("KSGD"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_rc_switch__ = __webpack_require__("DSNT"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_rc_switch___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_rc_switch__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames__ = __webpack_require__("kTQ8"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_omit_js__ = __webpack_require__("JkBm"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__util_wave__ = __webpack_require__("J7eb"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__icon__ = __webpack_require__("FC3+"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__config_provider__ = __webpack_require__("PmSq"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__util_warning__ = __webpack_require__("qGip"); function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _extends() { _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; }; return _extends.apply(this, arguments); } 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; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } var Switch = /*#__PURE__*/function (_React$Component) { _inherits(Switch, _React$Component); var _super = _createSuper(Switch); function Switch(props) { var _this; _classCallCheck(this, Switch); _this = _super.call(this, props); _this.saveSwitch = function (node) { _this.rcSwitch = node; }; _this.renderSwitch = function (_ref) { var _classNames; var getPrefixCls = _ref.getPrefixCls; var _this$props = _this.props, customizePrefixCls = _this$props.prefixCls, size = _this$props.size, loading = _this$props.loading, _this$props$className = _this$props.className, className = _this$props$className === void 0 ? '' : _this$props$className, disabled = _this$props.disabled; var prefixCls = getPrefixCls('switch', customizePrefixCls); var classes = __WEBPACK_IMPORTED_MODULE_3_classnames___default()(className, (_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-small"), size === 'small'), _defineProperty(_classNames, "".concat(prefixCls, "-loading"), loading), _classNames)); var loadingIcon = loading ? /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createElement"](__WEBPACK_IMPORTED_MODULE_6__icon__["default"], { type: "loading", className: "".concat(prefixCls, "-loading-icon") }) : null; return /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createElement"](__WEBPACK_IMPORTED_MODULE_5__util_wave__["a" /* default */], { insertExtraNode: true }, /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createElement"](__WEBPACK_IMPORTED_MODULE_2_rc_switch___default.a, _extends({}, Object(__WEBPACK_IMPORTED_MODULE_4_omit_js__["a" /* default */])(_this.props, ['loading']), { prefixCls: prefixCls, className: classes, disabled: disabled || loading, ref: _this.saveSwitch, loadingIcon: loadingIcon }))); }; Object(__WEBPACK_IMPORTED_MODULE_8__util_warning__["a" /* default */])('checked' in props || !('value' in props), 'Switch', '`value` is not validate prop, do you mean `checked`?'); return _this; } _createClass(Switch, [{ key: "focus", value: function focus() { this.rcSwitch.focus(); } }, { key: "blur", value: function blur() { this.rcSwitch.blur(); } }, { key: "render", value: function render() { return /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createElement"](__WEBPACK_IMPORTED_MODULE_7__config_provider__["ConfigConsumer"], null, this.renderSwitch); } }]); return Switch; }(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]); Switch.__ANT_SWITCH = true; Switch.propTypes = { prefixCls: __WEBPACK_IMPORTED_MODULE_1_prop_types__["string"], // HACK: https://github.com/ant-design/ant-design/issues/5368 // size=default and size=large are the same size: __WEBPACK_IMPORTED_MODULE_1_prop_types__["oneOf"](['small', 'default', 'large']), className: __WEBPACK_IMPORTED_MODULE_1_prop_types__["string"] }; /***/ }), /***/ "t9eP": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; __webpack_require__("/m1I"); var _tooltip = _interopRequireDefault(__webpack_require__("O6j2")); var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); var _dva = __webpack_require__("S6G3"); var _dec, _class; /** * 切换地图3D按钮 */ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } var Switch3D = exports.default = (_dec = (0, _dva.connect)(function (state) { return { mapStyle: state.command.mapStyle, switchOpenStatus: state.command.switchOpenStatus, gITFPoint: state.command.gITFPoint, object3Dlayer: state.command.object3Dlayer }; }), _dec(_class = /*#__PURE__*/function (_Component) { function Switch3D(props) { var _this; (0, _classCallCheck2.default)(this, Switch3D); _this = _callSuper(this, Switch3D, [props]); _this.state = {}; return _this; } (0, _inherits2.default)(Switch3D, _Component); return (0, _createClass2.default)(Switch3D, [{ key: "change3D", value: function change3D() { var _this2 = this; var is3D = !this.props.switchOpenStatus.is3D; if (is3D) { this.props.localMap.setPitch(50); } else { this.props.localMap.setPitch(0); if (this.props.object3Dlayer) { var gITFPoint = this.props.gITFPoint.map(function (item) { item.isShow = false; if (item.cityMeshes) { _this2.props.object3Dlayer.remove(item.cityMeshes); } return item; }); this.props.dispatch({ type: "command/changeGITFPoint", payload: gITFPoint }); } } this.props.dispatch({ type: "command/setSwitchOpenStatus", payload: { type: 'is3D', value: is3D } }); if (this.props.gITFPoint && this.props.gITFPoint.length) { var lng = this.props.gITFPoint[0].lng; //经度 var lat = this.props.gITFPoint[0].lat; //纬度 setTimeout(function () { //3d模型自动定位到第一个模型的经纬度 _this2.props.localMap.setCenter([lng, lat]); //设置中心位置 _this2.props.localMap.setZoom(16); //设置缩放比例,越大看到具体 }, 100); } } }, { key: "render", value: function render() { var mapStyle = this.props.mapStyle; return /*#__PURE__*/_react.default.createElement("div", { className: "switch map" }, /*#__PURE__*/_react.default.createElement(_tooltip.default, { title: "3D\u6A21\u578B" }, /*#__PURE__*/_react.default.createElement("div", { className: "layer-btn", onClick: this.change3D.bind(this) }, /*#__PURE__*/_react.default.createElement("img", { className: "layer-img", src: // this.state.visible this.props.switchOpenStatus.is3D ? __webpack_require__("z9Xj") : mapStyle == 'dark' ? __webpack_require__("DXmu") : __webpack_require__("gcBW") })))); } }]); }(_react.Component)) || _class); /***/ }), /***/ "tDqI": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__style_index_less__ = __webpack_require__("vtiu"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__style_index_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__style_index_less__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__index_less__ = __webpack_require__("QF8I"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__index_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__index_less__); /***/ }), /***/ "tIHZ": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__style_index_less__ = __webpack_require__("vtiu"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__style_index_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__style_index_less__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__index_less__ = __webpack_require__("04BU"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__index_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__index_less__); // style dependencies // deps-lint-skip: tooltip /***/ }), /***/ "tSRs": /***/ (function(module, exports) { // removed by extract-text-webpack-plugin /***/ }), /***/ "tVfF": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; __webpack_require__("UQ5M"); var _message2 = _interopRequireDefault(__webpack_require__("/qCn")); var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); __webpack_require__("/fxC"); var _api = __webpack_require__("H/Zg"); var _reactAudioAnalyser = _interopRequireDefault(__webpack_require__("Cc6B")); function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /** * 录音页面 */ var Record = exports.default = /*#__PURE__*/function (_Component) { function Record(props) { var _this; (0, _classCallCheck2.default)(this, Record); _this = _callSuper(this, Record, [props]); _this.state = { status: '', audioSrc: null, //下载的路径 whichPlace: '', //是在哪里引用的音频样式 // uploadVideoStr: '', //下载下来的mp3路径 recordRun: false, //录音是否有在运行,默认是没有在运行的 recordStop: false, //是否停止了 timer: 0, //该录音真正的时长 idx: 0, //用来记录时长(包括暂停的动作) playState: false, //是否播放音频 where: props.where || 'dialog', //'index是在地图页面,dialog是在对话中' blob: null, //录制完的音频流 startRecord: props.startRecord || false //是否开始录音 }; return _this; } (0, _inherits2.default)(Record, _Component); return (0, _createClass2.default)(Record, [{ key: "componentDidMount", value: function componentDidMount() { if (this.state.startRecord) { //开始录音 this.controlAudio('recording'); this.setState({ recordRun: true, recordStop: false }); this.timer(); } // 隐藏左侧菜单栏 // document.querySelector('.ant-layout-header').style.display = 'none'; // document.querySelector('.ant-layout-sider').style.display = 'none'; // document.querySelector('.ant-layout-content').style.margin = '0px'; // document.querySelector('.oneKeySearchHidden').style.display = 'none'; } }, { key: "componentWillReceiveProps", value: function componentWillReceiveProps(nextProps) { this.setState({ startRecord: nextProps.startRecord }); } //设置计时器 }, { key: "timer", value: function timer() { // let idx = 0; var that = this; var interval = setInterval(function () { //还没停止 if (!that.state.recordStop) { if (that.state.recordRun) { // idx += 1; that.setState({ timer: that.state.idx + 1, idx: that.state.idx + 1 }); //如果时长等于1分钟的话,就停止录音 if (that.state.idx === 60) { _message2.default.warning('最长录音一分钟'); that.controlAudio('inactive'); that.setState({ recordStop: true }); } } } else { console.log('停止了'); //停止的时候就清空计时器 clearInterval(interval); that.setState({ idx: 0 }); } }, 1000); } //发送出去im的语音消息(发送之前先把音频流上传到服务器,拿服务器返回的地址发送给im) }, { key: "sendIm", value: function sendIm() { var that = this; var formData = new FormData(); formData.append('xfile', this.state.blob); var oReq = new XMLHttpRequest(); oReq.open('POST', // uploadUrl, _api.blobuploadUrl, // 'http://192.168.30.232:9093/public/common/file/upload-blob-file', true); oReq.onload = function (success) { console.log('success', success); var data = success.target.responseText && JSON.parse(success.target.responseText); console.log('data发送语音', data); if (data.retType === '0') { that.props.sendSound(data.data, that.state.timer, that.state); } else { _message2.default.error("发送失败,请重新尝试"); } that.resetSound(); //发送出去之后,重新计算录音 }; oReq.onerror = function (err) { console.log(err + '出错了'); }; oReq.send(formData); } //重新录音 }, { key: "resetSound", value: function resetSound() { this.controlAudio('inactive'); this.setState({ timer: 0, idx: 0, recordStop: true, blob: null }); } }, { key: "controlAudio", value: function controlAudio(status) { this.setState({ status: status }); } }, { key: "render", value: function render() { var _this2 = this; var _this$state = this.state, status = _this$state.status, audioSrc = _this$state.audioSrc, audioType = _this$state.audioType; var audioProps = { audioType: 'audio/mp3', // audioOptions: {sampleRate: 30000}, // 设置输出音频采样率 status: status, audioSrc: audioSrc, timeslice: 1000, // timeslice(https://developer.mozilla.org/en-US/docs/Web/API/MediaRecorder/start#Parameters) strokeColor: '#0F71FF', backgroundColor: '#ffffff', width: 300, startCallback: function startCallback(e) { console.log('succ start', e); }, pauseCallback: function pauseCallback(e) { console.log('succ pause', e); }, stopCallback: function stopCallback(e) { console.log(e); _this2.setState({ audioSrc: window.URL.createObjectURL(e), blob: e }); var messageListNode = _this2.refs.videoDom; messageListNode.src = window.URL.createObjectURL(e); // let messageListNode = this.refs.down; // messageListNode.click(); }, onRecordCallback: function onRecordCallback(e) { console.log('recording', e); }, errorCallback: function errorCallback(err) { console.log('error', err); if (err.name === 'NotAllowedError') { _message2.default.error("请允许打开麦克风,才能收集到声音"); } else { _message2.default.error("当前浏览器已禁止录音功能,请更换浏览器"); } // message.warning('请检查是'); } }; return /*#__PURE__*/_react.default.createElement("div", { className: "record" // style={{ marginLeft: '-300px', marginTop: '370px' }} , style: { marginLeft: this.state.where === 'dialog' ? '-300px' : '', marginTop: this.state.where === 'dialog' ? '370px' : '', position: this.state.where === 'dialog' ? 'absolute' : '', width: this.state.where === 'index' ? '' : '300px' } }, /*#__PURE__*/_react.default.createElement("div", { style: { display: this.state.recordStop && this.state.timer > 0 ? 'none' : 'block' } }, /*#__PURE__*/_react.default.createElement(_reactAudioAnalyser.default, audioProps)), /*#__PURE__*/_react.default.createElement("div", { className: "record-sound", style: { display: this.state.recordStop && this.state.timer > 0 ? 'block' : 'none' }, onClick: function onClick() { //播放自己录音的音频 _this2.setState({ playState: true }); var messageListNode = _this2.refs.videoDom; var promise = messageListNode.play(); if (promise) { promise.catch(function (err) { console.log('播放失败'); }).then(function (res) { console.log('播放成功'); }); } var that = _this2; messageListNode.onended = function () { console.log('音频播放结束'); that.setState({ playState: false }); }; } }, /*#__PURE__*/_react.default.createElement("img", { className: "sound-img", src: this.state.playState ? __webpack_require__("XSR2") : __webpack_require__("s9W7") }), this.state.timer + '"'), /*#__PURE__*/_react.default.createElement("audio", { controls: true, ref: "videoDom", style: { display: 'none' } }), /*#__PURE__*/_react.default.createElement("div", { className: "btn-box" }, /*#__PURE__*/_react.default.createElement("span", { style: { display: this.state.timer > 0 ? 'inline-block' : 'none', width: '60px' }, onClick: function onClick() { _this2.resetSound(); } }, "\u91CD\u65B0\u5F55\u97F3"), status !== 'recording' && /*#__PURE__*/_react.default.createElement("span", { style: { display: 'inline-block', width: '50px' }, onClick: function onClick() { _this2.controlAudio('recording'); _this2.setState({ recordRun: true, recordStop: false }); _this2.timer(); } }, "\u5F00\u59CB"), status === 'recording' && /*#__PURE__*/_react.default.createElement("span", { style: { display: 'inline-block', width: '50px' }, onClick: function onClick() { _this2.controlAudio('paused'); _this2.setState({ recordRun: false }); } }, "\u6682\u505C"), /*#__PURE__*/_react.default.createElement("span", { style: { display: 'inline-block', width: '50px' }, onClick: function onClick() { //还没有开始录音就点击了停止 if (_this2.state.timer === 0) { _message2.default.warning('请先开始录音'); return; } _this2.controlAudio('inactive'); _this2.setState({ recordStop: true }); } }, "\u505C\u6B62"), /*#__PURE__*/_react.default.createElement("span", { style: { display: this.state.recordStop && this.state.timer > 0 ? 'inline-block' : 'none', width: '50px' }, onClick: function onClick() { _this2.sendIm(); } }, "\u53D1\u9001"))); } }]); }(_react.Component); /***/ }), /***/ "tiui": /***/ (function(module, exports, __webpack_require__) { var map = { "./float-check.png": "Pe7w", "./magnify-check.png": "9rO7", "./minimize-check.png": "TGlF" }; function webpackContext(req) { return __webpack_require__(webpackContextResolve(req)); }; function webpackContextResolve(req) { var id = map[req]; if(!(id + 1)) // check for number or string throw new Error("Cannot find module '" + req + "'."); return id; }; webpackContext.keys = function webpackContextKeys() { return Object.keys(map); }; webpackContext.resolve = webpackContextResolve; module.exports = webpackContext; webpackContext.id = "tiui"; /***/ }), /***/ "tjvM": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Popover; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__("GiK3"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__tooltip__ = __webpack_require__("O6j2"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__config_provider__ = __webpack_require__("PmSq"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_warning__ = __webpack_require__("qGip"); function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _extends() { _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; }; return _extends.apply(this, arguments); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } var __rest = this && this.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var Popover = /*#__PURE__*/function (_React$Component) { _inherits(Popover, _React$Component); var _super = _createSuper(Popover); function Popover() { var _this; _classCallCheck(this, Popover); _this = _super.apply(this, arguments); _this.saveTooltip = function (node) { _this.tooltip = node; }; _this.renderPopover = function (_ref) { var getPrefixCls = _ref.getPrefixCls; var _a = _this.props, customizePrefixCls = _a.prefixCls, props = __rest(_a, ["prefixCls"]); delete props.title; var prefixCls = getPrefixCls('popover', customizePrefixCls); return /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createElement"](__WEBPACK_IMPORTED_MODULE_1__tooltip__["default"], _extends({}, props, { prefixCls: prefixCls, ref: _this.saveTooltip, overlay: _this.getOverlay(prefixCls) })); }; return _this; } _createClass(Popover, [{ key: "getPopupDomNode", value: function getPopupDomNode() { return this.tooltip.getPopupDomNode(); } }, { key: "getOverlay", value: function getOverlay(prefixCls) { var _this$props = this.props, title = _this$props.title, content = _this$props.content; Object(__WEBPACK_IMPORTED_MODULE_3__util_warning__["a" /* default */])(!('overlay' in this.props), 'Popover', '`overlay` is removed, please use `content` instead, ' + 'see: https://u.ant.design/popover-content'); return /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createElement"]("div", null, title && /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createElement"]("div", { className: "".concat(prefixCls, "-title") }, title), /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createElement"]("div", { className: "".concat(prefixCls, "-inner-content") }, content)); } }, { key: "render", value: function render() { return /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createElement"](__WEBPACK_IMPORTED_MODULE_2__config_provider__["ConfigConsumer"], null, this.renderPopover); } }]); return Popover; }(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]); Popover.defaultProps = { placement: 'top', transitionName: 'zoom-big', trigger: 'hover', mouseEnterDelay: 0.1, mouseLeaveDelay: 0.1, overlayStyle: {} }; /***/ }), /***/ "uCi2": /***/ (function(module, exports, __webpack_require__) { var castPath = __webpack_require__("bIjD"), toKey = __webpack_require__("Ubhr"); /** * The base implementation of `_.get` without support for default values. * * @private * @param {Object} object The object to query. * @param {Array|string} path The path of the property to get. * @returns {*} Returns the resolved value. */ function baseGet(object, path) { path = castPath(path, object); var index = 0, length = path.length; while (object != null && index < length) { object = object[toKey(path[index++])]; } return (index && index == length) ? object : undefined; } module.exports = baseGet; /***/ }), /***/ "uGaE": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAiCAYAAAC0nUK+AAAAAXNSR0IArs4c6QAABNFJREFUSA2VVmtMXFUQnrl3d6FbnstDRCWa/gAKRROItTWAtDHaRNQfJg01+oekodZXtFFoYsXEthirqa9YrdUfTdvYqlFp0loVWDQxDQW1wtIQJTY1TZcFCruw3dc9x5kLl9y7r8L3Y8+ZmW++87hzzlmENLhe2dAgJDQLkE2AWIogCyTgNEr4DwHcCsL3eR73L4jkSQLiJMJX1diEQnZJKe9NjFo9CDggVXy1aMTda40AWMRlZ6cydbJnrxSynYlKSTFkND8IjsYNoN5RCpiXC3JmFrQrVyHi/g3C3T+CuDahayqovO3a2tSOnZ0ifhCgWeJkRf0pX0W99K3bJOc/OyZFOEzu1OA485jPeZOVDV/zBBPEfWvr39AJG5tl5PfhpIozT+6UUxSPB/Mnyb84wJuGuD7KVHXDRhTwGtjtkPPRfrDfU2XELa2YnAa17DaLjw3mcx7n0xbsnl7bWL9Eou3o5VF5iamgTUzKmGcsVVj361vE21rZ4GZx9FU/UAcxbYA/Xv4PxwEdjqVBjY42Ng7+ZzpAhsOQ8+E+CH93FpzPtQLm5xoUvZWRCFx/aJv+kVGF9QoIrZkjXBXJhCM9v8JMyw4QXh/IwDwEXtwD4dM/wXzXBxZhNjifdRhSKI+QOGxmg8stGeZ27wcZvAHZ774OuUffB41KTwTmQExMJaMv6aCUm210uspow/Q6NtixkTGIDY/qppgN6G3o5GmQkbBBAW38MoROfEvTRbCtqwBbVbke4/OwiDL0VTSEaBEZBX/+TMuir02YrnsYxHxwkXPzRlntBNeFszpRRqIwdTdvBoYVuhbm2csnz8BKhDnHzDd0WJfqHL1M4COdDvbqCsja8xLYyteko5l08KoCEoaYzXdFOjhfboPMlsdh9a4d6WhmnSFFKnCG2XwJcZ0yHPfV6q3xg5kZoN5+q27yCWXbDIPP+azDQEXpxqn1W3Kkf+5fKph85642cLZuM+etqB88chyCBw5xjq/QseoupeD8GT+N8w57gu8dgegfI9xdMTiP8xn0iOzDi+f4gwIU2DMPUr2PQjQK/p0dKx6AhTmP86nuh1x3Zn3MukuPha+mqRwjsQF6r7L5dnO+0Aqrnnoi6ZXAiQze4xtHv1qYMQsDTCg2rCsY7r/CxpI4G3RVbhFCdkuQKtsreYlIKYho21To6T3PuQyLODt8FY3b6Vh8wv3lgrY0RqfxUZfHrVeekZfwJBVdcn+qAB4wCMtpSXx7vDDnJYiz01WidFBC+lPFRAbC4QKP+4sFw/qbVBz7+mIq2FpogBkrPcG6WHiL+nyCd9GRVJxj+aM9lyXCs6kSacphtKtbaSJ0qyZHSnGmF3n6j9HsF85zXL6Ccm/hX32X4twWM604M22qjW4qtMyOBhx1KSVvWZSSGDcVzxvu+YdIXeZcOgRtOHJq4ZYzB+L6CXVujtfW1jqj0airMgrFB2XuORvdFH4U/Y+ps22KogTsdvv04OBgyidLP4lmQaNfU1NTHAqF1mialuUFDe+Xjkgxqhu+xGD7BREOsJ8GLiotLdW8Xq/+mhm5RptyW4QQJQaJ21eE/5txqX1+WAb/NvvjeeZYSnFa9jUzcUYVsadx+pDZx/14njm+rD2n2WXT3w8HtSqJaVQtkeXs+f+b4oc2UMjrzQAAAABJRU5ErkJggg==" /***/ }), /***/ "uJF6": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return TreeContext; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ant_design_create_react_context__ = __webpack_require__("83O8"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ant_design_create_react_context___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__ant_design_create_react_context__); var TreeContext = __WEBPACK_IMPORTED_MODULE_0__ant_design_create_react_context___default()(null); /***/ }), /***/ "uZ7l": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAiCAYAAAC0nUK+AAAAAXNSR0IArs4c6QAABHFJREFUSA2tVm9oW1UUP+e9/HFxie3LWjQbhTlBOkY/2Dq2gp1tdTrQgeAcg33Zl7KB9IN/tjQiVLRbwlTQT7qB84NCdTjBgsXYdGwddNK1iMgUnFOZK8baNCQuS1/y3vWcl7x68/rSdboD4Zx7/vzuvSfnnvMQVqCd8YWusmk+DSC6UUAEAMMCRYbk30HBcyoqX3x1pGECkTQuhC466B1a6AYw4wLEVje7rEOEKRDqkdQrjWdlPcs14INCKOePzQ+BgCgbm4IK9G7xwbYHfBBpVCG0BiF3U8DsggEXr+iQ+l6HubzJrgSExx+JadFBxIrC0lkmurgQ+NixzKfEn/WqAAd2BOCZjrvA56nZv+pdYXpZwOeXinDqXAFKBqPhma4BbY+9AcFU6IK//zUCPtQQQEjsC0H3Zj+oSn1gjmL7lg1eeGijFyZ/0qFYEq3XJhY9V8cT42y3onfG5zvLJlzwKgLf3h+Czeu9bKuh3qPzNWt5kYqF4fL1ErzwUQ5KJgpK0Y5UTJtQ2MkwBeVZIKfCDVgGqidzHMczDmXgDfZTHk9kO4SAR/nP4xyvRHxC/jHJsh3D8YxDO3T1JP7a6jENg+oYrKqw/7ypqyXb3+IP3788TTUO1QXHc3UNTxYBy/iUh6q/l21cbjZFh3O2aHH7tHLeZVl2ZhwGZ1yF3lYLG7mO7wQt4SC0KICimUH5gcjkllNZJ8tynI2DIJoUEHiDjfzy7gQt4RCuhwDT9NP4SYfXWpVp7eGWU1kny/KhGIeJin2W0zLDC+4VMrldW9bJshxn49BTmiFwZZSN3IS4V/wf4njGsQjFCO56dz60+Df8Si+rsa8nAHu3rQHnlddrKlzPVK7rtjnfgumTizfhxHiBm8qcxxveqIz2h3OUmrfYyN2Ne4STVgK2fTmO4yuER5Mv441K4zou7jb0zBQNh1buiq/vCd5Wj2HgV0/nIVsQ3AlnfMFw52g/Li4V95OJ3IO6odNUgeB/7ec0lf5U/diRfDF8jW+wBM6LnnhmF5pihLqa9VxvbxJBQUXoScbWfcNYTDXgrKBp1Gea5vssr56wDCruHo9qVuXZcf++mqpmbEA7QePqTdthNZwGUp8TmOOWgbOya7s2QJ8LkyzfkhBPjsXCp9z8XMEHu7Hs9yn7KGtZtyBbRwf4ruU+rd9eO7krODt9+VLjb6jg884Ae02VsaiCd++HB7Bo65y8Ljg7pga0j+l0XzuDrDXiUDIW+tHVVlWuCM4+Po96iFjN6Wi6/6Bt0hJVjLrsluCjhxt+pu/CuIygqsrB089hbRuVHarysjqXfdrb2wOlUkmDe1qb1z3xThLQExZ67vzcZ7sPKoqS93q9menpabuhyKGWXHdwtrW1NReLxU2GYaw1Cmn0b+jUPYHm7fnLw9Hi7KU862njpkgkYqTTaWuaOdHrpoVe6b2yc2bs8Bk9+8sH+W9PXpH1Tj/ZVhecrv2H7Gjq2fLcyP73ZB3LTj/Zvqqc0+mC1Mx8xFUCM6g89dXk/B9SctM5kNKXQAAAAABJRU5ErkJggg==" /***/ }), /***/ "ue1L": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); __webpack_require__("yQBS"); var _tabs = _interopRequireDefault(__webpack_require__("qA/u")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); var _AllAttendance = _interopRequireDefault(__webpack_require__("Xn8A")); var _TypeAttendance = _interopRequireDefault(__webpack_require__("t45Z")); var _dva = __webpack_require__("S6G3"); var _dec, _class; function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } var TabPane = _tabs.default.TabPane; var Attendance = exports.default = (_dec = (0, _dva.connect)(function (state) { return { tabIndex: state.command.tabIndex }; }), _dec(_class = /*#__PURE__*/function (_PureComponent) { function Attendance(props) { var _this; (0, _classCallCheck2.default)(this, Attendance); _this = _callSuper(this, Attendance, [props]); _this.state = { visible: props.visible }; return _this; } (0, _inherits2.default)(Attendance, _PureComponent); return (0, _createClass2.default)(Attendance, [{ key: "componentWillReceiveProps", value: function componentWillReceiveProps(nextProps) { if (nextProps.visible !== this.state.visible) { this.setState({ visible: nextProps.visible }); } } }, { key: "render", value: function render() { var _this2 = this; return /*#__PURE__*/_react.default.createElement("div", { className: "child-searchList", style: { display: this.state.visible ? "block" : "none" } }, /*#__PURE__*/_react.default.createElement(_tabs.default, { defaultActiveKey: this.props.tabIndex.attendance.tabIndex2 || "1", onChange: function onChange(index) { _this2.props.dispatch({ type: "command/setTabIndex", payload: { attendance: { tabIndex2: index } // tabIndex2: "1", } }); _this2.props.dispatch({ type: 'command/clearInfoWindow', payload: true }); } }, /*#__PURE__*/_react.default.createElement(TabPane, { tab: "\u6240\u6709\u9A7B\u52E4\u70B9", key: "1" }, /*#__PURE__*/_react.default.createElement(_AllAttendance.default, { key: "1" })))); } }]); }(_react.PureComponent)) || _class); /***/ }), /***/ "ujcs": /***/ (function(module, exports) { /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ exports.read = function (buffer, offset, isLE, mLen, nBytes) { var e, m var eLen = (nBytes * 8) - mLen - 1 var eMax = (1 << eLen) - 1 var eBias = eMax >> 1 var nBits = -7 var i = isLE ? (nBytes - 1) : 0 var d = isLE ? -1 : 1 var s = buffer[offset + i] i += d e = s & ((1 << (-nBits)) - 1) s >>= (-nBits) nBits += eLen for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {} m = e & ((1 << (-nBits)) - 1) e >>= (-nBits) nBits += mLen for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {} if (e === 0) { e = 1 - eBias } else if (e === eMax) { return m ? NaN : ((s ? -1 : 1) * Infinity) } else { m = m + Math.pow(2, mLen) e = e - eBias } return (s ? -1 : 1) * m * Math.pow(2, e - mLen) } exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { var e, m, c var eLen = (nBytes * 8) - mLen - 1 var eMax = (1 << eLen) - 1 var eBias = eMax >> 1 var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0) var i = isLE ? 0 : (nBytes - 1) var d = isLE ? 1 : -1 var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0 value = Math.abs(value) if (isNaN(value) || value === Infinity) { m = isNaN(value) ? 1 : 0 e = eMax } else { e = Math.floor(Math.log(value) / Math.LN2) if (value * (c = Math.pow(2, -e)) < 1) { e-- c *= 2 } if (e + eBias >= 1) { value += rt / c } else { value += rt * Math.pow(2, 1 - eBias) } if (value * c >= 2) { e++ c /= 2 } if (e + eBias >= eMax) { m = 0 e = eMax } else if (e + eBias >= 1) { m = ((value * c) - 1) * Math.pow(2, mLen) e = e + eBias } else { m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen) e = 0 } } for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} e = (e << mLen) | m eLen += mLen for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} buffer[offset + i - d] |= s * 128 } /***/ }), /***/ "umy1": /***/ (function(module, exports, __webpack_require__) { var baseHas = __webpack_require__("mi9z"), hasPath = __webpack_require__("IGcM"); /** * Checks if `path` is a direct property of `object`. * * @static * @since 0.1.0 * @memberOf _ * @category Object * @param {Object} object The object to query. * @param {Array|string} path The path to check. * @returns {boolean} Returns `true` if `path` exists, else `false`. * @example * * var object = { 'a': { 'b': 2 } }; * var other = _.create({ 'a': _.create({ 'b': 2 }) }); * * _.has(object, 'a'); * // => true * * _.has(object, 'a.b'); * // => true * * _.has(object, ['a', 'b']); * // => true * * _.has(other, 'a'); * // => false */ function has(object, path) { return object != null && hasPath(object, path, baseHas); } module.exports = has; /***/ }), /***/ "uz+M": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); // EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/extends.js var helpers_extends = __webpack_require__("Dd8w"); var extends_default = /*#__PURE__*/__webpack_require__.n(helpers_extends); // EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/classCallCheck.js var classCallCheck = __webpack_require__("Zrlr"); var classCallCheck_default = /*#__PURE__*/__webpack_require__.n(classCallCheck); // EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/possibleConstructorReturn.js var possibleConstructorReturn = __webpack_require__("zwoO"); var possibleConstructorReturn_default = /*#__PURE__*/__webpack_require__.n(possibleConstructorReturn); // EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/inherits.js var inherits = __webpack_require__("Pf15"); var inherits_default = /*#__PURE__*/__webpack_require__.n(inherits); // EXTERNAL MODULE: ./node_modules/react/index.js var react = __webpack_require__("GiK3"); var react_default = /*#__PURE__*/__webpack_require__.n(react); // EXTERNAL MODULE: ./node_modules/react-dom/index.js var react_dom = __webpack_require__("O27J"); var react_dom_default = /*#__PURE__*/__webpack_require__.n(react_dom); // EXTERNAL MODULE: ./node_modules/prop-types/index.js var prop_types = __webpack_require__("KSGD"); var prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types); // EXTERNAL MODULE: ./node_modules/rc-util/es/KeyCode.js var KeyCode = __webpack_require__("opmb"); // EXTERNAL MODULE: ./node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js var react_lifecycles_compat_es = __webpack_require__("R8mX"); // CONCATENATED MODULE: ./node_modules/rc-calendar/es/date/DateConstants.js /* harmony default export */ var DateConstants = ({ DATE_ROW_COUNT: 6, DATE_COL_COUNT: 7 }); // EXTERNAL MODULE: ./node_modules/moment/moment.js var moment = __webpack_require__("PJh5"); var moment_default = /*#__PURE__*/__webpack_require__.n(moment); // CONCATENATED MODULE: ./node_modules/rc-calendar/es/date/DateTHead.js var DateTHead_DateTHead = function (_React$Component) { inherits_default()(DateTHead, _React$Component); function DateTHead() { classCallCheck_default()(this, DateTHead); return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments)); } DateTHead.prototype.render = function render() { var props = this.props; var value = props.value; var localeData = value.localeData(); var prefixCls = props.prefixCls; var veryShortWeekdays = []; var weekDays = []; var firstDayOfWeek = localeData.firstDayOfWeek(); var showWeekNumberEl = void 0; var now = moment_default()(); for (var dateColIndex = 0; dateColIndex < DateConstants.DATE_COL_COUNT; dateColIndex++) { var index = (firstDayOfWeek + dateColIndex) % DateConstants.DATE_COL_COUNT; now.day(index); veryShortWeekdays[dateColIndex] = localeData.weekdaysMin(now); weekDays[dateColIndex] = localeData.weekdaysShort(now); } if (props.showWeekNumber) { showWeekNumberEl = react_default.a.createElement( 'th', { role: 'columnheader', className: prefixCls + '-column-header ' + prefixCls + '-week-number-header' }, react_default.a.createElement( 'span', { className: prefixCls + '-column-header-inner' }, 'x' ) ); } var weekDaysEls = weekDays.map(function (day, xindex) { return react_default.a.createElement( 'th', { key: xindex, role: 'columnheader', title: day, className: prefixCls + '-column-header' }, react_default.a.createElement( 'span', { className: prefixCls + '-column-header-inner' }, veryShortWeekdays[xindex] ) ); }); return react_default.a.createElement( 'thead', null, react_default.a.createElement( 'tr', { role: 'row' }, showWeekNumberEl, weekDaysEls ) ); }; return DateTHead; }(react_default.a.Component); /* harmony default export */ var date_DateTHead = (DateTHead_DateTHead); // EXTERNAL MODULE: ./node_modules/classnames/index.js var classnames = __webpack_require__("HW6M"); var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); // CONCATENATED MODULE: ./node_modules/rc-calendar/es/util/index.js var defaultDisabledTime = { disabledHours: function disabledHours() { return []; }, disabledMinutes: function disabledMinutes() { return []; }, disabledSeconds: function disabledSeconds() { return []; } }; function getTodayTime(value) { var today = moment_default()(); today.locale(value.locale()).utcOffset(value.utcOffset()); return today; } function getTitleString(value) { return value.format('LL'); } function getTodayTimeStr(value) { var today = getTodayTime(value); return getTitleString(today); } function getMonthName(month) { var locale = month.locale(); var localeData = month.localeData(); return localeData[locale === 'zh-cn' ? 'months' : 'monthsShort'](month); } function syncTime(from, to) { if (!moment_default.a.isMoment(from) || !moment_default.a.isMoment(to)) return; to.hour(from.hour()); to.minute(from.minute()); to.second(from.second()); to.millisecond(from.millisecond()); } function getTimeConfig(value, disabledTime) { var disabledTimeConfig = disabledTime ? disabledTime(value) : {}; disabledTimeConfig = extends_default()({}, defaultDisabledTime, disabledTimeConfig); return disabledTimeConfig; } function isTimeValidByConfig(value, disabledTimeConfig) { var invalidTime = false; if (value) { var hour = value.hour(); var minutes = value.minute(); var seconds = value.second(); var disabledHours = disabledTimeConfig.disabledHours(); if (disabledHours.indexOf(hour) === -1) { var disabledMinutes = disabledTimeConfig.disabledMinutes(hour); if (disabledMinutes.indexOf(minutes) === -1) { var disabledSeconds = disabledTimeConfig.disabledSeconds(hour, minutes); invalidTime = disabledSeconds.indexOf(seconds) !== -1; } else { invalidTime = true; } } else { invalidTime = true; } } return !invalidTime; } function isTimeValid(value, disabledTime) { var disabledTimeConfig = getTimeConfig(value, disabledTime); return isTimeValidByConfig(value, disabledTimeConfig); } function isAllowedDate(value, disabledDate, disabledTime) { if (disabledDate) { if (disabledDate(value)) { return false; } } if (disabledTime) { if (!isTimeValid(value, disabledTime)) { return false; } } return true; } function formatDate(value, format) { if (!value) { return ''; } if (Array.isArray(format)) { format = format[0]; } return value.format(format); } // CONCATENATED MODULE: ./node_modules/rc-calendar/es/date/DateTBody.js function isSameDay(one, two) { return one && two && one.isSame(two, 'day'); } function beforeCurrentMonthYear(current, today) { if (current.year() < today.year()) { return 1; } return current.year() === today.year() && current.month() < today.month(); } function afterCurrentMonthYear(current, today) { if (current.year() > today.year()) { return 1; } return current.year() === today.year() && current.month() > today.month(); } function getIdFromDate(date) { return 'rc-calendar-' + date.year() + '-' + date.month() + '-' + date.date(); } var DateTBody_DateTBody = function (_React$Component) { inherits_default()(DateTBody, _React$Component); function DateTBody() { classCallCheck_default()(this, DateTBody); return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments)); } DateTBody.prototype.render = function render() { var props = this.props; var contentRender = props.contentRender, prefixCls = props.prefixCls, selectedValue = props.selectedValue, value = props.value, showWeekNumber = props.showWeekNumber, dateRender = props.dateRender, disabledDate = props.disabledDate, hoverValue = props.hoverValue; var iIndex = void 0; var jIndex = void 0; var current = void 0; var dateTable = []; var today = getTodayTime(value); var cellClass = prefixCls + '-cell'; var weekNumberCellClass = prefixCls + '-week-number-cell'; var dateClass = prefixCls + '-date'; var todayClass = prefixCls + '-today'; var selectedClass = prefixCls + '-selected-day'; var selectedDateClass = prefixCls + '-selected-date'; // do not move with mouse operation var selectedStartDateClass = prefixCls + '-selected-start-date'; var selectedEndDateClass = prefixCls + '-selected-end-date'; var inRangeClass = prefixCls + '-in-range-cell'; var lastMonthDayClass = prefixCls + '-last-month-cell'; var nextMonthDayClass = prefixCls + '-next-month-btn-day'; var disabledClass = prefixCls + '-disabled-cell'; var firstDisableClass = prefixCls + '-disabled-cell-first-of-row'; var lastDisableClass = prefixCls + '-disabled-cell-last-of-row'; var lastDayOfMonthClass = prefixCls + '-last-day-of-month'; var month1 = value.clone(); month1.date(1); var day = month1.day(); var lastMonthDiffDay = (day + 7 - value.localeData().firstDayOfWeek()) % 7; // calculate last month var lastMonth1 = month1.clone(); lastMonth1.add(0 - lastMonthDiffDay, 'days'); var passed = 0; for (iIndex = 0; iIndex < DateConstants.DATE_ROW_COUNT; iIndex++) { for (jIndex = 0; jIndex < DateConstants.DATE_COL_COUNT; jIndex++) { current = lastMonth1; if (passed) { current = current.clone(); current.add(passed, 'days'); } dateTable.push(current); passed++; } } var tableHtml = []; passed = 0; for (iIndex = 0; iIndex < DateConstants.DATE_ROW_COUNT; iIndex++) { var _cx; var isCurrentWeek = void 0; var weekNumberCell = void 0; var isActiveWeek = false; var dateCells = []; if (showWeekNumber) { weekNumberCell = react_default.a.createElement( 'td', { key: dateTable[passed].week(), role: 'gridcell', className: weekNumberCellClass }, dateTable[passed].week() ); } for (jIndex = 0; jIndex < DateConstants.DATE_COL_COUNT; jIndex++) { var next = null; var last = null; current = dateTable[passed]; if (jIndex < DateConstants.DATE_COL_COUNT - 1) { next = dateTable[passed + 1]; } if (jIndex > 0) { last = dateTable[passed - 1]; } var cls = cellClass; var disabled = false; var selected = false; if (isSameDay(current, today)) { cls += ' ' + todayClass; isCurrentWeek = true; } var isBeforeCurrentMonthYear = beforeCurrentMonthYear(current, value); var isAfterCurrentMonthYear = afterCurrentMonthYear(current, value); if (selectedValue && Array.isArray(selectedValue)) { var rangeValue = hoverValue.length ? hoverValue : selectedValue; if (!isBeforeCurrentMonthYear && !isAfterCurrentMonthYear) { var startValue = rangeValue[0]; var endValue = rangeValue[1]; if (startValue) { if (isSameDay(current, startValue)) { selected = true; isActiveWeek = true; cls += ' ' + selectedStartDateClass; } } if (startValue || endValue) { if (isSameDay(current, endValue)) { selected = true; isActiveWeek = true; cls += ' ' + selectedEndDateClass; } else if ((startValue === null || startValue === undefined) && current.isBefore(endValue, 'day')) { cls += ' ' + inRangeClass; } else if ((endValue === null || endValue === undefined) && current.isAfter(startValue, 'day')) { cls += ' ' + inRangeClass; } else if (current.isAfter(startValue, 'day') && current.isBefore(endValue, 'day')) { cls += ' ' + inRangeClass; } } } } else if (isSameDay(current, value)) { // keyboard change value, highlight works selected = true; isActiveWeek = true; } if (isSameDay(current, selectedValue)) { cls += ' ' + selectedDateClass; } if (isBeforeCurrentMonthYear) { cls += ' ' + lastMonthDayClass; } if (isAfterCurrentMonthYear) { cls += ' ' + nextMonthDayClass; } if (current.clone().endOf('month').date() === current.date()) { cls += ' ' + lastDayOfMonthClass; } if (disabledDate) { if (disabledDate(current, value)) { disabled = true; if (!last || !disabledDate(last, value)) { cls += ' ' + firstDisableClass; } if (!next || !disabledDate(next, value)) { cls += ' ' + lastDisableClass; } } } if (selected) { cls += ' ' + selectedClass; } if (disabled) { cls += ' ' + disabledClass; } var dateHtml = void 0; if (dateRender) { dateHtml = dateRender(current, value); } else { var content = contentRender ? contentRender(current, value) : current.date(); dateHtml = react_default.a.createElement( 'div', { key: getIdFromDate(current), className: dateClass, 'aria-selected': selected, 'aria-disabled': disabled }, content ); } dateCells.push(react_default.a.createElement( 'td', { key: passed, onClick: disabled ? undefined : props.onSelect.bind(null, current), onMouseEnter: disabled ? undefined : props.onDayHover && props.onDayHover.bind(null, current) || undefined, role: 'gridcell', title: getTitleString(current), className: cls }, dateHtml )); passed++; } tableHtml.push(react_default.a.createElement( 'tr', { key: iIndex, role: 'row', className: classnames_default()((_cx = {}, _cx[prefixCls + '-current-week'] = isCurrentWeek, _cx[prefixCls + '-active-week'] = isActiveWeek, _cx)) }, weekNumberCell, dateCells )); } return react_default.a.createElement( 'tbody', { className: prefixCls + '-tbody' }, tableHtml ); }; return DateTBody; }(react_default.a.Component); DateTBody_DateTBody.propTypes = { contentRender: prop_types_default.a.func, dateRender: prop_types_default.a.func, disabledDate: prop_types_default.a.func, prefixCls: prop_types_default.a.string, selectedValue: prop_types_default.a.oneOfType([prop_types_default.a.object, prop_types_default.a.arrayOf(prop_types_default.a.object)]), value: prop_types_default.a.object, hoverValue: prop_types_default.a.any, showWeekNumber: prop_types_default.a.bool }; DateTBody_DateTBody.defaultProps = { hoverValue: [] }; /* harmony default export */ var date_DateTBody = (DateTBody_DateTBody); // CONCATENATED MODULE: ./node_modules/rc-calendar/es/date/DateTable.js var DateTable_DateTable = function (_React$Component) { inherits_default()(DateTable, _React$Component); function DateTable() { classCallCheck_default()(this, DateTable); return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments)); } DateTable.prototype.render = function render() { var props = this.props; var prefixCls = props.prefixCls; return react_default.a.createElement( 'table', { className: prefixCls + '-table', cellSpacing: '0', role: 'grid' }, react_default.a.createElement(date_DateTHead, props), react_default.a.createElement(date_DateTBody, props) ); }; return DateTable; }(react_default.a.Component); /* harmony default export */ var date_DateTable = (DateTable_DateTable); // CONCATENATED MODULE: ./node_modules/rc-util/es/Children/mapSelf.js function mirror(o) { return o; } function mapSelf(children) { // return ReactFragment return react_default.a.Children.map(children, mirror); } // CONCATENATED MODULE: ./node_modules/rc-calendar/es/month/MonthTable.js var ROW = 4; var COL = 3; function noop() {} var MonthTable_MonthTable = function (_Component) { inherits_default()(MonthTable, _Component); function MonthTable() { var _temp, _this, _ret; classCallCheck_default()(this, MonthTable); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _ret = (_temp = (_this = possibleConstructorReturn_default()(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.state = {}, _temp), possibleConstructorReturn_default()(_this, _ret); } MonthTable.getDerivedStateFromProps = function getDerivedStateFromProps(props) { if ('value' in props) { return { value: props.value }; } return null; }; MonthTable.prototype.setAndSelectValue = function setAndSelectValue(value) { this.setState({ value: value }); this.props.onSelect(value); }; MonthTable.prototype.chooseMonth = function chooseMonth(month) { var next = this.state.value.clone(); next.month(month); this.setAndSelectValue(next); }; MonthTable.prototype.months = function months() { var value = this.state.value; var current = value.clone(); var months = []; var index = 0; for (var rowIndex = 0; rowIndex < ROW; rowIndex++) { months[rowIndex] = []; for (var colIndex = 0; colIndex < COL; colIndex++) { current.month(index); var content = getMonthName(current); months[rowIndex][colIndex] = { value: index, content: content, title: content }; index++; } } return months; }; MonthTable.prototype.render = function render() { var _this2 = this; var props = this.props; var value = this.state.value; var today = getTodayTime(value); var months = this.months(); var currentMonth = value.month(); var prefixCls = props.prefixCls, locale = props.locale, contentRender = props.contentRender, cellRender = props.cellRender; var monthsEls = months.map(function (month, index) { var tds = month.map(function (monthData) { var _classNameMap; var disabled = false; if (props.disabledDate) { var testValue = value.clone(); testValue.month(monthData.value); disabled = props.disabledDate(testValue); } var classNameMap = (_classNameMap = {}, _classNameMap[prefixCls + '-cell'] = 1, _classNameMap[prefixCls + '-cell-disabled'] = disabled, _classNameMap[prefixCls + '-selected-cell'] = monthData.value === currentMonth, _classNameMap[prefixCls + '-current-cell'] = today.year() === value.year() && monthData.value === today.month(), _classNameMap); var cellEl = void 0; if (cellRender) { var currentValue = value.clone(); currentValue.month(monthData.value); cellEl = cellRender(currentValue, locale); } else { var content = void 0; if (contentRender) { var _currentValue = value.clone(); _currentValue.month(monthData.value); content = contentRender(_currentValue, locale); } else { content = monthData.content; } cellEl = react_default.a.createElement( 'a', { className: prefixCls + '-month' }, content ); } return react_default.a.createElement( 'td', { role: 'gridcell', key: monthData.value, onClick: disabled ? null : function () { return _this2.chooseMonth(monthData.value); }, title: monthData.title, className: classnames_default()(classNameMap) }, cellEl ); }); return react_default.a.createElement( 'tr', { key: index, role: 'row' }, tds ); }); return react_default.a.createElement( 'table', { className: prefixCls + '-table', cellSpacing: '0', role: 'grid' }, react_default.a.createElement( 'tbody', { className: prefixCls + '-tbody' }, monthsEls ) ); }; return MonthTable; }(react["Component"]); MonthTable_MonthTable.defaultProps = { onSelect: noop }; MonthTable_MonthTable.propTypes = { onSelect: prop_types_default.a.func, cellRender: prop_types_default.a.func, prefixCls: prop_types_default.a.string, value: prop_types_default.a.object }; Object(react_lifecycles_compat_es["polyfill"])(MonthTable_MonthTable); /* harmony default export */ var month_MonthTable = (MonthTable_MonthTable); // CONCATENATED MODULE: ./node_modules/rc-calendar/es/month/MonthPanel.js function goYear(direction) { this.props.changeYear(direction); } function MonthPanel_noop() {} var MonthPanel_MonthPanel = function (_React$Component) { inherits_default()(MonthPanel, _React$Component); function MonthPanel(props) { classCallCheck_default()(this, MonthPanel); var _this = possibleConstructorReturn_default()(this, _React$Component.call(this, props)); _this.setAndSelectValue = function (value) { _this.setValue(value); _this.props.onSelect(value); }; _this.setValue = function (value) { if ('value' in _this.props) { _this.setState({ value: value }); } }; _this.nextYear = goYear.bind(_this, 1); _this.previousYear = goYear.bind(_this, -1); _this.prefixCls = props.rootPrefixCls + '-month-panel'; _this.state = { value: props.value || props.defaultValue }; return _this; } MonthPanel.getDerivedStateFromProps = function getDerivedStateFromProps(props) { var newState = {}; if ('value' in props) { newState = { value: props.value }; } return newState; }; MonthPanel.prototype.render = function render() { var props = this.props; var value = this.state.value; var locale = props.locale, cellRender = props.cellRender, contentRender = props.contentRender, renderFooter = props.renderFooter; var year = value.year(); var prefixCls = this.prefixCls; var footer = renderFooter && renderFooter('month'); return react_default.a.createElement( 'div', { className: prefixCls, style: props.style }, react_default.a.createElement( 'div', null, react_default.a.createElement( 'div', { className: prefixCls + '-header' }, react_default.a.createElement('a', { className: prefixCls + '-prev-year-btn', role: 'button', onClick: this.previousYear, title: locale.previousYear }), react_default.a.createElement( 'a', { className: prefixCls + '-year-select', role: 'button', onClick: props.onYearPanelShow, title: locale.yearSelect }, react_default.a.createElement( 'span', { className: prefixCls + '-year-select-content' }, year ), react_default.a.createElement( 'span', { className: prefixCls + '-year-select-arrow' }, 'x' ) ), react_default.a.createElement('a', { className: prefixCls + '-next-year-btn', role: 'button', onClick: this.nextYear, title: locale.nextYear }) ), react_default.a.createElement( 'div', { className: prefixCls + '-body' }, react_default.a.createElement(month_MonthTable, { disabledDate: props.disabledDate, onSelect: this.setAndSelectValue, locale: locale, value: value, cellRender: cellRender, contentRender: contentRender, prefixCls: prefixCls }) ), footer && react_default.a.createElement( 'div', { className: prefixCls + '-footer' }, footer ) ) ); }; return MonthPanel; }(react_default.a.Component); MonthPanel_MonthPanel.propTypes = { onChange: prop_types_default.a.func, disabledDate: prop_types_default.a.func, onSelect: prop_types_default.a.func, renderFooter: prop_types_default.a.func, rootPrefixCls: prop_types_default.a.string, value: prop_types_default.a.object, defaultValue: prop_types_default.a.object }; MonthPanel_MonthPanel.defaultProps = { onChange: MonthPanel_noop, onSelect: MonthPanel_noop }; Object(react_lifecycles_compat_es["polyfill"])(MonthPanel_MonthPanel); /* harmony default export */ var month_MonthPanel = (MonthPanel_MonthPanel); // CONCATENATED MODULE: ./node_modules/rc-calendar/es/year/YearPanel.js var YearPanel_ROW = 4; var YearPanel_COL = 3; function YearPanel_goYear(direction) { var value = this.state.value.clone(); value.add(direction, 'year'); this.setState({ value: value }); } function chooseYear(year) { var value = this.state.value.clone(); value.year(year); value.month(this.state.value.month()); this.setState({ value: value }); this.props.onSelect(value); } var YearPanel_YearPanel = function (_React$Component) { inherits_default()(YearPanel, _React$Component); function YearPanel(props) { classCallCheck_default()(this, YearPanel); var _this = possibleConstructorReturn_default()(this, _React$Component.call(this, props)); _this.prefixCls = props.rootPrefixCls + '-year-panel'; _this.state = { value: props.value || props.defaultValue }; _this.nextDecade = YearPanel_goYear.bind(_this, 10); _this.previousDecade = YearPanel_goYear.bind(_this, -10); return _this; } YearPanel.prototype.years = function years() { var value = this.state.value; var currentYear = value.year(); var startYear = parseInt(currentYear / 10, 10) * 10; var previousYear = startYear - 1; var years = []; var index = 0; for (var rowIndex = 0; rowIndex < YearPanel_ROW; rowIndex++) { years[rowIndex] = []; for (var colIndex = 0; colIndex < YearPanel_COL; colIndex++) { var year = previousYear + index; var content = String(year); years[rowIndex][colIndex] = { content: content, year: year, title: content }; index++; } } return years; }; YearPanel.prototype.render = function render() { var _this2 = this; var props = this.props; var value = this.state.value; var locale = props.locale, renderFooter = props.renderFooter; var years = this.years(); var currentYear = value.year(); var startYear = parseInt(currentYear / 10, 10) * 10; var endYear = startYear + 9; var prefixCls = this.prefixCls; var yeasEls = years.map(function (row, index) { var tds = row.map(function (yearData) { var _classNameMap; var classNameMap = (_classNameMap = {}, _classNameMap[prefixCls + '-cell'] = 1, _classNameMap[prefixCls + '-selected-cell'] = yearData.year === currentYear, _classNameMap[prefixCls + '-last-decade-cell'] = yearData.year < startYear, _classNameMap[prefixCls + '-next-decade-cell'] = yearData.year > endYear, _classNameMap); var clickHandler = void 0; if (yearData.year < startYear) { clickHandler = _this2.previousDecade; } else if (yearData.year > endYear) { clickHandler = _this2.nextDecade; } else { clickHandler = chooseYear.bind(_this2, yearData.year); } return react_default.a.createElement( 'td', { role: 'gridcell', title: yearData.title, key: yearData.content, onClick: clickHandler, className: classnames_default()(classNameMap) }, react_default.a.createElement( 'a', { className: prefixCls + '-year' }, yearData.content ) ); }); return react_default.a.createElement( 'tr', { key: index, role: 'row' }, tds ); }); var footer = renderFooter && renderFooter('year'); return react_default.a.createElement( 'div', { className: this.prefixCls }, react_default.a.createElement( 'div', null, react_default.a.createElement( 'div', { className: prefixCls + '-header' }, react_default.a.createElement('a', { className: prefixCls + '-prev-decade-btn', role: 'button', onClick: this.previousDecade, title: locale.previousDecade }), react_default.a.createElement( 'a', { className: prefixCls + '-decade-select', role: 'button', onClick: props.onDecadePanelShow, title: locale.decadeSelect }, react_default.a.createElement( 'span', { className: prefixCls + '-decade-select-content' }, startYear, '-', endYear ), react_default.a.createElement( 'span', { className: prefixCls + '-decade-select-arrow' }, 'x' ) ), react_default.a.createElement('a', { className: prefixCls + '-next-decade-btn', role: 'button', onClick: this.nextDecade, title: locale.nextDecade }) ), react_default.a.createElement( 'div', { className: prefixCls + '-body' }, react_default.a.createElement( 'table', { className: prefixCls + '-table', cellSpacing: '0', role: 'grid' }, react_default.a.createElement( 'tbody', { className: prefixCls + '-tbody' }, yeasEls ) ) ), footer && react_default.a.createElement( 'div', { className: prefixCls + '-footer' }, footer ) ) ); }; return YearPanel; }(react_default.a.Component); /* harmony default export */ var year_YearPanel = (YearPanel_YearPanel); YearPanel_YearPanel.propTypes = { rootPrefixCls: prop_types_default.a.string, value: prop_types_default.a.object, defaultValue: prop_types_default.a.object, renderFooter: prop_types_default.a.func }; YearPanel_YearPanel.defaultProps = { onSelect: function onSelect() {} }; // CONCATENATED MODULE: ./node_modules/rc-calendar/es/decade/DecadePanel.js var DecadePanel_ROW = 4; var DecadePanel_COL = 3; function DecadePanel_goYear(direction) { var next = this.state.value.clone(); next.add(direction, 'years'); this.setState({ value: next }); } function chooseDecade(year, event) { var next = this.state.value.clone(); next.year(year); next.month(this.state.value.month()); this.props.onSelect(next); event.preventDefault(); } var DecadePanel_DecadePanel = function (_React$Component) { inherits_default()(DecadePanel, _React$Component); function DecadePanel(props) { classCallCheck_default()(this, DecadePanel); var _this = possibleConstructorReturn_default()(this, _React$Component.call(this, props)); _this.state = { value: props.value || props.defaultValue }; // bind methods _this.prefixCls = props.rootPrefixCls + '-decade-panel'; _this.nextCentury = DecadePanel_goYear.bind(_this, 100); _this.previousCentury = DecadePanel_goYear.bind(_this, -100); return _this; } DecadePanel.prototype.render = function render() { var _this2 = this; var value = this.state.value; var _props = this.props, locale = _props.locale, renderFooter = _props.renderFooter; var currentYear = value.year(); var startYear = parseInt(currentYear / 100, 10) * 100; var preYear = startYear - 10; var endYear = startYear + 99; var decades = []; var index = 0; var prefixCls = this.prefixCls; for (var rowIndex = 0; rowIndex < DecadePanel_ROW; rowIndex++) { decades[rowIndex] = []; for (var colIndex = 0; colIndex < DecadePanel_COL; colIndex++) { var startDecade = preYear + index * 10; var endDecade = preYear + index * 10 + 9; decades[rowIndex][colIndex] = { startDecade: startDecade, endDecade: endDecade }; index++; } } var footer = renderFooter && renderFooter('decade'); var decadesEls = decades.map(function (row, decadeIndex) { var tds = row.map(function (decadeData) { var _classNameMap; var dStartDecade = decadeData.startDecade; var dEndDecade = decadeData.endDecade; var isLast = dStartDecade < startYear; var isNext = dEndDecade > endYear; var classNameMap = (_classNameMap = {}, _classNameMap[prefixCls + '-cell'] = 1, _classNameMap[prefixCls + '-selected-cell'] = dStartDecade <= currentYear && currentYear <= dEndDecade, _classNameMap[prefixCls + '-last-century-cell'] = isLast, _classNameMap[prefixCls + '-next-century-cell'] = isNext, _classNameMap); var content = dStartDecade + '-' + dEndDecade; var clickHandler = void 0; if (isLast) { clickHandler = _this2.previousCentury; } else if (isNext) { clickHandler = _this2.nextCentury; } else { clickHandler = chooseDecade.bind(_this2, dStartDecade); } return react_default.a.createElement( 'td', { key: dStartDecade, onClick: clickHandler, role: 'gridcell', className: classnames_default()(classNameMap) }, react_default.a.createElement( 'a', { className: prefixCls + '-decade' }, content ) ); }); return react_default.a.createElement( 'tr', { key: decadeIndex, role: 'row' }, tds ); }); return react_default.a.createElement( 'div', { className: this.prefixCls }, react_default.a.createElement( 'div', { className: prefixCls + '-header' }, react_default.a.createElement('a', { className: prefixCls + '-prev-century-btn', role: 'button', onClick: this.previousCentury, title: locale.previousCentury }), react_default.a.createElement( 'div', { className: prefixCls + '-century' }, startYear, '-', endYear ), react_default.a.createElement('a', { className: prefixCls + '-next-century-btn', role: 'button', onClick: this.nextCentury, title: locale.nextCentury }) ), react_default.a.createElement( 'div', { className: prefixCls + '-body' }, react_default.a.createElement( 'table', { className: prefixCls + '-table', cellSpacing: '0', role: 'grid' }, react_default.a.createElement( 'tbody', { className: prefixCls + '-tbody' }, decadesEls ) ) ), footer && react_default.a.createElement( 'div', { className: prefixCls + '-footer' }, footer ) ); }; return DecadePanel; }(react_default.a.Component); /* harmony default export */ var decade_DecadePanel = (DecadePanel_DecadePanel); DecadePanel_DecadePanel.propTypes = { locale: prop_types_default.a.object, value: prop_types_default.a.object, defaultValue: prop_types_default.a.object, rootPrefixCls: prop_types_default.a.string, renderFooter: prop_types_default.a.func }; DecadePanel_DecadePanel.defaultProps = { onSelect: function onSelect() {} }; // CONCATENATED MODULE: ./node_modules/rc-calendar/es/calendar/CalendarHeader.js function goMonth(direction) { var next = this.props.value.clone(); next.add(direction, 'months'); this.props.onValueChange(next); } function CalendarHeader_goYear(direction) { var next = this.props.value.clone(); next.add(direction, 'years'); this.props.onValueChange(next); } function showIf(condition, el) { return condition ? el : null; } var CalendarHeader_CalendarHeader = function (_React$Component) { inherits_default()(CalendarHeader, _React$Component); function CalendarHeader(props) { classCallCheck_default()(this, CalendarHeader); var _this = possibleConstructorReturn_default()(this, _React$Component.call(this, props)); CalendarHeader__initialiseProps.call(_this); _this.nextMonth = goMonth.bind(_this, 1); _this.previousMonth = goMonth.bind(_this, -1); _this.nextYear = CalendarHeader_goYear.bind(_this, 1); _this.previousYear = CalendarHeader_goYear.bind(_this, -1); _this.state = { yearPanelReferer: null }; return _this; } CalendarHeader.prototype.render = function render() { var _this2 = this; var props = this.props; var prefixCls = props.prefixCls, locale = props.locale, mode = props.mode, value = props.value, showTimePicker = props.showTimePicker, enableNext = props.enableNext, enablePrev = props.enablePrev, disabledMonth = props.disabledMonth, renderFooter = props.renderFooter; var panel = null; if (mode === 'month') { panel = react_default.a.createElement(month_MonthPanel, { locale: locale, value: value, rootPrefixCls: prefixCls, onSelect: this.onMonthSelect, onYearPanelShow: function onYearPanelShow() { return _this2.showYearPanel('month'); }, disabledDate: disabledMonth, cellRender: props.monthCellRender, contentRender: props.monthCellContentRender, renderFooter: renderFooter, changeYear: this.changeYear }); } if (mode === 'year') { panel = react_default.a.createElement(year_YearPanel, { locale: locale, defaultValue: value, rootPrefixCls: prefixCls, onSelect: this.onYearSelect, onDecadePanelShow: this.showDecadePanel, renderFooter: renderFooter }); } if (mode === 'decade') { panel = react_default.a.createElement(decade_DecadePanel, { locale: locale, defaultValue: value, rootPrefixCls: prefixCls, onSelect: this.onDecadeSelect, renderFooter: renderFooter }); } return react_default.a.createElement( 'div', { className: prefixCls + '-header' }, react_default.a.createElement( 'div', { style: { position: 'relative' } }, showIf(enablePrev && !showTimePicker, react_default.a.createElement('a', { className: prefixCls + '-prev-year-btn', role: 'button', onClick: this.previousYear, title: locale.previousYear })), showIf(enablePrev && !showTimePicker, react_default.a.createElement('a', { className: prefixCls + '-prev-month-btn', role: 'button', onClick: this.previousMonth, title: locale.previousMonth })), this.monthYearElement(showTimePicker), showIf(enableNext && !showTimePicker, react_default.a.createElement('a', { className: prefixCls + '-next-month-btn', onClick: this.nextMonth, title: locale.nextMonth })), showIf(enableNext && !showTimePicker, react_default.a.createElement('a', { className: prefixCls + '-next-year-btn', onClick: this.nextYear, title: locale.nextYear })) ), panel ); }; return CalendarHeader; }(react_default.a.Component); CalendarHeader_CalendarHeader.propTypes = { prefixCls: prop_types_default.a.string, value: prop_types_default.a.object, onValueChange: prop_types_default.a.func, showTimePicker: prop_types_default.a.bool, onPanelChange: prop_types_default.a.func, locale: prop_types_default.a.object, enablePrev: prop_types_default.a.any, enableNext: prop_types_default.a.any, disabledMonth: prop_types_default.a.func, renderFooter: prop_types_default.a.func, onMonthSelect: prop_types_default.a.func }; CalendarHeader_CalendarHeader.defaultProps = { enableNext: 1, enablePrev: 1, onPanelChange: function onPanelChange() {}, onValueChange: function onValueChange() {} }; var CalendarHeader__initialiseProps = function _initialiseProps() { var _this3 = this; this.onMonthSelect = function (value) { _this3.props.onPanelChange(value, 'date'); if (_this3.props.onMonthSelect) { _this3.props.onMonthSelect(value); } else { _this3.props.onValueChange(value); } }; this.onYearSelect = function (value) { var referer = _this3.state.yearPanelReferer; _this3.setState({ yearPanelReferer: null }); _this3.props.onPanelChange(value, referer); _this3.props.onValueChange(value); }; this.onDecadeSelect = function (value) { _this3.props.onPanelChange(value, 'year'); _this3.props.onValueChange(value); }; this.changeYear = function (direction) { if (direction > 0) { _this3.nextYear(); } else { _this3.previousYear(); } }; this.monthYearElement = function (showTimePicker) { var props = _this3.props; var prefixCls = props.prefixCls; var locale = props.locale; var value = props.value; var localeData = value.localeData(); var monthBeforeYear = locale.monthBeforeYear; var selectClassName = prefixCls + '-' + (monthBeforeYear ? 'my-select' : 'ym-select'); var timeClassName = showTimePicker ? ' ' + prefixCls + '-time-status' : ''; var year = react_default.a.createElement( 'a', { className: prefixCls + '-year-select' + timeClassName, role: 'button', onClick: showTimePicker ? null : function () { return _this3.showYearPanel('date'); }, title: showTimePicker ? null : locale.yearSelect }, value.format(locale.yearFormat) ); var month = react_default.a.createElement( 'a', { className: prefixCls + '-month-select' + timeClassName, role: 'button', onClick: showTimePicker ? null : _this3.showMonthPanel, title: showTimePicker ? null : locale.monthSelect }, locale.monthFormat ? value.format(locale.monthFormat) : localeData.monthsShort(value) ); var day = void 0; if (showTimePicker) { day = react_default.a.createElement( 'a', { className: prefixCls + '-day-select' + timeClassName, role: 'button' }, value.format(locale.dayFormat) ); } var my = []; if (monthBeforeYear) { my = [month, day, year]; } else { my = [year, month, day]; } return react_default.a.createElement( 'span', { className: selectClassName }, mapSelf(my) ); }; this.showMonthPanel = function () { // null means that users' interaction doesn't change value _this3.props.onPanelChange(null, 'month'); }; this.showYearPanel = function (referer) { _this3.setState({ yearPanelReferer: referer }); _this3.props.onPanelChange(null, 'year'); }; this.showDecadePanel = function () { _this3.props.onPanelChange(null, 'decade'); }; }; /* harmony default export */ var calendar_CalendarHeader = (CalendarHeader_CalendarHeader); // CONCATENATED MODULE: ./node_modules/rc-calendar/es/calendar/TodayButton.js function TodayButton(_ref) { var prefixCls = _ref.prefixCls, locale = _ref.locale, value = _ref.value, timePicker = _ref.timePicker, disabled = _ref.disabled, disabledDate = _ref.disabledDate, onToday = _ref.onToday, text = _ref.text; var localeNow = (!text && timePicker ? locale.now : text) || locale.today; var disabledToday = disabledDate && !isAllowedDate(getTodayTime(value), disabledDate); var isDisabled = disabledToday || disabled; var disabledTodayClass = isDisabled ? prefixCls + '-today-btn-disabled' : ''; return react_default.a.createElement( 'a', { className: prefixCls + '-today-btn ' + disabledTodayClass, role: 'button', onClick: isDisabled ? null : onToday, title: getTodayTimeStr(value) }, localeNow ); } // CONCATENATED MODULE: ./node_modules/rc-calendar/es/calendar/OkButton.js function OkButton(_ref) { var prefixCls = _ref.prefixCls, locale = _ref.locale, okDisabled = _ref.okDisabled, onOk = _ref.onOk; var className = prefixCls + "-ok-btn"; if (okDisabled) { className += " " + prefixCls + "-ok-btn-disabled"; } return react_default.a.createElement( "a", { className: className, role: "button", onClick: okDisabled ? null : onOk }, locale.ok ); } // CONCATENATED MODULE: ./node_modules/rc-calendar/es/calendar/TimePickerButton.js function TimePickerButton(_ref) { var _classnames; var prefixCls = _ref.prefixCls, locale = _ref.locale, showTimePicker = _ref.showTimePicker, onOpenTimePicker = _ref.onOpenTimePicker, onCloseTimePicker = _ref.onCloseTimePicker, timePickerDisabled = _ref.timePickerDisabled; var className = classnames_default()((_classnames = {}, _classnames[prefixCls + '-time-picker-btn'] = true, _classnames[prefixCls + '-time-picker-btn-disabled'] = timePickerDisabled, _classnames)); var onClick = null; if (!timePickerDisabled) { onClick = showTimePicker ? onCloseTimePicker : onOpenTimePicker; } return react_default.a.createElement( 'a', { className: className, role: 'button', onClick: onClick }, showTimePicker ? locale.dateSelect : locale.timeSelect ); } // CONCATENATED MODULE: ./node_modules/rc-calendar/es/calendar/CalendarFooter.js var CalendarFooter_CalendarFooter = function (_React$Component) { inherits_default()(CalendarFooter, _React$Component); function CalendarFooter() { classCallCheck_default()(this, CalendarFooter); return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments)); } CalendarFooter.prototype.onSelect = function onSelect(value) { this.props.onSelect(value); }; CalendarFooter.prototype.getRootDOMNode = function getRootDOMNode() { return react_dom_default.a.findDOMNode(this); }; CalendarFooter.prototype.render = function render() { var props = this.props; var value = props.value, prefixCls = props.prefixCls, showOk = props.showOk, timePicker = props.timePicker, renderFooter = props.renderFooter, mode = props.mode; var footerEl = null; var extraFooter = renderFooter && renderFooter(mode); if (props.showToday || timePicker || extraFooter) { var _cx; var nowEl = void 0; if (props.showToday) { nowEl = react_default.a.createElement(TodayButton, extends_default()({}, props, { value: value })); } var okBtn = void 0; if (showOk === true || showOk !== false && !!props.timePicker) { okBtn = react_default.a.createElement(OkButton, props); } var timePickerBtn = void 0; if (!!props.timePicker) { timePickerBtn = react_default.a.createElement(TimePickerButton, props); } var footerBtn = void 0; if (nowEl || timePickerBtn || okBtn || extraFooter) { footerBtn = react_default.a.createElement( 'span', { className: prefixCls + '-footer-btn' }, extraFooter, mapSelf([nowEl, timePickerBtn, okBtn]) ); } var cls = classnames_default()(prefixCls + '-footer', (_cx = {}, _cx[prefixCls + '-footer-show-ok'] = okBtn, _cx)); footerEl = react_default.a.createElement( 'div', { className: cls }, footerBtn ); } return footerEl; }; return CalendarFooter; }(react_default.a.Component); CalendarFooter_CalendarFooter.propTypes = { prefixCls: prop_types_default.a.string, showDateInput: prop_types_default.a.bool, disabledTime: prop_types_default.a.any, timePicker: prop_types_default.a.element, selectedValue: prop_types_default.a.any, showOk: prop_types_default.a.bool, onSelect: prop_types_default.a.func, value: prop_types_default.a.object, renderFooter: prop_types_default.a.func, defaultValue: prop_types_default.a.object, mode: prop_types_default.a.string }; /* harmony default export */ var calendar_CalendarFooter = (CalendarFooter_CalendarFooter); // CONCATENATED MODULE: ./node_modules/rc-calendar/es/mixin/CalendarMixin.js function CalendarMixin_noop() {} function getNowByCurrentStateValue(value) { var ret = void 0; if (value) { ret = getTodayTime(value); } else { ret = moment_default()(); } return ret; } var calendarMixinPropTypes = { value: prop_types_default.a.object, defaultValue: prop_types_default.a.object, onKeyDown: prop_types_default.a.func }; var calendarMixinDefaultProps = { onKeyDown: CalendarMixin_noop }; var CalendarMixin_calendarMixinWrapper = function calendarMixinWrapper(ComposeComponent) { var _class, _temp2; return _temp2 = _class = function (_ComposeComponent) { inherits_default()(_class, _ComposeComponent); function _class() { var _temp, _this, _ret; classCallCheck_default()(this, _class); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _ret = (_temp = (_this = possibleConstructorReturn_default()(this, _ComposeComponent.call.apply(_ComposeComponent, [this].concat(args))), _this), _this.onSelect = function (value, cause) { if (value) { _this.setValue(value); } _this.setSelectedValue(value, cause); }, _this.renderRoot = function (newProps) { var _className; var props = _this.props; var prefixCls = props.prefixCls; var className = (_className = {}, _className[prefixCls] = 1, _className[prefixCls + '-hidden'] = !props.visible, _className[props.className] = !!props.className, _className[newProps.className] = !!newProps.className, _className); return react_default.a.createElement( 'div', { ref: _this.saveRoot, className: '' + classnames_default()(className), style: _this.props.style, tabIndex: '0', onKeyDown: _this.onKeyDown, onBlur: _this.onBlur }, newProps.children ); }, _this.setSelectedValue = function (selectedValue, cause) { // if (this.isAllowedDate(selectedValue)) { if (!('selectedValue' in _this.props)) { _this.setState({ selectedValue: selectedValue }); } if (_this.props.onSelect) { _this.props.onSelect(selectedValue, cause); } // } }, _this.setValue = function (value) { var originalValue = _this.state.value; if (!('value' in _this.props)) { _this.setState({ value: value }); } if (originalValue && value && !originalValue.isSame(value) || !originalValue && value || originalValue && !value) { _this.props.onChange(value); } }, _this.isAllowedDate = function (value) { var disabledDate = _this.props.disabledDate; var disabledTime = _this.props.disabledTime; return isAllowedDate(value, disabledDate, disabledTime); }, _temp), possibleConstructorReturn_default()(_this, _ret); } _class.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, prevState) { // Use origin function if provided if (ComposeComponent.getDerivedStateFromProps) { return ComposeComponent.getDerivedStateFromProps(nextProps, prevState); } var value = nextProps.value, selectedValue = nextProps.selectedValue; var newState = {}; if ('value' in nextProps) { newState.value = value || nextProps.defaultValue || getNowByCurrentStateValue(prevState.value); } if ('selectedValue' in nextProps) { newState.selectedValue = selectedValue; } return newState; }; return _class; }(ComposeComponent), _class.displayName = 'CalendarMixinWrapper', _class.defaultProps = ComposeComponent.defaultProps, _temp2; }; // EXTERNAL MODULE: ./node_modules/rc-calendar/es/locale/en_US.js var en_US = __webpack_require__("QAFt"); // CONCATENATED MODULE: ./node_modules/rc-calendar/es/mixin/CommonMixin.js function CommonMixin_noop() {} var propType = { className: prop_types_default.a.string, locale: prop_types_default.a.object, style: prop_types_default.a.object, visible: prop_types_default.a.bool, onSelect: prop_types_default.a.func, prefixCls: prop_types_default.a.string, onChange: prop_types_default.a.func, onOk: prop_types_default.a.func }; var defaultProp = { locale: en_US["a" /* default */], style: {}, visible: true, prefixCls: 'rc-calendar', className: '', onSelect: CommonMixin_noop, onChange: CommonMixin_noop, onClear: CommonMixin_noop, renderFooter: function renderFooter() { return null; }, renderSidebar: function renderSidebar() { return null; } }; var CommonMixin_commonMixinWrapper = function commonMixinWrapper(ComposeComponent) { var _class, _temp2; return _temp2 = _class = function (_ComposeComponent) { inherits_default()(_class, _ComposeComponent); function _class() { var _temp, _this, _ret; classCallCheck_default()(this, _class); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _ret = (_temp = (_this = possibleConstructorReturn_default()(this, _ComposeComponent.call.apply(_ComposeComponent, [this].concat(args))), _this), _this.getFormat = function () { var format = _this.props.format; var _this$props = _this.props, locale = _this$props.locale, timePicker = _this$props.timePicker; if (!format) { if (timePicker) { format = locale.dateTimeFormat; } else { format = locale.dateFormat; } } return format; }, _this.focus = function () { if (_this.focusElement) { _this.focusElement.focus(); } else if (_this.rootInstance) { _this.rootInstance.focus(); } }, _this.saveFocusElement = function (focusElement) { _this.focusElement = focusElement; }, _this.saveRoot = function (root) { _this.rootInstance = root; }, _temp), possibleConstructorReturn_default()(_this, _ret); } _class.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps) { return this.props.visible || nextProps.visible; }; return _class; }(ComposeComponent), _class.displayName = 'CommonMixinWrapper', _class.defaultProps = ComposeComponent.defaultProps, _class.getDerivedStateFromProps = ComposeComponent.getDerivedStateFromProps, _temp2; }; // CONCATENATED MODULE: ./node_modules/rc-calendar/es/date/DateInput.js var cachedSelectionStart = void 0; var cachedSelectionEnd = void 0; var dateInputInstance = void 0; var DateInput_DateInput = function (_React$Component) { inherits_default()(DateInput, _React$Component); function DateInput(props) { classCallCheck_default()(this, DateInput); var _this = possibleConstructorReturn_default()(this, _React$Component.call(this, props)); DateInput__initialiseProps.call(_this); var selectedValue = props.selectedValue; _this.state = { str: formatDate(selectedValue, _this.props.format), invalid: false, hasFocus: false }; return _this; } DateInput.prototype.componentDidUpdate = function componentDidUpdate() { if (dateInputInstance && this.state.hasFocus && !this.state.invalid && !(cachedSelectionStart === 0 && cachedSelectionEnd === 0)) { dateInputInstance.setSelectionRange(cachedSelectionStart, cachedSelectionEnd); } }; DateInput.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, state) { var newState = {}; if (dateInputInstance) { cachedSelectionStart = dateInputInstance.selectionStart; cachedSelectionEnd = dateInputInstance.selectionEnd; } // when popup show, click body will call this, bug! var selectedValue = nextProps.selectedValue; if (!state.hasFocus) { newState = { str: formatDate(selectedValue, nextProps.format), invalid: false }; } return newState; }; DateInput.getInstance = function getInstance() { return dateInputInstance; }; DateInput.prototype.render = function render() { var props = this.props; var _state = this.state, invalid = _state.invalid, str = _state.str; var locale = props.locale, prefixCls = props.prefixCls, placeholder = props.placeholder, clearIcon = props.clearIcon, inputMode = props.inputMode; var invalidClass = invalid ? prefixCls + '-input-invalid' : ''; return react_default.a.createElement( 'div', { className: prefixCls + '-input-wrap' }, react_default.a.createElement( 'div', { className: prefixCls + '-date-input-wrap' }, react_default.a.createElement('input', { ref: this.saveDateInput, className: prefixCls + '-input ' + invalidClass, value: str, disabled: props.disabled, placeholder: placeholder, onChange: this.onInputChange, onKeyDown: this.onKeyDown, onFocus: this.onFocus, onBlur: this.onBlur, inputMode: inputMode }) ), props.showClear ? react_default.a.createElement( 'a', { role: 'button', title: locale.clear, onClick: this.onClear }, clearIcon || react_default.a.createElement('span', { className: prefixCls + '-clear-btn' }) ) : null ); }; return DateInput; }(react_default.a.Component); DateInput_DateInput.propTypes = { prefixCls: prop_types_default.a.string, timePicker: prop_types_default.a.object, value: prop_types_default.a.object, disabledTime: prop_types_default.a.any, format: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.arrayOf(prop_types_default.a.string)]), locale: prop_types_default.a.object, disabledDate: prop_types_default.a.func, onChange: prop_types_default.a.func, onClear: prop_types_default.a.func, placeholder: prop_types_default.a.string, onSelect: prop_types_default.a.func, selectedValue: prop_types_default.a.object, clearIcon: prop_types_default.a.node, inputMode: prop_types_default.a.string }; var DateInput__initialiseProps = function _initialiseProps() { var _this2 = this; this.onClear = function () { _this2.setState({ str: '' }); _this2.props.onClear(null); }; this.onInputChange = function (event) { var str = event.target.value; var _props = _this2.props, disabledDate = _props.disabledDate, format = _props.format, onChange = _props.onChange, selectedValue = _props.selectedValue; // 没有内容,合法并直接退出 if (!str) { onChange(null); _this2.setState({ invalid: false, str: str }); return; } // 不合法直接退出 var parsed = moment_default()(str, format, true); if (!parsed.isValid()) { _this2.setState({ invalid: true, str: str }); return; } var value = _this2.props.value.clone(); value.year(parsed.year()).month(parsed.month()).date(parsed.date()).hour(parsed.hour()).minute(parsed.minute()).second(parsed.second()); if (!value || disabledDate && disabledDate(value)) { _this2.setState({ invalid: true, str: str }); return; } if (selectedValue !== value || selectedValue && value && !selectedValue.isSame(value)) { _this2.setState({ invalid: false, str: str }); onChange(value); } }; this.onFocus = function () { _this2.setState({ hasFocus: true }); }; this.onBlur = function () { _this2.setState(function (prevState, prevProps) { return { hasFocus: false, str: formatDate(prevProps.value, prevProps.format) }; }); }; this.onKeyDown = function (event) { var keyCode = event.keyCode; var _props2 = _this2.props, onSelect = _props2.onSelect, value = _props2.value, disabledDate = _props2.disabledDate; if (keyCode === KeyCode["a" /* default */].ENTER && onSelect) { var validateDate = !disabledDate || !disabledDate(value); if (validateDate) { onSelect(value.clone()); } event.preventDefault(); } }; this.getRootDOMNode = function () { return react_dom_default.a.findDOMNode(_this2); }; this.focus = function () { if (dateInputInstance) { dateInputInstance.focus(); } }; this.saveDateInput = function (dateInput) { dateInputInstance = dateInput; }; }; Object(react_lifecycles_compat_es["polyfill"])(DateInput_DateInput); /* harmony default export */ var date_DateInput = (DateInput_DateInput); // CONCATENATED MODULE: ./node_modules/rc-calendar/es/util/toTime.js function goStartMonth(time) { return time.clone().startOf('month'); } function goEndMonth(time) { return time.clone().endOf('month'); } function goTime(time, direction, unit) { return time.clone().add(direction, unit); } function includesTime() { var timeList = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; var time = arguments[1]; var unit = arguments[2]; return timeList.some(function (t) { return t.isSame(time, unit); }); } // CONCATENATED MODULE: ./node_modules/rc-calendar/es/Calendar.js function Calendar_noop() {} var Calendar_getMomentObjectIfValid = function getMomentObjectIfValid(date) { if (moment_default.a.isMoment(date) && date.isValid()) { return date; } return false; }; var Calendar_Calendar = function (_React$Component) { inherits_default()(Calendar, _React$Component); function Calendar(props) { classCallCheck_default()(this, Calendar); var _this = possibleConstructorReturn_default()(this, _React$Component.call(this, props)); Calendar__initialiseProps.call(_this); _this.state = { mode: _this.props.mode || 'date', value: Calendar_getMomentObjectIfValid(props.value) || Calendar_getMomentObjectIfValid(props.defaultValue) || moment_default()(), selectedValue: props.selectedValue || props.defaultSelectedValue }; return _this; } Calendar.prototype.componentDidMount = function componentDidMount() { if (this.props.showDateInput) { this.saveFocusElement(date_DateInput.getInstance()); } }; Calendar.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, state) { var value = nextProps.value, selectedValue = nextProps.selectedValue; var newState = {}; if ('mode' in nextProps && state.mode !== nextProps.mode) { newState = { mode: nextProps.mode }; } if ('value' in nextProps) { newState.value = Calendar_getMomentObjectIfValid(value) || Calendar_getMomentObjectIfValid(nextProps.defaultValue) || getNowByCurrentStateValue(state.value); } if ('selectedValue' in nextProps) { newState.selectedValue = selectedValue; } return newState; }; Calendar.prototype.render = function render() { var props = this.props, state = this.state; var locale = props.locale, prefixCls = props.prefixCls, disabledDate = props.disabledDate, dateInputPlaceholder = props.dateInputPlaceholder, timePicker = props.timePicker, disabledTime = props.disabledTime, clearIcon = props.clearIcon, renderFooter = props.renderFooter, inputMode = props.inputMode, monthCellRender = props.monthCellRender, monthCellContentRender = props.monthCellContentRender; var value = state.value, selectedValue = state.selectedValue, mode = state.mode; var showTimePicker = mode === 'time'; var disabledTimeConfig = showTimePicker && disabledTime && timePicker ? getTimeConfig(selectedValue, disabledTime) : null; var timePickerEle = null; if (timePicker && showTimePicker) { var timePickerProps = extends_default()({ showHour: true, showSecond: true, showMinute: true }, timePicker.props, disabledTimeConfig, { onChange: this.onDateInputChange, value: selectedValue, disabledTime: disabledTime }); if (timePicker.props.defaultValue !== undefined) { timePickerProps.defaultOpenValue = timePicker.props.defaultValue; } timePickerEle = react_default.a.cloneElement(timePicker, timePickerProps); } var dateInputElement = props.showDateInput ? react_default.a.createElement(date_DateInput, { format: this.getFormat(), key: 'date-input', value: value, locale: locale, placeholder: dateInputPlaceholder, showClear: true, disabledTime: disabledTime, disabledDate: disabledDate, onClear: this.onClear, prefixCls: prefixCls, selectedValue: selectedValue, onChange: this.onDateInputChange, onSelect: this.onDateInputSelect, clearIcon: clearIcon, inputMode: inputMode }) : null; var children = []; if (props.renderSidebar) { children.push(props.renderSidebar()); } children.push(react_default.a.createElement( 'div', { className: prefixCls + '-panel', key: 'panel' }, dateInputElement, react_default.a.createElement( 'div', { tabIndex: this.props.focusablePanel ? 0 : undefined, className: prefixCls + '-date-panel' }, react_default.a.createElement(calendar_CalendarHeader, { locale: locale, mode: mode, value: value, onValueChange: this.setValue, onPanelChange: this.onPanelChange, renderFooter: renderFooter, showTimePicker: showTimePicker, prefixCls: prefixCls, monthCellRender: monthCellRender, monthCellContentRender: monthCellContentRender }), timePicker && showTimePicker ? react_default.a.createElement( 'div', { className: prefixCls + '-time-picker' }, react_default.a.createElement( 'div', { className: prefixCls + '-time-picker-panel' }, timePickerEle ) ) : null, react_default.a.createElement( 'div', { className: prefixCls + '-body' }, react_default.a.createElement(date_DateTable, { locale: locale, value: value, selectedValue: selectedValue, prefixCls: prefixCls, dateRender: props.dateRender, onSelect: this.onDateTableSelect, disabledDate: disabledDate, showWeekNumber: props.showWeekNumber }) ), react_default.a.createElement(calendar_CalendarFooter, { showOk: props.showOk, mode: mode, renderFooter: props.renderFooter, locale: locale, prefixCls: prefixCls, showToday: props.showToday, disabledTime: disabledTime, showTimePicker: showTimePicker, showDateInput: props.showDateInput, timePicker: timePicker, selectedValue: selectedValue, timePickerDisabled: !selectedValue, value: value, disabledDate: disabledDate, okDisabled: props.showOk !== false && (!selectedValue || !this.isAllowedDate(selectedValue)), onOk: this.onOk, onSelect: this.onSelect, onToday: this.onToday, onOpenTimePicker: this.openTimePicker, onCloseTimePicker: this.closeTimePicker }) ) )); return this.renderRoot({ children: children, className: props.showWeekNumber ? prefixCls + '-week-number' : '' }); }; return Calendar; }(react_default.a.Component); Calendar_Calendar.propTypes = extends_default()({}, calendarMixinPropTypes, propType, { prefixCls: prop_types_default.a.string, className: prop_types_default.a.string, style: prop_types_default.a.object, defaultValue: prop_types_default.a.object, value: prop_types_default.a.object, selectedValue: prop_types_default.a.object, defaultSelectedValue: prop_types_default.a.object, mode: prop_types_default.a.oneOf(['time', 'date', 'month', 'year', 'decade']), locale: prop_types_default.a.object, showDateInput: prop_types_default.a.bool, showWeekNumber: prop_types_default.a.bool, showToday: prop_types_default.a.bool, showOk: prop_types_default.a.bool, onSelect: prop_types_default.a.func, onOk: prop_types_default.a.func, onKeyDown: prop_types_default.a.func, timePicker: prop_types_default.a.element, dateInputPlaceholder: prop_types_default.a.any, onClear: prop_types_default.a.func, onChange: prop_types_default.a.func, onPanelChange: prop_types_default.a.func, disabledDate: prop_types_default.a.func, disabledTime: prop_types_default.a.any, dateRender: prop_types_default.a.func, renderFooter: prop_types_default.a.func, renderSidebar: prop_types_default.a.func, clearIcon: prop_types_default.a.node, focusablePanel: prop_types_default.a.bool, inputMode: prop_types_default.a.string, onBlur: prop_types_default.a.func }); Calendar_Calendar.defaultProps = extends_default()({}, calendarMixinDefaultProps, defaultProp, { showToday: true, showDateInput: true, timePicker: null, onOk: Calendar_noop, onPanelChange: Calendar_noop, focusablePanel: true }); var Calendar__initialiseProps = function _initialiseProps() { var _this2 = this; this.onPanelChange = function (value, mode) { var props = _this2.props, state = _this2.state; if (!('mode' in props)) { _this2.setState({ mode: mode }); } props.onPanelChange(value || state.value, mode); }; this.onKeyDown = function (event) { if (event.target.nodeName.toLowerCase() === 'input') { return undefined; } var keyCode = event.keyCode; // mac var ctrlKey = event.ctrlKey || event.metaKey; var disabledDate = _this2.props.disabledDate; var value = _this2.state.value; switch (keyCode) { case KeyCode["a" /* default */].DOWN: _this2.goTime(1, 'weeks'); event.preventDefault(); return 1; case KeyCode["a" /* default */].UP: _this2.goTime(-1, 'weeks'); event.preventDefault(); return 1; case KeyCode["a" /* default */].LEFT: if (ctrlKey) { _this2.goTime(-1, 'years'); } else { _this2.goTime(-1, 'days'); } event.preventDefault(); return 1; case KeyCode["a" /* default */].RIGHT: if (ctrlKey) { _this2.goTime(1, 'years'); } else { _this2.goTime(1, 'days'); } event.preventDefault(); return 1; case KeyCode["a" /* default */].HOME: _this2.setValue(goStartMonth(_this2.state.value)); event.preventDefault(); return 1; case KeyCode["a" /* default */].END: _this2.setValue(goEndMonth(_this2.state.value)); event.preventDefault(); return 1; case KeyCode["a" /* default */].PAGE_DOWN: _this2.goTime(1, 'month'); event.preventDefault(); return 1; case KeyCode["a" /* default */].PAGE_UP: _this2.goTime(-1, 'month'); event.preventDefault(); return 1; case KeyCode["a" /* default */].ENTER: if (!disabledDate || !disabledDate(value)) { _this2.onSelect(value, { source: 'keyboard' }); } event.preventDefault(); return 1; default: _this2.props.onKeyDown(event); return 1; } }; this.onClear = function () { _this2.onSelect(null); _this2.props.onClear(); }; this.onOk = function () { var selectedValue = _this2.state.selectedValue; if (_this2.isAllowedDate(selectedValue)) { _this2.props.onOk(selectedValue); } }; this.onDateInputChange = function (value) { _this2.onSelect(value, { source: 'dateInput' }); }; this.onDateInputSelect = function (value) { _this2.onSelect(value, { source: 'dateInputSelect' }); }; this.onDateTableSelect = function (value) { var timePicker = _this2.props.timePicker; var selectedValue = _this2.state.selectedValue; if (!selectedValue && timePicker) { var timePickerDefaultValue = timePicker.props.defaultValue; if (timePickerDefaultValue) { syncTime(timePickerDefaultValue, value); } } _this2.onSelect(value); }; this.onToday = function () { var value = _this2.state.value; var now = getTodayTime(value); _this2.onSelect(now, { source: 'todayButton' }); }; this.onBlur = function (event) { setTimeout(function () { var dateInput = date_DateInput.getInstance(); var rootInstance = _this2.rootInstance; if (!rootInstance || rootInstance.contains(document.activeElement) || dateInput && dateInput.contains(document.activeElement)) { // focused element is still part of Calendar return; } if (_this2.props.onBlur) { _this2.props.onBlur(event); } }, 0); }; this.getRootDOMNode = function () { return react_dom_default.a.findDOMNode(_this2); }; this.openTimePicker = function () { _this2.onPanelChange(null, 'time'); }; this.closeTimePicker = function () { _this2.onPanelChange(null, 'date'); }; this.goTime = function (direction, unit) { _this2.setValue(goTime(_this2.state.value, direction, unit)); }; }; Object(react_lifecycles_compat_es["polyfill"])(Calendar_Calendar); /* harmony default export */ var es_Calendar = (CalendarMixin_calendarMixinWrapper(CommonMixin_commonMixinWrapper(Calendar_Calendar))); // CONCATENATED MODULE: ./node_modules/rc-calendar/es/index.js /* harmony default export */ var es = (es_Calendar); // CONCATENATED MODULE: ./node_modules/rc-calendar/es/MonthCalendar.js var MonthCalendar_MonthCalendar = function (_React$Component) { inherits_default()(MonthCalendar, _React$Component); function MonthCalendar(props) { classCallCheck_default()(this, MonthCalendar); var _this = possibleConstructorReturn_default()(this, _React$Component.call(this, props)); _this.onKeyDown = function (event) { var keyCode = event.keyCode; var ctrlKey = event.ctrlKey || event.metaKey; var stateValue = _this.state.value; var disabledDate = _this.props.disabledDate; var value = stateValue; switch (keyCode) { case KeyCode["a" /* default */].DOWN: value = stateValue.clone(); value.add(3, 'months'); break; case KeyCode["a" /* default */].UP: value = stateValue.clone(); value.add(-3, 'months'); break; case KeyCode["a" /* default */].LEFT: value = stateValue.clone(); if (ctrlKey) { value.add(-1, 'years'); } else { value.add(-1, 'months'); } break; case KeyCode["a" /* default */].RIGHT: value = stateValue.clone(); if (ctrlKey) { value.add(1, 'years'); } else { value.add(1, 'months'); } break; case KeyCode["a" /* default */].ENTER: if (!disabledDate || !disabledDate(stateValue)) { _this.onSelect(stateValue); } event.preventDefault(); return 1; default: return undefined; } if (value !== stateValue) { _this.setValue(value); event.preventDefault(); return 1; } }; _this.handlePanelChange = function (_, mode) { if (mode !== 'date') { _this.setState({ mode: mode }); } }; _this.state = { mode: 'month', value: props.value || props.defaultValue || moment_default()(), selectedValue: props.selectedValue || props.defaultSelectedValue }; return _this; } MonthCalendar.prototype.render = function render() { var props = this.props, state = this.state; var mode = state.mode, value = state.value; var children = react_default.a.createElement( 'div', { className: props.prefixCls + '-month-calendar-content' }, react_default.a.createElement( 'div', { className: props.prefixCls + '-month-header-wrap' }, react_default.a.createElement(calendar_CalendarHeader, { prefixCls: props.prefixCls, mode: mode, value: value, locale: props.locale, disabledMonth: props.disabledDate, monthCellRender: props.monthCellRender, monthCellContentRender: props.monthCellContentRender, onMonthSelect: this.onSelect, onValueChange: this.setValue, onPanelChange: this.handlePanelChange }) ), react_default.a.createElement(calendar_CalendarFooter, { prefixCls: props.prefixCls, renderFooter: props.renderFooter }) ); return this.renderRoot({ className: props.prefixCls + '-month-calendar', children: children }); }; return MonthCalendar; }(react_default.a.Component); MonthCalendar_MonthCalendar.propTypes = extends_default()({}, calendarMixinPropTypes, propType, { monthCellRender: prop_types_default.a.func, value: prop_types_default.a.object, defaultValue: prop_types_default.a.object, selectedValue: prop_types_default.a.object, defaultSelectedValue: prop_types_default.a.object, disabledDate: prop_types_default.a.func }); MonthCalendar_MonthCalendar.defaultProps = extends_default()({}, defaultProp, calendarMixinDefaultProps); /* harmony default export */ var es_MonthCalendar = (Object(react_lifecycles_compat_es["polyfill"])(CalendarMixin_calendarMixinWrapper(CommonMixin_commonMixinWrapper(MonthCalendar_MonthCalendar)))); // EXTERNAL MODULE: ./node_modules/rc-util/es/createChainedFunction.js var createChainedFunction = __webpack_require__("Erof"); // CONCATENATED MODULE: ./node_modules/rc-calendar/es/picker/placements.js var autoAdjustOverflow = { adjustX: 1, adjustY: 1 }; var targetOffset = [0, 0]; var placements = { bottomLeft: { points: ['tl', 'tl'], overflow: autoAdjustOverflow, offset: [0, -3], targetOffset: targetOffset }, bottomRight: { points: ['tr', 'tr'], overflow: autoAdjustOverflow, offset: [0, -3], targetOffset: targetOffset }, topRight: { points: ['br', 'br'], overflow: autoAdjustOverflow, offset: [0, 3], targetOffset: targetOffset }, topLeft: { points: ['bl', 'bl'], overflow: autoAdjustOverflow, offset: [0, 3], targetOffset: targetOffset } }; /* harmony default export */ var picker_placements = (placements); // EXTERNAL MODULE: ./node_modules/rc-trigger/es/index.js + 4 modules var rc_trigger_es = __webpack_require__("isWq"); // CONCATENATED MODULE: ./node_modules/rc-calendar/es/Picker.js function Picker_noop() {} function refFn(field, component) { this[field] = component; } var Picker_Picker = function (_React$Component) { inherits_default()(Picker, _React$Component); function Picker(props) { classCallCheck_default()(this, Picker); var _this = possibleConstructorReturn_default()(this, _React$Component.call(this, props)); Picker__initialiseProps.call(_this); var open = void 0; if ('open' in props) { open = props.open; } else { open = props.defaultOpen; } var value = props.value || props.defaultValue; _this.saveCalendarRef = refFn.bind(_this, 'calendarInstance'); _this.state = { open: open, value: value }; return _this; } Picker.prototype.componentDidUpdate = function componentDidUpdate(_, prevState) { if (!prevState.open && this.state.open) { // setTimeout is for making sure saveCalendarRef happen before focusCalendar this.focusTimeout = setTimeout(this.focusCalendar, 0, this); } }; Picker.prototype.componentWillUnmount = function componentWillUnmount() { clearTimeout(this.focusTimeout); }; Picker.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps) { var newState = {}; var value = nextProps.value, open = nextProps.open; if ('value' in nextProps) { newState.value = value; } if (open !== undefined) { newState.open = open; } return newState; }; Picker.prototype.render = function render() { var props = this.props; var prefixCls = props.prefixCls, placement = props.placement, style = props.style, getCalendarContainer = props.getCalendarContainer, align = props.align, animation = props.animation, disabled = props.disabled, dropdownClassName = props.dropdownClassName, transitionName = props.transitionName, children = props.children; var state = this.state; return react_default.a.createElement( rc_trigger_es["a" /* default */], { popup: this.getCalendarElement(), popupAlign: align, builtinPlacements: picker_placements, popupPlacement: placement, action: disabled && !state.open ? [] : ['click'], destroyPopupOnHide: true, getPopupContainer: getCalendarContainer, popupStyle: style, popupAnimation: animation, popupTransitionName: transitionName, popupVisible: state.open, onPopupVisibleChange: this.onVisibleChange, prefixCls: prefixCls, popupClassName: dropdownClassName }, react_default.a.cloneElement(children(state, props), { onKeyDown: this.onKeyDown }) ); }; return Picker; }(react_default.a.Component); Picker_Picker.propTypes = { animation: prop_types_default.a.oneOfType([prop_types_default.a.func, prop_types_default.a.string]), disabled: prop_types_default.a.bool, transitionName: prop_types_default.a.string, onChange: prop_types_default.a.func, onOpenChange: prop_types_default.a.func, children: prop_types_default.a.func, getCalendarContainer: prop_types_default.a.func, calendar: prop_types_default.a.element, style: prop_types_default.a.object, open: prop_types_default.a.bool, defaultOpen: prop_types_default.a.bool, prefixCls: prop_types_default.a.string, placement: prop_types_default.a.any, value: prop_types_default.a.oneOfType([prop_types_default.a.object, prop_types_default.a.array]), defaultValue: prop_types_default.a.oneOfType([prop_types_default.a.object, prop_types_default.a.array]), align: prop_types_default.a.object, dateRender: prop_types_default.a.func, onBlur: prop_types_default.a.func }; Picker_Picker.defaultProps = { prefixCls: 'rc-calendar-picker', style: {}, align: {}, placement: 'bottomLeft', defaultOpen: false, onChange: Picker_noop, onOpenChange: Picker_noop, onBlur: Picker_noop }; var Picker__initialiseProps = function _initialiseProps() { var _this2 = this; this.onCalendarKeyDown = function (event) { if (event.keyCode === KeyCode["a" /* default */].ESC) { event.stopPropagation(); _this2.close(_this2.focus); } }; this.onCalendarSelect = function (value) { var cause = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; var props = _this2.props; if (!('value' in props)) { _this2.setState({ value: value }); } if (cause.source === 'keyboard' || cause.source === 'dateInputSelect' || !props.calendar.props.timePicker && cause.source !== 'dateInput' || cause.source === 'todayButton') { _this2.close(_this2.focus); } props.onChange(value); }; this.onKeyDown = function (event) { if (!_this2.state.open && (event.keyCode === KeyCode["a" /* default */].DOWN || event.keyCode === KeyCode["a" /* default */].ENTER)) { _this2.open(); event.preventDefault(); } }; this.onCalendarOk = function () { _this2.close(_this2.focus); }; this.onCalendarClear = function () { _this2.close(_this2.focus); }; this.onCalendarBlur = function () { _this2.setOpen(false); }; this.onVisibleChange = function (open) { _this2.setOpen(open); }; this.getCalendarElement = function () { var props = _this2.props; var state = _this2.state; var calendarProps = props.calendar.props; var value = state.value; var defaultValue = value; var extraProps = { ref: _this2.saveCalendarRef, defaultValue: defaultValue || calendarProps.defaultValue, selectedValue: value, onKeyDown: _this2.onCalendarKeyDown, onOk: Object(createChainedFunction["a" /* default */])(calendarProps.onOk, _this2.onCalendarOk), onSelect: Object(createChainedFunction["a" /* default */])(calendarProps.onSelect, _this2.onCalendarSelect), onClear: Object(createChainedFunction["a" /* default */])(calendarProps.onClear, _this2.onCalendarClear), onBlur: Object(createChainedFunction["a" /* default */])(calendarProps.onBlur, _this2.onCalendarBlur) }; return react_default.a.cloneElement(props.calendar, extraProps); }; this.setOpen = function (open, callback) { var onOpenChange = _this2.props.onOpenChange; if (_this2.state.open !== open) { if (!('open' in _this2.props)) { _this2.setState({ open: open }, callback); } onOpenChange(open); } }; this.open = function (callback) { _this2.setOpen(true, callback); }; this.close = function (callback) { _this2.setOpen(false, callback); }; this.focus = function () { if (!_this2.state.open) { react_dom_default.a.findDOMNode(_this2).focus(); } }; this.focusCalendar = function () { if (_this2.state.open && !!_this2.calendarInstance) { _this2.calendarInstance.focus(); } }; }; Object(react_lifecycles_compat_es["polyfill"])(Picker_Picker); /* harmony default export */ var es_Picker = (Picker_Picker); // EXTERNAL MODULE: ./node_modules/antd/node_modules/classnames/index.js var node_modules_classnames = __webpack_require__("kTQ8"); var node_modules_classnames_default = /*#__PURE__*/__webpack_require__.n(node_modules_classnames); // EXTERNAL MODULE: ./node_modules/omit.js/es/index.js var omit_js_es = __webpack_require__("JkBm"); // EXTERNAL MODULE: ./node_modules/antd/es/icon/index.js + 5 modules var icon = __webpack_require__("FC3+"); // EXTERNAL MODULE: ./node_modules/antd/es/config-provider/index.js + 1 modules var config_provider = __webpack_require__("PmSq"); // EXTERNAL MODULE: ./node_modules/antd/es/_util/warning.js var warning = __webpack_require__("qGip"); // EXTERNAL MODULE: ./node_modules/antd/es/_util/interopDefault.js var interopDefault = __webpack_require__("FQ6r"); // EXTERNAL MODULE: ./node_modules/antd/es/_util/getDataOrAriaProps.js var getDataOrAriaProps = __webpack_require__("iVvL"); // CONCATENATED MODULE: ./node_modules/antd/es/date-picker/utils.js // eslint-disable-next-line import/prefer-default-export function utils_formatDate(value, format) { if (!value) { return ''; } if (Array.isArray(format)) { format = format[0]; } return value.format(format); } // CONCATENATED MODULE: ./node_modules/antd/es/date-picker/createPicker.js function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _extends() { _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; }; return _extends.apply(this, arguments); } 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; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function createPicker(TheCalendar) { var CalenderWrapper = /*#__PURE__*/function (_React$Component) { _inherits(CalenderWrapper, _React$Component); var _super = _createSuper(CalenderWrapper); function CalenderWrapper(props) { var _this; _classCallCheck(this, CalenderWrapper); _this = _super.call(this, props); _this.saveInput = function (node) { _this.input = node; }; _this.clearSelection = function (e) { e.preventDefault(); e.stopPropagation(); _this.handleChange(null); }; _this.handleChange = function (value) { var _assertThisInitialize = _assertThisInitialized(_this), props = _assertThisInitialize.props; if (!('value' in props)) { _this.setState({ value: value, showDate: value }); } props.onChange(value, utils_formatDate(value, props.format)); }; _this.handleCalendarChange = function (value) { _this.setState({ showDate: value }); }; _this.handleOpenChange = function (open) { var onOpenChange = _this.props.onOpenChange; if (!('open' in _this.props)) { _this.setState({ open: open }); } if (onOpenChange) { onOpenChange(open); } }; _this.renderFooter = function () { var renderExtraFooter = _this.props.renderExtraFooter; var _assertThisInitialize2 = _assertThisInitialized(_this), prefixCls = _assertThisInitialize2.prefixCls; return renderExtraFooter ? /*#__PURE__*/react["createElement"]("div", { className: "".concat(prefixCls, "-footer-extra") }, renderExtraFooter.apply(void 0, arguments)) : null; }; _this.renderPicker = function (_ref) { var _classNames, _classNames2; var getPrefixCls = _ref.getPrefixCls; var _this$state = _this.state, value = _this$state.value, showDate = _this$state.showDate, open = _this$state.open; var props = Object(omit_js_es["a" /* default */])(_this.props, ['onChange']); var customizePrefixCls = props.prefixCls, locale = props.locale, localeCode = props.localeCode, suffixIcon = props.suffixIcon; var prefixCls = getPrefixCls('calendar', customizePrefixCls); // To support old version react. // Have to add prefixCls on the instance. // https://github.com/facebook/react/issues/12397 _this.prefixCls = prefixCls; var placeholder = 'placeholder' in props ? props.placeholder : locale.lang.placeholder; var disabledTime = props.showTime ? props.disabledTime : null; var calendarClassName = node_modules_classnames_default()((_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-time"), props.showTime), _defineProperty(_classNames, "".concat(prefixCls, "-month"), es_MonthCalendar === TheCalendar), _classNames)); if (value && localeCode) { value.locale(localeCode); } var pickerProps = {}; var calendarProps = {}; var pickerStyle = {}; if (props.showTime) { calendarProps = { // fix https://github.com/ant-design/ant-design/issues/1902 onSelect: _this.handleChange }; pickerStyle.minWidth = 195; } else { pickerProps = { onChange: _this.handleChange }; } if ('mode' in props) { calendarProps.mode = props.mode; } Object(warning["a" /* default */])(!('onOK' in props), 'DatePicker', 'It should be `DatePicker[onOk]` or `MonthPicker[onOk]`, instead of `onOK`!'); var calendar = /*#__PURE__*/react["createElement"](TheCalendar, _extends({}, calendarProps, { disabledDate: props.disabledDate, disabledTime: disabledTime, locale: locale.lang, timePicker: props.timePicker, defaultValue: props.defaultPickerValue || Object(interopDefault["a" /* default */])(moment)(), dateInputPlaceholder: placeholder, prefixCls: prefixCls, className: calendarClassName, onOk: props.onOk, dateRender: props.dateRender, format: props.format, showToday: props.showToday, monthCellContentRender: props.monthCellContentRender, renderFooter: _this.renderFooter, onPanelChange: props.onPanelChange, onChange: _this.handleCalendarChange, value: showDate })); var clearIcon = !props.disabled && props.allowClear && value ? /*#__PURE__*/react["createElement"](icon["default"], { type: "close-circle", className: "".concat(prefixCls, "-picker-clear"), onClick: _this.clearSelection, theme: "filled" }) : null; var inputIcon = suffixIcon && ( /*#__PURE__*/react["isValidElement"](suffixIcon) ? /*#__PURE__*/react["cloneElement"](suffixIcon, { className: node_modules_classnames_default()((_classNames2 = {}, _defineProperty(_classNames2, suffixIcon.props.className, suffixIcon.props.className), _defineProperty(_classNames2, "".concat(prefixCls, "-picker-icon"), true), _classNames2)) }) : /*#__PURE__*/react["createElement"]("span", { className: "".concat(prefixCls, "-picker-icon") }, suffixIcon)) || /*#__PURE__*/react["createElement"](icon["default"], { type: "calendar", className: "".concat(prefixCls, "-picker-icon") }); var dataOrAriaProps = Object(getDataOrAriaProps["a" /* default */])(props); var input = function input(_ref2) { var inputValue = _ref2.value; return /*#__PURE__*/react["createElement"]("div", null, /*#__PURE__*/react["createElement"]("input", _extends({ ref: _this.saveInput, disabled: props.disabled, readOnly: true, value: utils_formatDate(inputValue, props.format), placeholder: placeholder, className: props.pickerInputClass, tabIndex: props.tabIndex, name: props.name }, dataOrAriaProps)), clearIcon, inputIcon); }; return /*#__PURE__*/react["createElement"]("span", { id: props.id, className: node_modules_classnames_default()(props.className, props.pickerClass), style: _extends(_extends({}, pickerStyle), props.style), onFocus: props.onFocus, onBlur: props.onBlur, onMouseEnter: props.onMouseEnter, onMouseLeave: props.onMouseLeave }, /*#__PURE__*/react["createElement"](es_Picker, _extends({}, props, pickerProps, { calendar: calendar, value: value, prefixCls: "".concat(prefixCls, "-picker-container"), style: props.popupStyle, open: open, onOpenChange: _this.handleOpenChange }), input)); }; var value = props.value || props.defaultValue; if (value && !Object(interopDefault["a" /* default */])(moment).isMoment(value)) { throw new Error('The value/defaultValue of DatePicker or MonthPicker must be ' + 'a moment object after `antd@2.0`, see: https://u.ant.design/date-picker-value'); } _this.state = { value: value, showDate: value, open: false }; return _this; } _createClass(CalenderWrapper, [{ key: "componentDidUpdate", value: function componentDidUpdate(_, prevState) { if (!('open' in this.props) && prevState.open && !this.state.open) { this.focus(); } } }, { key: "focus", value: function focus() { this.input.focus(); } }, { key: "blur", value: function blur() { this.input.blur(); } }, { key: "render", value: function render() { return /*#__PURE__*/react["createElement"](config_provider["ConfigConsumer"], null, this.renderPicker); } }], [{ key: "getDerivedStateFromProps", value: function getDerivedStateFromProps(nextProps, prevState) { var state = {}; var open = prevState.open; if ('open' in nextProps) { state.open = nextProps.open; open = nextProps.open || false; } if ('value' in nextProps) { state.value = nextProps.value; if (nextProps.value !== prevState.value || !open && nextProps.value !== prevState.showDate) { state.showDate = nextProps.value; } } return Object.keys(state).length > 0 ? state : null; } }]); return CalenderWrapper; }(react["Component"]); CalenderWrapper.defaultProps = { allowClear: true, showToday: true }; Object(react_lifecycles_compat_es["polyfill"])(CalenderWrapper); return CalenderWrapper; } // EXTERNAL MODULE: ./node_modules/rc-time-picker/es/Panel.js + 3 modules var Panel = __webpack_require__("Nl98"); // EXTERNAL MODULE: ./node_modules/antd/es/date-picker/locale/en_US.js var locale_en_US = __webpack_require__("uPRz"); // EXTERNAL MODULE: ./node_modules/antd/es/locale-provider/LocaleReceiver.js + 1 modules var LocaleReceiver = __webpack_require__("IIvH"); // EXTERNAL MODULE: ./node_modules/antd/es/time-picker/index.js + 2 modules var time_picker = __webpack_require__("m6wg"); // CONCATENATED MODULE: ./node_modules/antd/es/date-picker/wrapPicker.js function wrapPicker__typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { wrapPicker__typeof = function _typeof(obj) { return typeof obj; }; } else { wrapPicker__typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return wrapPicker__typeof(obj); } function wrapPicker__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; } function wrapPicker__extends() { wrapPicker__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; }; return wrapPicker__extends.apply(this, arguments); } function wrapPicker__classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function wrapPicker__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); } } function wrapPicker__createClass(Constructor, protoProps, staticProps) { if (protoProps) wrapPicker__defineProperties(Constructor.prototype, protoProps); if (staticProps) wrapPicker__defineProperties(Constructor, staticProps); return Constructor; } function wrapPicker__inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) wrapPicker__setPrototypeOf(subClass, superClass); } function wrapPicker__setPrototypeOf(o, p) { wrapPicker__setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return wrapPicker__setPrototypeOf(o, p); } function wrapPicker__createSuper(Derived) { var hasNativeReflectConstruct = wrapPicker__isNativeReflectConstruct(); return function _createSuperInternal() { var Super = wrapPicker__getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = wrapPicker__getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return wrapPicker__possibleConstructorReturn(this, result); }; } function wrapPicker__possibleConstructorReturn(self, call) { if (call && (wrapPicker__typeof(call) === "object" || typeof call === "function")) { return call; } return wrapPicker__assertThisInitialized(self); } function wrapPicker__assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function wrapPicker__isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } function wrapPicker__getPrototypeOf(o) { wrapPicker__getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return wrapPicker__getPrototypeOf(o); } var DEFAULT_FORMAT = { date: 'YYYY-MM-DD', dateTime: 'YYYY-MM-DD HH:mm:ss', week: 'gggg-wo', month: 'YYYY-MM' }; var LOCALE_FORMAT_MAPPING = { date: 'dateFormat', dateTime: 'dateTimeFormat', week: 'weekFormat', month: 'monthFormat' }; function getColumns(_ref) { var showHour = _ref.showHour, showMinute = _ref.showMinute, showSecond = _ref.showSecond, use12Hours = _ref.use12Hours; var column = 0; if (showHour) { column += 1; } if (showMinute) { column += 1; } if (showSecond) { column += 1; } if (use12Hours) { column += 1; } return column; } function checkValidate(value, propName) { var values = Array.isArray(value) ? value : [value]; values.forEach(function (val) { if (!val) return; Object(warning["a" /* default */])(!Object(interopDefault["a" /* default */])(moment).isMoment(val) || val.isValid(), 'DatePicker', "`".concat(propName, "` provides invalidate moment time. If you want to set empty value, use `null` instead.")); }); } function wrapPicker(Picker, pickerType) { var PickerWrapper = /*#__PURE__*/function (_React$Component) { wrapPicker__inherits(PickerWrapper, _React$Component); var _super = wrapPicker__createSuper(PickerWrapper); function PickerWrapper() { var _this; wrapPicker__classCallCheck(this, PickerWrapper); _this = _super.apply(this, arguments); // Since we need call `getDerivedStateFromProps` for check. Need leave an empty `state` here. _this.state = {}; _this.savePicker = function (node) { _this.picker = node; }; _this.getDefaultLocale = function () { var result = wrapPicker__extends(wrapPicker__extends({}, locale_en_US["a" /* default */]), _this.props.locale); result.lang = wrapPicker__extends(wrapPicker__extends({}, result.lang), (_this.props.locale || {}).lang); return result; }; _this.handleOpenChange = function (open) { var onOpenChange = _this.props.onOpenChange; onOpenChange(open); }; _this.handleFocus = function (e) { var onFocus = _this.props.onFocus; if (onFocus) { onFocus(e); } }; _this.handleBlur = function (e) { var onBlur = _this.props.onBlur; if (onBlur) { onBlur(e); } }; _this.handleMouseEnter = function (e) { var onMouseEnter = _this.props.onMouseEnter; if (onMouseEnter) { onMouseEnter(e); } }; _this.handleMouseLeave = function (e) { var onMouseLeave = _this.props.onMouseLeave; if (onMouseLeave) { onMouseLeave(e); } }; _this.renderPicker = function (locale, localeCode) { var _this$props = _this.props, format = _this$props.format, showTime = _this$props.showTime; var mergedPickerType = showTime ? "".concat(pickerType, "Time") : pickerType; var mergedFormat = format || locale[LOCALE_FORMAT_MAPPING[mergedPickerType]] || DEFAULT_FORMAT[mergedPickerType]; return /*#__PURE__*/react["createElement"](config_provider["ConfigConsumer"], null, function (_ref2) { var _classNames2; var getPrefixCls = _ref2.getPrefixCls, getContextPopupContainer = _ref2.getPopupContainer; var _this$props2 = _this.props, customizePrefixCls = _this$props2.prefixCls, customizeInputPrefixCls = _this$props2.inputPrefixCls, getCalendarContainer = _this$props2.getCalendarContainer, size = _this$props2.size, disabled = _this$props2.disabled; var getPopupContainer = getCalendarContainer || getContextPopupContainer; var prefixCls = getPrefixCls('calendar', customizePrefixCls); var inputPrefixCls = getPrefixCls('input', customizeInputPrefixCls); var pickerClass = node_modules_classnames_default()("".concat(prefixCls, "-picker"), wrapPicker__defineProperty({}, "".concat(prefixCls, "-picker-").concat(size), !!size)); var pickerInputClass = node_modules_classnames_default()("".concat(prefixCls, "-picker-input"), inputPrefixCls, (_classNames2 = {}, wrapPicker__defineProperty(_classNames2, "".concat(inputPrefixCls, "-lg"), size === 'large'), wrapPicker__defineProperty(_classNames2, "".concat(inputPrefixCls, "-sm"), size === 'small'), wrapPicker__defineProperty(_classNames2, "".concat(inputPrefixCls, "-disabled"), disabled), _classNames2)); var timeFormat = showTime && showTime.format || 'HH:mm:ss'; var rcTimePickerProps = wrapPicker__extends(wrapPicker__extends({}, Object(time_picker["generateShowHourMinuteSecond"])(timeFormat)), { format: timeFormat, use12Hours: showTime && showTime.use12Hours }); var columns = getColumns(rcTimePickerProps); var timePickerCls = "".concat(prefixCls, "-time-picker-column-").concat(columns); var timePicker = showTime ? /*#__PURE__*/react["createElement"](Panel["a" /* default */], wrapPicker__extends({}, rcTimePickerProps, showTime, { prefixCls: "".concat(prefixCls, "-time-picker"), className: timePickerCls, placeholder: locale.timePickerLocale.placeholder, transitionName: "slide-up", onEsc: function onEsc() {} })) : null; return /*#__PURE__*/react["createElement"](Picker, wrapPicker__extends({}, _this.props, { getCalendarContainer: getPopupContainer, format: mergedFormat, ref: _this.savePicker, pickerClass: pickerClass, pickerInputClass: pickerInputClass, locale: locale, localeCode: localeCode, timePicker: timePicker, onOpenChange: _this.handleOpenChange, onFocus: _this.handleFocus, onBlur: _this.handleBlur, onMouseEnter: _this.handleMouseEnter, onMouseLeave: _this.handleMouseLeave })); }); }; return _this; } wrapPicker__createClass(PickerWrapper, [{ key: "componentDidMount", value: function componentDidMount() { var _this$props3 = this.props, autoFocus = _this$props3.autoFocus, disabled = _this$props3.disabled; if (autoFocus && !disabled) { this.focus(); } } }, { key: "focus", value: function focus() { this.picker.focus(); } }, { key: "blur", value: function blur() { this.picker.blur(); } }, { key: "render", value: function render() { return /*#__PURE__*/react["createElement"](LocaleReceiver["a" /* default */], { componentName: "DatePicker", defaultLocale: this.getDefaultLocale }, this.renderPicker); } }], [{ key: "getDerivedStateFromProps", value: function getDerivedStateFromProps(_ref3) { var value = _ref3.value, defaultValue = _ref3.defaultValue; checkValidate(defaultValue, 'defaultValue'); checkValidate(value, 'value'); return {}; } }]); return PickerWrapper; }(react["Component"]); PickerWrapper.defaultProps = { transitionName: 'slide-up', popupStyle: {}, onChange: function onChange() {}, onOk: function onOk() {}, onOpenChange: function onOpenChange() {}, locale: {} }; Object(react_lifecycles_compat_es["polyfill"])(PickerWrapper); return PickerWrapper; } // CONCATENATED MODULE: ./node_modules/rc-calendar/es/range-calendar/CalendarPart.js var CalendarPart_CalendarPart = function (_React$Component) { inherits_default()(CalendarPart, _React$Component); function CalendarPart() { classCallCheck_default()(this, CalendarPart); return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments)); } CalendarPart.prototype.render = function render() { var props = this.props; var prefixCls = props.prefixCls, value = props.value, hoverValue = props.hoverValue, selectedValue = props.selectedValue, mode = props.mode, direction = props.direction, locale = props.locale, format = props.format, placeholder = props.placeholder, disabledDate = props.disabledDate, timePicker = props.timePicker, disabledTime = props.disabledTime, timePickerDisabledTime = props.timePickerDisabledTime, showTimePicker = props.showTimePicker, onInputChange = props.onInputChange, onInputSelect = props.onInputSelect, enablePrev = props.enablePrev, enableNext = props.enableNext, clearIcon = props.clearIcon, showClear = props.showClear, inputMode = props.inputMode; var shouldShowTimePicker = showTimePicker && timePicker; var disabledTimeConfig = shouldShowTimePicker && disabledTime ? getTimeConfig(selectedValue, disabledTime) : null; var rangeClassName = prefixCls + '-range'; var newProps = { locale: locale, value: value, prefixCls: prefixCls, showTimePicker: showTimePicker }; var index = direction === 'left' ? 0 : 1; var timePickerEle = shouldShowTimePicker && react_default.a.cloneElement(timePicker, extends_default()({ showHour: true, showMinute: true, showSecond: true }, timePicker.props, disabledTimeConfig, timePickerDisabledTime, { onChange: onInputChange, defaultOpenValue: value, value: selectedValue[index] })); var dateInputElement = props.showDateInput && react_default.a.createElement(date_DateInput, { format: format, locale: locale, prefixCls: prefixCls, timePicker: timePicker, disabledDate: disabledDate, placeholder: placeholder, disabledTime: disabledTime, value: value, showClear: showClear || false, selectedValue: selectedValue[index], onChange: onInputChange, onSelect: onInputSelect, clearIcon: clearIcon, inputMode: inputMode }); return react_default.a.createElement( 'div', { className: rangeClassName + '-part ' + rangeClassName + '-' + direction }, dateInputElement, react_default.a.createElement( 'div', { style: { outline: 'none' } }, react_default.a.createElement(calendar_CalendarHeader, extends_default()({}, newProps, { mode: mode, enableNext: enableNext, enablePrev: enablePrev, onValueChange: props.onValueChange, onPanelChange: props.onPanelChange, disabledMonth: props.disabledMonth })), showTimePicker ? react_default.a.createElement( 'div', { className: prefixCls + '-time-picker' }, react_default.a.createElement( 'div', { className: prefixCls + '-time-picker-panel' }, timePickerEle ) ) : null, react_default.a.createElement( 'div', { className: prefixCls + '-body' }, react_default.a.createElement(date_DateTable, extends_default()({}, newProps, { hoverValue: hoverValue, selectedValue: selectedValue, dateRender: props.dateRender, onSelect: props.onSelect, onDayHover: props.onDayHover, disabledDate: disabledDate, showWeekNumber: props.showWeekNumber })) ) ) ); }; return CalendarPart; }(react_default.a.Component); CalendarPart_CalendarPart.propTypes = { prefixCls: prop_types_default.a.string, value: prop_types_default.a.any, hoverValue: prop_types_default.a.any, selectedValue: prop_types_default.a.any, direction: prop_types_default.a.any, locale: prop_types_default.a.any, showDateInput: prop_types_default.a.bool, showTimePicker: prop_types_default.a.bool, format: prop_types_default.a.any, placeholder: prop_types_default.a.any, disabledDate: prop_types_default.a.any, timePicker: prop_types_default.a.any, disabledTime: prop_types_default.a.any, onInputChange: prop_types_default.a.func, onInputSelect: prop_types_default.a.func, timePickerDisabledTime: prop_types_default.a.object, enableNext: prop_types_default.a.any, enablePrev: prop_types_default.a.any, clearIcon: prop_types_default.a.node, dateRender: prop_types_default.a.func, inputMode: prop_types_default.a.string }; /* harmony default export */ var range_calendar_CalendarPart = (CalendarPart_CalendarPart); // CONCATENATED MODULE: ./node_modules/rc-calendar/es/RangeCalendar.js function RangeCalendar_noop() {} function isEmptyArray(arr) { return Array.isArray(arr) && (arr.length === 0 || arr.every(function (i) { return !i; })); } function isArraysEqual(a, b) { if (a === b) return true; if (a === null || typeof a === 'undefined' || b === null || typeof b === 'undefined') { return false; } if (a.length !== b.length) return false; for (var i = 0; i < a.length; ++i) { if (a[i] !== b[i]) return false; } return true; } function getValueFromSelectedValue(selectedValue) { var start = selectedValue[0], end = selectedValue[1]; if (end && (start === undefined || start === null)) { start = end.clone().subtract(1, 'month'); } if (start && (end === undefined || end === null)) { end = start.clone().add(1, 'month'); } return [start, end]; } function normalizeAnchor(props, init) { var selectedValue = props.selectedValue || init && props.defaultSelectedValue; var value = props.value || init && props.defaultValue; var normalizedValue = value ? getValueFromSelectedValue(value) : getValueFromSelectedValue(selectedValue); return !isEmptyArray(normalizedValue) ? normalizedValue : init && [moment_default()(), moment_default()().add(1, 'months')]; } function generateOptions(length, extraOptionGen) { var arr = extraOptionGen ? extraOptionGen().concat() : []; for (var value = 0; value < length; value++) { if (arr.indexOf(value) === -1) { arr.push(value); } } return arr; } function RangeCalendar_onInputSelect(direction, value, cause) { if (!value) { return; } var originalValue = this.state.selectedValue; var selectedValue = originalValue.concat(); var index = direction === 'left' ? 0 : 1; selectedValue[index] = value; if (selectedValue[0] && this.compare(selectedValue[0], selectedValue[1]) > 0) { selectedValue[1 - index] = this.state.showTimePicker ? selectedValue[index] : undefined; } this.props.onInputSelect(selectedValue); this.fireSelectValueChange(selectedValue, null, cause || { source: 'dateInput' }); } var RangeCalendar_RangeCalendar = function (_React$Component) { inherits_default()(RangeCalendar, _React$Component); function RangeCalendar(props) { classCallCheck_default()(this, RangeCalendar); var _this = possibleConstructorReturn_default()(this, _React$Component.call(this, props)); RangeCalendar__initialiseProps.call(_this); var selectedValue = props.selectedValue || props.defaultSelectedValue; var value = normalizeAnchor(props, 1); _this.state = { selectedValue: selectedValue, prevSelectedValue: selectedValue, firstSelectedValue: null, hoverValue: props.hoverValue || [], value: value, showTimePicker: false, mode: props.mode || ['date', 'date'], panelTriggerSource: '' // Trigger by which picker panel: 'start' & 'end' }; return _this; } RangeCalendar.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, state) { var newState = {}; if ('value' in nextProps) { newState.value = normalizeAnchor(nextProps, 0); } if ('hoverValue' in nextProps && !isArraysEqual(state.hoverValue, nextProps.hoverValue)) { newState.hoverValue = nextProps.hoverValue; } if ('selectedValue' in nextProps) { newState.selectedValue = nextProps.selectedValue; newState.prevSelectedValue = nextProps.selectedValue; } if ('mode' in nextProps && !isArraysEqual(state.mode, nextProps.mode)) { newState.mode = nextProps.mode; } return newState; }; // get disabled hours for second picker RangeCalendar.prototype.render = function render() { var _className, _classnames; var props = this.props, state = this.state; var prefixCls = props.prefixCls, dateInputPlaceholder = props.dateInputPlaceholder, seperator = props.seperator, timePicker = props.timePicker, showOk = props.showOk, locale = props.locale, showClear = props.showClear, showToday = props.showToday, type = props.type, clearIcon = props.clearIcon; var hoverValue = state.hoverValue, selectedValue = state.selectedValue, mode = state.mode, showTimePicker = state.showTimePicker; var className = (_className = {}, _className[props.className] = !!props.className, _className[prefixCls] = 1, _className[prefixCls + '-hidden'] = !props.visible, _className[prefixCls + '-range'] = 1, _className[prefixCls + '-show-time-picker'] = showTimePicker, _className[prefixCls + '-week-number'] = props.showWeekNumber, _className); var classes = classnames_default()(className); var newProps = { selectedValue: state.selectedValue, onSelect: this.onSelect, onDayHover: type === 'start' && selectedValue[1] || type === 'end' && selectedValue[0] || !!hoverValue.length ? this.onDayHover : undefined }; var placeholder1 = void 0; var placeholder2 = void 0; if (dateInputPlaceholder) { if (Array.isArray(dateInputPlaceholder)) { placeholder1 = dateInputPlaceholder[0]; placeholder2 = dateInputPlaceholder[1]; } else { placeholder1 = placeholder2 = dateInputPlaceholder; } } var showOkButton = showOk === true || showOk !== false && !!timePicker; var cls = classnames_default()((_classnames = {}, _classnames[prefixCls + '-footer'] = true, _classnames[prefixCls + '-range-bottom'] = true, _classnames[prefixCls + '-footer-show-ok'] = showOkButton, _classnames)); var startValue = this.getStartValue(); var endValue = this.getEndValue(); var todayTime = getTodayTime(startValue); var thisMonth = todayTime.month(); var thisYear = todayTime.year(); var isTodayInView = startValue.year() === thisYear && startValue.month() === thisMonth || endValue.year() === thisYear && endValue.month() === thisMonth; var nextMonthOfStart = startValue.clone().add(1, 'months'); var isClosestMonths = nextMonthOfStart.year() === endValue.year() && nextMonthOfStart.month() === endValue.month(); var extraFooter = props.renderFooter(); return react_default.a.createElement( 'div', { ref: this.saveRoot, className: classes, style: props.style, tabIndex: '0', onKeyDown: this.onKeyDown }, props.renderSidebar(), react_default.a.createElement( 'div', { className: prefixCls + '-panel' }, showClear && selectedValue[0] && selectedValue[1] ? react_default.a.createElement( 'a', { role: 'button', title: locale.clear, onClick: this.clear }, clearIcon || react_default.a.createElement('span', { className: prefixCls + '-clear-btn' }) ) : null, react_default.a.createElement( 'div', { className: prefixCls + '-date-panel', onMouseLeave: type !== 'both' ? this.onDatePanelLeave : undefined, onMouseEnter: type !== 'both' ? this.onDatePanelEnter : undefined }, react_default.a.createElement(range_calendar_CalendarPart, extends_default()({}, props, newProps, { hoverValue: hoverValue, direction: 'left', disabledTime: this.disabledStartTime, disabledMonth: this.disabledStartMonth, format: this.getFormat(), value: startValue, mode: mode[0], placeholder: placeholder1, onInputChange: this.onStartInputChange, onInputSelect: this.onStartInputSelect, onValueChange: this.onStartValueChange, onPanelChange: this.onStartPanelChange, showDateInput: this.props.showDateInput, timePicker: timePicker, showTimePicker: showTimePicker || mode[0] === 'time', enablePrev: true, enableNext: !isClosestMonths || this.isMonthYearPanelShow(mode[1]), clearIcon: clearIcon })), react_default.a.createElement( 'span', { className: prefixCls + '-range-middle' }, seperator ), react_default.a.createElement(range_calendar_CalendarPart, extends_default()({}, props, newProps, { hoverValue: hoverValue, direction: 'right', format: this.getFormat(), timePickerDisabledTime: this.getEndDisableTime(), placeholder: placeholder2, value: endValue, mode: mode[1], onInputChange: this.onEndInputChange, onInputSelect: this.onEndInputSelect, onValueChange: this.onEndValueChange, onPanelChange: this.onEndPanelChange, showDateInput: this.props.showDateInput, timePicker: timePicker, showTimePicker: showTimePicker || mode[1] === 'time', disabledTime: this.disabledEndTime, disabledMonth: this.disabledEndMonth, enablePrev: !isClosestMonths || this.isMonthYearPanelShow(mode[0]), enableNext: true, clearIcon: clearIcon })) ), react_default.a.createElement( 'div', { className: cls }, showToday || props.timePicker || showOkButton || extraFooter ? react_default.a.createElement( 'div', { className: prefixCls + '-footer-btn' }, extraFooter, showToday ? react_default.a.createElement(TodayButton, extends_default()({}, props, { disabled: isTodayInView, value: state.value[0], onToday: this.onToday, text: locale.backToToday })) : null, props.timePicker ? react_default.a.createElement(TimePickerButton, extends_default()({}, props, { showTimePicker: showTimePicker || mode[0] === 'time' && mode[1] === 'time', onOpenTimePicker: this.onOpenTimePicker, onCloseTimePicker: this.onCloseTimePicker, timePickerDisabled: !this.hasSelectedValue() || hoverValue.length })) : null, showOkButton ? react_default.a.createElement(OkButton, extends_default()({}, props, { onOk: this.onOk, okDisabled: !this.isAllowedDateAndTime(selectedValue) || !this.hasSelectedValue() || hoverValue.length })) : null ) : null ) ) ); }; return RangeCalendar; }(react_default.a.Component); RangeCalendar_RangeCalendar.propTypes = extends_default()({}, propType, { prefixCls: prop_types_default.a.string, dateInputPlaceholder: prop_types_default.a.any, seperator: prop_types_default.a.string, defaultValue: prop_types_default.a.any, value: prop_types_default.a.any, hoverValue: prop_types_default.a.any, mode: prop_types_default.a.arrayOf(prop_types_default.a.oneOf(['time', 'date', 'month', 'year', 'decade'])), showDateInput: prop_types_default.a.bool, timePicker: prop_types_default.a.any, showOk: prop_types_default.a.bool, showToday: prop_types_default.a.bool, defaultSelectedValue: prop_types_default.a.array, selectedValue: prop_types_default.a.array, onOk: prop_types_default.a.func, showClear: prop_types_default.a.bool, locale: prop_types_default.a.object, onChange: prop_types_default.a.func, onSelect: prop_types_default.a.func, onValueChange: prop_types_default.a.func, onHoverChange: prop_types_default.a.func, onPanelChange: prop_types_default.a.func, format: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.arrayOf(prop_types_default.a.string)]), onClear: prop_types_default.a.func, type: prop_types_default.a.any, disabledDate: prop_types_default.a.func, disabledTime: prop_types_default.a.func, clearIcon: prop_types_default.a.node, onKeyDown: prop_types_default.a.func }); RangeCalendar_RangeCalendar.defaultProps = extends_default()({}, defaultProp, { type: 'both', seperator: '~', defaultSelectedValue: [], onValueChange: RangeCalendar_noop, onHoverChange: RangeCalendar_noop, onPanelChange: RangeCalendar_noop, disabledTime: RangeCalendar_noop, onInputSelect: RangeCalendar_noop, showToday: true, showDateInput: true }); var RangeCalendar__initialiseProps = function _initialiseProps() { var _this2 = this; this.onDatePanelEnter = function () { if (_this2.hasSelectedValue()) { _this2.fireHoverValueChange(_this2.state.selectedValue.concat()); } }; this.onDatePanelLeave = function () { if (_this2.hasSelectedValue()) { _this2.fireHoverValueChange([]); } }; this.onSelect = function (value) { var type = _this2.props.type; var _state = _this2.state, selectedValue = _state.selectedValue, prevSelectedValue = _state.prevSelectedValue, firstSelectedValue = _state.firstSelectedValue; var nextSelectedValue = void 0; if (type === 'both') { if (!firstSelectedValue) { syncTime(prevSelectedValue[0], value); nextSelectedValue = [value]; } else if (_this2.compare(firstSelectedValue, value) < 0) { syncTime(prevSelectedValue[1], value); nextSelectedValue = [firstSelectedValue, value]; } else { syncTime(prevSelectedValue[0], value); syncTime(prevSelectedValue[1], firstSelectedValue); nextSelectedValue = [value, firstSelectedValue]; } } else if (type === 'start') { syncTime(prevSelectedValue[0], value); var endValue = selectedValue[1]; nextSelectedValue = endValue && _this2.compare(endValue, value) > 0 ? [value, endValue] : [value]; } else { // type === 'end' var startValue = selectedValue[0]; if (startValue && _this2.compare(startValue, value) <= 0) { syncTime(prevSelectedValue[1], value); nextSelectedValue = [startValue, value]; } else { syncTime(prevSelectedValue[0], value); nextSelectedValue = [value]; } } _this2.fireSelectValueChange(nextSelectedValue); }; this.onKeyDown = function (event) { if (event.target.nodeName.toLowerCase() === 'input') { return; } var keyCode = event.keyCode; var ctrlKey = event.ctrlKey || event.metaKey; var _state2 = _this2.state, selectedValue = _state2.selectedValue, hoverValue = _state2.hoverValue, firstSelectedValue = _state2.firstSelectedValue, value = _state2.value; var _props = _this2.props, onKeyDown = _props.onKeyDown, disabledDate = _props.disabledDate; // Update last time of the picker var updateHoverPoint = function updateHoverPoint(func) { // Change hover to make focus in UI var currentHoverTime = void 0; var nextHoverTime = void 0; var nextHoverValue = void 0; if (!firstSelectedValue) { currentHoverTime = hoverValue[0] || selectedValue[0] || value[0] || moment_default()(); nextHoverTime = func(currentHoverTime); nextHoverValue = [nextHoverTime]; _this2.fireHoverValueChange(nextHoverValue); } else { if (hoverValue.length === 1) { currentHoverTime = hoverValue[0].clone(); nextHoverTime = func(currentHoverTime); nextHoverValue = _this2.onDayHover(nextHoverTime); } else { currentHoverTime = hoverValue[0].isSame(firstSelectedValue, 'day') ? hoverValue[1] : hoverValue[0]; nextHoverTime = func(currentHoverTime); nextHoverValue = _this2.onDayHover(nextHoverTime); } } // Find origin hover time on value index if (nextHoverValue.length >= 2) { var miss = nextHoverValue.some(function (ht) { return !includesTime(value, ht, 'month'); }); if (miss) { var newValue = nextHoverValue.slice().sort(function (t1, t2) { return t1.valueOf() - t2.valueOf(); }); if (newValue[0].isSame(newValue[1], 'month')) { newValue[1] = newValue[0].clone().add(1, 'month'); } _this2.fireValueChange(newValue); } } else if (nextHoverValue.length === 1) { // If only one value, let's keep the origin panel var oriValueIndex = value.findIndex(function (time) { return time.isSame(currentHoverTime, 'month'); }); if (oriValueIndex === -1) oriValueIndex = 0; if (value.every(function (time) { return !time.isSame(nextHoverTime, 'month'); })) { var _newValue = value.slice(); _newValue[oriValueIndex] = nextHoverTime.clone(); _this2.fireValueChange(_newValue); } } event.preventDefault(); return nextHoverTime; }; switch (keyCode) { case KeyCode["a" /* default */].DOWN: updateHoverPoint(function (time) { return goTime(time, 1, 'weeks'); }); return; case KeyCode["a" /* default */].UP: updateHoverPoint(function (time) { return goTime(time, -1, 'weeks'); }); return; case KeyCode["a" /* default */].LEFT: if (ctrlKey) { updateHoverPoint(function (time) { return goTime(time, -1, 'years'); }); } else { updateHoverPoint(function (time) { return goTime(time, -1, 'days'); }); } return; case KeyCode["a" /* default */].RIGHT: if (ctrlKey) { updateHoverPoint(function (time) { return goTime(time, 1, 'years'); }); } else { updateHoverPoint(function (time) { return goTime(time, 1, 'days'); }); } return; case KeyCode["a" /* default */].HOME: updateHoverPoint(function (time) { return goStartMonth(time); }); return; case KeyCode["a" /* default */].END: updateHoverPoint(function (time) { return goEndMonth(time); }); return; case KeyCode["a" /* default */].PAGE_DOWN: updateHoverPoint(function (time) { return goTime(time, 1, 'month'); }); return; case KeyCode["a" /* default */].PAGE_UP: updateHoverPoint(function (time) { return goTime(time, -1, 'month'); }); return; case KeyCode["a" /* default */].ENTER: { var lastValue = void 0; if (hoverValue.length === 0) { lastValue = updateHoverPoint(function (time) { return time; }); } else if (hoverValue.length === 1) { lastValue = hoverValue[0]; } else { lastValue = hoverValue[0].isSame(firstSelectedValue, 'day') ? hoverValue[1] : hoverValue[0]; } if (lastValue && (!disabledDate || !disabledDate(lastValue))) { _this2.onSelect(lastValue); } event.preventDefault(); return; } default: if (onKeyDown) { onKeyDown(event); } } }; this.onDayHover = function (value) { var hoverValue = []; var _state3 = _this2.state, selectedValue = _state3.selectedValue, firstSelectedValue = _state3.firstSelectedValue; var type = _this2.props.type; if (type === 'start' && selectedValue[1]) { hoverValue = _this2.compare(value, selectedValue[1]) < 0 ? [value, selectedValue[1]] : [value]; } else if (type === 'end' && selectedValue[0]) { hoverValue = _this2.compare(value, selectedValue[0]) > 0 ? [selectedValue[0], value] : []; } else { if (!firstSelectedValue) { if (_this2.state.hoverValue.length) { _this2.setState({ hoverValue: [] }); } return hoverValue; } hoverValue = _this2.compare(value, firstSelectedValue) < 0 ? [value, firstSelectedValue] : [firstSelectedValue, value]; } _this2.fireHoverValueChange(hoverValue); return hoverValue; }; this.onToday = function () { var startValue = getTodayTime(_this2.state.value[0]); var endValue = startValue.clone().add(1, 'months'); _this2.setState({ value: [startValue, endValue] }); }; this.onOpenTimePicker = function () { _this2.setState({ showTimePicker: true }); }; this.onCloseTimePicker = function () { _this2.setState({ showTimePicker: false }); }; this.onOk = function () { var selectedValue = _this2.state.selectedValue; if (_this2.isAllowedDateAndTime(selectedValue)) { _this2.props.onOk(_this2.state.selectedValue); } }; this.onStartInputChange = function () { for (var _len = arguments.length, oargs = Array(_len), _key = 0; _key < _len; _key++) { oargs[_key] = arguments[_key]; } var args = ['left'].concat(oargs); return RangeCalendar_onInputSelect.apply(_this2, args); }; this.onEndInputChange = function () { for (var _len2 = arguments.length, oargs = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { oargs[_key2] = arguments[_key2]; } var args = ['right'].concat(oargs); return RangeCalendar_onInputSelect.apply(_this2, args); }; this.onStartInputSelect = function (value) { var args = ['left', value, { source: 'dateInputSelect' }]; return RangeCalendar_onInputSelect.apply(_this2, args); }; this.onEndInputSelect = function (value) { var args = ['right', value, { source: 'dateInputSelect' }]; return RangeCalendar_onInputSelect.apply(_this2, args); }; this.onStartValueChange = function (leftValue) { var value = [].concat(_this2.state.value); value[0] = leftValue; return _this2.fireValueChange(value); }; this.onEndValueChange = function (rightValue) { var value = [].concat(_this2.state.value); value[1] = rightValue; return _this2.fireValueChange(value); }; this.onStartPanelChange = function (value, mode) { var props = _this2.props, state = _this2.state; var newMode = [mode, state.mode[1]]; var newState = { panelTriggerSource: 'start' }; if (!('mode' in props)) { newState.mode = newMode; } _this2.setState(newState); var newValue = [value || state.value[0], state.value[1]]; props.onPanelChange(newValue, newMode); }; this.onEndPanelChange = function (value, mode) { var props = _this2.props, state = _this2.state; var newMode = [state.mode[0], mode]; var newState = { panelTriggerSource: 'end' }; if (!('mode' in props)) { newState.mode = newMode; } _this2.setState(newState); var newValue = [state.value[0], value || state.value[1]]; props.onPanelChange(newValue, newMode); }; this.getStartValue = function () { var _state4 = _this2.state, selectedValue = _state4.selectedValue, showTimePicker = _state4.showTimePicker, value = _state4.value, mode = _state4.mode, panelTriggerSource = _state4.panelTriggerSource; var startValue = value[0]; // keep selectedTime when select date if (selectedValue[0] && _this2.props.timePicker) { startValue = startValue.clone(); syncTime(selectedValue[0], startValue); } if (showTimePicker && selectedValue[0]) { startValue = selectedValue[0]; } // Adjust month if date not align if (panelTriggerSource === 'end' && mode[0] === 'date' && mode[1] === 'date' && startValue.isSame(value[1], 'month')) { startValue = startValue.clone().subtract(1, 'month'); } return startValue; }; this.getEndValue = function () { var _state5 = _this2.state, value = _state5.value, selectedValue = _state5.selectedValue, showTimePicker = _state5.showTimePicker, mode = _state5.mode, panelTriggerSource = _state5.panelTriggerSource; var endValue = value[1] ? value[1].clone() : value[0].clone().add(1, 'month'); // keep selectedTime when select date if (selectedValue[1] && _this2.props.timePicker) { syncTime(selectedValue[1], endValue); } if (showTimePicker) { endValue = selectedValue[1] ? selectedValue[1] : _this2.getStartValue(); } // Adjust month if date not align if (!showTimePicker && panelTriggerSource !== 'end' && mode[0] === 'date' && mode[1] === 'date' && endValue.isSame(value[0], 'month')) { endValue = endValue.clone().add(1, 'month'); } return endValue; }; this.getEndDisableTime = function () { var _state6 = _this2.state, selectedValue = _state6.selectedValue, value = _state6.value; var disabledTime = _this2.props.disabledTime; var userSettingDisabledTime = disabledTime(selectedValue, 'end') || {}; var startValue = selectedValue && selectedValue[0] || value[0].clone(); // if startTime and endTime is same day.. // the second time picker will not able to pick time before first time picker if (!selectedValue[1] || startValue.isSame(selectedValue[1], 'day')) { var hours = startValue.hour(); var minutes = startValue.minute(); var second = startValue.second(); var _disabledHours = userSettingDisabledTime.disabledHours, _disabledMinutes = userSettingDisabledTime.disabledMinutes, _disabledSeconds = userSettingDisabledTime.disabledSeconds; var oldDisabledMinutes = _disabledMinutes ? _disabledMinutes() : []; var olddisabledSeconds = _disabledSeconds ? _disabledSeconds() : []; _disabledHours = generateOptions(hours, _disabledHours); _disabledMinutes = generateOptions(minutes, _disabledMinutes); _disabledSeconds = generateOptions(second, _disabledSeconds); return { disabledHours: function disabledHours() { return _disabledHours; }, disabledMinutes: function disabledMinutes(hour) { if (hour === hours) { return _disabledMinutes; } return oldDisabledMinutes; }, disabledSeconds: function disabledSeconds(hour, minute) { if (hour === hours && minute === minutes) { return _disabledSeconds; } return olddisabledSeconds; } }; } return userSettingDisabledTime; }; this.isAllowedDateAndTime = function (selectedValue) { return isAllowedDate(selectedValue[0], _this2.props.disabledDate, _this2.disabledStartTime) && isAllowedDate(selectedValue[1], _this2.props.disabledDate, _this2.disabledEndTime); }; this.isMonthYearPanelShow = function (mode) { return ['month', 'year', 'decade'].indexOf(mode) > -1; }; this.hasSelectedValue = function () { var selectedValue = _this2.state.selectedValue; return !!selectedValue[1] && !!selectedValue[0]; }; this.compare = function (v1, v2) { if (_this2.props.timePicker) { return v1.diff(v2); } return v1.diff(v2, 'days'); }; this.fireSelectValueChange = function (selectedValue, direct, cause) { var timePicker = _this2.props.timePicker; var prevSelectedValue = _this2.state.prevSelectedValue; if (timePicker && timePicker.props.defaultValue) { var timePickerDefaultValue = timePicker.props.defaultValue; if (!prevSelectedValue[0] && selectedValue[0]) { syncTime(timePickerDefaultValue[0], selectedValue[0]); } if (!prevSelectedValue[1] && selectedValue[1]) { syncTime(timePickerDefaultValue[1], selectedValue[1]); } } if (!('selectedValue' in _this2.props)) { _this2.setState({ selectedValue: selectedValue }); } // 尚未选择过时间,直接输入的话 if (!_this2.state.selectedValue[0] || !_this2.state.selectedValue[1]) { var startValue = selectedValue[0] || moment_default()(); var endValue = selectedValue[1] || startValue.clone().add(1, 'months'); _this2.setState({ selectedValue: selectedValue, value: getValueFromSelectedValue([startValue, endValue]) }); } if (selectedValue[0] && !selectedValue[1]) { _this2.setState({ firstSelectedValue: selectedValue[0] }); _this2.fireHoverValueChange(selectedValue.concat()); } _this2.props.onChange(selectedValue); if (direct || selectedValue[0] && selectedValue[1]) { _this2.setState({ prevSelectedValue: selectedValue, firstSelectedValue: null }); _this2.fireHoverValueChange([]); _this2.props.onSelect(selectedValue, cause); } }; this.fireValueChange = function (value) { var props = _this2.props; if (!('value' in props)) { _this2.setState({ value: value }); } props.onValueChange(value); }; this.fireHoverValueChange = function (hoverValue) { var props = _this2.props; if (!('hoverValue' in props)) { _this2.setState({ hoverValue: hoverValue }); } props.onHoverChange(hoverValue); }; this.clear = function () { _this2.fireSelectValueChange([], true); _this2.props.onClear(); }; this.disabledStartTime = function (time) { return _this2.props.disabledTime(time, 'start'); }; this.disabledEndTime = function (time) { return _this2.props.disabledTime(time, 'end'); }; this.disabledStartMonth = function (month) { var value = _this2.state.value; return month.isAfter(value[1], 'month'); }; this.disabledEndMonth = function (month) { var value = _this2.state.value; return month.isBefore(value[0], 'month'); }; }; Object(react_lifecycles_compat_es["polyfill"])(RangeCalendar_RangeCalendar); /* harmony default export */ var es_RangeCalendar = (CommonMixin_commonMixinWrapper(RangeCalendar_RangeCalendar)); // EXTERNAL MODULE: ./node_modules/shallowequal/index.js var shallowequal = __webpack_require__("Ngpj"); var shallowequal_default = /*#__PURE__*/__webpack_require__.n(shallowequal); // CONCATENATED MODULE: ./node_modules/antd/es/tag/CheckableTag.js function CheckableTag__typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { CheckableTag__typeof = function _typeof(obj) { return typeof obj; }; } else { CheckableTag__typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return CheckableTag__typeof(obj); } function CheckableTag__extends() { CheckableTag__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; }; return CheckableTag__extends.apply(this, arguments); } function CheckableTag__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; } function CheckableTag__classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function CheckableTag__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); } } function CheckableTag__createClass(Constructor, protoProps, staticProps) { if (protoProps) CheckableTag__defineProperties(Constructor.prototype, protoProps); if (staticProps) CheckableTag__defineProperties(Constructor, staticProps); return Constructor; } function CheckableTag__inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) CheckableTag__setPrototypeOf(subClass, superClass); } function CheckableTag__setPrototypeOf(o, p) { CheckableTag__setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return CheckableTag__setPrototypeOf(o, p); } function CheckableTag__createSuper(Derived) { var hasNativeReflectConstruct = CheckableTag__isNativeReflectConstruct(); return function _createSuperInternal() { var Super = CheckableTag__getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = CheckableTag__getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return CheckableTag__possibleConstructorReturn(this, result); }; } function CheckableTag__possibleConstructorReturn(self, call) { if (call && (CheckableTag__typeof(call) === "object" || typeof call === "function")) { return call; } return CheckableTag__assertThisInitialized(self); } function CheckableTag__assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function CheckableTag__isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } function CheckableTag__getPrototypeOf(o) { CheckableTag__getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return CheckableTag__getPrototypeOf(o); } var __rest = this && this.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var CheckableTag_CheckableTag = /*#__PURE__*/function (_React$Component) { CheckableTag__inherits(CheckableTag, _React$Component); var _super = CheckableTag__createSuper(CheckableTag); function CheckableTag() { var _this; CheckableTag__classCallCheck(this, CheckableTag); _this = _super.apply(this, arguments); _this.handleClick = function () { var _this$props = _this.props, checked = _this$props.checked, onChange = _this$props.onChange; if (onChange) { onChange(!checked); } }; _this.renderCheckableTag = function (_ref) { var _classNames; var getPrefixCls = _ref.getPrefixCls; var _a = _this.props, customizePrefixCls = _a.prefixCls, className = _a.className, checked = _a.checked, restProps = __rest(_a, ["prefixCls", "className", "checked"]); var prefixCls = getPrefixCls('tag', customizePrefixCls); var cls = node_modules_classnames_default()(prefixCls, (_classNames = {}, CheckableTag__defineProperty(_classNames, "".concat(prefixCls, "-checkable"), true), CheckableTag__defineProperty(_classNames, "".concat(prefixCls, "-checkable-checked"), checked), _classNames), className); delete restProps.onChange; // TypeScript cannot check delete now. return /*#__PURE__*/react["createElement"]("span", CheckableTag__extends({}, restProps, { className: cls, onClick: _this.handleClick })); }; return _this; } CheckableTag__createClass(CheckableTag, [{ key: "render", value: function render() { return /*#__PURE__*/react["createElement"](config_provider["ConfigConsumer"], null, this.renderCheckableTag); } }]); return CheckableTag; }(react["Component"]); // EXTERNAL MODULE: ./node_modules/antd/es/_util/colors.js var colors = __webpack_require__("IUGU"); // EXTERNAL MODULE: ./node_modules/antd/es/_util/wave.js var wave = __webpack_require__("J7eb"); // CONCATENATED MODULE: ./node_modules/antd/es/tag/index.js function tag__typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { tag__typeof = function _typeof(obj) { return typeof obj; }; } else { tag__typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return tag__typeof(obj); } function tag__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; } function tag__extends() { tag__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; }; return tag__extends.apply(this, arguments); } function tag__classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function tag__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); } } function tag__createClass(Constructor, protoProps, staticProps) { if (protoProps) tag__defineProperties(Constructor.prototype, protoProps); if (staticProps) tag__defineProperties(Constructor, staticProps); return Constructor; } function tag__inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) tag__setPrototypeOf(subClass, superClass); } function tag__setPrototypeOf(o, p) { tag__setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return tag__setPrototypeOf(o, p); } function tag__createSuper(Derived) { var hasNativeReflectConstruct = tag__isNativeReflectConstruct(); return function _createSuperInternal() { var Super = tag__getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = tag__getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return tag__possibleConstructorReturn(this, result); }; } function tag__possibleConstructorReturn(self, call) { if (call && (tag__typeof(call) === "object" || typeof call === "function")) { return call; } return tag__assertThisInitialized(self); } function tag__assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function tag__isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } function tag__getPrototypeOf(o) { tag__getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return tag__getPrototypeOf(o); } var tag___rest = this && this.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var PresetColorRegex = new RegExp("^(".concat(colors["a" /* PresetColorTypes */].join('|'), ")(-inverse)?$")); var tag_Tag = /*#__PURE__*/function (_React$Component) { tag__inherits(Tag, _React$Component); var _super = tag__createSuper(Tag); function Tag(props) { var _this; tag__classCallCheck(this, Tag); _this = _super.call(this, props); _this.state = { visible: true }; _this.handleIconClick = function (e) { e.stopPropagation(); _this.setVisible(false, e); }; _this.renderTag = function (configProps) { var _a = _this.props, children = _a.children, otherProps = tag___rest(_a, ["children"]); var isNeedWave = 'onClick' in otherProps || children && children.type === 'a'; var tagProps = Object(omit_js_es["a" /* default */])(otherProps, ['onClose', 'afterClose', 'color', 'visible', 'closable', 'prefixCls']); return isNeedWave ? /*#__PURE__*/react["createElement"](wave["a" /* default */], null, /*#__PURE__*/react["createElement"]("span", tag__extends({}, tagProps, { className: _this.getTagClassName(configProps), style: _this.getTagStyle() }), children, _this.renderCloseIcon())) : /*#__PURE__*/react["createElement"]("span", tag__extends({}, tagProps, { className: _this.getTagClassName(configProps), style: _this.getTagStyle() }), children, _this.renderCloseIcon()); }; Object(warning["a" /* default */])(!('afterClose' in props), 'Tag', "'afterClose' will be deprecated, please use 'onClose', we will remove this in the next version."); return _this; } tag__createClass(Tag, [{ key: "getTagStyle", value: function getTagStyle() { var _this$props = this.props, color = _this$props.color, style = _this$props.style; var isPresetColor = this.isPresetColor(); return tag__extends({ backgroundColor: color && !isPresetColor ? color : undefined }, style); } }, { key: "getTagClassName", value: function getTagClassName(_ref) { var _classNames; var getPrefixCls = _ref.getPrefixCls; var _this$props2 = this.props, customizePrefixCls = _this$props2.prefixCls, className = _this$props2.className, color = _this$props2.color; var visible = this.state.visible; var isPresetColor = this.isPresetColor(); var prefixCls = getPrefixCls('tag', customizePrefixCls); return node_modules_classnames_default()(prefixCls, (_classNames = {}, tag__defineProperty(_classNames, "".concat(prefixCls, "-").concat(color), isPresetColor), tag__defineProperty(_classNames, "".concat(prefixCls, "-has-color"), color && !isPresetColor), tag__defineProperty(_classNames, "".concat(prefixCls, "-hidden"), !visible), _classNames), className); } }, { key: "setVisible", value: function setVisible(visible, e) { var _this$props3 = this.props, onClose = _this$props3.onClose, afterClose = _this$props3.afterClose; if (onClose) { onClose(e); } if (afterClose && !onClose) { // next version remove. afterClose(); } if (e.defaultPrevented) { return; } if (!('visible' in this.props)) { this.setState({ visible: visible }); } } }, { key: "isPresetColor", value: function isPresetColor() { var color = this.props.color; if (!color) { return false; } return PresetColorRegex.test(color); } }, { key: "renderCloseIcon", value: function renderCloseIcon() { var closable = this.props.closable; return closable ? /*#__PURE__*/react["createElement"](icon["default"], { type: "close", onClick: this.handleIconClick }) : null; } }, { key: "render", value: function render() { return /*#__PURE__*/react["createElement"](config_provider["ConfigConsumer"], null, this.renderTag); } }], [{ key: "getDerivedStateFromProps", value: function getDerivedStateFromProps(nextProps) { if ('visible' in nextProps) { return { visible: nextProps.visible }; } return null; } }]); return Tag; }(react["Component"]); tag_Tag.CheckableTag = CheckableTag_CheckableTag; tag_Tag.defaultProps = { closable: false }; Object(react_lifecycles_compat_es["polyfill"])(tag_Tag); /* harmony default export */ var tag = (tag_Tag); // CONCATENATED MODULE: ./node_modules/antd/es/date-picker/InputIcon.js function InputIcon__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; } function InputIcon(props) { var _classNames; var suffixIcon = props.suffixIcon, prefixCls = props.prefixCls; return suffixIcon && ( /*#__PURE__*/react["isValidElement"](suffixIcon) ? /*#__PURE__*/react["cloneElement"](suffixIcon, { className: node_modules_classnames_default()((_classNames = {}, InputIcon__defineProperty(_classNames, suffixIcon.props.className, suffixIcon.props.className), InputIcon__defineProperty(_classNames, "".concat(prefixCls, "-picker-icon"), true), _classNames)) }) : /*#__PURE__*/react["createElement"]("span", { className: "".concat(prefixCls, "-picker-icon") }, suffixIcon)) || /*#__PURE__*/react["createElement"](icon["default"], { type: "calendar", className: "".concat(prefixCls, "-picker-icon") }); } // CONCATENATED MODULE: ./node_modules/antd/es/date-picker/RangePicker.js function RangePicker__typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { RangePicker__typeof = function _typeof(obj) { return typeof obj; }; } else { RangePicker__typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return RangePicker__typeof(obj); } function RangePicker__extends() { RangePicker__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; }; return RangePicker__extends.apply(this, arguments); } function RangePicker__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; } function RangePicker__classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function RangePicker__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); } } function RangePicker__createClass(Constructor, protoProps, staticProps) { if (protoProps) RangePicker__defineProperties(Constructor.prototype, protoProps); if (staticProps) RangePicker__defineProperties(Constructor, staticProps); return Constructor; } function RangePicker__inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) RangePicker__setPrototypeOf(subClass, superClass); } function RangePicker__setPrototypeOf(o, p) { RangePicker__setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return RangePicker__setPrototypeOf(o, p); } function RangePicker__createSuper(Derived) { var hasNativeReflectConstruct = RangePicker__isNativeReflectConstruct(); return function _createSuperInternal() { var Super = RangePicker__getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = RangePicker__getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return RangePicker__possibleConstructorReturn(this, result); }; } function RangePicker__possibleConstructorReturn(self, call) { if (call && (RangePicker__typeof(call) === "object" || typeof call === "function")) { return call; } return RangePicker__assertThisInitialized(self); } function RangePicker__assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function RangePicker__isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } function RangePicker__getPrototypeOf(o) { RangePicker__getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return RangePicker__getPrototypeOf(o); } function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } /* tslint:disable jsx-no-multiline-js */ function getShowDateFromValue(value, mode) { var _value = _slicedToArray(value, 2), start = _value[0], end = _value[1]; // value could be an empty array, then we should not reset showDate if (!start && !end) { return; } if (mode && mode[0] === 'month') { return [start, end]; } var newEnd = end && end.isSame(start, 'month') ? end.clone().add(1, 'month') : end; return [start, newEnd]; } function pickerValueAdapter(value) { if (!value) { return; } if (Array.isArray(value)) { return value; } return [value, value.clone().add(1, 'month')]; } function RangePicker_isEmptyArray(arr) { if (Array.isArray(arr)) { return arr.length === 0 || arr.every(function (i) { return !i; }); } return false; } function fixLocale(value, localeCode) { if (!localeCode) { return; } if (!value || value.length === 0) { return; } var _value2 = _slicedToArray(value, 2), start = _value2[0], end = _value2[1]; if (start) { start.locale(localeCode); } if (end) { end.locale(localeCode); } } var RangePicker_RangePicker = /*#__PURE__*/function (_React$Component) { RangePicker__inherits(RangePicker, _React$Component); var _super = RangePicker__createSuper(RangePicker); function RangePicker(props) { var _this; RangePicker__classCallCheck(this, RangePicker); _this = _super.call(this, props); _this.savePicker = function (node) { _this.picker = node; }; _this.clearSelection = function (e) { e.preventDefault(); e.stopPropagation(); _this.setState({ value: [] }); _this.handleChange([]); }; _this.clearHoverValue = function () { return _this.setState({ hoverValue: [] }); }; _this.handleChange = function (value) { var _assertThisInitialize = RangePicker__assertThisInitialized(_this), props = _assertThisInitialize.props; if (!('value' in props)) { _this.setState(function (_ref) { var showDate = _ref.showDate; return { value: value, showDate: getShowDateFromValue(value) || showDate }; }); } if (value[0] && value[1] && value[0].diff(value[1]) > 0) { value[1] = undefined; } var _value3 = _slicedToArray(value, 2), start = _value3[0], end = _value3[1]; if (typeof props.onChange === 'function') { props.onChange(value, [utils_formatDate(start, props.format), utils_formatDate(end, props.format)]); } }; _this.handleOpenChange = function (open) { if (!('open' in _this.props)) { _this.setState({ open: open }); } if (open === false) { _this.clearHoverValue(); } var onOpenChange = _this.props.onOpenChange; if (onOpenChange) { onOpenChange(open); } }; _this.handleShowDateChange = function (showDate) { return _this.setState({ showDate: showDate }); }; _this.handleHoverChange = function (hoverValue) { return _this.setState({ hoverValue: hoverValue }); }; _this.handleRangeMouseLeave = function () { if (_this.state.open) { _this.clearHoverValue(); } }; _this.handleCalendarInputSelect = function (value) { var _value4 = _slicedToArray(value, 1), start = _value4[0]; if (!start) { return; } _this.setState(function (_ref2) { var showDate = _ref2.showDate; return { value: value, showDate: getShowDateFromValue(value) || showDate }; }); }; _this.handleRangeClick = function (value) { if (typeof value === 'function') { value = value(); } _this.setValue(value, true); var _this$props = _this.props, onOk = _this$props.onOk, onOpenChange = _this$props.onOpenChange; if (onOk) { onOk(value); } if (onOpenChange) { onOpenChange(false); } }; _this.renderFooter = function () { var _this$props2 = _this.props, ranges = _this$props2.ranges, renderExtraFooter = _this$props2.renderExtraFooter; var _assertThisInitialize2 = RangePicker__assertThisInitialized(_this), prefixCls = _assertThisInitialize2.prefixCls, tagPrefixCls = _assertThisInitialize2.tagPrefixCls; if (!ranges && !renderExtraFooter) { return null; } var customFooter = renderExtraFooter ? /*#__PURE__*/react["createElement"]("div", { className: "".concat(prefixCls, "-footer-extra"), key: "extra" }, renderExtraFooter()) : null; var operations = ranges && Object.keys(ranges).map(function (range) { var value = ranges[range]; var hoverValue = typeof value === 'function' ? value.call(RangePicker__assertThisInitialized(_this)) : value; return /*#__PURE__*/react["createElement"](tag, { key: range, prefixCls: tagPrefixCls, color: "blue", onClick: function onClick() { return _this.handleRangeClick(value); }, onMouseEnter: function onMouseEnter() { return _this.setState({ hoverValue: hoverValue }); }, onMouseLeave: _this.handleRangeMouseLeave }, range); }); var rangeNode = operations && operations.length > 0 ? /*#__PURE__*/react["createElement"]("div", { className: "".concat(prefixCls, "-footer-extra ").concat(prefixCls, "-range-quick-selector"), key: "range" }, operations) : null; return [rangeNode, customFooter]; }; _this.renderRangePicker = function (_ref3) { var _classNames; var getPrefixCls = _ref3.getPrefixCls; var _assertThisInitialize3 = RangePicker__assertThisInitialized(_this), state = _assertThisInitialize3.state, props = _assertThisInitialize3.props; var value = state.value, showDate = state.showDate, hoverValue = state.hoverValue, open = state.open; var customizePrefixCls = props.prefixCls, customizeTagPrefixCls = props.tagPrefixCls, popupStyle = props.popupStyle, style = props.style, disabledDate = props.disabledDate, disabledTime = props.disabledTime, showTime = props.showTime, showToday = props.showToday, ranges = props.ranges, onOk = props.onOk, locale = props.locale, localeCode = props.localeCode, format = props.format, dateRender = props.dateRender, onCalendarChange = props.onCalendarChange, suffixIcon = props.suffixIcon, separator = props.separator; var prefixCls = getPrefixCls('calendar', customizePrefixCls); var tagPrefixCls = getPrefixCls('tag', customizeTagPrefixCls); // To support old version react. // Have to add prefixCls on the instance. // https://github.com/facebook/react/issues/12397 _this.prefixCls = prefixCls; _this.tagPrefixCls = tagPrefixCls; fixLocale(value, localeCode); fixLocale(showDate, localeCode); Object(warning["a" /* default */])(!('onOK' in props), 'RangePicker', 'It should be `RangePicker[onOk]`, instead of `onOK`!'); var calendarClassName = node_modules_classnames_default()((_classNames = {}, RangePicker__defineProperty(_classNames, "".concat(prefixCls, "-time"), showTime), RangePicker__defineProperty(_classNames, "".concat(prefixCls, "-range-with-ranges"), ranges), _classNames)); // 需要选择时间时,点击 ok 时才触发 onChange var pickerChangeHandler = { onChange: _this.handleChange }; var calendarProps = { onOk: _this.handleChange }; if (props.timePicker) { pickerChangeHandler.onChange = function (changedValue) { return _this.handleChange(changedValue); }; } else { calendarProps = {}; } if ('mode' in props) { calendarProps.mode = props.mode; } var startPlaceholder = Array.isArray(props.placeholder) ? props.placeholder[0] : locale.lang.rangePlaceholder[0]; var endPlaceholder = Array.isArray(props.placeholder) ? props.placeholder[1] : locale.lang.rangePlaceholder[1]; var calendar = /*#__PURE__*/react["createElement"](es_RangeCalendar, RangePicker__extends({}, calendarProps, { seperator: separator, onChange: onCalendarChange, format: format, prefixCls: prefixCls, className: calendarClassName, renderFooter: _this.renderFooter, timePicker: props.timePicker, disabledDate: disabledDate, disabledTime: disabledTime, dateInputPlaceholder: [startPlaceholder, endPlaceholder], locale: locale.lang, onOk: onOk, dateRender: dateRender, value: showDate, onValueChange: _this.handleShowDateChange, hoverValue: hoverValue, onHoverChange: _this.handleHoverChange, onPanelChange: props.onPanelChange, showToday: showToday, onInputSelect: _this.handleCalendarInputSelect })); // default width for showTime var pickerStyle = {}; if (props.showTime) { pickerStyle.width = style && style.width || 350; } var _value5 = _slicedToArray(value, 2), startValue = _value5[0], endValue = _value5[1]; var clearIcon = !props.disabled && props.allowClear && value && (startValue || endValue) ? /*#__PURE__*/react["createElement"](icon["default"], { type: "close-circle", className: "".concat(prefixCls, "-picker-clear"), onClick: _this.clearSelection, theme: "filled" }) : null; var inputIcon = /*#__PURE__*/react["createElement"](InputIcon, { suffixIcon: suffixIcon, prefixCls: prefixCls }); var input = function input(_ref4) { var inputValue = _ref4.value; var _inputValue = _slicedToArray(inputValue, 2), start = _inputValue[0], end = _inputValue[1]; return /*#__PURE__*/react["createElement"]("span", { className: props.pickerInputClass }, /*#__PURE__*/react["createElement"]("input", { disabled: props.disabled, readOnly: true, value: utils_formatDate(start, props.format), placeholder: startPlaceholder, className: "".concat(prefixCls, "-range-picker-input"), tabIndex: -1 }), /*#__PURE__*/react["createElement"]("span", { className: "".concat(prefixCls, "-range-picker-separator") }, " ", separator, " "), /*#__PURE__*/react["createElement"]("input", { disabled: props.disabled, readOnly: true, value: utils_formatDate(end, props.format), placeholder: endPlaceholder, className: "".concat(prefixCls, "-range-picker-input"), tabIndex: -1 }), clearIcon, inputIcon); }; return /*#__PURE__*/react["createElement"]("span", { ref: _this.savePicker, id: typeof props.id === 'number' ? props.id.toString() : props.id, className: node_modules_classnames_default()(props.className, props.pickerClass), style: RangePicker__extends(RangePicker__extends({}, style), pickerStyle), tabIndex: props.disabled ? -1 : 0, onFocus: props.onFocus, onBlur: props.onBlur, onMouseEnter: props.onMouseEnter, onMouseLeave: props.onMouseLeave }, /*#__PURE__*/react["createElement"](es_Picker, RangePicker__extends({}, props, pickerChangeHandler, { calendar: calendar, value: value, open: open, onOpenChange: _this.handleOpenChange, prefixCls: "".concat(prefixCls, "-picker-container"), style: popupStyle }), input)); }; var value = props.value || props.defaultValue || []; var _value6 = _slicedToArray(value, 2), start = _value6[0], end = _value6[1]; if (start && !Object(interopDefault["a" /* default */])(moment).isMoment(start) || end && !Object(interopDefault["a" /* default */])(moment).isMoment(end)) { throw new Error('The value/defaultValue of RangePicker must be a moment object array after `antd@2.0`, ' + 'see: https://u.ant.design/date-picker-value'); } var pickerValue = !value || RangePicker_isEmptyArray(value) ? props.defaultPickerValue : value; _this.state = { value: value, showDate: pickerValueAdapter(pickerValue || Object(interopDefault["a" /* default */])(moment)()), open: props.open, hoverValue: [] }; return _this; } RangePicker__createClass(RangePicker, [{ key: "componentDidUpdate", value: function componentDidUpdate(_, prevState) { if (!('open' in this.props) && prevState.open && !this.state.open) { this.focus(); } } }, { key: "setValue", value: function setValue(value, hidePanel) { this.handleChange(value); if ((hidePanel || !this.props.showTime) && !('open' in this.props)) { this.setState({ open: false }); } } }, { key: "focus", value: function focus() { this.picker.focus(); } }, { key: "blur", value: function blur() { this.picker.blur(); } }, { key: "render", value: function render() { return /*#__PURE__*/react["createElement"](config_provider["ConfigConsumer"], null, this.renderRangePicker); } }], [{ key: "getDerivedStateFromProps", value: function getDerivedStateFromProps(nextProps, prevState) { var state = null; if ('value' in nextProps) { var value = nextProps.value || []; state = { value: value }; if (!shallowequal_default()(nextProps.value, prevState.value)) { state = RangePicker__extends(RangePicker__extends({}, state), { showDate: getShowDateFromValue(value, nextProps.mode) || prevState.showDate }); } } if ('open' in nextProps && prevState.open !== nextProps.open) { state = RangePicker__extends(RangePicker__extends({}, state), { open: nextProps.open }); } return state; } }]); return RangePicker; }(react["Component"]); RangePicker_RangePicker.defaultProps = { allowClear: true, showToday: false, separator: '~' }; Object(react_lifecycles_compat_es["polyfill"])(RangePicker_RangePicker); /* harmony default export */ var date_picker_RangePicker = (RangePicker_RangePicker); // CONCATENATED MODULE: ./node_modules/antd/es/date-picker/WeekPicker.js function WeekPicker__typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { WeekPicker__typeof = function _typeof(obj) { return typeof obj; }; } else { WeekPicker__typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return WeekPicker__typeof(obj); } function WeekPicker__extends() { WeekPicker__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; }; return WeekPicker__extends.apply(this, arguments); } function WeekPicker__classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function WeekPicker__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); } } function WeekPicker__createClass(Constructor, protoProps, staticProps) { if (protoProps) WeekPicker__defineProperties(Constructor.prototype, protoProps); if (staticProps) WeekPicker__defineProperties(Constructor, staticProps); return Constructor; } function WeekPicker__inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) WeekPicker__setPrototypeOf(subClass, superClass); } function WeekPicker__setPrototypeOf(o, p) { WeekPicker__setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return WeekPicker__setPrototypeOf(o, p); } function WeekPicker__createSuper(Derived) { var hasNativeReflectConstruct = WeekPicker__isNativeReflectConstruct(); return function _createSuperInternal() { var Super = WeekPicker__getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = WeekPicker__getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return WeekPicker__possibleConstructorReturn(this, result); }; } function WeekPicker__possibleConstructorReturn(self, call) { if (call && (WeekPicker__typeof(call) === "object" || typeof call === "function")) { return call; } return WeekPicker__assertThisInitialized(self); } function WeekPicker__assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function WeekPicker__isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } function WeekPicker__getPrototypeOf(o) { WeekPicker__getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return WeekPicker__getPrototypeOf(o); } function formatValue(value, format) { return value && value.format(format) || ''; } var WeekPicker_WeekPicker = /*#__PURE__*/function (_React$Component) { WeekPicker__inherits(WeekPicker, _React$Component); var _super = WeekPicker__createSuper(WeekPicker); function WeekPicker(props) { var _this; WeekPicker__classCallCheck(this, WeekPicker); _this = _super.call(this, props); _this.saveInput = function (node) { _this.input = node; }; _this.weekDateRender = function (current) { var selectedValue = _this.state.value; var _assertThisInitialize = WeekPicker__assertThisInitialized(_this), prefixCls = _assertThisInitialize.prefixCls; var dateRender = _this.props.dateRender; var dateNode = dateRender ? dateRender(current) : current.date(); if (selectedValue && current.year() === selectedValue.year() && current.week() === selectedValue.week()) { return /*#__PURE__*/react["createElement"]("div", { className: "".concat(prefixCls, "-selected-day") }, /*#__PURE__*/react["createElement"]("div", { className: "".concat(prefixCls, "-date") }, dateNode)); } return /*#__PURE__*/react["createElement"]("div", { className: "".concat(prefixCls, "-date") }, dateNode); }; _this.handleChange = function (value) { if (!('value' in _this.props)) { _this.setState({ value: value }); } _this.props.onChange(value, formatValue(value, _this.props.format)); }; _this.handleOpenChange = function (open) { var onOpenChange = _this.props.onOpenChange; if (!('open' in _this.props)) { _this.setState({ open: open }); } if (onOpenChange) { onOpenChange(open); } }; _this.clearSelection = function (e) { e.preventDefault(); e.stopPropagation(); _this.handleChange(null); }; _this.renderFooter = function () { var _this$props = _this.props, prefixCls = _this$props.prefixCls, renderExtraFooter = _this$props.renderExtraFooter; return renderExtraFooter ? /*#__PURE__*/react["createElement"]("div", { className: "".concat(prefixCls, "-footer-extra") }, renderExtraFooter.apply(void 0, arguments)) : null; }; _this.renderWeekPicker = function (_ref) { var getPrefixCls = _ref.getPrefixCls; var _this$props2 = _this.props, customizePrefixCls = _this$props2.prefixCls, className = _this$props2.className, disabled = _this$props2.disabled, pickerClass = _this$props2.pickerClass, popupStyle = _this$props2.popupStyle, pickerInputClass = _this$props2.pickerInputClass, format = _this$props2.format, allowClear = _this$props2.allowClear, locale = _this$props2.locale, localeCode = _this$props2.localeCode, disabledDate = _this$props2.disabledDate, style = _this$props2.style, onFocus = _this$props2.onFocus, onBlur = _this$props2.onBlur, id = _this$props2.id, suffixIcon = _this$props2.suffixIcon, defaultPickerValue = _this$props2.defaultPickerValue; var prefixCls = getPrefixCls('calendar', customizePrefixCls); // To support old version react. // Have to add prefixCls on the instance. // https://github.com/facebook/react/issues/12397 _this.prefixCls = prefixCls; var _this$state = _this.state, open = _this$state.open, pickerValue = _this$state.value; if (pickerValue && localeCode) { pickerValue.locale(localeCode); } var placeholder = 'placeholder' in _this.props ? _this.props.placeholder : locale.lang.placeholder; var calendar = /*#__PURE__*/react["createElement"](es, { showWeekNumber: true, dateRender: _this.weekDateRender, prefixCls: prefixCls, format: format, locale: locale.lang, showDateInput: false, showToday: false, disabledDate: disabledDate, renderFooter: _this.renderFooter, defaultValue: defaultPickerValue }); var clearIcon = !disabled && allowClear && _this.state.value ? /*#__PURE__*/react["createElement"](icon["default"], { type: "close-circle", className: "".concat(prefixCls, "-picker-clear"), onClick: _this.clearSelection, theme: "filled" }) : null; var inputIcon = /*#__PURE__*/react["createElement"](InputIcon, { suffixIcon: suffixIcon, prefixCls: prefixCls }); var input = function input(_ref2) { var value = _ref2.value; return /*#__PURE__*/react["createElement"]("span", { style: { display: 'inline-block', width: '100%' } }, /*#__PURE__*/react["createElement"]("input", { ref: _this.saveInput, disabled: disabled, readOnly: true, value: value && value.format(format) || '', placeholder: placeholder, className: pickerInputClass, onFocus: onFocus, onBlur: onBlur }), clearIcon, inputIcon); }; return /*#__PURE__*/react["createElement"]("span", { className: node_modules_classnames_default()(className, pickerClass), style: style, id: id }, /*#__PURE__*/react["createElement"](es_Picker, WeekPicker__extends({}, _this.props, { calendar: calendar, prefixCls: "".concat(prefixCls, "-picker-container"), value: pickerValue, onChange: _this.handleChange, open: open, onOpenChange: _this.handleOpenChange, style: popupStyle }), input)); }; var value = props.value || props.defaultValue; if (value && !Object(interopDefault["a" /* default */])(moment).isMoment(value)) { throw new Error('The value/defaultValue of WeekPicker must be ' + 'a moment object after `antd@2.0`, see: https://u.ant.design/date-picker-value'); } _this.state = { value: value, open: props.open }; return _this; } WeekPicker__createClass(WeekPicker, [{ key: "componentDidUpdate", value: function componentDidUpdate(_, prevState) { if (!('open' in this.props) && prevState.open && !this.state.open) { this.focus(); } } }, { key: "focus", value: function focus() { this.input.focus(); } }, { key: "blur", value: function blur() { this.input.blur(); } }, { key: "render", value: function render() { return /*#__PURE__*/react["createElement"](config_provider["ConfigConsumer"], null, this.renderWeekPicker); } }], [{ key: "getDerivedStateFromProps", value: function getDerivedStateFromProps(nextProps) { if ('value' in nextProps || 'open' in nextProps) { var state = {}; if ('value' in nextProps) { state.value = nextProps.value; } if ('open' in nextProps) { state.open = nextProps.open; } return state; } return null; } }]); return WeekPicker; }(react["Component"]); WeekPicker_WeekPicker.defaultProps = { format: 'gggg-wo', allowClear: true }; Object(react_lifecycles_compat_es["polyfill"])(WeekPicker_WeekPicker); /* harmony default export */ var date_picker_WeekPicker = (WeekPicker_WeekPicker); // CONCATENATED MODULE: ./node_modules/antd/es/date-picker/index.js function date_picker__extends() { date_picker__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; }; return date_picker__extends.apply(this, arguments); } var DatePicker = wrapPicker(createPicker(es), 'date'); var MonthPicker = wrapPicker(createPicker(es_MonthCalendar), 'month'); date_picker__extends(DatePicker, { RangePicker: wrapPicker(date_picker_RangePicker, 'date'), MonthPicker: MonthPicker, WeekPicker: wrapPicker(date_picker_WeekPicker, 'week') }); /* harmony default export */ var date_picker = __webpack_exports__["default"] = (DatePicker); /***/ }), /***/ "uznb": /***/ (function(module, exports) { // removed by extract-text-webpack-plugin /***/ }), /***/ "v5hY": /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Copyright 2015, Yahoo! Inc. * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. */ var REACT_STATICS = { childContextTypes: true, contextTypes: true, defaultProps: true, displayName: true, getDefaultProps: true, getDerivedStateFromProps: true, mixins: true, propTypes: true, type: true }; var KNOWN_STATICS = { name: true, length: true, prototype: true, caller: true, callee: true, arguments: true, arity: true }; var defineProperty = Object.defineProperty; var getOwnPropertyNames = Object.getOwnPropertyNames; var getOwnPropertySymbols = Object.getOwnPropertySymbols; var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; var getPrototypeOf = Object.getPrototypeOf; var objectPrototype = getPrototypeOf && getPrototypeOf(Object); function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) { if (typeof sourceComponent !== 'string') { // don't hoist over string (html) components if (objectPrototype) { var inheritedComponent = getPrototypeOf(sourceComponent); if (inheritedComponent && inheritedComponent !== objectPrototype) { hoistNonReactStatics(targetComponent, inheritedComponent, blacklist); } } var keys = getOwnPropertyNames(sourceComponent); if (getOwnPropertySymbols) { keys = keys.concat(getOwnPropertySymbols(sourceComponent)); } for (var i = 0; i < keys.length; ++i) { var key = keys[i]; if (!REACT_STATICS[key] && !KNOWN_STATICS[key] && (!blacklist || !blacklist[key])) { var descriptor = getOwnPropertyDescriptor(sourceComponent, key); try { // Avoid failures from read-only properties defineProperty(targetComponent, key, descriptor); } catch (e) {} } } return targetComponent; } return targetComponent; } module.exports = hoistNonReactStatics; /***/ }), /***/ "v8Vb": /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.createSensor = void 0; var _debounce = _interopRequireDefault(__webpack_require__("mho0")); var _constant = __webpack_require__("ZFdq"); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } /** * Created by hustcc on 18/6/9. * Contract: i@hust.cc */ var createSensor = function createSensor(element, whenDestroy) { var sensor = undefined; // callback var listeners = []; /** * create object DOM of sensor * @returns {HTMLObjectElement} */ var newSensor = function newSensor() { // adjust style if (getComputedStyle(element).position === 'static') { element.style.position = 'relative'; } var obj = document.createElement('object'); obj.onload = function () { obj.contentDocument.defaultView.addEventListener('resize', resizeListener); // 直接触发一次 resize resizeListener(); }; obj.style.display = 'block'; obj.style.position = 'absolute'; obj.style.top = '0'; obj.style.left = '0'; obj.style.height = '100%'; obj.style.width = '100%'; obj.style.overflow = 'hidden'; obj.style.pointerEvents = 'none'; obj.style.zIndex = '-1'; obj.style.opacity = '0'; obj.setAttribute('class', _constant.SensorClassName); obj.setAttribute('tabindex', _constant.SensorTabIndex); obj.type = 'text/html'; // append into dom element.appendChild(obj); // for ie, should set data attribute delay, or will be white screen obj.data = 'about:blank'; return obj; }; /** * trigger listeners */ var resizeListener = (0, _debounce["default"])(function () { // trigger all listener listeners.forEach(function (listener) { listener(element); }); }); /** * listen with one callback function * @param cb */ var bind = function bind(cb) { // if not exist sensor, then create one if (!sensor) { sensor = newSensor(); } if (listeners.indexOf(cb) === -1) { listeners.push(cb); } }; /** * destroy all */ var destroy = function destroy() { if (sensor && sensor.parentNode) { if (sensor.contentDocument) { // remote event sensor.contentDocument.defaultView.removeEventListener('resize', resizeListener); } // remove dom sensor.parentNode.removeChild(sensor); // initial variable element.removeAttribute(_constant.SizeSensorId); sensor = undefined; listeners = []; whenDestroy && whenDestroy(); } }; /** * cancel listener bind * @param cb */ var unbind = function unbind(cb) { var idx = listeners.indexOf(cb); if (idx !== -1) { listeners.splice(idx, 1); } // no listener, and sensor is exist // then destroy the sensor if (listeners.length === 0 && sensor) { destroy(); } }; return { element: element, bind: bind, destroy: destroy, unbind: unbind }; }; exports.createSensor = createSensor; /***/ }), /***/ "vD6o": /***/ (function(module, exports) { module.exports = "data:image/png;base64,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" /***/ }), /***/ "vDNl": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAARCAYAAADUryzEAAAAAXNSR0IArs4c6QAAAVNJREFUOE+t0zFLAzEUB/D/S4siKHaRDiJ+ATcFJzdRQdDFoThVl3KH3+CaM+TiN9B0rIugjkXE1tFJ0M0vILi5WBAHbfukh9Y7PeVKzZa8934vIQlhwEED1qMHKKWyrczEGkBzYEwSeIxJDAMswHgFoQngAeCbbPuxppRqdZv3gLK2RwA2U+2IcGKkW4gBnrYvBIykA6hppJOLAVLbCwaW0wFoGOmGuV9HCOwiGJdpAMG0onedegzoTqS2Zwys/o3QufGdXk7sGj2zP00dcQdg9BfkmUVnZq+8c/8Z//EOpK4UGVxNAgi0FfjOYTSW+JA8fVAlUDGGEKpGutvf4URAKTXUFvlTBq9/FNSm8pmNUqn0lghIXSkAPB8NMiEDxlK4RmgQox0vpuvAd47DHZS1fQIwnuYKIzlN47u5EJDaLnSA2X4AAdwGvnv1f7+xn+7R3He2q2MSdof79wAAAABJRU5ErkJggg==" /***/ }), /***/ "vEOg": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; __webpack_require__("GKDd"); var _pagination = _interopRequireDefault(__webpack_require__("BJfm")); __webpack_require__("crfj"); var _button = _interopRequireDefault(__webpack_require__("zwGx")); __webpack_require__("baa2"); var _icon = _interopRequireDefault(__webpack_require__("FC3+")); __webpack_require__("LHBr"); var _input = _interopRequireDefault(__webpack_require__("A+AJ")); var _objectSpread2 = _interopRequireDefault(__webpack_require__("+TWC")); var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); var _dva = __webpack_require__("S6G3"); var _PersonItem = _interopRequireDefault(__webpack_require__("baF6")); var _api = __webpack_require__("H/Zg"); var _events = _interopRequireDefault(__webpack_require__("TLe5")); var _dec, _class; /** * 通过搜索获得地图列表(保安人员) */ // import "../person.less"; function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } // 引入 EventEmitter var AllPerson = exports.default = (_dec = (0, _dva.connect)(function (state) { return { selectedId: state.command.personList.selectedId, tabIndex2: state.command.tabIndex.person.tabIndex2, selectComponeyInfo: state.command.selectComponeyInfo }; }), _dec(_class = /*#__PURE__*/function (_Component) { function AllPerson(props) { var _this; (0, _classCallCheck2.default)(this, AllPerson); _this = _callSuper(this, AllPerson, [props]); _this.onPersonClick = function (item) { _this.props.onPersonClick && _this.props.onPersonClick(item); }; _this.state = { tabKey: "1", currentKey: '1', //主要用于处理tab页面改变,不让重新请求数据 searchData: { pageNumber: 1, pageSize: 6, search_smName: '' }, personList: [], //人员列表数据 height: null, //最大高度 loadingText: "暂无数据" }; return _this; } (0, _inherits2.default)(AllPerson, _Component); return (0, _createClass2.default)(AllPerson, [{ key: "componentDidMount", value: function componentDidMount() { var height = document.documentElement.clientHeight - 120 - 130 - 40; this.setState({ height: height }); this.getPersonList(1); } }, { key: "componentWillReceiveProps", value: function componentWillReceiveProps(nextProps) { console.log('componentWillReceiveProps', nextProps.tabIndex2, this.state.tabKey); console.log('componentWillReceiveProps', nextProps.tabIndex2, this.state.currentKey); if (nextProps.tabIndex2 == this.state.tabKey && //定位当前tab页是自己 nextProps.tabIndex2 != this.state.currentKey //用于不让数据一直刷新 ) { console.log("componentWillReceiveProps"); this.setState({ currentKey: nextProps.tabIndex2 }); this.getPersonList(this.state.searchData.pageNumber); } if (nextProps.tabIndex2 != this.state.tabKey) { this.setState({ currentKey: null }); } } }, { key: "getPersonList", value: function getPersonList(pageNumber) { var _this2 = this; var _this$props = this.props, isTask = _this$props.isTask, selectComponeyInfo = _this$props.selectComponeyInfo; this.props.dispatch({ type: "command/setPersonSelectIndex", payload: null }); _events.default.emit('clearMapTag', 'securityResource'); this.setState({ searchData: (0, _objectSpread2.default)({}, this.state.searchData, { pageNumber: pageNumber }), loadingText: "正在加载中...", personList: [] }, function () { // getComPerLocationByKeyword({ // ...this.state.searchData, // }).then((res) => { // if (res.retType === "0") { // this.setState({ // personList: res.data.data, // total: res.data.total, // loadingText: res.data.data.length > 0 ? "加载完成" : "暂无数据", // }); // this.props.dispatch({ // type: "command/fetchPersonList", // payload: { // list: res.data.data, // }, // }); // } // }); var getFun = _api.getSecuritymanByDomainid; var param = 'getSecurity'; // 获取在勤保安员列表数据 if (isTask) { getFun = _api.getTaskList; param = 'getTask'; } getFun({ _currpage: _this2.state.searchData.pageNumber, lines: _this2.state.searchData.pageSize }, { search_smName: _this2.state.searchData.search_smName, id: selectComponeyInfo.selectComponeyId }).then(function (res) { var result = res.data.data.map(function (item) { if (param == 'getSecurity') { item.perId = item.ID; item.name = item.item_securityname; delete item.item_securityname; var lnglatData = item.location ? JSON.parse(item.location) : ''; item.lnglat = lnglatData ? [lnglatData.longitude, lnglatData.latitude] : ''; item.location = lnglatData ? [lnglatData.longitude, lnglatData.latitude] : ''; item.longitude = lnglatData.longitude; item.latitude = lnglatData.latitude; delete item.location; item.idCardNo = item.item_documentid; delete item.item_documentid; item.mobilePhone = item.item_phone; delete item.item_phone; return item; } else { item.perId = item.id; item.ID = item.id; delete item.id; item.name = item.securityName ? item.securityName : item.principalName; delete item.securityName; delete item.principalName; var _lnglatData = item.item_lonlatjson ? JSON.parse(item.item_lonlatjson) : ''; item.lnglat = _lnglatData ? [_lnglatData.longitude, _lnglatData.latitude] : ''; item.location = _lnglatData ? [_lnglatData.longitude, _lnglatData.latitude] : ''; item.longitude = _lnglatData.longitude; item.latitude = _lnglatData.latitude; // item.lnglat = [118.051982,24.607542] delete item.item_lonlatjson; item.idCardNo = item.documentID ? item.documentID : item.principalIdCardNo; delete item.documentID; delete item.principalIdCardNo; item.mobilePhone = item.phone ? item.phone : item.principalPhoneNo; delete item.principalPhoneNo; return item; } }); _this2.props.dispatch({ type: "command/setPersonSelectIndex", payload: null }); _this2.props.dispatch({ type: "command/clearInfoWindow", payload: true }); _this2.setState({ personList: result, total: res.data.total, loadingText: result.length > 0 ? "加载完成" : "暂无数据" }); console.log(result); // this.props.dispatch({ // type: "command/fetchPersonList", // payload: { // list: result, // }, // }); _events.default.emit('addPictueMarks', { data: { data: result }, type: "securityResource" }); }); }); } }, { key: "render", value: function render() { var _this3 = this; return /*#__PURE__*/_react.default.createElement("div", { className: "data-list" }, /*#__PURE__*/_react.default.createElement("div", { className: "input", style: { display: "flex", justifyContent: "space-between" } }, /*#__PURE__*/_react.default.createElement(_input.default, { placeholder: "\u8BF7\u8F93\u5165\u4EBA\u5458\u59D3\u540D:", style: { maxWidth: 270, minWidth: 210, width: '100%' }, onChange: function onChange(e) { _this3.setState({ searchData: (0, _objectSpread2.default)({}, _this3.state.searchData, { search_smName: e.target.value.trim() }) }); }, onPressEnter: function onPressEnter() { //按下回车的事件 _this3.getPersonList(1); } }), /*#__PURE__*/_react.default.createElement(_button.default, { type: "primary", onClick: function onClick() { _this3.getPersonList(1); } }, /*#__PURE__*/_react.default.createElement(_icon.default, { type: "search", style: { fontSize: "16px" } }))), /*#__PURE__*/_react.default.createElement("div", { className: "security search-list_command amap_lib_placeSearch" }, /*#__PURE__*/_react.default.createElement("div", { className: "list", style: { maxHeight: this.state.height, overflow: "auto" } }, /*#__PURE__*/_react.default.createElement(_PersonItem.default, { onClick: this.onPersonClick, data: this.state.personList, loadingText: this.state.loadingText })), /*#__PURE__*/_react.default.createElement(_pagination.default, { total: this.state.total, size: "small", onChange: function onChange(number) { _this3.getPersonList(number); }, defaultPageSize: this.state.searchData.pageSize, current: this.state.searchData.pageNumber, style: { display: this.state.total > this.state.searchData.pageSize ? "block" : "none", textAlign: 'center' } }))); } }]); }(_react.Component)) || _class); /***/ }), /***/ "vPVG": /***/ (function(module, exports) { module.exports = "data:image/png;base64,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" /***/ }), /***/ "ve5H": /***/ (function(module, exports) { module.exports = [{"code":"110101","name":"东城区","cityCode":"1101","provinceCode":"11"},{"code":"110102","name":"西城区","cityCode":"1101","provinceCode":"11"},{"code":"110105","name":"朝阳区","cityCode":"1101","provinceCode":"11"},{"code":"110106","name":"丰台区","cityCode":"1101","provinceCode":"11"},{"code":"110107","name":"石景山区","cityCode":"1101","provinceCode":"11"},{"code":"110108","name":"海淀区","cityCode":"1101","provinceCode":"11"},{"code":"110109","name":"门头沟区","cityCode":"1101","provinceCode":"11"},{"code":"110111","name":"房山区","cityCode":"1101","provinceCode":"11"},{"code":"110112","name":"通州区","cityCode":"1101","provinceCode":"11"},{"code":"110113","name":"顺义区","cityCode":"1101","provinceCode":"11"},{"code":"110114","name":"昌平区","cityCode":"1101","provinceCode":"11"},{"code":"110115","name":"大兴区","cityCode":"1101","provinceCode":"11"},{"code":"110116","name":"怀柔区","cityCode":"1101","provinceCode":"11"},{"code":"110117","name":"平谷区","cityCode":"1101","provinceCode":"11"},{"code":"110118","name":"密云区","cityCode":"1101","provinceCode":"11"},{"code":"110119","name":"延庆区","cityCode":"1101","provinceCode":"11"},{"code":"120101","name":"和平区","cityCode":"1201","provinceCode":"12"},{"code":"120102","name":"河东区","cityCode":"1201","provinceCode":"12"},{"code":"120103","name":"河西区","cityCode":"1201","provinceCode":"12"},{"code":"120104","name":"南开区","cityCode":"1201","provinceCode":"12"},{"code":"120105","name":"河北区","cityCode":"1201","provinceCode":"12"},{"code":"120106","name":"红桥区","cityCode":"1201","provinceCode":"12"},{"code":"120110","name":"东丽区","cityCode":"1201","provinceCode":"12"},{"code":"120111","name":"西青区","cityCode":"1201","provinceCode":"12"},{"code":"120112","name":"津南区","cityCode":"1201","provinceCode":"12"},{"code":"120113","name":"北辰区","cityCode":"1201","provinceCode":"12"},{"code":"120114","name":"武清区","cityCode":"1201","provinceCode":"12"},{"code":"120115","name":"宝坻区","cityCode":"1201","provinceCode":"12"},{"code":"120116","name":"滨海新区","cityCode":"1201","provinceCode":"12"},{"code":"120117","name":"宁河区","cityCode":"1201","provinceCode":"12"},{"code":"120118","name":"静海区","cityCode":"1201","provinceCode":"12"},{"code":"120119","name":"蓟州区","cityCode":"1201","provinceCode":"12"},{"code":"130102","name":"长安区","cityCode":"1301","provinceCode":"13"},{"code":"130104","name":"桥西区","cityCode":"1301","provinceCode":"13"},{"code":"130105","name":"新华区","cityCode":"1301","provinceCode":"13"},{"code":"130107","name":"井陉矿区","cityCode":"1301","provinceCode":"13"},{"code":"130108","name":"裕华区","cityCode":"1301","provinceCode":"13"},{"code":"130109","name":"藁城区","cityCode":"1301","provinceCode":"13"},{"code":"130110","name":"鹿泉区","cityCode":"1301","provinceCode":"13"},{"code":"130111","name":"栾城区","cityCode":"1301","provinceCode":"13"},{"code":"130121","name":"井陉县","cityCode":"1301","provinceCode":"13"},{"code":"130123","name":"正定县","cityCode":"1301","provinceCode":"13"},{"code":"130125","name":"行唐县","cityCode":"1301","provinceCode":"13"},{"code":"130126","name":"灵寿县","cityCode":"1301","provinceCode":"13"},{"code":"130127","name":"高邑县","cityCode":"1301","provinceCode":"13"},{"code":"130128","name":"深泽县","cityCode":"1301","provinceCode":"13"},{"code":"130129","name":"赞皇县","cityCode":"1301","provinceCode":"13"},{"code":"130130","name":"无极县","cityCode":"1301","provinceCode":"13"},{"code":"130131","name":"平山县","cityCode":"1301","provinceCode":"13"},{"code":"130132","name":"元氏县","cityCode":"1301","provinceCode":"13"},{"code":"130133","name":"赵县","cityCode":"1301","provinceCode":"13"},{"code":"130183","name":"晋州市","cityCode":"1301","provinceCode":"13"},{"code":"130184","name":"新乐市","cityCode":"1301","provinceCode":"13"},{"code":"130202","name":"路南区","cityCode":"1302","provinceCode":"13"},{"code":"130203","name":"路北区","cityCode":"1302","provinceCode":"13"},{"code":"130204","name":"古冶区","cityCode":"1302","provinceCode":"13"},{"code":"130205","name":"开平区","cityCode":"1302","provinceCode":"13"},{"code":"130207","name":"丰南区","cityCode":"1302","provinceCode":"13"},{"code":"130208","name":"丰润区","cityCode":"1302","provinceCode":"13"},{"code":"130209","name":"曹妃甸区","cityCode":"1302","provinceCode":"13"},{"code":"130223","name":"滦县","cityCode":"1302","provinceCode":"13"},{"code":"130224","name":"滦南县","cityCode":"1302","provinceCode":"13"},{"code":"130225","name":"乐亭县","cityCode":"1302","provinceCode":"13"},{"code":"130227","name":"迁西县","cityCode":"1302","provinceCode":"13"},{"code":"130229","name":"玉田县","cityCode":"1302","provinceCode":"13"},{"code":"130281","name":"遵化市","cityCode":"1302","provinceCode":"13"},{"code":"130283","name":"迁安市","cityCode":"1302","provinceCode":"13"},{"code":"130302","name":"海港区","cityCode":"1303","provinceCode":"13"},{"code":"130303","name":"山海关区","cityCode":"1303","provinceCode":"13"},{"code":"130304","name":"北戴河区","cityCode":"1303","provinceCode":"13"},{"code":"130306","name":"抚宁区","cityCode":"1303","provinceCode":"13"},{"code":"130321","name":"青龙满族自治县","cityCode":"1303","provinceCode":"13"},{"code":"130322","name":"昌黎县","cityCode":"1303","provinceCode":"13"},{"code":"130324","name":"卢龙县","cityCode":"1303","provinceCode":"13"},{"code":"130402","name":"邯山区","cityCode":"1304","provinceCode":"13"},{"code":"130403","name":"丛台区","cityCode":"1304","provinceCode":"13"},{"code":"130404","name":"复兴区","cityCode":"1304","provinceCode":"13"},{"code":"130406","name":"峰峰矿区","cityCode":"1304","provinceCode":"13"},{"code":"130421","name":"邯郸县","cityCode":"1304","provinceCode":"13"},{"code":"130423","name":"临漳县","cityCode":"1304","provinceCode":"13"},{"code":"130424","name":"成安县","cityCode":"1304","provinceCode":"13"},{"code":"130425","name":"大名县","cityCode":"1304","provinceCode":"13"},{"code":"130426","name":"涉县","cityCode":"1304","provinceCode":"13"},{"code":"130427","name":"磁县","cityCode":"1304","provinceCode":"13"},{"code":"130428","name":"肥乡县","cityCode":"1304","provinceCode":"13"},{"code":"130429","name":"永年县","cityCode":"1304","provinceCode":"13"},{"code":"130430","name":"邱县","cityCode":"1304","provinceCode":"13"},{"code":"130431","name":"鸡泽县","cityCode":"1304","provinceCode":"13"},{"code":"130432","name":"广平县","cityCode":"1304","provinceCode":"13"},{"code":"130433","name":"馆陶县","cityCode":"1304","provinceCode":"13"},{"code":"130434","name":"魏县","cityCode":"1304","provinceCode":"13"},{"code":"130435","name":"曲周县","cityCode":"1304","provinceCode":"13"},{"code":"130481","name":"武安市","cityCode":"1304","provinceCode":"13"},{"code":"130502","name":"桥东区","cityCode":"1305","provinceCode":"13"},{"code":"130503","name":"桥西区","cityCode":"1305","provinceCode":"13"},{"code":"130521","name":"邢台县","cityCode":"1305","provinceCode":"13"},{"code":"130522","name":"临城县","cityCode":"1305","provinceCode":"13"},{"code":"130523","name":"内丘县","cityCode":"1305","provinceCode":"13"},{"code":"130524","name":"柏乡县","cityCode":"1305","provinceCode":"13"},{"code":"130525","name":"隆尧县","cityCode":"1305","provinceCode":"13"},{"code":"130526","name":"任县","cityCode":"1305","provinceCode":"13"},{"code":"130527","name":"南和县","cityCode":"1305","provinceCode":"13"},{"code":"130528","name":"宁晋县","cityCode":"1305","provinceCode":"13"},{"code":"130529","name":"巨鹿县","cityCode":"1305","provinceCode":"13"},{"code":"130530","name":"新河县","cityCode":"1305","provinceCode":"13"},{"code":"130531","name":"广宗县","cityCode":"1305","provinceCode":"13"},{"code":"130532","name":"平乡县","cityCode":"1305","provinceCode":"13"},{"code":"130533","name":"威县","cityCode":"1305","provinceCode":"13"},{"code":"130534","name":"清河县","cityCode":"1305","provinceCode":"13"},{"code":"130535","name":"临西县","cityCode":"1305","provinceCode":"13"},{"code":"130581","name":"南宫市","cityCode":"1305","provinceCode":"13"},{"code":"130582","name":"沙河市","cityCode":"1305","provinceCode":"13"},{"code":"130602","name":"竞秀区","cityCode":"1306","provinceCode":"13"},{"code":"130606","name":"莲池区","cityCode":"1306","provinceCode":"13"},{"code":"130607","name":"满城区","cityCode":"1306","provinceCode":"13"},{"code":"130608","name":"清苑区","cityCode":"1306","provinceCode":"13"},{"code":"130609","name":"徐水区","cityCode":"1306","provinceCode":"13"},{"code":"130623","name":"涞水县","cityCode":"1306","provinceCode":"13"},{"code":"130624","name":"阜平县","cityCode":"1306","provinceCode":"13"},{"code":"130626","name":"定兴县","cityCode":"1306","provinceCode":"13"},{"code":"130627","name":"唐县","cityCode":"1306","provinceCode":"13"},{"code":"130628","name":"高阳县","cityCode":"1306","provinceCode":"13"},{"code":"130629","name":"容城县","cityCode":"1306","provinceCode":"13"},{"code":"130630","name":"涞源县","cityCode":"1306","provinceCode":"13"},{"code":"130631","name":"望都县","cityCode":"1306","provinceCode":"13"},{"code":"130632","name":"安新县","cityCode":"1306","provinceCode":"13"},{"code":"130633","name":"易县","cityCode":"1306","provinceCode":"13"},{"code":"130634","name":"曲阳县","cityCode":"1306","provinceCode":"13"},{"code":"130635","name":"蠡县","cityCode":"1306","provinceCode":"13"},{"code":"130636","name":"顺平县","cityCode":"1306","provinceCode":"13"},{"code":"130637","name":"博野县","cityCode":"1306","provinceCode":"13"},{"code":"130638","name":"雄县","cityCode":"1306","provinceCode":"13"},{"code":"130681","name":"涿州市","cityCode":"1306","provinceCode":"13"},{"code":"130683","name":"安国市","cityCode":"1306","provinceCode":"13"},{"code":"130684","name":"高碑店市","cityCode":"1306","provinceCode":"13"},{"code":"130702","name":"桥东区","cityCode":"1307","provinceCode":"13"},{"code":"130703","name":"桥西区","cityCode":"1307","provinceCode":"13"},{"code":"130705","name":"宣化区","cityCode":"1307","provinceCode":"13"},{"code":"130706","name":"下花园区","cityCode":"1307","provinceCode":"13"},{"code":"130708","name":"万全区","cityCode":"1307","provinceCode":"13"},{"code":"130709","name":"崇礼区","cityCode":"1307","provinceCode":"13"},{"code":"130722","name":"张北县","cityCode":"1307","provinceCode":"13"},{"code":"130723","name":"康保县","cityCode":"1307","provinceCode":"13"},{"code":"130724","name":"沽源县","cityCode":"1307","provinceCode":"13"},{"code":"130725","name":"尚义县","cityCode":"1307","provinceCode":"13"},{"code":"130726","name":"蔚县","cityCode":"1307","provinceCode":"13"},{"code":"130727","name":"阳原县","cityCode":"1307","provinceCode":"13"},{"code":"130728","name":"怀安县","cityCode":"1307","provinceCode":"13"},{"code":"130730","name":"怀来县","cityCode":"1307","provinceCode":"13"},{"code":"130731","name":"涿鹿县","cityCode":"1307","provinceCode":"13"},{"code":"130732","name":"赤城县","cityCode":"1307","provinceCode":"13"},{"code":"130802","name":"双桥区","cityCode":"1308","provinceCode":"13"},{"code":"130803","name":"双滦区","cityCode":"1308","provinceCode":"13"},{"code":"130804","name":"鹰手营子矿区","cityCode":"1308","provinceCode":"13"},{"code":"130821","name":"承德县","cityCode":"1308","provinceCode":"13"},{"code":"130822","name":"兴隆县","cityCode":"1308","provinceCode":"13"},{"code":"130823","name":"平泉县","cityCode":"1308","provinceCode":"13"},{"code":"130824","name":"滦平县","cityCode":"1308","provinceCode":"13"},{"code":"130825","name":"隆化县","cityCode":"1308","provinceCode":"13"},{"code":"130826","name":"丰宁满族自治县","cityCode":"1308","provinceCode":"13"},{"code":"130827","name":"宽城满族自治县","cityCode":"1308","provinceCode":"13"},{"code":"130828","name":"围场满族蒙古族自治县","cityCode":"1308","provinceCode":"13"},{"code":"130902","name":"新华区","cityCode":"1309","provinceCode":"13"},{"code":"130903","name":"运河区","cityCode":"1309","provinceCode":"13"},{"code":"130921","name":"沧县","cityCode":"1309","provinceCode":"13"},{"code":"130922","name":"青县","cityCode":"1309","provinceCode":"13"},{"code":"130923","name":"东光县","cityCode":"1309","provinceCode":"13"},{"code":"130924","name":"海兴县","cityCode":"1309","provinceCode":"13"},{"code":"130925","name":"盐山县","cityCode":"1309","provinceCode":"13"},{"code":"130926","name":"肃宁县","cityCode":"1309","provinceCode":"13"},{"code":"130927","name":"南皮县","cityCode":"1309","provinceCode":"13"},{"code":"130928","name":"吴桥县","cityCode":"1309","provinceCode":"13"},{"code":"130929","name":"献县","cityCode":"1309","provinceCode":"13"},{"code":"130930","name":"孟村回族自治县","cityCode":"1309","provinceCode":"13"},{"code":"130981","name":"泊头市","cityCode":"1309","provinceCode":"13"},{"code":"130982","name":"任丘市","cityCode":"1309","provinceCode":"13"},{"code":"130983","name":"黄骅市","cityCode":"1309","provinceCode":"13"},{"code":"130984","name":"河间市","cityCode":"1309","provinceCode":"13"},{"code":"131002","name":"安次区","cityCode":"1310","provinceCode":"13"},{"code":"131003","name":"广阳区","cityCode":"1310","provinceCode":"13"},{"code":"131022","name":"固安县","cityCode":"1310","provinceCode":"13"},{"code":"131023","name":"永清县","cityCode":"1310","provinceCode":"13"},{"code":"131024","name":"香河县","cityCode":"1310","provinceCode":"13"},{"code":"131025","name":"大城县","cityCode":"1310","provinceCode":"13"},{"code":"131026","name":"文安县","cityCode":"1310","provinceCode":"13"},{"code":"131028","name":"大厂回族自治县","cityCode":"1310","provinceCode":"13"},{"code":"131081","name":"霸州市","cityCode":"1310","provinceCode":"13"},{"code":"131082","name":"三河市","cityCode":"1310","provinceCode":"13"},{"code":"131102","name":"桃城区","cityCode":"1311","provinceCode":"13"},{"code":"131103","name":"冀州区","cityCode":"1311","provinceCode":"13"},{"code":"131121","name":"枣强县","cityCode":"1311","provinceCode":"13"},{"code":"131122","name":"武邑县","cityCode":"1311","provinceCode":"13"},{"code":"131123","name":"武强县","cityCode":"1311","provinceCode":"13"},{"code":"131124","name":"饶阳县","cityCode":"1311","provinceCode":"13"},{"code":"131125","name":"安平县","cityCode":"1311","provinceCode":"13"},{"code":"131126","name":"故城县","cityCode":"1311","provinceCode":"13"},{"code":"131127","name":"景县","cityCode":"1311","provinceCode":"13"},{"code":"131128","name":"阜城县","cityCode":"1311","provinceCode":"13"},{"code":"131182","name":"深州市","cityCode":"1311","provinceCode":"13"},{"code":"139001","name":"定州市","cityCode":"1390","provinceCode":"13"},{"code":"139002","name":"辛集市","cityCode":"1390","provinceCode":"13"},{"code":"140105","name":"小店区","cityCode":"1401","provinceCode":"14"},{"code":"140106","name":"迎泽区","cityCode":"1401","provinceCode":"14"},{"code":"140107","name":"杏花岭区","cityCode":"1401","provinceCode":"14"},{"code":"140108","name":"尖草坪区","cityCode":"1401","provinceCode":"14"},{"code":"140109","name":"万柏林区","cityCode":"1401","provinceCode":"14"},{"code":"140110","name":"晋源区","cityCode":"1401","provinceCode":"14"},{"code":"140121","name":"清徐县","cityCode":"1401","provinceCode":"14"},{"code":"140122","name":"阳曲县","cityCode":"1401","provinceCode":"14"},{"code":"140123","name":"娄烦县","cityCode":"1401","provinceCode":"14"},{"code":"140181","name":"古交市","cityCode":"1401","provinceCode":"14"},{"code":"140202","name":"城区","cityCode":"1402","provinceCode":"14"},{"code":"140203","name":"矿区","cityCode":"1402","provinceCode":"14"},{"code":"140211","name":"南郊区","cityCode":"1402","provinceCode":"14"},{"code":"140212","name":"新荣区","cityCode":"1402","provinceCode":"14"},{"code":"140221","name":"阳高县","cityCode":"1402","provinceCode":"14"},{"code":"140222","name":"天镇县","cityCode":"1402","provinceCode":"14"},{"code":"140223","name":"广灵县","cityCode":"1402","provinceCode":"14"},{"code":"140224","name":"灵丘县","cityCode":"1402","provinceCode":"14"},{"code":"140225","name":"浑源县","cityCode":"1402","provinceCode":"14"},{"code":"140226","name":"左云县","cityCode":"1402","provinceCode":"14"},{"code":"140227","name":"大同县","cityCode":"1402","provinceCode":"14"},{"code":"140302","name":"城区","cityCode":"1403","provinceCode":"14"},{"code":"140303","name":"矿区","cityCode":"1403","provinceCode":"14"},{"code":"140311","name":"郊区","cityCode":"1403","provinceCode":"14"},{"code":"140321","name":"平定县","cityCode":"1403","provinceCode":"14"},{"code":"140322","name":"盂县","cityCode":"1403","provinceCode":"14"},{"code":"140402","name":"城区","cityCode":"1404","provinceCode":"14"},{"code":"140411","name":"郊区","cityCode":"1404","provinceCode":"14"},{"code":"140421","name":"长治县","cityCode":"1404","provinceCode":"14"},{"code":"140423","name":"襄垣县","cityCode":"1404","provinceCode":"14"},{"code":"140424","name":"屯留县","cityCode":"1404","provinceCode":"14"},{"code":"140425","name":"平顺县","cityCode":"1404","provinceCode":"14"},{"code":"140426","name":"黎城县","cityCode":"1404","provinceCode":"14"},{"code":"140427","name":"壶关县","cityCode":"1404","provinceCode":"14"},{"code":"140428","name":"长子县","cityCode":"1404","provinceCode":"14"},{"code":"140429","name":"武乡县","cityCode":"1404","provinceCode":"14"},{"code":"140430","name":"沁县","cityCode":"1404","provinceCode":"14"},{"code":"140431","name":"沁源县","cityCode":"1404","provinceCode":"14"},{"code":"140481","name":"潞城市","cityCode":"1404","provinceCode":"14"},{"code":"140502","name":"城区","cityCode":"1405","provinceCode":"14"},{"code":"140521","name":"沁水县","cityCode":"1405","provinceCode":"14"},{"code":"140522","name":"阳城县","cityCode":"1405","provinceCode":"14"},{"code":"140524","name":"陵川县","cityCode":"1405","provinceCode":"14"},{"code":"140525","name":"泽州县","cityCode":"1405","provinceCode":"14"},{"code":"140581","name":"高平市","cityCode":"1405","provinceCode":"14"},{"code":"140602","name":"朔城区","cityCode":"1406","provinceCode":"14"},{"code":"140603","name":"平鲁区","cityCode":"1406","provinceCode":"14"},{"code":"140621","name":"山阴县","cityCode":"1406","provinceCode":"14"},{"code":"140622","name":"应县","cityCode":"1406","provinceCode":"14"},{"code":"140623","name":"右玉县","cityCode":"1406","provinceCode":"14"},{"code":"140624","name":"怀仁县","cityCode":"1406","provinceCode":"14"},{"code":"140702","name":"榆次区","cityCode":"1407","provinceCode":"14"},{"code":"140721","name":"榆社县","cityCode":"1407","provinceCode":"14"},{"code":"140722","name":"左权县","cityCode":"1407","provinceCode":"14"},{"code":"140723","name":"和顺县","cityCode":"1407","provinceCode":"14"},{"code":"140724","name":"昔阳县","cityCode":"1407","provinceCode":"14"},{"code":"140725","name":"寿阳县","cityCode":"1407","provinceCode":"14"},{"code":"140726","name":"太谷县","cityCode":"1407","provinceCode":"14"},{"code":"140727","name":"祁县","cityCode":"1407","provinceCode":"14"},{"code":"140728","name":"平遥县","cityCode":"1407","provinceCode":"14"},{"code":"140729","name":"灵石县","cityCode":"1407","provinceCode":"14"},{"code":"140781","name":"介休市","cityCode":"1407","provinceCode":"14"},{"code":"140802","name":"盐湖区","cityCode":"1408","provinceCode":"14"},{"code":"140821","name":"临猗县","cityCode":"1408","provinceCode":"14"},{"code":"140822","name":"万荣县","cityCode":"1408","provinceCode":"14"},{"code":"140823","name":"闻喜县","cityCode":"1408","provinceCode":"14"},{"code":"140824","name":"稷山县","cityCode":"1408","provinceCode":"14"},{"code":"140825","name":"新绛县","cityCode":"1408","provinceCode":"14"},{"code":"140826","name":"绛县","cityCode":"1408","provinceCode":"14"},{"code":"140827","name":"垣曲县","cityCode":"1408","provinceCode":"14"},{"code":"140828","name":"夏县","cityCode":"1408","provinceCode":"14"},{"code":"140829","name":"平陆县","cityCode":"1408","provinceCode":"14"},{"code":"140830","name":"芮城县","cityCode":"1408","provinceCode":"14"},{"code":"140881","name":"永济市","cityCode":"1408","provinceCode":"14"},{"code":"140882","name":"河津市","cityCode":"1408","provinceCode":"14"},{"code":"140902","name":"忻府区","cityCode":"1409","provinceCode":"14"},{"code":"140921","name":"定襄县","cityCode":"1409","provinceCode":"14"},{"code":"140922","name":"五台县","cityCode":"1409","provinceCode":"14"},{"code":"140923","name":"代县","cityCode":"1409","provinceCode":"14"},{"code":"140924","name":"繁峙县","cityCode":"1409","provinceCode":"14"},{"code":"140925","name":"宁武县","cityCode":"1409","provinceCode":"14"},{"code":"140926","name":"静乐县","cityCode":"1409","provinceCode":"14"},{"code":"140927","name":"神池县","cityCode":"1409","provinceCode":"14"},{"code":"140928","name":"五寨县","cityCode":"1409","provinceCode":"14"},{"code":"140929","name":"岢岚县","cityCode":"1409","provinceCode":"14"},{"code":"140930","name":"河曲县","cityCode":"1409","provinceCode":"14"},{"code":"140931","name":"保德县","cityCode":"1409","provinceCode":"14"},{"code":"140932","name":"偏关县","cityCode":"1409","provinceCode":"14"},{"code":"140981","name":"原平市","cityCode":"1409","provinceCode":"14"},{"code":"141002","name":"尧都区","cityCode":"1410","provinceCode":"14"},{"code":"141021","name":"曲沃县","cityCode":"1410","provinceCode":"14"},{"code":"141022","name":"翼城县","cityCode":"1410","provinceCode":"14"},{"code":"141023","name":"襄汾县","cityCode":"1410","provinceCode":"14"},{"code":"141024","name":"洪洞县","cityCode":"1410","provinceCode":"14"},{"code":"141025","name":"古县","cityCode":"1410","provinceCode":"14"},{"code":"141026","name":"安泽县","cityCode":"1410","provinceCode":"14"},{"code":"141027","name":"浮山县","cityCode":"1410","provinceCode":"14"},{"code":"141028","name":"吉县","cityCode":"1410","provinceCode":"14"},{"code":"141029","name":"乡宁县","cityCode":"1410","provinceCode":"14"},{"code":"141030","name":"大宁县","cityCode":"1410","provinceCode":"14"},{"code":"141031","name":"隰县","cityCode":"1410","provinceCode":"14"},{"code":"141032","name":"永和县","cityCode":"1410","provinceCode":"14"},{"code":"141033","name":"蒲县","cityCode":"1410","provinceCode":"14"},{"code":"141034","name":"汾西县","cityCode":"1410","provinceCode":"14"},{"code":"141081","name":"侯马市","cityCode":"1410","provinceCode":"14"},{"code":"141082","name":"霍州市","cityCode":"1410","provinceCode":"14"},{"code":"141102","name":"离石区","cityCode":"1411","provinceCode":"14"},{"code":"141121","name":"文水县","cityCode":"1411","provinceCode":"14"},{"code":"141122","name":"交城县","cityCode":"1411","provinceCode":"14"},{"code":"141123","name":"兴县","cityCode":"1411","provinceCode":"14"},{"code":"141124","name":"临县","cityCode":"1411","provinceCode":"14"},{"code":"141125","name":"柳林县","cityCode":"1411","provinceCode":"14"},{"code":"141126","name":"石楼县","cityCode":"1411","provinceCode":"14"},{"code":"141127","name":"岚县","cityCode":"1411","provinceCode":"14"},{"code":"141128","name":"方山县","cityCode":"1411","provinceCode":"14"},{"code":"141129","name":"中阳县","cityCode":"1411","provinceCode":"14"},{"code":"141130","name":"交口县","cityCode":"1411","provinceCode":"14"},{"code":"141181","name":"孝义市","cityCode":"1411","provinceCode":"14"},{"code":"141182","name":"汾阳市","cityCode":"1411","provinceCode":"14"},{"code":"150102","name":"新城区","cityCode":"1501","provinceCode":"15"},{"code":"150103","name":"回民区","cityCode":"1501","provinceCode":"15"},{"code":"150104","name":"玉泉区","cityCode":"1501","provinceCode":"15"},{"code":"150105","name":"赛罕区","cityCode":"1501","provinceCode":"15"},{"code":"150121","name":"土默特左旗","cityCode":"1501","provinceCode":"15"},{"code":"150122","name":"托克托县","cityCode":"1501","provinceCode":"15"},{"code":"150123","name":"和林格尔县","cityCode":"1501","provinceCode":"15"},{"code":"150124","name":"清水河县","cityCode":"1501","provinceCode":"15"},{"code":"150125","name":"武川县","cityCode":"1501","provinceCode":"15"},{"code":"150202","name":"东河区","cityCode":"1502","provinceCode":"15"},{"code":"150203","name":"昆都仑区","cityCode":"1502","provinceCode":"15"},{"code":"150204","name":"青山区","cityCode":"1502","provinceCode":"15"},{"code":"150205","name":"石拐区","cityCode":"1502","provinceCode":"15"},{"code":"150206","name":"白云鄂博矿区","cityCode":"1502","provinceCode":"15"},{"code":"150207","name":"九原区","cityCode":"1502","provinceCode":"15"},{"code":"150221","name":"土默特右旗","cityCode":"1502","provinceCode":"15"},{"code":"150222","name":"固阳县","cityCode":"1502","provinceCode":"15"},{"code":"150223","name":"达尔罕茂明安联合旗","cityCode":"1502","provinceCode":"15"},{"code":"150302","name":"海勃湾区","cityCode":"1503","provinceCode":"15"},{"code":"150303","name":"海南区","cityCode":"1503","provinceCode":"15"},{"code":"150304","name":"乌达区","cityCode":"1503","provinceCode":"15"},{"code":"150402","name":"红山区","cityCode":"1504","provinceCode":"15"},{"code":"150403","name":"元宝山区","cityCode":"1504","provinceCode":"15"},{"code":"150404","name":"松山区","cityCode":"1504","provinceCode":"15"},{"code":"150421","name":"阿鲁科尔沁旗","cityCode":"1504","provinceCode":"15"},{"code":"150422","name":"巴林左旗","cityCode":"1504","provinceCode":"15"},{"code":"150423","name":"巴林右旗","cityCode":"1504","provinceCode":"15"},{"code":"150424","name":"林西县","cityCode":"1504","provinceCode":"15"},{"code":"150425","name":"克什克腾旗","cityCode":"1504","provinceCode":"15"},{"code":"150426","name":"翁牛特旗","cityCode":"1504","provinceCode":"15"},{"code":"150428","name":"喀喇沁旗","cityCode":"1504","provinceCode":"15"},{"code":"150429","name":"宁城县","cityCode":"1504","provinceCode":"15"},{"code":"150430","name":"敖汉旗","cityCode":"1504","provinceCode":"15"},{"code":"150502","name":"科尔沁区","cityCode":"1505","provinceCode":"15"},{"code":"150521","name":"科尔沁左翼中旗","cityCode":"1505","provinceCode":"15"},{"code":"150522","name":"科尔沁左翼后旗","cityCode":"1505","provinceCode":"15"},{"code":"150523","name":"开鲁县","cityCode":"1505","provinceCode":"15"},{"code":"150524","name":"库伦旗","cityCode":"1505","provinceCode":"15"},{"code":"150525","name":"奈曼旗","cityCode":"1505","provinceCode":"15"},{"code":"150526","name":"扎鲁特旗","cityCode":"1505","provinceCode":"15"},{"code":"150581","name":"霍林郭勒市","cityCode":"1505","provinceCode":"15"},{"code":"150602","name":"东胜区","cityCode":"1506","provinceCode":"15"},{"code":"150603","name":"康巴什区","cityCode":"1506","provinceCode":"15"},{"code":"150621","name":"达拉特旗","cityCode":"1506","provinceCode":"15"},{"code":"150622","name":"准格尔旗","cityCode":"1506","provinceCode":"15"},{"code":"150623","name":"鄂托克前旗","cityCode":"1506","provinceCode":"15"},{"code":"150624","name":"鄂托克旗","cityCode":"1506","provinceCode":"15"},{"code":"150625","name":"杭锦旗","cityCode":"1506","provinceCode":"15"},{"code":"150626","name":"乌审旗","cityCode":"1506","provinceCode":"15"},{"code":"150627","name":"伊金霍洛旗","cityCode":"1506","provinceCode":"15"},{"code":"150702","name":"海拉尔区","cityCode":"1507","provinceCode":"15"},{"code":"150703","name":"扎赉诺尔区","cityCode":"1507","provinceCode":"15"},{"code":"150721","name":"阿荣旗","cityCode":"1507","provinceCode":"15"},{"code":"150722","name":"莫力达瓦达斡尔族自治旗","cityCode":"1507","provinceCode":"15"},{"code":"150723","name":"鄂伦春自治旗","cityCode":"1507","provinceCode":"15"},{"code":"150724","name":"鄂温克族自治旗","cityCode":"1507","provinceCode":"15"},{"code":"150725","name":"陈巴尔虎旗","cityCode":"1507","provinceCode":"15"},{"code":"150726","name":"新巴尔虎左旗","cityCode":"1507","provinceCode":"15"},{"code":"150727","name":"新巴尔虎右旗","cityCode":"1507","provinceCode":"15"},{"code":"150781","name":"满洲里市","cityCode":"1507","provinceCode":"15"},{"code":"150782","name":"牙克石市","cityCode":"1507","provinceCode":"15"},{"code":"150783","name":"扎兰屯市","cityCode":"1507","provinceCode":"15"},{"code":"150784","name":"额尔古纳市","cityCode":"1507","provinceCode":"15"},{"code":"150785","name":"根河市","cityCode":"1507","provinceCode":"15"},{"code":"150802","name":"临河区","cityCode":"1508","provinceCode":"15"},{"code":"150821","name":"五原县","cityCode":"1508","provinceCode":"15"},{"code":"150822","name":"磴口县","cityCode":"1508","provinceCode":"15"},{"code":"150823","name":"乌拉特前旗","cityCode":"1508","provinceCode":"15"},{"code":"150824","name":"乌拉特中旗","cityCode":"1508","provinceCode":"15"},{"code":"150825","name":"乌拉特后旗","cityCode":"1508","provinceCode":"15"},{"code":"150826","name":"杭锦后旗","cityCode":"1508","provinceCode":"15"},{"code":"150902","name":"集宁区","cityCode":"1509","provinceCode":"15"},{"code":"150921","name":"卓资县","cityCode":"1509","provinceCode":"15"},{"code":"150922","name":"化德县","cityCode":"1509","provinceCode":"15"},{"code":"150923","name":"商都县","cityCode":"1509","provinceCode":"15"},{"code":"150924","name":"兴和县","cityCode":"1509","provinceCode":"15"},{"code":"150925","name":"凉城县","cityCode":"1509","provinceCode":"15"},{"code":"150926","name":"察哈尔右翼前旗","cityCode":"1509","provinceCode":"15"},{"code":"150927","name":"察哈尔右翼中旗","cityCode":"1509","provinceCode":"15"},{"code":"150928","name":"察哈尔右翼后旗","cityCode":"1509","provinceCode":"15"},{"code":"150929","name":"四子王旗","cityCode":"1509","provinceCode":"15"},{"code":"150981","name":"丰镇市","cityCode":"1509","provinceCode":"15"},{"code":"152201","name":"乌兰浩特市","cityCode":"1522","provinceCode":"15"},{"code":"152202","name":"阿尔山市","cityCode":"1522","provinceCode":"15"},{"code":"152221","name":"科尔沁右翼前旗","cityCode":"1522","provinceCode":"15"},{"code":"152222","name":"科尔沁右翼中旗","cityCode":"1522","provinceCode":"15"},{"code":"152223","name":"扎赉特旗","cityCode":"1522","provinceCode":"15"},{"code":"152224","name":"突泉县","cityCode":"1522","provinceCode":"15"},{"code":"152501","name":"二连浩特市","cityCode":"1525","provinceCode":"15"},{"code":"152502","name":"锡林浩特市","cityCode":"1525","provinceCode":"15"},{"code":"152522","name":"阿巴嘎旗","cityCode":"1525","provinceCode":"15"},{"code":"152523","name":"苏尼特左旗","cityCode":"1525","provinceCode":"15"},{"code":"152524","name":"苏尼特右旗","cityCode":"1525","provinceCode":"15"},{"code":"152525","name":"东乌珠穆沁旗","cityCode":"1525","provinceCode":"15"},{"code":"152526","name":"西乌珠穆沁旗","cityCode":"1525","provinceCode":"15"},{"code":"152527","name":"太仆寺旗","cityCode":"1525","provinceCode":"15"},{"code":"152528","name":"镶黄旗","cityCode":"1525","provinceCode":"15"},{"code":"152529","name":"正镶白旗","cityCode":"1525","provinceCode":"15"},{"code":"152530","name":"正蓝旗","cityCode":"1525","provinceCode":"15"},{"code":"152531","name":"多伦县","cityCode":"1525","provinceCode":"15"},{"code":"152921","name":"阿拉善左旗","cityCode":"1529","provinceCode":"15"},{"code":"152922","name":"阿拉善右旗","cityCode":"1529","provinceCode":"15"},{"code":"152923","name":"额济纳旗","cityCode":"1529","provinceCode":"15"},{"code":"210102","name":"和平区","cityCode":"2101","provinceCode":"21"},{"code":"210103","name":"沈河区","cityCode":"2101","provinceCode":"21"},{"code":"210104","name":"大东区","cityCode":"2101","provinceCode":"21"},{"code":"210105","name":"皇姑区","cityCode":"2101","provinceCode":"21"},{"code":"210106","name":"铁西区","cityCode":"2101","provinceCode":"21"},{"code":"210111","name":"苏家屯区","cityCode":"2101","provinceCode":"21"},{"code":"210112","name":"浑南区","cityCode":"2101","provinceCode":"21"},{"code":"210113","name":"沈北新区","cityCode":"2101","provinceCode":"21"},{"code":"210114","name":"于洪区","cityCode":"2101","provinceCode":"21"},{"code":"210115","name":"辽中区","cityCode":"2101","provinceCode":"21"},{"code":"210123","name":"康平县","cityCode":"2101","provinceCode":"21"},{"code":"210124","name":"法库县","cityCode":"2101","provinceCode":"21"},{"code":"210181","name":"新民市","cityCode":"2101","provinceCode":"21"},{"code":"210202","name":"中山区","cityCode":"2102","provinceCode":"21"},{"code":"210203","name":"西岗区","cityCode":"2102","provinceCode":"21"},{"code":"210204","name":"沙河口区","cityCode":"2102","provinceCode":"21"},{"code":"210211","name":"甘井子区","cityCode":"2102","provinceCode":"21"},{"code":"210212","name":"旅顺口区","cityCode":"2102","provinceCode":"21"},{"code":"210213","name":"金州区","cityCode":"2102","provinceCode":"21"},{"code":"210214","name":"普兰店区","cityCode":"2102","provinceCode":"21"},{"code":"210224","name":"长海县","cityCode":"2102","provinceCode":"21"},{"code":"210281","name":"瓦房店市","cityCode":"2102","provinceCode":"21"},{"code":"210283","name":"庄河市","cityCode":"2102","provinceCode":"21"},{"code":"210302","name":"铁东区","cityCode":"2103","provinceCode":"21"},{"code":"210303","name":"铁西区","cityCode":"2103","provinceCode":"21"},{"code":"210304","name":"立山区","cityCode":"2103","provinceCode":"21"},{"code":"210311","name":"千山区","cityCode":"2103","provinceCode":"21"},{"code":"210321","name":"台安县","cityCode":"2103","provinceCode":"21"},{"code":"210323","name":"岫岩满族自治县","cityCode":"2103","provinceCode":"21"},{"code":"210381","name":"海城市","cityCode":"2103","provinceCode":"21"},{"code":"210402","name":"新抚区","cityCode":"2104","provinceCode":"21"},{"code":"210403","name":"东洲区","cityCode":"2104","provinceCode":"21"},{"code":"210404","name":"望花区","cityCode":"2104","provinceCode":"21"},{"code":"210411","name":"顺城区","cityCode":"2104","provinceCode":"21"},{"code":"210421","name":"抚顺县","cityCode":"2104","provinceCode":"21"},{"code":"210422","name":"新宾满族自治县","cityCode":"2104","provinceCode":"21"},{"code":"210423","name":"清原满族自治县","cityCode":"2104","provinceCode":"21"},{"code":"210502","name":"平山区","cityCode":"2105","provinceCode":"21"},{"code":"210503","name":"溪湖区","cityCode":"2105","provinceCode":"21"},{"code":"210504","name":"明山区","cityCode":"2105","provinceCode":"21"},{"code":"210505","name":"南芬区","cityCode":"2105","provinceCode":"21"},{"code":"210521","name":"本溪满族自治县","cityCode":"2105","provinceCode":"21"},{"code":"210522","name":"桓仁满族自治县","cityCode":"2105","provinceCode":"21"},{"code":"210602","name":"元宝区","cityCode":"2106","provinceCode":"21"},{"code":"210603","name":"振兴区","cityCode":"2106","provinceCode":"21"},{"code":"210604","name":"振安区","cityCode":"2106","provinceCode":"21"},{"code":"210624","name":"宽甸满族自治县","cityCode":"2106","provinceCode":"21"},{"code":"210681","name":"东港市","cityCode":"2106","provinceCode":"21"},{"code":"210682","name":"凤城市","cityCode":"2106","provinceCode":"21"},{"code":"210702","name":"古塔区","cityCode":"2107","provinceCode":"21"},{"code":"210703","name":"凌河区","cityCode":"2107","provinceCode":"21"},{"code":"210711","name":"太和区","cityCode":"2107","provinceCode":"21"},{"code":"210726","name":"黑山县","cityCode":"2107","provinceCode":"21"},{"code":"210727","name":"义县","cityCode":"2107","provinceCode":"21"},{"code":"210781","name":"凌海市","cityCode":"2107","provinceCode":"21"},{"code":"210782","name":"北镇市","cityCode":"2107","provinceCode":"21"},{"code":"210802","name":"站前区","cityCode":"2108","provinceCode":"21"},{"code":"210803","name":"西市区","cityCode":"2108","provinceCode":"21"},{"code":"210804","name":"鲅鱼圈区","cityCode":"2108","provinceCode":"21"},{"code":"210811","name":"老边区","cityCode":"2108","provinceCode":"21"},{"code":"210881","name":"盖州市","cityCode":"2108","provinceCode":"21"},{"code":"210882","name":"大石桥市","cityCode":"2108","provinceCode":"21"},{"code":"210902","name":"海州区","cityCode":"2109","provinceCode":"21"},{"code":"210903","name":"新邱区","cityCode":"2109","provinceCode":"21"},{"code":"210904","name":"太平区","cityCode":"2109","provinceCode":"21"},{"code":"210905","name":"清河门区","cityCode":"2109","provinceCode":"21"},{"code":"210911","name":"细河区","cityCode":"2109","provinceCode":"21"},{"code":"210921","name":"阜新蒙古族自治县","cityCode":"2109","provinceCode":"21"},{"code":"210922","name":"彰武县","cityCode":"2109","provinceCode":"21"},{"code":"211002","name":"白塔区","cityCode":"2110","provinceCode":"21"},{"code":"211003","name":"文圣区","cityCode":"2110","provinceCode":"21"},{"code":"211004","name":"宏伟区","cityCode":"2110","provinceCode":"21"},{"code":"211005","name":"弓长岭区","cityCode":"2110","provinceCode":"21"},{"code":"211011","name":"太子河区","cityCode":"2110","provinceCode":"21"},{"code":"211021","name":"辽阳县","cityCode":"2110","provinceCode":"21"},{"code":"211081","name":"灯塔市","cityCode":"2110","provinceCode":"21"},{"code":"211102","name":"双台子区","cityCode":"2111","provinceCode":"21"},{"code":"211103","name":"兴隆台区","cityCode":"2111","provinceCode":"21"},{"code":"211104","name":"大洼区","cityCode":"2111","provinceCode":"21"},{"code":"211122","name":"盘山县","cityCode":"2111","provinceCode":"21"},{"code":"211202","name":"银州区","cityCode":"2112","provinceCode":"21"},{"code":"211204","name":"清河区","cityCode":"2112","provinceCode":"21"},{"code":"211221","name":"铁岭县","cityCode":"2112","provinceCode":"21"},{"code":"211223","name":"西丰县","cityCode":"2112","provinceCode":"21"},{"code":"211224","name":"昌图县","cityCode":"2112","provinceCode":"21"},{"code":"211281","name":"调兵山市","cityCode":"2112","provinceCode":"21"},{"code":"211282","name":"开原市","cityCode":"2112","provinceCode":"21"},{"code":"211302","name":"双塔区","cityCode":"2113","provinceCode":"21"},{"code":"211303","name":"龙城区","cityCode":"2113","provinceCode":"21"},{"code":"211321","name":"朝阳县","cityCode":"2113","provinceCode":"21"},{"code":"211322","name":"建平县","cityCode":"2113","provinceCode":"21"},{"code":"211324","name":"喀喇沁左翼蒙古族自治县","cityCode":"2113","provinceCode":"21"},{"code":"211381","name":"北票市","cityCode":"2113","provinceCode":"21"},{"code":"211382","name":"凌源市","cityCode":"2113","provinceCode":"21"},{"code":"211402","name":"连山区","cityCode":"2114","provinceCode":"21"},{"code":"211403","name":"龙港区","cityCode":"2114","provinceCode":"21"},{"code":"211404","name":"南票区","cityCode":"2114","provinceCode":"21"},{"code":"211421","name":"绥中县","cityCode":"2114","provinceCode":"21"},{"code":"211422","name":"建昌县","cityCode":"2114","provinceCode":"21"},{"code":"211481","name":"兴城市","cityCode":"2114","provinceCode":"21"},{"code":"220102","name":"南关区","cityCode":"2201","provinceCode":"22"},{"code":"220103","name":"宽城区","cityCode":"2201","provinceCode":"22"},{"code":"220104","name":"朝阳区","cityCode":"2201","provinceCode":"22"},{"code":"220105","name":"二道区","cityCode":"2201","provinceCode":"22"},{"code":"220106","name":"绿园区","cityCode":"2201","provinceCode":"22"},{"code":"220112","name":"双阳区","cityCode":"2201","provinceCode":"22"},{"code":"220113","name":"九台区","cityCode":"2201","provinceCode":"22"},{"code":"220122","name":"农安县","cityCode":"2201","provinceCode":"22"},{"code":"220182","name":"榆树市","cityCode":"2201","provinceCode":"22"},{"code":"220183","name":"德惠市","cityCode":"2201","provinceCode":"22"},{"code":"220202","name":"昌邑区","cityCode":"2202","provinceCode":"22"},{"code":"220203","name":"龙潭区","cityCode":"2202","provinceCode":"22"},{"code":"220204","name":"船营区","cityCode":"2202","provinceCode":"22"},{"code":"220211","name":"丰满区","cityCode":"2202","provinceCode":"22"},{"code":"220221","name":"永吉县","cityCode":"2202","provinceCode":"22"},{"code":"220281","name":"蛟河市","cityCode":"2202","provinceCode":"22"},{"code":"220282","name":"桦甸市","cityCode":"2202","provinceCode":"22"},{"code":"220283","name":"舒兰市","cityCode":"2202","provinceCode":"22"},{"code":"220284","name":"磐石市","cityCode":"2202","provinceCode":"22"},{"code":"220302","name":"铁西区","cityCode":"2203","provinceCode":"22"},{"code":"220303","name":"铁东区","cityCode":"2203","provinceCode":"22"},{"code":"220322","name":"梨树县","cityCode":"2203","provinceCode":"22"},{"code":"220323","name":"伊通满族自治县","cityCode":"2203","provinceCode":"22"},{"code":"220381","name":"公主岭市","cityCode":"2203","provinceCode":"22"},{"code":"220382","name":"双辽市","cityCode":"2203","provinceCode":"22"},{"code":"220402","name":"龙山区","cityCode":"2204","provinceCode":"22"},{"code":"220403","name":"西安区","cityCode":"2204","provinceCode":"22"},{"code":"220421","name":"东丰县","cityCode":"2204","provinceCode":"22"},{"code":"220422","name":"东辽县","cityCode":"2204","provinceCode":"22"},{"code":"220502","name":"东昌区","cityCode":"2205","provinceCode":"22"},{"code":"220503","name":"二道江区","cityCode":"2205","provinceCode":"22"},{"code":"220521","name":"通化县","cityCode":"2205","provinceCode":"22"},{"code":"220523","name":"辉南县","cityCode":"2205","provinceCode":"22"},{"code":"220524","name":"柳河县","cityCode":"2205","provinceCode":"22"},{"code":"220581","name":"梅河口市","cityCode":"2205","provinceCode":"22"},{"code":"220582","name":"集安市","cityCode":"2205","provinceCode":"22"},{"code":"220602","name":"浑江区","cityCode":"2206","provinceCode":"22"},{"code":"220605","name":"江源区","cityCode":"2206","provinceCode":"22"},{"code":"220621","name":"抚松县","cityCode":"2206","provinceCode":"22"},{"code":"220622","name":"靖宇县","cityCode":"2206","provinceCode":"22"},{"code":"220623","name":"长白朝鲜族自治县","cityCode":"2206","provinceCode":"22"},{"code":"220681","name":"临江市","cityCode":"2206","provinceCode":"22"},{"code":"220702","name":"宁江区","cityCode":"2207","provinceCode":"22"},{"code":"220721","name":"前郭尔罗斯蒙古族自治县","cityCode":"2207","provinceCode":"22"},{"code":"220722","name":"长岭县","cityCode":"2207","provinceCode":"22"},{"code":"220723","name":"乾安县","cityCode":"2207","provinceCode":"22"},{"code":"220781","name":"扶余市","cityCode":"2207","provinceCode":"22"},{"code":"220802","name":"洮北区","cityCode":"2208","provinceCode":"22"},{"code":"220821","name":"镇赉县","cityCode":"2208","provinceCode":"22"},{"code":"220822","name":"通榆县","cityCode":"2208","provinceCode":"22"},{"code":"220881","name":"洮南市","cityCode":"2208","provinceCode":"22"},{"code":"220882","name":"大安市","cityCode":"2208","provinceCode":"22"},{"code":"222401","name":"延吉市","cityCode":"2224","provinceCode":"22"},{"code":"222402","name":"图们市","cityCode":"2224","provinceCode":"22"},{"code":"222403","name":"敦化市","cityCode":"2224","provinceCode":"22"},{"code":"222404","name":"珲春市","cityCode":"2224","provinceCode":"22"},{"code":"222405","name":"龙井市","cityCode":"2224","provinceCode":"22"},{"code":"222406","name":"和龙市","cityCode":"2224","provinceCode":"22"},{"code":"222424","name":"汪清县","cityCode":"2224","provinceCode":"22"},{"code":"222426","name":"安图县","cityCode":"2224","provinceCode":"22"},{"code":"230102","name":"道里区","cityCode":"2301","provinceCode":"23"},{"code":"230103","name":"南岗区","cityCode":"2301","provinceCode":"23"},{"code":"230104","name":"道外区","cityCode":"2301","provinceCode":"23"},{"code":"230108","name":"平房区","cityCode":"2301","provinceCode":"23"},{"code":"230109","name":"松北区","cityCode":"2301","provinceCode":"23"},{"code":"230110","name":"香坊区","cityCode":"2301","provinceCode":"23"},{"code":"230111","name":"呼兰区","cityCode":"2301","provinceCode":"23"},{"code":"230112","name":"阿城区","cityCode":"2301","provinceCode":"23"},{"code":"230113","name":"双城区","cityCode":"2301","provinceCode":"23"},{"code":"230123","name":"依兰县","cityCode":"2301","provinceCode":"23"},{"code":"230124","name":"方正县","cityCode":"2301","provinceCode":"23"},{"code":"230125","name":"宾县","cityCode":"2301","provinceCode":"23"},{"code":"230126","name":"巴彦县","cityCode":"2301","provinceCode":"23"},{"code":"230127","name":"木兰县","cityCode":"2301","provinceCode":"23"},{"code":"230128","name":"通河县","cityCode":"2301","provinceCode":"23"},{"code":"230129","name":"延寿县","cityCode":"2301","provinceCode":"23"},{"code":"230183","name":"尚志市","cityCode":"2301","provinceCode":"23"},{"code":"230184","name":"五常市","cityCode":"2301","provinceCode":"23"},{"code":"230202","name":"龙沙区","cityCode":"2302","provinceCode":"23"},{"code":"230203","name":"建华区","cityCode":"2302","provinceCode":"23"},{"code":"230204","name":"铁锋区","cityCode":"2302","provinceCode":"23"},{"code":"230205","name":"昂昂溪区","cityCode":"2302","provinceCode":"23"},{"code":"230206","name":"富拉尔基区","cityCode":"2302","provinceCode":"23"},{"code":"230207","name":"碾子山区","cityCode":"2302","provinceCode":"23"},{"code":"230208","name":"梅里斯达斡尔族区","cityCode":"2302","provinceCode":"23"},{"code":"230221","name":"龙江县","cityCode":"2302","provinceCode":"23"},{"code":"230223","name":"依安县","cityCode":"2302","provinceCode":"23"},{"code":"230224","name":"泰来县","cityCode":"2302","provinceCode":"23"},{"code":"230225","name":"甘南县","cityCode":"2302","provinceCode":"23"},{"code":"230227","name":"富裕县","cityCode":"2302","provinceCode":"23"},{"code":"230229","name":"克山县","cityCode":"2302","provinceCode":"23"},{"code":"230230","name":"克东县","cityCode":"2302","provinceCode":"23"},{"code":"230231","name":"拜泉县","cityCode":"2302","provinceCode":"23"},{"code":"230281","name":"讷河市","cityCode":"2302","provinceCode":"23"},{"code":"230302","name":"鸡冠区","cityCode":"2303","provinceCode":"23"},{"code":"230303","name":"恒山区","cityCode":"2303","provinceCode":"23"},{"code":"230304","name":"滴道区","cityCode":"2303","provinceCode":"23"},{"code":"230305","name":"梨树区","cityCode":"2303","provinceCode":"23"},{"code":"230306","name":"城子河区","cityCode":"2303","provinceCode":"23"},{"code":"230307","name":"麻山区","cityCode":"2303","provinceCode":"23"},{"code":"230321","name":"鸡东县","cityCode":"2303","provinceCode":"23"},{"code":"230381","name":"虎林市","cityCode":"2303","provinceCode":"23"},{"code":"230382","name":"密山市","cityCode":"2303","provinceCode":"23"},{"code":"230402","name":"向阳区","cityCode":"2304","provinceCode":"23"},{"code":"230403","name":"工农区","cityCode":"2304","provinceCode":"23"},{"code":"230404","name":"南山区","cityCode":"2304","provinceCode":"23"},{"code":"230405","name":"兴安区","cityCode":"2304","provinceCode":"23"},{"code":"230406","name":"东山区","cityCode":"2304","provinceCode":"23"},{"code":"230407","name":"兴山区","cityCode":"2304","provinceCode":"23"},{"code":"230421","name":"萝北县","cityCode":"2304","provinceCode":"23"},{"code":"230422","name":"绥滨县","cityCode":"2304","provinceCode":"23"},{"code":"230502","name":"尖山区","cityCode":"2305","provinceCode":"23"},{"code":"230503","name":"岭东区","cityCode":"2305","provinceCode":"23"},{"code":"230505","name":"四方台区","cityCode":"2305","provinceCode":"23"},{"code":"230506","name":"宝山区","cityCode":"2305","provinceCode":"23"},{"code":"230521","name":"集贤县","cityCode":"2305","provinceCode":"23"},{"code":"230522","name":"友谊县","cityCode":"2305","provinceCode":"23"},{"code":"230523","name":"宝清县","cityCode":"2305","provinceCode":"23"},{"code":"230524","name":"饶河县","cityCode":"2305","provinceCode":"23"},{"code":"230602","name":"萨尔图区","cityCode":"2306","provinceCode":"23"},{"code":"230603","name":"龙凤区","cityCode":"2306","provinceCode":"23"},{"code":"230604","name":"让胡路区","cityCode":"2306","provinceCode":"23"},{"code":"230605","name":"红岗区","cityCode":"2306","provinceCode":"23"},{"code":"230606","name":"大同区","cityCode":"2306","provinceCode":"23"},{"code":"230621","name":"肇州县","cityCode":"2306","provinceCode":"23"},{"code":"230622","name":"肇源县","cityCode":"2306","provinceCode":"23"},{"code":"230623","name":"林甸县","cityCode":"2306","provinceCode":"23"},{"code":"230624","name":"杜尔伯特蒙古族自治县","cityCode":"2306","provinceCode":"23"},{"code":"230702","name":"伊春区","cityCode":"2307","provinceCode":"23"},{"code":"230703","name":"南岔区","cityCode":"2307","provinceCode":"23"},{"code":"230704","name":"友好区","cityCode":"2307","provinceCode":"23"},{"code":"230705","name":"西林区","cityCode":"2307","provinceCode":"23"},{"code":"230706","name":"翠峦区","cityCode":"2307","provinceCode":"23"},{"code":"230707","name":"新青区","cityCode":"2307","provinceCode":"23"},{"code":"230708","name":"美溪区","cityCode":"2307","provinceCode":"23"},{"code":"230709","name":"金山屯区","cityCode":"2307","provinceCode":"23"},{"code":"230710","name":"五营区","cityCode":"2307","provinceCode":"23"},{"code":"230711","name":"乌马河区","cityCode":"2307","provinceCode":"23"},{"code":"230712","name":"汤旺河区","cityCode":"2307","provinceCode":"23"},{"code":"230713","name":"带岭区","cityCode":"2307","provinceCode":"23"},{"code":"230714","name":"乌伊岭区","cityCode":"2307","provinceCode":"23"},{"code":"230715","name":"红星区","cityCode":"2307","provinceCode":"23"},{"code":"230716","name":"上甘岭区","cityCode":"2307","provinceCode":"23"},{"code":"230722","name":"嘉荫县","cityCode":"2307","provinceCode":"23"},{"code":"230781","name":"铁力市","cityCode":"2307","provinceCode":"23"},{"code":"230803","name":"向阳区","cityCode":"2308","provinceCode":"23"},{"code":"230804","name":"前进区","cityCode":"2308","provinceCode":"23"},{"code":"230805","name":"东风区","cityCode":"2308","provinceCode":"23"},{"code":"230811","name":"郊区","cityCode":"2308","provinceCode":"23"},{"code":"230822","name":"桦南县","cityCode":"2308","provinceCode":"23"},{"code":"230826","name":"桦川县","cityCode":"2308","provinceCode":"23"},{"code":"230828","name":"汤原县","cityCode":"2308","provinceCode":"23"},{"code":"230881","name":"同江市","cityCode":"2308","provinceCode":"23"},{"code":"230882","name":"富锦市","cityCode":"2308","provinceCode":"23"},{"code":"230883","name":"抚远市","cityCode":"2308","provinceCode":"23"},{"code":"230902","name":"新兴区","cityCode":"2309","provinceCode":"23"},{"code":"230903","name":"桃山区","cityCode":"2309","provinceCode":"23"},{"code":"230904","name":"茄子河区","cityCode":"2309","provinceCode":"23"},{"code":"230921","name":"勃利县","cityCode":"2309","provinceCode":"23"},{"code":"231002","name":"东安区","cityCode":"2310","provinceCode":"23"},{"code":"231003","name":"阳明区","cityCode":"2310","provinceCode":"23"},{"code":"231004","name":"爱民区","cityCode":"2310","provinceCode":"23"},{"code":"231005","name":"西安区","cityCode":"2310","provinceCode":"23"},{"code":"231025","name":"林口县","cityCode":"2310","provinceCode":"23"},{"code":"231081","name":"绥芬河市","cityCode":"2310","provinceCode":"23"},{"code":"231083","name":"海林市","cityCode":"2310","provinceCode":"23"},{"code":"231084","name":"宁安市","cityCode":"2310","provinceCode":"23"},{"code":"231085","name":"穆棱市","cityCode":"2310","provinceCode":"23"},{"code":"231086","name":"东宁市","cityCode":"2310","provinceCode":"23"},{"code":"231102","name":"爱辉区","cityCode":"2311","provinceCode":"23"},{"code":"231121","name":"嫩江县","cityCode":"2311","provinceCode":"23"},{"code":"231123","name":"逊克县","cityCode":"2311","provinceCode":"23"},{"code":"231124","name":"孙吴县","cityCode":"2311","provinceCode":"23"},{"code":"231181","name":"北安市","cityCode":"2311","provinceCode":"23"},{"code":"231182","name":"五大连池市","cityCode":"2311","provinceCode":"23"},{"code":"231202","name":"北林区","cityCode":"2312","provinceCode":"23"},{"code":"231221","name":"望奎县","cityCode":"2312","provinceCode":"23"},{"code":"231222","name":"兰西县","cityCode":"2312","provinceCode":"23"},{"code":"231223","name":"青冈县","cityCode":"2312","provinceCode":"23"},{"code":"231224","name":"庆安县","cityCode":"2312","provinceCode":"23"},{"code":"231225","name":"明水县","cityCode":"2312","provinceCode":"23"},{"code":"231226","name":"绥棱县","cityCode":"2312","provinceCode":"23"},{"code":"231281","name":"安达市","cityCode":"2312","provinceCode":"23"},{"code":"231282","name":"肇东市","cityCode":"2312","provinceCode":"23"},{"code":"231283","name":"海伦市","cityCode":"2312","provinceCode":"23"},{"code":"232721","name":"呼玛县","cityCode":"2327","provinceCode":"23"},{"code":"232722","name":"塔河县","cityCode":"2327","provinceCode":"23"},{"code":"232723","name":"漠河县","cityCode":"2327","provinceCode":"23"},{"code":"310101","name":"黄浦区","cityCode":"3101","provinceCode":"31"},{"code":"310104","name":"徐汇区","cityCode":"3101","provinceCode":"31"},{"code":"310105","name":"长宁区","cityCode":"3101","provinceCode":"31"},{"code":"310106","name":"静安区","cityCode":"3101","provinceCode":"31"},{"code":"310107","name":"普陀区","cityCode":"3101","provinceCode":"31"},{"code":"310109","name":"虹口区","cityCode":"3101","provinceCode":"31"},{"code":"310110","name":"杨浦区","cityCode":"3101","provinceCode":"31"},{"code":"310112","name":"闵行区","cityCode":"3101","provinceCode":"31"},{"code":"310113","name":"宝山区","cityCode":"3101","provinceCode":"31"},{"code":"310114","name":"嘉定区","cityCode":"3101","provinceCode":"31"},{"code":"310115","name":"浦东新区","cityCode":"3101","provinceCode":"31"},{"code":"310116","name":"金山区","cityCode":"3101","provinceCode":"31"},{"code":"310117","name":"松江区","cityCode":"3101","provinceCode":"31"},{"code":"310118","name":"青浦区","cityCode":"3101","provinceCode":"31"},{"code":"310120","name":"奉贤区","cityCode":"3101","provinceCode":"31"},{"code":"310151","name":"崇明区","cityCode":"3101","provinceCode":"31"},{"code":"320102","name":"玄武区","cityCode":"3201","provinceCode":"32"},{"code":"320104","name":"秦淮区","cityCode":"3201","provinceCode":"32"},{"code":"320105","name":"建邺区","cityCode":"3201","provinceCode":"32"},{"code":"320106","name":"鼓楼区","cityCode":"3201","provinceCode":"32"},{"code":"320111","name":"浦口区","cityCode":"3201","provinceCode":"32"},{"code":"320113","name":"栖霞区","cityCode":"3201","provinceCode":"32"},{"code":"320114","name":"雨花台区","cityCode":"3201","provinceCode":"32"},{"code":"320115","name":"江宁区","cityCode":"3201","provinceCode":"32"},{"code":"320116","name":"六合区","cityCode":"3201","provinceCode":"32"},{"code":"320117","name":"溧水区","cityCode":"3201","provinceCode":"32"},{"code":"320118","name":"高淳区","cityCode":"3201","provinceCode":"32"},{"code":"320205","name":"锡山区","cityCode":"3202","provinceCode":"32"},{"code":"320206","name":"惠山区","cityCode":"3202","provinceCode":"32"},{"code":"320211","name":"滨湖区","cityCode":"3202","provinceCode":"32"},{"code":"320213","name":"梁溪区","cityCode":"3202","provinceCode":"32"},{"code":"320214","name":"新吴区","cityCode":"3202","provinceCode":"32"},{"code":"320281","name":"江阴市","cityCode":"3202","provinceCode":"32"},{"code":"320282","name":"宜兴市","cityCode":"3202","provinceCode":"32"},{"code":"320302","name":"鼓楼区","cityCode":"3203","provinceCode":"32"},{"code":"320303","name":"云龙区","cityCode":"3203","provinceCode":"32"},{"code":"320305","name":"贾汪区","cityCode":"3203","provinceCode":"32"},{"code":"320311","name":"泉山区","cityCode":"3203","provinceCode":"32"},{"code":"320312","name":"铜山区","cityCode":"3203","provinceCode":"32"},{"code":"320321","name":"丰县","cityCode":"3203","provinceCode":"32"},{"code":"320322","name":"沛县","cityCode":"3203","provinceCode":"32"},{"code":"320324","name":"睢宁县","cityCode":"3203","provinceCode":"32"},{"code":"320381","name":"新沂市","cityCode":"3203","provinceCode":"32"},{"code":"320382","name":"邳州市","cityCode":"3203","provinceCode":"32"},{"code":"320402","name":"天宁区","cityCode":"3204","provinceCode":"32"},{"code":"320404","name":"钟楼区","cityCode":"3204","provinceCode":"32"},{"code":"320411","name":"新北区","cityCode":"3204","provinceCode":"32"},{"code":"320412","name":"武进区","cityCode":"3204","provinceCode":"32"},{"code":"320413","name":"金坛区","cityCode":"3204","provinceCode":"32"},{"code":"320481","name":"溧阳市","cityCode":"3204","provinceCode":"32"},{"code":"320505","name":"虎丘区","cityCode":"3205","provinceCode":"32"},{"code":"320506","name":"吴中区","cityCode":"3205","provinceCode":"32"},{"code":"320507","name":"相城区","cityCode":"3205","provinceCode":"32"},{"code":"320508","name":"姑苏区","cityCode":"3205","provinceCode":"32"},{"code":"320509","name":"吴江区","cityCode":"3205","provinceCode":"32"},{"code":"320581","name":"常熟市","cityCode":"3205","provinceCode":"32"},{"code":"320582","name":"张家港市","cityCode":"3205","provinceCode":"32"},{"code":"320583","name":"昆山市","cityCode":"3205","provinceCode":"32"},{"code":"320585","name":"太仓市","cityCode":"3205","provinceCode":"32"},{"code":"320602","name":"崇川区","cityCode":"3206","provinceCode":"32"},{"code":"320611","name":"港闸区","cityCode":"3206","provinceCode":"32"},{"code":"320612","name":"通州区","cityCode":"3206","provinceCode":"32"},{"code":"320621","name":"海安县","cityCode":"3206","provinceCode":"32"},{"code":"320623","name":"如东县","cityCode":"3206","provinceCode":"32"},{"code":"320681","name":"启东市","cityCode":"3206","provinceCode":"32"},{"code":"320682","name":"如皋市","cityCode":"3206","provinceCode":"32"},{"code":"320684","name":"海门市","cityCode":"3206","provinceCode":"32"},{"code":"320703","name":"连云区","cityCode":"3207","provinceCode":"32"},{"code":"320706","name":"海州区","cityCode":"3207","provinceCode":"32"},{"code":"320707","name":"赣榆区","cityCode":"3207","provinceCode":"32"},{"code":"320722","name":"东海县","cityCode":"3207","provinceCode":"32"},{"code":"320723","name":"灌云县","cityCode":"3207","provinceCode":"32"},{"code":"320724","name":"灌南县","cityCode":"3207","provinceCode":"32"},{"code":"320803","name":"淮安区","cityCode":"3208","provinceCode":"32"},{"code":"320804","name":"淮阴区","cityCode":"3208","provinceCode":"32"},{"code":"320812","name":"清江浦区","cityCode":"3208","provinceCode":"32"},{"code":"320813","name":"洪泽区","cityCode":"3208","provinceCode":"32"},{"code":"320826","name":"涟水县","cityCode":"3208","provinceCode":"32"},{"code":"320830","name":"盱眙县","cityCode":"3208","provinceCode":"32"},{"code":"320831","name":"金湖县","cityCode":"3208","provinceCode":"32"},{"code":"320902","name":"亭湖区","cityCode":"3209","provinceCode":"32"},{"code":"320903","name":"盐都区","cityCode":"3209","provinceCode":"32"},{"code":"320904","name":"大丰区","cityCode":"3209","provinceCode":"32"},{"code":"320921","name":"响水县","cityCode":"3209","provinceCode":"32"},{"code":"320922","name":"滨海县","cityCode":"3209","provinceCode":"32"},{"code":"320923","name":"阜宁县","cityCode":"3209","provinceCode":"32"},{"code":"320924","name":"射阳县","cityCode":"3209","provinceCode":"32"},{"code":"320925","name":"建湖县","cityCode":"3209","provinceCode":"32"},{"code":"320981","name":"东台市","cityCode":"3209","provinceCode":"32"},{"code":"321002","name":"广陵区","cityCode":"3210","provinceCode":"32"},{"code":"321003","name":"邗江区","cityCode":"3210","provinceCode":"32"},{"code":"321012","name":"江都区","cityCode":"3210","provinceCode":"32"},{"code":"321023","name":"宝应县","cityCode":"3210","provinceCode":"32"},{"code":"321081","name":"仪征市","cityCode":"3210","provinceCode":"32"},{"code":"321084","name":"高邮市","cityCode":"3210","provinceCode":"32"},{"code":"321102","name":"京口区","cityCode":"3211","provinceCode":"32"},{"code":"321111","name":"润州区","cityCode":"3211","provinceCode":"32"},{"code":"321112","name":"丹徒区","cityCode":"3211","provinceCode":"32"},{"code":"321181","name":"丹阳市","cityCode":"3211","provinceCode":"32"},{"code":"321182","name":"扬中市","cityCode":"3211","provinceCode":"32"},{"code":"321183","name":"句容市","cityCode":"3211","provinceCode":"32"},{"code":"321202","name":"海陵区","cityCode":"3212","provinceCode":"32"},{"code":"321203","name":"高港区","cityCode":"3212","provinceCode":"32"},{"code":"321204","name":"姜堰区","cityCode":"3212","provinceCode":"32"},{"code":"321281","name":"兴化市","cityCode":"3212","provinceCode":"32"},{"code":"321282","name":"靖江市","cityCode":"3212","provinceCode":"32"},{"code":"321283","name":"泰兴市","cityCode":"3212","provinceCode":"32"},{"code":"321302","name":"宿城区","cityCode":"3213","provinceCode":"32"},{"code":"321311","name":"宿豫区","cityCode":"3213","provinceCode":"32"},{"code":"321322","name":"沭阳县","cityCode":"3213","provinceCode":"32"},{"code":"321323","name":"泗阳县","cityCode":"3213","provinceCode":"32"},{"code":"321324","name":"泗洪县","cityCode":"3213","provinceCode":"32"},{"code":"330102","name":"上城区","cityCode":"3301","provinceCode":"33"},{"code":"330103","name":"下城区","cityCode":"3301","provinceCode":"33"},{"code":"330104","name":"江干区","cityCode":"3301","provinceCode":"33"},{"code":"330105","name":"拱墅区","cityCode":"3301","provinceCode":"33"},{"code":"330106","name":"西湖区","cityCode":"3301","provinceCode":"33"},{"code":"330108","name":"滨江区","cityCode":"3301","provinceCode":"33"},{"code":"330109","name":"萧山区","cityCode":"3301","provinceCode":"33"},{"code":"330110","name":"余杭区","cityCode":"3301","provinceCode":"33"},{"code":"330111","name":"富阳区","cityCode":"3301","provinceCode":"33"},{"code":"330122","name":"桐庐县","cityCode":"3301","provinceCode":"33"},{"code":"330127","name":"淳安县","cityCode":"3301","provinceCode":"33"},{"code":"330182","name":"建德市","cityCode":"3301","provinceCode":"33"},{"code":"330185","name":"临安市","cityCode":"3301","provinceCode":"33"},{"code":"330203","name":"海曙区","cityCode":"3302","provinceCode":"33"},{"code":"330204","name":"江东区","cityCode":"3302","provinceCode":"33"},{"code":"330205","name":"江北区","cityCode":"3302","provinceCode":"33"},{"code":"330206","name":"北仑区","cityCode":"3302","provinceCode":"33"},{"code":"330211","name":"镇海区","cityCode":"3302","provinceCode":"33"},{"code":"330212","name":"鄞州区","cityCode":"3302","provinceCode":"33"},{"code":"330225","name":"象山县","cityCode":"3302","provinceCode":"33"},{"code":"330226","name":"宁海县","cityCode":"3302","provinceCode":"33"},{"code":"330281","name":"余姚市","cityCode":"3302","provinceCode":"33"},{"code":"330282","name":"慈溪市","cityCode":"3302","provinceCode":"33"},{"code":"330283","name":"奉化市","cityCode":"3302","provinceCode":"33"},{"code":"330302","name":"鹿城区","cityCode":"3303","provinceCode":"33"},{"code":"330303","name":"龙湾区","cityCode":"3303","provinceCode":"33"},{"code":"330304","name":"瓯海区","cityCode":"3303","provinceCode":"33"},{"code":"330305","name":"洞头区","cityCode":"3303","provinceCode":"33"},{"code":"330324","name":"永嘉县","cityCode":"3303","provinceCode":"33"},{"code":"330326","name":"平阳县","cityCode":"3303","provinceCode":"33"},{"code":"330327","name":"苍南县","cityCode":"3303","provinceCode":"33"},{"code":"330328","name":"文成县","cityCode":"3303","provinceCode":"33"},{"code":"330329","name":"泰顺县","cityCode":"3303","provinceCode":"33"},{"code":"330381","name":"瑞安市","cityCode":"3303","provinceCode":"33"},{"code":"330382","name":"乐清市","cityCode":"3303","provinceCode":"33"},{"code":"330402","name":"南湖区","cityCode":"3304","provinceCode":"33"},{"code":"330411","name":"秀洲区","cityCode":"3304","provinceCode":"33"},{"code":"330421","name":"嘉善县","cityCode":"3304","provinceCode":"33"},{"code":"330424","name":"海盐县","cityCode":"3304","provinceCode":"33"},{"code":"330481","name":"海宁市","cityCode":"3304","provinceCode":"33"},{"code":"330482","name":"平湖市","cityCode":"3304","provinceCode":"33"},{"code":"330483","name":"桐乡市","cityCode":"3304","provinceCode":"33"},{"code":"330502","name":"吴兴区","cityCode":"3305","provinceCode":"33"},{"code":"330503","name":"南浔区","cityCode":"3305","provinceCode":"33"},{"code":"330521","name":"德清县","cityCode":"3305","provinceCode":"33"},{"code":"330522","name":"长兴县","cityCode":"3305","provinceCode":"33"},{"code":"330523","name":"安吉县","cityCode":"3305","provinceCode":"33"},{"code":"330602","name":"越城区","cityCode":"3306","provinceCode":"33"},{"code":"330603","name":"柯桥区","cityCode":"3306","provinceCode":"33"},{"code":"330604","name":"上虞区","cityCode":"3306","provinceCode":"33"},{"code":"330624","name":"新昌县","cityCode":"3306","provinceCode":"33"},{"code":"330681","name":"诸暨市","cityCode":"3306","provinceCode":"33"},{"code":"330683","name":"嵊州市","cityCode":"3306","provinceCode":"33"},{"code":"330702","name":"婺城区","cityCode":"3307","provinceCode":"33"},{"code":"330703","name":"金东区","cityCode":"3307","provinceCode":"33"},{"code":"330723","name":"武义县","cityCode":"3307","provinceCode":"33"},{"code":"330726","name":"浦江县","cityCode":"3307","provinceCode":"33"},{"code":"330727","name":"磐安县","cityCode":"3307","provinceCode":"33"},{"code":"330781","name":"兰溪市","cityCode":"3307","provinceCode":"33"},{"code":"330782","name":"义乌市","cityCode":"3307","provinceCode":"33"},{"code":"330783","name":"东阳市","cityCode":"3307","provinceCode":"33"},{"code":"330784","name":"永康市","cityCode":"3307","provinceCode":"33"},{"code":"330802","name":"柯城区","cityCode":"3308","provinceCode":"33"},{"code":"330803","name":"衢江区","cityCode":"3308","provinceCode":"33"},{"code":"330822","name":"常山县","cityCode":"3308","provinceCode":"33"},{"code":"330824","name":"开化县","cityCode":"3308","provinceCode":"33"},{"code":"330825","name":"龙游县","cityCode":"3308","provinceCode":"33"},{"code":"330881","name":"江山市","cityCode":"3308","provinceCode":"33"},{"code":"330902","name":"定海区","cityCode":"3309","provinceCode":"33"},{"code":"330903","name":"普陀区","cityCode":"3309","provinceCode":"33"},{"code":"330921","name":"岱山县","cityCode":"3309","provinceCode":"33"},{"code":"330922","name":"嵊泗县","cityCode":"3309","provinceCode":"33"},{"code":"331002","name":"椒江区","cityCode":"3310","provinceCode":"33"},{"code":"331003","name":"黄岩区","cityCode":"3310","provinceCode":"33"},{"code":"331004","name":"路桥区","cityCode":"3310","provinceCode":"33"},{"code":"331021","name":"玉环县","cityCode":"3310","provinceCode":"33"},{"code":"331022","name":"三门县","cityCode":"3310","provinceCode":"33"},{"code":"331023","name":"天台县","cityCode":"3310","provinceCode":"33"},{"code":"331024","name":"仙居县","cityCode":"3310","provinceCode":"33"},{"code":"331081","name":"温岭市","cityCode":"3310","provinceCode":"33"},{"code":"331082","name":"临海市","cityCode":"3310","provinceCode":"33"},{"code":"331102","name":"莲都区","cityCode":"3311","provinceCode":"33"},{"code":"331121","name":"青田县","cityCode":"3311","provinceCode":"33"},{"code":"331122","name":"缙云县","cityCode":"3311","provinceCode":"33"},{"code":"331123","name":"遂昌县","cityCode":"3311","provinceCode":"33"},{"code":"331124","name":"松阳县","cityCode":"3311","provinceCode":"33"},{"code":"331125","name":"云和县","cityCode":"3311","provinceCode":"33"},{"code":"331126","name":"庆元县","cityCode":"3311","provinceCode":"33"},{"code":"331127","name":"景宁畲族自治县","cityCode":"3311","provinceCode":"33"},{"code":"331181","name":"龙泉市","cityCode":"3311","provinceCode":"33"},{"code":"340102","name":"瑶海区","cityCode":"3401","provinceCode":"34"},{"code":"340103","name":"庐阳区","cityCode":"3401","provinceCode":"34"},{"code":"340104","name":"蜀山区","cityCode":"3401","provinceCode":"34"},{"code":"340111","name":"包河区","cityCode":"3401","provinceCode":"34"},{"code":"340121","name":"长丰县","cityCode":"3401","provinceCode":"34"},{"code":"340122","name":"肥东县","cityCode":"3401","provinceCode":"34"},{"code":"340123","name":"肥西县","cityCode":"3401","provinceCode":"34"},{"code":"340124","name":"庐江县","cityCode":"3401","provinceCode":"34"},{"code":"340181","name":"巢湖市","cityCode":"3401","provinceCode":"34"},{"code":"340202","name":"镜湖区","cityCode":"3402","provinceCode":"34"},{"code":"340203","name":"弋江区","cityCode":"3402","provinceCode":"34"},{"code":"340207","name":"鸠江区","cityCode":"3402","provinceCode":"34"},{"code":"340208","name":"三山区","cityCode":"3402","provinceCode":"34"},{"code":"340221","name":"芜湖县","cityCode":"3402","provinceCode":"34"},{"code":"340222","name":"繁昌县","cityCode":"3402","provinceCode":"34"},{"code":"340223","name":"南陵县","cityCode":"3402","provinceCode":"34"},{"code":"340225","name":"无为县","cityCode":"3402","provinceCode":"34"},{"code":"340302","name":"龙子湖区","cityCode":"3403","provinceCode":"34"},{"code":"340303","name":"蚌山区","cityCode":"3403","provinceCode":"34"},{"code":"340304","name":"禹会区","cityCode":"3403","provinceCode":"34"},{"code":"340311","name":"淮上区","cityCode":"3403","provinceCode":"34"},{"code":"340321","name":"怀远县","cityCode":"3403","provinceCode":"34"},{"code":"340322","name":"五河县","cityCode":"3403","provinceCode":"34"},{"code":"340323","name":"固镇县","cityCode":"3403","provinceCode":"34"},{"code":"340402","name":"大通区","cityCode":"3404","provinceCode":"34"},{"code":"340403","name":"田家庵区","cityCode":"3404","provinceCode":"34"},{"code":"340404","name":"谢家集区","cityCode":"3404","provinceCode":"34"},{"code":"340405","name":"八公山区","cityCode":"3404","provinceCode":"34"},{"code":"340406","name":"潘集区","cityCode":"3404","provinceCode":"34"},{"code":"340421","name":"凤台县","cityCode":"3404","provinceCode":"34"},{"code":"340422","name":"寿县","cityCode":"3404","provinceCode":"34"},{"code":"340503","name":"花山区","cityCode":"3405","provinceCode":"34"},{"code":"340504","name":"雨山区","cityCode":"3405","provinceCode":"34"},{"code":"340506","name":"博望区","cityCode":"3405","provinceCode":"34"},{"code":"340521","name":"当涂县","cityCode":"3405","provinceCode":"34"},{"code":"340522","name":"含山县","cityCode":"3405","provinceCode":"34"},{"code":"340523","name":"和县","cityCode":"3405","provinceCode":"34"},{"code":"340602","name":"杜集区","cityCode":"3406","provinceCode":"34"},{"code":"340603","name":"相山区","cityCode":"3406","provinceCode":"34"},{"code":"340604","name":"烈山区","cityCode":"3406","provinceCode":"34"},{"code":"340621","name":"濉溪县","cityCode":"3406","provinceCode":"34"},{"code":"340705","name":"铜官区","cityCode":"3407","provinceCode":"34"},{"code":"340706","name":"义安区","cityCode":"3407","provinceCode":"34"},{"code":"340711","name":"郊区","cityCode":"3407","provinceCode":"34"},{"code":"340722","name":"枞阳县","cityCode":"3407","provinceCode":"34"},{"code":"340802","name":"迎江区","cityCode":"3408","provinceCode":"34"},{"code":"340803","name":"大观区","cityCode":"3408","provinceCode":"34"},{"code":"340811","name":"宜秀区","cityCode":"3408","provinceCode":"34"},{"code":"340822","name":"怀宁县","cityCode":"3408","provinceCode":"34"},{"code":"340824","name":"潜山县","cityCode":"3408","provinceCode":"34"},{"code":"340825","name":"太湖县","cityCode":"3408","provinceCode":"34"},{"code":"340826","name":"宿松县","cityCode":"3408","provinceCode":"34"},{"code":"340827","name":"望江县","cityCode":"3408","provinceCode":"34"},{"code":"340828","name":"岳西县","cityCode":"3408","provinceCode":"34"},{"code":"340881","name":"桐城市","cityCode":"3408","provinceCode":"34"},{"code":"341002","name":"屯溪区","cityCode":"3410","provinceCode":"34"},{"code":"341003","name":"黄山区","cityCode":"3410","provinceCode":"34"},{"code":"341004","name":"徽州区","cityCode":"3410","provinceCode":"34"},{"code":"341021","name":"歙县","cityCode":"3410","provinceCode":"34"},{"code":"341022","name":"休宁县","cityCode":"3410","provinceCode":"34"},{"code":"341023","name":"黟县","cityCode":"3410","provinceCode":"34"},{"code":"341024","name":"祁门县","cityCode":"3410","provinceCode":"34"},{"code":"341102","name":"琅琊区","cityCode":"3411","provinceCode":"34"},{"code":"341103","name":"南谯区","cityCode":"3411","provinceCode":"34"},{"code":"341122","name":"来安县","cityCode":"3411","provinceCode":"34"},{"code":"341124","name":"全椒县","cityCode":"3411","provinceCode":"34"},{"code":"341125","name":"定远县","cityCode":"3411","provinceCode":"34"},{"code":"341126","name":"凤阳县","cityCode":"3411","provinceCode":"34"},{"code":"341181","name":"天长市","cityCode":"3411","provinceCode":"34"},{"code":"341182","name":"明光市","cityCode":"3411","provinceCode":"34"},{"code":"341202","name":"颍州区","cityCode":"3412","provinceCode":"34"},{"code":"341203","name":"颍东区","cityCode":"3412","provinceCode":"34"},{"code":"341204","name":"颍泉区","cityCode":"3412","provinceCode":"34"},{"code":"341221","name":"临泉县","cityCode":"3412","provinceCode":"34"},{"code":"341222","name":"太和县","cityCode":"3412","provinceCode":"34"},{"code":"341225","name":"阜南县","cityCode":"3412","provinceCode":"34"},{"code":"341226","name":"颍上县","cityCode":"3412","provinceCode":"34"},{"code":"341282","name":"界首市","cityCode":"3412","provinceCode":"34"},{"code":"341302","name":"埇桥区","cityCode":"3413","provinceCode":"34"},{"code":"341321","name":"砀山县","cityCode":"3413","provinceCode":"34"},{"code":"341322","name":"萧县","cityCode":"3413","provinceCode":"34"},{"code":"341323","name":"灵璧县","cityCode":"3413","provinceCode":"34"},{"code":"341324","name":"泗县","cityCode":"3413","provinceCode":"34"},{"code":"341502","name":"金安区","cityCode":"3415","provinceCode":"34"},{"code":"341503","name":"裕安区","cityCode":"3415","provinceCode":"34"},{"code":"341504","name":"叶集区","cityCode":"3415","provinceCode":"34"},{"code":"341522","name":"霍邱县","cityCode":"3415","provinceCode":"34"},{"code":"341523","name":"舒城县","cityCode":"3415","provinceCode":"34"},{"code":"341524","name":"金寨县","cityCode":"3415","provinceCode":"34"},{"code":"341525","name":"霍山县","cityCode":"3415","provinceCode":"34"},{"code":"341602","name":"谯城区","cityCode":"3416","provinceCode":"34"},{"code":"341621","name":"涡阳县","cityCode":"3416","provinceCode":"34"},{"code":"341622","name":"蒙城县","cityCode":"3416","provinceCode":"34"},{"code":"341623","name":"利辛县","cityCode":"3416","provinceCode":"34"},{"code":"341702","name":"贵池区","cityCode":"3417","provinceCode":"34"},{"code":"341721","name":"东至县","cityCode":"3417","provinceCode":"34"},{"code":"341722","name":"石台县","cityCode":"3417","provinceCode":"34"},{"code":"341723","name":"青阳县","cityCode":"3417","provinceCode":"34"},{"code":"341802","name":"宣州区","cityCode":"3418","provinceCode":"34"},{"code":"341821","name":"郎溪县","cityCode":"3418","provinceCode":"34"},{"code":"341822","name":"广德县","cityCode":"3418","provinceCode":"34"},{"code":"341823","name":"泾县","cityCode":"3418","provinceCode":"34"},{"code":"341824","name":"绩溪县","cityCode":"3418","provinceCode":"34"},{"code":"341825","name":"旌德县","cityCode":"3418","provinceCode":"34"},{"code":"341881","name":"宁国市","cityCode":"3418","provinceCode":"34"},{"code":"350102","name":"鼓楼区","cityCode":"3501","provinceCode":"35"},{"code":"350103","name":"台江区","cityCode":"3501","provinceCode":"35"},{"code":"350104","name":"仓山区","cityCode":"3501","provinceCode":"35"},{"code":"350105","name":"马尾区","cityCode":"3501","provinceCode":"35"},{"code":"350111","name":"晋安区","cityCode":"3501","provinceCode":"35"},{"code":"350121","name":"闽侯县","cityCode":"3501","provinceCode":"35"},{"code":"350122","name":"连江县","cityCode":"3501","provinceCode":"35"},{"code":"350123","name":"罗源县","cityCode":"3501","provinceCode":"35"},{"code":"350124","name":"闽清县","cityCode":"3501","provinceCode":"35"},{"code":"350125","name":"永泰县","cityCode":"3501","provinceCode":"35"},{"code":"350128","name":"平潭县","cityCode":"3501","provinceCode":"35"},{"code":"350181","name":"福清市","cityCode":"3501","provinceCode":"35"},{"code":"350182","name":"长乐市","cityCode":"3501","provinceCode":"35"},{"code":"350203","name":"思明区","cityCode":"3502","provinceCode":"35"},{"code":"350205","name":"海沧区","cityCode":"3502","provinceCode":"35"},{"code":"350206","name":"湖里区","cityCode":"3502","provinceCode":"35"},{"code":"350211","name":"集美区","cityCode":"3502","provinceCode":"35"},{"code":"350212","name":"同安区","cityCode":"3502","provinceCode":"35"},{"code":"350213","name":"翔安区","cityCode":"3502","provinceCode":"35"},{"code":"350302","name":"城厢区","cityCode":"3503","provinceCode":"35"},{"code":"350303","name":"涵江区","cityCode":"3503","provinceCode":"35"},{"code":"350304","name":"荔城区","cityCode":"3503","provinceCode":"35"},{"code":"350305","name":"秀屿区","cityCode":"3503","provinceCode":"35"},{"code":"350322","name":"仙游县","cityCode":"3503","provinceCode":"35"},{"code":"350402","name":"梅列区","cityCode":"3504","provinceCode":"35"},{"code":"350403","name":"三元区","cityCode":"3504","provinceCode":"35"},{"code":"350421","name":"明溪县","cityCode":"3504","provinceCode":"35"},{"code":"350423","name":"清流县","cityCode":"3504","provinceCode":"35"},{"code":"350424","name":"宁化县","cityCode":"3504","provinceCode":"35"},{"code":"350425","name":"大田县","cityCode":"3504","provinceCode":"35"},{"code":"350426","name":"尤溪县","cityCode":"3504","provinceCode":"35"},{"code":"350427","name":"沙县","cityCode":"3504","provinceCode":"35"},{"code":"350428","name":"将乐县","cityCode":"3504","provinceCode":"35"},{"code":"350429","name":"泰宁县","cityCode":"3504","provinceCode":"35"},{"code":"350430","name":"建宁县","cityCode":"3504","provinceCode":"35"},{"code":"350481","name":"永安市","cityCode":"3504","provinceCode":"35"},{"code":"350502","name":"鲤城区","cityCode":"3505","provinceCode":"35"},{"code":"350503","name":"丰泽区","cityCode":"3505","provinceCode":"35"},{"code":"350504","name":"洛江区","cityCode":"3505","provinceCode":"35"},{"code":"350505","name":"泉港区","cityCode":"3505","provinceCode":"35"},{"code":"350521","name":"惠安县","cityCode":"3505","provinceCode":"35"},{"code":"350524","name":"安溪县","cityCode":"3505","provinceCode":"35"},{"code":"350525","name":"永春县","cityCode":"3505","provinceCode":"35"},{"code":"350526","name":"德化县","cityCode":"3505","provinceCode":"35"},{"code":"350527","name":"金门县","cityCode":"3505","provinceCode":"35"},{"code":"350581","name":"石狮市","cityCode":"3505","provinceCode":"35"},{"code":"350582","name":"晋江市","cityCode":"3505","provinceCode":"35"},{"code":"350583","name":"南安市","cityCode":"3505","provinceCode":"35"},{"code":"350602","name":"芗城区","cityCode":"3506","provinceCode":"35"},{"code":"350603","name":"龙文区","cityCode":"3506","provinceCode":"35"},{"code":"350622","name":"云霄县","cityCode":"3506","provinceCode":"35"},{"code":"350623","name":"漳浦县","cityCode":"3506","provinceCode":"35"},{"code":"350624","name":"诏安县","cityCode":"3506","provinceCode":"35"},{"code":"350625","name":"长泰县","cityCode":"3506","provinceCode":"35"},{"code":"350626","name":"东山县","cityCode":"3506","provinceCode":"35"},{"code":"350627","name":"南靖县","cityCode":"3506","provinceCode":"35"},{"code":"350628","name":"平和县","cityCode":"3506","provinceCode":"35"},{"code":"350629","name":"华安县","cityCode":"3506","provinceCode":"35"},{"code":"350681","name":"龙海市","cityCode":"3506","provinceCode":"35"},{"code":"350702","name":"延平区","cityCode":"3507","provinceCode":"35"},{"code":"350703","name":"建阳区","cityCode":"3507","provinceCode":"35"},{"code":"350721","name":"顺昌县","cityCode":"3507","provinceCode":"35"},{"code":"350722","name":"浦城县","cityCode":"3507","provinceCode":"35"},{"code":"350723","name":"光泽县","cityCode":"3507","provinceCode":"35"},{"code":"350724","name":"松溪县","cityCode":"3507","provinceCode":"35"},{"code":"350725","name":"政和县","cityCode":"3507","provinceCode":"35"},{"code":"350781","name":"邵武市","cityCode":"3507","provinceCode":"35"},{"code":"350782","name":"武夷山市","cityCode":"3507","provinceCode":"35"},{"code":"350783","name":"建瓯市","cityCode":"3507","provinceCode":"35"},{"code":"350802","name":"新罗区","cityCode":"3508","provinceCode":"35"},{"code":"350803","name":"永定区","cityCode":"3508","provinceCode":"35"},{"code":"350821","name":"长汀县","cityCode":"3508","provinceCode":"35"},{"code":"350823","name":"上杭县","cityCode":"3508","provinceCode":"35"},{"code":"350824","name":"武平县","cityCode":"3508","provinceCode":"35"},{"code":"350825","name":"连城县","cityCode":"3508","provinceCode":"35"},{"code":"350881","name":"漳平市","cityCode":"3508","provinceCode":"35"},{"code":"350902","name":"蕉城区","cityCode":"3509","provinceCode":"35"},{"code":"350921","name":"霞浦县","cityCode":"3509","provinceCode":"35"},{"code":"350922","name":"古田县","cityCode":"3509","provinceCode":"35"},{"code":"350923","name":"屏南县","cityCode":"3509","provinceCode":"35"},{"code":"350924","name":"寿宁县","cityCode":"3509","provinceCode":"35"},{"code":"350925","name":"周宁县","cityCode":"3509","provinceCode":"35"},{"code":"350926","name":"柘荣县","cityCode":"3509","provinceCode":"35"},{"code":"350981","name":"福安市","cityCode":"3509","provinceCode":"35"},{"code":"350982","name":"福鼎市","cityCode":"3509","provinceCode":"35"},{"code":"360102","name":"东湖区","cityCode":"3601","provinceCode":"36"},{"code":"360103","name":"西湖区","cityCode":"3601","provinceCode":"36"},{"code":"360104","name":"青云谱区","cityCode":"3601","provinceCode":"36"},{"code":"360105","name":"湾里区","cityCode":"3601","provinceCode":"36"},{"code":"360111","name":"青山湖区","cityCode":"3601","provinceCode":"36"},{"code":"360112","name":"新建区","cityCode":"3601","provinceCode":"36"},{"code":"360121","name":"南昌县","cityCode":"3601","provinceCode":"36"},{"code":"360123","name":"安义县","cityCode":"3601","provinceCode":"36"},{"code":"360124","name":"进贤县","cityCode":"3601","provinceCode":"36"},{"code":"360202","name":"昌江区","cityCode":"3602","provinceCode":"36"},{"code":"360203","name":"珠山区","cityCode":"3602","provinceCode":"36"},{"code":"360222","name":"浮梁县","cityCode":"3602","provinceCode":"36"},{"code":"360281","name":"乐平市","cityCode":"3602","provinceCode":"36"},{"code":"360302","name":"安源区","cityCode":"3603","provinceCode":"36"},{"code":"360313","name":"湘东区","cityCode":"3603","provinceCode":"36"},{"code":"360321","name":"莲花县","cityCode":"3603","provinceCode":"36"},{"code":"360322","name":"上栗县","cityCode":"3603","provinceCode":"36"},{"code":"360323","name":"芦溪县","cityCode":"3603","provinceCode":"36"},{"code":"360402","name":"濂溪区","cityCode":"3604","provinceCode":"36"},{"code":"360403","name":"浔阳区","cityCode":"3604","provinceCode":"36"},{"code":"360421","name":"九江县","cityCode":"3604","provinceCode":"36"},{"code":"360423","name":"武宁县","cityCode":"3604","provinceCode":"36"},{"code":"360424","name":"修水县","cityCode":"3604","provinceCode":"36"},{"code":"360425","name":"永修县","cityCode":"3604","provinceCode":"36"},{"code":"360426","name":"德安县","cityCode":"3604","provinceCode":"36"},{"code":"360428","name":"都昌县","cityCode":"3604","provinceCode":"36"},{"code":"360429","name":"湖口县","cityCode":"3604","provinceCode":"36"},{"code":"360430","name":"彭泽县","cityCode":"3604","provinceCode":"36"},{"code":"360481","name":"瑞昌市","cityCode":"3604","provinceCode":"36"},{"code":"360482","name":"共青城市","cityCode":"3604","provinceCode":"36"},{"code":"360483","name":"庐山市","cityCode":"3604","provinceCode":"36"},{"code":"360502","name":"渝水区","cityCode":"3605","provinceCode":"36"},{"code":"360521","name":"分宜县","cityCode":"3605","provinceCode":"36"},{"code":"360602","name":"月湖区","cityCode":"3606","provinceCode":"36"},{"code":"360622","name":"余江县","cityCode":"3606","provinceCode":"36"},{"code":"360681","name":"贵溪市","cityCode":"3606","provinceCode":"36"},{"code":"360702","name":"章贡区","cityCode":"3607","provinceCode":"36"},{"code":"360703","name":"南康区","cityCode":"3607","provinceCode":"36"},{"code":"360721","name":"赣县","cityCode":"3607","provinceCode":"36"},{"code":"360722","name":"信丰县","cityCode":"3607","provinceCode":"36"},{"code":"360723","name":"大余县","cityCode":"3607","provinceCode":"36"},{"code":"360724","name":"上犹县","cityCode":"3607","provinceCode":"36"},{"code":"360725","name":"崇义县","cityCode":"3607","provinceCode":"36"},{"code":"360726","name":"安远县","cityCode":"3607","provinceCode":"36"},{"code":"360727","name":"龙南县","cityCode":"3607","provinceCode":"36"},{"code":"360728","name":"定南县","cityCode":"3607","provinceCode":"36"},{"code":"360729","name":"全南县","cityCode":"3607","provinceCode":"36"},{"code":"360730","name":"宁都县","cityCode":"3607","provinceCode":"36"},{"code":"360731","name":"于都县","cityCode":"3607","provinceCode":"36"},{"code":"360732","name":"兴国县","cityCode":"3607","provinceCode":"36"},{"code":"360733","name":"会昌县","cityCode":"3607","provinceCode":"36"},{"code":"360734","name":"寻乌县","cityCode":"3607","provinceCode":"36"},{"code":"360735","name":"石城县","cityCode":"3607","provinceCode":"36"},{"code":"360781","name":"瑞金市","cityCode":"3607","provinceCode":"36"},{"code":"360802","name":"吉州区","cityCode":"3608","provinceCode":"36"},{"code":"360803","name":"青原区","cityCode":"3608","provinceCode":"36"},{"code":"360821","name":"吉安县","cityCode":"3608","provinceCode":"36"},{"code":"360822","name":"吉水县","cityCode":"3608","provinceCode":"36"},{"code":"360823","name":"峡江县","cityCode":"3608","provinceCode":"36"},{"code":"360824","name":"新干县","cityCode":"3608","provinceCode":"36"},{"code":"360825","name":"永丰县","cityCode":"3608","provinceCode":"36"},{"code":"360826","name":"泰和县","cityCode":"3608","provinceCode":"36"},{"code":"360827","name":"遂川县","cityCode":"3608","provinceCode":"36"},{"code":"360828","name":"万安县","cityCode":"3608","provinceCode":"36"},{"code":"360829","name":"安福县","cityCode":"3608","provinceCode":"36"},{"code":"360830","name":"永新县","cityCode":"3608","provinceCode":"36"},{"code":"360881","name":"井冈山市","cityCode":"3608","provinceCode":"36"},{"code":"360902","name":"袁州区","cityCode":"3609","provinceCode":"36"},{"code":"360921","name":"奉新县","cityCode":"3609","provinceCode":"36"},{"code":"360922","name":"万载县","cityCode":"3609","provinceCode":"36"},{"code":"360923","name":"上高县","cityCode":"3609","provinceCode":"36"},{"code":"360924","name":"宜丰县","cityCode":"3609","provinceCode":"36"},{"code":"360925","name":"靖安县","cityCode":"3609","provinceCode":"36"},{"code":"360926","name":"铜鼓县","cityCode":"3609","provinceCode":"36"},{"code":"360981","name":"丰城市","cityCode":"3609","provinceCode":"36"},{"code":"360982","name":"樟树市","cityCode":"3609","provinceCode":"36"},{"code":"360983","name":"高安市","cityCode":"3609","provinceCode":"36"},{"code":"361002","name":"临川区","cityCode":"3610","provinceCode":"36"},{"code":"361021","name":"南城县","cityCode":"3610","provinceCode":"36"},{"code":"361022","name":"黎川县","cityCode":"3610","provinceCode":"36"},{"code":"361023","name":"南丰县","cityCode":"3610","provinceCode":"36"},{"code":"361024","name":"崇仁县","cityCode":"3610","provinceCode":"36"},{"code":"361025","name":"乐安县","cityCode":"3610","provinceCode":"36"},{"code":"361026","name":"宜黄县","cityCode":"3610","provinceCode":"36"},{"code":"361027","name":"金溪县","cityCode":"3610","provinceCode":"36"},{"code":"361028","name":"资溪县","cityCode":"3610","provinceCode":"36"},{"code":"361029","name":"东乡县","cityCode":"3610","provinceCode":"36"},{"code":"361030","name":"广昌县","cityCode":"3610","provinceCode":"36"},{"code":"361102","name":"信州区","cityCode":"3611","provinceCode":"36"},{"code":"361103","name":"广丰区","cityCode":"3611","provinceCode":"36"},{"code":"361121","name":"上饶县","cityCode":"3611","provinceCode":"36"},{"code":"361123","name":"玉山县","cityCode":"3611","provinceCode":"36"},{"code":"361124","name":"铅山县","cityCode":"3611","provinceCode":"36"},{"code":"361125","name":"横峰县","cityCode":"3611","provinceCode":"36"},{"code":"361126","name":"弋阳县","cityCode":"3611","provinceCode":"36"},{"code":"361127","name":"余干县","cityCode":"3611","provinceCode":"36"},{"code":"361128","name":"鄱阳县","cityCode":"3611","provinceCode":"36"},{"code":"361129","name":"万年县","cityCode":"3611","provinceCode":"36"},{"code":"361130","name":"婺源县","cityCode":"3611","provinceCode":"36"},{"code":"361181","name":"德兴市","cityCode":"3611","provinceCode":"36"},{"code":"370102","name":"历下区","cityCode":"3701","provinceCode":"37"},{"code":"370103","name":"市中区","cityCode":"3701","provinceCode":"37"},{"code":"370104","name":"槐荫区","cityCode":"3701","provinceCode":"37"},{"code":"370105","name":"天桥区","cityCode":"3701","provinceCode":"37"},{"code":"370112","name":"历城区","cityCode":"3701","provinceCode":"37"},{"code":"370113","name":"长清区","cityCode":"3701","provinceCode":"37"},{"code":"370124","name":"平阴县","cityCode":"3701","provinceCode":"37"},{"code":"370125","name":"济阳县","cityCode":"3701","provinceCode":"37"},{"code":"370126","name":"商河县","cityCode":"3701","provinceCode":"37"},{"code":"370181","name":"章丘市","cityCode":"3701","provinceCode":"37"},{"code":"370202","name":"市南区","cityCode":"3702","provinceCode":"37"},{"code":"370203","name":"市北区","cityCode":"3702","provinceCode":"37"},{"code":"370211","name":"黄岛区","cityCode":"3702","provinceCode":"37"},{"code":"370212","name":"崂山区","cityCode":"3702","provinceCode":"37"},{"code":"370213","name":"李沧区","cityCode":"3702","provinceCode":"37"},{"code":"370214","name":"城阳区","cityCode":"3702","provinceCode":"37"},{"code":"370281","name":"胶州市","cityCode":"3702","provinceCode":"37"},{"code":"370282","name":"即墨市","cityCode":"3702","provinceCode":"37"},{"code":"370283","name":"平度市","cityCode":"3702","provinceCode":"37"},{"code":"370285","name":"莱西市","cityCode":"3702","provinceCode":"37"},{"code":"370302","name":"淄川区","cityCode":"3703","provinceCode":"37"},{"code":"370303","name":"张店区","cityCode":"3703","provinceCode":"37"},{"code":"370304","name":"博山区","cityCode":"3703","provinceCode":"37"},{"code":"370305","name":"临淄区","cityCode":"3703","provinceCode":"37"},{"code":"370306","name":"周村区","cityCode":"3703","provinceCode":"37"},{"code":"370321","name":"桓台县","cityCode":"3703","provinceCode":"37"},{"code":"370322","name":"高青县","cityCode":"3703","provinceCode":"37"},{"code":"370323","name":"沂源县","cityCode":"3703","provinceCode":"37"},{"code":"370402","name":"市中区","cityCode":"3704","provinceCode":"37"},{"code":"370403","name":"薛城区","cityCode":"3704","provinceCode":"37"},{"code":"370404","name":"峄城区","cityCode":"3704","provinceCode":"37"},{"code":"370405","name":"台儿庄区","cityCode":"3704","provinceCode":"37"},{"code":"370406","name":"山亭区","cityCode":"3704","provinceCode":"37"},{"code":"370481","name":"滕州市","cityCode":"3704","provinceCode":"37"},{"code":"370502","name":"东营区","cityCode":"3705","provinceCode":"37"},{"code":"370503","name":"河口区","cityCode":"3705","provinceCode":"37"},{"code":"370505","name":"垦利区","cityCode":"3705","provinceCode":"37"},{"code":"370522","name":"利津县","cityCode":"3705","provinceCode":"37"},{"code":"370523","name":"广饶县","cityCode":"3705","provinceCode":"37"},{"code":"370602","name":"芝罘区","cityCode":"3706","provinceCode":"37"},{"code":"370611","name":"福山区","cityCode":"3706","provinceCode":"37"},{"code":"370612","name":"牟平区","cityCode":"3706","provinceCode":"37"},{"code":"370613","name":"莱山区","cityCode":"3706","provinceCode":"37"},{"code":"370634","name":"长岛县","cityCode":"3706","provinceCode":"37"},{"code":"370681","name":"龙口市","cityCode":"3706","provinceCode":"37"},{"code":"370682","name":"莱阳市","cityCode":"3706","provinceCode":"37"},{"code":"370683","name":"莱州市","cityCode":"3706","provinceCode":"37"},{"code":"370684","name":"蓬莱市","cityCode":"3706","provinceCode":"37"},{"code":"370685","name":"招远市","cityCode":"3706","provinceCode":"37"},{"code":"370686","name":"栖霞市","cityCode":"3706","provinceCode":"37"},{"code":"370687","name":"海阳市","cityCode":"3706","provinceCode":"37"},{"code":"370702","name":"潍城区","cityCode":"3707","provinceCode":"37"},{"code":"370703","name":"寒亭区","cityCode":"3707","provinceCode":"37"},{"code":"370704","name":"坊子区","cityCode":"3707","provinceCode":"37"},{"code":"370705","name":"奎文区","cityCode":"3707","provinceCode":"37"},{"code":"370724","name":"临朐县","cityCode":"3707","provinceCode":"37"},{"code":"370725","name":"昌乐县","cityCode":"3707","provinceCode":"37"},{"code":"370781","name":"青州市","cityCode":"3707","provinceCode":"37"},{"code":"370782","name":"诸城市","cityCode":"3707","provinceCode":"37"},{"code":"370783","name":"寿光市","cityCode":"3707","provinceCode":"37"},{"code":"370784","name":"安丘市","cityCode":"3707","provinceCode":"37"},{"code":"370785","name":"高密市","cityCode":"3707","provinceCode":"37"},{"code":"370786","name":"昌邑市","cityCode":"3707","provinceCode":"37"},{"code":"370811","name":"任城区","cityCode":"3708","provinceCode":"37"},{"code":"370812","name":"兖州区","cityCode":"3708","provinceCode":"37"},{"code":"370826","name":"微山县","cityCode":"3708","provinceCode":"37"},{"code":"370827","name":"鱼台县","cityCode":"3708","provinceCode":"37"},{"code":"370828","name":"金乡县","cityCode":"3708","provinceCode":"37"},{"code":"370829","name":"嘉祥县","cityCode":"3708","provinceCode":"37"},{"code":"370830","name":"汶上县","cityCode":"3708","provinceCode":"37"},{"code":"370831","name":"泗水县","cityCode":"3708","provinceCode":"37"},{"code":"370832","name":"梁山县","cityCode":"3708","provinceCode":"37"},{"code":"370881","name":"曲阜市","cityCode":"3708","provinceCode":"37"},{"code":"370883","name":"邹城市","cityCode":"3708","provinceCode":"37"},{"code":"370902","name":"泰山区","cityCode":"3709","provinceCode":"37"},{"code":"370911","name":"岱岳区","cityCode":"3709","provinceCode":"37"},{"code":"370921","name":"宁阳县","cityCode":"3709","provinceCode":"37"},{"code":"370923","name":"东平县","cityCode":"3709","provinceCode":"37"},{"code":"370982","name":"新泰市","cityCode":"3709","provinceCode":"37"},{"code":"370983","name":"肥城市","cityCode":"3709","provinceCode":"37"},{"code":"371002","name":"环翠区","cityCode":"3710","provinceCode":"37"},{"code":"371003","name":"文登区","cityCode":"3710","provinceCode":"37"},{"code":"371082","name":"荣成市","cityCode":"3710","provinceCode":"37"},{"code":"371083","name":"乳山市","cityCode":"3710","provinceCode":"37"},{"code":"371102","name":"东港区","cityCode":"3711","provinceCode":"37"},{"code":"371103","name":"岚山区","cityCode":"3711","provinceCode":"37"},{"code":"371121","name":"五莲县","cityCode":"3711","provinceCode":"37"},{"code":"371122","name":"莒县","cityCode":"3711","provinceCode":"37"},{"code":"371202","name":"莱城区","cityCode":"3712","provinceCode":"37"},{"code":"371203","name":"钢城区","cityCode":"3712","provinceCode":"37"},{"code":"371302","name":"兰山区","cityCode":"3713","provinceCode":"37"},{"code":"371311","name":"罗庄区","cityCode":"3713","provinceCode":"37"},{"code":"371312","name":"河东区","cityCode":"3713","provinceCode":"37"},{"code":"371321","name":"沂南县","cityCode":"3713","provinceCode":"37"},{"code":"371322","name":"郯城县","cityCode":"3713","provinceCode":"37"},{"code":"371323","name":"沂水县","cityCode":"3713","provinceCode":"37"},{"code":"371324","name":"兰陵县","cityCode":"3713","provinceCode":"37"},{"code":"371325","name":"费县","cityCode":"3713","provinceCode":"37"},{"code":"371326","name":"平邑县","cityCode":"3713","provinceCode":"37"},{"code":"371327","name":"莒南县","cityCode":"3713","provinceCode":"37"},{"code":"371328","name":"蒙阴县","cityCode":"3713","provinceCode":"37"},{"code":"371329","name":"临沭县","cityCode":"3713","provinceCode":"37"},{"code":"371402","name":"德城区","cityCode":"3714","provinceCode":"37"},{"code":"371403","name":"陵城区","cityCode":"3714","provinceCode":"37"},{"code":"371422","name":"宁津县","cityCode":"3714","provinceCode":"37"},{"code":"371423","name":"庆云县","cityCode":"3714","provinceCode":"37"},{"code":"371424","name":"临邑县","cityCode":"3714","provinceCode":"37"},{"code":"371425","name":"齐河县","cityCode":"3714","provinceCode":"37"},{"code":"371426","name":"平原县","cityCode":"3714","provinceCode":"37"},{"code":"371427","name":"夏津县","cityCode":"3714","provinceCode":"37"},{"code":"371428","name":"武城县","cityCode":"3714","provinceCode":"37"},{"code":"371481","name":"乐陵市","cityCode":"3714","provinceCode":"37"},{"code":"371482","name":"禹城市","cityCode":"3714","provinceCode":"37"},{"code":"371502","name":"东昌府区","cityCode":"3715","provinceCode":"37"},{"code":"371521","name":"阳谷县","cityCode":"3715","provinceCode":"37"},{"code":"371522","name":"莘县","cityCode":"3715","provinceCode":"37"},{"code":"371523","name":"茌平县","cityCode":"3715","provinceCode":"37"},{"code":"371524","name":"东阿县","cityCode":"3715","provinceCode":"37"},{"code":"371525","name":"冠县","cityCode":"3715","provinceCode":"37"},{"code":"371526","name":"高唐县","cityCode":"3715","provinceCode":"37"},{"code":"371581","name":"临清市","cityCode":"3715","provinceCode":"37"},{"code":"371602","name":"滨城区","cityCode":"3716","provinceCode":"37"},{"code":"371603","name":"沾化区","cityCode":"3716","provinceCode":"37"},{"code":"371621","name":"惠民县","cityCode":"3716","provinceCode":"37"},{"code":"371622","name":"阳信县","cityCode":"3716","provinceCode":"37"},{"code":"371623","name":"无棣县","cityCode":"3716","provinceCode":"37"},{"code":"371625","name":"博兴县","cityCode":"3716","provinceCode":"37"},{"code":"371626","name":"邹平县","cityCode":"3716","provinceCode":"37"},{"code":"371702","name":"牡丹区","cityCode":"3717","provinceCode":"37"},{"code":"371703","name":"定陶区","cityCode":"3717","provinceCode":"37"},{"code":"371721","name":"曹县","cityCode":"3717","provinceCode":"37"},{"code":"371722","name":"单县","cityCode":"3717","provinceCode":"37"},{"code":"371723","name":"成武县","cityCode":"3717","provinceCode":"37"},{"code":"371724","name":"巨野县","cityCode":"3717","provinceCode":"37"},{"code":"371725","name":"郓城县","cityCode":"3717","provinceCode":"37"},{"code":"371726","name":"鄄城县","cityCode":"3717","provinceCode":"37"},{"code":"371728","name":"东明县","cityCode":"3717","provinceCode":"37"},{"code":"410102","name":"中原区","cityCode":"4101","provinceCode":"41"},{"code":"410103","name":"二七区","cityCode":"4101","provinceCode":"41"},{"code":"410104","name":"管城回族区","cityCode":"4101","provinceCode":"41"},{"code":"410105","name":"金水区","cityCode":"4101","provinceCode":"41"},{"code":"410106","name":"上街区","cityCode":"4101","provinceCode":"41"},{"code":"410108","name":"惠济区","cityCode":"4101","provinceCode":"41"},{"code":"410122","name":"中牟县","cityCode":"4101","provinceCode":"41"},{"code":"410181","name":"巩义市","cityCode":"4101","provinceCode":"41"},{"code":"410182","name":"荥阳市","cityCode":"4101","provinceCode":"41"},{"code":"410183","name":"新密市","cityCode":"4101","provinceCode":"41"},{"code":"410184","name":"新郑市","cityCode":"4101","provinceCode":"41"},{"code":"410185","name":"登封市","cityCode":"4101","provinceCode":"41"},{"code":"410202","name":"龙亭区","cityCode":"4102","provinceCode":"41"},{"code":"410203","name":"顺河回族区","cityCode":"4102","provinceCode":"41"},{"code":"410204","name":"鼓楼区","cityCode":"4102","provinceCode":"41"},{"code":"410205","name":"禹王台区","cityCode":"4102","provinceCode":"41"},{"code":"410211","name":"金明区","cityCode":"4102","provinceCode":"41"},{"code":"410212","name":"祥符区","cityCode":"4102","provinceCode":"41"},{"code":"410221","name":"杞县","cityCode":"4102","provinceCode":"41"},{"code":"410222","name":"通许县","cityCode":"4102","provinceCode":"41"},{"code":"410223","name":"尉氏县","cityCode":"4102","provinceCode":"41"},{"code":"410225","name":"兰考县","cityCode":"4102","provinceCode":"41"},{"code":"410302","name":"老城区","cityCode":"4103","provinceCode":"41"},{"code":"410303","name":"西工区","cityCode":"4103","provinceCode":"41"},{"code":"410304","name":"瀍河回族区","cityCode":"4103","provinceCode":"41"},{"code":"410305","name":"涧西区","cityCode":"4103","provinceCode":"41"},{"code":"410306","name":"吉利区","cityCode":"4103","provinceCode":"41"},{"code":"410311","name":"洛龙区","cityCode":"4103","provinceCode":"41"},{"code":"410322","name":"孟津县","cityCode":"4103","provinceCode":"41"},{"code":"410323","name":"新安县","cityCode":"4103","provinceCode":"41"},{"code":"410324","name":"栾川县","cityCode":"4103","provinceCode":"41"},{"code":"410325","name":"嵩县","cityCode":"4103","provinceCode":"41"},{"code":"410326","name":"汝阳县","cityCode":"4103","provinceCode":"41"},{"code":"410327","name":"宜阳县","cityCode":"4103","provinceCode":"41"},{"code":"410328","name":"洛宁县","cityCode":"4103","provinceCode":"41"},{"code":"410329","name":"伊川县","cityCode":"4103","provinceCode":"41"},{"code":"410381","name":"偃师市","cityCode":"4103","provinceCode":"41"},{"code":"410402","name":"新华区","cityCode":"4104","provinceCode":"41"},{"code":"410403","name":"卫东区","cityCode":"4104","provinceCode":"41"},{"code":"410404","name":"石龙区","cityCode":"4104","provinceCode":"41"},{"code":"410411","name":"湛河区","cityCode":"4104","provinceCode":"41"},{"code":"410421","name":"宝丰县","cityCode":"4104","provinceCode":"41"},{"code":"410422","name":"叶县","cityCode":"4104","provinceCode":"41"},{"code":"410423","name":"鲁山县","cityCode":"4104","provinceCode":"41"},{"code":"410425","name":"郏县","cityCode":"4104","provinceCode":"41"},{"code":"410481","name":"舞钢市","cityCode":"4104","provinceCode":"41"},{"code":"410482","name":"汝州市","cityCode":"4104","provinceCode":"41"},{"code":"410502","name":"文峰区","cityCode":"4105","provinceCode":"41"},{"code":"410503","name":"北关区","cityCode":"4105","provinceCode":"41"},{"code":"410505","name":"殷都区","cityCode":"4105","provinceCode":"41"},{"code":"410506","name":"龙安区","cityCode":"4105","provinceCode":"41"},{"code":"410522","name":"安阳县","cityCode":"4105","provinceCode":"41"},{"code":"410523","name":"汤阴县","cityCode":"4105","provinceCode":"41"},{"code":"410526","name":"滑县","cityCode":"4105","provinceCode":"41"},{"code":"410527","name":"内黄县","cityCode":"4105","provinceCode":"41"},{"code":"410581","name":"林州市","cityCode":"4105","provinceCode":"41"},{"code":"410602","name":"鹤山区","cityCode":"4106","provinceCode":"41"},{"code":"410603","name":"山城区","cityCode":"4106","provinceCode":"41"},{"code":"410611","name":"淇滨区","cityCode":"4106","provinceCode":"41"},{"code":"410621","name":"浚县","cityCode":"4106","provinceCode":"41"},{"code":"410622","name":"淇县","cityCode":"4106","provinceCode":"41"},{"code":"410702","name":"红旗区","cityCode":"4107","provinceCode":"41"},{"code":"410703","name":"卫滨区","cityCode":"4107","provinceCode":"41"},{"code":"410704","name":"凤泉区","cityCode":"4107","provinceCode":"41"},{"code":"410711","name":"牧野区","cityCode":"4107","provinceCode":"41"},{"code":"410721","name":"新乡县","cityCode":"4107","provinceCode":"41"},{"code":"410724","name":"获嘉县","cityCode":"4107","provinceCode":"41"},{"code":"410725","name":"原阳县","cityCode":"4107","provinceCode":"41"},{"code":"410726","name":"延津县","cityCode":"4107","provinceCode":"41"},{"code":"410727","name":"封丘县","cityCode":"4107","provinceCode":"41"},{"code":"410728","name":"长垣县","cityCode":"4107","provinceCode":"41"},{"code":"410781","name":"卫辉市","cityCode":"4107","provinceCode":"41"},{"code":"410782","name":"辉县市","cityCode":"4107","provinceCode":"41"},{"code":"410802","name":"解放区","cityCode":"4108","provinceCode":"41"},{"code":"410803","name":"中站区","cityCode":"4108","provinceCode":"41"},{"code":"410804","name":"马村区","cityCode":"4108","provinceCode":"41"},{"code":"410811","name":"山阳区","cityCode":"4108","provinceCode":"41"},{"code":"410821","name":"修武县","cityCode":"4108","provinceCode":"41"},{"code":"410822","name":"博爱县","cityCode":"4108","provinceCode":"41"},{"code":"410823","name":"武陟县","cityCode":"4108","provinceCode":"41"},{"code":"410825","name":"温县","cityCode":"4108","provinceCode":"41"},{"code":"410882","name":"沁阳市","cityCode":"4108","provinceCode":"41"},{"code":"410883","name":"孟州市","cityCode":"4108","provinceCode":"41"},{"code":"410902","name":"华龙区","cityCode":"4109","provinceCode":"41"},{"code":"410922","name":"清丰县","cityCode":"4109","provinceCode":"41"},{"code":"410923","name":"南乐县","cityCode":"4109","provinceCode":"41"},{"code":"410926","name":"范县","cityCode":"4109","provinceCode":"41"},{"code":"410927","name":"台前县","cityCode":"4109","provinceCode":"41"},{"code":"410928","name":"濮阳县","cityCode":"4109","provinceCode":"41"},{"code":"411002","name":"魏都区","cityCode":"4110","provinceCode":"41"},{"code":"411023","name":"许昌县","cityCode":"4110","provinceCode":"41"},{"code":"411024","name":"鄢陵县","cityCode":"4110","provinceCode":"41"},{"code":"411025","name":"襄城县","cityCode":"4110","provinceCode":"41"},{"code":"411081","name":"禹州市","cityCode":"4110","provinceCode":"41"},{"code":"411082","name":"长葛市","cityCode":"4110","provinceCode":"41"},{"code":"411102","name":"源汇区","cityCode":"4111","provinceCode":"41"},{"code":"411103","name":"郾城区","cityCode":"4111","provinceCode":"41"},{"code":"411104","name":"召陵区","cityCode":"4111","provinceCode":"41"},{"code":"411121","name":"舞阳县","cityCode":"4111","provinceCode":"41"},{"code":"411122","name":"临颍县","cityCode":"4111","provinceCode":"41"},{"code":"411202","name":"湖滨区","cityCode":"4112","provinceCode":"41"},{"code":"411203","name":"陕州区","cityCode":"4112","provinceCode":"41"},{"code":"411221","name":"渑池县","cityCode":"4112","provinceCode":"41"},{"code":"411224","name":"卢氏县","cityCode":"4112","provinceCode":"41"},{"code":"411281","name":"义马市","cityCode":"4112","provinceCode":"41"},{"code":"411282","name":"灵宝市","cityCode":"4112","provinceCode":"41"},{"code":"411302","name":"宛城区","cityCode":"4113","provinceCode":"41"},{"code":"411303","name":"卧龙区","cityCode":"4113","provinceCode":"41"},{"code":"411321","name":"南召县","cityCode":"4113","provinceCode":"41"},{"code":"411322","name":"方城县","cityCode":"4113","provinceCode":"41"},{"code":"411323","name":"西峡县","cityCode":"4113","provinceCode":"41"},{"code":"411324","name":"镇平县","cityCode":"4113","provinceCode":"41"},{"code":"411325","name":"内乡县","cityCode":"4113","provinceCode":"41"},{"code":"411326","name":"淅川县","cityCode":"4113","provinceCode":"41"},{"code":"411327","name":"社旗县","cityCode":"4113","provinceCode":"41"},{"code":"411328","name":"唐河县","cityCode":"4113","provinceCode":"41"},{"code":"411329","name":"新野县","cityCode":"4113","provinceCode":"41"},{"code":"411330","name":"桐柏县","cityCode":"4113","provinceCode":"41"},{"code":"411381","name":"邓州市","cityCode":"4113","provinceCode":"41"},{"code":"411402","name":"梁园区","cityCode":"4114","provinceCode":"41"},{"code":"411403","name":"睢阳区","cityCode":"4114","provinceCode":"41"},{"code":"411421","name":"民权县","cityCode":"4114","provinceCode":"41"},{"code":"411422","name":"睢县","cityCode":"4114","provinceCode":"41"},{"code":"411423","name":"宁陵县","cityCode":"4114","provinceCode":"41"},{"code":"411424","name":"柘城县","cityCode":"4114","provinceCode":"41"},{"code":"411425","name":"虞城县","cityCode":"4114","provinceCode":"41"},{"code":"411426","name":"夏邑县","cityCode":"4114","provinceCode":"41"},{"code":"411481","name":"永城市","cityCode":"4114","provinceCode":"41"},{"code":"411502","name":"浉河区","cityCode":"4115","provinceCode":"41"},{"code":"411503","name":"平桥区","cityCode":"4115","provinceCode":"41"},{"code":"411521","name":"罗山县","cityCode":"4115","provinceCode":"41"},{"code":"411522","name":"光山县","cityCode":"4115","provinceCode":"41"},{"code":"411523","name":"新县","cityCode":"4115","provinceCode":"41"},{"code":"411524","name":"商城县","cityCode":"4115","provinceCode":"41"},{"code":"411525","name":"固始县","cityCode":"4115","provinceCode":"41"},{"code":"411526","name":"潢川县","cityCode":"4115","provinceCode":"41"},{"code":"411527","name":"淮滨县","cityCode":"4115","provinceCode":"41"},{"code":"411528","name":"息县","cityCode":"4115","provinceCode":"41"},{"code":"411602","name":"川汇区","cityCode":"4116","provinceCode":"41"},{"code":"411621","name":"扶沟县","cityCode":"4116","provinceCode":"41"},{"code":"411622","name":"西华县","cityCode":"4116","provinceCode":"41"},{"code":"411623","name":"商水县","cityCode":"4116","provinceCode":"41"},{"code":"411624","name":"沈丘县","cityCode":"4116","provinceCode":"41"},{"code":"411625","name":"郸城县","cityCode":"4116","provinceCode":"41"},{"code":"411626","name":"淮阳县","cityCode":"4116","provinceCode":"41"},{"code":"411627","name":"太康县","cityCode":"4116","provinceCode":"41"},{"code":"411628","name":"鹿邑县","cityCode":"4116","provinceCode":"41"},{"code":"411681","name":"项城市","cityCode":"4116","provinceCode":"41"},{"code":"411702","name":"驿城区","cityCode":"4117","provinceCode":"41"},{"code":"411721","name":"西平县","cityCode":"4117","provinceCode":"41"},{"code":"411722","name":"上蔡县","cityCode":"4117","provinceCode":"41"},{"code":"411723","name":"平舆县","cityCode":"4117","provinceCode":"41"},{"code":"411724","name":"正阳县","cityCode":"4117","provinceCode":"41"},{"code":"411725","name":"确山县","cityCode":"4117","provinceCode":"41"},{"code":"411726","name":"泌阳县","cityCode":"4117","provinceCode":"41"},{"code":"411727","name":"汝南县","cityCode":"4117","provinceCode":"41"},{"code":"411728","name":"遂平县","cityCode":"4117","provinceCode":"41"},{"code":"411729","name":"新蔡县","cityCode":"4117","provinceCode":"41"},{"code":"419001","name":"济源市","cityCode":"4190","provinceCode":"41"},{"code":"420102","name":"江岸区","cityCode":"4201","provinceCode":"42"},{"code":"420103","name":"江汉区","cityCode":"4201","provinceCode":"42"},{"code":"420104","name":"硚口区","cityCode":"4201","provinceCode":"42"},{"code":"420105","name":"汉阳区","cityCode":"4201","provinceCode":"42"},{"code":"420106","name":"武昌区","cityCode":"4201","provinceCode":"42"},{"code":"420107","name":"青山区","cityCode":"4201","provinceCode":"42"},{"code":"420111","name":"洪山区","cityCode":"4201","provinceCode":"42"},{"code":"420112","name":"东西湖区","cityCode":"4201","provinceCode":"42"},{"code":"420113","name":"汉南区","cityCode":"4201","provinceCode":"42"},{"code":"420114","name":"蔡甸区","cityCode":"4201","provinceCode":"42"},{"code":"420115","name":"江夏区","cityCode":"4201","provinceCode":"42"},{"code":"420116","name":"黄陂区","cityCode":"4201","provinceCode":"42"},{"code":"420117","name":"新洲区","cityCode":"4201","provinceCode":"42"},{"code":"420202","name":"黄石港区","cityCode":"4202","provinceCode":"42"},{"code":"420203","name":"西塞山区","cityCode":"4202","provinceCode":"42"},{"code":"420204","name":"下陆区","cityCode":"4202","provinceCode":"42"},{"code":"420205","name":"铁山区","cityCode":"4202","provinceCode":"42"},{"code":"420222","name":"阳新县","cityCode":"4202","provinceCode":"42"},{"code":"420281","name":"大冶市","cityCode":"4202","provinceCode":"42"},{"code":"420302","name":"茅箭区","cityCode":"4203","provinceCode":"42"},{"code":"420303","name":"张湾区","cityCode":"4203","provinceCode":"42"},{"code":"420304","name":"郧阳区","cityCode":"4203","provinceCode":"42"},{"code":"420322","name":"郧西县","cityCode":"4203","provinceCode":"42"},{"code":"420323","name":"竹山县","cityCode":"4203","provinceCode":"42"},{"code":"420324","name":"竹溪县","cityCode":"4203","provinceCode":"42"},{"code":"420325","name":"房县","cityCode":"4203","provinceCode":"42"},{"code":"420381","name":"丹江口市","cityCode":"4203","provinceCode":"42"},{"code":"420502","name":"西陵区","cityCode":"4205","provinceCode":"42"},{"code":"420503","name":"伍家岗区","cityCode":"4205","provinceCode":"42"},{"code":"420504","name":"点军区","cityCode":"4205","provinceCode":"42"},{"code":"420505","name":"猇亭区","cityCode":"4205","provinceCode":"42"},{"code":"420506","name":"夷陵区","cityCode":"4205","provinceCode":"42"},{"code":"420525","name":"远安县","cityCode":"4205","provinceCode":"42"},{"code":"420526","name":"兴山县","cityCode":"4205","provinceCode":"42"},{"code":"420527","name":"秭归县","cityCode":"4205","provinceCode":"42"},{"code":"420528","name":"长阳土家族自治县","cityCode":"4205","provinceCode":"42"},{"code":"420529","name":"五峰土家族自治县","cityCode":"4205","provinceCode":"42"},{"code":"420581","name":"宜都市","cityCode":"4205","provinceCode":"42"},{"code":"420582","name":"当阳市","cityCode":"4205","provinceCode":"42"},{"code":"420583","name":"枝江市","cityCode":"4205","provinceCode":"42"},{"code":"420602","name":"襄城区","cityCode":"4206","provinceCode":"42"},{"code":"420606","name":"樊城区","cityCode":"4206","provinceCode":"42"},{"code":"420607","name":"襄州区","cityCode":"4206","provinceCode":"42"},{"code":"420624","name":"南漳县","cityCode":"4206","provinceCode":"42"},{"code":"420625","name":"谷城县","cityCode":"4206","provinceCode":"42"},{"code":"420626","name":"保康县","cityCode":"4206","provinceCode":"42"},{"code":"420682","name":"老河口市","cityCode":"4206","provinceCode":"42"},{"code":"420683","name":"枣阳市","cityCode":"4206","provinceCode":"42"},{"code":"420684","name":"宜城市","cityCode":"4206","provinceCode":"42"},{"code":"420702","name":"梁子湖区","cityCode":"4207","provinceCode":"42"},{"code":"420703","name":"华容区","cityCode":"4207","provinceCode":"42"},{"code":"420704","name":"鄂城区","cityCode":"4207","provinceCode":"42"},{"code":"420802","name":"东宝区","cityCode":"4208","provinceCode":"42"},{"code":"420804","name":"掇刀区","cityCode":"4208","provinceCode":"42"},{"code":"420821","name":"京山县","cityCode":"4208","provinceCode":"42"},{"code":"420822","name":"沙洋县","cityCode":"4208","provinceCode":"42"},{"code":"420881","name":"钟祥市","cityCode":"4208","provinceCode":"42"},{"code":"420902","name":"孝南区","cityCode":"4209","provinceCode":"42"},{"code":"420921","name":"孝昌县","cityCode":"4209","provinceCode":"42"},{"code":"420922","name":"大悟县","cityCode":"4209","provinceCode":"42"},{"code":"420923","name":"云梦县","cityCode":"4209","provinceCode":"42"},{"code":"420981","name":"应城市","cityCode":"4209","provinceCode":"42"},{"code":"420982","name":"安陆市","cityCode":"4209","provinceCode":"42"},{"code":"420984","name":"汉川市","cityCode":"4209","provinceCode":"42"},{"code":"421002","name":"沙市区","cityCode":"4210","provinceCode":"42"},{"code":"421003","name":"荆州区","cityCode":"4210","provinceCode":"42"},{"code":"421022","name":"公安县","cityCode":"4210","provinceCode":"42"},{"code":"421023","name":"监利县","cityCode":"4210","provinceCode":"42"},{"code":"421024","name":"江陵县","cityCode":"4210","provinceCode":"42"},{"code":"421081","name":"石首市","cityCode":"4210","provinceCode":"42"},{"code":"421083","name":"洪湖市","cityCode":"4210","provinceCode":"42"},{"code":"421087","name":"松滋市","cityCode":"4210","provinceCode":"42"},{"code":"421102","name":"黄州区","cityCode":"4211","provinceCode":"42"},{"code":"421121","name":"团风县","cityCode":"4211","provinceCode":"42"},{"code":"421122","name":"红安县","cityCode":"4211","provinceCode":"42"},{"code":"421123","name":"罗田县","cityCode":"4211","provinceCode":"42"},{"code":"421124","name":"英山县","cityCode":"4211","provinceCode":"42"},{"code":"421125","name":"浠水县","cityCode":"4211","provinceCode":"42"},{"code":"421126","name":"蕲春县","cityCode":"4211","provinceCode":"42"},{"code":"421127","name":"黄梅县","cityCode":"4211","provinceCode":"42"},{"code":"421181","name":"麻城市","cityCode":"4211","provinceCode":"42"},{"code":"421182","name":"武穴市","cityCode":"4211","provinceCode":"42"},{"code":"421202","name":"咸安区","cityCode":"4212","provinceCode":"42"},{"code":"421221","name":"嘉鱼县","cityCode":"4212","provinceCode":"42"},{"code":"421222","name":"通城县","cityCode":"4212","provinceCode":"42"},{"code":"421223","name":"崇阳县","cityCode":"4212","provinceCode":"42"},{"code":"421224","name":"通山县","cityCode":"4212","provinceCode":"42"},{"code":"421281","name":"赤壁市","cityCode":"4212","provinceCode":"42"},{"code":"421303","name":"曾都区","cityCode":"4213","provinceCode":"42"},{"code":"421321","name":"随县","cityCode":"4213","provinceCode":"42"},{"code":"421381","name":"广水市","cityCode":"4213","provinceCode":"42"},{"code":"422801","name":"恩施市","cityCode":"4228","provinceCode":"42"},{"code":"422802","name":"利川市","cityCode":"4228","provinceCode":"42"},{"code":"422822","name":"建始县","cityCode":"4228","provinceCode":"42"},{"code":"422823","name":"巴东县","cityCode":"4228","provinceCode":"42"},{"code":"422825","name":"宣恩县","cityCode":"4228","provinceCode":"42"},{"code":"422826","name":"咸丰县","cityCode":"4228","provinceCode":"42"},{"code":"422827","name":"来凤县","cityCode":"4228","provinceCode":"42"},{"code":"422828","name":"鹤峰县","cityCode":"4228","provinceCode":"42"},{"code":"429004","name":"仙桃市","cityCode":"4290","provinceCode":"42"},{"code":"429005","name":"潜江市","cityCode":"4290","provinceCode":"42"},{"code":"429006","name":"天门市","cityCode":"4290","provinceCode":"42"},{"code":"429021","name":"神农架林区","cityCode":"4290","provinceCode":"42"},{"code":"430102","name":"芙蓉区","cityCode":"4301","provinceCode":"43"},{"code":"430103","name":"天心区","cityCode":"4301","provinceCode":"43"},{"code":"430104","name":"岳麓区","cityCode":"4301","provinceCode":"43"},{"code":"430105","name":"开福区","cityCode":"4301","provinceCode":"43"},{"code":"430111","name":"雨花区","cityCode":"4301","provinceCode":"43"},{"code":"430112","name":"望城区","cityCode":"4301","provinceCode":"43"},{"code":"430121","name":"长沙县","cityCode":"4301","provinceCode":"43"},{"code":"430124","name":"宁乡县","cityCode":"4301","provinceCode":"43"},{"code":"430181","name":"浏阳市","cityCode":"4301","provinceCode":"43"},{"code":"430202","name":"荷塘区","cityCode":"4302","provinceCode":"43"},{"code":"430203","name":"芦淞区","cityCode":"4302","provinceCode":"43"},{"code":"430204","name":"石峰区","cityCode":"4302","provinceCode":"43"},{"code":"430211","name":"天元区","cityCode":"4302","provinceCode":"43"},{"code":"430221","name":"株洲县","cityCode":"4302","provinceCode":"43"},{"code":"430223","name":"攸县","cityCode":"4302","provinceCode":"43"},{"code":"430224","name":"茶陵县","cityCode":"4302","provinceCode":"43"},{"code":"430225","name":"炎陵县","cityCode":"4302","provinceCode":"43"},{"code":"430281","name":"醴陵市","cityCode":"4302","provinceCode":"43"},{"code":"430302","name":"雨湖区","cityCode":"4303","provinceCode":"43"},{"code":"430304","name":"岳塘区","cityCode":"4303","provinceCode":"43"},{"code":"430321","name":"湘潭县","cityCode":"4303","provinceCode":"43"},{"code":"430381","name":"湘乡市","cityCode":"4303","provinceCode":"43"},{"code":"430382","name":"韶山市","cityCode":"4303","provinceCode":"43"},{"code":"430405","name":"珠晖区","cityCode":"4304","provinceCode":"43"},{"code":"430406","name":"雁峰区","cityCode":"4304","provinceCode":"43"},{"code":"430407","name":"石鼓区","cityCode":"4304","provinceCode":"43"},{"code":"430408","name":"蒸湘区","cityCode":"4304","provinceCode":"43"},{"code":"430412","name":"南岳区","cityCode":"4304","provinceCode":"43"},{"code":"430421","name":"衡阳县","cityCode":"4304","provinceCode":"43"},{"code":"430422","name":"衡南县","cityCode":"4304","provinceCode":"43"},{"code":"430423","name":"衡山县","cityCode":"4304","provinceCode":"43"},{"code":"430424","name":"衡东县","cityCode":"4304","provinceCode":"43"},{"code":"430426","name":"祁东县","cityCode":"4304","provinceCode":"43"},{"code":"430481","name":"耒阳市","cityCode":"4304","provinceCode":"43"},{"code":"430482","name":"常宁市","cityCode":"4304","provinceCode":"43"},{"code":"430502","name":"双清区","cityCode":"4305","provinceCode":"43"},{"code":"430503","name":"大祥区","cityCode":"4305","provinceCode":"43"},{"code":"430511","name":"北塔区","cityCode":"4305","provinceCode":"43"},{"code":"430521","name":"邵东县","cityCode":"4305","provinceCode":"43"},{"code":"430522","name":"新邵县","cityCode":"4305","provinceCode":"43"},{"code":"430523","name":"邵阳县","cityCode":"4305","provinceCode":"43"},{"code":"430524","name":"隆回县","cityCode":"4305","provinceCode":"43"},{"code":"430525","name":"洞口县","cityCode":"4305","provinceCode":"43"},{"code":"430527","name":"绥宁县","cityCode":"4305","provinceCode":"43"},{"code":"430528","name":"新宁县","cityCode":"4305","provinceCode":"43"},{"code":"430529","name":"城步苗族自治县","cityCode":"4305","provinceCode":"43"},{"code":"430581","name":"武冈市","cityCode":"4305","provinceCode":"43"},{"code":"430602","name":"岳阳楼区","cityCode":"4306","provinceCode":"43"},{"code":"430603","name":"云溪区","cityCode":"4306","provinceCode":"43"},{"code":"430611","name":"君山区","cityCode":"4306","provinceCode":"43"},{"code":"430621","name":"岳阳县","cityCode":"4306","provinceCode":"43"},{"code":"430623","name":"华容县","cityCode":"4306","provinceCode":"43"},{"code":"430624","name":"湘阴县","cityCode":"4306","provinceCode":"43"},{"code":"430626","name":"平江县","cityCode":"4306","provinceCode":"43"},{"code":"430681","name":"汨罗市","cityCode":"4306","provinceCode":"43"},{"code":"430682","name":"临湘市","cityCode":"4306","provinceCode":"43"},{"code":"430702","name":"武陵区","cityCode":"4307","provinceCode":"43"},{"code":"430703","name":"鼎城区","cityCode":"4307","provinceCode":"43"},{"code":"430721","name":"安乡县","cityCode":"4307","provinceCode":"43"},{"code":"430722","name":"汉寿县","cityCode":"4307","provinceCode":"43"},{"code":"430723","name":"澧县","cityCode":"4307","provinceCode":"43"},{"code":"430724","name":"临澧县","cityCode":"4307","provinceCode":"43"},{"code":"430725","name":"桃源县","cityCode":"4307","provinceCode":"43"},{"code":"430726","name":"石门县","cityCode":"4307","provinceCode":"43"},{"code":"430781","name":"津市市","cityCode":"4307","provinceCode":"43"},{"code":"430802","name":"永定区","cityCode":"4308","provinceCode":"43"},{"code":"430811","name":"武陵源区","cityCode":"4308","provinceCode":"43"},{"code":"430821","name":"慈利县","cityCode":"4308","provinceCode":"43"},{"code":"430822","name":"桑植县","cityCode":"4308","provinceCode":"43"},{"code":"430902","name":"资阳区","cityCode":"4309","provinceCode":"43"},{"code":"430903","name":"赫山区","cityCode":"4309","provinceCode":"43"},{"code":"430921","name":"南县","cityCode":"4309","provinceCode":"43"},{"code":"430922","name":"桃江县","cityCode":"4309","provinceCode":"43"},{"code":"430923","name":"安化县","cityCode":"4309","provinceCode":"43"},{"code":"430981","name":"沅江市","cityCode":"4309","provinceCode":"43"},{"code":"431002","name":"北湖区","cityCode":"4310","provinceCode":"43"},{"code":"431003","name":"苏仙区","cityCode":"4310","provinceCode":"43"},{"code":"431021","name":"桂阳县","cityCode":"4310","provinceCode":"43"},{"code":"431022","name":"宜章县","cityCode":"4310","provinceCode":"43"},{"code":"431023","name":"永兴县","cityCode":"4310","provinceCode":"43"},{"code":"431024","name":"嘉禾县","cityCode":"4310","provinceCode":"43"},{"code":"431025","name":"临武县","cityCode":"4310","provinceCode":"43"},{"code":"431026","name":"汝城县","cityCode":"4310","provinceCode":"43"},{"code":"431027","name":"桂东县","cityCode":"4310","provinceCode":"43"},{"code":"431028","name":"安仁县","cityCode":"4310","provinceCode":"43"},{"code":"431081","name":"资兴市","cityCode":"4310","provinceCode":"43"},{"code":"431102","name":"零陵区","cityCode":"4311","provinceCode":"43"},{"code":"431103","name":"冷水滩区","cityCode":"4311","provinceCode":"43"},{"code":"431121","name":"祁阳县","cityCode":"4311","provinceCode":"43"},{"code":"431122","name":"东安县","cityCode":"4311","provinceCode":"43"},{"code":"431123","name":"双牌县","cityCode":"4311","provinceCode":"43"},{"code":"431124","name":"道县","cityCode":"4311","provinceCode":"43"},{"code":"431125","name":"江永县","cityCode":"4311","provinceCode":"43"},{"code":"431126","name":"宁远县","cityCode":"4311","provinceCode":"43"},{"code":"431127","name":"蓝山县","cityCode":"4311","provinceCode":"43"},{"code":"431128","name":"新田县","cityCode":"4311","provinceCode":"43"},{"code":"431129","name":"江华瑶族自治县","cityCode":"4311","provinceCode":"43"},{"code":"431202","name":"鹤城区","cityCode":"4312","provinceCode":"43"},{"code":"431221","name":"中方县","cityCode":"4312","provinceCode":"43"},{"code":"431222","name":"沅陵县","cityCode":"4312","provinceCode":"43"},{"code":"431223","name":"辰溪县","cityCode":"4312","provinceCode":"43"},{"code":"431224","name":"溆浦县","cityCode":"4312","provinceCode":"43"},{"code":"431225","name":"会同县","cityCode":"4312","provinceCode":"43"},{"code":"431226","name":"麻阳苗族自治县","cityCode":"4312","provinceCode":"43"},{"code":"431227","name":"新晃侗族自治县","cityCode":"4312","provinceCode":"43"},{"code":"431228","name":"芷江侗族自治县","cityCode":"4312","provinceCode":"43"},{"code":"431229","name":"靖州苗族侗族自治县","cityCode":"4312","provinceCode":"43"},{"code":"431230","name":"通道侗族自治县","cityCode":"4312","provinceCode":"43"},{"code":"431281","name":"洪江市","cityCode":"4312","provinceCode":"43"},{"code":"431302","name":"娄星区","cityCode":"4313","provinceCode":"43"},{"code":"431321","name":"双峰县","cityCode":"4313","provinceCode":"43"},{"code":"431322","name":"新化县","cityCode":"4313","provinceCode":"43"},{"code":"431381","name":"冷水江市","cityCode":"4313","provinceCode":"43"},{"code":"431382","name":"涟源市","cityCode":"4313","provinceCode":"43"},{"code":"433101","name":"吉首市","cityCode":"4331","provinceCode":"43"},{"code":"433122","name":"泸溪县","cityCode":"4331","provinceCode":"43"},{"code":"433123","name":"凤凰县","cityCode":"4331","provinceCode":"43"},{"code":"433124","name":"花垣县","cityCode":"4331","provinceCode":"43"},{"code":"433125","name":"保靖县","cityCode":"4331","provinceCode":"43"},{"code":"433126","name":"古丈县","cityCode":"4331","provinceCode":"43"},{"code":"433127","name":"永顺县","cityCode":"4331","provinceCode":"43"},{"code":"433130","name":"龙山县","cityCode":"4331","provinceCode":"43"},{"code":"440103","name":"荔湾区","cityCode":"4401","provinceCode":"44"},{"code":"440104","name":"越秀区","cityCode":"4401","provinceCode":"44"},{"code":"440105","name":"海珠区","cityCode":"4401","provinceCode":"44"},{"code":"440106","name":"天河区","cityCode":"4401","provinceCode":"44"},{"code":"440111","name":"白云区","cityCode":"4401","provinceCode":"44"},{"code":"440112","name":"黄埔区","cityCode":"4401","provinceCode":"44"},{"code":"440113","name":"番禺区","cityCode":"4401","provinceCode":"44"},{"code":"440114","name":"花都区","cityCode":"4401","provinceCode":"44"},{"code":"440115","name":"南沙区","cityCode":"4401","provinceCode":"44"},{"code":"440117","name":"从化区","cityCode":"4401","provinceCode":"44"},{"code":"440118","name":"增城区","cityCode":"4401","provinceCode":"44"},{"code":"440203","name":"武江区","cityCode":"4402","provinceCode":"44"},{"code":"440204","name":"浈江区","cityCode":"4402","provinceCode":"44"},{"code":"440205","name":"曲江区","cityCode":"4402","provinceCode":"44"},{"code":"440222","name":"始兴县","cityCode":"4402","provinceCode":"44"},{"code":"440224","name":"仁化县","cityCode":"4402","provinceCode":"44"},{"code":"440229","name":"翁源县","cityCode":"4402","provinceCode":"44"},{"code":"440232","name":"乳源瑶族自治县","cityCode":"4402","provinceCode":"44"},{"code":"440233","name":"新丰县","cityCode":"4402","provinceCode":"44"},{"code":"440281","name":"乐昌市","cityCode":"4402","provinceCode":"44"},{"code":"440282","name":"南雄市","cityCode":"4402","provinceCode":"44"},{"code":"440303","name":"罗湖区","cityCode":"4403","provinceCode":"44"},{"code":"440304","name":"福田区","cityCode":"4403","provinceCode":"44"},{"code":"440305","name":"南山区","cityCode":"4403","provinceCode":"44"},{"code":"440306","name":"宝安区","cityCode":"4403","provinceCode":"44"},{"code":"440307","name":"龙岗区","cityCode":"4403","provinceCode":"44"},{"code":"440308","name":"盐田区","cityCode":"4403","provinceCode":"44"},{"code":"440402","name":"香洲区","cityCode":"4404","provinceCode":"44"},{"code":"440403","name":"斗门区","cityCode":"4404","provinceCode":"44"},{"code":"440404","name":"金湾区","cityCode":"4404","provinceCode":"44"},{"code":"440507","name":"龙湖区","cityCode":"4405","provinceCode":"44"},{"code":"440511","name":"金平区","cityCode":"4405","provinceCode":"44"},{"code":"440512","name":"濠江区","cityCode":"4405","provinceCode":"44"},{"code":"440513","name":"潮阳区","cityCode":"4405","provinceCode":"44"},{"code":"440514","name":"潮南区","cityCode":"4405","provinceCode":"44"},{"code":"440515","name":"澄海区","cityCode":"4405","provinceCode":"44"},{"code":"440523","name":"南澳县","cityCode":"4405","provinceCode":"44"},{"code":"440604","name":"禅城区","cityCode":"4406","provinceCode":"44"},{"code":"440605","name":"南海区","cityCode":"4406","provinceCode":"44"},{"code":"440606","name":"顺德区","cityCode":"4406","provinceCode":"44"},{"code":"440607","name":"三水区","cityCode":"4406","provinceCode":"44"},{"code":"440608","name":"高明区","cityCode":"4406","provinceCode":"44"},{"code":"440703","name":"蓬江区","cityCode":"4407","provinceCode":"44"},{"code":"440704","name":"江海区","cityCode":"4407","provinceCode":"44"},{"code":"440705","name":"新会区","cityCode":"4407","provinceCode":"44"},{"code":"440781","name":"台山市","cityCode":"4407","provinceCode":"44"},{"code":"440783","name":"开平市","cityCode":"4407","provinceCode":"44"},{"code":"440784","name":"鹤山市","cityCode":"4407","provinceCode":"44"},{"code":"440785","name":"恩平市","cityCode":"4407","provinceCode":"44"},{"code":"440802","name":"赤坎区","cityCode":"4408","provinceCode":"44"},{"code":"440803","name":"霞山区","cityCode":"4408","provinceCode":"44"},{"code":"440804","name":"坡头区","cityCode":"4408","provinceCode":"44"},{"code":"440811","name":"麻章区","cityCode":"4408","provinceCode":"44"},{"code":"440823","name":"遂溪县","cityCode":"4408","provinceCode":"44"},{"code":"440825","name":"徐闻县","cityCode":"4408","provinceCode":"44"},{"code":"440881","name":"廉江市","cityCode":"4408","provinceCode":"44"},{"code":"440882","name":"雷州市","cityCode":"4408","provinceCode":"44"},{"code":"440883","name":"吴川市","cityCode":"4408","provinceCode":"44"},{"code":"440902","name":"茂南区","cityCode":"4409","provinceCode":"44"},{"code":"440904","name":"电白区","cityCode":"4409","provinceCode":"44"},{"code":"440981","name":"高州市","cityCode":"4409","provinceCode":"44"},{"code":"440982","name":"化州市","cityCode":"4409","provinceCode":"44"},{"code":"440983","name":"信宜市","cityCode":"4409","provinceCode":"44"},{"code":"441202","name":"端州区","cityCode":"4412","provinceCode":"44"},{"code":"441203","name":"鼎湖区","cityCode":"4412","provinceCode":"44"},{"code":"441204","name":"高要区","cityCode":"4412","provinceCode":"44"},{"code":"441223","name":"广宁县","cityCode":"4412","provinceCode":"44"},{"code":"441224","name":"怀集县","cityCode":"4412","provinceCode":"44"},{"code":"441225","name":"封开县","cityCode":"4412","provinceCode":"44"},{"code":"441226","name":"德庆县","cityCode":"4412","provinceCode":"44"},{"code":"441284","name":"四会市","cityCode":"4412","provinceCode":"44"},{"code":"441302","name":"惠城区","cityCode":"4413","provinceCode":"44"},{"code":"441303","name":"惠阳区","cityCode":"4413","provinceCode":"44"},{"code":"441322","name":"博罗县","cityCode":"4413","provinceCode":"44"},{"code":"441323","name":"惠东县","cityCode":"4413","provinceCode":"44"},{"code":"441324","name":"龙门县","cityCode":"4413","provinceCode":"44"},{"code":"441402","name":"梅江区","cityCode":"4414","provinceCode":"44"},{"code":"441403","name":"梅县区","cityCode":"4414","provinceCode":"44"},{"code":"441422","name":"大埔县","cityCode":"4414","provinceCode":"44"},{"code":"441423","name":"丰顺县","cityCode":"4414","provinceCode":"44"},{"code":"441424","name":"五华县","cityCode":"4414","provinceCode":"44"},{"code":"441426","name":"平远县","cityCode":"4414","provinceCode":"44"},{"code":"441427","name":"蕉岭县","cityCode":"4414","provinceCode":"44"},{"code":"441481","name":"兴宁市","cityCode":"4414","provinceCode":"44"},{"code":"441502","name":"城区","cityCode":"4415","provinceCode":"44"},{"code":"441521","name":"海丰县","cityCode":"4415","provinceCode":"44"},{"code":"441523","name":"陆河县","cityCode":"4415","provinceCode":"44"},{"code":"441581","name":"陆丰市","cityCode":"4415","provinceCode":"44"},{"code":"441602","name":"源城区","cityCode":"4416","provinceCode":"44"},{"code":"441621","name":"紫金县","cityCode":"4416","provinceCode":"44"},{"code":"441622","name":"龙川县","cityCode":"4416","provinceCode":"44"},{"code":"441623","name":"连平县","cityCode":"4416","provinceCode":"44"},{"code":"441624","name":"和平县","cityCode":"4416","provinceCode":"44"},{"code":"441625","name":"东源县","cityCode":"4416","provinceCode":"44"},{"code":"441702","name":"江城区","cityCode":"4417","provinceCode":"44"},{"code":"441704","name":"阳东区","cityCode":"4417","provinceCode":"44"},{"code":"441721","name":"阳西县","cityCode":"4417","provinceCode":"44"},{"code":"441781","name":"阳春市","cityCode":"4417","provinceCode":"44"},{"code":"441802","name":"清城区","cityCode":"4418","provinceCode":"44"},{"code":"441803","name":"清新区","cityCode":"4418","provinceCode":"44"},{"code":"441821","name":"佛冈县","cityCode":"4418","provinceCode":"44"},{"code":"441823","name":"阳山县","cityCode":"4418","provinceCode":"44"},{"code":"441825","name":"连山壮族瑶族自治县","cityCode":"4418","provinceCode":"44"},{"code":"441826","name":"连南瑶族自治县","cityCode":"4418","provinceCode":"44"},{"code":"441881","name":"英德市","cityCode":"4418","provinceCode":"44"},{"code":"441882","name":"连州市","cityCode":"4418","provinceCode":"44"},{"code":"441900","name":"东莞市","cityCode":"4419","provinceCode":"44"},{"code":"442000","name":"中山市","cityCode":"4420","provinceCode":"44"},{"code":"445102","name":"湘桥区","cityCode":"4451","provinceCode":"44"},{"code":"445103","name":"潮安区","cityCode":"4451","provinceCode":"44"},{"code":"445122","name":"饶平县","cityCode":"4451","provinceCode":"44"},{"code":"445202","name":"榕城区","cityCode":"4452","provinceCode":"44"},{"code":"445203","name":"揭东区","cityCode":"4452","provinceCode":"44"},{"code":"445222","name":"揭西县","cityCode":"4452","provinceCode":"44"},{"code":"445224","name":"惠来县","cityCode":"4452","provinceCode":"44"},{"code":"445281","name":"普宁市","cityCode":"4452","provinceCode":"44"},{"code":"445302","name":"云城区","cityCode":"4453","provinceCode":"44"},{"code":"445303","name":"云安区","cityCode":"4453","provinceCode":"44"},{"code":"445321","name":"新兴县","cityCode":"4453","provinceCode":"44"},{"code":"445322","name":"郁南县","cityCode":"4453","provinceCode":"44"},{"code":"445381","name":"罗定市","cityCode":"4453","provinceCode":"44"},{"code":"450102","name":"兴宁区","cityCode":"4501","provinceCode":"45"},{"code":"450103","name":"青秀区","cityCode":"4501","provinceCode":"45"},{"code":"450105","name":"江南区","cityCode":"4501","provinceCode":"45"},{"code":"450107","name":"西乡塘区","cityCode":"4501","provinceCode":"45"},{"code":"450108","name":"良庆区","cityCode":"4501","provinceCode":"45"},{"code":"450109","name":"邕宁区","cityCode":"4501","provinceCode":"45"},{"code":"450110","name":"武鸣区","cityCode":"4501","provinceCode":"45"},{"code":"450123","name":"隆安县","cityCode":"4501","provinceCode":"45"},{"code":"450124","name":"马山县","cityCode":"4501","provinceCode":"45"},{"code":"450125","name":"上林县","cityCode":"4501","provinceCode":"45"},{"code":"450126","name":"宾阳县","cityCode":"4501","provinceCode":"45"},{"code":"450127","name":"横县","cityCode":"4501","provinceCode":"45"},{"code":"450202","name":"城中区","cityCode":"4502","provinceCode":"45"},{"code":"450203","name":"鱼峰区","cityCode":"4502","provinceCode":"45"},{"code":"450204","name":"柳南区","cityCode":"4502","provinceCode":"45"},{"code":"450205","name":"柳北区","cityCode":"4502","provinceCode":"45"},{"code":"450206","name":"柳江区","cityCode":"4502","provinceCode":"45"},{"code":"450222","name":"柳城县","cityCode":"4502","provinceCode":"45"},{"code":"450223","name":"鹿寨县","cityCode":"4502","provinceCode":"45"},{"code":"450224","name":"融安县","cityCode":"4502","provinceCode":"45"},{"code":"450225","name":"融水苗族自治县","cityCode":"4502","provinceCode":"45"},{"code":"450226","name":"三江侗族自治县","cityCode":"4502","provinceCode":"45"},{"code":"450302","name":"秀峰区","cityCode":"4503","provinceCode":"45"},{"code":"450303","name":"叠彩区","cityCode":"4503","provinceCode":"45"},{"code":"450304","name":"象山区","cityCode":"4503","provinceCode":"45"},{"code":"450305","name":"七星区","cityCode":"4503","provinceCode":"45"},{"code":"450311","name":"雁山区","cityCode":"4503","provinceCode":"45"},{"code":"450312","name":"临桂区","cityCode":"4503","provinceCode":"45"},{"code":"450321","name":"阳朔县","cityCode":"4503","provinceCode":"45"},{"code":"450323","name":"灵川县","cityCode":"4503","provinceCode":"45"},{"code":"450324","name":"全州县","cityCode":"4503","provinceCode":"45"},{"code":"450325","name":"兴安县","cityCode":"4503","provinceCode":"45"},{"code":"450326","name":"永福县","cityCode":"4503","provinceCode":"45"},{"code":"450327","name":"灌阳县","cityCode":"4503","provinceCode":"45"},{"code":"450328","name":"龙胜各族自治县","cityCode":"4503","provinceCode":"45"},{"code":"450329","name":"资源县","cityCode":"4503","provinceCode":"45"},{"code":"450330","name":"平乐县","cityCode":"4503","provinceCode":"45"},{"code":"450331","name":"荔浦县","cityCode":"4503","provinceCode":"45"},{"code":"450332","name":"恭城瑶族自治县","cityCode":"4503","provinceCode":"45"},{"code":"450403","name":"万秀区","cityCode":"4504","provinceCode":"45"},{"code":"450405","name":"长洲区","cityCode":"4504","provinceCode":"45"},{"code":"450406","name":"龙圩区","cityCode":"4504","provinceCode":"45"},{"code":"450421","name":"苍梧县","cityCode":"4504","provinceCode":"45"},{"code":"450422","name":"藤县","cityCode":"4504","provinceCode":"45"},{"code":"450423","name":"蒙山县","cityCode":"4504","provinceCode":"45"},{"code":"450481","name":"岑溪市","cityCode":"4504","provinceCode":"45"},{"code":"450502","name":"海城区","cityCode":"4505","provinceCode":"45"},{"code":"450503","name":"银海区","cityCode":"4505","provinceCode":"45"},{"code":"450512","name":"铁山港区","cityCode":"4505","provinceCode":"45"},{"code":"450521","name":"合浦县","cityCode":"4505","provinceCode":"45"},{"code":"450602","name":"港口区","cityCode":"4506","provinceCode":"45"},{"code":"450603","name":"防城区","cityCode":"4506","provinceCode":"45"},{"code":"450621","name":"上思县","cityCode":"4506","provinceCode":"45"},{"code":"450681","name":"东兴市","cityCode":"4506","provinceCode":"45"},{"code":"450702","name":"钦南区","cityCode":"4507","provinceCode":"45"},{"code":"450703","name":"钦北区","cityCode":"4507","provinceCode":"45"},{"code":"450721","name":"灵山县","cityCode":"4507","provinceCode":"45"},{"code":"450722","name":"浦北县","cityCode":"4507","provinceCode":"45"},{"code":"450802","name":"港北区","cityCode":"4508","provinceCode":"45"},{"code":"450803","name":"港南区","cityCode":"4508","provinceCode":"45"},{"code":"450804","name":"覃塘区","cityCode":"4508","provinceCode":"45"},{"code":"450821","name":"平南县","cityCode":"4508","provinceCode":"45"},{"code":"450881","name":"桂平市","cityCode":"4508","provinceCode":"45"},{"code":"450902","name":"玉州区","cityCode":"4509","provinceCode":"45"},{"code":"450903","name":"福绵区","cityCode":"4509","provinceCode":"45"},{"code":"450921","name":"容县","cityCode":"4509","provinceCode":"45"},{"code":"450922","name":"陆川县","cityCode":"4509","provinceCode":"45"},{"code":"450923","name":"博白县","cityCode":"4509","provinceCode":"45"},{"code":"450924","name":"兴业县","cityCode":"4509","provinceCode":"45"},{"code":"450981","name":"北流市","cityCode":"4509","provinceCode":"45"},{"code":"451002","name":"右江区","cityCode":"4510","provinceCode":"45"},{"code":"451021","name":"田阳县","cityCode":"4510","provinceCode":"45"},{"code":"451022","name":"田东县","cityCode":"4510","provinceCode":"45"},{"code":"451023","name":"平果县","cityCode":"4510","provinceCode":"45"},{"code":"451024","name":"德保县","cityCode":"4510","provinceCode":"45"},{"code":"451026","name":"那坡县","cityCode":"4510","provinceCode":"45"},{"code":"451027","name":"凌云县","cityCode":"4510","provinceCode":"45"},{"code":"451028","name":"乐业县","cityCode":"4510","provinceCode":"45"},{"code":"451029","name":"田林县","cityCode":"4510","provinceCode":"45"},{"code":"451030","name":"西林县","cityCode":"4510","provinceCode":"45"},{"code":"451031","name":"隆林各族自治县","cityCode":"4510","provinceCode":"45"},{"code":"451081","name":"靖西市","cityCode":"4510","provinceCode":"45"},{"code":"451102","name":"八步区","cityCode":"4511","provinceCode":"45"},{"code":"451103","name":"平桂区","cityCode":"4511","provinceCode":"45"},{"code":"451121","name":"昭平县","cityCode":"4511","provinceCode":"45"},{"code":"451122","name":"钟山县","cityCode":"4511","provinceCode":"45"},{"code":"451123","name":"富川瑶族自治县","cityCode":"4511","provinceCode":"45"},{"code":"451202","name":"金城江区","cityCode":"4512","provinceCode":"45"},{"code":"451221","name":"南丹县","cityCode":"4512","provinceCode":"45"},{"code":"451222","name":"天峨县","cityCode":"4512","provinceCode":"45"},{"code":"451223","name":"凤山县","cityCode":"4512","provinceCode":"45"},{"code":"451224","name":"东兰县","cityCode":"4512","provinceCode":"45"},{"code":"451225","name":"罗城仫佬族自治县","cityCode":"4512","provinceCode":"45"},{"code":"451226","name":"环江毛南族自治县","cityCode":"4512","provinceCode":"45"},{"code":"451227","name":"巴马瑶族自治县","cityCode":"4512","provinceCode":"45"},{"code":"451228","name":"都安瑶族自治县","cityCode":"4512","provinceCode":"45"},{"code":"451229","name":"大化瑶族自治县","cityCode":"4512","provinceCode":"45"},{"code":"451281","name":"宜州市","cityCode":"4512","provinceCode":"45"},{"code":"451302","name":"兴宾区","cityCode":"4513","provinceCode":"45"},{"code":"451321","name":"忻城县","cityCode":"4513","provinceCode":"45"},{"code":"451322","name":"象州县","cityCode":"4513","provinceCode":"45"},{"code":"451323","name":"武宣县","cityCode":"4513","provinceCode":"45"},{"code":"451324","name":"金秀瑶族自治县","cityCode":"4513","provinceCode":"45"},{"code":"451381","name":"合山市","cityCode":"4513","provinceCode":"45"},{"code":"451402","name":"江州区","cityCode":"4514","provinceCode":"45"},{"code":"451421","name":"扶绥县","cityCode":"4514","provinceCode":"45"},{"code":"451422","name":"宁明县","cityCode":"4514","provinceCode":"45"},{"code":"451423","name":"龙州县","cityCode":"4514","provinceCode":"45"},{"code":"451424","name":"大新县","cityCode":"4514","provinceCode":"45"},{"code":"451425","name":"天等县","cityCode":"4514","provinceCode":"45"},{"code":"451481","name":"凭祥市","cityCode":"4514","provinceCode":"45"},{"code":"460105","name":"秀英区","cityCode":"4601","provinceCode":"46"},{"code":"460106","name":"龙华区","cityCode":"4601","provinceCode":"46"},{"code":"460107","name":"琼山区","cityCode":"4601","provinceCode":"46"},{"code":"460108","name":"美兰区","cityCode":"4601","provinceCode":"46"},{"code":"460201","name":"市辖区","cityCode":"4602","provinceCode":"46"},{"code":"460202","name":"海棠区","cityCode":"4602","provinceCode":"46"},{"code":"460203","name":"吉阳区","cityCode":"4602","provinceCode":"46"},{"code":"460204","name":"天涯区","cityCode":"4602","provinceCode":"46"},{"code":"460205","name":"崖州区","cityCode":"4602","provinceCode":"46"},{"code":"460321","name":"西沙群岛","cityCode":"4603","provinceCode":"46"},{"code":"460322","name":"南沙群岛","cityCode":"4603","provinceCode":"46"},{"code":"460323","name":"中沙群岛的岛礁及其海域","cityCode":"4603","provinceCode":"46"},{"code":"460400","name":"儋州市","cityCode":"4604","provinceCode":"46"},{"code":"469001","name":"五指山市","cityCode":"4690","provinceCode":"46"},{"code":"469002","name":"琼海市","cityCode":"4690","provinceCode":"46"},{"code":"469005","name":"文昌市","cityCode":"4690","provinceCode":"46"},{"code":"469006","name":"万宁市","cityCode":"4690","provinceCode":"46"},{"code":"469007","name":"东方市","cityCode":"4690","provinceCode":"46"},{"code":"469021","name":"定安县","cityCode":"4690","provinceCode":"46"},{"code":"469022","name":"屯昌县","cityCode":"4690","provinceCode":"46"},{"code":"469023","name":"澄迈县","cityCode":"4690","provinceCode":"46"},{"code":"469024","name":"临高县","cityCode":"4690","provinceCode":"46"},{"code":"469025","name":"白沙黎族自治县","cityCode":"4690","provinceCode":"46"},{"code":"469026","name":"昌江黎族自治县","cityCode":"4690","provinceCode":"46"},{"code":"469027","name":"乐东黎族自治县","cityCode":"4690","provinceCode":"46"},{"code":"469028","name":"陵水黎族自治县","cityCode":"4690","provinceCode":"46"},{"code":"469029","name":"保亭黎族苗族自治县","cityCode":"4690","provinceCode":"46"},{"code":"469030","name":"琼中黎族苗族自治县","cityCode":"4690","provinceCode":"46"},{"code":"500101","name":"万州区","cityCode":"5001","provinceCode":"50"},{"code":"500102","name":"涪陵区","cityCode":"5001","provinceCode":"50"},{"code":"500103","name":"渝中区","cityCode":"5001","provinceCode":"50"},{"code":"500104","name":"大渡口区","cityCode":"5001","provinceCode":"50"},{"code":"500105","name":"江北区","cityCode":"5001","provinceCode":"50"},{"code":"500106","name":"沙坪坝区","cityCode":"5001","provinceCode":"50"},{"code":"500107","name":"九龙坡区","cityCode":"5001","provinceCode":"50"},{"code":"500108","name":"南岸区","cityCode":"5001","provinceCode":"50"},{"code":"500109","name":"北碚区","cityCode":"5001","provinceCode":"50"},{"code":"500110","name":"綦江区","cityCode":"5001","provinceCode":"50"},{"code":"500111","name":"大足区","cityCode":"5001","provinceCode":"50"},{"code":"500112","name":"渝北区","cityCode":"5001","provinceCode":"50"},{"code":"500113","name":"巴南区","cityCode":"5001","provinceCode":"50"},{"code":"500114","name":"黔江区","cityCode":"5001","provinceCode":"50"},{"code":"500115","name":"长寿区","cityCode":"5001","provinceCode":"50"},{"code":"500116","name":"江津区","cityCode":"5001","provinceCode":"50"},{"code":"500117","name":"合川区","cityCode":"5001","provinceCode":"50"},{"code":"500118","name":"永川区","cityCode":"5001","provinceCode":"50"},{"code":"500119","name":"南川区","cityCode":"5001","provinceCode":"50"},{"code":"500120","name":"璧山区","cityCode":"5001","provinceCode":"50"},{"code":"500151","name":"铜梁区","cityCode":"5001","provinceCode":"50"},{"code":"500152","name":"潼南区","cityCode":"5001","provinceCode":"50"},{"code":"500153","name":"荣昌区","cityCode":"5001","provinceCode":"50"},{"code":"500154","name":"开州区","cityCode":"5001","provinceCode":"50"},{"code":"500228","name":"梁平县","cityCode":"5002","provinceCode":"50"},{"code":"500229","name":"城口县","cityCode":"5002","provinceCode":"50"},{"code":"500230","name":"丰都县","cityCode":"5002","provinceCode":"50"},{"code":"500231","name":"垫江县","cityCode":"5002","provinceCode":"50"},{"code":"500232","name":"武隆县","cityCode":"5002","provinceCode":"50"},{"code":"500233","name":"忠县","cityCode":"5002","provinceCode":"50"},{"code":"500235","name":"云阳县","cityCode":"5002","provinceCode":"50"},{"code":"500236","name":"奉节县","cityCode":"5002","provinceCode":"50"},{"code":"500237","name":"巫山县","cityCode":"5002","provinceCode":"50"},{"code":"500238","name":"巫溪县","cityCode":"5002","provinceCode":"50"},{"code":"500240","name":"石柱土家族自治县","cityCode":"5002","provinceCode":"50"},{"code":"500241","name":"秀山土家族苗族自治县","cityCode":"5002","provinceCode":"50"},{"code":"500242","name":"酉阳土家族苗族自治县","cityCode":"5002","provinceCode":"50"},{"code":"500243","name":"彭水苗族土家族自治县","cityCode":"5002","provinceCode":"50"},{"code":"510104","name":"锦江区","cityCode":"5101","provinceCode":"51"},{"code":"510105","name":"青羊区","cityCode":"5101","provinceCode":"51"},{"code":"510106","name":"金牛区","cityCode":"5101","provinceCode":"51"},{"code":"510107","name":"武侯区","cityCode":"5101","provinceCode":"51"},{"code":"510108","name":"成华区","cityCode":"5101","provinceCode":"51"},{"code":"510112","name":"龙泉驿区","cityCode":"5101","provinceCode":"51"},{"code":"510113","name":"青白江区","cityCode":"5101","provinceCode":"51"},{"code":"510114","name":"新都区","cityCode":"5101","provinceCode":"51"},{"code":"510115","name":"温江区","cityCode":"5101","provinceCode":"51"},{"code":"510116","name":"双流区","cityCode":"5101","provinceCode":"51"},{"code":"510121","name":"金堂县","cityCode":"5101","provinceCode":"51"},{"code":"510124","name":"郫县","cityCode":"5101","provinceCode":"51"},{"code":"510129","name":"大邑县","cityCode":"5101","provinceCode":"51"},{"code":"510131","name":"蒲江县","cityCode":"5101","provinceCode":"51"},{"code":"510132","name":"新津县","cityCode":"5101","provinceCode":"51"},{"code":"510181","name":"都江堰市","cityCode":"5101","provinceCode":"51"},{"code":"510182","name":"彭州市","cityCode":"5101","provinceCode":"51"},{"code":"510183","name":"邛崃市","cityCode":"5101","provinceCode":"51"},{"code":"510184","name":"崇州市","cityCode":"5101","provinceCode":"51"},{"code":"510185","name":"简阳市","cityCode":"5101","provinceCode":"51"},{"code":"510302","name":"自流井区","cityCode":"5103","provinceCode":"51"},{"code":"510303","name":"贡井区","cityCode":"5103","provinceCode":"51"},{"code":"510304","name":"大安区","cityCode":"5103","provinceCode":"51"},{"code":"510311","name":"沿滩区","cityCode":"5103","provinceCode":"51"},{"code":"510321","name":"荣县","cityCode":"5103","provinceCode":"51"},{"code":"510322","name":"富顺县","cityCode":"5103","provinceCode":"51"},{"code":"510402","name":"东区","cityCode":"5104","provinceCode":"51"},{"code":"510403","name":"西区","cityCode":"5104","provinceCode":"51"},{"code":"510411","name":"仁和区","cityCode":"5104","provinceCode":"51"},{"code":"510421","name":"米易县","cityCode":"5104","provinceCode":"51"},{"code":"510422","name":"盐边县","cityCode":"5104","provinceCode":"51"},{"code":"510502","name":"江阳区","cityCode":"5105","provinceCode":"51"},{"code":"510503","name":"纳溪区","cityCode":"5105","provinceCode":"51"},{"code":"510504","name":"龙马潭区","cityCode":"5105","provinceCode":"51"},{"code":"510521","name":"泸县","cityCode":"5105","provinceCode":"51"},{"code":"510522","name":"合江县","cityCode":"5105","provinceCode":"51"},{"code":"510524","name":"叙永县","cityCode":"5105","provinceCode":"51"},{"code":"510525","name":"古蔺县","cityCode":"5105","provinceCode":"51"},{"code":"510603","name":"旌阳区","cityCode":"5106","provinceCode":"51"},{"code":"510623","name":"中江县","cityCode":"5106","provinceCode":"51"},{"code":"510626","name":"罗江县","cityCode":"5106","provinceCode":"51"},{"code":"510681","name":"广汉市","cityCode":"5106","provinceCode":"51"},{"code":"510682","name":"什邡市","cityCode":"5106","provinceCode":"51"},{"code":"510683","name":"绵竹市","cityCode":"5106","provinceCode":"51"},{"code":"510703","name":"涪城区","cityCode":"5107","provinceCode":"51"},{"code":"510704","name":"游仙区","cityCode":"5107","provinceCode":"51"},{"code":"510705","name":"安州区","cityCode":"5107","provinceCode":"51"},{"code":"510722","name":"三台县","cityCode":"5107","provinceCode":"51"},{"code":"510723","name":"盐亭县","cityCode":"5107","provinceCode":"51"},{"code":"510725","name":"梓潼县","cityCode":"5107","provinceCode":"51"},{"code":"510726","name":"北川羌族自治县","cityCode":"5107","provinceCode":"51"},{"code":"510727","name":"平武县","cityCode":"5107","provinceCode":"51"},{"code":"510781","name":"江油市","cityCode":"5107","provinceCode":"51"},{"code":"510802","name":"利州区","cityCode":"5108","provinceCode":"51"},{"code":"510811","name":"昭化区","cityCode":"5108","provinceCode":"51"},{"code":"510812","name":"朝天区","cityCode":"5108","provinceCode":"51"},{"code":"510821","name":"旺苍县","cityCode":"5108","provinceCode":"51"},{"code":"510822","name":"青川县","cityCode":"5108","provinceCode":"51"},{"code":"510823","name":"剑阁县","cityCode":"5108","provinceCode":"51"},{"code":"510824","name":"苍溪县","cityCode":"5108","provinceCode":"51"},{"code":"510903","name":"船山区","cityCode":"5109","provinceCode":"51"},{"code":"510904","name":"安居区","cityCode":"5109","provinceCode":"51"},{"code":"510921","name":"蓬溪县","cityCode":"5109","provinceCode":"51"},{"code":"510922","name":"射洪县","cityCode":"5109","provinceCode":"51"},{"code":"510923","name":"大英县","cityCode":"5109","provinceCode":"51"},{"code":"511002","name":"市中区","cityCode":"5110","provinceCode":"51"},{"code":"511011","name":"东兴区","cityCode":"5110","provinceCode":"51"},{"code":"511024","name":"威远县","cityCode":"5110","provinceCode":"51"},{"code":"511025","name":"资中县","cityCode":"5110","provinceCode":"51"},{"code":"511028","name":"隆昌县","cityCode":"5110","provinceCode":"51"},{"code":"511102","name":"市中区","cityCode":"5111","provinceCode":"51"},{"code":"511111","name":"沙湾区","cityCode":"5111","provinceCode":"51"},{"code":"511112","name":"五通桥区","cityCode":"5111","provinceCode":"51"},{"code":"511113","name":"金口河区","cityCode":"5111","provinceCode":"51"},{"code":"511123","name":"犍为县","cityCode":"5111","provinceCode":"51"},{"code":"511124","name":"井研县","cityCode":"5111","provinceCode":"51"},{"code":"511126","name":"夹江县","cityCode":"5111","provinceCode":"51"},{"code":"511129","name":"沐川县","cityCode":"5111","provinceCode":"51"},{"code":"511132","name":"峨边彝族自治县","cityCode":"5111","provinceCode":"51"},{"code":"511133","name":"马边彝族自治县","cityCode":"5111","provinceCode":"51"},{"code":"511181","name":"峨眉山市","cityCode":"5111","provinceCode":"51"},{"code":"511302","name":"顺庆区","cityCode":"5113","provinceCode":"51"},{"code":"511303","name":"高坪区","cityCode":"5113","provinceCode":"51"},{"code":"511304","name":"嘉陵区","cityCode":"5113","provinceCode":"51"},{"code":"511321","name":"南部县","cityCode":"5113","provinceCode":"51"},{"code":"511322","name":"营山县","cityCode":"5113","provinceCode":"51"},{"code":"511323","name":"蓬安县","cityCode":"5113","provinceCode":"51"},{"code":"511324","name":"仪陇县","cityCode":"5113","provinceCode":"51"},{"code":"511325","name":"西充县","cityCode":"5113","provinceCode":"51"},{"code":"511381","name":"阆中市","cityCode":"5113","provinceCode":"51"},{"code":"511402","name":"东坡区","cityCode":"5114","provinceCode":"51"},{"code":"511403","name":"彭山区","cityCode":"5114","provinceCode":"51"},{"code":"511421","name":"仁寿县","cityCode":"5114","provinceCode":"51"},{"code":"511423","name":"洪雅县","cityCode":"5114","provinceCode":"51"},{"code":"511424","name":"丹棱县","cityCode":"5114","provinceCode":"51"},{"code":"511425","name":"青神县","cityCode":"5114","provinceCode":"51"},{"code":"511502","name":"翠屏区","cityCode":"5115","provinceCode":"51"},{"code":"511503","name":"南溪区","cityCode":"5115","provinceCode":"51"},{"code":"511521","name":"宜宾县","cityCode":"5115","provinceCode":"51"},{"code":"511523","name":"江安县","cityCode":"5115","provinceCode":"51"},{"code":"511524","name":"长宁县","cityCode":"5115","provinceCode":"51"},{"code":"511525","name":"高县","cityCode":"5115","provinceCode":"51"},{"code":"511526","name":"珙县","cityCode":"5115","provinceCode":"51"},{"code":"511527","name":"筠连县","cityCode":"5115","provinceCode":"51"},{"code":"511528","name":"兴文县","cityCode":"5115","provinceCode":"51"},{"code":"511529","name":"屏山县","cityCode":"5115","provinceCode":"51"},{"code":"511602","name":"广安区","cityCode":"5116","provinceCode":"51"},{"code":"511603","name":"前锋区","cityCode":"5116","provinceCode":"51"},{"code":"511621","name":"岳池县","cityCode":"5116","provinceCode":"51"},{"code":"511622","name":"武胜县","cityCode":"5116","provinceCode":"51"},{"code":"511623","name":"邻水县","cityCode":"5116","provinceCode":"51"},{"code":"511681","name":"华蓥市","cityCode":"5116","provinceCode":"51"},{"code":"511702","name":"通川区","cityCode":"5117","provinceCode":"51"},{"code":"511703","name":"达川区","cityCode":"5117","provinceCode":"51"},{"code":"511722","name":"宣汉县","cityCode":"5117","provinceCode":"51"},{"code":"511723","name":"开江县","cityCode":"5117","provinceCode":"51"},{"code":"511724","name":"大竹县","cityCode":"5117","provinceCode":"51"},{"code":"511725","name":"渠县","cityCode":"5117","provinceCode":"51"},{"code":"511781","name":"万源市","cityCode":"5117","provinceCode":"51"},{"code":"511802","name":"雨城区","cityCode":"5118","provinceCode":"51"},{"code":"511803","name":"名山区","cityCode":"5118","provinceCode":"51"},{"code":"511822","name":"荥经县","cityCode":"5118","provinceCode":"51"},{"code":"511823","name":"汉源县","cityCode":"5118","provinceCode":"51"},{"code":"511824","name":"石棉县","cityCode":"5118","provinceCode":"51"},{"code":"511825","name":"天全县","cityCode":"5118","provinceCode":"51"},{"code":"511826","name":"芦山县","cityCode":"5118","provinceCode":"51"},{"code":"511827","name":"宝兴县","cityCode":"5118","provinceCode":"51"},{"code":"511902","name":"巴州区","cityCode":"5119","provinceCode":"51"},{"code":"511903","name":"恩阳区","cityCode":"5119","provinceCode":"51"},{"code":"511921","name":"通江县","cityCode":"5119","provinceCode":"51"},{"code":"511922","name":"南江县","cityCode":"5119","provinceCode":"51"},{"code":"511923","name":"平昌县","cityCode":"5119","provinceCode":"51"},{"code":"512002","name":"雁江区","cityCode":"5120","provinceCode":"51"},{"code":"512021","name":"安岳县","cityCode":"5120","provinceCode":"51"},{"code":"512022","name":"乐至县","cityCode":"5120","provinceCode":"51"},{"code":"513201","name":"马尔康市","cityCode":"5132","provinceCode":"51"},{"code":"513221","name":"汶川县","cityCode":"5132","provinceCode":"51"},{"code":"513222","name":"理县","cityCode":"5132","provinceCode":"51"},{"code":"513223","name":"茂县","cityCode":"5132","provinceCode":"51"},{"code":"513224","name":"松潘县","cityCode":"5132","provinceCode":"51"},{"code":"513225","name":"九寨沟县","cityCode":"5132","provinceCode":"51"},{"code":"513226","name":"金川县","cityCode":"5132","provinceCode":"51"},{"code":"513227","name":"小金县","cityCode":"5132","provinceCode":"51"},{"code":"513228","name":"黑水县","cityCode":"5132","provinceCode":"51"},{"code":"513230","name":"壤塘县","cityCode":"5132","provinceCode":"51"},{"code":"513231","name":"阿坝县","cityCode":"5132","provinceCode":"51"},{"code":"513232","name":"若尔盖县","cityCode":"5132","provinceCode":"51"},{"code":"513233","name":"红原县","cityCode":"5132","provinceCode":"51"},{"code":"513301","name":"康定市","cityCode":"5133","provinceCode":"51"},{"code":"513322","name":"泸定县","cityCode":"5133","provinceCode":"51"},{"code":"513323","name":"丹巴县","cityCode":"5133","provinceCode":"51"},{"code":"513324","name":"九龙县","cityCode":"5133","provinceCode":"51"},{"code":"513325","name":"雅江县","cityCode":"5133","provinceCode":"51"},{"code":"513326","name":"道孚县","cityCode":"5133","provinceCode":"51"},{"code":"513327","name":"炉霍县","cityCode":"5133","provinceCode":"51"},{"code":"513328","name":"甘孜县","cityCode":"5133","provinceCode":"51"},{"code":"513329","name":"新龙县","cityCode":"5133","provinceCode":"51"},{"code":"513330","name":"德格县","cityCode":"5133","provinceCode":"51"},{"code":"513331","name":"白玉县","cityCode":"5133","provinceCode":"51"},{"code":"513332","name":"石渠县","cityCode":"5133","provinceCode":"51"},{"code":"513333","name":"色达县","cityCode":"5133","provinceCode":"51"},{"code":"513334","name":"理塘县","cityCode":"5133","provinceCode":"51"},{"code":"513335","name":"巴塘县","cityCode":"5133","provinceCode":"51"},{"code":"513336","name":"乡城县","cityCode":"5133","provinceCode":"51"},{"code":"513337","name":"稻城县","cityCode":"5133","provinceCode":"51"},{"code":"513338","name":"得荣县","cityCode":"5133","provinceCode":"51"},{"code":"513401","name":"西昌市","cityCode":"5134","provinceCode":"51"},{"code":"513422","name":"木里藏族自治县","cityCode":"5134","provinceCode":"51"},{"code":"513423","name":"盐源县","cityCode":"5134","provinceCode":"51"},{"code":"513424","name":"德昌县","cityCode":"5134","provinceCode":"51"},{"code":"513425","name":"会理县","cityCode":"5134","provinceCode":"51"},{"code":"513426","name":"会东县","cityCode":"5134","provinceCode":"51"},{"code":"513427","name":"宁南县","cityCode":"5134","provinceCode":"51"},{"code":"513428","name":"普格县","cityCode":"5134","provinceCode":"51"},{"code":"513429","name":"布拖县","cityCode":"5134","provinceCode":"51"},{"code":"513430","name":"金阳县","cityCode":"5134","provinceCode":"51"},{"code":"513431","name":"昭觉县","cityCode":"5134","provinceCode":"51"},{"code":"513432","name":"喜德县","cityCode":"5134","provinceCode":"51"},{"code":"513433","name":"冕宁县","cityCode":"5134","provinceCode":"51"},{"code":"513434","name":"越西县","cityCode":"5134","provinceCode":"51"},{"code":"513435","name":"甘洛县","cityCode":"5134","provinceCode":"51"},{"code":"513436","name":"美姑县","cityCode":"5134","provinceCode":"51"},{"code":"513437","name":"雷波县","cityCode":"5134","provinceCode":"51"},{"code":"520102","name":"南明区","cityCode":"5201","provinceCode":"52"},{"code":"520103","name":"云岩区","cityCode":"5201","provinceCode":"52"},{"code":"520111","name":"花溪区","cityCode":"5201","provinceCode":"52"},{"code":"520112","name":"乌当区","cityCode":"5201","provinceCode":"52"},{"code":"520113","name":"白云区","cityCode":"5201","provinceCode":"52"},{"code":"520115","name":"观山湖区","cityCode":"5201","provinceCode":"52"},{"code":"520121","name":"开阳县","cityCode":"5201","provinceCode":"52"},{"code":"520122","name":"息烽县","cityCode":"5201","provinceCode":"52"},{"code":"520123","name":"修文县","cityCode":"5201","provinceCode":"52"},{"code":"520181","name":"清镇市","cityCode":"5201","provinceCode":"52"},{"code":"520201","name":"钟山区","cityCode":"5202","provinceCode":"52"},{"code":"520203","name":"六枝特区","cityCode":"5202","provinceCode":"52"},{"code":"520221","name":"水城县","cityCode":"5202","provinceCode":"52"},{"code":"520222","name":"盘县","cityCode":"5202","provinceCode":"52"},{"code":"520302","name":"红花岗区","cityCode":"5203","provinceCode":"52"},{"code":"520303","name":"汇川区","cityCode":"5203","provinceCode":"52"},{"code":"520304","name":"播州区","cityCode":"5203","provinceCode":"52"},{"code":"520322","name":"桐梓县","cityCode":"5203","provinceCode":"52"},{"code":"520323","name":"绥阳县","cityCode":"5203","provinceCode":"52"},{"code":"520324","name":"正安县","cityCode":"5203","provinceCode":"52"},{"code":"520325","name":"道真仡佬族苗族自治县","cityCode":"5203","provinceCode":"52"},{"code":"520326","name":"务川仡佬族苗族自治县","cityCode":"5203","provinceCode":"52"},{"code":"520327","name":"凤冈县","cityCode":"5203","provinceCode":"52"},{"code":"520328","name":"湄潭县","cityCode":"5203","provinceCode":"52"},{"code":"520329","name":"余庆县","cityCode":"5203","provinceCode":"52"},{"code":"520330","name":"习水县","cityCode":"5203","provinceCode":"52"},{"code":"520381","name":"赤水市","cityCode":"5203","provinceCode":"52"},{"code":"520382","name":"仁怀市","cityCode":"5203","provinceCode":"52"},{"code":"520402","name":"西秀区","cityCode":"5204","provinceCode":"52"},{"code":"520403","name":"平坝区","cityCode":"5204","provinceCode":"52"},{"code":"520422","name":"普定县","cityCode":"5204","provinceCode":"52"},{"code":"520423","name":"镇宁布依族苗族自治县","cityCode":"5204","provinceCode":"52"},{"code":"520424","name":"关岭布依族苗族自治县","cityCode":"5204","provinceCode":"52"},{"code":"520425","name":"紫云苗族布依族自治县","cityCode":"5204","provinceCode":"52"},{"code":"520502","name":"七星关区","cityCode":"5205","provinceCode":"52"},{"code":"520521","name":"大方县","cityCode":"5205","provinceCode":"52"},{"code":"520522","name":"黔西县","cityCode":"5205","provinceCode":"52"},{"code":"520523","name":"金沙县","cityCode":"5205","provinceCode":"52"},{"code":"520524","name":"织金县","cityCode":"5205","provinceCode":"52"},{"code":"520525","name":"纳雍县","cityCode":"5205","provinceCode":"52"},{"code":"520526","name":"威宁彝族回族苗族自治县","cityCode":"5205","provinceCode":"52"},{"code":"520527","name":"赫章县","cityCode":"5205","provinceCode":"52"},{"code":"520602","name":"碧江区","cityCode":"5206","provinceCode":"52"},{"code":"520603","name":"万山区","cityCode":"5206","provinceCode":"52"},{"code":"520621","name":"江口县","cityCode":"5206","provinceCode":"52"},{"code":"520622","name":"玉屏侗族自治县","cityCode":"5206","provinceCode":"52"},{"code":"520623","name":"石阡县","cityCode":"5206","provinceCode":"52"},{"code":"520624","name":"思南县","cityCode":"5206","provinceCode":"52"},{"code":"520625","name":"印江土家族苗族自治县","cityCode":"5206","provinceCode":"52"},{"code":"520626","name":"德江县","cityCode":"5206","provinceCode":"52"},{"code":"520627","name":"沿河土家族自治县","cityCode":"5206","provinceCode":"52"},{"code":"520628","name":"松桃苗族自治县","cityCode":"5206","provinceCode":"52"},{"code":"522301","name":"兴义市","cityCode":"5223","provinceCode":"52"},{"code":"522322","name":"兴仁县","cityCode":"5223","provinceCode":"52"},{"code":"522323","name":"普安县","cityCode":"5223","provinceCode":"52"},{"code":"522324","name":"晴隆县","cityCode":"5223","provinceCode":"52"},{"code":"522325","name":"贞丰县","cityCode":"5223","provinceCode":"52"},{"code":"522326","name":"望谟县","cityCode":"5223","provinceCode":"52"},{"code":"522327","name":"册亨县","cityCode":"5223","provinceCode":"52"},{"code":"522328","name":"安龙县","cityCode":"5223","provinceCode":"52"},{"code":"522601","name":"凯里市","cityCode":"5226","provinceCode":"52"},{"code":"522622","name":"黄平县","cityCode":"5226","provinceCode":"52"},{"code":"522623","name":"施秉县","cityCode":"5226","provinceCode":"52"},{"code":"522624","name":"三穗县","cityCode":"5226","provinceCode":"52"},{"code":"522625","name":"镇远县","cityCode":"5226","provinceCode":"52"},{"code":"522626","name":"岑巩县","cityCode":"5226","provinceCode":"52"},{"code":"522627","name":"天柱县","cityCode":"5226","provinceCode":"52"},{"code":"522628","name":"锦屏县","cityCode":"5226","provinceCode":"52"},{"code":"522629","name":"剑河县","cityCode":"5226","provinceCode":"52"},{"code":"522630","name":"台江县","cityCode":"5226","provinceCode":"52"},{"code":"522631","name":"黎平县","cityCode":"5226","provinceCode":"52"},{"code":"522632","name":"榕江县","cityCode":"5226","provinceCode":"52"},{"code":"522633","name":"从江县","cityCode":"5226","provinceCode":"52"},{"code":"522634","name":"雷山县","cityCode":"5226","provinceCode":"52"},{"code":"522635","name":"麻江县","cityCode":"5226","provinceCode":"52"},{"code":"522636","name":"丹寨县","cityCode":"5226","provinceCode":"52"},{"code":"522701","name":"都匀市","cityCode":"5227","provinceCode":"52"},{"code":"522702","name":"福泉市","cityCode":"5227","provinceCode":"52"},{"code":"522722","name":"荔波县","cityCode":"5227","provinceCode":"52"},{"code":"522723","name":"贵定县","cityCode":"5227","provinceCode":"52"},{"code":"522725","name":"瓮安县","cityCode":"5227","provinceCode":"52"},{"code":"522726","name":"独山县","cityCode":"5227","provinceCode":"52"},{"code":"522727","name":"平塘县","cityCode":"5227","provinceCode":"52"},{"code":"522728","name":"罗甸县","cityCode":"5227","provinceCode":"52"},{"code":"522729","name":"长顺县","cityCode":"5227","provinceCode":"52"},{"code":"522730","name":"龙里县","cityCode":"5227","provinceCode":"52"},{"code":"522731","name":"惠水县","cityCode":"5227","provinceCode":"52"},{"code":"522732","name":"三都水族自治县","cityCode":"5227","provinceCode":"52"},{"code":"530102","name":"五华区","cityCode":"5301","provinceCode":"53"},{"code":"530103","name":"盘龙区","cityCode":"5301","provinceCode":"53"},{"code":"530111","name":"官渡区","cityCode":"5301","provinceCode":"53"},{"code":"530112","name":"西山区","cityCode":"5301","provinceCode":"53"},{"code":"530113","name":"东川区","cityCode":"5301","provinceCode":"53"},{"code":"530114","name":"呈贡区","cityCode":"5301","provinceCode":"53"},{"code":"530122","name":"晋宁县","cityCode":"5301","provinceCode":"53"},{"code":"530124","name":"富民县","cityCode":"5301","provinceCode":"53"},{"code":"530125","name":"宜良县","cityCode":"5301","provinceCode":"53"},{"code":"530126","name":"石林彝族自治县","cityCode":"5301","provinceCode":"53"},{"code":"530127","name":"嵩明县","cityCode":"5301","provinceCode":"53"},{"code":"530128","name":"禄劝彝族苗族自治县","cityCode":"5301","provinceCode":"53"},{"code":"530129","name":"寻甸回族彝族自治县","cityCode":"5301","provinceCode":"53"},{"code":"530181","name":"安宁市","cityCode":"5301","provinceCode":"53"},{"code":"530302","name":"麒麟区","cityCode":"5303","provinceCode":"53"},{"code":"530303","name":"沾益区","cityCode":"5303","provinceCode":"53"},{"code":"530321","name":"马龙县","cityCode":"5303","provinceCode":"53"},{"code":"530322","name":"陆良县","cityCode":"5303","provinceCode":"53"},{"code":"530323","name":"师宗县","cityCode":"5303","provinceCode":"53"},{"code":"530324","name":"罗平县","cityCode":"5303","provinceCode":"53"},{"code":"530325","name":"富源县","cityCode":"5303","provinceCode":"53"},{"code":"530326","name":"会泽县","cityCode":"5303","provinceCode":"53"},{"code":"530381","name":"宣威市","cityCode":"5303","provinceCode":"53"},{"code":"530402","name":"红塔区","cityCode":"5304","provinceCode":"53"},{"code":"530403","name":"江川区","cityCode":"5304","provinceCode":"53"},{"code":"530422","name":"澄江县","cityCode":"5304","provinceCode":"53"},{"code":"530423","name":"通海县","cityCode":"5304","provinceCode":"53"},{"code":"530424","name":"华宁县","cityCode":"5304","provinceCode":"53"},{"code":"530425","name":"易门县","cityCode":"5304","provinceCode":"53"},{"code":"530426","name":"峨山彝族自治县","cityCode":"5304","provinceCode":"53"},{"code":"530427","name":"新平彝族傣族自治县","cityCode":"5304","provinceCode":"53"},{"code":"530428","name":"元江哈尼族彝族傣族自治县","cityCode":"5304","provinceCode":"53"},{"code":"530502","name":"隆阳区","cityCode":"5305","provinceCode":"53"},{"code":"530521","name":"施甸县","cityCode":"5305","provinceCode":"53"},{"code":"530523","name":"龙陵县","cityCode":"5305","provinceCode":"53"},{"code":"530524","name":"昌宁县","cityCode":"5305","provinceCode":"53"},{"code":"530581","name":"腾冲市","cityCode":"5305","provinceCode":"53"},{"code":"530602","name":"昭阳区","cityCode":"5306","provinceCode":"53"},{"code":"530621","name":"鲁甸县","cityCode":"5306","provinceCode":"53"},{"code":"530622","name":"巧家县","cityCode":"5306","provinceCode":"53"},{"code":"530623","name":"盐津县","cityCode":"5306","provinceCode":"53"},{"code":"530624","name":"大关县","cityCode":"5306","provinceCode":"53"},{"code":"530625","name":"永善县","cityCode":"5306","provinceCode":"53"},{"code":"530626","name":"绥江县","cityCode":"5306","provinceCode":"53"},{"code":"530627","name":"镇雄县","cityCode":"5306","provinceCode":"53"},{"code":"530628","name":"彝良县","cityCode":"5306","provinceCode":"53"},{"code":"530629","name":"威信县","cityCode":"5306","provinceCode":"53"},{"code":"530630","name":"水富县","cityCode":"5306","provinceCode":"53"},{"code":"530702","name":"古城区","cityCode":"5307","provinceCode":"53"},{"code":"530721","name":"玉龙纳西族自治县","cityCode":"5307","provinceCode":"53"},{"code":"530722","name":"永胜县","cityCode":"5307","provinceCode":"53"},{"code":"530723","name":"华坪县","cityCode":"5307","provinceCode":"53"},{"code":"530724","name":"宁蒗彝族自治县","cityCode":"5307","provinceCode":"53"},{"code":"530802","name":"思茅区","cityCode":"5308","provinceCode":"53"},{"code":"530821","name":"宁洱哈尼族彝族自治县","cityCode":"5308","provinceCode":"53"},{"code":"530822","name":"墨江哈尼族自治县","cityCode":"5308","provinceCode":"53"},{"code":"530823","name":"景东彝族自治县","cityCode":"5308","provinceCode":"53"},{"code":"530824","name":"景谷傣族彝族自治县","cityCode":"5308","provinceCode":"53"},{"code":"530825","name":"镇沅彝族哈尼族拉祜族自治县","cityCode":"5308","provinceCode":"53"},{"code":"530826","name":"江城哈尼族彝族自治县","cityCode":"5308","provinceCode":"53"},{"code":"530827","name":"孟连傣族拉祜族佤族自治县","cityCode":"5308","provinceCode":"53"},{"code":"530828","name":"澜沧拉祜族自治县","cityCode":"5308","provinceCode":"53"},{"code":"530829","name":"西盟佤族自治县","cityCode":"5308","provinceCode":"53"},{"code":"530902","name":"临翔区","cityCode":"5309","provinceCode":"53"},{"code":"530921","name":"凤庆县","cityCode":"5309","provinceCode":"53"},{"code":"530922","name":"云县","cityCode":"5309","provinceCode":"53"},{"code":"530923","name":"永德县","cityCode":"5309","provinceCode":"53"},{"code":"530924","name":"镇康县","cityCode":"5309","provinceCode":"53"},{"code":"530925","name":"双江拉祜族佤族布朗族傣族自治县","cityCode":"5309","provinceCode":"53"},{"code":"530926","name":"耿马傣族佤族自治县","cityCode":"5309","provinceCode":"53"},{"code":"530927","name":"沧源佤族自治县","cityCode":"5309","provinceCode":"53"},{"code":"532301","name":"楚雄市","cityCode":"5323","provinceCode":"53"},{"code":"532322","name":"双柏县","cityCode":"5323","provinceCode":"53"},{"code":"532323","name":"牟定县","cityCode":"5323","provinceCode":"53"},{"code":"532324","name":"南华县","cityCode":"5323","provinceCode":"53"},{"code":"532325","name":"姚安县","cityCode":"5323","provinceCode":"53"},{"code":"532326","name":"大姚县","cityCode":"5323","provinceCode":"53"},{"code":"532327","name":"永仁县","cityCode":"5323","provinceCode":"53"},{"code":"532328","name":"元谋县","cityCode":"5323","provinceCode":"53"},{"code":"532329","name":"武定县","cityCode":"5323","provinceCode":"53"},{"code":"532331","name":"禄丰县","cityCode":"5323","provinceCode":"53"},{"code":"532501","name":"个旧市","cityCode":"5325","provinceCode":"53"},{"code":"532502","name":"开远市","cityCode":"5325","provinceCode":"53"},{"code":"532503","name":"蒙自市","cityCode":"5325","provinceCode":"53"},{"code":"532504","name":"弥勒市","cityCode":"5325","provinceCode":"53"},{"code":"532523","name":"屏边苗族自治县","cityCode":"5325","provinceCode":"53"},{"code":"532524","name":"建水县","cityCode":"5325","provinceCode":"53"},{"code":"532525","name":"石屏县","cityCode":"5325","provinceCode":"53"},{"code":"532527","name":"泸西县","cityCode":"5325","provinceCode":"53"},{"code":"532528","name":"元阳县","cityCode":"5325","provinceCode":"53"},{"code":"532529","name":"红河县","cityCode":"5325","provinceCode":"53"},{"code":"532530","name":"金平苗族瑶族傣族自治县","cityCode":"5325","provinceCode":"53"},{"code":"532531","name":"绿春县","cityCode":"5325","provinceCode":"53"},{"code":"532532","name":"河口瑶族自治县","cityCode":"5325","provinceCode":"53"},{"code":"532601","name":"文山市","cityCode":"5326","provinceCode":"53"},{"code":"532622","name":"砚山县","cityCode":"5326","provinceCode":"53"},{"code":"532623","name":"西畴县","cityCode":"5326","provinceCode":"53"},{"code":"532624","name":"麻栗坡县","cityCode":"5326","provinceCode":"53"},{"code":"532625","name":"马关县","cityCode":"5326","provinceCode":"53"},{"code":"532626","name":"丘北县","cityCode":"5326","provinceCode":"53"},{"code":"532627","name":"广南县","cityCode":"5326","provinceCode":"53"},{"code":"532628","name":"富宁县","cityCode":"5326","provinceCode":"53"},{"code":"532801","name":"景洪市","cityCode":"5328","provinceCode":"53"},{"code":"532822","name":"勐海县","cityCode":"5328","provinceCode":"53"},{"code":"532823","name":"勐腊县","cityCode":"5328","provinceCode":"53"},{"code":"532901","name":"大理市","cityCode":"5329","provinceCode":"53"},{"code":"532922","name":"漾濞彝族自治县","cityCode":"5329","provinceCode":"53"},{"code":"532923","name":"祥云县","cityCode":"5329","provinceCode":"53"},{"code":"532924","name":"宾川县","cityCode":"5329","provinceCode":"53"},{"code":"532925","name":"弥渡县","cityCode":"5329","provinceCode":"53"},{"code":"532926","name":"南涧彝族自治县","cityCode":"5329","provinceCode":"53"},{"code":"532927","name":"巍山彝族回族自治县","cityCode":"5329","provinceCode":"53"},{"code":"532928","name":"永平县","cityCode":"5329","provinceCode":"53"},{"code":"532929","name":"云龙县","cityCode":"5329","provinceCode":"53"},{"code":"532930","name":"洱源县","cityCode":"5329","provinceCode":"53"},{"code":"532931","name":"剑川县","cityCode":"5329","provinceCode":"53"},{"code":"532932","name":"鹤庆县","cityCode":"5329","provinceCode":"53"},{"code":"533102","name":"瑞丽市","cityCode":"5331","provinceCode":"53"},{"code":"533103","name":"芒市","cityCode":"5331","provinceCode":"53"},{"code":"533122","name":"梁河县","cityCode":"5331","provinceCode":"53"},{"code":"533123","name":"盈江县","cityCode":"5331","provinceCode":"53"},{"code":"533124","name":"陇川县","cityCode":"5331","provinceCode":"53"},{"code":"533301","name":"泸水市","cityCode":"5333","provinceCode":"53"},{"code":"533323","name":"福贡县","cityCode":"5333","provinceCode":"53"},{"code":"533324","name":"贡山独龙族怒族自治县","cityCode":"5333","provinceCode":"53"},{"code":"533325","name":"兰坪白族普米族自治县","cityCode":"5333","provinceCode":"53"},{"code":"533401","name":"香格里拉市","cityCode":"5334","provinceCode":"53"},{"code":"533422","name":"德钦县","cityCode":"5334","provinceCode":"53"},{"code":"533423","name":"维西傈僳族自治县","cityCode":"5334","provinceCode":"53"},{"code":"540102","name":"城关区","cityCode":"5401","provinceCode":"54"},{"code":"540103","name":"堆龙德庆区","cityCode":"5401","provinceCode":"54"},{"code":"540121","name":"林周县","cityCode":"5401","provinceCode":"54"},{"code":"540122","name":"当雄县","cityCode":"5401","provinceCode":"54"},{"code":"540123","name":"尼木县","cityCode":"5401","provinceCode":"54"},{"code":"540124","name":"曲水县","cityCode":"5401","provinceCode":"54"},{"code":"540126","name":"达孜县","cityCode":"5401","provinceCode":"54"},{"code":"540127","name":"墨竹工卡县","cityCode":"5401","provinceCode":"54"},{"code":"540202","name":"桑珠孜区","cityCode":"5402","provinceCode":"54"},{"code":"540221","name":"南木林县","cityCode":"5402","provinceCode":"54"},{"code":"540222","name":"江孜县","cityCode":"5402","provinceCode":"54"},{"code":"540223","name":"定日县","cityCode":"5402","provinceCode":"54"},{"code":"540224","name":"萨迦县","cityCode":"5402","provinceCode":"54"},{"code":"540225","name":"拉孜县","cityCode":"5402","provinceCode":"54"},{"code":"540226","name":"昂仁县","cityCode":"5402","provinceCode":"54"},{"code":"540227","name":"谢通门县","cityCode":"5402","provinceCode":"54"},{"code":"540228","name":"白朗县","cityCode":"5402","provinceCode":"54"},{"code":"540229","name":"仁布县","cityCode":"5402","provinceCode":"54"},{"code":"540230","name":"康马县","cityCode":"5402","provinceCode":"54"},{"code":"540231","name":"定结县","cityCode":"5402","provinceCode":"54"},{"code":"540232","name":"仲巴县","cityCode":"5402","provinceCode":"54"},{"code":"540233","name":"亚东县","cityCode":"5402","provinceCode":"54"},{"code":"540234","name":"吉隆县","cityCode":"5402","provinceCode":"54"},{"code":"540235","name":"聂拉木县","cityCode":"5402","provinceCode":"54"},{"code":"540236","name":"萨嘎县","cityCode":"5402","provinceCode":"54"},{"code":"540237","name":"岗巴县","cityCode":"5402","provinceCode":"54"},{"code":"540302","name":"卡若区","cityCode":"5403","provinceCode":"54"},{"code":"540321","name":"江达县","cityCode":"5403","provinceCode":"54"},{"code":"540322","name":"贡觉县","cityCode":"5403","provinceCode":"54"},{"code":"540323","name":"类乌齐县","cityCode":"5403","provinceCode":"54"},{"code":"540324","name":"丁青县","cityCode":"5403","provinceCode":"54"},{"code":"540325","name":"察雅县","cityCode":"5403","provinceCode":"54"},{"code":"540326","name":"八宿县","cityCode":"5403","provinceCode":"54"},{"code":"540327","name":"左贡县","cityCode":"5403","provinceCode":"54"},{"code":"540328","name":"芒康县","cityCode":"5403","provinceCode":"54"},{"code":"540329","name":"洛隆县","cityCode":"5403","provinceCode":"54"},{"code":"540330","name":"边坝县","cityCode":"5403","provinceCode":"54"},{"code":"540402","name":"巴宜区","cityCode":"5404","provinceCode":"54"},{"code":"540421","name":"工布江达县","cityCode":"5404","provinceCode":"54"},{"code":"540422","name":"米林县","cityCode":"5404","provinceCode":"54"},{"code":"540423","name":"墨脱县","cityCode":"5404","provinceCode":"54"},{"code":"540424","name":"波密县","cityCode":"5404","provinceCode":"54"},{"code":"540425","name":"察隅县","cityCode":"5404","provinceCode":"54"},{"code":"540426","name":"朗县","cityCode":"5404","provinceCode":"54"},{"code":"540502","name":"乃东区","cityCode":"5405","provinceCode":"54"},{"code":"540521","name":"扎囊县","cityCode":"5405","provinceCode":"54"},{"code":"540522","name":"贡嘎县","cityCode":"5405","provinceCode":"54"},{"code":"540523","name":"桑日县","cityCode":"5405","provinceCode":"54"},{"code":"540524","name":"琼结县","cityCode":"5405","provinceCode":"54"},{"code":"540525","name":"曲松县","cityCode":"5405","provinceCode":"54"},{"code":"540526","name":"措美县","cityCode":"5405","provinceCode":"54"},{"code":"540527","name":"洛扎县","cityCode":"5405","provinceCode":"54"},{"code":"540528","name":"加查县","cityCode":"5405","provinceCode":"54"},{"code":"540529","name":"隆子县","cityCode":"5405","provinceCode":"54"},{"code":"540530","name":"错那县","cityCode":"5405","provinceCode":"54"},{"code":"540531","name":"浪卡子县","cityCode":"5405","provinceCode":"54"},{"code":"542421","name":"那曲县","cityCode":"5424","provinceCode":"54"},{"code":"542422","name":"嘉黎县","cityCode":"5424","provinceCode":"54"},{"code":"542423","name":"比如县","cityCode":"5424","provinceCode":"54"},{"code":"542424","name":"聂荣县","cityCode":"5424","provinceCode":"54"},{"code":"542425","name":"安多县","cityCode":"5424","provinceCode":"54"},{"code":"542426","name":"申扎县","cityCode":"5424","provinceCode":"54"},{"code":"542427","name":"索县","cityCode":"5424","provinceCode":"54"},{"code":"542428","name":"班戈县","cityCode":"5424","provinceCode":"54"},{"code":"542429","name":"巴青县","cityCode":"5424","provinceCode":"54"},{"code":"542430","name":"尼玛县","cityCode":"5424","provinceCode":"54"},{"code":"542431","name":"双湖县","cityCode":"5424","provinceCode":"54"},{"code":"542521","name":"普兰县","cityCode":"5425","provinceCode":"54"},{"code":"542522","name":"札达县","cityCode":"5425","provinceCode":"54"},{"code":"542523","name":"噶尔县","cityCode":"5425","provinceCode":"54"},{"code":"542524","name":"日土县","cityCode":"5425","provinceCode":"54"},{"code":"542525","name":"革吉县","cityCode":"5425","provinceCode":"54"},{"code":"542526","name":"改则县","cityCode":"5425","provinceCode":"54"},{"code":"542527","name":"措勤县","cityCode":"5425","provinceCode":"54"},{"code":"610102","name":"新城区","cityCode":"6101","provinceCode":"61"},{"code":"610103","name":"碑林区","cityCode":"6101","provinceCode":"61"},{"code":"610104","name":"莲湖区","cityCode":"6101","provinceCode":"61"},{"code":"610111","name":"灞桥区","cityCode":"6101","provinceCode":"61"},{"code":"610112","name":"未央区","cityCode":"6101","provinceCode":"61"},{"code":"610113","name":"雁塔区","cityCode":"6101","provinceCode":"61"},{"code":"610114","name":"阎良区","cityCode":"6101","provinceCode":"61"},{"code":"610115","name":"临潼区","cityCode":"6101","provinceCode":"61"},{"code":"610116","name":"长安区","cityCode":"6101","provinceCode":"61"},{"code":"610117","name":"高陵区","cityCode":"6101","provinceCode":"61"},{"code":"610122","name":"蓝田县","cityCode":"6101","provinceCode":"61"},{"code":"610124","name":"周至县","cityCode":"6101","provinceCode":"61"},{"code":"610125","name":"户县","cityCode":"6101","provinceCode":"61"},{"code":"610202","name":"王益区","cityCode":"6102","provinceCode":"61"},{"code":"610203","name":"印台区","cityCode":"6102","provinceCode":"61"},{"code":"610204","name":"耀州区","cityCode":"6102","provinceCode":"61"},{"code":"610222","name":"宜君县","cityCode":"6102","provinceCode":"61"},{"code":"610302","name":"渭滨区","cityCode":"6103","provinceCode":"61"},{"code":"610303","name":"金台区","cityCode":"6103","provinceCode":"61"},{"code":"610304","name":"陈仓区","cityCode":"6103","provinceCode":"61"},{"code":"610322","name":"凤翔县","cityCode":"6103","provinceCode":"61"},{"code":"610323","name":"岐山县","cityCode":"6103","provinceCode":"61"},{"code":"610324","name":"扶风县","cityCode":"6103","provinceCode":"61"},{"code":"610326","name":"眉县","cityCode":"6103","provinceCode":"61"},{"code":"610327","name":"陇县","cityCode":"6103","provinceCode":"61"},{"code":"610328","name":"千阳县","cityCode":"6103","provinceCode":"61"},{"code":"610329","name":"麟游县","cityCode":"6103","provinceCode":"61"},{"code":"610330","name":"凤县","cityCode":"6103","provinceCode":"61"},{"code":"610331","name":"太白县","cityCode":"6103","provinceCode":"61"},{"code":"610402","name":"秦都区","cityCode":"6104","provinceCode":"61"},{"code":"610403","name":"杨陵区","cityCode":"6104","provinceCode":"61"},{"code":"610404","name":"渭城区","cityCode":"6104","provinceCode":"61"},{"code":"610422","name":"三原县","cityCode":"6104","provinceCode":"61"},{"code":"610423","name":"泾阳县","cityCode":"6104","provinceCode":"61"},{"code":"610424","name":"乾县","cityCode":"6104","provinceCode":"61"},{"code":"610425","name":"礼泉县","cityCode":"6104","provinceCode":"61"},{"code":"610426","name":"永寿县","cityCode":"6104","provinceCode":"61"},{"code":"610427","name":"彬县","cityCode":"6104","provinceCode":"61"},{"code":"610428","name":"长武县","cityCode":"6104","provinceCode":"61"},{"code":"610429","name":"旬邑县","cityCode":"6104","provinceCode":"61"},{"code":"610430","name":"淳化县","cityCode":"6104","provinceCode":"61"},{"code":"610431","name":"武功县","cityCode":"6104","provinceCode":"61"},{"code":"610481","name":"兴平市","cityCode":"6104","provinceCode":"61"},{"code":"610502","name":"临渭区","cityCode":"6105","provinceCode":"61"},{"code":"610503","name":"华州区","cityCode":"6105","provinceCode":"61"},{"code":"610522","name":"潼关县","cityCode":"6105","provinceCode":"61"},{"code":"610523","name":"大荔县","cityCode":"6105","provinceCode":"61"},{"code":"610524","name":"合阳县","cityCode":"6105","provinceCode":"61"},{"code":"610525","name":"澄城县","cityCode":"6105","provinceCode":"61"},{"code":"610526","name":"蒲城县","cityCode":"6105","provinceCode":"61"},{"code":"610527","name":"白水县","cityCode":"6105","provinceCode":"61"},{"code":"610528","name":"富平县","cityCode":"6105","provinceCode":"61"},{"code":"610581","name":"韩城市","cityCode":"6105","provinceCode":"61"},{"code":"610582","name":"华阴市","cityCode":"6105","provinceCode":"61"},{"code":"610602","name":"宝塔区","cityCode":"6106","provinceCode":"61"},{"code":"610603","name":"安塞区","cityCode":"6106","provinceCode":"61"},{"code":"610621","name":"延长县","cityCode":"6106","provinceCode":"61"},{"code":"610622","name":"延川县","cityCode":"6106","provinceCode":"61"},{"code":"610623","name":"子长县","cityCode":"6106","provinceCode":"61"},{"code":"610625","name":"志丹县","cityCode":"6106","provinceCode":"61"},{"code":"610626","name":"吴起县","cityCode":"6106","provinceCode":"61"},{"code":"610627","name":"甘泉县","cityCode":"6106","provinceCode":"61"},{"code":"610628","name":"富县","cityCode":"6106","provinceCode":"61"},{"code":"610629","name":"洛川县","cityCode":"6106","provinceCode":"61"},{"code":"610630","name":"宜川县","cityCode":"6106","provinceCode":"61"},{"code":"610631","name":"黄龙县","cityCode":"6106","provinceCode":"61"},{"code":"610632","name":"黄陵县","cityCode":"6106","provinceCode":"61"},{"code":"610702","name":"汉台区","cityCode":"6107","provinceCode":"61"},{"code":"610721","name":"南郑县","cityCode":"6107","provinceCode":"61"},{"code":"610722","name":"城固县","cityCode":"6107","provinceCode":"61"},{"code":"610723","name":"洋县","cityCode":"6107","provinceCode":"61"},{"code":"610724","name":"西乡县","cityCode":"6107","provinceCode":"61"},{"code":"610725","name":"勉县","cityCode":"6107","provinceCode":"61"},{"code":"610726","name":"宁强县","cityCode":"6107","provinceCode":"61"},{"code":"610727","name":"略阳县","cityCode":"6107","provinceCode":"61"},{"code":"610728","name":"镇巴县","cityCode":"6107","provinceCode":"61"},{"code":"610729","name":"留坝县","cityCode":"6107","provinceCode":"61"},{"code":"610730","name":"佛坪县","cityCode":"6107","provinceCode":"61"},{"code":"610802","name":"榆阳区","cityCode":"6108","provinceCode":"61"},{"code":"610803","name":"横山区","cityCode":"6108","provinceCode":"61"},{"code":"610821","name":"神木县","cityCode":"6108","provinceCode":"61"},{"code":"610822","name":"府谷县","cityCode":"6108","provinceCode":"61"},{"code":"610824","name":"靖边县","cityCode":"6108","provinceCode":"61"},{"code":"610825","name":"定边县","cityCode":"6108","provinceCode":"61"},{"code":"610826","name":"绥德县","cityCode":"6108","provinceCode":"61"},{"code":"610827","name":"米脂县","cityCode":"6108","provinceCode":"61"},{"code":"610828","name":"佳县","cityCode":"6108","provinceCode":"61"},{"code":"610829","name":"吴堡县","cityCode":"6108","provinceCode":"61"},{"code":"610830","name":"清涧县","cityCode":"6108","provinceCode":"61"},{"code":"610831","name":"子洲县","cityCode":"6108","provinceCode":"61"},{"code":"610902","name":"汉滨区","cityCode":"6109","provinceCode":"61"},{"code":"610921","name":"汉阴县","cityCode":"6109","provinceCode":"61"},{"code":"610922","name":"石泉县","cityCode":"6109","provinceCode":"61"},{"code":"610923","name":"宁陕县","cityCode":"6109","provinceCode":"61"},{"code":"610924","name":"紫阳县","cityCode":"6109","provinceCode":"61"},{"code":"610925","name":"岚皋县","cityCode":"6109","provinceCode":"61"},{"code":"610926","name":"平利县","cityCode":"6109","provinceCode":"61"},{"code":"610927","name":"镇坪县","cityCode":"6109","provinceCode":"61"},{"code":"610928","name":"旬阳县","cityCode":"6109","provinceCode":"61"},{"code":"610929","name":"白河县","cityCode":"6109","provinceCode":"61"},{"code":"611002","name":"商州区","cityCode":"6110","provinceCode":"61"},{"code":"611021","name":"洛南县","cityCode":"6110","provinceCode":"61"},{"code":"611022","name":"丹凤县","cityCode":"6110","provinceCode":"61"},{"code":"611023","name":"商南县","cityCode":"6110","provinceCode":"61"},{"code":"611024","name":"山阳县","cityCode":"6110","provinceCode":"61"},{"code":"611025","name":"镇安县","cityCode":"6110","provinceCode":"61"},{"code":"611026","name":"柞水县","cityCode":"6110","provinceCode":"61"},{"code":"620102","name":"城关区","cityCode":"6201","provinceCode":"62"},{"code":"620103","name":"七里河区","cityCode":"6201","provinceCode":"62"},{"code":"620104","name":"西固区","cityCode":"6201","provinceCode":"62"},{"code":"620105","name":"安宁区","cityCode":"6201","provinceCode":"62"},{"code":"620111","name":"红古区","cityCode":"6201","provinceCode":"62"},{"code":"620121","name":"永登县","cityCode":"6201","provinceCode":"62"},{"code":"620122","name":"皋兰县","cityCode":"6201","provinceCode":"62"},{"code":"620123","name":"榆中县","cityCode":"6201","provinceCode":"62"},{"code":"620201","name":"嘉峪关市","cityCode":"6202","provinceCode":"62"},{"code":"620302","name":"金川区","cityCode":"6203","provinceCode":"62"},{"code":"620321","name":"永昌县","cityCode":"6203","provinceCode":"62"},{"code":"620402","name":"白银区","cityCode":"6204","provinceCode":"62"},{"code":"620403","name":"平川区","cityCode":"6204","provinceCode":"62"},{"code":"620421","name":"靖远县","cityCode":"6204","provinceCode":"62"},{"code":"620422","name":"会宁县","cityCode":"6204","provinceCode":"62"},{"code":"620423","name":"景泰县","cityCode":"6204","provinceCode":"62"},{"code":"620502","name":"秦州区","cityCode":"6205","provinceCode":"62"},{"code":"620503","name":"麦积区","cityCode":"6205","provinceCode":"62"},{"code":"620521","name":"清水县","cityCode":"6205","provinceCode":"62"},{"code":"620522","name":"秦安县","cityCode":"6205","provinceCode":"62"},{"code":"620523","name":"甘谷县","cityCode":"6205","provinceCode":"62"},{"code":"620524","name":"武山县","cityCode":"6205","provinceCode":"62"},{"code":"620525","name":"张家川回族自治县","cityCode":"6205","provinceCode":"62"},{"code":"620602","name":"凉州区","cityCode":"6206","provinceCode":"62"},{"code":"620621","name":"民勤县","cityCode":"6206","provinceCode":"62"},{"code":"620622","name":"古浪县","cityCode":"6206","provinceCode":"62"},{"code":"620623","name":"天祝藏族自治县","cityCode":"6206","provinceCode":"62"},{"code":"620702","name":"甘州区","cityCode":"6207","provinceCode":"62"},{"code":"620721","name":"肃南裕固族自治县","cityCode":"6207","provinceCode":"62"},{"code":"620722","name":"民乐县","cityCode":"6207","provinceCode":"62"},{"code":"620723","name":"临泽县","cityCode":"6207","provinceCode":"62"},{"code":"620724","name":"高台县","cityCode":"6207","provinceCode":"62"},{"code":"620725","name":"山丹县","cityCode":"6207","provinceCode":"62"},{"code":"620802","name":"崆峒区","cityCode":"6208","provinceCode":"62"},{"code":"620821","name":"泾川县","cityCode":"6208","provinceCode":"62"},{"code":"620822","name":"灵台县","cityCode":"6208","provinceCode":"62"},{"code":"620823","name":"崇信县","cityCode":"6208","provinceCode":"62"},{"code":"620824","name":"华亭县","cityCode":"6208","provinceCode":"62"},{"code":"620825","name":"庄浪县","cityCode":"6208","provinceCode":"62"},{"code":"620826","name":"静宁县","cityCode":"6208","provinceCode":"62"},{"code":"620902","name":"肃州区","cityCode":"6209","provinceCode":"62"},{"code":"620921","name":"金塔县","cityCode":"6209","provinceCode":"62"},{"code":"620922","name":"瓜州县","cityCode":"6209","provinceCode":"62"},{"code":"620923","name":"肃北蒙古族自治县","cityCode":"6209","provinceCode":"62"},{"code":"620924","name":"阿克塞哈萨克族自治县","cityCode":"6209","provinceCode":"62"},{"code":"620981","name":"玉门市","cityCode":"6209","provinceCode":"62"},{"code":"620982","name":"敦煌市","cityCode":"6209","provinceCode":"62"},{"code":"621002","name":"西峰区","cityCode":"6210","provinceCode":"62"},{"code":"621021","name":"庆城县","cityCode":"6210","provinceCode":"62"},{"code":"621022","name":"环县","cityCode":"6210","provinceCode":"62"},{"code":"621023","name":"华池县","cityCode":"6210","provinceCode":"62"},{"code":"621024","name":"合水县","cityCode":"6210","provinceCode":"62"},{"code":"621025","name":"正宁县","cityCode":"6210","provinceCode":"62"},{"code":"621026","name":"宁县","cityCode":"6210","provinceCode":"62"},{"code":"621027","name":"镇原县","cityCode":"6210","provinceCode":"62"},{"code":"621102","name":"安定区","cityCode":"6211","provinceCode":"62"},{"code":"621121","name":"通渭县","cityCode":"6211","provinceCode":"62"},{"code":"621122","name":"陇西县","cityCode":"6211","provinceCode":"62"},{"code":"621123","name":"渭源县","cityCode":"6211","provinceCode":"62"},{"code":"621124","name":"临洮县","cityCode":"6211","provinceCode":"62"},{"code":"621125","name":"漳县","cityCode":"6211","provinceCode":"62"},{"code":"621126","name":"岷县","cityCode":"6211","provinceCode":"62"},{"code":"621202","name":"武都区","cityCode":"6212","provinceCode":"62"},{"code":"621221","name":"成县","cityCode":"6212","provinceCode":"62"},{"code":"621222","name":"文县","cityCode":"6212","provinceCode":"62"},{"code":"621223","name":"宕昌县","cityCode":"6212","provinceCode":"62"},{"code":"621224","name":"康县","cityCode":"6212","provinceCode":"62"},{"code":"621225","name":"西和县","cityCode":"6212","provinceCode":"62"},{"code":"621226","name":"礼县","cityCode":"6212","provinceCode":"62"},{"code":"621227","name":"徽县","cityCode":"6212","provinceCode":"62"},{"code":"621228","name":"两当县","cityCode":"6212","provinceCode":"62"},{"code":"622901","name":"临夏市","cityCode":"6229","provinceCode":"62"},{"code":"622921","name":"临夏县","cityCode":"6229","provinceCode":"62"},{"code":"622922","name":"康乐县","cityCode":"6229","provinceCode":"62"},{"code":"622923","name":"永靖县","cityCode":"6229","provinceCode":"62"},{"code":"622924","name":"广河县","cityCode":"6229","provinceCode":"62"},{"code":"622925","name":"和政县","cityCode":"6229","provinceCode":"62"},{"code":"622926","name":"东乡族自治县","cityCode":"6229","provinceCode":"62"},{"code":"622927","name":"积石山保安族东乡族撒拉族自治县","cityCode":"6229","provinceCode":"62"},{"code":"623001","name":"合作市","cityCode":"6230","provinceCode":"62"},{"code":"623021","name":"临潭县","cityCode":"6230","provinceCode":"62"},{"code":"623022","name":"卓尼县","cityCode":"6230","provinceCode":"62"},{"code":"623023","name":"舟曲县","cityCode":"6230","provinceCode":"62"},{"code":"623024","name":"迭部县","cityCode":"6230","provinceCode":"62"},{"code":"623025","name":"玛曲县","cityCode":"6230","provinceCode":"62"},{"code":"623026","name":"碌曲县","cityCode":"6230","provinceCode":"62"},{"code":"623027","name":"夏河县","cityCode":"6230","provinceCode":"62"},{"code":"630102","name":"城东区","cityCode":"6301","provinceCode":"63"},{"code":"630103","name":"城中区","cityCode":"6301","provinceCode":"63"},{"code":"630104","name":"城西区","cityCode":"6301","provinceCode":"63"},{"code":"630105","name":"城北区","cityCode":"6301","provinceCode":"63"},{"code":"630121","name":"大通回族土族自治县","cityCode":"6301","provinceCode":"63"},{"code":"630122","name":"湟中县","cityCode":"6301","provinceCode":"63"},{"code":"630123","name":"湟源县","cityCode":"6301","provinceCode":"63"},{"code":"630202","name":"乐都区","cityCode":"6302","provinceCode":"63"},{"code":"630203","name":"平安区","cityCode":"6302","provinceCode":"63"},{"code":"630222","name":"民和回族土族自治县","cityCode":"6302","provinceCode":"63"},{"code":"630223","name":"互助土族自治县","cityCode":"6302","provinceCode":"63"},{"code":"630224","name":"化隆回族自治县","cityCode":"6302","provinceCode":"63"},{"code":"630225","name":"循化撒拉族自治县","cityCode":"6302","provinceCode":"63"},{"code":"632221","name":"门源回族自治县","cityCode":"6322","provinceCode":"63"},{"code":"632222","name":"祁连县","cityCode":"6322","provinceCode":"63"},{"code":"632223","name":"海晏县","cityCode":"6322","provinceCode":"63"},{"code":"632224","name":"刚察县","cityCode":"6322","provinceCode":"63"},{"code":"632321","name":"同仁县","cityCode":"6323","provinceCode":"63"},{"code":"632322","name":"尖扎县","cityCode":"6323","provinceCode":"63"},{"code":"632323","name":"泽库县","cityCode":"6323","provinceCode":"63"},{"code":"632324","name":"河南蒙古族自治县","cityCode":"6323","provinceCode":"63"},{"code":"632521","name":"共和县","cityCode":"6325","provinceCode":"63"},{"code":"632522","name":"同德县","cityCode":"6325","provinceCode":"63"},{"code":"632523","name":"贵德县","cityCode":"6325","provinceCode":"63"},{"code":"632524","name":"兴海县","cityCode":"6325","provinceCode":"63"},{"code":"632525","name":"贵南县","cityCode":"6325","provinceCode":"63"},{"code":"632621","name":"玛沁县","cityCode":"6326","provinceCode":"63"},{"code":"632622","name":"班玛县","cityCode":"6326","provinceCode":"63"},{"code":"632623","name":"甘德县","cityCode":"6326","provinceCode":"63"},{"code":"632624","name":"达日县","cityCode":"6326","provinceCode":"63"},{"code":"632625","name":"久治县","cityCode":"6326","provinceCode":"63"},{"code":"632626","name":"玛多县","cityCode":"6326","provinceCode":"63"},{"code":"632701","name":"玉树市","cityCode":"6327","provinceCode":"63"},{"code":"632722","name":"杂多县","cityCode":"6327","provinceCode":"63"},{"code":"632723","name":"称多县","cityCode":"6327","provinceCode":"63"},{"code":"632724","name":"治多县","cityCode":"6327","provinceCode":"63"},{"code":"632725","name":"囊谦县","cityCode":"6327","provinceCode":"63"},{"code":"632726","name":"曲麻莱县","cityCode":"6327","provinceCode":"63"},{"code":"632801","name":"格尔木市","cityCode":"6328","provinceCode":"63"},{"code":"632802","name":"德令哈市","cityCode":"6328","provinceCode":"63"},{"code":"632821","name":"乌兰县","cityCode":"6328","provinceCode":"63"},{"code":"632822","name":"都兰县","cityCode":"6328","provinceCode":"63"},{"code":"632823","name":"天峻县","cityCode":"6328","provinceCode":"63"},{"code":"640104","name":"兴庆区","cityCode":"6401","provinceCode":"64"},{"code":"640105","name":"西夏区","cityCode":"6401","provinceCode":"64"},{"code":"640106","name":"金凤区","cityCode":"6401","provinceCode":"64"},{"code":"640121","name":"永宁县","cityCode":"6401","provinceCode":"64"},{"code":"640122","name":"贺兰县","cityCode":"6401","provinceCode":"64"},{"code":"640181","name":"灵武市","cityCode":"6401","provinceCode":"64"},{"code":"640202","name":"大武口区","cityCode":"6402","provinceCode":"64"},{"code":"640205","name":"惠农区","cityCode":"6402","provinceCode":"64"},{"code":"640221","name":"平罗县","cityCode":"6402","provinceCode":"64"},{"code":"640302","name":"利通区","cityCode":"6403","provinceCode":"64"},{"code":"640303","name":"红寺堡区","cityCode":"6403","provinceCode":"64"},{"code":"640323","name":"盐池县","cityCode":"6403","provinceCode":"64"},{"code":"640324","name":"同心县","cityCode":"6403","provinceCode":"64"},{"code":"640381","name":"青铜峡市","cityCode":"6403","provinceCode":"64"},{"code":"640402","name":"原州区","cityCode":"6404","provinceCode":"64"},{"code":"640422","name":"西吉县","cityCode":"6404","provinceCode":"64"},{"code":"640423","name":"隆德县","cityCode":"6404","provinceCode":"64"},{"code":"640424","name":"泾源县","cityCode":"6404","provinceCode":"64"},{"code":"640425","name":"彭阳县","cityCode":"6404","provinceCode":"64"},{"code":"640502","name":"沙坡头区","cityCode":"6405","provinceCode":"64"},{"code":"640521","name":"中宁县","cityCode":"6405","provinceCode":"64"},{"code":"640522","name":"海原县","cityCode":"6405","provinceCode":"64"},{"code":"650102","name":"天山区","cityCode":"6501","provinceCode":"65"},{"code":"650103","name":"沙依巴克区","cityCode":"6501","provinceCode":"65"},{"code":"650104","name":"新市区","cityCode":"6501","provinceCode":"65"},{"code":"650105","name":"水磨沟区","cityCode":"6501","provinceCode":"65"},{"code":"650106","name":"头屯河区","cityCode":"6501","provinceCode":"65"},{"code":"650107","name":"达坂城区","cityCode":"6501","provinceCode":"65"},{"code":"650109","name":"米东区","cityCode":"6501","provinceCode":"65"},{"code":"650121","name":"乌鲁木齐县","cityCode":"6501","provinceCode":"65"},{"code":"650202","name":"独山子区","cityCode":"6502","provinceCode":"65"},{"code":"650203","name":"克拉玛依区","cityCode":"6502","provinceCode":"65"},{"code":"650204","name":"白碱滩区","cityCode":"6502","provinceCode":"65"},{"code":"650205","name":"乌尔禾区","cityCode":"6502","provinceCode":"65"},{"code":"650402","name":"高昌区","cityCode":"6504","provinceCode":"65"},{"code":"650421","name":"鄯善县","cityCode":"6504","provinceCode":"65"},{"code":"650422","name":"托克逊县","cityCode":"6504","provinceCode":"65"},{"code":"650502","name":"伊州区","cityCode":"6505","provinceCode":"65"},{"code":"650521","name":"巴里坤哈萨克自治县","cityCode":"6505","provinceCode":"65"},{"code":"650522","name":"伊吾县","cityCode":"6505","provinceCode":"65"},{"code":"652301","name":"昌吉市","cityCode":"6523","provinceCode":"65"},{"code":"652302","name":"阜康市","cityCode":"6523","provinceCode":"65"},{"code":"652323","name":"呼图壁县","cityCode":"6523","provinceCode":"65"},{"code":"652324","name":"玛纳斯县","cityCode":"6523","provinceCode":"65"},{"code":"652325","name":"奇台县","cityCode":"6523","provinceCode":"65"},{"code":"652327","name":"吉木萨尔县","cityCode":"6523","provinceCode":"65"},{"code":"652328","name":"木垒哈萨克自治县","cityCode":"6523","provinceCode":"65"},{"code":"652701","name":"博乐市","cityCode":"6527","provinceCode":"65"},{"code":"652702","name":"阿拉山口市","cityCode":"6527","provinceCode":"65"},{"code":"652722","name":"精河县","cityCode":"6527","provinceCode":"65"},{"code":"652723","name":"温泉县","cityCode":"6527","provinceCode":"65"},{"code":"652801","name":"库尔勒市","cityCode":"6528","provinceCode":"65"},{"code":"652822","name":"轮台县","cityCode":"6528","provinceCode":"65"},{"code":"652823","name":"尉犁县","cityCode":"6528","provinceCode":"65"},{"code":"652824","name":"若羌县","cityCode":"6528","provinceCode":"65"},{"code":"652825","name":"且末县","cityCode":"6528","provinceCode":"65"},{"code":"652826","name":"焉耆回族自治县","cityCode":"6528","provinceCode":"65"},{"code":"652827","name":"和静县","cityCode":"6528","provinceCode":"65"},{"code":"652828","name":"和硕县","cityCode":"6528","provinceCode":"65"},{"code":"652829","name":"博湖县","cityCode":"6528","provinceCode":"65"},{"code":"652901","name":"阿克苏市","cityCode":"6529","provinceCode":"65"},{"code":"652922","name":"温宿县","cityCode":"6529","provinceCode":"65"},{"code":"652923","name":"库车县","cityCode":"6529","provinceCode":"65"},{"code":"652924","name":"沙雅县","cityCode":"6529","provinceCode":"65"},{"code":"652925","name":"新和县","cityCode":"6529","provinceCode":"65"},{"code":"652926","name":"拜城县","cityCode":"6529","provinceCode":"65"},{"code":"652927","name":"乌什县","cityCode":"6529","provinceCode":"65"},{"code":"652928","name":"阿瓦提县","cityCode":"6529","provinceCode":"65"},{"code":"652929","name":"柯坪县","cityCode":"6529","provinceCode":"65"},{"code":"653001","name":"阿图什市","cityCode":"6530","provinceCode":"65"},{"code":"653022","name":"阿克陶县","cityCode":"6530","provinceCode":"65"},{"code":"653023","name":"阿合奇县","cityCode":"6530","provinceCode":"65"},{"code":"653024","name":"乌恰县","cityCode":"6530","provinceCode":"65"},{"code":"653101","name":"喀什市","cityCode":"6531","provinceCode":"65"},{"code":"653121","name":"疏附县","cityCode":"6531","provinceCode":"65"},{"code":"653122","name":"疏勒县","cityCode":"6531","provinceCode":"65"},{"code":"653123","name":"英吉沙县","cityCode":"6531","provinceCode":"65"},{"code":"653124","name":"泽普县","cityCode":"6531","provinceCode":"65"},{"code":"653125","name":"莎车县","cityCode":"6531","provinceCode":"65"},{"code":"653126","name":"叶城县","cityCode":"6531","provinceCode":"65"},{"code":"653127","name":"麦盖提县","cityCode":"6531","provinceCode":"65"},{"code":"653128","name":"岳普湖县","cityCode":"6531","provinceCode":"65"},{"code":"653129","name":"伽师县","cityCode":"6531","provinceCode":"65"},{"code":"653130","name":"巴楚县","cityCode":"6531","provinceCode":"65"},{"code":"653131","name":"塔什库尔干塔吉克自治县","cityCode":"6531","provinceCode":"65"},{"code":"653201","name":"和田市","cityCode":"6532","provinceCode":"65"},{"code":"653221","name":"和田县","cityCode":"6532","provinceCode":"65"},{"code":"653222","name":"墨玉县","cityCode":"6532","provinceCode":"65"},{"code":"653223","name":"皮山县","cityCode":"6532","provinceCode":"65"},{"code":"653224","name":"洛浦县","cityCode":"6532","provinceCode":"65"},{"code":"653225","name":"策勒县","cityCode":"6532","provinceCode":"65"},{"code":"653226","name":"于田县","cityCode":"6532","provinceCode":"65"},{"code":"653227","name":"民丰县","cityCode":"6532","provinceCode":"65"},{"code":"654002","name":"伊宁市","cityCode":"6540","provinceCode":"65"},{"code":"654003","name":"奎屯市","cityCode":"6540","provinceCode":"65"},{"code":"654004","name":"霍尔果斯市","cityCode":"6540","provinceCode":"65"},{"code":"654021","name":"伊宁县","cityCode":"6540","provinceCode":"65"},{"code":"654022","name":"察布查尔锡伯自治县","cityCode":"6540","provinceCode":"65"},{"code":"654023","name":"霍城县","cityCode":"6540","provinceCode":"65"},{"code":"654024","name":"巩留县","cityCode":"6540","provinceCode":"65"},{"code":"654025","name":"新源县","cityCode":"6540","provinceCode":"65"},{"code":"654026","name":"昭苏县","cityCode":"6540","provinceCode":"65"},{"code":"654027","name":"特克斯县","cityCode":"6540","provinceCode":"65"},{"code":"654028","name":"尼勒克县","cityCode":"6540","provinceCode":"65"},{"code":"654201","name":"塔城市","cityCode":"6542","provinceCode":"65"},{"code":"654202","name":"乌苏市","cityCode":"6542","provinceCode":"65"},{"code":"654221","name":"额敏县","cityCode":"6542","provinceCode":"65"},{"code":"654223","name":"沙湾县","cityCode":"6542","provinceCode":"65"},{"code":"654224","name":"托里县","cityCode":"6542","provinceCode":"65"},{"code":"654225","name":"裕民县","cityCode":"6542","provinceCode":"65"},{"code":"654226","name":"和布克赛尔蒙古自治县","cityCode":"6542","provinceCode":"65"},{"code":"654301","name":"阿勒泰市","cityCode":"6543","provinceCode":"65"},{"code":"654321","name":"布尔津县","cityCode":"6543","provinceCode":"65"},{"code":"654322","name":"富蕴县","cityCode":"6543","provinceCode":"65"},{"code":"654323","name":"福海县","cityCode":"6543","provinceCode":"65"},{"code":"654324","name":"哈巴河县","cityCode":"6543","provinceCode":"65"},{"code":"654325","name":"青河县","cityCode":"6543","provinceCode":"65"},{"code":"654326","name":"吉木乃县","cityCode":"6543","provinceCode":"65"},{"code":"659001","name":"石河子市","cityCode":"6590","provinceCode":"65"},{"code":"659002","name":"阿拉尔市","cityCode":"6590","provinceCode":"65"},{"code":"659003","name":"图木舒克市","cityCode":"6590","provinceCode":"65"},{"code":"659004","name":"五家渠市","cityCode":"6590","provinceCode":"65"},{"code":"659006","name":"铁门关市","cityCode":"6590","provinceCode":"65"}] /***/ }), /***/ "vkd5": /***/ (function(module, exports, __webpack_require__) { var map = { "./3d-click.png": "z9Xj", "./3d-white.png": "DXmu", "./3d.png": "gcBW", "./aPicture/attendance.png": "1+y7", "./aPicture/attendancePoint.png": "6Mj6", "./aPicture/back.png": "lNEh", "./aPicture/dep.png": "aX42", "./aPicture/errorReport.png": "LK1H", "./aPicture/errorTime.png": "rm0p", "./aPicture/errorTimeReport.png": "1Bek", "./aPicture/event-jd.png": "EYLL", "./aPicture/event-list-click.png": "hwng", "./aPicture/event-list.png": "Wny5", "./aPicture/event-module-click.png": "nxuO", "./aPicture/event-module.png": "kDXx", "./aPicture/event-td.png": "pBGO", "./aPicture/event-yb.png": "Vp7n", "./aPicture/event-zd.png": "MIZS", "./aPicture/float-check.png": "Pe7w", "./aPicture/float.png": "wEcu", "./aPicture/magnify-check.png": "9rO7", "./aPicture/magnify.png": "IqXq", "./aPicture/minimize-check.png": "TGlF", "./aPicture/minimize.png": "qEAy", "./aPicture/nextDep.png": "BUm/", "./aPicture/nowError.png": "BJ3c", "./aPicture/perception.png": "Q+cA", "./aPicture/recording.png": "RMDC", "./aPicture/searchAddress.png": "6upA", "./aPicture/security.png": "dDE8", "./aPicture/securityCompany.png": "0vbU", "./aPicture/securityResource.png": "V8Q4", "./aPicture/securityResourceChecked.png": "vD6o", "./aPicture/setting-click.png": "CF3O", "./aPicture/setting.png": "X/W6", "./aPicture/time.png": "R07g", "./aPicture/todayError.png": "IldK", "./all-click.png": "yKxl", "./all-white.png": "9x0k", "./all.png": "yJB3", "./area-click.png": "bXbu", "./area.png": "Efzv", "./atten.png": "qJlB", "./attendance-points.png": "zHKS", "./attendance/bazaar_click.png": "ojPL", "./attendance/bazaar_gray.png": "HWmu", "./attendance/bazaar_init.png": "Sgor", "./attendance/convention_click.png": "bcoi", "./attendance/convention_gray.png": "zRue", "./attendance/convention_init.png": "1FcO", "./attendance/enterprise_click.png": "IItY", "./attendance/enterprise_gray.png": "0kwy", "./attendance/enterprise_init.png": "1Sdw", "./attendance/financial_click.png": "Prs7", "./attendance/financial_gray.png": "Un61", "./attendance/financial_init.png": "/XOZ", "./attendance/garden_click.png": "ouaO", "./attendance/garden_gray.png": "RRDu", "./attendance/garden_init.png": "5dWf", "./attendance/hotel_click.png": "s4+4", "./attendance/hotel_gray.png": "SJXl", "./attendance/hotel_init.png": "o8J4", "./attendance/kindergarten_click.png": "3Ykx", "./attendance/kindergarten_gray.png": "QP22", "./attendance/kindergarten_init.png": "vPVG", "./attendance/marker/bazaar.png": "q1aE", "./attendance/marker/bazaar_red.png": "kQGz", "./attendance/marker/convention.png": "zHum", "./attendance/marker/convention_red.png": "8dqN", "./attendance/marker/enterprise.png": "hLDL", "./attendance/marker/enterprise_red.png": "Iw+v", "./attendance/marker/financial.png": "5OIZ", "./attendance/marker/financial_red.png": "vy8Z", "./attendance/marker/garden.png": "NPce", "./attendance/marker/garden_red.png": "Def1", "./attendance/marker/hotel.png": "uZ7l", "./attendance/marker/hotel_red.png": "I2Sz", "./attendance/marker/kindergarten.png": "i9CR", "./attendance/marker/kindergarten_red.png": "uGaE", "./attendance/marker/medical.png": "2WCT", "./attendance/marker/medical_red.png": "fQY3", "./attendance/marker/other.png": "FW3O", "./attendance/marker/other_red.png": "7HHs", "./attendance/marker/park.png": "WoMo", "./attendance/marker/park_red.png": "JkqM", "./attendance/marker/pathway.png": "rFqi", "./attendance/marker/pathway_red.png": "3yYd", "./attendance/marker/policy.png": "mwMK", "./attendance/marker/policy_red.png": "t+3X", "./attendance/marker/recreation.png": "1DFu", "./attendance/marker/recreation_red.png": "jjnV", "./attendance/marker/resident.png": "Jcla", "./attendance/marker/resident_red.png": "DxMF", "./attendance/marker/safety.png": "CEMJ", "./attendance/marker/safety_red.png": "bpzx", "./attendance/marker/school.png": "RaPn", "./attendance/marker/school_red.png": "1Pj1", "./attendance/marker/street.png": "sdXI", "./attendance/marker/street_red.png": "7aT7", "./attendance/medical_click.png": "hfjK", "./attendance/medical_gray.png": "HA4o", "./attendance/medical_init.png": "ygRb", "./attendance/park_click.png": "J9M/", "./attendance/park_gray.png": "LvxY", "./attendance/park_init.png": "/RIB", "./attendance/pathway_click.png": "lgO+", "./attendance/pathway_gray.png": "iu5k", "./attendance/pathway_init.png": "FSKz", "./attendance/policy_click.png": "jsww", "./attendance/policy_gray.png": "1u8q", "./attendance/policy_init.png": "4GKM", "./attendance/recreation_click.png": "IZEb", "./attendance/recreation_gray.png": "AHKm", "./attendance/recreation_init.png": "AfHd", "./attendance/resident_click.png": "jNq1", "./attendance/resident_gray.png": "Z3I/", "./attendance/resident_init.png": "KaAZ", "./attendance/safety_click.png": "487x", "./attendance/safety_gray.png": "U7cL", "./attendance/safety_init.png": "6Qz+", "./attendance/school_click.png": "0QVo", "./attendance/school_gray.png": "jJi2", "./attendance/school_init.png": "qhXr", "./attendance/street_click.png": "ORE9", "./attendance/street_gray.png": "PtIz", "./attendance/street_init.png": "NrWQ", "./big-camera-off.png": "26Rz", "./big-camera-on.png": "Oilc", "./big-mic-off.png": "TKha", "./big-mic-on.png": "F8UN", "./camera-max.png": "K+uK", "./camera-off.png": "acLb", "./camera-on.png": "8ZKn", "./cancel-click.png": "EgTV", "./cancel-white.png": "DN4D", "./cancel.png": "ZuEy", "./chat-click.png": "qsn8", "./chat-white.png": "0P2q", "./chat.png": "Skvt", "./circle-click.png": "BDM4", "./circle-white.png": "k7S3", "./circle.png": "Gf0r", "./down-click.png": "g5CG", "./down-white.png": "5cEz", "./down.png": "vDNl", "./event-active.png": "3KeC", "./event.png": "x2wF", "./gIFT.png": "dQg3", "./group.png": "PgSr", "./left-click.png": "Aw/o", "./left-white.png": "rn6j", "./left.png": "br1g", "./map.png": "Tcim", "./map1-click.png": "Ap9u", "./map1-white.png": "yO0l", "./map1.png": "4r4O", "./mass.png": "zXyL", "./mic-off.png": "YeOf", "./mic-on.png": "gOsS", "./open.png": "16NO", "./pack-down.png": "joV1", "./pack-up.png": "NV+Z", "./packup.png": "wWow", "./polygon-click.png": "LMBH", "./polygon-white.png": "UuDn", "./polygon.png": "BBpN", "./rectangle-click.png": "AgMr", "./rectangle-white.png": "3opF", "./rectangle.png": "xDzc", "./resource-active.png": "E4fC", "./resource-white.png": "8j3R", "./resource.png": "EeqU", "./right-click.png": "Pfdv", "./right-side-list.png": "6Jhx", "./right-white.png": "foLZ", "./right.png": "Rzld", "./scratchable-latex.png": "AS0P", "./screen-off.png": "E4Xz", "./screen-on.png": "snqr", "./search-active.png": "hf4R", "./search-address.png": "ikeG", "./search-dark.png": "G9B+", "./search-white.png": "wmKa", "./search.png": "UahI", "./security-company.png": "CVrl", "./security-personnel.png": "AsJy", "./style-click.png": "5bNU", "./style-white.png": "DXrd", "./style.png": "2OTC", "./switch.png": "dToI", "./top-side-list.png": "K7vd", "./vedio-player.png": "s9W7", "./videobox-add-active.png": "WO9G", "./videobox-add.png": "zVWh", "./videobox-close-active.png": "SECW", "./videobox-close.png": "MRHW", "./videobox-luzhi-active.png": "ZdlR", "./videobox-luzhi.png": "7Mgp", "./videobox-video-active.png": "5uwJ", "./videobox-video.png": "Z1a+", "./videobox-volume-active.png": "CE2x", "./videobox-volume.png": "NCSo", "./上收起.png": "FeTs" }; function webpackContext(req) { return __webpack_require__(webpackContextResolve(req)); }; function webpackContextResolve(req) { var id = map[req]; if(!(id + 1)) // check for number or string throw new Error("Cannot find module '" + req + "'."); return id; }; webpackContext.keys = function webpackContextKeys() { return Object.keys(map); }; webpackContext.resolve = webpackContextResolve; module.exports = webpackContext; webpackContext.id = "vkd5"; /***/ }), /***/ "vy8Z": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAiCAYAAAC0nUK+AAAAAXNSR0IArs4c6QAABZNJREFUSA2lVmtsVFUQ/s69u9vdpYW+KTUgSBAK2BhL5GVbCj6CoRKRRwBBCUpQQTAxWuIPa0ITjPxAjRF5SCKURBA0YIKCKd1qBIUWxLbUBBUECmX7oo/d7e7ee5w5y8VtuwslTtK958x8883cc2bmVuAO0pZTUGBKFJuQRRAiW0CmSYhWIXFFAB5N4FByvedHIUgTQwjTX7wTCouEKTdJKR/tb+2tERCnpC7ezqjzHO9tAXqRy9JSrWVfRZk0ZQkDtaxMJBQ/AUfhVOjDsyGSh0C234RxuRFBzwn0HD4G8/oNxakJ7YPURUUlorTU7BsElKVoHpe/3zsuX3ofmim7d5RLs6eH1PGF7YxjPPs15xQc4AT7kXvH57+nANOKZfBMbXzGGBbGN5PfrQAbe5G3TCyYRlmbnMG9Elux2I/9mad1fGE+B1CvIMOyjK5buNethP3hCb0Cx9qE6LxDJ2sQrPwZsqVNQdiP/ZnHkFJlL7wTZ0xC2DjFl5fy/V4Ih0OBw6d/g3/3ASAUivDb7XAtnw+RmoxA+UHAYYdISIB9Ui7s0yNFJYNBtD21RF2y0DHZBtMoZm+uCovYv22PArhWLIRx6Sq0YZmwPfgAfB/tBChI4Jvv4F6zAv4de+EomBIJTr/szzz+7eWQpjZHg4lZbOVyY+GMjavXILt9aF/8KoJVJ9Hx4nrcXLYWzuULCBCGPS8X5pVrcMx8DLaxo5Wf9WPxCClnadRdI9jAdczi33MAWmIiAoeOIuHJGRi0diWSPi5D+MJFdL7xLtzrX4ZwOqGPGgFbzhgEvj6CHnoTSywe2o/QpEQmG7hBlITC6Kn4SS0T5jyO4InT6CopU/twwwWYjU0q+3BtA4JHPQj9ehb6fcMQ2HdIYSweutgMylx2s5Y7L2KlCdLarpbdG7dQPQkkf/sFhMupdCZVhwyGILu64Zw/B8aVRvh20Bm3dyi7xcO8VIqCUoFqaWW16dDHjFLLhHlPQza3QWha5I8qRB85nIi7YPx9GWKQW1VM+EwtZUe5kvBoiIho1Kgwa3jDs4LF9fxzEFQRnGnwhyrYp+ahbe4KmHTB7nUvwb9zr7pskTwYZkcntJQhqjzF4CTlb/HQpkZ4xxcshSn3RNc5l2Ko+hxl5aAM/6EBNlSVWLjuD+ij71dn7Ptklzoe+ANwLnkWzqXzaP9fnWu6vkC0TJ49WHZ0XaS3SnG/uRrulUtUBqqJuFkMA5IIYLPB9cJC2Kc8ouyxfnz0Vr7NW9nkTXe4ImdL0+wdaxr+39nCPC05+es5gpotaXbnFqr389zqHa9tQOhsHdsGLIxnPzUqhKhJHZn4KTvf/lh4c4vGimD4FN15Erc4DyHXMpolt2ZNrEh8xv7dX8H3IY2FyAy6odnEpLTaqsu9yHlDo3K2acrDElLn/b18iShNnxC2men1x39hX5bbmUe2dBPjClcB5mfWfiBPOtIwdeMzqfWeI9H4fp+kjAbPNmqZzdGgu62JfFVfYvbpR87K1CxtAzlEuooVdxKB7Wn1nl2xIDHJRWVlWIdtMQWIDJlYnhHdufSh+uvxzDHJGZxyvuKSFFgTz5Guq0fY9UWUCHVYbIlLzvCM+qpyyv5YLFdNyLL03ysbYtks3R3JGWTTba9Qlr2yo4DnU7Ws9y2SeM+7kifXVvxJoE3RBNQEq0Xd/mC0Lta6X51Hg/Ly8tyhUCg1J4TMLXLIURuQ1iHMqrn6zdWapnXa7fbW6upqX7RP9Fp1YrTCWufm5mYGAoHRhmEkNsEQ06UjmCn0qV8KX8lps6eT9RQ4Izs722hqalJfM8vXesY9FtM0sywQP98yOw7+JY3Pt0vfhWh9X1y0LS45vfb1aGC7boaXi9at0Tpe98VF2wd05pRdEv1P6KCnTmQGVUtwIGf+L36aJzFoy7NdAAAAAElFTkSuQmCC" /***/ }), /***/ "vzCy": /***/ (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. var R = typeof Reflect === 'object' ? Reflect : null var ReflectApply = R && typeof R.apply === 'function' ? R.apply : function ReflectApply(target, receiver, args) { return Function.prototype.apply.call(target, receiver, args); } var ReflectOwnKeys if (R && typeof R.ownKeys === 'function') { ReflectOwnKeys = R.ownKeys } else if (Object.getOwnPropertySymbols) { ReflectOwnKeys = function ReflectOwnKeys(target) { return Object.getOwnPropertyNames(target) .concat(Object.getOwnPropertySymbols(target)); }; } else { ReflectOwnKeys = function ReflectOwnKeys(target) { return Object.getOwnPropertyNames(target); }; } function ProcessEmitWarning(warning) { if (console && console.warn) console.warn(warning); } var NumberIsNaN = Number.isNaN || function NumberIsNaN(value) { return value !== value; } function EventEmitter() { EventEmitter.init.call(this); } module.exports = EventEmitter; module.exports.once = once; // Backwards-compat with node 0.10.x EventEmitter.EventEmitter = EventEmitter; EventEmitter.prototype._events = undefined; EventEmitter.prototype._eventsCount = 0; EventEmitter.prototype._maxListeners = undefined; // By default EventEmitters will print a warning if more than 10 listeners are // added to it. This is a useful default which helps finding memory leaks. var defaultMaxListeners = 10; function checkListener(listener) { if (typeof listener !== 'function') { throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener); } } Object.defineProperty(EventEmitter, 'defaultMaxListeners', { enumerable: true, get: function() { return defaultMaxListeners; }, set: function(arg) { if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) { throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + arg + '.'); } defaultMaxListeners = arg; } }); EventEmitter.init = function() { if (this._events === undefined || this._events === Object.getPrototypeOf(this)._events) { this._events = Object.create(null); this._eventsCount = 0; } this._maxListeners = this._maxListeners || undefined; }; // Obviously not all Emitters should be limited to 10. This function allows // that to be increased. Set to zero for unlimited. EventEmitter.prototype.setMaxListeners = function setMaxListeners(n) { if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) { throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + n + '.'); } this._maxListeners = n; return this; }; function _getMaxListeners(that) { if (that._maxListeners === undefined) return EventEmitter.defaultMaxListeners; return that._maxListeners; } EventEmitter.prototype.getMaxListeners = function getMaxListeners() { return _getMaxListeners(this); }; EventEmitter.prototype.emit = function emit(type) { var args = []; for (var i = 1; i < arguments.length; i++) args.push(arguments[i]); var doError = (type === 'error'); var events = this._events; if (events !== undefined) doError = (doError && events.error === undefined); else if (!doError) return false; // If there is no 'error' event listener then throw. if (doError) { var er; if (args.length > 0) er = args[0]; if (er instanceof Error) { // Note: The comments on the `throw` lines are intentional, they show // up in Node's output if this results in an unhandled exception. throw er; // Unhandled 'error' event } // At least give some kind of context to the user var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : '')); err.context = er; throw err; // Unhandled 'error' event } var handler = events[type]; if (handler === undefined) return false; if (typeof handler === 'function') { ReflectApply(handler, this, args); } else { var len = handler.length; var listeners = arrayClone(handler, len); for (var i = 0; i < len; ++i) ReflectApply(listeners[i], this, args); } return true; }; function _addListener(target, type, listener, prepend) { var m; var events; var existing; checkListener(listener); events = target._events; if (events === undefined) { events = target._events = Object.create(null); target._eventsCount = 0; } else { // To avoid recursion in the case that type === "newListener"! Before // adding it to the listeners, first emit "newListener". if (events.newListener !== undefined) { target.emit('newListener', type, listener.listener ? listener.listener : listener); // Re-assign `events` because a newListener handler could have caused the // this._events to be assigned to a new object events = target._events; } existing = events[type]; } if (existing === undefined) { // Optimize the case of one listener. Don't need the extra array object. existing = events[type] = listener; ++target._eventsCount; } else { if (typeof existing === 'function') { // Adding the second element, need to change to array. existing = events[type] = prepend ? [listener, existing] : [existing, listener]; // If we've already got an array, just append. } else if (prepend) { existing.unshift(listener); } else { existing.push(listener); } // Check for listener leak m = _getMaxListeners(target); if (m > 0 && existing.length > m && !existing.warned) { existing.warned = true; // No error code for this since it is a Warning // eslint-disable-next-line no-restricted-syntax var w = new Error('Possible EventEmitter memory leak detected. ' + existing.length + ' ' + String(type) + ' listeners ' + 'added. Use emitter.setMaxListeners() to ' + 'increase limit'); w.name = 'MaxListenersExceededWarning'; w.emitter = target; w.type = type; w.count = existing.length; ProcessEmitWarning(w); } } return target; } EventEmitter.prototype.addListener = function addListener(type, listener) { return _addListener(this, type, listener, false); }; EventEmitter.prototype.on = EventEmitter.prototype.addListener; EventEmitter.prototype.prependListener = function prependListener(type, listener) { return _addListener(this, type, listener, true); }; function onceWrapper() { if (!this.fired) { this.target.removeListener(this.type, this.wrapFn); this.fired = true; if (arguments.length === 0) return this.listener.call(this.target); return this.listener.apply(this.target, arguments); } } function _onceWrap(target, type, listener) { var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener }; var wrapped = onceWrapper.bind(state); wrapped.listener = listener; state.wrapFn = wrapped; return wrapped; } EventEmitter.prototype.once = function once(type, listener) { checkListener(listener); this.on(type, _onceWrap(this, type, listener)); return this; }; EventEmitter.prototype.prependOnceListener = function prependOnceListener(type, listener) { checkListener(listener); this.prependListener(type, _onceWrap(this, type, listener)); return this; }; // Emits a 'removeListener' event if and only if the listener was removed. EventEmitter.prototype.removeListener = function removeListener(type, listener) { var list, events, position, i, originalListener; checkListener(listener); events = this._events; if (events === undefined) return this; list = events[type]; if (list === undefined) return this; if (list === listener || list.listener === listener) { if (--this._eventsCount === 0) this._events = Object.create(null); else { delete events[type]; if (events.removeListener) this.emit('removeListener', type, list.listener || listener); } } else if (typeof list !== 'function') { position = -1; for (i = list.length - 1; i >= 0; i--) { if (list[i] === listener || list[i].listener === listener) { originalListener = list[i].listener; position = i; break; } } if (position < 0) return this; if (position === 0) list.shift(); else { spliceOne(list, position); } if (list.length === 1) events[type] = list[0]; if (events.removeListener !== undefined) this.emit('removeListener', type, originalListener || listener); } return this; }; EventEmitter.prototype.off = EventEmitter.prototype.removeListener; EventEmitter.prototype.removeAllListeners = function removeAllListeners(type) { var listeners, events, i; events = this._events; if (events === undefined) return this; // not listening for removeListener, no need to emit if (events.removeListener === undefined) { if (arguments.length === 0) { this._events = Object.create(null); this._eventsCount = 0; } else if (events[type] !== undefined) { if (--this._eventsCount === 0) this._events = Object.create(null); else delete events[type]; } return this; } // emit removeListener for all listeners on all events if (arguments.length === 0) { var keys = Object.keys(events); var key; for (i = 0; i < keys.length; ++i) { key = keys[i]; if (key === 'removeListener') continue; this.removeAllListeners(key); } this.removeAllListeners('removeListener'); this._events = Object.create(null); this._eventsCount = 0; return this; } listeners = events[type]; if (typeof listeners === 'function') { this.removeListener(type, listeners); } else if (listeners !== undefined) { // LIFO order for (i = listeners.length - 1; i >= 0; i--) { this.removeListener(type, listeners[i]); } } return this; }; function _listeners(target, type, unwrap) { var events = target._events; if (events === undefined) return []; var evlistener = events[type]; if (evlistener === undefined) return []; if (typeof evlistener === 'function') return unwrap ? [evlistener.listener || evlistener] : [evlistener]; return unwrap ? unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length); } EventEmitter.prototype.listeners = function listeners(type) { return _listeners(this, type, true); }; EventEmitter.prototype.rawListeners = function rawListeners(type) { return _listeners(this, type, false); }; EventEmitter.listenerCount = function(emitter, type) { if (typeof emitter.listenerCount === 'function') { return emitter.listenerCount(type); } else { return listenerCount.call(emitter, type); } }; EventEmitter.prototype.listenerCount = listenerCount; function listenerCount(type) { var events = this._events; if (events !== undefined) { var evlistener = events[type]; if (typeof evlistener === 'function') { return 1; } else if (evlistener !== undefined) { return evlistener.length; } } return 0; } EventEmitter.prototype.eventNames = function eventNames() { return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : []; }; function arrayClone(arr, n) { var copy = new Array(n); for (var i = 0; i < n; ++i) copy[i] = arr[i]; return copy; } function spliceOne(list, index) { for (; index + 1 < list.length; index++) list[index] = list[index + 1]; list.pop(); } function unwrapListeners(arr) { var ret = new Array(arr.length); for (var i = 0; i < ret.length; ++i) { ret[i] = arr[i].listener || arr[i]; } return ret; } function once(emitter, name) { return new Promise(function (resolve, reject) { function errorListener(err) { emitter.removeListener(name, resolver); reject(err); } function resolver() { if (typeof emitter.removeListener === 'function') { emitter.removeListener('error', errorListener); } resolve([].slice.call(arguments)); }; eventTargetAgnosticAddListener(emitter, name, resolver, { once: true }); if (name !== 'error') { addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true }); } }); } function addErrorHandlerIfEventEmitter(emitter, handler, flags) { if (typeof emitter.on === 'function') { eventTargetAgnosticAddListener(emitter, 'error', handler, flags); } } function eventTargetAgnosticAddListener(emitter, name, listener, flags) { if (typeof emitter.on === 'function') { if (flags.once) { emitter.once(name, listener); } else { emitter.on(name, listener); } } else if (typeof emitter.addEventListener === 'function') { // EventTarget does not have `error` event semantics like Node // EventEmitters, we do not listen for `error` events here. emitter.addEventListener(name, function wrapListener(arg) { // IE does not have builtin `{ once: true }` support so we // have to do it manually. if (flags.once) { emitter.removeEventListener(name, wrapListener); } listener(arg); }); } else { throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof emitter); } } /***/ }), /***/ "w2vo": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* WEBPACK VAR INJECTION */(function(process, module) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "css", function() { return css; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "keyframes", function() { return keyframes; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "injectGlobal", function() { return injectGlobal; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isStyledComponent", function() { return isStyledComponent; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "consolidateStreamedStyles", function() { return consolidateStreamedStyles; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ThemeProvider", function() { return ThemeProvider; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "withTheme", function() { return withTheme; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ServerStyleSheet", function() { return ServerStyleSheet; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StyleSheetManager", function() { return StyleSheetManager; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__DO_NOT_USE_OR_YOU_WILL_BE_HAUNTED_BY_SPOOKY_GHOSTS", function() { return __DO_NOT_USE_OR_YOU_WILL_BE_HAUNTED_BY_SPOOKY_GHOSTS; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_fbjs_lib_hyphenateStyleName__ = __webpack_require__("mL1Z"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_fbjs_lib_hyphenateStyleName___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_fbjs_lib_hyphenateStyleName__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__("GiK3"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_stylis__ = __webpack_require__("Ruo5"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_stylis___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_stylis__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_stylis_rule_sheet__ = __webpack_require__("IM/B"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_stylis_rule_sheet___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_stylis_rule_sheet__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_prop_types__ = __webpack_require__("KSGD"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_hoist_non_react_statics__ = __webpack_require__("v5hY"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_hoist_non_react_statics___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_hoist_non_react_statics__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react_is__ = __webpack_require__("ncfW"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react_is___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react_is__); var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; var classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; 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; }; }(); 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 inherits = function (subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }; var objectWithoutProperties = function (obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }; var possibleConstructorReturn = function (self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }; // var isPlainObject = (function (x) { return (typeof x === 'undefined' ? 'undefined' : _typeof(x)) === 'object' && x.constructor === Object; }); // /** * Parse errors.md and turn it into a simple hash of code: message */ var ERRORS = false ? { "1": "Cannot create styled-component for component: %s.\n\n", "2": "Can't collect styles once you've consumed a `ServerStyleSheet`'s styles! `ServerStyleSheet` is a one off instance for each server-side render cycle.\n\n* Are you trying to reuse it across renders?\n* Are you accidentally calling collectStyles twice?\n\n", "3": "Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.\n\n", "4": "The `StyleSheetManager` expects a valid target or sheet prop!\n\n* Does this error occur on the client and is your target falsy?\n* Does this error occur on the server and is the sheet falsy?\n\n", "5": "The clone method cannot be used on the client!\n\n* Are you running in a client-like environment on the server?\n* Are you trying to run SSR on the client?\n\n", "6": "Trying to insert a new style tag, but the given Node is unmounted!\n\n* Are you using a custom target that isn't mounted?\n* Does your document not have a valid head element?\n* Have you accidentally removed a style tag manually?\n\n", "7": "ThemeProvider: Please return an object from your \"theme\" prop function, e.g.\n\n```js\ntheme={() => ({})}\n```\n\n", "8": "ThemeProvider: Please make your \"theme\" prop an object.\n\n", "9": "Missing document ``\n\n", "10": "Cannot find a StyleSheet instance. Usually this happens if there are multiple copies of styled-components loaded at once. Check out this issue for how to troubleshoot and fix the common cases where this situation can happen: https://github.com/styled-components/styled-components/issues/1941#issuecomment-417862021\n\n", "11": "A plain React class (%s) has been interpolated into styles, probably as a component selector (https://www.styled-components.com/docs/advanced#referring-to-other-components). Only styled-component classes can be targeted in this fashion." } : {}; /** * super basic version of sprintf */ function format() { for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } var a = args[0]; var b = []; var c = void 0; for (c = 1; c < args.length; c += 1) { b.push(args[c]); } b.forEach(function (d) { a = a.replace(/%[a-z]/, d); }); return a; } /** * Create an error file out of errors.md for development and a simple web link to the full errors * in production mode. */ var StyledComponentsError = function (_Error) { inherits(StyledComponentsError, _Error); function StyledComponentsError(code) { classCallCheck(this, StyledComponentsError); for (var _len2 = arguments.length, interpolations = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { interpolations[_key2 - 1] = arguments[_key2]; } if (true) { var _this = possibleConstructorReturn(this, _Error.call(this, 'An error occurred. See https://github.com/styled-components/styled-components/blob/master/src/utils/errors.md#' + code + ' for more information. ' + (interpolations ? 'Additional arguments: ' + interpolations.join(', ') : ''))); } else { var _this = possibleConstructorReturn(this, _Error.call(this, format.apply(undefined, [ERRORS[code]].concat(interpolations)))); } return possibleConstructorReturn(_this); } return StyledComponentsError; }(Error); // var objToCss = function objToCss(obj, prevKey) { var css = Object.keys(obj).filter(function (key) { var chunk = obj[key]; return chunk !== undefined && chunk !== null && chunk !== false && chunk !== ''; }).map(function (key) { if (isPlainObject(obj[key])) return objToCss(obj[key], key); return __WEBPACK_IMPORTED_MODULE_0_fbjs_lib_hyphenateStyleName___default()(key) + ': ' + obj[key] + ';'; }).join(' '); return prevKey ? prevKey + ' {\n ' + css + '\n}' : css; }; var flatten = function flatten(chunks, executionContext) { return chunks.reduce(function (ruleSet, chunk) { /* Remove falsey values */ if (chunk === undefined || chunk === null || chunk === false || chunk === '') { return ruleSet; } /* Flatten ruleSet */ if (Array.isArray(chunk)) { ruleSet.push.apply(ruleSet, flatten(chunk, executionContext)); return ruleSet; } /* Handle other components */ if (chunk.hasOwnProperty('styledComponentId')) { // $FlowFixMe not sure how to make this pass ruleSet.push('.' + chunk.styledComponentId); return ruleSet; } /* Either execute or defer the function */ if (typeof chunk === 'function') { if (executionContext) { var nextChunk = chunk(executionContext); /* Throw if a React Element was given styles */ if (__WEBPACK_IMPORTED_MODULE_1_react___default.a.isValidElement(nextChunk)) { var elementName = chunk.displayName || chunk.name; throw new StyledComponentsError(11, elementName); } ruleSet.push.apply(ruleSet, flatten([nextChunk], executionContext)); } else ruleSet.push(chunk); return ruleSet; } /* Handle objects */ ruleSet.push( // $FlowFixMe have to add %checks somehow to isPlainObject isPlainObject(chunk) ? objToCss(chunk) : chunk.toString()); return ruleSet; }, []); }; // var COMMENT_REGEX = /^\s*\/\/.*$/gm; // NOTE: This stylis instance is only used to split rules from SSR'd style tags var stylisSplitter = new __WEBPACK_IMPORTED_MODULE_2_stylis___default.a({ global: false, cascade: true, keyframe: false, prefix: false, compress: false, semicolon: true }); var stylis = new __WEBPACK_IMPORTED_MODULE_2_stylis___default.a({ global: false, cascade: true, keyframe: false, prefix: true, compress: false, semicolon: false // NOTE: This means "autocomplete missing semicolons" }); // Wrap `insertRulePlugin to build a list of rules, // and then make our own plugin to return the rules. This // makes it easier to hook into the existing SSR architecture var parsingRules = []; // eslint-disable-next-line consistent-return var returnRulesPlugin = function returnRulesPlugin(context) { if (context === -2) { var parsedRules = parsingRules; parsingRules = []; return parsedRules; } }; var parseRulesPlugin = __WEBPACK_IMPORTED_MODULE_3_stylis_rule_sheet___default()(function (rule) { parsingRules.push(rule); }); stylis.use([parseRulesPlugin, returnRulesPlugin]); stylisSplitter.use([parseRulesPlugin, returnRulesPlugin]); var stringifyRules = function stringifyRules(rules, selector, prefix) { var flatCSS = rules.join('').replace(COMMENT_REGEX, ''); // replace JS comments var cssStr = selector && prefix ? prefix + ' ' + selector + ' { ' + flatCSS + ' }' : flatCSS; return stylis(prefix || !selector ? '' : selector, cssStr); }; var splitByRules = function splitByRules(css) { return stylisSplitter('', css); }; // function isStyledComponent(target) /* : %checks */{ return ( // $FlowFixMe TODO: flow for styledComponentId typeof target === 'function' && typeof target.styledComponentId === 'string' ); } // /* This function is DEPRECATED and will be removed on the next major version release. * It was needed to rehydrate all style blocks prepended to chunks before React * tries to rehydrate its HTML stream. Since the master StyleSheet will now detect * the use of streamed style tags and will perform the rehydration earlier when needed * this function will not be needed anymore */ function consolidateStreamedStyles() { if (false) { // eslint-disable-next-line no-console console.warn('styled-components automatically does streaming SSR rehydration now.\n' + 'Calling consolidateStreamedStyles manually is no longer necessary and a noop now.\n' + '- Please remove the consolidateStreamedStyles call from your client.'); } } // /* eslint-disable no-bitwise */ /* This is the "capacity" of our alphabet i.e. 2x26 for all letters plus their capitalised * counterparts */ var charsLength = 52; /* start at 75 for 'a' until 'z' (25) and then start at 65 for capitalised letters */ var getAlphabeticChar = function getAlphabeticChar(code) { return String.fromCharCode(code + (code > 25 ? 39 : 97)); }; /* input a number, usually a hash and convert it to base-52 */ var generateAlphabeticName = function generateAlphabeticName(code) { var name = ''; var x = void 0; /* get a char and divide by alphabet-length */ for (x = code; x > charsLength; x = Math.floor(x / charsLength)) { name = getAlphabeticChar(x % charsLength) + name; } return getAlphabeticChar(x % charsLength) + name; }; // var interleave = (function (strings, interpolations) { var result = [strings[0]]; for (var i = 0, len = interpolations.length; i < len; i += 1) { result.push(interpolations[i], strings[i + 1]); } return result; }); // var EMPTY_ARRAY = Object.freeze([]); var EMPTY_OBJECT = Object.freeze({}); // var css = (function (styles) { for (var _len = arguments.length, interpolations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { interpolations[_key - 1] = arguments[_key]; } if (typeof styles === 'function' || isPlainObject(styles)) { // $FlowFixMe return flatten(interleave(EMPTY_ARRAY, [styles].concat(interpolations))); } // $FlowFixMe return flatten(interleave(styles, interpolations)); }); // var SC_ATTR = typeof process !== 'undefined' && process.env.SC_ATTR || 'data-styled-components'; var SC_STREAM_ATTR = 'data-styled-streamed'; var CONTEXT_KEY = '__styled-components-stylesheet__'; var IS_BROWSER = typeof window !== 'undefined' && 'HTMLElement' in window; var DISABLE_SPEEDY = "production" !== 'production'; // var SC_COMPONENT_ID = /^[^\S\n]*?\/\* sc-component-id:\s*(\S+)\s+\*\//gm; var extractComps = (function (maybeCSS) { var css = '' + (maybeCSS || ''); // Definitely a string, and a clone var existingComponents = []; css.replace(SC_COMPONENT_ID, function (match, componentId, matchIndex) { existingComponents.push({ componentId: componentId, matchIndex: matchIndex }); return match; }); return existingComponents.map(function (_ref, i) { var componentId = _ref.componentId, matchIndex = _ref.matchIndex; var nextComp = existingComponents[i + 1]; var cssFromDOM = nextComp ? css.slice(matchIndex, nextComp.matchIndex) : css.slice(matchIndex); return { componentId: componentId, cssFromDOM: cssFromDOM }; }); }); // /* eslint-disable camelcase, no-undef */ var getNonce = (function () { return true ? __webpack_require__.nc : null; }); // // Helper to call a given function, only once var once = (function (cb) { var called = false; return function () { if (!called) { called = true; cb(); } }; }); // /* These are helpers for the StyleTags to keep track of the injected * rule names for each (component) ID that they're keeping track of. * They're crucial for detecting whether a name has already been * injected. * (This excludes rehydrated names) */ /* adds a new ID:name pairing to a names dictionary */ var addNameForId = function addNameForId(names, id, name) { if (name) { // eslint-disable-next-line no-param-reassign var namesForId = names[id] || (names[id] = Object.create(null)); namesForId[name] = true; } }; /* resets an ID entirely by overwriting it in the dictionary */ var resetIdNames = function resetIdNames(names, id) { // eslint-disable-next-line no-param-reassign names[id] = Object.create(null); }; /* factory for a names dictionary checking the existance of an ID:name pairing */ var hasNameForId = function hasNameForId(names) { return function (id, name) { return names[id] !== undefined && names[id][name]; }; }; /* stringifies names for the html/element output */ var stringifyNames = function stringifyNames(names) { var str = ''; // eslint-disable-next-line guard-for-in for (var id in names) { str += Object.keys(names[id]).join(' ') + ' '; } return str.trim(); }; /* clones the nested names dictionary */ var cloneNames = function cloneNames(names) { var clone = Object.create(null); // eslint-disable-next-line guard-for-in for (var id in names) { clone[id] = _extends({}, names[id]); } return clone; }; // /* These are helpers that deal with the insertRule (aka speedy) API * They are used in the StyleTags and specifically the speedy tag */ /* retrieve a sheet for a given style tag */ var sheetForTag = function sheetForTag(tag) { // $FlowFixMe if (tag.sheet) return tag.sheet; /* Firefox quirk requires us to step through all stylesheets to find one owned by the given tag */ var size = document.styleSheets.length; for (var i = 0; i < size; i += 1) { var sheet = document.styleSheets[i]; // $FlowFixMe if (sheet.ownerNode === tag) return sheet; } /* we should always be able to find a tag */ throw new StyledComponentsError(10); }; /* insert a rule safely and return whether it was actually injected */ var safeInsertRule = function safeInsertRule(sheet, cssRule, index) { /* abort early if cssRule string is falsy */ if (!cssRule) return false; var maxIndex = sheet.cssRules.length; try { /* use insertRule and cap passed index with maxIndex (no of cssRules) */ sheet.insertRule(cssRule, index <= maxIndex ? index : maxIndex); } catch (err) { /* any error indicates an invalid rule */ return false; } return true; }; /* deletes `size` rules starting from `removalIndex` */ var deleteRules = function deleteRules(sheet, removalIndex, size) { var lowerBound = removalIndex - size; for (var i = removalIndex; i > lowerBound; i -= 1) { sheet.deleteRule(i); } }; // /* this marker separates component styles and is important for rehydration */ var makeTextMarker = function makeTextMarker(id) { return '\n/* sc-component-id: ' + id + ' */\n'; }; /* add up all numbers in array up until and including the index */ var addUpUntilIndex = function addUpUntilIndex(sizes, index) { var totalUpToIndex = 0; for (var i = 0; i <= index; i += 1) { totalUpToIndex += sizes[i]; } return totalUpToIndex; }; /* create a new style tag after lastEl */ var makeStyleTag = function makeStyleTag(target, tagEl, insertBefore) { var el = document.createElement('style'); el.setAttribute(SC_ATTR, ''); var nonce = getNonce(); if (nonce) { el.setAttribute('nonce', nonce); } /* Work around insertRule quirk in EdgeHTML */ el.appendChild(document.createTextNode('')); if (target && !tagEl) { /* Append to target when no previous element was passed */ target.appendChild(el); } else { if (!tagEl || !target || !tagEl.parentNode) { throw new StyledComponentsError(6); } /* Insert new style tag after the previous one */ tagEl.parentNode.insertBefore(el, insertBefore ? tagEl : tagEl.nextSibling); } return el; }; /* takes a css factory function and outputs an html styled tag factory */ var wrapAsHtmlTag = function wrapAsHtmlTag(css, names) { return function (additionalAttrs) { var nonce = getNonce(); var attrs = [nonce && 'nonce="' + nonce + '"', SC_ATTR + '="' + stringifyNames(names) + '"', additionalAttrs]; var htmlAttr = attrs.filter(Boolean).join(' '); return ''; }; }; /* takes a css factory function and outputs an element factory */ var wrapAsElement = function wrapAsElement(css, names) { return function () { var _props; var props = (_props = {}, _props[SC_ATTR] = stringifyNames(names), _props); var nonce = getNonce(); if (nonce) { // $FlowFixMe props.nonce = nonce; } // eslint-disable-next-line react/no-danger return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('style', _extends({}, props, { dangerouslySetInnerHTML: { __html: css() } })); }; }; var getIdsFromMarkersFactory = function getIdsFromMarkersFactory(markers) { return function () { return Object.keys(markers); }; }; /* speedy tags utilise insertRule */ var makeSpeedyTag = function makeSpeedyTag(el, getImportRuleTag) { var names = Object.create(null); var markers = Object.create(null); var sizes = []; var extractImport = getImportRuleTag !== undefined; /* indicates whther getImportRuleTag was called */ var usedImportRuleTag = false; var insertMarker = function insertMarker(id) { var prev = markers[id]; if (prev !== undefined) { return prev; } markers[id] = sizes.length; sizes.push(0); resetIdNames(names, id); return markers[id]; }; var insertRules = function insertRules(id, cssRules, name) { var marker = insertMarker(id); var sheet = sheetForTag(el); var insertIndex = addUpUntilIndex(sizes, marker); var injectedRules = 0; var importRules = []; var cssRulesSize = cssRules.length; for (var i = 0; i < cssRulesSize; i += 1) { var cssRule = cssRules[i]; var mayHaveImport = extractImport; /* @import rules are reordered to appear first */ if (mayHaveImport && cssRule.indexOf('@import') !== -1) { importRules.push(cssRule); } else if (safeInsertRule(sheet, cssRule, insertIndex + injectedRules)) { mayHaveImport = false; injectedRules += 1; } } if (extractImport && importRules.length > 0) { usedImportRuleTag = true; // $FlowFixMe getImportRuleTag().insertRules(id + '-import', importRules); } sizes[marker] += injectedRules; /* add up no of injected rules */ addNameForId(names, id, name); }; var removeRules = function removeRules(id) { var marker = markers[id]; if (marker === undefined) return; var size = sizes[marker]; var sheet = sheetForTag(el); var removalIndex = addUpUntilIndex(sizes, marker); deleteRules(sheet, removalIndex, size); sizes[marker] = 0; resetIdNames(names, id); if (extractImport && usedImportRuleTag) { // $FlowFixMe getImportRuleTag().removeRules(id + '-import'); } }; var css = function css() { var _sheetForTag = sheetForTag(el), cssRules = _sheetForTag.cssRules; var str = ''; // eslint-disable-next-line guard-for-in for (var id in markers) { str += makeTextMarker(id); var marker = markers[id]; var end = addUpUntilIndex(sizes, marker); var size = sizes[marker]; for (var i = end - size; i < end; i += 1) { var rule = cssRules[i]; if (rule !== undefined) { str += rule.cssText; } } } return str; }; return { clone: function clone() { throw new StyledComponentsError(5); }, css: css, getIds: getIdsFromMarkersFactory(markers), hasNameForId: hasNameForId(names), insertMarker: insertMarker, insertRules: insertRules, removeRules: removeRules, sealed: false, styleTag: el, toElement: wrapAsElement(css, names), toHTML: wrapAsHtmlTag(css, names) }; }; var makeTextNode = function makeTextNode(id) { return document.createTextNode(makeTextMarker(id)); }; var makeBrowserTag = function makeBrowserTag(el, getImportRuleTag) { var names = Object.create(null); var markers = Object.create(null); var extractImport = getImportRuleTag !== undefined; /* indicates whther getImportRuleTag was called */ var usedImportRuleTag = false; var insertMarker = function insertMarker(id) { var prev = markers[id]; if (prev !== undefined) { return prev; } markers[id] = makeTextNode(id); el.appendChild(markers[id]); names[id] = Object.create(null); return markers[id]; }; var insertRules = function insertRules(id, cssRules, name) { var marker = insertMarker(id); var importRules = []; var cssRulesSize = cssRules.length; for (var i = 0; i < cssRulesSize; i += 1) { var rule = cssRules[i]; var mayHaveImport = extractImport; if (mayHaveImport && rule.indexOf('@import') !== -1) { importRules.push(rule); } else { mayHaveImport = false; var separator = i === cssRulesSize - 1 ? '' : ' '; marker.appendData('' + rule + separator); } } addNameForId(names, id, name); if (extractImport && importRules.length > 0) { usedImportRuleTag = true; // $FlowFixMe getImportRuleTag().insertRules(id + '-import', importRules); } }; var removeRules = function removeRules(id) { var marker = markers[id]; if (marker === undefined) return; /* create new empty text node and replace the current one */ var newMarker = makeTextNode(id); el.replaceChild(newMarker, marker); markers[id] = newMarker; resetIdNames(names, id); if (extractImport && usedImportRuleTag) { // $FlowFixMe getImportRuleTag().removeRules(id + '-import'); } }; var css = function css() { var str = ''; // eslint-disable-next-line guard-for-in for (var id in markers) { str += markers[id].data; } return str; }; return { clone: function clone() { throw new StyledComponentsError(5); }, css: css, getIds: getIdsFromMarkersFactory(markers), hasNameForId: hasNameForId(names), insertMarker: insertMarker, insertRules: insertRules, removeRules: removeRules, sealed: false, styleTag: el, toElement: wrapAsElement(css, names), toHTML: wrapAsHtmlTag(css, names) }; }; var makeServerTagInternal = function makeServerTagInternal(namesArg, markersArg) { var names = namesArg === undefined ? Object.create(null) : namesArg; var markers = markersArg === undefined ? Object.create(null) : markersArg; var insertMarker = function insertMarker(id) { var prev = markers[id]; if (prev !== undefined) { return prev; } return markers[id] = ['']; }; var insertRules = function insertRules(id, cssRules, name) { var marker = insertMarker(id); marker[0] += cssRules.join(' '); addNameForId(names, id, name); }; var removeRules = function removeRules(id) { var marker = markers[id]; if (marker === undefined) return; marker[0] = ''; resetIdNames(names, id); }; var css = function css() { var str = ''; // eslint-disable-next-line guard-for-in for (var id in markers) { var cssForId = markers[id][0]; if (cssForId) { str += makeTextMarker(id) + cssForId; } } return str; }; var clone = function clone() { var namesClone = cloneNames(names); var markersClone = Object.create(null); // eslint-disable-next-line guard-for-in for (var id in markers) { markersClone[id] = [markers[id][0]]; } return makeServerTagInternal(namesClone, markersClone); }; var tag = { clone: clone, css: css, getIds: getIdsFromMarkersFactory(markers), hasNameForId: hasNameForId(names), insertMarker: insertMarker, insertRules: insertRules, removeRules: removeRules, sealed: false, styleTag: null, toElement: wrapAsElement(css, names), toHTML: wrapAsHtmlTag(css, names) }; return tag; }; var makeServerTag = function makeServerTag() { return makeServerTagInternal(); }; var makeTag = function makeTag(target, tagEl, forceServer, insertBefore, getImportRuleTag) { if (IS_BROWSER && !forceServer) { var el = makeStyleTag(target, tagEl, insertBefore); if (DISABLE_SPEEDY) { return makeBrowserTag(el, getImportRuleTag); } else { return makeSpeedyTag(el, getImportRuleTag); } } return makeServerTag(); }; /* wraps a given tag so that rehydration is performed once when necessary */ var makeRehydrationTag = function makeRehydrationTag(tag, els, extracted, immediateRehydration) { /* rehydration function that adds all rules to the new tag */ var rehydrate = once(function () { /* add all extracted components to the new tag */ for (var i = 0, len = extracted.length; i < len; i += 1) { var _extracted$i = extracted[i], componentId = _extracted$i.componentId, cssFromDOM = _extracted$i.cssFromDOM; var cssRules = splitByRules(cssFromDOM); tag.insertRules(componentId, cssRules); } /* remove old HTMLStyleElements, since they have been rehydrated */ for (var _i = 0, _len = els.length; _i < _len; _i += 1) { var el = els[_i]; if (el.parentNode) { el.parentNode.removeChild(el); } } }); if (immediateRehydration) rehydrate(); return _extends({}, tag, { /* add rehydration hook to insertion methods */ insertMarker: function insertMarker(id) { rehydrate(); return tag.insertMarker(id); }, insertRules: function insertRules(id, cssRules, name) { rehydrate(); return tag.insertRules(id, cssRules, name); } }); }; // var SPLIT_REGEX = /\s+/; /* determine the maximum number of components before tags are sharded */ var MAX_SIZE = void 0; if (IS_BROWSER) { /* in speedy mode we can keep a lot more rules in a sheet before a slowdown can be expected */ MAX_SIZE = DISABLE_SPEEDY ? 40 : 1000; } else { /* for servers we do not need to shard at all */ MAX_SIZE = -1; } var sheetRunningId = 0; var master = void 0; var StyleSheet = function () { /* a map from ids to tags */ /* deferred rules for a given id */ /* this is used for not reinjecting rules via hasNameForId() */ /* when rules for an id are removed using remove() we have to ignore rehydratedNames for it */ /* a list of tags belonging to this StyleSheet */ /* a tag for import rules */ /* current capacity until a new tag must be created */ /* children (aka clones) of this StyleSheet inheriting all and future injections */ function StyleSheet() { var _this = this; var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : IS_BROWSER ? document.head : null; var forceServer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; classCallCheck(this, StyleSheet); this.getImportRuleTag = function () { var importRuleTag = _this.importRuleTag; if (importRuleTag !== undefined) { return importRuleTag; } var firstTag = _this.tags[0]; var insertBefore = true; return _this.importRuleTag = makeTag(_this.target, firstTag ? firstTag.styleTag : null, _this.forceServer, insertBefore); }; sheetRunningId += 1; this.id = sheetRunningId; this.forceServer = forceServer; this.target = forceServer ? null : target; this.tagMap = {}; this.deferred = {}; this.rehydratedNames = {}; this.ignoreRehydratedNames = {}; this.tags = []; this.capacity = 1; this.clones = []; } /* rehydrate all SSR'd style tags */ StyleSheet.prototype.rehydrate = function rehydrate() { if (!IS_BROWSER || this.forceServer) { return this; } var els = []; var extracted = []; var isStreamed = false; /* retrieve all of our SSR style elements from the DOM */ var nodes = document.querySelectorAll('style[' + SC_ATTR + ']'); var nodesSize = nodes.length; /* abort rehydration if no previous style tags were found */ if (nodesSize === 0) { return this; } for (var i = 0; i < nodesSize; i += 1) { // $FlowFixMe: We can trust that all elements in this query are style elements var el = nodes[i]; /* check if style tag is a streamed tag */ if (!isStreamed) isStreamed = !!el.getAttribute(SC_STREAM_ATTR); /* retrieve all component names */ var elNames = (el.getAttribute(SC_ATTR) || '').trim().split(SPLIT_REGEX); var elNamesSize = elNames.length; for (var j = 0; j < elNamesSize; j += 1) { var name = elNames[j]; /* add rehydrated name to sheet to avoid readding styles */ this.rehydratedNames[name] = true; } /* extract all components and their CSS */ extracted.push.apply(extracted, extractComps(el.textContent)); /* store original HTMLStyleElement */ els.push(el); } /* abort rehydration if nothing was extracted */ var extractedSize = extracted.length; if (extractedSize === 0) { return this; } /* create a tag to be used for rehydration */ var tag = this.makeTag(null); var rehydrationTag = makeRehydrationTag(tag, els, extracted, isStreamed); /* reset capacity and adjust MAX_SIZE by the initial size of the rehydration */ this.capacity = Math.max(1, MAX_SIZE - extractedSize); this.tags.push(rehydrationTag); /* retrieve all component ids */ for (var _j = 0; _j < extractedSize; _j += 1) { this.tagMap[extracted[_j].componentId] = rehydrationTag; } return this; }; /* retrieve a "master" instance of StyleSheet which is typically used when no other is available * The master StyleSheet is targeted by injectGlobal, keyframes, and components outside of any * StyleSheetManager's context */ /* reset the internal "master" instance */ StyleSheet.reset = function reset() { var forceServer = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; master = new StyleSheet(undefined, forceServer).rehydrate(); }; /* adds "children" to the StyleSheet that inherit all of the parents' rules * while their own rules do not affect the parent */ StyleSheet.prototype.clone = function clone() { var sheet = new StyleSheet(this.target, this.forceServer); /* add to clone array */ this.clones.push(sheet); /* clone all tags */ sheet.tags = this.tags.map(function (tag) { var ids = tag.getIds(); var newTag = tag.clone(); /* reconstruct tagMap */ for (var i = 0; i < ids.length; i += 1) { sheet.tagMap[ids[i]] = newTag; } return newTag; }); /* clone other maps */ sheet.rehydratedNames = _extends({}, this.rehydratedNames); sheet.deferred = _extends({}, this.deferred); return sheet; }; /* force StyleSheet to create a new tag on the next injection */ StyleSheet.prototype.sealAllTags = function sealAllTags() { this.capacity = 1; this.tags.forEach(function (tag) { // eslint-disable-next-line no-param-reassign tag.sealed = true; }); }; StyleSheet.prototype.makeTag = function makeTag$$1(tag) { var lastEl = tag ? tag.styleTag : null; var insertBefore = false; return makeTag(this.target, lastEl, this.forceServer, insertBefore, this.getImportRuleTag); }; /* get a tag for a given componentId, assign the componentId to one, or shard */ StyleSheet.prototype.getTagForId = function getTagForId(id) { /* simply return a tag, when the componentId was already assigned one */ var prev = this.tagMap[id]; if (prev !== undefined && !prev.sealed) { return prev; } var tag = this.tags[this.tags.length - 1]; /* shard (create a new tag) if the tag is exhausted (See MAX_SIZE) */ this.capacity -= 1; if (this.capacity === 0) { this.capacity = MAX_SIZE; tag = this.makeTag(tag); this.tags.push(tag); } return this.tagMap[id] = tag; }; /* mainly for injectGlobal to check for its id */ StyleSheet.prototype.hasId = function hasId(id) { return this.tagMap[id] !== undefined; }; /* caching layer checking id+name to already have a corresponding tag and injected rules */ StyleSheet.prototype.hasNameForId = function hasNameForId(id, name) { /* exception for rehydrated names which are checked separately */ if (this.ignoreRehydratedNames[id] === undefined && this.rehydratedNames[name]) { return true; } var tag = this.tagMap[id]; return tag !== undefined && tag.hasNameForId(id, name); }; /* registers a componentId and registers it on its tag */ StyleSheet.prototype.deferredInject = function deferredInject(id, cssRules) { /* don't inject when the id is already registered */ if (this.tagMap[id] !== undefined) return; var clones = this.clones; for (var i = 0; i < clones.length; i += 1) { clones[i].deferredInject(id, cssRules); } this.getTagForId(id).insertMarker(id); this.deferred[id] = cssRules; }; /* injects rules for a given id with a name that will need to be cached */ StyleSheet.prototype.inject = function inject(id, cssRules, name) { var clones = this.clones; for (var i = 0; i < clones.length; i += 1) { clones[i].inject(id, cssRules, name); } var tag = this.getTagForId(id); /* add deferred rules for component */ if (this.deferred[id] !== undefined) { // Combine passed cssRules with previously deferred CSS rules // NOTE: We cannot mutate the deferred array itself as all clones // do the same (see clones[i].inject) var rules = this.deferred[id].concat(cssRules); tag.insertRules(id, rules, name); this.deferred[id] = undefined; } else { tag.insertRules(id, cssRules, name); } }; /* removes all rules for a given id, which doesn't remove its marker but resets it */ StyleSheet.prototype.remove = function remove(id) { var tag = this.tagMap[id]; if (tag === undefined) return; var clones = this.clones; for (var i = 0; i < clones.length; i += 1) { clones[i].remove(id); } /* remove all rules from the tag */ tag.removeRules(id); /* ignore possible rehydrated names */ this.ignoreRehydratedNames[id] = true; /* delete possible deferred rules */ this.deferred[id] = undefined; }; StyleSheet.prototype.toHTML = function toHTML() { return this.tags.map(function (tag) { return tag.toHTML(); }).join(''); }; StyleSheet.prototype.toReactElements = function toReactElements() { var id = this.id; return this.tags.map(function (tag, i) { var key = 'sc-' + id + '-' + i; return Object(__WEBPACK_IMPORTED_MODULE_1_react__["cloneElement"])(tag.toElement(), { key: key }); }); }; createClass(StyleSheet, null, [{ key: 'master', get: function get$$1() { return master || (master = new StyleSheet().rehydrate()); } /* NOTE: This is just for backwards-compatibility with jest-styled-components */ }, { key: 'instance', get: function get$$1() { return StyleSheet.master; } }]); return StyleSheet; }(); var _StyleSheetManager$ch; var StyleSheetManager = function (_Component) { inherits(StyleSheetManager, _Component); function StyleSheetManager() { classCallCheck(this, StyleSheetManager); return possibleConstructorReturn(this, _Component.apply(this, arguments)); } StyleSheetManager.prototype.getChildContext = function getChildContext() { var _ref; return _ref = {}, _ref[CONTEXT_KEY] = this.sheetInstance, _ref; }; StyleSheetManager.prototype.componentWillMount = function componentWillMount() { if (this.props.sheet) { this.sheetInstance = this.props.sheet; } else if (this.props.target) { this.sheetInstance = new StyleSheet(this.props.target); } else { throw new StyledComponentsError(4); } }; StyleSheetManager.prototype.render = function render() { /* eslint-disable react/prop-types */ // Flow v0.43.1 will report an error accessing the `children` property, // but v0.47.0 will not. It is necessary to use a type cast instead of // a "fixme" comment to satisfy both Flow versions. return __WEBPACK_IMPORTED_MODULE_1_react___default.a.Children.only(this.props.children); }; return StyleSheetManager; }(__WEBPACK_IMPORTED_MODULE_1_react__["Component"]); StyleSheetManager.childContextTypes = (_StyleSheetManager$ch = {}, _StyleSheetManager$ch[CONTEXT_KEY] = __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.instanceOf(StyleSheet), __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.instanceOf(ServerStyleSheet)]).isRequired, _StyleSheetManager$ch); false ? StyleSheetManager.propTypes = { sheet: PropTypes.oneOfType([PropTypes.instanceOf(StyleSheet), PropTypes.instanceOf(ServerStyleSheet)]), target: PropTypes.shape({ appendChild: PropTypes.func.isRequired }) } : void 0; // var ServerStyleSheet = function () { function ServerStyleSheet() { classCallCheck(this, ServerStyleSheet); /* The master sheet might be reset, so keep a reference here */ this.masterSheet = StyleSheet.master; this.instance = this.masterSheet.clone(); this.closed = false; } ServerStyleSheet.prototype.complete = function complete() { if (!this.closed) { /* Remove closed StyleSheets from the master sheet */ var index = this.masterSheet.clones.indexOf(this.instance); this.masterSheet.clones.splice(index, 1); this.closed = true; } }; ServerStyleSheet.prototype.collectStyles = function collectStyles(children) { if (this.closed) { throw new StyledComponentsError(2); } return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( StyleSheetManager, { sheet: this.instance }, children ); }; ServerStyleSheet.prototype.getStyleTags = function getStyleTags() { this.complete(); return this.instance.toHTML(); }; ServerStyleSheet.prototype.getStyleElement = function getStyleElement() { this.complete(); return this.instance.toReactElements(); }; ServerStyleSheet.prototype.interleaveWithNodeStream = function interleaveWithNodeStream(readableStream) { var _this = this; { throw new StyledComponentsError(3); } /* the tag index keeps track of which tags have already been emitted */ var instance = this.instance; var instanceTagIndex = 0; var streamAttr = SC_STREAM_ATTR + '="true"'; var transformer = new stream.Transform({ transform: function appendStyleChunks(chunk, /* encoding */_, callback) { var tags = instance.tags; var html = ''; /* retrieve html for each new style tag */ for (; instanceTagIndex < tags.length; instanceTagIndex += 1) { var tag = tags[instanceTagIndex]; html += tag.toHTML(streamAttr); } /* force our StyleSheets to emit entirely new tags */ instance.sealAllTags(); /* prepend style html to chunk */ this.push(html + chunk); callback(); } }); readableStream.on('end', function () { return _this.complete(); }); readableStream.on('error', function (err) { _this.complete(); // forward the error to the transform stream transformer.emit('error', err); }); return readableStream.pipe(transformer); }; return ServerStyleSheet; }(); // var LIMIT = 200; var createWarnTooManyClasses = (function (displayName) { var generatedClasses = {}; var warningSeen = false; return function (className) { if (!warningSeen) { generatedClasses[className] = true; if (Object.keys(generatedClasses).length >= LIMIT) { // Unable to find latestRule in test environment. /* eslint-disable no-console, prefer-template */ console.warn('Over ' + LIMIT + ' classes were generated for component ' + displayName + '. \n' + 'Consider using the attrs method, together with a style object for frequently changed styles.\n' + 'Example:\n' + ' const Component = styled.div.attrs({\n' + ' style: ({ background }) => ({\n' + ' background,\n' + ' }),\n' + ' })`width: 100%;`\n\n' + ' '); warningSeen = true; generatedClasses = {}; } } }; }); // var determineTheme = (function (props, fallbackTheme, defaultProps) { // Props should take precedence over ThemeProvider, which should take precedence over // defaultProps, but React automatically puts defaultProps on props. /* eslint-disable react/prop-types */ var isDefaultTheme = defaultProps && props.theme === defaultProps.theme; var theme = props.theme && !isDefaultTheme ? props.theme : fallbackTheme; /* eslint-enable */ return theme; }); // var escapeRegex = /[[\].#*$><+~=|^:(),"'`-]+/g; var dashesAtEnds = /(^-|-$)/g; /** * TODO: Explore using CSS.escape when it becomes more available * in evergreen browsers. */ function escape(str) { return str // Replace all possible CSS selectors .replace(escapeRegex, '-') // Remove extraneous hyphens at the start and end .replace(dashesAtEnds, ''); } // function getComponentName(target) { return target.displayName || target.name || 'Component'; } // function isTag(target) /* : %checks */{ return typeof target === 'string'; } // function generateDisplayName(target) { return isTag(target) ? 'styled.' + target : 'Styled(' + getComponentName(target) + ')'; } // /* eslint-disable max-len */ /** * Trying to avoid the unknown-prop errors on styled components by filtering by * React's attribute whitelist. * * To regenerate this regex: * * 1. `npm i -g regexgen` (https://github.com/devongovett/regexgen) * 2. Run `regexgen` with the list of space-separated words below as input * 3. Surround the emitted regex with this: `/^(GENERATED_REGEX)$/` -- this will ensure a full string match * and no false positives from partials * */ /* children dangerouslySetInnerHTML key ref autoFocus defaultValue valueLink defaultChecked checkedLink innerHTML suppressContentEditableWarning onFocusIn onFocusOut className onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown onKeyPress onKeyUp onFocus onBlur onChange onInput onInvalid onSubmit onReset onClick onContextMenu onDoubleClick onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onAnimationStart onAnimationEnd onAnimationIteration onTransitionEnd onCopyCapture onCutCapture onPasteCapture onCompositionEndCapture onCompositionStartCapture onCompositionUpdateCapture onKeyDownCapture onKeyPressCapture onKeyUpCapture onFocusCapture onBlurCapture onChangeCapture onInputCapture onSubmitCapture onResetCapture onClickCapture onContextMenuCapture onDoubleClickCapture onDragCapture onDragEndCapture onDragEnterCapture onDragExitCapture onDragLeaveCapture onDragOverCapture onDragStartCapture onDropCapture onMouseDownCapture onMouseEnterCapture onMouseLeaveCapture onMouseMoveCapture onMouseOutCapture onMouseOverCapture onMouseUpCapture onSelectCapture onTouchCancelCapture onTouchEndCapture onTouchMoveCapture onTouchStartCapture onScrollCapture onWheelCapture onAbortCapture onCanPlayCapture onCanPlayThroughCapture onDurationChangeCapture onEmptiedCapture onEncryptedCapture onEndedCapture onErrorCapture onLoadedDataCapture onLoadedMetadataCapture onLoadStartCapture onPauseCapture onPlayCapture onPlayingCapture onProgressCapture onRateChangeCapture onSeekedCapture onSeekingCapture onStalledCapture onSuspendCapture onTimeUpdateCapture onVolumeChangeCapture onWaitingCapture onLoadCapture onAnimationStartCapture onAnimationEndCapture onAnimationIterationCapture onTransitionEndCapture accept acceptCharset accessKey action allowFullScreen allowTransparency alt as async autoComplete autoPlay capture cellPadding cellSpacing charSet challenge checked cite classID className cols colSpan content contentEditable contextMenu controlsList controls coords crossOrigin data dateTime default defer dir disabled download draggable encType form formAction formEncType formMethod formNoValidate formTarget frameBorder headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media mediaGroup method min minLength multiple muted name nonce noValidate open optimum pattern placeholder playsInline poster preload profile radioGroup readOnly referrerPolicy rel required reversed role rows rowSpan sandbox scope scoped scrolling seamless selected shape size sizes span spellCheck src srcDoc srcLang srcSet start step style summary tabIndex target title type useMap value width wmode wrap about datatype inlist prefix property resource typeof vocab autoCapitalize autoCorrect autoSave color itemProp itemScope itemType itemID itemRef results security unselectable accentHeight accumulate additive alignmentBaseline allowReorder alphabetic amplitude arabicForm ascent attributeName attributeType autoReverse azimuth baseFrequency baseProfile baselineShift bbox begin bias by calcMode capHeight clip clipPath clipRule clipPathUnits colorInterpolation colorInterpolationFilters colorProfile colorRendering contentScriptType contentStyleType cursor cx cy d decelerate descent diffuseConstant direction display divisor dominantBaseline dur dx dy edgeMode elevation enableBackground end exponent externalResourcesRequired fill fillOpacity fillRule filter filterRes filterUnits floodColor floodOpacity focusable fontFamily fontSize fontSizeAdjust fontStretch fontStyle fontVariant fontWeight format from fx fy g1 g2 glyphName glyphOrientationHorizontal glyphOrientationVertical glyphRef gradientTransform gradientUnits hanging horizAdvX horizOriginX ideographic imageRendering in in2 intercept k k1 k2 k3 k4 kernelMatrix kernelUnitLength kerning keyPoints keySplines keyTimes lengthAdjust letterSpacing lightingColor limitingConeAngle local markerEnd markerMid markerStart markerHeight markerUnits markerWidth mask maskContentUnits maskUnits mathematical mode numOctaves offset opacity operator order orient orientation origin overflow overlinePosition overlineThickness paintOrder panose1 pathLength patternContentUnits patternTransform patternUnits pointerEvents points pointsAtX pointsAtY pointsAtZ preserveAlpha preserveAspectRatio primitiveUnits r radius refX refY renderingIntent repeatCount repeatDur requiredExtensions requiredFeatures restart result rotate rx ry scale seed shapeRendering slope spacing specularConstant specularExponent speed spreadMethod startOffset stdDeviation stemh stemv stitchTiles stopColor stopOpacity strikethroughPosition strikethroughThickness string stroke strokeDasharray strokeDashoffset strokeLinecap strokeLinejoin strokeMiterlimit strokeOpacity strokeWidth surfaceScale systemLanguage tableValues targetX targetY textAnchor textDecoration textRendering textLength to transform u1 u2 underlinePosition underlineThickness unicode unicodeBidi unicodeRange unitsPerEm vAlphabetic vHanging vIdeographic vMathematical values vectorEffect version vertAdvY vertOriginX vertOriginY viewBox viewTarget visibility widths wordSpacing writingMode x xHeight x1 x2 xChannelSelector xlinkActuate xlinkArcrole xlinkHref xlinkRole xlinkShow xlinkTitle xlinkType xmlBase xmlns xmlnsXlink xmlLang xmlSpace y y1 y2 yChannelSelector z zoomAndPan onPointerDown onPointerMove onPointerUp onPointerCancel onGotPointerCapture onLostPointerCapture onPointerEnter onPointerLeave onPointerOver onPointerOut class for autofocus allow allowUserMedia allowPaymentRequest */ /* eslint-enable max-len */ var ATTRIBUTE_REGEX = /^((?:s(?:uppressContentEditableWarn|croll|pac)|(?:shape|image|text)Render|(?:letter|word)Spac|vHang|hang)ing|(?:on(?:AnimationIteration|C(?:o(?:mposition(?:Update|Start|End)|ntextMenu|py)|anPlayThrough|anPlay|hange|lick|ut)|(?:Animation|Touch|Load|Drag)Start|(?:(?:Duration|Volume|Rate)Chang|(?:MouseLea|(?:Touch|Mouse)Mo|DragLea)v|Paus)e|Loaded(?:Metad|D)ata|(?:(?:T(?:ransition|ouch)|Animation)E|Suspe)nd|DoubleClick|(?:TouchCanc|Whe)el|Lo(?:stPointer|ad)|TimeUpdate|(?:Mouse(?:Ent|Ov)e|Drag(?:Ent|Ov)e|Erro)r|GotPointer|MouseDown|(?:E(?:n(?:crypt|d)|mpti)|S(?:tall|eek))ed|KeyPress|(?:MouseOu|DragExi|S(?:elec|ubmi)|Rese|Inpu)t|P(?:rogress|laying)|DragEnd|Key(?:Down|Up)|(?:MouseU|Dro)p|(?:Wait|Seek)ing|Scroll|Focus|Paste|Abort|Drag|Play|Blur)Captur|alignmentBaselin|(?:limitingConeAng|xlink(?:(?:Arcr|R)o|Tit)|s(?:urfaceSca|ty|ca)|unselectab|baseProfi|fontSty|(?:focus|dragg)ab|multip|profi|tit)l|d(?:ominantBaselin|efaultValu)|onPointerLeav|a(?:uto(?:Capitaliz|Revers|Sav)|dditiv)|(?:(?:formNoValid|xlinkActu|noValid|accumul|rot)a|autoComple|decelera)t|(?:(?:attribute|item)T|datat)yp|onPointerMov|(?:attribute|glyph)Nam|playsInlin|(?:writing|input|edge)Mod|(?:formE|e)ncTyp|(?:amplitu|mo)d|(?:xlinkTy|itemSco|keyTy|slo)p|(?:xmlSpa|non)c|fillRul|(?:dateTi|na)m|r(?:esourc|ol)|xmlBas|wmod)e|(?:glyphOrientationHorizont|loc)al|(?:externalResourcesRequir|select|revers|mut)ed|c(?:o(?:lorInterpolationFilter|ord)s|o(?:lor(?:Interpolation)?|nt(?:rols|ent))|(?:ontentS(?:cript|tyle)Typ|o(?:ntentEditab|lorProfi)l|l(?:assNam|ipRul)|a(?:lcMod|ptur)|it)e|olorRendering|l(?:ipPathUnits|assID)|(?:ontrolsLis|apHeigh)t|h(?:eckedLink|a(?:llenge|rSet)|ildren|ecked)|ell(?:Spac|Padd)ing|o(?:ntextMenu|ls)|(?:rossOrigi|olSpa)n|l(?:ip(?:Path)?|ass)|ursor|[xy])|glyphOrientationVertical|d(?:angerouslySetInnerHTML|efaultChecked|ownload|isabled|isplay|[xy])|(?:s(?:trikethroughThickn|eaml)es|(?:und|ov)erlineThicknes|r(?:equiredExtension|adiu)|(?:requiredFeatur|tableValu|stitchTil|numOctav|filterR)e|key(?:(?:Splin|Tim)e|Param)|auto[Ff]ocu|header|bia)s|(?:(?:st(?:rikethroughPosi|dDevia)|(?:und|ov)erlinePosi|(?:textDecor|elev)a|orienta)tio|(?:strokeLinejo|orig)i|on(?:PointerDow|FocusI)|formActio|zoomAndPa|directio|(?:vers|act)io|rowSpa|begi|ico)n|o(?:n(?:AnimationIteration|C(?:o(?:mposition(?:Update|Start|End)|ntextMenu|py)|anPlayThrough|anPlay|hange|lick|ut)|(?:(?:Duration|Volume|Rate)Chang|(?:MouseLea|(?:Touch|Mouse)Mo|DragLea)v|Paus)e|Loaded(?:Metad|D)ata|(?:Animation|Touch|Load|Drag)Start|(?:(?:T(?:ransition|ouch)|Animation)E|Suspe)nd|DoubleClick|(?:TouchCanc|Whe)el|(?:Mouse(?:Ent|Ov)e|Drag(?:Ent|Ov)e|Erro)r|TimeUpdate|(?:E(?:n(?:crypt|d)|mpti)|S(?:tall|eek))ed|MouseDown|P(?:rogress|laying)|(?:MouseOu|DragExi|S(?:elec|ubmi)|Rese|Inpu)t|KeyPress|DragEnd|Key(?:Down|Up)|(?:Wait|Seek)ing|(?:MouseU|Dro)p|Scroll|Paste|Focus|Abort|Drag|Play|Load|Blur)|rient)|p(?:reserveAspectRatio|ointsAt[X-Z]|anose1)|(?:(?:allowPaymentReque|(?:fontSize|length)Adju|manife)s|strokeMiterlimi|(?:(?:specularE|e)xpon|renderingInt|asc)en|(?:specularConsta|repeatCou|fontVaria)n|d(?:iffuseConsta|esce)n|baselineShif|vectorEffec|onPointerOu|(?:(?:mar(?:ker|gin)|x)H|accentH|fontW)eigh|markerStar|a(?:utoCorrec|bou)|onFocusOu|intercep|restar|forma|inlis|heigh|lis)t|(?:patternContent|ma(?:sk(?:Content)?|rker)|primitive|gradient|pattern|filter)Units|(?:(?:allowTranspar|baseFrequ)enc|re(?:ferrerPolic|adOnl)|(?:(?:st(?:roke|op)O|floodO|fillO|o)pac|integr|secur)it|visibilit|fontFamil|accessKe|propert|summar)y|(?:gradientT|patternT|t)ransform|(?:(?:st(?:rokeDasho|artO)|o)ffs|acceptChars|formTarg|viewTarg|srcS)et|(?:[xy]ChannelSelect|lightingCol|textAnch|floodCol|stopCol|operat|htmlF)or|(?:(?:enableBackgrou|markerE)n|s(?:p(?:readMetho|ee)|ee)|formMetho|(?:markerM|onInval)i|preloa|metho|kin)d|k(?:ernel(?:UnitLength|Matrix)|[1-4])|strokeDasharray|(?:onPointerCanc|lab)el|(?:allowFullScre|hidd)en|a(?:l(?:lowUserMedia|phabetic|t)|rabicForm|sync)|systemLanguage|(?:(?:o(?:nPointer(?:Ent|Ov)|rd)|allowReord|placehold|frameBord|paintOrd|post)e|repeatDu|d(?:efe|u))r|(?:pointerEve|keyPoi)nts|preserveAlpha|(?:strokeLineca|onPointerU|itemPro|useMa|wra|loo)p|v(?:Mathematical|ert(?:Origin[XY]|AdvY)|alues|ocab)|unicodeRange|h(?:oriz(?:Origin|Adv)X|ttpEquiv)|(?:vI|i)deographic|mathematical|u(?:nicodeBidi|[12])|(?:fontStretc|hig)h|vAlphabetic|(?:(?:mar(?:ker|gin)W|strokeW)id|azimu)th|(?:xmlnsXl|valueL)ink|mediaGroup|spellCheck|(?:text|m(?:in|ax))Length|(?:unitsPerE|optimu|fro)m|r(?:adioGroup|e(?:sults|f[XY]|l)|ows|[xy])|pathLength|(?:xlinkHr|glyphR)ef|innerHTML|xlinkShow|f(?:o(?:ntSize|rm?)|il(?:ter|l))|(?:tabInde|(?:sand|b)bo|viewBo)x|autoPlay|r(?:e(?:quired|sult|f))?|(?:(?:href|xml|src)La|kerni)ng|o(?:verflow|pen)|i(?:temRef|n2|s)|p(?:attern|oints)|unicode|d(?:efault|ata|ir)?|divisor|t(?:arget[XY]|o)|(?:stri|la)ng|(?:width|size)s|prefix|typeof|srcDoc|s(?:coped|te(?:m[hv]|p)|pan)|s(?:t(?:roke|art)|hape|cope|rc)|a(?:ccept|llow|s)|itemID|t(?:arget|ype)|m(?:edia|a(?:sk|x)|in)|value|width|x(?:mlns)?|size|href|k(?:ey)?|end|low|by|x[12]|y[12]|g[12]|i[dn]|f[xy]|[yz])$/; /* From DOMProperty */ var ATTRIBUTE_NAME_START_CHAR = ':A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD'; var ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + '\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040'; var isCustomAttribute = RegExp.prototype.test.bind(new RegExp('^(x|data|aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$')); var validAttr = (function (name) { return ATTRIBUTE_REGEX.test(name) || isCustomAttribute(name.toLowerCase()); }); // function hasInInheritanceChain(child, parent) { var target = child; while (target) { target = Object.getPrototypeOf(target); if (target && target === parent) { return true; } } return false; } // /** * Creates a broadcast that can be listened to, i.e. simple event emitter * * @see https://github.com/ReactTraining/react-broadcast */ var createBroadcast = function createBroadcast(initialState) { var listeners = {}; var id = 0; var state = initialState; function publish(nextState) { state = nextState; // eslint-disable-next-line guard-for-in, no-restricted-syntax for (var key in listeners) { var listener = listeners[key]; if (listener === undefined) { // eslint-disable-next-line no-continue continue; } listener(state); } } function subscribe(listener) { var currentId = id; listeners[currentId] = listener; id += 1; listener(state); return currentId; } function unsubscribe(unsubID) { listeners[unsubID] = undefined; } return { publish: publish, subscribe: subscribe, unsubscribe: unsubscribe }; }; var _contextShape, _ThemeProvider$contex; // NOTE: DO NOT CHANGE, changing this is a semver major change! var CHANNEL = '__styled-components__'; var CHANNEL_NEXT = CHANNEL + 'next__'; var CONTEXT_CHANNEL_SHAPE = __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.shape({ getTheme: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.func, subscribe: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.func, unsubscribe: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.func }); var contextShape = (_contextShape = {}, _contextShape[CHANNEL] = __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.func, _contextShape[CHANNEL_NEXT] = CONTEXT_CHANNEL_SHAPE, _contextShape); var warnChannelDeprecated = void 0; if (false) { warnChannelDeprecated = once(function () { // eslint-disable-next-line no-console console.warn('Warning: Usage of `context.' + CHANNEL + '` as a function is deprecated. It will be replaced with the object on `.context.' + CHANNEL_NEXT + '` in a future version.'); }); } var isFunction = function isFunction(test) { return typeof test === 'function'; }; /** * Provide a theme to an entire react component tree via context and event listeners (have to do * both context and event emitter as pure components block context updates) */ var ThemeProvider = function (_Component) { inherits(ThemeProvider, _Component); function ThemeProvider() { classCallCheck(this, ThemeProvider); var _this = possibleConstructorReturn(this, _Component.call(this)); _this.unsubscribeToOuterId = -1; _this.getTheme = _this.getTheme.bind(_this); return _this; } ThemeProvider.prototype.componentWillMount = function componentWillMount() { var _this2 = this; // If there is a ThemeProvider wrapper anywhere around this theme provider, merge this theme // with the outer theme var outerContext = this.context[CHANNEL_NEXT]; if (outerContext !== undefined) { this.unsubscribeToOuterId = outerContext.subscribe(function (theme) { _this2.outerTheme = theme; if (_this2.broadcast !== undefined) { _this2.publish(_this2.props.theme); } }); } this.broadcast = createBroadcast(this.getTheme()); }; ThemeProvider.prototype.getChildContext = function getChildContext() { var _this3 = this, _babelHelpers$extends; return _extends({}, this.context, (_babelHelpers$extends = {}, _babelHelpers$extends[CHANNEL_NEXT] = { getTheme: this.getTheme, subscribe: this.broadcast.subscribe, unsubscribe: this.broadcast.unsubscribe }, _babelHelpers$extends[CHANNEL] = function (subscriber) { if (false) { warnChannelDeprecated(); } // Patch the old `subscribe` provide via `CHANNEL` for older clients. var unsubscribeId = _this3.broadcast.subscribe(subscriber); return function () { return _this3.broadcast.unsubscribe(unsubscribeId); }; }, _babelHelpers$extends)); }; ThemeProvider.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { if (this.props.theme !== nextProps.theme) { this.publish(nextProps.theme); } }; ThemeProvider.prototype.componentWillUnmount = function componentWillUnmount() { if (this.unsubscribeToOuterId !== -1) { this.context[CHANNEL_NEXT].unsubscribe(this.unsubscribeToOuterId); } }; // Get the theme from the props, supporting both (outerTheme) => {} as well as object notation ThemeProvider.prototype.getTheme = function getTheme(passedTheme) { var theme = passedTheme || this.props.theme; if (isFunction(theme)) { var mergedTheme = theme(this.outerTheme); if (false) { throw new StyledComponentsError(7); } return mergedTheme; } if (theme === null || Array.isArray(theme) || (typeof theme === 'undefined' ? 'undefined' : _typeof(theme)) !== 'object') { throw new StyledComponentsError(8); } return _extends({}, this.outerTheme, theme); }; ThemeProvider.prototype.publish = function publish(theme) { this.broadcast.publish(this.getTheme(theme)); }; ThemeProvider.prototype.render = function render() { if (!this.props.children) { return null; } return __WEBPACK_IMPORTED_MODULE_1_react___default.a.Children.only(this.props.children); }; return ThemeProvider; }(__WEBPACK_IMPORTED_MODULE_1_react__["Component"]); ThemeProvider.childContextTypes = contextShape; ThemeProvider.contextTypes = (_ThemeProvider$contex = {}, _ThemeProvider$contex[CHANNEL_NEXT] = CONTEXT_CHANNEL_SHAPE, _ThemeProvider$contex); var _babelHelpers$extends; // HACK for generating all static styles without needing to allocate // an empty execution context every single time... var STATIC_EXECUTION_CONTEXT = {}; var modifiedContextShape = _extends({}, contextShape, (_babelHelpers$extends = {}, _babelHelpers$extends[CONTEXT_KEY] = __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.instanceOf(StyleSheet), __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.instanceOf(ServerStyleSheet)]), _babelHelpers$extends)); var identifiers = {}; /* We depend on components having unique IDs */ var generateId = function generateId(ComponentStyle, _displayName, parentComponentId) { var displayName = typeof _displayName !== 'string' ? 'sc' : escape(_displayName); /** * This ensures uniqueness if two components happen to share * the same displayName. */ var nr = (identifiers[displayName] || 0) + 1; identifiers[displayName] = nr; var componentId = displayName + '-' + ComponentStyle.generateName(displayName + nr); return parentComponentId !== undefined ? parentComponentId + '-' + componentId : componentId; }; var warnExtendDeprecated = function warnExtendDeprecated() {}; if (false) { warnExtendDeprecated = once(function () { // eslint-disable-next-line no-console console.warn('Warning: The "extend" API will be removed in the upcoming v4.0 release. Use styled(StyledComponent) instead. You can find more information here: https://github.com/styled-components/styled-components/issues/1546'); }); } // $FlowFixMe var BaseStyledComponent = function (_Component) { inherits(BaseStyledComponent, _Component); function BaseStyledComponent() { var _temp, _this, _ret; classCallCheck(this, BaseStyledComponent); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _ret = (_temp = (_this = possibleConstructorReturn(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.attrs = {}, _this.state = { theme: null, generatedClassName: '' }, _this.unsubscribeId = -1, _temp), possibleConstructorReturn(_this, _ret); } BaseStyledComponent.prototype.unsubscribeFromContext = function unsubscribeFromContext() { if (this.unsubscribeId !== -1) { this.context[CHANNEL_NEXT].unsubscribe(this.unsubscribeId); } }; BaseStyledComponent.prototype.buildExecutionContext = function buildExecutionContext(theme, props) { var attrs = this.constructor.attrs; var context = _extends({}, props, { theme: theme }); if (attrs === undefined) { return context; } this.attrs = Object.keys(attrs).reduce(function (acc, key) { var attr = attrs[key]; // eslint-disable-next-line no-param-reassign acc[key] = typeof attr === 'function' && !hasInInheritanceChain(attr, __WEBPACK_IMPORTED_MODULE_1_react__["Component"]) ? attr(context) : attr; return acc; }, {}); return _extends({}, context, this.attrs); }; BaseStyledComponent.prototype.generateAndInjectStyles = function generateAndInjectStyles(theme, props) { var _constructor = this.constructor, attrs = _constructor.attrs, componentStyle = _constructor.componentStyle, warnTooManyClasses = _constructor.warnTooManyClasses; var styleSheet = this.context[CONTEXT_KEY] || StyleSheet.master; // statically styled-components don't need to build an execution context object, // and shouldn't be increasing the number of class names if (componentStyle.isStatic && attrs === undefined) { return componentStyle.generateAndInjectStyles(STATIC_EXECUTION_CONTEXT, styleSheet); } else { var executionContext = this.buildExecutionContext(theme, props); var className = componentStyle.generateAndInjectStyles(executionContext, styleSheet); if (false) { warnTooManyClasses(className); } return className; } }; BaseStyledComponent.prototype.componentWillMount = function componentWillMount() { var _this2 = this; var componentStyle = this.constructor.componentStyle; var styledContext = this.context[CHANNEL_NEXT]; // If this is a statically-styled component, we don't need to the theme // to generate or build styles. if (componentStyle.isStatic) { var generatedClassName = this.generateAndInjectStyles(STATIC_EXECUTION_CONTEXT, this.props); this.setState({ generatedClassName: generatedClassName }); // If there is a theme in the context, subscribe to the event emitter. This // is necessary due to pure components blocking context updates, this circumvents // that by updating when an event is emitted } else if (styledContext !== undefined) { var subscribe = styledContext.subscribe; this.unsubscribeId = subscribe(function (nextTheme) { // This will be called once immediately var theme = determineTheme(_this2.props, nextTheme, _this2.constructor.defaultProps); var generatedClassName = _this2.generateAndInjectStyles(theme, _this2.props); _this2.setState({ theme: theme, generatedClassName: generatedClassName }); }); } else { // eslint-disable-next-line react/prop-types var theme = this.props.theme || EMPTY_OBJECT; var _generatedClassName = this.generateAndInjectStyles(theme, this.props); this.setState({ theme: theme, generatedClassName: _generatedClassName }); } }; BaseStyledComponent.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { var _this3 = this; // If this is a statically-styled component, we don't need to listen to // props changes to update styles var componentStyle = this.constructor.componentStyle; if (componentStyle.isStatic) { return; } this.setState(function (prevState) { var theme = determineTheme(nextProps, prevState.theme, _this3.constructor.defaultProps); var generatedClassName = _this3.generateAndInjectStyles(theme, nextProps); return { theme: theme, generatedClassName: generatedClassName }; }); }; BaseStyledComponent.prototype.componentWillUnmount = function componentWillUnmount() { this.unsubscribeFromContext(); }; BaseStyledComponent.prototype.render = function render() { // eslint-disable-next-line react/prop-types var innerRef = this.props.innerRef; var generatedClassName = this.state.generatedClassName; var _constructor2 = this.constructor, styledComponentId = _constructor2.styledComponentId, target = _constructor2.target; var isTargetTag = isTag(target); var className = [ // eslint-disable-next-line react/prop-types this.props.className, styledComponentId, this.attrs.className, generatedClassName].filter(Boolean).join(' '); var baseProps = _extends({}, this.attrs, { className: className }); if (isStyledComponent(target)) { baseProps.innerRef = innerRef; } else { baseProps.ref = innerRef; } var propsForElement = baseProps; var key = void 0; for (key in this.props) { // Don't pass through non HTML tags through to HTML elements // always omit innerRef if (key !== 'innerRef' && key !== 'className' && (!isTargetTag || validAttr(key))) { propsForElement[key] = key === 'style' && key in this.attrs ? _extends({}, this.attrs[key], this.props[key]) : this.props[key]; } } return Object(__WEBPACK_IMPORTED_MODULE_1_react__["createElement"])(target, propsForElement); }; return BaseStyledComponent; }(__WEBPACK_IMPORTED_MODULE_1_react__["Component"]); var _StyledComponent = (function (ComponentStyle, constructWithOptions) { var createStyledComponent = function createStyledComponent(target, options, rules) { var _options$isClass = options.isClass, isClass = _options$isClass === undefined ? !isTag(target) : _options$isClass, _options$displayName = options.displayName, displayName = _options$displayName === undefined ? generateDisplayName(target) : _options$displayName, _options$componentId = options.componentId, componentId = _options$componentId === undefined ? generateId(ComponentStyle, options.displayName, options.parentComponentId) : _options$componentId, _options$ParentCompon = options.ParentComponent, ParentComponent = _options$ParentCompon === undefined ? BaseStyledComponent : _options$ParentCompon, extendingRules = options.rules, attrs = options.attrs; var styledComponentId = options.displayName && options.componentId ? escape(options.displayName) + '-' + options.componentId : options.componentId || componentId; var componentStyle = new ComponentStyle(extendingRules === undefined ? rules : extendingRules.concat(rules), attrs, styledComponentId); var StyledComponent = function (_ParentComponent) { inherits(StyledComponent, _ParentComponent); function StyledComponent() { classCallCheck(this, StyledComponent); return possibleConstructorReturn(this, _ParentComponent.apply(this, arguments)); } StyledComponent.withComponent = function withComponent(tag) { var previousComponentId = options.componentId, optionsToCopy = objectWithoutProperties(options, ['componentId']); var newComponentId = previousComponentId && previousComponentId + '-' + (isTag(tag) ? tag : escape(getComponentName(tag))); var newOptions = _extends({}, optionsToCopy, { componentId: newComponentId, ParentComponent: StyledComponent }); return createStyledComponent(tag, newOptions, rules); }; createClass(StyledComponent, null, [{ key: 'extend', get: function get$$1() { var rulesFromOptions = options.rules, parentComponentId = options.componentId, optionsToCopy = objectWithoutProperties(options, ['rules', 'componentId']); var newRules = rulesFromOptions === undefined ? rules : rulesFromOptions.concat(rules); var newOptions = _extends({}, optionsToCopy, { rules: newRules, parentComponentId: parentComponentId, ParentComponent: StyledComponent }); warnExtendDeprecated(); return constructWithOptions(createStyledComponent, target, newOptions); } }]); return StyledComponent; }(ParentComponent); StyledComponent.attrs = attrs; StyledComponent.componentStyle = componentStyle; StyledComponent.contextTypes = modifiedContextShape; StyledComponent.displayName = displayName; StyledComponent.styledComponentId = styledComponentId; StyledComponent.target = target; if (false) { StyledComponent.warnTooManyClasses = createWarnTooManyClasses(displayName); } if (isClass) { __WEBPACK_IMPORTED_MODULE_5_hoist_non_react_statics___default()(StyledComponent, target, { // all SC-specific things should not be hoisted attrs: true, componentStyle: true, displayName: true, extend: true, styledComponentId: true, target: true, warnTooManyClasses: true, withComponent: true }); } return StyledComponent; }; return createStyledComponent; }); // Source: https://github.com/garycourt/murmurhash-js/blob/master/murmurhash2_gc.js function murmurhash(str) { var l = str.length | 0, h = l | 0, i = 0, k; while (l >= 4) { k = str.charCodeAt(i) & 0xff | (str.charCodeAt(++i) & 0xff) << 8 | (str.charCodeAt(++i) & 0xff) << 16 | (str.charCodeAt(++i) & 0xff) << 24; k = (k & 0xffff) * 0x5bd1e995 + (((k >>> 16) * 0x5bd1e995 & 0xffff) << 16); k ^= k >>> 24; k = (k & 0xffff) * 0x5bd1e995 + (((k >>> 16) * 0x5bd1e995 & 0xffff) << 16); h = (h & 0xffff) * 0x5bd1e995 + (((h >>> 16) * 0x5bd1e995 & 0xffff) << 16) ^ k; l -= 4; ++i; } switch (l) { case 3: h ^= (str.charCodeAt(i + 2) & 0xff) << 16; case 2: h ^= (str.charCodeAt(i + 1) & 0xff) << 8; case 1: h ^= str.charCodeAt(i) & 0xff; h = (h & 0xffff) * 0x5bd1e995 + (((h >>> 16) * 0x5bd1e995 & 0xffff) << 16); } h ^= h >>> 13; h = (h & 0xffff) * 0x5bd1e995 + (((h >>> 16) * 0x5bd1e995 & 0xffff) << 16); h ^= h >>> 15; return h >>> 0; } // var areStylesCacheable = IS_BROWSER; var isStaticRules = function isStaticRules(rules, attrs) { for (var i = 0, len = rules.length; i < len; i += 1) { var rule = rules[i]; // recursive case if (Array.isArray(rule) && !isStaticRules(rule)) { return false; } else if (typeof rule === 'function' && !isStyledComponent(rule)) { // functions are allowed to be static if they're just being // used to get the classname of a nested styled component return false; } } if (attrs !== undefined) { // eslint-disable-next-line guard-for-in, no-restricted-syntax for (var key in attrs) { if (typeof attrs[key] === 'function') { return false; } } } return true; }; var isHMREnabled = typeof module !== 'undefined' && module.hot && "production" !== 'production'; /* ComponentStyle is all the CSS-specific stuff, not the React-specific stuff. */ var _ComponentStyle = (function (nameGenerator, flatten, stringifyRules) { /* combines hashStr (murmurhash) and nameGenerator for convenience */ var generateRuleHash = function generateRuleHash(str) { return nameGenerator(murmurhash(str)); }; var ComponentStyle = function () { function ComponentStyle(rules, attrs, componentId) { classCallCheck(this, ComponentStyle); this.rules = rules; this.isStatic = !isHMREnabled && isStaticRules(rules, attrs); this.componentId = componentId; if (!StyleSheet.master.hasId(componentId)) { var placeholder = false ? ['.' + componentId + ' {}'] : []; StyleSheet.master.deferredInject(componentId, placeholder); } } /* * Flattens a rule set into valid CSS * Hashes it, wraps the whole chunk in a .hash1234 {} * Returns the hash to be injected on render() * */ ComponentStyle.prototype.generateAndInjectStyles = function generateAndInjectStyles(executionContext, styleSheet) { var isStatic = this.isStatic, componentId = this.componentId, lastClassName = this.lastClassName; if (areStylesCacheable && isStatic && lastClassName !== undefined && styleSheet.hasNameForId(componentId, lastClassName)) { return lastClassName; } var flatCSS = flatten(this.rules, executionContext); var name = generateRuleHash(this.componentId + flatCSS.join('')); if (!styleSheet.hasNameForId(componentId, name)) { styleSheet.inject(this.componentId, stringifyRules(flatCSS, '.' + name), name); } this.lastClassName = name; return name; }; ComponentStyle.generateName = function generateName(str) { return generateRuleHash(str); }; return ComponentStyle; }(); return ComponentStyle; }); // // Thanks to ReactDOMFactories for this handy list! var domElements = ['a', 'abbr', 'address', 'area', 'article', 'aside', 'audio', 'b', 'base', 'bdi', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'cite', 'code', 'col', 'colgroup', 'data', 'datalist', 'dd', 'del', 'details', 'dfn', 'dialog', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'keygen', 'label', 'legend', 'li', 'link', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meta', 'meter', 'nav', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'script', 'section', 'select', 'small', 'source', 'span', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'track', 'u', 'ul', 'var', 'video', 'wbr', // SVG 'circle', 'clipPath', 'defs', 'ellipse', 'foreignObject', 'g', 'image', 'line', 'linearGradient', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'svg', 'text', 'tspan']; // var _styled = (function (styledComponent, constructWithOptions) { var styled = function styled(tag) { return constructWithOptions(styledComponent, tag); }; // Shorthands for all valid HTML Elements domElements.forEach(function (domElement) { styled[domElement] = styled(domElement); }); return styled; }); // var replaceWhitespace = function replaceWhitespace(str) { return str.replace(/\s|\\n/g, ''); }; var _keyframes = (function (nameGenerator, stringifyRules, css) { return function () { var styleSheet = StyleSheet.master; var rules = css.apply(undefined, arguments); var name = nameGenerator(murmurhash(replaceWhitespace(JSON.stringify(rules)))); var id = 'sc-keyframes-' + name; if (!styleSheet.hasNameForId(id, name)) { styleSheet.inject(id, stringifyRules(rules, name, '@keyframes'), name); } return name; }; }); // var _injectGlobal = (function (stringifyRules, css) { var injectGlobal = function injectGlobal() { var styleSheet = StyleSheet.master; var rules = css.apply(undefined, arguments); var hash = murmurhash(JSON.stringify(rules)); var id = 'sc-global-' + hash; if (!styleSheet.hasId(id)) { styleSheet.inject(id, stringifyRules(rules)); } }; return injectGlobal; }); // var _constructWithOptions = (function (css) { var constructWithOptions = function constructWithOptions(componentConstructor, tag) { var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : EMPTY_OBJECT; if (!Object(__WEBPACK_IMPORTED_MODULE_6_react_is__["isValidElementType"])(tag)) { throw new StyledComponentsError(1, String(tag)); } /* This is callable directly as a template function */ // $FlowFixMe: Not typed to avoid destructuring arguments var templateFunction = function templateFunction() { return componentConstructor(tag, options, css.apply(undefined, arguments)); }; /* If config methods are called, wrap up a new template function and merge options */ templateFunction.withConfig = function (config) { return constructWithOptions(componentConstructor, tag, _extends({}, options, config)); }; templateFunction.attrs = function (attrs) { return constructWithOptions(componentConstructor, tag, _extends({}, options, { attrs: _extends({}, options.attrs || EMPTY_OBJECT, attrs) })); }; return templateFunction; }; return constructWithOptions; }); // var withTheme = (function (Component$$1) { var isStatelessFunctionalComponent = typeof Component$$1 === 'function' && // $FlowFixMe TODO: flow for prototype !(Component$$1.prototype && 'isReactComponent' in Component$$1.prototype); // NOTE: We can't pass a ref to a stateless functional component var shouldSetInnerRef = isStyledComponent(Component$$1) || isStatelessFunctionalComponent; var WithTheme = function (_React$Component) { inherits(WithTheme, _React$Component); function WithTheme() { var _temp, _this, _ret; classCallCheck(this, WithTheme); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _ret = (_temp = (_this = possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = EMPTY_OBJECT, _this.unsubscribeId = -1, _temp), possibleConstructorReturn(_this, _ret); } // NOTE: This is so that isStyledComponent passes for the innerRef unwrapping WithTheme.prototype.componentWillMount = function componentWillMount() { var _this2 = this; var defaultProps = this.constructor.defaultProps; var styledContext = this.context[CHANNEL_NEXT]; var themeProp = determineTheme(this.props, undefined, defaultProps); if (styledContext === undefined && themeProp === undefined && "production" !== 'production') { // eslint-disable-next-line no-console console.warn('[withTheme] You are not using a ThemeProvider nor passing a theme prop or a theme in defaultProps'); } else if (styledContext === undefined && themeProp !== undefined) { this.setState({ theme: themeProp }); } else { var subscribe = styledContext.subscribe; this.unsubscribeId = subscribe(function (nextTheme) { var theme = determineTheme(_this2.props, nextTheme, defaultProps); _this2.setState({ theme: theme }); }); } }; WithTheme.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { var defaultProps = this.constructor.defaultProps; this.setState(function (oldState) { var theme = determineTheme(nextProps, oldState.theme, defaultProps); return { theme: theme }; }); }; WithTheme.prototype.componentWillUnmount = function componentWillUnmount() { if (this.unsubscribeId !== -1) { this.context[CHANNEL_NEXT].unsubscribe(this.unsubscribeId); } }; WithTheme.prototype.render = function render() { var props = _extends({ theme: this.state.theme }, this.props); if (!shouldSetInnerRef) { props.ref = props.innerRef; delete props.innerRef; } return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(Component$$1, props); }; return WithTheme; }(__WEBPACK_IMPORTED_MODULE_1_react___default.a.Component); WithTheme.contextTypes = contextShape; WithTheme.displayName = 'WithTheme(' + getComponentName(Component$$1) + ')'; WithTheme.styledComponentId = 'withTheme'; return __WEBPACK_IMPORTED_MODULE_5_hoist_non_react_statics___default()(WithTheme, Component$$1); }); // /* eslint-disable */ var __DO_NOT_USE_OR_YOU_WILL_BE_HAUNTED_BY_SPOOKY_GHOSTS = { StyleSheet: StyleSheet }; // /* Warning if you've imported this file on React Native */ if (false) { // eslint-disable-next-line no-console console.warn("It looks like you've imported 'styled-components' on React Native.\n" + "Perhaps you're looking to import 'styled-components/native'?\n" + 'Read more about this at https://www.styled-components.com/docs/basics#react-native'); } /* Warning if there are several instances of styled-components */ if (false) { window['__styled-components-init__'] = window['__styled-components-init__'] || 0; if (window['__styled-components-init__'] === 1) { // eslint-disable-next-line no-console console.warn("It looks like there are several instances of 'styled-components' initialized in this application. " + 'This may cause dynamic styles not rendering properly, errors happening during rehydration process ' + 'and makes your application bigger without a good reason.\n\n' + 'See https://s-c.sh/2BAXzed for more info.'); } window['__styled-components-init__'] += 1; } /* Instantiate singletons */ var ComponentStyle = _ComponentStyle(generateAlphabeticName, flatten, stringifyRules); var constructWithOptions = _constructWithOptions(css); var StyledComponent = _StyledComponent(ComponentStyle, constructWithOptions); /* Instantiate exported singletons */ var keyframes = _keyframes(generateAlphabeticName, stringifyRules, css); var injectGlobal = _injectGlobal(stringifyRules, css); var styled = _styled(StyledComponent, constructWithOptions); /* harmony default export */ __webpack_exports__["default"] = (styled); //# sourceMappingURL=styled-components.browser.esm.js.map /* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__("W2nU"), __webpack_require__("f1Eh")(module))) /***/ }), /***/ "wCGV": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; __webpack_require__("/m1I"); var _tooltip = _interopRequireDefault(__webpack_require__("O6j2")); __webpack_require__("tIHZ"); var _popover = _interopRequireDefault(__webpack_require__("tjvM")); var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); var _dva = __webpack_require__("S6G3"); var _CityCascader = _interopRequireDefault(__webpack_require__("SHda")); var _dec, _class; /** * 切换地图3D按钮 */ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } var Switch3D = exports.default = (_dec = (0, _dva.connect)(function (state) { return { mapStyle: state.command.mapStyle, switchOpenStatus: state.command.switchOpenStatus, gITFPoint: state.command.gITFPoint, object3Dlayer: state.command.object3Dlayer }; }), _dec(_class = /*#__PURE__*/function (_Component) { function Switch3D(props) { var _this; (0, _classCallCheck2.default)(this, Switch3D); _this = _callSuper(this, Switch3D, [props]); _this._handleVisibleChange = function (visible) { _this.setState({ areaSelect: visible }); }; _this.state = { areaSelect: false }; return _this; } (0, _inherits2.default)(Switch3D, _Component); return (0, _createClass2.default)(Switch3D, [{ key: "change3D", value: function change3D() { var _this2 = this; var is3D = !this.props.switchOpenStatus.is3D; if (is3D) { this.props.localMap.setPitch(50); } else { this.props.localMap.setPitch(0); if (this.props.object3Dlayer) { var gITFPoint = this.props.gITFPoint.map(function (item) { item.isShow = false; if (item.cityMeshes) { _this2.props.object3Dlayer.remove(item.cityMeshes); } return item; }); this.props.dispatch({ type: "command/changeGITFPoint", payload: gITFPoint }); } } this.props.dispatch({ type: "command/setSwitchOpenStatus", payload: { type: 'is3D', value: is3D } }); } //根据cityname、adcode、citycode设置地图位置 }, { key: "onChangeCity", value: function onChangeCity(value) { var _thisGIS = this.props._thisGIS; var name = value.name, code = value.code; if (name.length == 0 && code.length == 0) { return _thisGIS.state.map.setZoom(6); } var cityCode = code[code.length - 1]; var cityName = name[name.length - 1]['label']; if (cityName == '市辖区') { _thisGIS.state.map.setCity(name[0]['label']); } else { _thisGIS.state.map.setCity(cityName); } this.setState({ areaSelect: false }); } }, { key: "render", value: function render() { var mapStyle = this.props.mapStyle; var content = /*#__PURE__*/_react.default.createElement("div", { className: "area-city" }, /*#__PURE__*/_react.default.createElement(_CityCascader.default, { onChange: this.onChangeCity.bind(this) })); return /*#__PURE__*/_react.default.createElement("div", { className: "switch map" }, /*#__PURE__*/_react.default.createElement(_tooltip.default, { title: "\u533A\u57DF\u9009\u62E9" }, /*#__PURE__*/_react.default.createElement("div", { className: "layer-btn" }, /*#__PURE__*/_react.default.createElement(_popover.default, { placement: "bottom", content: content, title: "", trigger: "click", visible: this.state.areaSelect, onVisibleChange: this._handleVisibleChange }, /*#__PURE__*/_react.default.createElement("img", { className: "layer-img", src: this.state.areaSelect ? __webpack_require__("bXbu") : __webpack_require__("Efzv") }))))); } }]); }(_react.Component)) || _class); /***/ }), /***/ "wEcu": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAA89JREFUaEPtmltIFGEUx8/5djVLUzIj6iki8qmop3roIdCCoMtDKQhFEEg7GwVdDNKd6XNmLFDwIWJ3th7sISLUh8Qg6EKB0OUhinoJqZ586X5RE2vnOzG7zjqu620dnRHcp2Hnu/x/55z9zvm+bxEW+AcXuH7ICsCv3CwW/QPbhBBbGGChl5ACaJAx9potL3rBTx3+nallHEBEMw4BiCgQrPJS+Li5Eb4AsLAuhzqd78YAJMWT6PCV8HEmZ1VOiDSAFTaJX7/f25ZHgF5E1gVAf7wFwmVE4gABbEzqQPgSLCneYIdTGkBpMnYJU9xPtYHewOrAVn78uMfiU6bj8fgy85P5yoZgAbZbbQg9GNGaahTRonVA0Gw9M2Qtqhw6763lx86uaEazIFE34oXzuhxuGQOgaDEuiC6mALBRlSWeK4CsxpoA6BQAXtEUqSHXcZz9JtI3GkJTAChNRoUQULK5vLSrurranEyUrMaGCSgfAf9qirTEcwCuR7cnBDxLugyhY1N5Wc1kEBE1SrZoXQm7kixn5QH5UnwbJczntihEvBWIhI5wRJHNur4DsEQqWqxVEJ1OQzC8oTaEjiFi2tr2O18CpFYq4yqQOJGGALimylIoE8K3AESEsm7Egah2FAKvaop00hlKvgWwRI5AtAHRUYcnWjUlfNb3IWQL5EQsoRs3gajG/o4hXFblcH0y1Py2CmVbafjjx0Gz591tAjo4CpFKgAsCwBIdj8fz+j6LTiLan4ZEVg8kLvkqD0yWSXl7e7757tsdAtqTrZ0vEtlUpQBvaytI9A11A0FlZlvPAVKFGZyzapupQHzpAVmN9hNAUS7iAZF0WWI59c3olHMtNAsPEAI+1RRph6cAbkzuxhg5e8CNyd0YYxHADSvOZgxZNxQSotEaAxm7qEVCavLZHtTNPfFshE7Ul2uxnQmAh9b7IEAll6UnngO0trYv/T74rQIANzGgCffOAnAYgN4uyQ9+MMW/YX4h/NEG9cwDvOn6ZtP815E+sJqG25LnVYG8Kt5Q+8ZTAMvyPwa+vp6JeIfg3hVFZVvOnKke8iyEIlpsLxB1T8Po2Zsg7tNl6a6HAMYFZ8k9YxBk9bocuuwZgHPFm7H4jJNDT37EiwCOs9tFD+QSw4shlC2E5vOCY248MI9XTBFtDvKAdcln/uz/QEBlIwnC9Us+QkqAgHuEuMb1TGyJnpdrVoTBYEHRenNooMfVWsheTeb8otsCKCleC/1D61ytRp3L4Vz91cAOIU0Jv7Tmm+l+oLRw5SO7Ch1XTueynvuhjysXcF6C/AdXXnde+gQhVQAAAABJRU5ErkJggg==" /***/ }), /***/ "wUgD": /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.decodeText = decodeText; var _emojiMap = __webpack_require__("Da15"); /** 传入messageBody(群系统消息SystemMessage,群提示消息GroupTip除外) * payload = { * msgType: 'TIMTextElem', * msgContent: { * text: 'AAA[龇牙]AAA[龇牙]AAA[龇牙AAA]' * } *} **/ function decodeText(payload) { var renderDom = []; // 文本消息 var temp = payload.text; var left = -1; var right = -1; while (temp !== '') { left = temp.indexOf('['); right = temp.indexOf(']'); switch (left) { case 0: if (right === -1) { renderDom.push({ name: 'text', text: temp }); temp = ''; } else { var _emoji = temp.slice(0, right + 1); if (_emojiMap.emojiMap[_emoji]) { renderDom.push({ name: 'img', src: _emojiMap.emojiUrl + _emojiMap.emojiMap[_emoji] }); temp = temp.substring(right + 1); } else { renderDom.push({ name: 'text', text: '[' }); temp = temp.slice(1); } } break; case -1: renderDom.push({ name: 'text', text: temp }); temp = ''; break; default: renderDom.push({ name: 'text', text: temp.slice(0, left) }); temp = temp.substring(left); break; } } return renderDom; } /***/ }), /***/ "wWow": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAARCAYAAADZsVyDAAAAAXNSR0IArs4c6QAAANNJREFUOBFjdGp985+BBoCJBmaOGokaAozI3Ib9/1kOH383w9ZSKKPBkfEPshyITUpEo0Te4ePvi/7//5986MT7YnRDSeXDXeze/lHl9//flxj+M3AyMDJ8Z2Vk1dtZyX+HVANh6sEuBrqS8c//37PAhoJkgIYD+bNB4jCFpNJgg5073iX//8/giKwZyHcAiSOLkcJmdO//Kvn7249rQGcKYGpk/MDKxaG1s5D7OUiOpMj7/f3HFOyGgoz6LwCRB7FHAZkhwEhKhJBiB0rOI0UjIbUAQbBRDZZB4GEAAAAASUVORK5CYII=" /***/ }), /***/ "waVv": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; __webpack_require__("tDqI"); var _radio = _interopRequireDefault(__webpack_require__("gtac")); __webpack_require__("baa2"); var _icon = _interopRequireDefault(__webpack_require__("FC3+")); var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); __webpack_require__("yQBS"); var _tabs = _interopRequireDefault(__webpack_require__("qA/u")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); var _index = _interopRequireDefault(__webpack_require__("W7F7")); var _dva = __webpack_require__("S6G3"); var _EmployeesList = _interopRequireDefault(__webpack_require__("ErMw")); var _DutyPersonList = _interopRequireDefault(__webpack_require__("J+Rs")); var _AllPerson = _interopRequireDefault(__webpack_require__("vEOg")); var _api = __webpack_require__("H/Zg"); var _events = _interopRequireDefault(__webpack_require__("TLe5")); var _classnames = _interopRequireDefault(__webpack_require__("HW6M")); var _recordHistory = __webpack_require__("eXDv"); var _biz = __webpack_require__("Q3h8"); var _dec, _class; /** * 驻勤点和保安员信息 */ // 引入 EventEmitter function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } var TabPane = _tabs.default.TabPane; var _TABS = [{ name: '人员信息', tabKey: 1 }, { name: '驻勤信息', tabKey: 2 }]; var ComponeyInfo = exports.default = (_dec = (0, _dva.connect)(function (state) { return { //地图数据 pictureMarkersList: state.command.pictureMarkersList, mapStyle: state.command.mapStyle, selectComponeyInfo: state.command.selectComponeyInfo, backStepInfo: state.command.backStepInfo, mapLayerSwitchState: state.command.mapLayerSwitchState }; }), _dec(_class = /*#__PURE__*/function (_Component) { function ComponeyInfo(props) { var _this; (0, _classCallCheck2.default)(this, ComponeyInfo); _this = _callSuper(this, ComponeyInfo, [props]); // 人员信息下 tab 切换 _this.changePersonType = function (e) { _events.default.emit('clearMapTag', 'securityResource'); _this.setState({ personType: e.target.value }); }; // tab 切换 _this.onTabChange = function (key) { _events.default.emit('clearMapTag'); var setJson = {}; if (key == "1") { //人员信息 setJson = { personType: 'A' }; } else {} setJson.tabKey = key; _this.setState(setJson); }; _this.onClose = function () { var that = _this; _this.props.dispatch({ type: 'command/setSelectComponeyInfo', payload: {} }); _this.props.dispatch({ type: "command/fetchPersonList", payload: { list: [] } }); _events.default.emit('clearMapTag'); (0, _recordHistory.recordBack)({ from: 'ComponeyInfo', callback: function callback(result) { switch (result.from) { case "CreateTrajectoryInfoWindow": (0, _recordHistory.recordBack)({ from: result.from, callback: function callback(result) { var data = JSON.parse(JSON.stringify(result)); (0, _recordHistory.recordRemove)({ from: result.from, toID: result.toID }); (0, _recordHistory.recordTo)(data, that); } }); break; case "CreateAttendPointInfoWindow": var data = JSON.parse(JSON.stringify(result)); (0, _recordHistory.recordRemove)({ from: result.from, toID: result.toID }); (0, _recordHistory.recordTo)(data, that); break; case "CreateComponeyInfoWindow": (0, _recordHistory.recordBack)({ from: result.from, callback: function callback(result) { var data = JSON.parse(JSON.stringify(result)); (0, _recordHistory.recordRemove)({ from: result.from, toID: result.toID }); (0, _recordHistory.recordTo)(data, that); } }); break; } } }); }; _this.onPersonClick = function (item) { var selectComponeyInfo = _this.props.selectComponeyInfo; console.log('onPersonClick', item); (0, _recordHistory.recordAdd)({ from: 'ComponeyInfo', to: 'CreateTrajectoryInfoWindow', fromData: selectComponeyInfo, toID: item.ID }); }; _this.state = { personType: 'A', tabKey: _this.props.selectComponeyInfo.clickType != 'personnel' ? "2" : "1", clickType: '' }; return _this; } (0, _inherits2.default)(ComponeyInfo, _Component); return (0, _createClass2.default)(ComponeyInfo, [{ key: "componentDidMount", value: function componentDidMount() { this.setState({ tabKey: this.props.selectComponeyInfo.clickType != 'personnel' ? "2" : "1", clickType: this.props.selectComponeyInfo.clickType }); } }, { key: "componentWillReceiveProps", value: function componentWillReceiveProps(nextProps) { var clickType = nextProps.selectComponeyInfo.clickType; var tabKey = clickType != 'personnel' ? "2" : "1"; if (clickType && clickType != this.state.clickType) { if (tabKey !== this.state.tabKey) { this.setState({ tabKey: tabKey, personType: 'A', clickType: clickType }); } } } // 利用此事件来决定何时需要重新渲染组件。 }, { key: "shouldComponentUpdate", value: function shouldComponentUpdate(nextProps, nextState) { if (nextProps.mapStyle !== this.props.mapStyle || nextState.personType !== this.state.personType || nextState.tabKey !== this.state.tabKey) { return true; } return false; } }, { key: "render", value: function render() { var _this2 = this; var _this$props = this.props, mapStyle = _this$props.mapStyle, selectComponeyInfo = _this$props.selectComponeyInfo, mapLayerSwitchState = _this$props.mapLayerSwitchState; var _this$state = this.state, personType = _this$state.personType, tabKey = _this$state.tabKey; var cls = mapLayerSwitchState.eventViews ? (0, _classnames.default)('map-modal-optimizing-level2', _index.default.componey) : (0, _classnames.default)('map-modal-optimizing-level1', _index.default.componey); console.log('Componey-render'); return /*#__PURE__*/_react.default.createElement("div", { className: _index.default[mapStyle] }, /*#__PURE__*/_react.default.createElement("div", { className: cls }, /*#__PURE__*/_react.default.createElement("div", { className: _index.default.componey_box }, /*#__PURE__*/_react.default.createElement(_icon.default, { style: { float: 'right', cursor: 'pointer' }, type: "close", onClick: this.onClose }), /*#__PURE__*/_react.default.createElement("div", { className: _index.default.componey_info }, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("img", { src: selectComponeyInfo.componeyLogo, alt: "" })), /*#__PURE__*/_react.default.createElement("div", { className: _index.default.info }, /*#__PURE__*/_react.default.createElement("div", { className: _index.default.info_item }, "\u6240\u5C5E\u516C\u53F8\uFF1A", /*#__PURE__*/_react.default.createElement("div", { title: selectComponeyInfo.companyName, style: { width: '98px' } }, selectComponeyInfo.companyName)), /*#__PURE__*/_react.default.createElement("div", { className: _index.default.info_item }, "\u6CD5\u4EBA/\u8D1F\u8D23\u4EBA\uFF1A", /*#__PURE__*/_react.default.createElement("div", null, selectComponeyInfo.name)), /*#__PURE__*/_react.default.createElement("div", { className: _index.default.info_item }, "\u8054\u7CFB\u7535\u8BDD\uFF1A", /*#__PURE__*/_react.default.createElement("div", null, selectComponeyInfo.mobilePhone))))), /*#__PURE__*/_react.default.createElement("div", { className: _index.default.content }, /*#__PURE__*/_react.default.createElement("div", { className: _index.default.tabs }, _TABS.map(function (tab) { var clsName = (0, _classnames.default)(_index.default.tab_pane, tabKey == tab.tabKey ? _index.default.tab_active : ''); return /*#__PURE__*/_react.default.createElement("div", { className: clsName, onClick: _this2.onTabChange.bind(_this2, tab.tabKey) }, tab.name); })), tabKey == 1 ? /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_radio.default.Group, { onChange: this.changePersonType, value: personType, style: { marginBottom: 8 } }, /*#__PURE__*/_react.default.createElement(_radio.default.Button, { value: "A" }, "\u6240\u6709\u4EBA\u5458"), /*#__PURE__*/_react.default.createElement(_radio.default.Button, { value: "B" }, "\u901A\u8BAF\u5F55")), personType == 'A' ? /*#__PURE__*/_react.default.createElement(_AllPerson.default, { onPersonClick: this.onPersonClick.bind(this), key: "1" }) : null, personType == 'B' ? /*#__PURE__*/_react.default.createElement(_EmployeesList.default, { domainId: selectComponeyInfo.selectComponeyId }) : null) : null, tabKey == 2 ? /*#__PURE__*/_react.default.createElement(_DutyPersonList.default, { domainId: selectComponeyInfo.selectComponeyId, domainName: selectComponeyInfo.companyName }) : null))); } }]); }(_react.Component)) || _class); /***/ }), /***/ "wbGf": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // EXTERNAL MODULE: ./node_modules/@ant-design/create-react-context/lib/index.js var lib = __webpack_require__("83O8"); var lib_default = /*#__PURE__*/__webpack_require__.n(lib); // EXTERNAL MODULE: ./node_modules/react/index.js var react = __webpack_require__("GiK3"); var react_default = /*#__PURE__*/__webpack_require__.n(react); // EXTERNAL MODULE: ./node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js var react_lifecycles_compat_es = __webpack_require__("R8mX"); // EXTERNAL MODULE: ./node_modules/antd/node_modules/classnames/index.js var classnames = __webpack_require__("kTQ8"); var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); // EXTERNAL MODULE: ./node_modules/omit.js/es/index.js var es = __webpack_require__("JkBm"); // EXTERNAL MODULE: ./node_modules/antd/es/layout/layout.js var layout = __webpack_require__("hMTp"); // EXTERNAL MODULE: ./node_modules/antd/es/config-provider/index.js + 1 modules var config_provider = __webpack_require__("PmSq"); // EXTERNAL MODULE: ./node_modules/antd/es/icon/index.js + 5 modules var icon = __webpack_require__("FC3+"); // CONCATENATED MODULE: ./node_modules/antd/es/_util/isNumeric.js var isNumeric = function isNumeric(value) { return !isNaN(parseFloat(value)) && isFinite(value); }; /* harmony default export */ var _util_isNumeric = (isNumeric); // CONCATENATED MODULE: ./node_modules/antd/es/layout/Sider.js /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return SiderContext; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return Sider_Sider; }); function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } 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; } function _extends() { _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; }; return _extends.apply(this, arguments); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } var __rest = this && this.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; // matchMedia polyfill for // https://github.com/WickyNilliams/enquire.js/issues/82 // TODO: Will be removed in antd 4.0 because we will no longer support ie9 if (typeof window !== 'undefined') { var matchMediaPolyfill = function matchMediaPolyfill(mediaQuery) { return { media: mediaQuery, matches: false, addListener: function addListener() {}, removeListener: function removeListener() {} }; }; // ref: https://github.com/ant-design/ant-design/issues/18774 if (!window.matchMedia) window.matchMedia = matchMediaPolyfill; } var dimensionMaxMap = { xs: '479.98px', sm: '575.98px', md: '767.98px', lg: '991.98px', xl: '1199.98px', xxl: '1599.98px' }; var SiderContext = lib_default()({}); var generateId = function () { var i = 0; return function () { var prefix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ''; i += 1; return "".concat(prefix).concat(i); }; }(); var Sider_InternalSider = /*#__PURE__*/function (_React$Component) { _inherits(InternalSider, _React$Component); var _super = _createSuper(InternalSider); function InternalSider(props) { var _this; _classCallCheck(this, InternalSider); _this = _super.call(this, props); _this.responsiveHandler = function (mql) { _this.setState({ below: mql.matches }); var onBreakpoint = _this.props.onBreakpoint; if (onBreakpoint) { onBreakpoint(mql.matches); } if (_this.state.collapsed !== mql.matches) { _this.setCollapsed(mql.matches, 'responsive'); } }; _this.setCollapsed = function (collapsed, type) { if (!('collapsed' in _this.props)) { _this.setState({ collapsed: collapsed }); } var onCollapse = _this.props.onCollapse; if (onCollapse) { onCollapse(collapsed, type); } }; _this.toggle = function () { var collapsed = !_this.state.collapsed; _this.setCollapsed(collapsed, 'clickTrigger'); }; _this.belowShowChange = function () { _this.setState(function (_ref) { var belowShow = _ref.belowShow; return { belowShow: !belowShow }; }); }; _this.renderSider = function (_ref2) { var _classNames; var getPrefixCls = _ref2.getPrefixCls; var _a = _this.props, customizePrefixCls = _a.prefixCls, className = _a.className, theme = _a.theme, collapsible = _a.collapsible, reverseArrow = _a.reverseArrow, trigger = _a.trigger, style = _a.style, width = _a.width, collapsedWidth = _a.collapsedWidth, zeroWidthTriggerStyle = _a.zeroWidthTriggerStyle, others = __rest(_a, ["prefixCls", "className", "theme", "collapsible", "reverseArrow", "trigger", "style", "width", "collapsedWidth", "zeroWidthTriggerStyle"]); var prefixCls = getPrefixCls('layout-sider', customizePrefixCls); var divProps = Object(es["a" /* default */])(others, ['collapsed', 'defaultCollapsed', 'onCollapse', 'breakpoint', 'onBreakpoint', 'siderHook', 'zeroWidthTriggerStyle']); var rawWidth = _this.state.collapsed ? collapsedWidth : width; // use "px" as fallback unit for width var siderWidth = _util_isNumeric(rawWidth) ? "".concat(rawWidth, "px") : String(rawWidth); // special trigger when collapsedWidth == 0 var zeroWidthTrigger = parseFloat(String(collapsedWidth || 0)) === 0 ? /*#__PURE__*/react["createElement"]("span", { onClick: _this.toggle, className: "".concat(prefixCls, "-zero-width-trigger ").concat(prefixCls, "-zero-width-trigger-").concat(reverseArrow ? 'right' : 'left'), style: zeroWidthTriggerStyle }, /*#__PURE__*/react["createElement"](icon["default"], { type: "bars" })) : null; var iconObj = { expanded: reverseArrow ? /*#__PURE__*/react["createElement"](icon["default"], { type: "right" }) : /*#__PURE__*/react["createElement"](icon["default"], { type: "left" }), collapsed: reverseArrow ? /*#__PURE__*/react["createElement"](icon["default"], { type: "left" }) : /*#__PURE__*/react["createElement"](icon["default"], { type: "right" }) }; var status = _this.state.collapsed ? 'collapsed' : 'expanded'; var defaultTrigger = iconObj[status]; var triggerDom = trigger !== null ? zeroWidthTrigger || /*#__PURE__*/react["createElement"]("div", { className: "".concat(prefixCls, "-trigger"), onClick: _this.toggle, style: { width: siderWidth } }, trigger || defaultTrigger) : null; var divStyle = _extends(_extends({}, style), { flex: "0 0 ".concat(siderWidth), maxWidth: siderWidth, minWidth: siderWidth, width: siderWidth }); var siderCls = classnames_default()(className, prefixCls, "".concat(prefixCls, "-").concat(theme), (_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-collapsed"), !!_this.state.collapsed), _defineProperty(_classNames, "".concat(prefixCls, "-has-trigger"), collapsible && trigger !== null && !zeroWidthTrigger), _defineProperty(_classNames, "".concat(prefixCls, "-below"), !!_this.state.below), _defineProperty(_classNames, "".concat(prefixCls, "-zero-width"), parseFloat(siderWidth) === 0), _classNames)); return /*#__PURE__*/react["createElement"]("aside", _extends({ className: siderCls }, divProps, { style: divStyle }), /*#__PURE__*/react["createElement"]("div", { className: "".concat(prefixCls, "-children") }, _this.props.children), collapsible || _this.state.below && zeroWidthTrigger ? triggerDom : null); }; _this.uniqueId = generateId('ant-sider-'); var matchMedia; if (typeof window !== 'undefined') { matchMedia = window.matchMedia; } if (matchMedia && props.breakpoint && props.breakpoint in dimensionMaxMap) { _this.mql = matchMedia("(max-width: ".concat(dimensionMaxMap[props.breakpoint], ")")); } var collapsed; if ('collapsed' in props) { collapsed = props.collapsed; } else { collapsed = props.defaultCollapsed; } _this.state = { collapsed: collapsed, below: false }; return _this; } _createClass(InternalSider, [{ key: "componentDidMount", value: function componentDidMount() { if (this.mql) { this.mql.addListener(this.responsiveHandler); this.responsiveHandler(this.mql); } if (this.props.siderHook) { this.props.siderHook.addSider(this.uniqueId); } } }, { key: "componentWillUnmount", value: function componentWillUnmount() { if (this.mql) { this.mql.removeListener(this.responsiveHandler); } if (this.props.siderHook) { this.props.siderHook.removeSider(this.uniqueId); } } }, { key: "render", value: function render() { var collapsed = this.state.collapsed; var collapsedWidth = this.props.collapsedWidth; return /*#__PURE__*/react["createElement"](SiderContext.Provider, { value: { siderCollapsed: collapsed, collapsedWidth: collapsedWidth } }, /*#__PURE__*/react["createElement"](config_provider["ConfigConsumer"], null, this.renderSider)); } }], [{ key: "getDerivedStateFromProps", value: function getDerivedStateFromProps(nextProps) { if ('collapsed' in nextProps) { return { collapsed: nextProps.collapsed }; } return null; } }]); return InternalSider; }(react["Component"]); Sider_InternalSider.defaultProps = { collapsible: false, defaultCollapsed: false, reverseArrow: false, width: 200, collapsedWidth: 80, style: {}, theme: 'dark' }; Object(react_lifecycles_compat_es["polyfill"])(Sider_InternalSider); // eslint-disable-next-line react/prefer-stateless-function var Sider_Sider = /*#__PURE__*/function (_React$Component2) { _inherits(Sider, _React$Component2); var _super2 = _createSuper(Sider); function Sider() { _classCallCheck(this, Sider); return _super2.apply(this, arguments); } _createClass(Sider, [{ key: "render", value: function render() { var _this2 = this; return /*#__PURE__*/react["createElement"](layout["a" /* LayoutContext */].Consumer, null, function (context) { return /*#__PURE__*/react["createElement"](Sider_InternalSider, _extends({}, context, _this2.props)); }); } }]); return Sider; }(react["Component"]); /***/ }), /***/ "wfLM": /***/ (function(module, exports, __webpack_require__) { "use strict"; var reactIs = __webpack_require__("ncfW"); /** * Copyright 2015, Yahoo! Inc. * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. */ var REACT_STATICS = { childContextTypes: true, contextType: true, contextTypes: true, defaultProps: true, displayName: true, getDefaultProps: true, getDerivedStateFromError: true, getDerivedStateFromProps: true, mixins: true, propTypes: true, type: true }; var KNOWN_STATICS = { name: true, length: true, prototype: true, caller: true, callee: true, arguments: true, arity: true }; var FORWARD_REF_STATICS = { '$$typeof': true, render: true, defaultProps: true, displayName: true, propTypes: true }; var MEMO_STATICS = { '$$typeof': true, compare: true, defaultProps: true, displayName: true, propTypes: true, type: true }; var TYPE_STATICS = {}; TYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS; TYPE_STATICS[reactIs.Memo] = MEMO_STATICS; function getStatics(component) { // React v16.11 and below if (reactIs.isMemo(component)) { return MEMO_STATICS; } // React v16.12 and above return TYPE_STATICS[component['$$typeof']] || REACT_STATICS; } var defineProperty = Object.defineProperty; var getOwnPropertyNames = Object.getOwnPropertyNames; var getOwnPropertySymbols = Object.getOwnPropertySymbols; var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; var getPrototypeOf = Object.getPrototypeOf; var objectPrototype = Object.prototype; function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) { if (typeof sourceComponent !== 'string') { // don't hoist over string (html) components if (objectPrototype) { var inheritedComponent = getPrototypeOf(sourceComponent); if (inheritedComponent && inheritedComponent !== objectPrototype) { hoistNonReactStatics(targetComponent, inheritedComponent, blacklist); } } var keys = getOwnPropertyNames(sourceComponent); if (getOwnPropertySymbols) { keys = keys.concat(getOwnPropertySymbols(sourceComponent)); } var targetStatics = getStatics(targetComponent); var sourceStatics = getStatics(sourceComponent); for (var i = 0; i < keys.length; ++i) { var key = keys[i]; if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) { var descriptor = getOwnPropertyDescriptor(sourceComponent, key); try { // Avoid failures from read-only properties defineProperty(targetComponent, key, descriptor); } catch (e) {} } } } return targetComponent; } module.exports = hoistNonReactStatics; /***/ }), /***/ "wmKa": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAA6NJREFUWEe9l1uoVVUUhr8/KbtB0UPSReiheqiIrNQKiUDLLgTdCBI08ySiYEamkKAgJOGlIAWLym5QChYS3UxMKCTRh1O9RFpvaZJmFEj3GPEfxtpMl3ufvXb72Hxaa64xx/jXP8b855iiwYiI84A7gduAi4DzgbOBQ8D3wNfAu8BWSUcbuGyZaDjjiLgSeCoDD2ubfv4AXgaWS/qhCZC2TiPidGAdMBM4qYmjmo1ZMIg13dYeByAixgLvAOOKxX8DO3L+s6T9Z+BcwPaTgbuBq2sBNwIDkn7rBOQYABl8N+CcV2ML8ISkvd3+JiKmAKtq4D8Fbpb0Z7v1LQBJ+85isfM5R9Jr3QKX3yNiFPAM8Egxv0HSw90AbABmFcU0VdInvQSvAXkcWF3MPSTp1bq/IQay2j8vCm5mr3/eDmhEvAhUf+7teomkX0vbCsD7wO35YYuke/7rn9dYOBXYl4XqT0skeVu3hlJkDgAG42q/oknBNQUYEd7Kr6T9N5IurQOYAzyfk9skTW3qvIldRJwMHAbOSvvLJX1VrTUD3mZ35cQ8Sc81cdyLTUS8CTyQaxZK8i4ZGgbg4rsq38dJ+qIX501sI2I+sDZt10lqbVEDsGZb0TzGSPIBM6IjIu4F3kqnb0u6r2TAgnNKTozupFj9IIoIS/X29PGxJCtmKwXfARfm+1hJ+/sJ1m5tRDj/rgOPjZKmlQCs/RNy4gZJu04AgMXAyvT7tCSrZIsBa/2MfF8q6ckTAOAj4Jb0O1vSSyUAF8TmnBiUdM1IAogI73/rgPUggAskHSwBnAn8CIzOSR+dVcH0jSUilgPL0tFuSdeVTquzYD0wNz9YF8ZL+qff6BHh3tFnwRnpa5okNymtUQEYA3wLmA2PtZIW9AMgIsyoj/OJVXqBayU5DccC8FtE1M/vRU16unYgM/jrwP353UHvkPRh3b7ekpWabVtX63xJvzdlI2m36l1fW+PUTpH0U1sGkoXT3NsDNxZGFioX0RuS/uoEJKv9MWBhkfMht3nU+/k4EO26Ysuyi3KgFuwX4APAQuXupt4V31RIupe6t3gUcIvuu0LV3vuwm1wx0fGykY3EirwFNc1AZTcILJDkJtf19WAbEE7HkW43I19QvBvcrF7cBYWp3gM8C2yqV3tEWG3dGVVMfAlManLdGoobEZcBt3a4G/rO8F6pcB12Rx3E7MYAes3BMMU6HXghmWjOwEgBSDbPAUZJOvy/M1D/kX8BwbQ/zHNZfQkAAAAASUVORK5CYII=" /***/ }), /***/ "wqO5": /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * */ var _assign = __webpack_require__("BEQ0"); // -- Inlined from fbjs -- var emptyObject = {}; if (false) { Object.freeze(emptyObject); } var validateFormat = function validateFormat(format) {}; if (false) { validateFormat = function validateFormat(format) { if (format === undefined) { throw new Error('invariant requires an error message argument'); } }; } function _invariant(condition, format, a, b, c, d, e, f) { validateFormat(format); if (!condition) { var error; if (format === undefined) { error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.'); } else { var args = [a, b, c, d, e, f]; var argIndex = 0; error = new Error(format.replace(/%s/g, function () { return args[argIndex++]; })); error.name = 'Invariant Violation'; } error.framesToPop = 1; // we don't care about invariant's own frame throw error; } } var warning = function(){}; if (false) { var printWarning = function printWarning(format) { for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { args[_key - 1] = arguments[_key]; } var argIndex = 0; var message = 'Warning: ' + format.replace(/%s/g, function () { return args[argIndex++]; }); if (typeof console !== 'undefined') { console.error(message); } try { // --- Welcome to debugging React --- // This error was thrown as a convenience so that you can use this stack // to find the callsite that caused this warning to fire. throw new Error(message); } catch (x) {} }; warning = function warning(condition, format) { if (format === undefined) { throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument'); } if (format.indexOf('Failed Composite propType: ') === 0) { return; // Ignore CompositeComponent proptype check. } if (!condition) { for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) { args[_key2 - 2] = arguments[_key2]; } printWarning.apply(undefined, [format].concat(args)); } }; } // /-- Inlined from fbjs -- var MIXINS_KEY = 'mixins'; // Helper function to allow the creation of anonymous functions which do not // have .name set to the name of the variable being assigned to. function identity(fn) { return fn; } var ReactPropTypeLocationNames; if (false) { ReactPropTypeLocationNames = { prop: 'prop', context: 'context', childContext: 'child context' }; } else { ReactPropTypeLocationNames = {}; } function factory(ReactComponent, isValidElement, ReactNoopUpdateQueue) { /** * Policies that describe methods in `ReactClassInterface`. */ var injectedMixins = []; /** * Composite components are higher-level components that compose other composite * or host components. * * To create a new type of `ReactClass`, pass a specification of * your new class to `React.createClass`. The only requirement of your class * specification is that you implement a `render` method. * * var MyComponent = React.createClass({ * render: function() { * return
    Hello World
    ; * } * }); * * The class specification supports a specific protocol of methods that have * special meaning (e.g. `render`). See `ReactClassInterface` for * more the comprehensive protocol. Any other properties and methods in the * class specification will be available on the prototype. * * @interface ReactClassInterface * @internal */ var ReactClassInterface = { /** * An array of Mixin objects to include when defining your component. * * @type {array} * @optional */ mixins: 'DEFINE_MANY', /** * An object containing properties and methods that should be defined on * the component's constructor instead of its prototype (static methods). * * @type {object} * @optional */ statics: 'DEFINE_MANY', /** * Definition of prop types for this component. * * @type {object} * @optional */ propTypes: 'DEFINE_MANY', /** * Definition of context types for this component. * * @type {object} * @optional */ contextTypes: 'DEFINE_MANY', /** * Definition of context types this component sets for its children. * * @type {object} * @optional */ childContextTypes: 'DEFINE_MANY', // ==== Definition methods ==== /** * Invoked when the component is mounted. Values in the mapping will be set on * `this.props` if that prop is not specified (i.e. using an `in` check). * * This method is invoked before `getInitialState` and therefore cannot rely * on `this.state` or use `this.setState`. * * @return {object} * @optional */ getDefaultProps: 'DEFINE_MANY_MERGED', /** * Invoked once before the component is mounted. The return value will be used * as the initial value of `this.state`. * * getInitialState: function() { * return { * isOn: false, * fooBaz: new BazFoo() * } * } * * @return {object} * @optional */ getInitialState: 'DEFINE_MANY_MERGED', /** * @return {object} * @optional */ getChildContext: 'DEFINE_MANY_MERGED', /** * Uses props from `this.props` and state from `this.state` to render the * structure of the component. * * No guarantees are made about when or how often this method is invoked, so * it must not have side effects. * * render: function() { * var name = this.props.name; * return
    Hello, {name}!
    ; * } * * @return {ReactComponent} * @required */ render: 'DEFINE_ONCE', // ==== Delegate methods ==== /** * Invoked when the component is initially created and about to be mounted. * This may have side effects, but any external subscriptions or data created * by this method must be cleaned up in `componentWillUnmount`. * * @optional */ componentWillMount: 'DEFINE_MANY', /** * Invoked when the component has been mounted and has a DOM representation. * However, there is no guarantee that the DOM node is in the document. * * Use this as an opportunity to operate on the DOM when the component has * been mounted (initialized and rendered) for the first time. * * @param {DOMElement} rootNode DOM element representing the component. * @optional */ componentDidMount: 'DEFINE_MANY', /** * Invoked before the component receives new props. * * Use this as an opportunity to react to a prop transition by updating the * state using `this.setState`. Current props are accessed via `this.props`. * * componentWillReceiveProps: function(nextProps, nextContext) { * this.setState({ * likesIncreasing: nextProps.likeCount > this.props.likeCount * }); * } * * NOTE: There is no equivalent `componentWillReceiveState`. An incoming prop * transition may cause a state change, but the opposite is not true. If you * need it, you are probably looking for `componentWillUpdate`. * * @param {object} nextProps * @optional */ componentWillReceiveProps: 'DEFINE_MANY', /** * Invoked while deciding if the component should be updated as a result of * receiving new props, state and/or context. * * Use this as an opportunity to `return false` when you're certain that the * transition to the new props/state/context will not require a component * update. * * shouldComponentUpdate: function(nextProps, nextState, nextContext) { * return !equal(nextProps, this.props) || * !equal(nextState, this.state) || * !equal(nextContext, this.context); * } * * @param {object} nextProps * @param {?object} nextState * @param {?object} nextContext * @return {boolean} True if the component should update. * @optional */ shouldComponentUpdate: 'DEFINE_ONCE', /** * Invoked when the component is about to update due to a transition from * `this.props`, `this.state` and `this.context` to `nextProps`, `nextState` * and `nextContext`. * * Use this as an opportunity to perform preparation before an update occurs. * * NOTE: You **cannot** use `this.setState()` in this method. * * @param {object} nextProps * @param {?object} nextState * @param {?object} nextContext * @param {ReactReconcileTransaction} transaction * @optional */ componentWillUpdate: 'DEFINE_MANY', /** * Invoked when the component's DOM representation has been updated. * * Use this as an opportunity to operate on the DOM when the component has * been updated. * * @param {object} prevProps * @param {?object} prevState * @param {?object} prevContext * @param {DOMElement} rootNode DOM element representing the component. * @optional */ componentDidUpdate: 'DEFINE_MANY', /** * Invoked when the component is about to be removed from its parent and have * its DOM representation destroyed. * * Use this as an opportunity to deallocate any external resources. * * NOTE: There is no `componentDidUnmount` since your component will have been * destroyed by that point. * * @optional */ componentWillUnmount: 'DEFINE_MANY', /** * Replacement for (deprecated) `componentWillMount`. * * @optional */ UNSAFE_componentWillMount: 'DEFINE_MANY', /** * Replacement for (deprecated) `componentWillReceiveProps`. * * @optional */ UNSAFE_componentWillReceiveProps: 'DEFINE_MANY', /** * Replacement for (deprecated) `componentWillUpdate`. * * @optional */ UNSAFE_componentWillUpdate: 'DEFINE_MANY', // ==== Advanced methods ==== /** * Updates the component's currently mounted DOM representation. * * By default, this implements React's rendering and reconciliation algorithm. * Sophisticated clients may wish to override this. * * @param {ReactReconcileTransaction} transaction * @internal * @overridable */ updateComponent: 'OVERRIDE_BASE' }; /** * Similar to ReactClassInterface but for static methods. */ var ReactClassStaticInterface = { /** * This method is invoked after a component is instantiated and when it * receives new props. Return an object to update state in response to * prop changes. Return null to indicate no change to state. * * If an object is returned, its keys will be merged into the existing state. * * @return {object || null} * @optional */ getDerivedStateFromProps: 'DEFINE_MANY_MERGED' }; /** * Mapping from class specification keys to special processing functions. * * Although these are declared like instance properties in the specification * when defining classes using `React.createClass`, they are actually static * and are accessible on the constructor instead of the prototype. Despite * being static, they must be defined outside of the "statics" key under * which all other static methods are defined. */ var RESERVED_SPEC_KEYS = { displayName: function(Constructor, displayName) { Constructor.displayName = displayName; }, mixins: function(Constructor, mixins) { if (mixins) { for (var i = 0; i < mixins.length; i++) { mixSpecIntoComponent(Constructor, mixins[i]); } } }, childContextTypes: function(Constructor, childContextTypes) { if (false) { validateTypeDef(Constructor, childContextTypes, 'childContext'); } Constructor.childContextTypes = _assign( {}, Constructor.childContextTypes, childContextTypes ); }, contextTypes: function(Constructor, contextTypes) { if (false) { validateTypeDef(Constructor, contextTypes, 'context'); } Constructor.contextTypes = _assign( {}, Constructor.contextTypes, contextTypes ); }, /** * Special case getDefaultProps which should move into statics but requires * automatic merging. */ getDefaultProps: function(Constructor, getDefaultProps) { if (Constructor.getDefaultProps) { Constructor.getDefaultProps = createMergedResultFunction( Constructor.getDefaultProps, getDefaultProps ); } else { Constructor.getDefaultProps = getDefaultProps; } }, propTypes: function(Constructor, propTypes) { if (false) { validateTypeDef(Constructor, propTypes, 'prop'); } Constructor.propTypes = _assign({}, Constructor.propTypes, propTypes); }, statics: function(Constructor, statics) { mixStaticSpecIntoComponent(Constructor, statics); }, autobind: function() {} }; function validateTypeDef(Constructor, typeDef, location) { for (var propName in typeDef) { if (typeDef.hasOwnProperty(propName)) { // use a warning instead of an _invariant so components // don't show up in prod but only in __DEV__ if (false) { warning( typeof typeDef[propName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', Constructor.displayName || 'ReactClass', ReactPropTypeLocationNames[location], propName ); } } } } function validateMethodOverride(isAlreadyDefined, name) { var specPolicy = ReactClassInterface.hasOwnProperty(name) ? ReactClassInterface[name] : null; // Disallow overriding of base class methods unless explicitly allowed. if (ReactClassMixin.hasOwnProperty(name)) { _invariant( specPolicy === 'OVERRIDE_BASE', 'ReactClassInterface: You are attempting to override ' + '`%s` from your class specification. Ensure that your method names ' + 'do not overlap with React methods.', name ); } // Disallow defining methods more than once unless explicitly allowed. if (isAlreadyDefined) { _invariant( specPolicy === 'DEFINE_MANY' || specPolicy === 'DEFINE_MANY_MERGED', 'ReactClassInterface: You are attempting to define ' + '`%s` on your component more than once. This conflict may be due ' + 'to a mixin.', name ); } } /** * Mixin helper which handles policy validation and reserved * specification keys when building React classes. */ function mixSpecIntoComponent(Constructor, spec) { if (!spec) { if (false) { var typeofSpec = typeof spec; var isMixinValid = typeofSpec === 'object' && spec !== null; if (process.env.NODE_ENV !== 'production') { warning( isMixinValid, "%s: You're attempting to include a mixin that is either null " + 'or not an object. Check the mixins included by the component, ' + 'as well as any mixins they include themselves. ' + 'Expected object but got %s.', Constructor.displayName || 'ReactClass', spec === null ? null : typeofSpec ); } } return; } _invariant( typeof spec !== 'function', "ReactClass: You're attempting to " + 'use a component class or function as a mixin. Instead, just use a ' + 'regular object.' ); _invariant( !isValidElement(spec), "ReactClass: You're attempting to " + 'use a component as a mixin. Instead, just use a regular object.' ); var proto = Constructor.prototype; var autoBindPairs = proto.__reactAutoBindPairs; // By handling mixins before any other properties, we ensure the same // chaining order is applied to methods with DEFINE_MANY policy, whether // mixins are listed before or after these methods in the spec. if (spec.hasOwnProperty(MIXINS_KEY)) { RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins); } for (var name in spec) { if (!spec.hasOwnProperty(name)) { continue; } if (name === MIXINS_KEY) { // We have already handled mixins in a special case above. continue; } var property = spec[name]; var isAlreadyDefined = proto.hasOwnProperty(name); validateMethodOverride(isAlreadyDefined, name); if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) { RESERVED_SPEC_KEYS[name](Constructor, property); } else { // Setup methods on prototype: // The following member methods should not be automatically bound: // 1. Expected ReactClass methods (in the "interface"). // 2. Overridden methods (that were mixed in). var isReactClassMethod = ReactClassInterface.hasOwnProperty(name); var isFunction = typeof property === 'function'; var shouldAutoBind = isFunction && !isReactClassMethod && !isAlreadyDefined && spec.autobind !== false; if (shouldAutoBind) { autoBindPairs.push(name, property); proto[name] = property; } else { if (isAlreadyDefined) { var specPolicy = ReactClassInterface[name]; // These cases should already be caught by validateMethodOverride. _invariant( isReactClassMethod && (specPolicy === 'DEFINE_MANY_MERGED' || specPolicy === 'DEFINE_MANY'), 'ReactClass: Unexpected spec policy %s for key %s ' + 'when mixing in component specs.', specPolicy, name ); // For methods which are defined more than once, call the existing // methods before calling the new property, merging if appropriate. if (specPolicy === 'DEFINE_MANY_MERGED') { proto[name] = createMergedResultFunction(proto[name], property); } else if (specPolicy === 'DEFINE_MANY') { proto[name] = createChainedFunction(proto[name], property); } } else { proto[name] = property; if (false) { // Add verbose displayName to the function, which helps when looking // at profiling tools. if (typeof property === 'function' && spec.displayName) { proto[name].displayName = spec.displayName + '_' + name; } } } } } } } function mixStaticSpecIntoComponent(Constructor, statics) { if (!statics) { return; } for (var name in statics) { var property = statics[name]; if (!statics.hasOwnProperty(name)) { continue; } var isReserved = name in RESERVED_SPEC_KEYS; _invariant( !isReserved, 'ReactClass: You are attempting to define a reserved ' + 'property, `%s`, that shouldn\'t be on the "statics" key. Define it ' + 'as an instance property instead; it will still be accessible on the ' + 'constructor.', name ); var isAlreadyDefined = name in Constructor; if (isAlreadyDefined) { var specPolicy = ReactClassStaticInterface.hasOwnProperty(name) ? ReactClassStaticInterface[name] : null; _invariant( specPolicy === 'DEFINE_MANY_MERGED', 'ReactClass: You are attempting to define ' + '`%s` on your component more than once. This conflict may be ' + 'due to a mixin.', name ); Constructor[name] = createMergedResultFunction(Constructor[name], property); return; } Constructor[name] = property; } } /** * Merge two objects, but throw if both contain the same key. * * @param {object} one The first object, which is mutated. * @param {object} two The second object * @return {object} one after it has been mutated to contain everything in two. */ function mergeIntoWithNoDuplicateKeys(one, two) { _invariant( one && two && typeof one === 'object' && typeof two === 'object', 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.' ); for (var key in two) { if (two.hasOwnProperty(key)) { _invariant( one[key] === undefined, 'mergeIntoWithNoDuplicateKeys(): ' + 'Tried to merge two objects with the same key: `%s`. This conflict ' + 'may be due to a mixin; in particular, this may be caused by two ' + 'getInitialState() or getDefaultProps() methods returning objects ' + 'with clashing keys.', key ); one[key] = two[key]; } } return one; } /** * Creates a function that invokes two functions and merges their return values. * * @param {function} one Function to invoke first. * @param {function} two Function to invoke second. * @return {function} Function that invokes the two argument functions. * @private */ function createMergedResultFunction(one, two) { return function mergedResult() { var a = one.apply(this, arguments); var b = two.apply(this, arguments); if (a == null) { return b; } else if (b == null) { return a; } var c = {}; mergeIntoWithNoDuplicateKeys(c, a); mergeIntoWithNoDuplicateKeys(c, b); return c; }; } /** * Creates a function that invokes two functions and ignores their return vales. * * @param {function} one Function to invoke first. * @param {function} two Function to invoke second. * @return {function} Function that invokes the two argument functions. * @private */ function createChainedFunction(one, two) { return function chainedFunction() { one.apply(this, arguments); two.apply(this, arguments); }; } /** * Binds a method to the component. * * @param {object} component Component whose method is going to be bound. * @param {function} method Method to be bound. * @return {function} The bound method. */ function bindAutoBindMethod(component, method) { var boundMethod = method.bind(component); if (false) { boundMethod.__reactBoundContext = component; boundMethod.__reactBoundMethod = method; boundMethod.__reactBoundArguments = null; var componentName = component.constructor.displayName; var _bind = boundMethod.bind; boundMethod.bind = function(newThis) { for ( var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++ ) { args[_key - 1] = arguments[_key]; } // User is trying to bind() an autobound method; we effectively will // ignore the value of "this" that the user is trying to use, so // let's warn. if (newThis !== component && newThis !== null) { if (process.env.NODE_ENV !== 'production') { warning( false, 'bind(): React component methods may only be bound to the ' + 'component instance. See %s', componentName ); } } else if (!args.length) { if (process.env.NODE_ENV !== 'production') { warning( false, 'bind(): You are binding a component method to the component. ' + 'React does this for you automatically in a high-performance ' + 'way, so you can safely remove this call. See %s', componentName ); } return boundMethod; } var reboundMethod = _bind.apply(boundMethod, arguments); reboundMethod.__reactBoundContext = component; reboundMethod.__reactBoundMethod = method; reboundMethod.__reactBoundArguments = args; return reboundMethod; }; } return boundMethod; } /** * Binds all auto-bound methods in a component. * * @param {object} component Component whose method is going to be bound. */ function bindAutoBindMethods(component) { var pairs = component.__reactAutoBindPairs; for (var i = 0; i < pairs.length; i += 2) { var autoBindKey = pairs[i]; var method = pairs[i + 1]; component[autoBindKey] = bindAutoBindMethod(component, method); } } var IsMountedPreMixin = { componentDidMount: function() { this.__isMounted = true; } }; var IsMountedPostMixin = { componentWillUnmount: function() { this.__isMounted = false; } }; /** * Add more to the ReactClass base class. These are all legacy features and * therefore not already part of the modern ReactComponent. */ var ReactClassMixin = { /** * TODO: This will be deprecated because state should always keep a consistent * type signature and the only use case for this, is to avoid that. */ replaceState: function(newState, callback) { this.updater.enqueueReplaceState(this, newState, callback); }, /** * Checks whether or not this composite component is mounted. * @return {boolean} True if mounted, false otherwise. * @protected * @final */ isMounted: function() { if (false) { warning( this.__didWarnIsMounted, '%s: isMounted is deprecated. Instead, make sure to clean up ' + 'subscriptions and pending requests in componentWillUnmount to ' + 'prevent memory leaks.', (this.constructor && this.constructor.displayName) || this.name || 'Component' ); this.__didWarnIsMounted = true; } return !!this.__isMounted; } }; var ReactClassComponent = function() {}; _assign( ReactClassComponent.prototype, ReactComponent.prototype, ReactClassMixin ); /** * Creates a composite component class given a class specification. * See https://facebook.github.io/react/docs/top-level-api.html#react.createclass * * @param {object} spec Class specification (which must define `render`). * @return {function} Component constructor function. * @public */ function createClass(spec) { // To keep our warnings more understandable, we'll use a little hack here to // ensure that Constructor.name !== 'Constructor'. This makes sure we don't // unnecessarily identify a class without displayName as 'Constructor'. var Constructor = identity(function(props, context, updater) { // This constructor gets overridden by mocks. The argument is used // by mocks to assert on what gets mounted. if (false) { warning( this instanceof Constructor, 'Something is calling a React component directly. Use a factory or ' + 'JSX instead. See: https://fb.me/react-legacyfactory' ); } // Wire up auto-binding if (this.__reactAutoBindPairs.length) { bindAutoBindMethods(this); } this.props = props; this.context = context; this.refs = emptyObject; this.updater = updater || ReactNoopUpdateQueue; this.state = null; // ReactClasses doesn't have constructors. Instead, they use the // getInitialState and componentWillMount methods for initialization. var initialState = this.getInitialState ? this.getInitialState() : null; if (false) { // We allow auto-mocks to proceed as if they're returning null. if ( initialState === undefined && this.getInitialState._isMockFunction ) { // This is probably bad practice. Consider warning here and // deprecating this convenience. initialState = null; } } _invariant( typeof initialState === 'object' && !Array.isArray(initialState), '%s.getInitialState(): must return an object or null', Constructor.displayName || 'ReactCompositeComponent' ); this.state = initialState; }); Constructor.prototype = new ReactClassComponent(); Constructor.prototype.constructor = Constructor; Constructor.prototype.__reactAutoBindPairs = []; injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor)); mixSpecIntoComponent(Constructor, IsMountedPreMixin); mixSpecIntoComponent(Constructor, spec); mixSpecIntoComponent(Constructor, IsMountedPostMixin); // Initialize the defaultProps property after all mixins have been merged. if (Constructor.getDefaultProps) { Constructor.defaultProps = Constructor.getDefaultProps(); } if (false) { // This is a tag to indicate that the use of these method names is ok, // since it's used with createClass. If it's not, then it's likely a // mistake so we'll warn you to use the static property, property // initializer or constructor respectively. if (Constructor.getDefaultProps) { Constructor.getDefaultProps.isReactClassApproved = {}; } if (Constructor.prototype.getInitialState) { Constructor.prototype.getInitialState.isReactClassApproved = {}; } } _invariant( Constructor.prototype.render, 'createClass(...): Class specification must implement a `render` method.' ); if (false) { warning( !Constructor.prototype.componentShouldUpdate, '%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', spec.displayName || 'A component' ); warning( !Constructor.prototype.componentWillRecieveProps, '%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', spec.displayName || 'A component' ); warning( !Constructor.prototype.UNSAFE_componentWillRecieveProps, '%s has a method called UNSAFE_componentWillRecieveProps(). ' + 'Did you mean UNSAFE_componentWillReceiveProps()?', spec.displayName || 'A component' ); } // Reduce time spent doing lookups by setting these on the prototype. for (var methodName in ReactClassInterface) { if (!Constructor.prototype[methodName]) { Constructor.prototype[methodName] = null; } } return Constructor; } return createClass; } module.exports = factory; /***/ }), /***/ "x075": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; __webpack_require__("tDqI"); var _radio = _interopRequireDefault(__webpack_require__("gtac")); __webpack_require__("rpBe"); var _checkbox = _interopRequireDefault(__webpack_require__("hK1P")); __webpack_require__("baa2"); var _icon = _interopRequireDefault(__webpack_require__("FC3+")); var _toConsumableArray2 = _interopRequireDefault(__webpack_require__("V4Os")); var _objectSpread2 = _interopRequireDefault(__webpack_require__("+TWC")); var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); var _dva = __webpack_require__("S6G3"); var _api = __webpack_require__("H/Zg"); var _loading = _interopRequireDefault(__webpack_require__("Ae19")); var _PersonItem = _interopRequireDefault(__webpack_require__("baF6")); __webpack_require__("OJD5"); var _dec, _class; /** * 人员列表 */ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } var PersonList = exports.default = (_dec = (0, _dva.connect)(function (state) { return { selectedId: state.command.personList.selectedId, tabIndex1: state.command.tabIndex.tabIndex1, tabIndex2: state.command.tabIndex.person.tabIndex2, addressList: state.command.personList.addressList }; }), _dec(_class = /*#__PURE__*/function (_Component) { function PersonList(props, context) { var _this; (0, _classCallCheck2.default)(this, PersonList); _this = _callSuper(this, PersonList, [props, context]); /* *****************ajax****************** */ //--获取当前部门人员(分页) _this._getDepartUser = function (loadMore) { var _this$state = _this.state, navtree = _this$state.navtree, listParams = _this$state.listParams, personList = _this$state.personList; // 加载更多 if (loadMore) { listParams.pageNumber++; } else { // 刷新列表 listParams.pageNumber = 1; personList = []; } // 获取id var departId = navtree[navtree.length - 1].key; var requestParameters = (0, _objectSpread2.default)({ departId: departId }, listParams); // 获取接口 var getFun = _api.getComPerLocationByKeyword; if (_this.props.fetchType == 'huawei') { // getFun = getHuaweiDepartPersonList; } else if (_this.props.fetchType == 'task') { getFun = _api.getTaskDepartPersonList; } getFun(requestParameters).then(function (res) { _this.setState({ personList: [].concat((0, _toConsumableArray2.default)(personList), (0, _toConsumableArray2.default)(res.data.data)), //更新数据 listParams: listParams, //设置页面参数 totalPage: res.data.totalPage }); _this.props.dispatch({ type: "command/fetchPersonList", payload: { list: [].concat((0, _toConsumableArray2.default)(personList), (0, _toConsumableArray2.default)(res.data.data)) } }); _this.props.dispatch({ type: "command/fetchPersonAddressList", payload: { addressList: [].concat((0, _toConsumableArray2.default)(personList), (0, _toConsumableArray2.default)(res.data.data)) } }); }); }; // 传入部门id通过接口获取部门下的所有人 _this._getPersonByDepartId = function () { var departIds = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; // 获取接口方法 var getFun = _api.getComPerLocationByKeyword; if (_this.props.fetchType == 'huawei') { getFun = _api.getHuaweiDepartPersonList; } else if (_this.props.fetchType == 'task') { getFun = _api.getTaskDepartPersonList; } // 循环调用接口获取对应部门的数据 var departInfo = _this.state.departInfo; departIds.forEach(function (departId) { if (!departInfo[departId]) { //该部门数据没有被缓存 // 获取对应部门的人员数据 getFun({ departId: departId, pageNumber: 1, pageSize: 1000000 }).then(function (res) { // 储存对应的部门数据 departInfo[departId] = res.data.data; _this.setState({ departInfo: departInfo }); }); } }); }; /* *****************mothods****************** */ // 获取当前部门下的人员和部门信息(多选部分页的情况) _this._getCurrentInfo = function () { var navtree = _this.state.navtree; // 当前应当展示的部门数据 var currentTree = navtree[navtree.length - 1] && navtree[navtree.length - 1].children || []; // 获取当前部门人员和当前子部门的人员 var departIds = currentTree.map(function (_ref) { var key = _ref.key; return key; }); departIds.push(navtree[navtree.length - 1].key); _this._getPersonByDepartId(departIds); }; // 部门被选中的值(多选) _this._getDepartValues = function () { var _this$state2 = _this.state, navtree = _this$state2.navtree, departInfo = _this$state2.departInfo; var value = _this.props.value; // 当前应当展示的部门数据 var currentTree = navtree[navtree.length - 1] && navtree[navtree.length - 1].children || []; var selectedDeparts = []; currentTree.forEach(function (cItem) { var result = true; if (departInfo[cItem.key]) { result = true; if (departInfo[cItem.key].length > 0) { var _loop = function _loop(i) { if (!value.some(function (item) { return item.perId == departInfo[cItem.key][i].perId; })) { result = false; return 1; // break } }; for (var i = 0; i < departInfo[cItem.key].length; i++) { if (_loop(i)) break; } } else { result = false; } } else { result = false; } result && selectedDeparts.push(cItem.key); }); return selectedDeparts; }; /* *****************render****************** */ // 面包屑 _this._renderNavBar = function () { var navtree = _this.state.navtree; return /*#__PURE__*/_react.default.createElement("div", { className: "nav-partment", ref: "navPartment", id: "s" }, navtree.map(function (val, index) { if (navtree.length - 1 !== index) { return /*#__PURE__*/_react.default.createElement("span", { key: index, onClick: function onClick() { _this.setState({ navtree: _this.state.navtree.slice(0, index + 1) }, function () { // 单选的情况重新加载当前人员列表 if (_this.props.type != 'checkbox') { _this._getDepartUser(); } }); _this.clear(); }, className: "nav" }, val.title, /*#__PURE__*/_react.default.createElement(_icon.default, { type: "right" })); } return /*#__PURE__*/_react.default.createElement("span", { key: index }, val.title); })); }; /* ---无搜索(展示部门信息) */ _this._renderDepartment = function () { var navtree = _this.state.navtree; // 当前应当展示的部门数据 var currentTree = navtree[navtree.length - 1] && navtree[navtree.length - 1].children || []; // 多选的情况 if (_this.props.type == 'checkbox') { return /*#__PURE__*/_react.default.createElement(_checkbox.default.Group, { value: _this._getDepartValues(), onChange: function onChange(values) { _loading.default.open('数据处理中...'); var departInfo = _this.state.departInfo; // 获取当前部门列表未选中的项目 var unSelected = currentTree.map(function (item) { if (values.indexOf(item.key) == '-1') { return item.key; } }); // 删除未选中部门的下的所有人员 unSelected.forEach(function (key) { if (departInfo[key]) { _this.props.delDepart(departInfo[key] || []); } }); // 新增选中部门下的人员 values.forEach(function (key) { _this.props.addDepart(departInfo[key] || []); }); _loading.default.close(); } }, currentTree.map(function (val, index) { return /*#__PURE__*/_react.default.createElement("div", { className: "department_item", key: index }, /*#__PURE__*/_react.default.createElement("span", { onClick: function onClick() { navtree.push(val); _this.setState({ navtree: navtree }, function () { return _this._getCurrentInfo(); }); }, className: "lower" }, /*#__PURE__*/_react.default.createElement("i", { className: "lowever_icon" }), "\u4E0B\u7EA7"), /*#__PURE__*/_react.default.createElement("i", { className: "department_icon" }), /*#__PURE__*/_react.default.createElement(_checkbox.default, { key: index, value: val.key }, /*#__PURE__*/_react.default.createElement("span", null, val.title))); })); } // 单选的情况 return currentTree.map(function (val, index) { return /*#__PURE__*/_react.default.createElement("div", { key: index, className: "department_item" }, /*#__PURE__*/_react.default.createElement("span", { onClick: function onClick() { _this.clear(); navtree.push(val); _this.setState({ navtree: navtree }, function () { return _this._getDepartUser(); }); }, className: "lower" }, /*#__PURE__*/_react.default.createElement("i", { className: "lowever_icon" }), "\u4E0B\u7EA7"), /*#__PURE__*/_react.default.createElement("i", { className: "department_icon" }), /*#__PURE__*/_react.default.createElement("span", { className: "department_name" }, val.title)); }); }; // 人员列表 _this._renderPersonList = function () { // 单选的情况采用分页的方式 var _this$state3 = _this.state, personList = _this$state3.personList, totalPage = _this$state3.totalPage, listParams = _this$state3.listParams; return /*#__PURE__*/_react.default.createElement("div", { className: "search-list_command" }, /*#__PURE__*/_react.default.createElement(_radio.default.Group, { onChange: function onChange(e) { _this.props.onSelect([e.target.value], _this.state.personList); }, value: function () { var value = _this.props.value; if (value.length == 0) return ''; var item = personList.find(function (listItem) { return listItem.perId == value[0].perId; }); return item ? JSON.stringify(item) : ''; }() }, /*#__PURE__*/_react.default.createElement(_PersonItem.default, { data: personList })), totalPage > listParams.pageNumber && /*#__PURE__*/_react.default.createElement("div", { style: { textAlign: "center", color: "#0f71ff" } }, /*#__PURE__*/_react.default.createElement("a", { onClick: function onClick() { _this._getDepartUser(true); } }, "\u70B9\u51FB\u52A0\u8F7D\u66F4\u591A..."))); }; _this.state = { tabKey1: '2', tabKey: "2", currentKey: null, //主要用于处理tab页面改变,不让重新请求数据 navtree: [], //层级数据 personList: [], //当前的人员列表 (单选的情况) listParams: { // 请求人员列表的参数 pageNumber: 1, pageSize: 10 }, keywordList: [], //关键字搜索列表 keywordParams: { pageNumber: 1, pageSize: 10 }, keyword: '', //关键字 departInfo: { // id: [] } //缓存部门id的集合,key是部门id,value是一个数组,对应部门下的人员 }; return _this; } (0, _inherits2.default)(PersonList, _Component); return (0, _createClass2.default)(PersonList, [{ key: "componentDidMount", value: function componentDidMount() { var _this2 = this; //---获取部门列表数据 (0, _api.getDepartmentData)().then(function (res) { // 设置导航数据 _this2.setState({ navtree: res.data }, function () { if (_this2.props.type == 'checkbox') { // this._getCurrentInfo(); } else { _this2._getDepartUser(); } }); }); } }, { key: "componentWillReceiveProps", value: function componentWillReceiveProps(nextProps) { if (nextProps.tabIndex2 == this.state.tabKey && //当前点击第二层的tab页是自己 this.props.addressList.length > 0 && //通讯录的列表值不为空 nextProps.tabIndex2 !== this.state.currentKey && //过去的tab页不是自己(为了页面重复刷新) nextProps.tabIndex1 == this.state.tabKey1 //第一层的tab页是自己的父级 ) { this.props.dispatch({ type: "command/fetchPersonList", payload: { list: (0, _toConsumableArray2.default)(this.props.addressList) } }); this.setState({ currentKey: nextProps.tabIndex2 }); } if (nextProps.tabIndex2 != this.state.tabKey) { //当前页不是自己的 this.setState({ currentKey: null }); } } }, { key: "clear", value: //清空点击数据 function clear() { if (this.props.selectedId) { //清空人员的点击数据 this.props.dispatch({ type: "command/setPersonSelectIndex", payload: null }); this.props.dispatch({ type: 'command/clearInfoWindow', payload: true }); } } }, { key: "render", value: // 渲染整个组件 function render() { return /*#__PURE__*/_react.default.createElement("div", { className: "SelectUser_command", style: (0, _objectSpread2.default)({}, this.props.style) }, !this.state.keyword && this._renderNavBar(), !this.state.keyword && this._renderDepartment(), !this.state.keyword && this._renderPersonList()); } }]); }(_react.Component)) || _class); /***/ }), /***/ "x2wF": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAWZJREFUOE+lk78vQ3EUxT/39S0SkQhJV4NoBA2JiEUsZoOhFoxNxMAkqWg0baMLE9H48RcQOlglNhETOoiOJAaLsBi8973y+gNtXpX0O37vPSfnnHuvAMTW93oCjpMBJoA27++X9wacubYdy6xEC1IGXwLtDYC15RfXtkdlNblzDEz9E1xpP/EIXn1k3wG9fyB98wi0qlG4sN3nMccK5kAnQfKISVgS+PD6jOogqskKpppAeAeGVKygGHMOWMAjIruiFAkQ7VNlrh7Bsu22bLnWe16h+w8W+FYgXN+HOoePIhE3kc6OOEYXFKYFHgQ2QByPUJUwoot+CgzKlYrkCvmOzVD4pQvcG5QnVDZFyhbQAYUlfwueRThIxeej8VT2XGG8kY3aKTzaxul3AvYsynYZ7IW4/xUi2qcwUydEyVpGT41wCLSWUucWWLNMyYKxxBtj+ieB3yI1Ul6pFxepuVVu+piaPedPxiCls+dpGToAAAAASUVORK5CYII=" /***/ }), /***/ "x85o": /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = findDOMNode; var _reactDom = _interopRequireDefault(__webpack_require__("O27J")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * Return if a node is a DOM node. Else will return by `findDOMNode` */ function findDOMNode(node) { if (node instanceof HTMLElement) { return node; } return _reactDom.default.findDOMNode(node); } /***/ }), /***/ "xD8h": /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.rotation = rotation; function rotation(map) { var zoom = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; return setInterval(function () { if (zoom == 0) { var _zoom = map.getZoom(); } var center = map.getCenter(); var lng = center.lng >= 360 ? 0 : center.lng + 5; map.setCenter(new BMapGL.Point(lng, center.lat)); }, 50); } /***/ }), /***/ "xDzc": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAALFJREFUOE/tkz8OAXEQhb+Jn9YBlAoX0KjFGcQJiD2BZbHWn3WCFU4gEjcQtcYFFEo9rd2MrNAusp2YcmbeN8nkPQGwp8tiJgx9oArk4l5CXYFtZIztdxpHeYr3gCisReScpFbVvEAN0MiYsjhesAEqYZbSzLZOb64/xm0/KJgbB2AXAy4Kq0nfan4ifu10vWAhUI8Biog77rWG3wCc0XyAqvsH/MwPUhspnZVThyltnO+Glp+zAX19JgAAAABJRU5ErkJggg==" /***/ }), /***/ "xFob": /***/ (function(module, exports) { /** * Helper function for iterating over a collection * * @param collection * @param fn */ function each(collection, fn) { var i = 0, length = collection.length, cont; for(i; i < length; i++) { cont = fn(collection[i], i); if(cont === false) { break; //allow early exit } } } /** * Helper function for determining whether target object is an array * * @param target the object under test * @return {Boolean} true if array, false otherwise */ function isArray(target) { return Object.prototype.toString.apply(target) === '[object Array]'; } /** * Helper function for determining whether target object is a function * * @param target the object under test * @return {Boolean} true if function, false otherwise */ function isFunction(target) { return typeof target === 'function'; } module.exports = { isFunction : isFunction, isArray : isArray, each : each }; /***/ }), /***/ "xOiI": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; __webpack_require__("UQ5M"); var _message2 = _interopRequireDefault(__webpack_require__("/qCn")); var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); __webpack_require__("11Jr"); __webpack_require__("KwxL"); function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /** * IM可视化视图 */ // import BenzAMRRecorder from 'benz-amr-recorder'; var SoundElement = exports.default = /*#__PURE__*/function (_Component) { function SoundElement(props) { var _this; (0, _classCallCheck2.default)(this, SoundElement); _this = _callSuper(this, SoundElement, [props]); _this.state = { // isMine: props.isMine, payload: props.payload, url: props.payload.url, amr: null, playState: false }; return _this; } (0, _inherits2.default)(SoundElement, _Component); return (0, _createClass2.default)(SoundElement, [{ key: "componentDidMount", value: function componentDidMount() { // console.log(window.BenzAMRRecorder); } }, { key: "componentWillReceiveProps", value: function componentWillReceiveProps(nextProps) { this.setState({ // isMine: nextProps.isMine, payload: nextProps.payload }); } }, { key: "play", value: function play() { // 目前移动端的语音消息采用 aac 格式,以前用 amr 格式。默认先用 audio 标签播放,若无法播放则尝试 amr 格式播放。 var audio = document.createElement('audio'); audio.addEventListener('error', this.tryPlayAMR()); // 播放出错,则尝试使用 AMR 播放 audio.src = this.state.url; var promise = audio.play(); if (promise) { promise.catch(function (err) { console.log('失败'); }).then(function (res) { console.log(res); console.log('成功'); }); } } }, { key: "tryPlayAMR", value: function tryPlayAMR() { try { var isIE = /MSIE|Trident|Edge/.test(window.navigator.userAgent); // amr 播放组件库在 IE 不支持 if (isIE) { _message2.default.warning('1您的浏览器不支持该格式的语音消息播放,请尝试更换浏览器,建议使用:谷歌浏览器'); return; } // 动态插入 amr 播放组件库 // if (BenzAMRRecorder) { // const script = document.createElement('script'); // script.addEventListener('load', this.playAMR()); // script.src = '../../../../assets/BenzAMRRecorder.js'; //暂时把文件删掉,好像这么插不进去 // const firstScript = document.getElementsByTagName('script')[0]; // firstScript.parentNode.insertBefore(script, firstScript); // console.log(firstScript) // document.body.appendChild(script); // return; // } this.playAMR(); } catch (error) { _message2.default.warning('2您的浏览器不支持该格式的语音消息播放,请尝试更换浏览器,建议使用:谷歌浏览器'); } } }, { key: "playAMR", value: function playAMR() { var _this2 = this; var amr = null; // if (!this.state.amr && BenzAMRRecorder) { amr = new BenzAMRRecorder(); // } // console.log(this.state.amr.isInit()); // if (this.state.amr.isInit()) { // this.state.amr.play(); // return; // } amr.initWithUrl(this.state.url).then(function (res) { amr.play(); _this2.setState({ playState: true }); }); amr.onEnded(function () { console.log('播放结束'); _this2.setState({ playState: false }); }); } }, { key: "render", value: function render() { var _this3 = this; // play的还不行 return /*#__PURE__*/_react.default.createElement("div", { className: "sound-element-wrapper", onClick: function onClick() { // message.warning('暂时无法播放'); _this3.playAMR(); } }, /*#__PURE__*/_react.default.createElement("img", { className: "sound-img", src: this.state.playState ? __webpack_require__("XSR2") : __webpack_require__("s9W7") }), this.state.payload.second + '"'); } }]); }(_react.Component); /***/ }), /***/ "xkQS": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = _default; var _reactDom = _interopRequireDefault(__webpack_require__("O27J")); var _func = __webpack_require__("ZKAp"); var _api = __webpack_require__("H/Zg"); var _events = _interopRequireDefault(__webpack_require__("TLe5")); var _recordHistory = __webpack_require__("eXDv"); var _biz = __webpack_require__("Q3h8"); /** * 定义驻勤点信息信息窗体 - 高级版(不可与基础版弹框混用) * @param type:用于一张图 */ // 引入 EventEmitter function _default(data) { var _this = this; var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''; var marker = arguments.length > 2 ? arguments[2] : undefined; var _this$props = this.props, mapStyle = _this$props.mapStyle, securityResourceData = _this$props.securityResourceData, backStepInfo = _this$props.backStepInfo; var attendName = data.attendName, componey = data.componey, name = data.name, phone = data.phone, address = data.address, addressDetail = data.addressDetail, scope = data.scope, org = data.org, obj = data.obj, contract = data.contract, domainid = data.domainid, companyName = data.companyName; var that = this; var content = []; content.push("\n
    \n
    ".concat(attendName, "
    \n
    \n
    \n \u6240\u5C5E\u516C\u53F8\uFF1A").concat(componey, "\n
    \n
    \n \u8D1F\u8D23\u4EBA\u59D3\u540D\uFF1A").concat(name, "\n
    \n
    \n \u8D1F\u8D23\u4EBA\u7535\u8BDD\uFF1A").concat(phone, "\n
    \n
    \n \u9A7B\u52E4\u70B9\u7701\u5E02\u533A\uFF1A").concat(address, "\n
    \n
    \n \u9A7B\u52E4\u70B9\u8BE6\u7EC6\u5730\u70B9\uFF1A").concat(addressDetail, "\n
    \n
    \n \u6267\u52E4\u8303\u56F4\uFF08\u7C73\uFF09\uFF1A").concat(scope, "\n
    \n
    \n \u6240\u5C5E\u76D1\u7BA1\u673A\u6784\uFF1A").concat(org, "\n
    \n
    \n \u670D\u52A1\u5BF9\u8C61\u540D\u79F0\uFF1A").concat(obj, "\n
    \n
    \n \u5408\u540C\u72B6\u6001\uFF1A").concat(contract, "\n
    \n
    \n
    \n ")); content.join("
    "); var infoDiv = document.createElement("div"); infoDiv.className = mapStyle; var info = document.createElement("div"); info.className = "content-window-card-attend"; infoDiv.appendChild(info); // 定义内容 var middle = document.createElement("div"); middle.className = "info-middle"; middle.innerHTML = content; info.appendChild(middle); //定义2个轨迹服务按钮 var top = document.createElement("div"); top.className = "info-button"; var button = document.createElement("span"); button.className = "button"; button.style.margin = "0 10px 0 0"; button.innerHTML = "驻勤人员信息"; button.onclick = function () { if (type == 'police') { _this.clear('setPoliceSelectIndex'); marker.setContent('
    ' + marker.w.indexText + "
    "); } else { _this.clear('setPersonSelectIndex'); } _events.default.emit('initRightDataModule'); _this.props.dispatch({ type: 'command/clearInfoWindow', payload: true }); _this.props.dispatch({ type: 'command/setSelectComponeyInfo', payload: {} }); _this.props.dispatch({ type: 'command/setSelectAttendInfo', payload: data }); _this.props.dispatch({ type: "command/setMapLayerSwitchState", payload: { type: 'searchViews', value: false } }); }; var button1 = document.createElement("span"); button1.className = "button"; button1.innerHTML = "公司信息"; button1.onclick = function () { (0, _recordHistory.recordAdd)({ from: 'CreateAttendPointInfoWindow', to: 'ComponeyInfo', fromData: data, toID: domainid }); (0, _biz.showCompanyPointInfo)({ doMainId: domainid, success: function success(info) { that.props.dispatch({ type: 'command/setSelectComponeyInfo', payload: info }); } }); if (type == 'police') { _this.clear('setPoliceSelectIndex'); marker.setContent('
    ' + marker.w.indexText + "
    "); } else { _this.clear('setPersonSelectIndex'); } }; // 定义返回按钮 if (_recordHistory.recordHistory.length > 0) { var securityResourceParam = JSON.parse(JSON.stringify(securityResourceData)); var backBtn = document.createElement("span"); backBtn.className = "back-btn"; button.style.margin = "0 10px 0 0"; backBtn.innerHTML = "返回"; backBtn.onclick = function () { _events.default.emit('addPictueMarks', { data: { data: [] }, type: 'securityResource' }); _this.props.dispatch({ type: 'command/setSelectComponeyInfo', payload: {} }); _this.props.dispatch({ type: 'command/setSelectAttendInfo', payload: {} }); if (type == 'police') { _this.clear('setPoliceSelectIndex'); } else { _this.clear('setPersonSelectIndex'); } (0, _recordHistory.recordBack)({ from: 'AttendInfo', callback: function callback(result) { if (result.from == "CreateTrajectoryInfoWindow") { (0, _recordHistory.recordBack)({ from: result.from, callback: function callback(result) { var data = JSON.parse(JSON.stringify(result)); (0, _recordHistory.recordRemove)({ from: result.from, toID: result.toID }); (0, _recordHistory.recordTo)(data, that); } }); } else if (result.from == "ComprehensiveSearch") { var _data = JSON.parse(JSON.stringify(result)); (0, _recordHistory.recordRemove)({ from: result.from, toID: result.toID }); (0, _recordHistory.recordTo)(_data, that); } else if (result.from == "ComponeyInfo") { var _data2 = JSON.parse(JSON.stringify(result)); (0, _recordHistory.recordRemove)({ from: result.from, toID: result.toID }); (0, _recordHistory.recordTo)(_data2, that); } } }); }; info.appendChild(backBtn); } else { //定义关闭按钮 var detail = document.createElement("div"); detail.className = "close-div"; var a = document.createElement("a"); a.innerHTML = "x"; a.onclick = function () { // this.state.map.clearInfoWindow(); //因为police的图层的打点跟列表的选中,没有做更多处理,直接传选中点的信息在这更改,避免需要在生命周期中监听修改的麻烦 if (type == 'police') { _this.clear('setPoliceSelectIndex'); marker.setContent('
    ' + marker.w.indexText + "
    "); } else { _this.clear('setPersonSelectIndex'); } }; detail.appendChild(a); info.appendChild(detail); } top.appendChild(button); top.appendChild(button1); info.appendChild(top); // 定义底部内容 var bottom = document.createElement("div"); bottom.className = "info-bottom"; bottom.style.position = "relative"; bottom.style.top = "19px"; bottom.style.margin = "0 auto"; // var sharp = document.createElement("img"); // sharp.src = "https://webapi.amap.com/images/sharp.png"; var sharp = document.createElement("div"); sharp.className = "sharp"; bottom.appendChild(sharp); info.appendChild(bottom); return infoDiv; } /***/ }), /***/ "yEsh": /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _getPrototypeOf = __webpack_require__("Zx67"); var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); var _getOwnPropertyDescriptor = __webpack_require__("K6ED"); var _getOwnPropertyDescriptor2 = _interopRequireDefault(_getOwnPropertyDescriptor); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = (0, _getOwnPropertyDescriptor2.default)(object, property); if (desc === undefined) { var parent = (0, _getPrototypeOf2.default)(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } }; /***/ }), /***/ "yJB3": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAATpJREFUOE+tk7FKA0EQhv9ZL1hZiaVWKRRsfANBESx8higI6uYFJN5d1r0z+AK3KgiaZ7AQRME3sBFMkcqUYmUliTtyqyfxTBPW6YaZ+faf2RmCp1FeHx+adUs4AzCb+8zcqTA2lKp3c1+prNonXBHR/Pd7PcHY0U157QChNs9FcSGIgDSJZZT7kTYJA2FJbC+N5VwB4FLQChZrurl796XwdMWSvQEghvPSWNJoAKGdRnJzODlMzCUYtZGAA509EVx/FsAbgCkQttNIXrgWE7MFxvlPDBAM7hzF9QWnYF9l1YqgGrG4H7B9EQK3AKaDCSzl8cEHHgC8WovVgMQMk13uW24fq3rXAcrWUCeLglgG/N5wAJpsWSbTUnuP5dz/AXi34D3EUJvfezDuN/4BAGMvkt8qex+Tz0V/Arlk0BFP+x/3AAAAAElFTkSuQmCC" /***/ }), /***/ "yKxl": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAARCAYAAADUryzEAAAAAXNSR0IArs4c6QAAAhtJREFUOE+lkz9IlHEcxj+PR5epd0o1hORUg9FiNAT9WRwyqKEhFwNbQsqg8zKFhhxsCCq794IspCUhlxoaCrLBpQyCIJfwhpoMaajQ91WzC+8b7++6eu/FWvptv+/z/T3fh+/z/MR/Hrn3nZZoaOZ4jWhBGCUKfl6TUe50xjqooRVDJWNuaZ7HPNSaI0j32X2gu0qMOOnnNOHwrHVhPIiJHfc9nXIEqYx9k6iNNQz5nq78GnAZGI7iZqwGeW2qKLDY9IIVORjc1hc34JxtUZKXGK3RPt+Tygr6bFWwMQJO+0WOMKolV+u1hnSSZ8CBSo/B98BTbVlB1vIY54EZg/eCE4gXPnQ4HCYxDhk8EuwE2hC3/JwyZRdCFf22NUjxlXcovZ1xjC7EPgcarxET/ke62Y2lAjYHI/ocQr8JqnZgpqZ+2hZu6m1Yb7pgexZGmEGq3tXfCFIZuypxcc3YSwIlSrwx40aQ16V47io2DkgMAVMYHxBZYLYG9ocPSvAK2IWRQ+wA2s0YDvK6XrFxGaiLsM+uFWlfHtWnsFbfa9sSSaYcyZ+z4nuqXz8HMO2vcJgxrbj+HqtL1/E8amNYjuagKNgQS9pgKNE5lLUBGdeqcPgReEpWFDwBjkYbJM4u5nQ3rDVm7YwZd2ILfOp7Ola2sdcaUkl6BC3OW6OwOM+98Lc5vNMSjc2cNpWjbDAXFBkLk7p+DuJe/eP+E+VmyBLJ/dH1AAAAAElFTkSuQmCC" /***/ }), /***/ "yNbW": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /** * 数据大屏 */ var DataScreen = exports.default = /*#__PURE__*/function (_PureComponent) { function DataScreen(props) { var _this; (0, _classCallCheck2.default)(this, DataScreen); _this = _callSuper(this, DataScreen, [props]); _this.state = {}; return _this; } (0, _inherits2.default)(DataScreen, _PureComponent); return (0, _createClass2.default)(DataScreen, [{ key: "render", value: function render() { return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("iframe", { src: "https://viz.baidubce.com/prod/sharing/dashboard/39809ffd032fb53972fead264f0610c5", style: { width: "100%", height: 'calc(100vh - 54px)', border: 'none' } })); } }]); }(_react.PureComponent); /***/ }), /***/ "yNhk": /***/ (function(module, exports) { // mutationobserver-shim v0.3.3 (github.com/megawac/MutationObserver.js) // Authors: Graeme Yeates (github.com/megawac) /* Shim for MutationObserver interface Author: Graeme Yeates (github.com/megawac) Repository: https://github.com/megawac/MutationObserver.js License: WTFPL V2, 2004 (wtfpl.net). Though credit and staring the repo will make me feel pretty, you can modify and redistribute as you please. Attempts to follow spec (https://www.w3.org/TR/dom/#mutation-observers) as closely as possible for native javascript See https://github.com/WebKit/webkit/blob/master/Source/WebCore/dom/MutationObserver.cpp for current webkit source c++ implementation */ window.MutationObserver||(window.MutationObserver=function(y){function z(a){this.i=[];this.m=a}function K(a){(function c(){var d=a.takeRecords();d.length&&a.m(d,a);a.h=setTimeout(c,z._period)})()}function r(a){var b={type:null,target:null,addedNodes:[],removedNodes:[],previousSibling:null,nextSibling:null,attributeName:null,attributeNamespace:null,oldValue:null},c;for(c in a)b[c]!==y&&a[c]!==y&&(b[c]=a[c]);return b}function L(a,b){var c=E(a,b);return function(d){var f=d.length;b.a&&3===a.nodeType&& a.nodeValue!==c.a&&d.push(new r({type:"characterData",target:a,oldValue:c.a}));b.b&&c.b&&C(d,a,c.b,b.f);if(b.c||b.g)var m=M(d,a,c,b);if(m||d.length!==f)c=E(a,b)}}function N(a,b){return b.value}function O(a,b){return"style"!==b.name?b.value:a.style.cssText}function C(a,b,c,d){for(var f={},m=b.attributes,k,g,p=m.length;p--;)k=m[p],g=k.name,d&&d[g]===y||(F(b,k)!==c[g]&&a.push(r({type:"attributes",target:b,attributeName:g,oldValue:c[g],attributeNamespace:k.namespaceURI})),f[g]=!0);for(g in c)f[g]||a.push(r({target:b, type:"attributes",attributeName:g,oldValue:c[g]}))}function M(a,b,c,d){function f(g,p,t,q,x){var A=g.length-1;x=-~((A-x)/2);for(var h,l,e;e=g.pop();)h=t[e.j],l=q[e.l],d.c&&x&&Math.abs(e.j-e.l)>=A&&(a.push(r({type:"childList",target:p,addedNodes:[h],removedNodes:[h],nextSibling:h.nextSibling,previousSibling:h.previousSibling})),x--),d.b&&l.b&&C(a,h,l.b,d.f),d.a&&3===h.nodeType&&h.nodeValue!==l.a&&a.push(r({type:"characterData",target:h,oldValue:l.a})),d.g&&m(h,l)}function m(g,p){for(var t=g.childNodes, q=p.c,x=t.length,A=q?q.length:0,h,l,e,n,v,B=0,w=0,u=0;w} arr * @param {*} key * @returns {number} */ function getIndex(arr, key) { var result = -1; arr.some(function (entry, index) { if (entry[0] === key) { result = index; return true; } return false; }); return result; } return /** @class */ (function () { function class_1() { this.__entries__ = []; } Object.defineProperty(class_1.prototype, "size", { /** * @returns {boolean} */ get: function () { return this.__entries__.length; }, enumerable: true, configurable: true }); /** * @param {*} key * @returns {*} */ class_1.prototype.get = function (key) { var index = getIndex(this.__entries__, key); var entry = this.__entries__[index]; return entry && entry[1]; }; /** * @param {*} key * @param {*} value * @returns {void} */ class_1.prototype.set = function (key, value) { var index = getIndex(this.__entries__, key); if (~index) { this.__entries__[index][1] = value; } else { this.__entries__.push([key, value]); } }; /** * @param {*} key * @returns {void} */ class_1.prototype.delete = function (key) { var entries = this.__entries__; var index = getIndex(entries, key); if (~index) { entries.splice(index, 1); } }; /** * @param {*} key * @returns {void} */ class_1.prototype.has = function (key) { return !!~getIndex(this.__entries__, key); }; /** * @returns {void} */ class_1.prototype.clear = function () { this.__entries__.splice(0); }; /** * @param {Function} callback * @param {*} [ctx=null] * @returns {void} */ class_1.prototype.forEach = function (callback, ctx) { if (ctx === void 0) { ctx = null; } for (var _i = 0, _a = this.__entries__; _i < _a.length; _i++) { var entry = _a[_i]; callback.call(ctx, entry[1], entry[0]); } }; return class_1; }()); })(); /** * Detects whether window and document objects are available in current environment. */ var isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && window.document === document; // Returns global object of a current environment. var global$1 = (function () { if (typeof global !== 'undefined' && global.Math === Math) { return global; } if (typeof self !== 'undefined' && self.Math === Math) { return self; } if (typeof window !== 'undefined' && window.Math === Math) { return window; } // eslint-disable-next-line no-new-func return Function('return this')(); })(); /** * A shim for the requestAnimationFrame which falls back to the setTimeout if * first one is not supported. * * @returns {number} Requests' identifier. */ var requestAnimationFrame$1 = (function () { if (typeof requestAnimationFrame === 'function') { // It's required to use a bounded function because IE sometimes throws // an "Invalid calling object" error if rAF is invoked without the global // object on the left hand side. return requestAnimationFrame.bind(global$1); } return function (callback) { return setTimeout(function () { return callback(Date.now()); }, 1000 / 60); }; })(); // Defines minimum timeout before adding a trailing call. var trailingTimeout = 2; /** * Creates a wrapper function which ensures that provided callback will be * invoked only once during the specified delay period. * * @param {Function} callback - Function to be invoked after the delay period. * @param {number} delay - Delay after which to invoke callback. * @returns {Function} */ function throttle (callback, delay) { var leadingCall = false, trailingCall = false, lastCallTime = 0; /** * Invokes the original callback function and schedules new invocation if * the "proxy" was called during current request. * * @returns {void} */ function resolvePending() { if (leadingCall) { leadingCall = false; callback(); } if (trailingCall) { proxy(); } } /** * Callback invoked after the specified delay. It will further postpone * invocation of the original function delegating it to the * requestAnimationFrame. * * @returns {void} */ function timeoutCallback() { requestAnimationFrame$1(resolvePending); } /** * Schedules invocation of the original function. * * @returns {void} */ function proxy() { var timeStamp = Date.now(); if (leadingCall) { // Reject immediately following calls. if (timeStamp - lastCallTime < trailingTimeout) { return; } // Schedule new call to be in invoked when the pending one is resolved. // This is important for "transitions" which never actually start // immediately so there is a chance that we might miss one if change // happens amids the pending invocation. trailingCall = true; } else { leadingCall = true; trailingCall = false; setTimeout(timeoutCallback, delay); } lastCallTime = timeStamp; } return proxy; } // Minimum delay before invoking the update of observers. var REFRESH_DELAY = 20; // A list of substrings of CSS properties used to find transition events that // might affect dimensions of observed elements. var transitionKeys = ['top', 'right', 'bottom', 'left', 'width', 'height', 'size', 'weight']; // Check if MutationObserver is available. var mutationObserverSupported = typeof MutationObserver !== 'undefined'; /** * Singleton controller class which handles updates of ResizeObserver instances. */ var ResizeObserverController = /** @class */ (function () { /** * Creates a new instance of ResizeObserverController. * * @private */ function ResizeObserverController() { /** * Indicates whether DOM listeners have been added. * * @private {boolean} */ this.connected_ = false; /** * Tells that controller has subscribed for Mutation Events. * * @private {boolean} */ this.mutationEventsAdded_ = false; /** * Keeps reference to the instance of MutationObserver. * * @private {MutationObserver} */ this.mutationsObserver_ = null; /** * A list of connected observers. * * @private {Array} */ this.observers_ = []; this.onTransitionEnd_ = this.onTransitionEnd_.bind(this); this.refresh = throttle(this.refresh.bind(this), REFRESH_DELAY); } /** * Adds observer to observers list. * * @param {ResizeObserverSPI} observer - Observer to be added. * @returns {void} */ ResizeObserverController.prototype.addObserver = function (observer) { if (!~this.observers_.indexOf(observer)) { this.observers_.push(observer); } // Add listeners if they haven't been added yet. if (!this.connected_) { this.connect_(); } }; /** * Removes observer from observers list. * * @param {ResizeObserverSPI} observer - Observer to be removed. * @returns {void} */ ResizeObserverController.prototype.removeObserver = function (observer) { var observers = this.observers_; var index = observers.indexOf(observer); // Remove observer if it's present in registry. if (~index) { observers.splice(index, 1); } // Remove listeners if controller has no connected observers. if (!observers.length && this.connected_) { this.disconnect_(); } }; /** * Invokes the update of observers. It will continue running updates insofar * it detects changes. * * @returns {void} */ ResizeObserverController.prototype.refresh = function () { var changesDetected = this.updateObservers_(); // Continue running updates if changes have been detected as there might // be future ones caused by CSS transitions. if (changesDetected) { this.refresh(); } }; /** * Updates every observer from observers list and notifies them of queued * entries. * * @private * @returns {boolean} Returns "true" if any observer has detected changes in * dimensions of it's elements. */ ResizeObserverController.prototype.updateObservers_ = function () { // Collect observers that have active observations. var activeObservers = this.observers_.filter(function (observer) { return observer.gatherActive(), observer.hasActive(); }); // Deliver notifications in a separate cycle in order to avoid any // collisions between observers, e.g. when multiple instances of // ResizeObserver are tracking the same element and the callback of one // of them changes content dimensions of the observed target. Sometimes // this may result in notifications being blocked for the rest of observers. activeObservers.forEach(function (observer) { return observer.broadcastActive(); }); return activeObservers.length > 0; }; /** * Initializes DOM listeners. * * @private * @returns {void} */ ResizeObserverController.prototype.connect_ = function () { // Do nothing if running in a non-browser environment or if listeners // have been already added. if (!isBrowser || this.connected_) { return; } // Subscription to the "Transitionend" event is used as a workaround for // delayed transitions. This way it's possible to capture at least the // final state of an element. document.addEventListener('transitionend', this.onTransitionEnd_); window.addEventListener('resize', this.refresh); if (mutationObserverSupported) { this.mutationsObserver_ = new MutationObserver(this.refresh); this.mutationsObserver_.observe(document, { attributes: true, childList: true, characterData: true, subtree: true }); } else { document.addEventListener('DOMSubtreeModified', this.refresh); this.mutationEventsAdded_ = true; } this.connected_ = true; }; /** * Removes DOM listeners. * * @private * @returns {void} */ ResizeObserverController.prototype.disconnect_ = function () { // Do nothing if running in a non-browser environment or if listeners // have been already removed. if (!isBrowser || !this.connected_) { return; } document.removeEventListener('transitionend', this.onTransitionEnd_); window.removeEventListener('resize', this.refresh); if (this.mutationsObserver_) { this.mutationsObserver_.disconnect(); } if (this.mutationEventsAdded_) { document.removeEventListener('DOMSubtreeModified', this.refresh); } this.mutationsObserver_ = null; this.mutationEventsAdded_ = false; this.connected_ = false; }; /** * "Transitionend" event handler. * * @private * @param {TransitionEvent} event * @returns {void} */ ResizeObserverController.prototype.onTransitionEnd_ = function (_a) { var _b = _a.propertyName, propertyName = _b === void 0 ? '' : _b; // Detect whether transition may affect dimensions of an element. var isReflowProperty = transitionKeys.some(function (key) { return !!~propertyName.indexOf(key); }); if (isReflowProperty) { this.refresh(); } }; /** * Returns instance of the ResizeObserverController. * * @returns {ResizeObserverController} */ ResizeObserverController.getInstance = function () { if (!this.instance_) { this.instance_ = new ResizeObserverController(); } return this.instance_; }; /** * Holds reference to the controller's instance. * * @private {ResizeObserverController} */ ResizeObserverController.instance_ = null; return ResizeObserverController; }()); /** * Defines non-writable/enumerable properties of the provided target object. * * @param {Object} target - Object for which to define properties. * @param {Object} props - Properties to be defined. * @returns {Object} Target object. */ var defineConfigurable = (function (target, props) { for (var _i = 0, _a = Object.keys(props); _i < _a.length; _i++) { var key = _a[_i]; Object.defineProperty(target, key, { value: props[key], enumerable: false, writable: false, configurable: true }); } return target; }); /** * Returns the global object associated with provided element. * * @param {Object} target * @returns {Object} */ var getWindowOf = (function (target) { // Assume that the element is an instance of Node, which means that it // has the "ownerDocument" property from which we can retrieve a // corresponding global object. var ownerGlobal = target && target.ownerDocument && target.ownerDocument.defaultView; // Return the local global object if it's not possible extract one from // provided element. return ownerGlobal || global$1; }); // Placeholder of an empty content rectangle. var emptyRect = createRectInit(0, 0, 0, 0); /** * Converts provided string to a number. * * @param {number|string} value * @returns {number} */ function toFloat(value) { return parseFloat(value) || 0; } /** * Extracts borders size from provided styles. * * @param {CSSStyleDeclaration} styles * @param {...string} positions - Borders positions (top, right, ...) * @returns {number} */ function getBordersSize(styles) { var positions = []; for (var _i = 1; _i < arguments.length; _i++) { positions[_i - 1] = arguments[_i]; } return positions.reduce(function (size, position) { var value = styles['border-' + position + '-width']; return size + toFloat(value); }, 0); } /** * Extracts paddings sizes from provided styles. * * @param {CSSStyleDeclaration} styles * @returns {Object} Paddings box. */ function getPaddings(styles) { var positions = ['top', 'right', 'bottom', 'left']; var paddings = {}; for (var _i = 0, positions_1 = positions; _i < positions_1.length; _i++) { var position = positions_1[_i]; var value = styles['padding-' + position]; paddings[position] = toFloat(value); } return paddings; } /** * Calculates content rectangle of provided SVG element. * * @param {SVGGraphicsElement} target - Element content rectangle of which needs * to be calculated. * @returns {DOMRectInit} */ function getSVGContentRect(target) { var bbox = target.getBBox(); return createRectInit(0, 0, bbox.width, bbox.height); } /** * Calculates content rectangle of provided HTMLElement. * * @param {HTMLElement} target - Element for which to calculate the content rectangle. * @returns {DOMRectInit} */ function getHTMLElementContentRect(target) { // Client width & height properties can't be // used exclusively as they provide rounded values. var clientWidth = target.clientWidth, clientHeight = target.clientHeight; // By this condition we can catch all non-replaced inline, hidden and // detached elements. Though elements with width & height properties less // than 0.5 will be discarded as well. // // Without it we would need to implement separate methods for each of // those cases and it's not possible to perform a precise and performance // effective test for hidden elements. E.g. even jQuery's ':visible' filter // gives wrong results for elements with width & height less than 0.5. if (!clientWidth && !clientHeight) { return emptyRect; } var styles = getWindowOf(target).getComputedStyle(target); var paddings = getPaddings(styles); var horizPad = paddings.left + paddings.right; var vertPad = paddings.top + paddings.bottom; // Computed styles of width & height are being used because they are the // only dimensions available to JS that contain non-rounded values. It could // be possible to utilize the getBoundingClientRect if only it's data wasn't // affected by CSS transformations let alone paddings, borders and scroll bars. var width = toFloat(styles.width), height = toFloat(styles.height); // Width & height include paddings and borders when the 'border-box' box // model is applied (except for IE). if (styles.boxSizing === 'border-box') { // Following conditions are required to handle Internet Explorer which // doesn't include paddings and borders to computed CSS dimensions. // // We can say that if CSS dimensions + paddings are equal to the "client" // properties then it's either IE, and thus we don't need to subtract // anything, or an element merely doesn't have paddings/borders styles. if (Math.round(width + horizPad) !== clientWidth) { width -= getBordersSize(styles, 'left', 'right') + horizPad; } if (Math.round(height + vertPad) !== clientHeight) { height -= getBordersSize(styles, 'top', 'bottom') + vertPad; } } // Following steps can't be applied to the document's root element as its // client[Width/Height] properties represent viewport area of the window. // Besides, it's as well not necessary as the itself neither has // rendered scroll bars nor it can be clipped. if (!isDocumentElement(target)) { // In some browsers (only in Firefox, actually) CSS width & height // include scroll bars size which can be removed at this step as scroll // bars are the only difference between rounded dimensions + paddings // and "client" properties, though that is not always true in Chrome. var vertScrollbar = Math.round(width + horizPad) - clientWidth; var horizScrollbar = Math.round(height + vertPad) - clientHeight; // Chrome has a rather weird rounding of "client" properties. // E.g. for an element with content width of 314.2px it sometimes gives // the client width of 315px and for the width of 314.7px it may give // 314px. And it doesn't happen all the time. So just ignore this delta // as a non-relevant. if (Math.abs(vertScrollbar) !== 1) { width -= vertScrollbar; } if (Math.abs(horizScrollbar) !== 1) { height -= horizScrollbar; } } return createRectInit(paddings.left, paddings.top, width, height); } /** * Checks whether provided element is an instance of the SVGGraphicsElement. * * @param {Element} target - Element to be checked. * @returns {boolean} */ var isSVGGraphicsElement = (function () { // Some browsers, namely IE and Edge, don't have the SVGGraphicsElement // interface. if (typeof SVGGraphicsElement !== 'undefined') { return function (target) { return target instanceof getWindowOf(target).SVGGraphicsElement; }; } // If it's so, then check that element is at least an instance of the // SVGElement and that it has the "getBBox" method. // eslint-disable-next-line no-extra-parens return function (target) { return (target instanceof getWindowOf(target).SVGElement && typeof target.getBBox === 'function'); }; })(); /** * Checks whether provided element is a document element (). * * @param {Element} target - Element to be checked. * @returns {boolean} */ function isDocumentElement(target) { return target === getWindowOf(target).document.documentElement; } /** * Calculates an appropriate content rectangle for provided html or svg element. * * @param {Element} target - Element content rectangle of which needs to be calculated. * @returns {DOMRectInit} */ function getContentRect(target) { if (!isBrowser) { return emptyRect; } if (isSVGGraphicsElement(target)) { return getSVGContentRect(target); } return getHTMLElementContentRect(target); } /** * Creates rectangle with an interface of the DOMRectReadOnly. * Spec: https://drafts.fxtf.org/geometry/#domrectreadonly * * @param {DOMRectInit} rectInit - Object with rectangle's x/y coordinates and dimensions. * @returns {DOMRectReadOnly} */ function createReadOnlyRect(_a) { var x = _a.x, y = _a.y, width = _a.width, height = _a.height; // If DOMRectReadOnly is available use it as a prototype for the rectangle. var Constr = typeof DOMRectReadOnly !== 'undefined' ? DOMRectReadOnly : Object; var rect = Object.create(Constr.prototype); // Rectangle's properties are not writable and non-enumerable. defineConfigurable(rect, { x: x, y: y, width: width, height: height, top: y, right: x + width, bottom: height + y, left: x }); return rect; } /** * Creates DOMRectInit object based on the provided dimensions and the x/y coordinates. * Spec: https://drafts.fxtf.org/geometry/#dictdef-domrectinit * * @param {number} x - X coordinate. * @param {number} y - Y coordinate. * @param {number} width - Rectangle's width. * @param {number} height - Rectangle's height. * @returns {DOMRectInit} */ function createRectInit(x, y, width, height) { return { x: x, y: y, width: width, height: height }; } /** * Class that is responsible for computations of the content rectangle of * provided DOM element and for keeping track of it's changes. */ var ResizeObservation = /** @class */ (function () { /** * Creates an instance of ResizeObservation. * * @param {Element} target - Element to be observed. */ function ResizeObservation(target) { /** * Broadcasted width of content rectangle. * * @type {number} */ this.broadcastWidth = 0; /** * Broadcasted height of content rectangle. * * @type {number} */ this.broadcastHeight = 0; /** * Reference to the last observed content rectangle. * * @private {DOMRectInit} */ this.contentRect_ = createRectInit(0, 0, 0, 0); this.target = target; } /** * Updates content rectangle and tells whether it's width or height properties * have changed since the last broadcast. * * @returns {boolean} */ ResizeObservation.prototype.isActive = function () { var rect = getContentRect(this.target); this.contentRect_ = rect; return (rect.width !== this.broadcastWidth || rect.height !== this.broadcastHeight); }; /** * Updates 'broadcastWidth' and 'broadcastHeight' properties with a data * from the corresponding properties of the last observed content rectangle. * * @returns {DOMRectInit} Last observed content rectangle. */ ResizeObservation.prototype.broadcastRect = function () { var rect = this.contentRect_; this.broadcastWidth = rect.width; this.broadcastHeight = rect.height; return rect; }; return ResizeObservation; }()); var ResizeObserverEntry = /** @class */ (function () { /** * Creates an instance of ResizeObserverEntry. * * @param {Element} target - Element that is being observed. * @param {DOMRectInit} rectInit - Data of the element's content rectangle. */ function ResizeObserverEntry(target, rectInit) { var contentRect = createReadOnlyRect(rectInit); // According to the specification following properties are not writable // and are also not enumerable in the native implementation. // // Property accessors are not being used as they'd require to define a // private WeakMap storage which may cause memory leaks in browsers that // don't support this type of collections. defineConfigurable(this, { target: target, contentRect: contentRect }); } return ResizeObserverEntry; }()); var ResizeObserverSPI = /** @class */ (function () { /** * Creates a new instance of ResizeObserver. * * @param {ResizeObserverCallback} callback - Callback function that is invoked * when one of the observed elements changes it's content dimensions. * @param {ResizeObserverController} controller - Controller instance which * is responsible for the updates of observer. * @param {ResizeObserver} callbackCtx - Reference to the public * ResizeObserver instance which will be passed to callback function. */ function ResizeObserverSPI(callback, controller, callbackCtx) { /** * Collection of resize observations that have detected changes in dimensions * of elements. * * @private {Array} */ this.activeObservations_ = []; /** * Registry of the ResizeObservation instances. * * @private {Map} */ this.observations_ = new MapShim(); if (typeof callback !== 'function') { throw new TypeError('The callback provided as parameter 1 is not a function.'); } this.callback_ = callback; this.controller_ = controller; this.callbackCtx_ = callbackCtx; } /** * Starts observing provided element. * * @param {Element} target - Element to be observed. * @returns {void} */ ResizeObserverSPI.prototype.observe = function (target) { if (!arguments.length) { throw new TypeError('1 argument required, but only 0 present.'); } // Do nothing if current environment doesn't have the Element interface. if (typeof Element === 'undefined' || !(Element instanceof Object)) { return; } if (!(target instanceof getWindowOf(target).Element)) { throw new TypeError('parameter 1 is not of type "Element".'); } var observations = this.observations_; // Do nothing if element is already being observed. if (observations.has(target)) { return; } observations.set(target, new ResizeObservation(target)); this.controller_.addObserver(this); // Force the update of observations. this.controller_.refresh(); }; /** * Stops observing provided element. * * @param {Element} target - Element to stop observing. * @returns {void} */ ResizeObserverSPI.prototype.unobserve = function (target) { if (!arguments.length) { throw new TypeError('1 argument required, but only 0 present.'); } // Do nothing if current environment doesn't have the Element interface. if (typeof Element === 'undefined' || !(Element instanceof Object)) { return; } if (!(target instanceof getWindowOf(target).Element)) { throw new TypeError('parameter 1 is not of type "Element".'); } var observations = this.observations_; // Do nothing if element is not being observed. if (!observations.has(target)) { return; } observations.delete(target); if (!observations.size) { this.controller_.removeObserver(this); } }; /** * Stops observing all elements. * * @returns {void} */ ResizeObserverSPI.prototype.disconnect = function () { this.clearActive(); this.observations_.clear(); this.controller_.removeObserver(this); }; /** * Collects observation instances the associated element of which has changed * it's content rectangle. * * @returns {void} */ ResizeObserverSPI.prototype.gatherActive = function () { var _this = this; this.clearActive(); this.observations_.forEach(function (observation) { if (observation.isActive()) { _this.activeObservations_.push(observation); } }); }; /** * Invokes initial callback function with a list of ResizeObserverEntry * instances collected from active resize observations. * * @returns {void} */ ResizeObserverSPI.prototype.broadcastActive = function () { // Do nothing if observer doesn't have active observations. if (!this.hasActive()) { return; } var ctx = this.callbackCtx_; // Create ResizeObserverEntry instance for every active observation. var entries = this.activeObservations_.map(function (observation) { return new ResizeObserverEntry(observation.target, observation.broadcastRect()); }); this.callback_.call(ctx, entries, ctx); this.clearActive(); }; /** * Clears the collection of active observations. * * @returns {void} */ ResizeObserverSPI.prototype.clearActive = function () { this.activeObservations_.splice(0); }; /** * Tells whether observer has active observations. * * @returns {boolean} */ ResizeObserverSPI.prototype.hasActive = function () { return this.activeObservations_.length > 0; }; return ResizeObserverSPI; }()); // Registry of internal observers. If WeakMap is not available use current shim // for the Map collection as it has all required methods and because WeakMap // can't be fully polyfilled anyway. var observers = typeof WeakMap !== 'undefined' ? new WeakMap() : new MapShim(); /** * ResizeObserver API. Encapsulates the ResizeObserver SPI implementation * exposing only those methods and properties that are defined in the spec. */ var ResizeObserver = /** @class */ (function () { /** * Creates a new instance of ResizeObserver. * * @param {ResizeObserverCallback} callback - Callback that is invoked when * dimensions of the observed elements change. */ function ResizeObserver(callback) { if (!(this instanceof ResizeObserver)) { throw new TypeError('Cannot call a class as a function.'); } if (!arguments.length) { throw new TypeError('1 argument required, but only 0 present.'); } var controller = ResizeObserverController.getInstance(); var observer = new ResizeObserverSPI(callback, controller, this); observers.set(this, observer); } return ResizeObserver; }()); // Expose public methods of ResizeObserver. [ 'observe', 'unobserve', 'disconnect' ].forEach(function (method) { ResizeObserver.prototype[method] = function () { var _a; return (_a = observers.get(this))[method].apply(_a, arguments); }; }); var index = (function () { // Export existing implementation if available. if (typeof global$1.ResizeObserver !== 'undefined') { return global$1.ResizeObserver; } return ResizeObserver; })(); /* harmony default export */ __webpack_exports__["default"] = (index); /* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__("DuR2"))) /***/ }), /***/ "z//q": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["p"] = warnOnlyTreeNode; /* harmony export (immutable) */ __webpack_exports__["b"] = arrDel; /* harmony export (immutable) */ __webpack_exports__["a"] = arrAdd; /* harmony export (immutable) */ __webpack_exports__["o"] = posToArr; /* harmony export (immutable) */ __webpack_exports__["l"] = getPosition; /* unused harmony export isTreeNode */ /* harmony export (immutable) */ __webpack_exports__["k"] = getNodeChildren; /* unused harmony export isCheckDisabled */ /* unused harmony export traverseTreeNodes */ /* harmony export (immutable) */ __webpack_exports__["m"] = mapChildren; /* harmony export (immutable) */ __webpack_exports__["j"] = getDragNodesKeys; /* harmony export (immutable) */ __webpack_exports__["c"] = calcDropPosition; /* harmony export (immutable) */ __webpack_exports__["d"] = calcSelectedKeys; /* harmony export (immutable) */ __webpack_exports__["g"] = convertDataToTree; /* harmony export (immutable) */ __webpack_exports__["h"] = convertTreeToEntities; /* harmony export (immutable) */ __webpack_exports__["n"] = parseCheckedKeys; /* harmony export (immutable) */ __webpack_exports__["e"] = conductCheck; /* harmony export (immutable) */ __webpack_exports__["f"] = conductExpandParent; /* harmony export (immutable) */ __webpack_exports__["i"] = getDataAndAria; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__("GiK3"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_rc_util_es_Children_toArray__ = __webpack_require__("7fBz"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_warning__ = __webpack_require__("Trj0"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_warning__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__TreeNode__ = __webpack_require__("8FQI"); function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } var DRAG_SIDE_RANGE = 0.25; var DRAG_MIN_GAP = 2; var onlyTreeNodeWarned = false; function warnOnlyTreeNode() { if (onlyTreeNodeWarned) return; onlyTreeNodeWarned = true; __WEBPACK_IMPORTED_MODULE_2_warning___default()(false, 'Tree only accept TreeNode as children.'); } function arrDel(list, value) { var clone = list.slice(); var index = clone.indexOf(value); if (index >= 0) { clone.splice(index, 1); } return clone; } function arrAdd(list, value) { var clone = list.slice(); if (clone.indexOf(value) === -1) { clone.push(value); } return clone; } function posToArr(pos) { return pos.split('-'); } function getPosition(level, index) { return "".concat(level, "-").concat(index); } function isTreeNode(node) { return node && node.type && node.type.isTreeNode; } function getNodeChildren(children) { return Object(__WEBPACK_IMPORTED_MODULE_1_rc_util_es_Children_toArray__["a" /* default */])(children).filter(isTreeNode); } function isCheckDisabled(node) { var _ref = node.props || {}, disabled = _ref.disabled, disableCheckbox = _ref.disableCheckbox, checkable = _ref.checkable; return !!(disabled || disableCheckbox) || checkable === false; } function traverseTreeNodes(treeNodes, callback) { function processNode(node, index, parent) { var children = node ? node.props.children : treeNodes; var pos = node ? getPosition(parent.pos, index) : 0; // Filter children var childList = getNodeChildren(children); // Process node if is not root if (node) { var data = { node: node, index: index, pos: pos, key: node.key || pos, parentPos: parent.node ? parent.pos : null }; callback(data); } // Process children node __WEBPACK_IMPORTED_MODULE_0_react__["Children"].forEach(childList, function (subNode, subIndex) { processNode(subNode, subIndex, { node: node, pos: pos }); }); } processNode(null); } /** * Use `rc-util` `toArray` to get the children list which keeps the key. * And return single node if children is only one(This can avoid `key` missing check). */ function mapChildren(children, func) { var list = Object(__WEBPACK_IMPORTED_MODULE_1_rc_util_es_Children_toArray__["a" /* default */])(children).map(func); if (list.length === 1) { return list[0]; } return list; } function getDragNodesKeys(treeNodes, node) { var _node$props = node.props, eventKey = _node$props.eventKey, pos = _node$props.pos; var dragNodesKeys = []; traverseTreeNodes(treeNodes, function (_ref2) { var key = _ref2.key; dragNodesKeys.push(key); }); dragNodesKeys.push(eventKey || pos); return dragNodesKeys; } // Only used when drag, not affect SSR. function calcDropPosition(event, treeNode) { var clientY = event.clientY; var _treeNode$selectHandl = treeNode.selectHandle.getBoundingClientRect(), top = _treeNode$selectHandl.top, bottom = _treeNode$selectHandl.bottom, height = _treeNode$selectHandl.height; var des = Math.max(height * DRAG_SIDE_RANGE, DRAG_MIN_GAP); if (clientY <= top + des) { return -1; } if (clientY >= bottom - des) { return 1; } return 0; } /** * Return selectedKeys according with multiple prop * @param selectedKeys * @param props * @returns [string] */ function calcSelectedKeys(selectedKeys, props) { if (!selectedKeys) return undefined; var multiple = props.multiple; if (multiple) { return selectedKeys.slice(); } if (selectedKeys.length) { return [selectedKeys[0]]; } return selectedKeys; } /** * Since React internal will convert key to string, * we need do this to avoid `checkStrictly` use number match */ function keyListToString(keyList) { if (!keyList) return keyList; return keyList.map(function (key) { return String(key); }); } var internalProcessProps = function internalProcessProps(props) { return props; }; function convertDataToTree(treeData, processor) { if (!treeData) return []; var _ref3 = processor || {}, _ref3$processProps = _ref3.processProps, processProps = _ref3$processProps === void 0 ? internalProcessProps : _ref3$processProps; var list = Array.isArray(treeData) ? treeData : [treeData]; return list.map(function (_ref4) { var children = _ref4.children, props = _objectWithoutProperties(_ref4, ["children"]); var childrenNodes = convertDataToTree(children, processor); return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__TreeNode__["a" /* default */], Object.assign({}, processProps(props)), childrenNodes); }); } /** * Calculate treeNodes entities. `processTreeEntity` is used for `rc-tree-select` * @param treeNodes * @param processTreeEntity User can customize the entity */ function convertTreeToEntities(treeNodes) { var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, initWrapper = _ref5.initWrapper, processEntity = _ref5.processEntity, onProcessFinished = _ref5.onProcessFinished; var posEntities = {}; var keyEntities = {}; var wrapper = { posEntities: posEntities, keyEntities: keyEntities }; if (initWrapper) { wrapper = initWrapper(wrapper) || wrapper; } traverseTreeNodes(treeNodes, function (item) { var node = item.node, index = item.index, pos = item.pos, key = item.key, parentPos = item.parentPos; var entity = { node: node, index: index, key: key, pos: pos }; posEntities[pos] = entity; keyEntities[key] = entity; // Fill children entity.parent = posEntities[parentPos]; if (entity.parent) { entity.parent.children = entity.parent.children || []; entity.parent.children.push(entity); } if (processEntity) { processEntity(entity, wrapper); } }); if (onProcessFinished) { onProcessFinished(wrapper); } return wrapper; } /** * Parse `checkedKeys` to { checkedKeys, halfCheckedKeys } style */ function parseCheckedKeys(keys) { if (!keys) { return null; } // Convert keys to object format var keyProps; if (Array.isArray(keys)) { // [Legacy] Follow the api doc keyProps = { checkedKeys: keys, halfCheckedKeys: undefined }; } else if (_typeof(keys) === 'object') { keyProps = { checkedKeys: keys.checked || undefined, halfCheckedKeys: keys.halfChecked || undefined }; } else { __WEBPACK_IMPORTED_MODULE_2_warning___default()(false, '`checkedKeys` is not an array or an object'); return null; } keyProps.checkedKeys = keyListToString(keyProps.checkedKeys); keyProps.halfCheckedKeys = keyListToString(keyProps.halfCheckedKeys); return keyProps; } /** * Conduct check state by the keyList. It will conduct up & from the provided key. * If the conduct path reach the disabled or already checked / unchecked node will stop conduct. */ function conductCheck( /** list of keys */ keyList, /** is check the node or not */ isCheck, /** parsed by `convertTreeToEntities` function in Tree */ keyEntities) { var checkStatus = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; var checkedKeys = {}; var halfCheckedKeys = {}; // Record the key has some child checked (include child half checked) (checkStatus.checkedKeys || []).forEach(function (key) { checkedKeys[key] = true; }); (checkStatus.halfCheckedKeys || []).forEach(function (key) { halfCheckedKeys[key] = true; }); // Conduct up function conductUp(key) { if (checkedKeys[key] === isCheck) return; var entity = keyEntities[key]; if (!entity) return; var children = entity.children, parent = entity.parent, node = entity.node; if (isCheckDisabled(node)) return; // Check child node checked status var everyChildChecked = true; var someChildChecked = false; // Child checked or half checked (children || []).filter(function (child) { return !isCheckDisabled(child.node); }).forEach(function (_ref6) { var childKey = _ref6.key; var childChecked = checkedKeys[childKey]; var childHalfChecked = halfCheckedKeys[childKey]; if (childChecked || childHalfChecked) someChildChecked = true; if (!childChecked) everyChildChecked = false; }); // Update checked status if (isCheck) { checkedKeys[key] = everyChildChecked; } else { checkedKeys[key] = false; } halfCheckedKeys[key] = someChildChecked; if (parent) { conductUp(parent.key); } } // Conduct down function conductDown(key) { if (checkedKeys[key] === isCheck) return; var entity = keyEntities[key]; if (!entity) return; var children = entity.children, node = entity.node; if (isCheckDisabled(node)) return; checkedKeys[key] = isCheck; (children || []).forEach(function (child) { conductDown(child.key); }); } function conduct(key) { var entity = keyEntities[key]; if (!entity) { __WEBPACK_IMPORTED_MODULE_2_warning___default()(false, "'".concat(key, "' does not exist in the tree.")); return; } var children = entity.children, parent = entity.parent, node = entity.node; checkedKeys[key] = isCheck; if (isCheckDisabled(node)) return; // Conduct down (children || []).filter(function (child) { return !isCheckDisabled(child.node); }).forEach(function (child) { conductDown(child.key); }); // Conduct up if (parent) { conductUp(parent.key); } } (keyList || []).forEach(function (key) { conduct(key); }); var checkedKeyList = []; var halfCheckedKeyList = []; // Fill checked list Object.keys(checkedKeys).forEach(function (key) { if (checkedKeys[key]) { checkedKeyList.push(key); } }); // Fill half checked list Object.keys(halfCheckedKeys).forEach(function (key) { if (!checkedKeys[key] && halfCheckedKeys[key]) { halfCheckedKeyList.push(key); } }); return { checkedKeys: checkedKeyList, halfCheckedKeys: halfCheckedKeyList }; } /** * If user use `autoExpandParent` we should get the list of parent node * @param keyList * @param keyEntities */ function conductExpandParent(keyList, keyEntities) { var expandedKeys = {}; function conductUp(key) { if (expandedKeys[key]) return; var entity = keyEntities[key]; if (!entity) return; expandedKeys[key] = true; var parent = entity.parent, node = entity.node; if (node.props && node.props.disabled) return; if (parent) { conductUp(parent.key); } } (keyList || []).forEach(function (key) { conductUp(key); }); return Object.keys(expandedKeys); } /** * Returns only the data- and aria- key/value pairs */ function getDataAndAria(props) { return Object.keys(props).reduce(function (prev, key) { if (key.substr(0, 5) === 'data-' || key.substr(0, 5) === 'aria-') { prev[key] = props[key]; } return prev; }, {}); } /***/ }), /***/ "z9Xj": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAARCAYAAADUryzEAAAAAXNSR0IArs4c6QAAAeBJREFUOE+dlL1r1EEQhp93f5dE0Fws7IxgtPODNFYWghFEU4gIotHESsVCPa+KkhQ2h1pYRESCIoEgfhTaJoUxYOUfYMDCIIh2giZRUHK/fWXDnYbzDJopdmFn5mF25t0VNes4765YYK+gWD9rthvmQ5Xpudt6l/xKS3vJFcEgIlsp+ZfP5IYbCyMaUnvJZyTu/lNiQ5DNWRUv+TWwfTUAYCYBFoHCKgHVBHBDcsUZk+TkgscO9GXwLZo2oIw5vjy+GWAEuCAYNmwiMG4zKrPFgV1EpgSddUgzQPJdjJHpEHhO4HAN0I04iTkGHGoEpLFEQUvN8Qm4utTc3xV0A70Sgza7gQBk9QomgIMYxwI7QuQWZszQo8A9zDnEfICxPPJK0IqZRBxYAoRAT4w8A9Yj3mCeAF1AP+KOI+8FmxEDSXfAlxA4EiMv6hU8UoEhLzKA6AW2AWtsbtYUmhS7ACTNTKjAA1epAH0JUE13MXyUuG8z2ZIzk68lm7uuz8WyS4q0trQx+uM7OxXYbzgt2AjkCfAW2NqoUsQskX6Lp8CGWoNT45bbrDrKvmxz7S9KTCqtT+aPEIkr4qizYifjmBP/JWfxcP4Dp5aec7J1Je8JgX145f8gjTNGpr6O6GXK+wlm9Lg/UmOnSwAAAABJRU5ErkJggg==" /***/ }), /***/ "zGZ6": /***/ (function(module, exports, __webpack_require__) { var MapCache = __webpack_require__("YeCl"); /** Error message constants. */ var FUNC_ERROR_TEXT = 'Expected a function'; /** * Creates a function that memoizes the result of `func`. If `resolver` is * provided, it determines the cache key for storing the result based on the * arguments provided to the memoized function. By default, the first argument * provided to the memoized function is used as the map cache key. The `func` * is invoked with the `this` binding of the memoized function. * * **Note:** The cache is exposed as the `cache` property on the memoized * function. Its creation may be customized by replacing the `_.memoize.Cache` * constructor with one whose instances implement the * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) * method interface of `clear`, `delete`, `get`, `has`, and `set`. * * @static * @memberOf _ * @since 0.1.0 * @category Function * @param {Function} func The function to have its output memoized. * @param {Function} [resolver] The function to resolve the cache key. * @returns {Function} Returns the new memoized function. * @example * * var object = { 'a': 1, 'b': 2 }; * var other = { 'c': 3, 'd': 4 }; * * var values = _.memoize(_.values); * values(object); * // => [1, 2] * * values(other); * // => [3, 4] * * object.a = 2; * values(object); * // => [1, 2] * * // Modify the result cache. * values.cache.set(object, ['a', 'b']); * values(object); * // => ['a', 'b'] * * // Replace `_.memoize.Cache`. * _.memoize.Cache = WeakMap; */ function memoize(func, resolver) { if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) { throw new TypeError(FUNC_ERROR_TEXT); } var memoized = function() { var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache; if (cache.has(key)) { return cache.get(key); } var result = func.apply(this, args); memoized.cache = cache.set(key, result) || cache; return result; }; memoized.cache = new (memoize.Cache || MapCache); return memoized; } // Expose `MapCache`. memoize.Cache = MapCache; module.exports = memoize; /***/ }), /***/ "zGZP": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; __webpack_require__("baa2"); var _icon = _interopRequireDefault(__webpack_require__("FC3+")); var _readOnlyError2 = _interopRequireDefault(__webpack_require__("LhfW")); var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); __webpack_require__("11Jr"); var _decodeText = __webpack_require__("wUgD"); function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /** * IM可视化视图 */ var FileElement = exports.default = /*#__PURE__*/function (_Component) { function FileElement(props) { var _this; (0, _classCallCheck2.default)(this, FileElement); _this = _callSuper(this, FileElement, [props]); _this.state = { // isMine: props.isMine, payload: props.payload }; return _this; } (0, _inherits2.default)(FileElement, _Component); return (0, _createClass2.default)(FileElement, [{ key: "componentDidMount", value: function componentDidMount() {} }, { key: "componentWillReceiveProps", value: function componentWillReceiveProps(nextProps) { this.setState({ // isMine: nextProps.isMine, payload: nextProps.payload }); } }, { key: "downloadFile", value: function downloadFile() { var _this2 = this; // 浏览器支持fetch则用blob下载,避免浏览器点击a标签,跳转到新页面预览的行为 if (window.fetch) { fetch(this.state.payload.fileUrl).then(function (res) { return res.blob(); }).then(function (blob) { var a = document.createElement('a'); var url = window.URL.createObjectURL(blob); a.href = url; a.download = _this2.state.payload.fileName; a.click(); }); } else { var a = document.createElement('a'); a.href = this.state.payload.fileUrl; a.target = '_blank'; a.download = this.state.payload.filename; a.click(); } } }, { key: "size", value: function size() { var size = this.state.payload.fileSize; if (size > 1024) { if (size / 1024 > 1024) { return "".concat(this.toFixed(size / 1024 / 1024), " Mb"); } return "".concat(this.toFixed(size / 1024), " Kb"); } return "".concat(this.toFixed(size), "B"); } }, { key: "toFixed", value: function toFixed(number) { var precision = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2; return number.toFixed(precision); } }, { key: "render", value: function render() { var _this3 = this; return /*#__PURE__*/_react.default.createElement("div", { className: "file-element-wrapper" }, /*#__PURE__*/_react.default.createElement("div", { className: "header" }, /*#__PURE__*/_react.default.createElement(_icon.default, { type: "file", className: "file-icon" }), /*#__PURE__*/_react.default.createElement("div", { className: "file-element" }, /*#__PURE__*/_react.default.createElement("span", { className: "file-name" }, this.state.payload.fileName), /*#__PURE__*/_react.default.createElement("span", { className: "file-size" }, this.size()))), /*#__PURE__*/_react.default.createElement("div", { className: "footer" }, /*#__PURE__*/_react.default.createElement("span", { onClick: function onClick() { _this3.downloadFile(); }, className: "download-link" }, "\u4E0B\u8F7D"))); } }]); }(_react.Component); /***/ }), /***/ "zHKS": /***/ (function(module, exports) { module.exports = "data:image/png;base64,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" /***/ }), /***/ "zHum": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAiCAYAAAC0nUK+AAAAAXNSR0IArs4c6QAABO9JREFUSA2tVn1sU1UUP+e915Z27OuVLTDJEsRoQJyJW5ChjpTq1ERJTKaDuBiJEbdE94fiPmqMM2FjjR+RmIiyRJQgLhLwY4nTso/AiNPAjDE6TUSNAaZz0pZ2K91r37ve89rXvpaOFcL5o+fec37nd+8799xzi3AFqe8N1MU17WEA5kIGFQDoZMj8fHwOBDwuovDF1+0lY4jckkMwhw3c3QEXgNbLgK3P5TfbEOEUMLF9+KXSUbOdxhnkXYwJJ3Zf6AYGHeQsKxTAvc4KG26yQkWpCEV2hNAlBlMBFb49o8DwTwrMhDWCciJ87R6P3NGFmDDoNt3FP5wxvHe3/xOuGywiwPZNDnikZglYpYz1k+iEUuIMPj0dhf3HIxBTiQ2P1nXKjxoLcJqEnLS1vsqJW0ocCN5tReBaawNRSBMH5hj0fD4LNTdawWZJ2Mm/bqUF7lhlgfHfFIjG2JqzY/PSHyPeEWLVUfW9FzbGNThpERi+2VQEa2+wJJdMqNFJBd72zcHFiAbFDgGa3Q6ov82WgZk8H4PnD4YgpiHjKdo07JHHBEKoGuN5ZkipMBPTbl85EoZdn4V1YsLSAt6BWdh5KATnA6n06nEUTzw8A7sIi/d5gzVqPH6KDu9AS0kqxyM/J3YbupQmoACz0Hk03WWHxlo7SHybdAZP7A0mDlmCOwVNVXkdg14V5sNz3WqFprvtqfyaSWks8BpsWG+HrUlislE8VRcJxvEhgVe/myZUbob8HdT0/L1zbA7mYznvB2iMwaFvIvDchxfhnD/9dQYP8Qr8blUSKdWxIeEogyfrHFC9Kr2g4TPrFSUiPOMugIiS3kCKB6FSAGTlFEAXxJCbl4twe6UEpQUIwx6nbs6l7VbUcYQ3xOBBYGUCMJwjB9286yEpHs5LpThNpHSlr4cYPLzYp9Dd899BfjaPb61dAk+7CnR+qu+GPf681/qq3QnUMkj6RuegfzzKb6dwgOdcGCQjNSGqU5L2/pCu8/1p+ziBp3ji0QXZgGQtYAPzsxjg3a2UmlDjBjvse6o4X94MHMXrXRJhRrTIg8JgqzPEK+YNQlF3ox5xLUJxFJ8Q7PG9mDhQkCTnW7zZ/EJt8+XD4ategIgpjuJ5QX9vWyrvpUVSxf2AN3SLoir8VYHCa+3nvCP8K9qwxveC82wGOU029/ofRI0N8K6mn/3VvUQQERE2+zzLviMuktTOE1MA/hrt0DTtPWOen8Y4iLhlpEPWK8+I0fu5MSE91Cnv48/V62bbYmP+IO3IJqaYy8jJWFcrd/K/C+M0XlQQ+4Y8zv25cDnJu1wYt1mFbTxrwVxBho1v4MfKFXKrMc/WOckJ9OXO0r9QwGezA4w5r4x5ESyNH2zHqGHL1guSE3C4U/6I7+5YdpA+R+z2eYp+zelLGq9IThirJLZwlbE7unDyatmb5FhQLUo+2FbyO38we80Moig0H34Mkx3K7MkcX1bnZnd1dbUjFovJULymfNn9e3yAkpMpoRMzR7Y0C4IQtlgs/omJCaOhmEP1cfp9ynJVVVWVR6PR1aqqLlUj02hbuVGRHOW14cn+jujU6TDZ+cJlFRUV6vT0tP6aZVHkrnMC8Vu63Az2D7UdVYJ/vh/+oe+M2Z6NM/sWzDn/7H/MQE0JxmcGmt4122icjTP788o5310hb2ZWrkVOpvLyVPLJ+f/2uQN14j/8rwAAAABJRU5ErkJggg==" /***/ }), /***/ "zMj2": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* unused harmony export Entry */ /* unused harmony export LinkedList */ var Entry = (function () { function Entry(val) { this.value = val; } return Entry; }()); var LinkedList = (function () { function LinkedList() { this._len = 0; } LinkedList.prototype.insert = function (val) { var entry = new Entry(val); this.insertEntry(entry); return entry; }; LinkedList.prototype.insertEntry = function (entry) { if (!this.head) { this.head = this.tail = entry; } else { this.tail.next = entry; entry.prev = this.tail; entry.next = null; this.tail = entry; } this._len++; }; LinkedList.prototype.remove = function (entry) { var prev = entry.prev; var next = entry.next; if (prev) { prev.next = next; } else { this.head = next; } if (next) { next.prev = prev; } else { this.tail = prev; } entry.next = entry.prev = null; this._len--; }; LinkedList.prototype.len = function () { return this._len; }; LinkedList.prototype.clear = function () { this.head = this.tail = null; this._len = 0; }; return LinkedList; }()); var LRU = (function () { function LRU(maxSize) { this._list = new LinkedList(); this._maxSize = 10; this._map = {}; this._maxSize = maxSize; } LRU.prototype.put = function (key, value) { var list = this._list; var map = this._map; var removed = null; if (map[key] == null) { var len = list.len(); var entry = this._lastRemovedEntry; if (len >= this._maxSize && len > 0) { var leastUsedEntry = list.head; list.remove(leastUsedEntry); delete map[leastUsedEntry.key]; removed = leastUsedEntry.value; this._lastRemovedEntry = leastUsedEntry; } if (entry) { entry.value = value; } else { entry = new Entry(value); } entry.key = key; list.insertEntry(entry); map[key] = entry; } return removed; }; LRU.prototype.get = function (key) { var entry = this._map[key]; var list = this._list; if (entry != null) { if (entry !== list.tail) { list.remove(entry); list.insertEntry(entry); } return entry.value; } }; LRU.prototype.clear = function () { this._list.clear(); this._map = {}; }; LRU.prototype.len = function () { return this._list.len(); }; return LRU; }()); /* harmony default export */ __webpack_exports__["a"] = (LRU); /***/ }), /***/ "zRue": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAAAXNSR0IArs4c6QAABYdJREFUaAXlm01rG0cYx1ey/EKglBzyRj6A6bmHUnAT65ZAIZCbe0lu+QBxe+ulPab5ALnVl+YWKBTiU+ykgpBDzsUfoKQkhxAMsSXLdv+/zT5idq1daWdH0doaEM/OaOaZ5zfPvK5GjWhC4fj4+Fy/3185Ojr6WlUs81Ha5Uaj8YWe+RB2lbartP/0vMOn2Wy+brVaHaV9JEPo0AipUMZf7Ha7P0jnbRn8jeILPvpVtqeyr1T2yeLi4h+Kv/XRM6xMEOCDg4Nr8uSPquCGDG0Nq8g3TbB9ld2U5x/Mz8+/8NVj5SoBC7R9eHj4i5StmMIJy87c3NzPAt/2rccLWF680uv1Hkqu+VZcpZy8/nhhYeG+5JuyekoD7+/v36RCwX5ZtrKQ+WXDBxp8aWnpaRm9zTKZBUur/jVtWGzGBmzBpjIMY3lYyhfVhR9J3imj/HPlFfiGuvg9ye6oOkcCC/KCYP+U/HaUsml+L9iXgr4l+a7IjkLgxLNbdYc1wAS6LZnr6cIxnHTjWnvWYJE4BpvdtOxzLjCTgRTUcsxmIdw4NhdNZEO7tAqw9DAb5zaIW0ndnmX7kWz/ftiSdQJYGdlU/CM51XW2aiMK+oMmsa8kU5uTEx4ULDuoicJq3x3t7e1VZSosDwMs2UwpD2tvvKq98VY2U+i46ol0dIy0J450FAytPqVPe++2u/dOAWvs/q3cEzsI4FlgkRbU5SJ1vUinIUsKLTsay9+Z0gGwDLku727bF6GleTVPL57mQwOEDvLyqrz8HL2DZlWrr4euCH1qxEg9J+7CRfrp4np5EOcvyufzncsWN6cG+EUN8H8lgw0o6YohASkb5JF4fIfytvT0NWyuSr6NPcxrmZCwjFG85QNL41ivYBiECLAlr54GXfp2IMWRekoMi4erBhqM4UADBAgxY0OGnZOR7yW9XriZIRiFR0KAmk5XVu3m6s49devzLbXiShVYAAEN5AWXMfWMfoaKzeapL8eIwAhrS0p4b+wdmFhYR90QytvAsTkJFWBlVuYleZCAtxnDeCJEYAyjC+hAG5NlZukgwHiVmTkUrDUY+tAbaMZebskrl025jwzt1TwbzNsMH4aRT4C1qcL2O09pHZPyap4heHucXVteeVgZw17AwPLJji3S8ICbnk2jV2A8eVxvjZuPsuRlqSoZYuCSZT5lp7JhFdo512Zu4DAOOEuzcQmspZHHIGxmJs4kSD3M2CECk9ZuCEWnRMduUx6YGWBYmbT4MXomAqx06Z2ZoP0EuTN7wJo9X8+Kh2ENdjy0RrNlyV1fWZoIvmksU1WXJdUdHw+ZtD7KIC6QBA1A2scUWxxpYdw0y+8rVc8rWG01fyJFg1eZZZRO4sCQrZ+Dgx0eKhwZYYwqv8T7HMBuA/gAy7Ppl3hK4B7Upqt41DPbPlrd7Z6jyoT4nm0p9SJLhM2EcfASj73ugxIK4go5sk0D2I6K49rrsrEOx0Ez4Qs9dJLoWRKdhC1mSp2k1VW4aPbsLNHqpJX6MW3gYSDVElvq64/PCjAsYtp2eVIe5guNydn6QVyt8kbQa5KlpkG3Faf9jO0JQ+rXf+xKdWkzlLsRKvCTxU+bxPZh9zvgONGlXThtKn5X4TtuWt2f5d0N3bG+m2dnIbBguXK4JXkq7moJltt4bcluHvDQLm2ZKSgFXOd7aWl1ldiY2JoLi+2FwGSQondJq20Qr2OQjVwubWPrKPtGAqNAirrJuFjXc21m78SWdWzDxlGwMcs4mdw8evM/OxfEAWe6V/fhhtvUdmTUjQ15S4/roOxz4SydzZyNa++9qr33r0qf2N2uTJ3T+ZNHxgjOp9d1PuXa0yT/xvOb9sXPs3WXjVfycLYyrdeXtFlZU/rZ/qNWFpy44Gv5V7z/AQcBWKGbmKp0AAAAAElFTkSuQmCC" /***/ }), /***/ "zVWh": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAAAXNSR0IArs4c6QAAA0pJREFUWEfNmMvLVlUUh59fVjrINAeiQg6LcCDirDQv4EAKvCRGA/0PvERSkIpGKaiFl/4CbSCKt6BwIKTmZSbiICSHCiUOuumgzFry81tHdq/n/dzv933QWXAG73n3Xus5a6+19tpbDCgR8RLwFrAEmAnMyMeafsrnJnAG+FbSr4OYUO3giFgBrAPmA89WznsAXAC+lHSyZs5TgSLiDWA38HqNwmHGXAY+lHRpOD19gSJiHPAFsKFHwb+AlZ8CrhTL5GHN8s0FludHPNMzfz/wgaR/2sBagSJiMnA046SZ9ydwwJCS7tR4KyKm2jiwHphQzHF8rZb0W6+eJ4ASxh54rRh8HHhf0q0akN4xEfEysBd4p/jvuj3YC/UfoFym04VnAtgiaedIQFrAPgY+Axq79tTScvl6gfYVMWOY9yQdGQuYRkdEvAscLqD2S9rY/P8YKLPpYmF881h5po+ndhTv5zXZVwI5HZvUPi5pVa1nImK8x0r6a4A5x4qYuizJ5WVoLbPonUhlzqZXagM4ImYD53PuAknXaqAy0G8U2bfSxbMB+g5YlIp2S/qoRml+zBbg0xy/VZKDtkoiYpeLZQ4+K2mxcm9yXfF24KI3vbbOJNB2YFsq/USSf1dJ1qmfARdPbzNTDbQGOJQaLkryXlUtETFioPwg73Xz0uBaAxnGUJZNkrxdVMsYALmSf54GvzLQWWBhvlgk6Vw1zVBCjNZDtm0GyzkD/eisyhevSnLkPyERMQdY1tJ6eInfzAnfZ7tRzndsfC3pah+9tm0Gyw0D3QVeyBcTJd3rnRgRzwMO/EmDeK8Y+/ujgJXut+i2bTNY7hnoD2BivnhRUvPn47kR8RxwG5gyQqBfgGmS/m4Bsm0zWO4OsmSzgLdblmwx4Mfieuand8m+kfRD7ZJ1LqgPAmuT/v9I+03AnrR/qGuFcU33tg67KiJGs7luzi7Qqtxdln3OsEnZurkmkM9cI20/nH1NdV/YL5ta0t19dnv7kVCjadB8ZHKD1nq06ZPu/Ru0BHLH1p0WNqG60+QnkF3fnWNQQvnU2o2DYhN8nTpKF1DduWwo07Qz1zEthawbF1YtYL7Sc1/kKz1X27YrPd+S+CLBfdBAV3oPAX/xzUOBdT/GAAAAAElFTkSuQmCC" /***/ }), /***/ "zW9u": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("ouCL"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; __webpack_require__("/m1I"); var _tooltip = _interopRequireDefault(__webpack_require__("O6j2")); __webpack_require__("baa2"); var _icon = _interopRequireDefault(__webpack_require__("FC3+")); __webpack_require__("UQ5M"); var _message2 = _interopRequireDefault(__webpack_require__("/qCn")); var _classCallCheck2 = _interopRequireDefault(__webpack_require__("Q9dM")); var _createClass2 = _interopRequireDefault(__webpack_require__("wm7F")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("F6AD")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("fghW")); var _inherits2 = _interopRequireDefault(__webpack_require__("QwVp")); __webpack_require__("sRCI"); var _modal = _interopRequireDefault(__webpack_require__("vnWH")); var _react = _interopRequireWildcard(__webpack_require__("GiK3")); var _dva = __webpack_require__("S6G3"); var _markMarkers = __webpack_require__("CEIq"); var _events = _interopRequireDefault(__webpack_require__("TLe5")); __webpack_require__("RKq/"); var _dec, _class; //渲染每一个人员item /** * 通过搜索获得地图列表(保安人员) */ // 引入 EventEmitter // import styles from "../../Police/index.less"; function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } var confirm = _modal.default.confirm; var PersonItem = exports.default = (_dec = (0, _dva.connect)(function (state) { return { policeData: state.command.policeData, selectedId: state.command.policeData.selectedId, mapStyle: state.command.mapStyle }; }), _dec(_class = /*#__PURE__*/function (_Component) { function PersonItem(props) { var _this2; (0, _classCallCheck2.default)(this, PersonItem); _this2 = _callSuper(this, PersonItem, [props]); _this2.state = { data: props.data || [], loadingText: props.data, propsIndex: props.index // lastSelectedId: null,//上一个选中的id // nextSelectedId: null,//下一个选中的id }; return _this2; } (0, _inherits2.default)(PersonItem, _Component); return (0, _createClass2.default)(PersonItem, [{ key: "componentDidMount", value: function componentDidMount() {} }, { key: "componentWillReceiveProps", value: function componentWillReceiveProps(nextProps) { this.setState({ loadingText: nextProps.loadingText, propsIndex: nextProps.index }); if (nextProps.data != this.state.data) { this.setState({ data: nextProps.data }); } // if (nextProps.selectedId !== this.state.lastSelectedId) { // this.setState({ // nextSelectedId: nextProps.selectedId, // lastSelectedId: this.state.nextSelectedId, // }, () => { // console.log(this.state.lastSelectedId); // console.log(this.state.nextSelectedId); // }) // } } }, { key: "render", value: function render() { var _this3 = this; var _this$state = this.state, propsIndex = _this$state.propsIndex, data = _this$state.data; var mapStyle = this.props.mapStyle; return /*#__PURE__*/_react.default.createElement("div", { style: { marginLeft: 15 }, className: "personItem" }, data && data.length > 0 ? data.map(function (item, index) { return /*#__PURE__*/_react.default.createElement("div", { key: item.id + index, className: "item", onClick: function onClick(e) { e.stopPropagation(); if (item.longitude && item.latitude) { // console.log(this.props.selectedId); var markData = _this3.props.policeData[_this3.props.tab][_this3.props.place]; _this3.props.dispatch({ type: "command/setPoliceSelectIndex", payload: item.id }); var thatGIS = _this3.props._thisGIS; markData.map(function (marker) { if (marker.w.key === item.id) { //打开当前选中的保安员窗体 // openPersonInfo.call(thatGIS, item, marker, 'police') _events.default.emit('openPersonInfo', { item: item, marker: marker, type: 'police' }); marker.setContent('
    ' + marker.w.indexText + "
    "); } if (marker.w.key === _this3.props.selectedId) { //如果上一个选中打点信息存在,先置为原来状态 marker.setContent('
    ' + marker.w.indexText + "
    "); } }); } else { _message2.default.warning("该人员暂未定位"); } } }, /*#__PURE__*/_react.default.createElement("div", { className: _this3.props.selectedId === item.id ? "selected poibox" : "poibox" }, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("div", { className: "name", style: { height: '31px' } }, item.longitude && item.latitude && /*#__PURE__*/_react.default.createElement("span", { className: "amap_lib_placeSearch_poi poibox-icon", style: { display: 'inline-block' } }, propsIndex ? propsIndex : index), /*#__PURE__*/_react.default.createElement("span", { className: "name", style: { color: mapStyle == 'dark' ? '#fff' : '#5E5E5E' } }, item.securityName || "---"), /*#__PURE__*/_react.default.createElement("span", { className: "send-header-bar", style: { float: 'right' } }, /*#__PURE__*/_react.default.createElement(_tooltip.default, { placement: "bottom", title: "\u6587\u5B57\u8C03\u5EA6" }, /*#__PURE__*/_react.default.createElement(_icon.default, { type: "form", style: { fontSize: "17px" }, onClick: function onClick(e) { e.stopPropagation(), //合成事件停止冒泡 // this.props.clickTextScheduling(item, "text"); _events.default.emit('clickTextScheduling', { item: item, type: "text" }); } })), /*#__PURE__*/_react.default.createElement(_tooltip.default, { placement: "bottom", title: "\u8BED\u97F3\u8C03\u5EA6", onClick: function onClick(e) { e.stopPropagation(), //合成事件停止冒泡 // this.props.clickTextScheduling(item, "voice"); _events.default.emit('clickTextScheduling', { item: item, type: "voice" }); } }, /*#__PURE__*/_react.default.createElement(_icon.default, { type: "audio", style: { fontSize: "17px" } })), /*#__PURE__*/_react.default.createElement(_tooltip.default, { placement: "bottom", title: "\u89C6\u9891\u8C03\u5EA6", onClick: function onClick(e) { var _this = _this3; e.stopPropagation(), //合成事件停止冒泡 _events.default.emit('clickTextScheduling', { item: item, type: "video", isNeedRecord: [item.phone] }); // confirm({ // title: <>是否开启屏幕录制?Modal.destroyAll()} style={{position:'absolute',top:'4px',right:'6px',cursor:'pointer',color:'#000000a6'}}>取消, // content: // "开启后,被调度保安员的视频页面将会被录制,调度结束后,可查看录制文件。", // okText: "开启录制,继续调度", // cancelText: "不开启录制,继续调度", // onOk() { // // _this.props.clickTextScheduling(item, "video", [item.phone]); // eventCenter.emit('clickTextScheduling', { // item, // type: "video", // isNeedRecord: [item.phone] // }); // }, // onCancel() { // // _this.props.clickTextScheduling(item, "video"); // eventCenter.emit('clickTextScheduling', { // item, // type: "video", // }); // }, // }); } }, /*#__PURE__*/_react.default.createElement(_icon.default, { type: "video-camera", style: { fontSize: "17px" } }))))))); }) : /*#__PURE__*/_react.default.createElement("div", { style: { textAlign: "center", fontSize: "14px", color: "#afb0b1" } }, this.state.loadingText || "暂无数据")); } }]); }(_react.Component)) || _class); /***/ }), /***/ "zXyL": /***/ (function(module, exports) { module.exports = "data:image/png;base64,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" /***/ }) });